Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
  • nginx
  • test
3 results

Target

Select target project
  • kwant/website
  • jbweston/website
  • basnijholt/website
  • r-j-skolasinski/website
  • marwahaha/website
5 results
Select Git revision
  • master
  • nginx
  • test
3 results
Show changes
Showing
with 235 additions and 44 deletions
files/corbino-conductance.png

52.5 KiB

File added
<html>
<head>
<meta name="viewport" content="width=device-width; height=device-height;">
<title>Kwant screencast</title>
<style media="screen" type="text/css">
body {
background-color: black;
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
video {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
max-width: 100%;
max-height: 100%;
}
video:focus {
outline-width: 0;
}
</style>
</head>
<body>
<video controls autoplay>
<source src="http://downloads.kwant-project.org/doc/kwant-screencast-2014.mp4" type='video/mp4; codecs="avc1.4D401E, mp4a.40.2"'>
<source src="http://downloads.kwant-project.org/doc/kwant-screencast-2014.webm" type='video/webm; codecs="vp8.0, vorbis"'>
Please <a href="http://downloads.kwant-project.org/doc/kwant-screencast-2014.mp4">download the video manually</a>.
</video>
</body>
</html>
files/flying-qubit.png

101 KiB

File added
File added
files/kwant_icon.png

2.47 KiB

files/kwant_logo.png

44.9 KiB

File added
File added
files/quantum-wire.png

66.6 KiB

import os
import yaml
from mako.lookup import TemplateLookup
import pyrtek, pyrtek.rst, pyrtek.mako
mako_filter = pyrtek.mako.Filter(TemplateLookup(['../templates']))
rst_filter = pyrtek.rst.Filter()
filters = {'mako': mako_filter,
'rst': rst_filter,
'default': pyrtek.chain_filters(rst_filter, mako_filter)}
default_meta = {'__filter__': 'default',
'__template__': 'default.mako'}
# rexp, repl, priority, func
rules = [(r'(.*)\.txt$', r'\1.html', 0,
lambda s, d: pyrtek.Text(s, d, filters, default_meta))]
def main():
# Load catalog, if it exists.
try:
with open('catalog.yaml') as f:
catalog = yaml.load(f)
except IOError:
catalog = {}
# The following block of code is executed inside the content directory.
saved_cwd = os.getcwd();
os.chdir('content')
try:
catalog = pyrtek.build(pyrtek.expand_rules(rules), catalog)
finally:
os.chdir(saved_cwd)
# Save catalog.
with open('catalog.yaml', 'w') as f:
yaml.dump(catalog, f)
if __name__ == '__main__':
main()
<IfModule mod_mime.c>
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
</IfModule>
# Do not treat Python files as CGI scripts.
<FilesMatch \.py$>
SetHandler default-handler
</FilesMatch>
RewriteEngine on
# We don't need more than that.
RewriteOptions MaxRedirects=2
# Redirect /foo/index.html to /foo/
RewriteRule ^(|.*/)index\.html$ /$1 [R=301,L]
# Redirect /foo/bar.html to /foo/bar only if a html file was requested by the
# browser. Without the condition the following rewrite rule leads to a
# redirection loop.
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*\.html\ HTTP/
RewriteRule ^(.*)\.html$ /$1 [R=301,L]
# Rewrite /foo/bar to /foo/bar.html if the latter exists.
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*[^/])$ /$1.html [L]
# Remove trailing slash if the requested directory does not exist.
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [R=301,L]
Redirect 302 /contact /doc/latest/pre/authors
Redirect 302 /authors /doc/latest/pre/authors
Redirect 302 /citing /doc/latest/pre/citing
Redirect 302 /cite /doc/latest/pre/citing
Redirect 302 /license /doc/latest/pre/license
Redirect 302 /download /install
# Redirect old tutorial URLs to new ones.
# The tutorial numbers refer to the tutorial enumeration in Kwant 1.2.x
Redirect 302 /doc/1/tutorial/tutorial1 /doc/1/tutorial/first_steps
Redirect 302 /doc/1/tutorial/tutorial2 /doc/1/tutorial/spin_potential_shape
Redirect 302 /doc/1/tutorial/tutorial3 /doc/1/tutorial/spectrum
Redirect 302 /doc/1/tutorial/tutorial4 /doc/1/tutorial/graphene
Redirect 302 /doc/1/tutorial/tutorial5 /doc/1/tutorial/superconductor
Redirect 302 /doc/1/tutorial/tutorial6 /doc/1/tutorial/plotting
File added
imgsrc/workflow/billiard-shape.png

10.4 KiB

import kwant
import matplotlib.pyplot as pyplot
from scipy import misc
import numpy as np
# shape.png is an image containing the system shape colored in black. Here we
# read the image from this file, create an empty scattering region, and add to
# it the sites with coordinates of pixels that we encounter in the image.
im = misc.imread('billiard-shape.png')[:, :, 0]
sys = kwant.Builder()
lat = kwant.lattice.square()
for pos in np.argwhere(im != 255):
sys[lat(pos[1], -pos[0])] = 4
def wire_shape(period, center, r, ymin, ymax):
"""Return sites from a bounded segment of an infinite wire."""
direction = np.array(period / np.linalg.norm(period))
def wire_shape(pos):
rel_pos = center - pos
projection = direction * np.dot(direction, rel_pos) - rel_pos
return sum(projection**2) <= r**2 and ymin < pos[1] < ymax
return lat.shape(wire_shape, center)
# Directions of the leads, positions of the centers of the lead segments to be
# attached, and the boundaries of these segments in y-directions.
wire_dir = [(-1., -1.), (3., -4.), (2., 4.)]
wire_center = [(166, -236), (216, -106), (246, -86)]
ylims = [(-400, -200), (-440, -100), (-100, 60)]
# Add segments of leads to the scattering region, and attach leads themselves.
for direction, center, ylim in zip(wire_dir, wire_center, ylims):
sys[wire_shape(direction, np.array(center), 50, *ylim)] = 4
lead = kwant.Builder(kwant.TranslationalSymmetry(direction))
lead[lat.wire(center, 50)] = 4
lead[lat.neighbors()] = -1
sys.attach_lead(lead)
# Finally add hoppings to the system, get its wave function, and plot.
sys[lat.neighbors()] = -1
sys = sys.finalized()
wfs = kwant.wave_function(sys, energy=0.14)(0)[0]
kwant.plotter.map(sys, abs(wfs), oversampling=1, cmap="PuBu")
.. title: Improved web interface for the mailing list
.. slug: improved-interface-for-mailing-list
.. date: 2020-05-28 20:00:00 UTC
.. category:
.. type: text
The Kwant mailing list has been migrated to a new server that provides a much-improved web interface.
.. TEASER_END
In May 2020, thanks to the friendly people at python.org,
kwant-discuss was migrated to a server running Mailman 3.
The list remains a mailing list (existing subscriptions continue),
but now also offers a modern web interface that is similar to a web forum.
The complete archives were migrated and are now searchable.
Please see the `“community” section </community>`_ of this site for usage information.
The `old address of the list <kwant-discuss@kwant-project.org>`_ remains usable: any messages are simply redirected to the new one.
.. title: List of Kwant extensions added to website
.. slug: kwant-extensions
.. date: 2018-03-28 11:56:55 UTC
.. tags:
.. category:
.. link:
.. description:
.. type: text
We have added a `new section to the website </extensions.html>`_
that showcases useful extensions to Kwant that have been made by members of the
community.
.. TEASER_END
While we welcome contributions to the core Kwant package, we realize that
it can be a lot of work to implement something that is both robust enough
and of sufficiently general interest to be added to Kwant directly.
Nevertheless there is a body of existing software that extends Kwant in ways
that could be useful to others in the Kwant community. We hope that providing
a central place for listing these extensions will make them more discoverable
by others.
If you have extended Kwant in some way, please get in touch via the
`kwant-devel <mailto:kwant-devel@kwant-project.org>`_ mailing list!
Happy Kwanting,
Kwant team
.. title: Kwant adds an FAQ to the documentation
.. slug: kwant-faq-intro
.. date: 2017-06-29 07:07:23 UTC
.. tags:
.. category:
.. link:
.. description:
.. type: text
The Kwant team in Grenoble is currently hosting a masters student, Paul Clisson,
who has taken the initiative and written a "Frequently Asked
Questions" (FAQ) section to complement the existing Kwant tutorial; thanks Paul!
.. TEASER_END
A preliminary version of of the FAQ is already available
`here <https://test.kwant-project.org/doc/doc-faq/tutorial/FAQ>`_. Any and all
user feedback is valuable to us, so tell us what you think! You can either join
the `discussion on the mailing
list <https://www.mail-archive.com/kwant-discuss@kwant-project.org/msg01313.html>`_
or comment on the open `merge
request <https://gitlab.kwant-project.org/kwant/kwant/merge_requests/148>`_ on
the Kwant gitlab.
Happy Kwanting,
Kwant team
.. title: Release of Kwant 1.3
.. slug: release-of-kwant-13
.. date: 2017-05-24 21:17:10 UTC
.. category: release-announcement
.. type: text
After more than one year of development, we are extremely pleased to announce the release of Kwant 1.3.
.. TEASER_END
Kwant 1.3 supports
* discretizing of continuum Hamiltonians,
* calculating and displaying local densities and currents,
* declaring and using symmetries and conservation laws,
* calculating bulk properties using the kernel polynomial method,
* finalizing builders with multiple translational symmetries,
and has many other improvements that are detailed in the `what's new in Kwant 1.3 </doc/1/pre/whatsnew/1.3>`_ document.
The `installation instructions </install.html>`_ have been updated to explain how to install Kwant 1.3 on computers running GNU/Linux, Mac OS, and Windows. Note that thanks to the package manager Conda it is now much easier to install Kwant under Mac OS and on Unix accounts without root privileges.
The new version is practically 100% backwards-compatible with scripts written for previous versions of Kwant 1.x.
The Kwant team is happy to welcome Joseph Weston as a member. We are also grateful to the many contributors without whom this release would not be nearly as good:
* Jörg Behrmann
* Bas Nijholt
* Michał Nowak
* Viacheslav Ostroukh
* Pablo Pérez Piskunow
* Tómas Örn Rosdahl
* Sebastian Rubbert
* Rafał Skolasiński
* Adrien Sorgniard
We would like to hear your feedback at kwant-discuss@kwant-project.org.