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

Target

Select target project
  • kwant/website
  • jbweston/website
  • basnijholt/website
  • r-j-skolasinski/website
  • marwahaha/website
5 results
Show changes
Commits on Source (209)
Showing
with 1646 additions and 744 deletions
*~
*.pyc
/catalog.yaml
.doit.db
cache/
output/
image: kwant/website-deploy
before_script:
- nikola build
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- eval $(ssh-agent -s)
test_deploy:
script:
- echo "$TEST_WEBSITE_KEY" | tr -d '\r' | ssh-add -
- nikola deploy
except:
- master
master_deploy:
script:
- echo "$MASTER_WEBSITE_KEY" | tr -d '\r' | ssh-add -
- nikola deploy master
only:
- master
This diff is collapsed.
*.html
Kwant user survey
=================
The kwant user survey is finished, please use the `mailing list
</community.html>`_ if you would like to leave feedback.
Quantum transport simulations made easy
=======================================
Kwant is a `free (open source) <https://gitlab.kwant-project.org/kwant/kwant>`_ Python
package for numerical calculations on tight-binding models with a strong focus
on quantum transport. It is designed to be flexible and easy to use. Thanks to
the use of innovative algorithms, Kwant is often faster than other available
codes, even those entirely written in the low level FORTRAN and C/C++ languages.
Tight-binding models can describe a vast variety of systems and phenomena in
quantum physics. Therefore, Kwant can be used to simulate metals, graphene,
topological insulators, quantum Hall effect, superconductivity, spintronics,
molecular electronics, any combination of the above, and many other things.
Kwant does not use the traditional input files often found in scientific
software packages. Instead, one writes short programs in the powerful yet
easy-to-learn Python language. These programs define a system and calculate its
quantum properties (conductance, density of states, etc). This workflow can be
summarized as follows:
.. raw:: html
<object type="image/svg+xml" data="kwant-workflow.svgz" class="img-responsive">kwant-workflow.svgz</object>
Kwant was designed to be easy to use: Section 2 of the `Kwant paper
<http://downloads.kwant-project.org/doc/kwant-paper.pdf>`_ contains a
line-by-line walkthrough of a program very similar to the one used to generate
the above image. That complete Python script is 26 lines long (including
comments).
Examples of Kwant usage
-----------------------
The following examples are meant to give an overview of what is possible with
Kwant. The tutorial section of `Kwant documentation <doc/1/>`_ and the
`Kwant paper`_ each contain several pedagogical examples with line-by-line
explanations (`zipfile of all examples
<http://downloads.kwant-project.org/examples/kwant-examples-1.0.0.zip>`_).
Graphene flake
..............
.. raw:: html
<object type="image/svg+xml" class="col-md-4 pull-left img-responsive" data="graphene-edgestate.svgz">graphene-edgestate.svgz</object>
The complete code that constructs the graphene flake shown on the right side is
.. code:: python
def disk(pos):
x, y = pos
return x**2 + y**2 < 8**2
lat = kwant.lattice.honeycomb()
syst = kwant.Builder()
syst[lat.shape(disk, (0, 0))] = 0
syst[lat.neighbors()] = -1
In addition to the flake itself, the image also shows the wave function of a
low energy eigenstate. The size of each circle is proportional to the wave
function probability amplitude on that site. It can be clearly seen that the
wave function is peaked near the zigzag segments of the boundary, as `expected
<http://arxiv.org/abs/1003.4602>`_ for graphene quantum dots.
Taken from the Kwant `plotting tutorial <doc/1/tutorial/tutorial6.html>`_.
.. class:: row nomargin
Quantum Hall effect
...................
.. raw:: html
<object type="image/svg+xml" class="col-md-4 img-responsive pull-left" data="qhe-edgestate.svgz">qhe-edgestate.svgz</object>
<object type="image/svg+xml" class="col-md-4 img-responsive pull-right" data="qhe-plateaus.svgz">qhe-plateaus.svgz</object>
One of the most common applications of Kwant is to calculate the conductance of
a nanoelectronic system. The plot on the left shows the conductance through a
2-d electron gas as a function of magnetic flux. The quantization of
conductance that is visible (plateaus) is the hallmark of the quantum Hall
effect. The third plateau does not develop due to a constriction in the system
that leads to backscattering. The scattering wave function from the left lead
at magnetic field strength corresponding to the middle of the third QHE plateau
is shown on the right.
Taken from example 6 of the `Kwant paper
<http://downloads.kwant-project.org/doc/kwant-paper.pdf>`_.
.. class:: row
3-d system: Majorana states
...........................
.. class:: col-md-4 img-responsive pull-left
.. image:: quantum-wire.png
Kwant allows systems of any dimensionality, for example three-dimensional ones.
This image shows a 3-d model of a semiconducting quantum wire (gray cylinder).
The red region is a tunnel barrier, used to measure tunneling conductance, the
blue region is a superconducting electrode. In this simulated device, a
Majorana bound state appears close to the superconducting-normal interface.
Taken from an unpublished work by S. Mi, A. R. Akhmerov, and M. Wimmer.
.. class:: row
Numerical experiment: flying qubit
..................................
.. class:: col-md-4 col-sm-12 img-responsive pull-right
.. image:: flying-qubit.png
Numerical simulations and experimental results for a flying qubit sample made in
a GaAs/GaAlAs heterostrucutre. The Kwant simulations were performed with
particular attention to a realistic model of the confining potential seen by the
electrons. This allows for rather subtle aspects of the experiment could be
reproduced. Such "numerical experiments" can not only be used to interpret the
experimental data but also can help to design the sample geometry and in to
choose the right materials.
Taken from an unpublished work by T. Bautze et al. See Yamamoto et al., `Nature
Nanotechnology 7, 247 (2012) <http://dx.doi.org/doi:10.1038/nnano.2012.28>`_ for
details about the experiment.
.. class:: row
Conductance of a Corbino disk in a quantum Hall regime
......................................................
.. raw:: html
<object type="image/svg+xml" class="col-md-4 col-sm-6 img-responsive pull-left" data="corbino-layout.svgz">corbino-layout.svgz</object>
.. class:: col-md-4 col-sm-6 img-responsive pull-right
.. image:: corbino-conductance.png
Transport properties of a Corbino disk across a quantum Hall transition. Left:
geometry of the sample consisting of a ring-shaped two-dimensional electron gas
(grey) in a perpendicular magnetic field. Right: conductance across the
transition, showing quantized conductance peaks.
Taken from I. C. Fulga, F. Hassler, A. R. Akhmerov, C. W. J. Beenakker,
`Phys. Rev. B 84, 245447 (2011)
<http://link.aps.org/doi/10.1103/PhysRevB.84.245447>`_; `arXiv:1110.4280
<http://arxiv.org/abs/1110.4280>`_.
......@@ -6,9 +6,8 @@ The principal developers of kwant are:
* `Christoph W. Groth <mailto:christoph.groth@cea.fr>`_ (SPSMS-INAC-CEA
Grenoble)
* `Michael Wimmer <http://www.lorentz.leidenuniv.nl/~wimmer/>`_ (Leiden
University)
* `Anton R. Akhmerov <http://antonakhmerov.org>`_ (Delft University)
* `Michael Wimmer <http://www.lorentz.leidenuniv.nl/~wimmer/>`_ (TU Delft)
* `Anton R. Akhmerov <http://antonakhmerov.org>`_ (TU Delft)
* `Xavier Waintal <http://inac.cea.fr/Pisp/xavier.waintal/>`_ (SPSMS-INAC-CEA
Grenoble)
......
Citing kwant
Citing Kwant
============
We provide Kwant as free software under a `BSD license </license.html>`_ as a
service to the physics community. If you have used Kwant for work that has lead
to a scientific publication, please mention this explicitly in the text body.
In addition, we ask you to cite the main paper that introduces Kwant:
service to the physics community. If you have used Kwant for work that has
lead to a scientific publication, please mention the fact that you used it
explicitly in the text body. For example, you may add
The reference will be provided here once it is available (soon).
*the numerical calculations were performed using the Kwant code*
to the description of your numerical calculations. In addition, we ask you to
cite the main paper that introduces Kwant:
C. W. Groth, M. Wimmer, A. R. Akhmerov, X. Waintal,
*Kwant: a software package for quantum transport*,
`New J. Phys. 16, 063065 (2014)
<http://iopscience.iop.org/1367-2630/16/6/063065/article>`_.
Other references we ask you to consider
---------------------------------------
If you have profited from the quantum transport functionality of Kwant, please
also cite the upcoming paper that describes the relevant algorithms. The
......@@ -17,9 +29,9 @@ Kwant owes much of its current performance to the use of the `MUMPS
equations. If you have done high-performance calculations, we suggest citing
P. R. Amestoy, I. S. Duff, J. S. Koster, J. Y. L’Excellent, SIAM. J. Matrix
Anal. & Appl. **23** (1), 15 (2001).
Anal. & Appl. 23 (1), 15 (2001).
Finally, if you use the routine for generation of circular ensembles of random
matrices, please cite
\F. Mezzadri, Notices Am. Math. Soc. **54**, 592 (2007).
\F. Mezzadri, Notices Am. Math. Soc. 54, 592 (2007).
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7056 2011-06-17 10:50:48Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math {
margin-left: 2em ;
margin-right: 2em }
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
@import url(html4css1.css);
/* Keeping a scrollbar always there to make centering work properly. */
html {
overflow-y: scroll;
}
body {
min-width: 20em;
max-width: 55em;
margin: 0 auto;
font-family: "Bitstream Vera Serif", Georgia, serif;
}
div.padding {
margin: 1em;
}
/* Enable hyphenation. */
body {
text-align:justify;
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
-o-hyphens: auto;
hyphens: auto;
}
tt, pre {
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
-o-hyphens: none;
hyphens: none;
}
/* The link color is the average color of the Kwant logo. */
a {
color: #045e94;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
ul.navigation{
display: block;
text-align: center;
padding: 0.4em;
border-radius: 5px;
background-color: #eeeeee;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
-o-hyphens: none;
hyphens: none;
}
ul.navigation li{
display: inline;
margin: 0 1em;
}
.hidden_structure {
display: none;
}
#header { margin-top: 0.5em; }
#footer { margin: 2em 0; }
#header, #header a, #footer {
color: black;
}
h1, h2, h3, h4, h5, h6 {
font-family: "Bitstream Vera Sans", Verdana, sans-serif;
font-weight: normal;
}
li {
margin: 0.3em 0
}
img {
display: block;
margin-left: auto;
margin-right: auto;
}
pre, code { background-color: #eee; border: 1px solid #ccc; }
pre { padding: 0.3em; }
code { padding: 0 0.1em; }
pre > code { border: none; padding: 0; }
div.leftside {
float: left;
margin: 0 2em 0 0;
}
div.rightside {
float: right;
margin: 0 0 0 2em;
}
div.section{
height: auto;
overflow: auto;
}
The Kwant community
===================
The Kwant project is an international collaboration.
Everybody is welcome to participate in the community
by asking and replying to questions, reporting bugs, providing suggestions,
and `contributing to the code and documentation </contribute.html>`_.
The Kwant community uses three public communication channels:
the mailing list for generic discussions, questions, and announcements;
the gitlab instance for development discussions and reporting bugs;
and the chat for real-time discussions related to development.
A list of `Kwant authors </authors>`_ is included in the documentation.
Please contact the authors directly only for matters that cannot be discussed on the public channels.
Mailing list
------------
The kwant-discuss mailing list is the main public communication platform for anything related to Kwant:
questions, discussions, development, and announcements.
It may be used both as a web forum and as a classical mailing list.
The `kwant-discuss web interface <https://mail.python.org/archives/list/kwant-discuss@python.org/>`_
allows to follow discussions and search the archives.
To start a new discussion thread, you may either use the web interface
(sign-in required)
or write directly to
kwant-discuss@python.org.
In order to avoid spam,
messages of unsubscribed participants are held for moderation.
Similarly, replying is possible either by mail
(if you received the post to which you want reply by mail),
or using the web interface:
the “reply” button under each message allows to compose directly
(for signed-in users),
or triggers a reply by mail (otherwise).
You may subscribe to receive posts to the list by mail.
Subscription is done either through the
`kwant-discuss info page
<https://mail.python.org/mailman3/lists/kwant-discuss.python.org/>`_
or by sending any message to
kwant-discuss-join@python.org.
(The subject and content are ignored and may be empty.)
To unsubscribe, either use the info page,
or send any message to kwant-discuss-leave@python.org.
List etiquette :
- When asking questions,
`help others to help you <https://stackoverflow.com/help/how-to-ask>`_.
In particular, use the search function before posting.
- When replying, please avoid quoting the complete original message.
Instead, consider
`bottom-posting <https://en.wikipedia.org/wiki/Posting_style#Bottom-posting>`_.
Announcements mailing list
--------------------------
This read-only list is used for important announcements like new releases of Kwant.
Only a few messages are sent per year.
These announcements are also posted on the main mailing list,
so there is no need to subscribe to both lists.
We recommend every user of Kwant to subscribe at least to this list in order to stay informed about new developments.
The `kwant-announce archives <https://mail.python.org/archives/list/kwant-announce@python.org/>`_
are available on the web.
To subscribe, either use the form on the `kwant-announce info page <https://mail.python.org/mailman3/lists/kwant-announce.python.org/>`_
or simply send any message to kwant-announce-join@python.org.
(The subject and content are ignored and may be empty.)
To unsubscribe, either use the info page, or send any message to kwant-announce-leave@python.org.
Development chat
----------------
The Kwant developer chat is accessible to the community via `Gitter <https://gitter.im/kwant-project/Lobby>`_.
Come say hi if you would like to get involved with developing Kwant!
Gitlab instance
---------------
The Kwant project runs a `gitlab instance <https://gitlab.kwant-project.org/>`_
that hosts the `main Kwant code repository <https://gitlab.kwant-project.org/kwant/kwant>`_
as well as the `repositories of related projects <https://gitlab.kwant-project.org/kwant>`_.
The gitlab instance is used for reporting bugs (see next section) and `development </contribute.html>`_
Reporting bugs
--------------
If you encounter a problem with Kwant,
first try to reproduce it with as simple a system as possible.
Double-check with the documentation that what you observe is actually a bug in Kwant.
If you think it is, please check `the list of known bugs in Kwant <https://gitlab.kwant-project.org/kwant/kwant/issues?label_name=bug>`_.
It may be also a good idea to search or ask on the general mailing list.
(You can use the search box at the top of this page.)
If after checking you still think that you have found a bug, please add it to
the above-mentioned list of bugs by creating an issue with the “bug” label. A
useful bug report should contain:
- The versions of software you are using: Kwant, Python, operating system, etc.
- A description of the problem, i.e. what exactly goes wrong. This should
include any relevant error messages.
- Enough information to reproduce the bug, preferably in the form of a simple
script.
Getting help, contributing and reporting problems
=================================================
Mailing list
------------
The mailing list is (meant to become) the main communication platform for
anything related to Kwant: asking questions, reporting bugs, and discussing
further development. You can use it in various ways:
- `Subscribe <https://mailman-mail5.webfaction.com/listinfo/kwant-discuss>`_ and
use it along with your regular email. (You can unsubscribe at any moment.)
- Follow through the `Gmane web interface
<http://news.gmane.org/gmane.comp.science.kwant.user>`_. It is both possible
to write new messages (action: post) and to reply (action: followup).
- .. raw:: html
<p><form id="searchgmane" method="get" action="http://search.gmane.org/">
<input type="text" name="query" />
<input type="hidden" name="group" value="gmane.comp.science.kwant.user" />
<input type="submit" value="Search the Kwant mailing list" />
</form></p>
- Send a message directly to kwant-discuss@kwant-project.org. (If you are not
subscribed, it is not guaranteed that any replies will reach you by email.)
Reporting bugs
--------------
If you encounter a problem with Kwant, first try to reproduce it with as simple
a system as possible. Double-check with the documentation that what you
observe is actually a bug in Kwant. If you think it is, please check whether
the problem is already known by searching the mailing list.
If the problem is not known yet, please send a bug report to the mailing list.
A report should contain:
* The versions of software you are using (Kwant, Python, operating system, etc.)
* A description of the problem, i.e. what exactly goes wrong.
* Enough information to reproduce the bug, preferably in the form of a simple
script.
Contributing
------------
We see Kwant not just as a package with fixed functionality, but rather as a
framework for implementing different physics-related algorithms using a common
set of concepts and, if possible, a shared interface. We have designed it
leaving room for growth, and plan to keep extending it.
External contributions to Kwant are highly welcome. You can help to advance
the project not only by writing code, but also by reporting bugs, and
fixing/improving the documentation. A `mailing list
</community.html>`_ is available for discussions.
If you have some code that works well with Kwant, or extends it in some useful
way, please consider sharing it. Any external contribution will be clearly
marked as such, and relevant papers will be added to the list of `suggested
acknowledgements </citing.html>`_. The complete development history is also
made available through a `web interface <http://git.kwant-project.org/kwant>`_.
If you plan to contribute, it is best to coordinate with us in advance either
through the mailing list, or directly at authors@kwant-project.org for matters
that you prefer to not discuss publicly.
How to contribute
.................
We use the version control system `Git <http://git-scm.com/>`_ to coordinate the
development of Kwant. If you are new to Git, we invite you to learn its basics.
(There's a plethora of information available on the Web.) Kwant's Git
repository contains not only the source code, but also all of the reference
documentation and the tutorial.
It is best to base your work on the latest version of Kwant::
git clone http://git.kwant-project.org/kwant
Then you can modify the code, and build Kwant and the documentation as
described in the `build instructions
</doc/1.0/pre/install.html#building-and-installing-from-source>`_.
Some things to keep in mind:
* Please keep the code consistent by adhering to the prevailing naming and
formatting conventions. We generally follow the `"Style Guide for Python
Code" <http://www.python.org/dev/peps/pep-0008/>`_ For docstrings, we follow
`NumPy's "Docstring Standard"
<http://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt>`_ and
`Python's "Docstring Conventions"
<http://www.python.org/dev/peps/pep-0257/>`_.
* Write tests for all the important functionality you add. Be sure not to
break existing tests.
A useful trick for working on the source code is to build in-place so that there
is no need to re-install after each change. This can be done with the following
command ::
python setup.py build_ext -i
The ``kwant`` subdirectory of the source distribution will be thus turned into
a proper Python package that can be imported. To be able to import Kwant from
within Python, one can either work in the root directory of the distribution
(where the subdirectory ``kwant`` is located), or make a (symbolic) link from
somewhere in the Python search path to the the package subdirectory.
Contributing to Kwant
=====================
We see Kwant not just as a package with fixed functionality, but rather as a
framework for implementing different physics-related algorithms using a common
set of concepts. Contributions to Kwant are highly welcome. You can help the
project not only by writing code, but also by reporting bugs, and
fixing/improving the website and the documentation.
Where help is needed
--------------------
The `Kwant issue tracker
<https://gitlab.kwant-project.org/kwant/kwant/issues>`_ serves to track bugs
in Kwant, but most issues are in fact ideas for enhancements. The issues are
categorized with labels, so that it is possible to view `all the “easy” issues
<https://gitlab.kwant-project.org/kwant/kwant/issues?label_name=difficulty%3A+easy>`_
for example.
Please do feel free to enter new issues yourself. If you are unsure about some aspect It may be a good idea to discuss your idea on the mailing list kwant-discuss@kwant-project.org before filing an issue.
If you already have some code that extends Kwant in a useful way, please
consider sharing it. If your extension fits well with Kwant and is of wide
enough interest, we will be happy to include it into Kwant proper. For more
specialized cases, we will find a solution as well. (We could, for example,
add a list of Kwant-related modules to this website.) In any case, external
contributions will be clearly marked as such, and relevant papers will be
added to the list of `suggested acknowledgements </cite.html>`_.
Getting the source code
-----------------------
The source code of released versions of Kwant is available for `download
<http://downloads.kwant-project.org/kwant/>`_. You can follow the development
through the `Kwant page of our GitLab instance
<https://gitlab.kwant-project.org/kwant/kwant>`_. The `Git
<http://git-scm.com/>`_ repository of Kwant can be cloned directly with the
command ::
git clone https://gitlab.kwant-project.org/kwant/kwant.git
The Kwant git repository has two main branches: The branch *master*
contains the development towards the next release. The branch *stable* contains
the most recent release that is considered stable, and only bugfixes are applied
to it.
Setting up for development
--------------------------
When working with the Kwant source, regular `build instructions
</doc/1/pre/install.html#building-and-installing-from-source>`_ apply. It
would be tiresome, however, to have to reinstall the modified Kwant after each
modification.
One easy way to avoid this is to build in-place so that there is no need to
reinstall after each change. This can be done with the following command ::
python3 setup.py build_ext -i
No further installation is necessary. The “inner” ``kwant`` subdirectory has
been turned into a proper Python package that can be imported from the “outer”
directory, i.e. the directory where ``setup.py`` is located. Any script
inside that directory that imports Kwant will get the modified version. (To
be able to import the modified Kwant from another directory one can create a
symbolic link to the package.)
The above ``build_ext`` command does not have to be rerun when a Python file
is modified. Recompilation is only necessary whenever a Cython file
(``.pyx``) has been changed.
Modifying the source code
-------------------------
We recommend that you keep each of your changes to Kwant on a separate “topic
branch” that starts at *master*. Try to not mix up unrelated changes in a
single branch. To create a topic branch, use the command::
git checkout -b my_topic master
Now you can begin to implement your idea. As you go, register your changes
with Git as explained, for example, in the `Pro Git book
<https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository>`_
that is freely available online.
Once you feel that you would like to show your work to other interested people
(because you would like to receive feedback, or because you consider it
ready), it's time to inspect your branch. Run ``git status`` to make sure
that you have committed all of your changes, then use a tool like ``gitk`` to
view your branch.
In the following, two methods to share your commits are described. The first
will be familiar if you have experience with the popular GitHub service. If
you do not, you might prefer the second method, since it is simpler.
Method 1: Using the Kwant GitLab instance
.........................................
Go the `GitLab page of the official Kwant repository
<https://gitlab.kwant-project.org/kwant/kwant>`_. Since you do not have write
access to this repository, you have to create an own “fork” of it by clicking
on the button just right of the “star” button.
You created a public copy of the Kwant repository that is controlled by you.
Add it as a remote repository to the clone of Kwant on your computer::
git remote add own https://gitlab.kwant-project.org/<USERNAME>/kwant.git
You can copy-and-paste your own version of the above URL from the main page of
your repository. (If you know about SSH, you may also prefer to upload your
public ssh key to GitLab and to use SSH as transport.) The string ``own`` is
the local name you give to the remote, it can be anything.
Now you can push your topic branch to your repository::
git push own my_branch
This will make your branch appear in GitLab. Now you can let us know about
your branch by `creating a merge request in GitLab
<https://gitlab.kwant-project.org/help/workflow/forking_workflow.md>`_ or by
sending a message to kwant-discuss@kwant-project.org.
Method 2: Sending patches to the mailing list
.............................................
Run the command ::
git format-patch origin/master
This will create a “patch” file for each commit on your branch. Now simply
send these patches as email attachments to kwant-discuss@kwant-project.org,
together with an explanation of your idea. You do not have to be subscribed
to the mailing list.
(Or, even better, use ``git send-email`` as shown in this `example of usage
<https://kernel.org/pub/software/scm/git/docs/git-send-email.html#_example>`_
and this `git send-email howto
<http://www.freedesktop.org/wiki/Software/PulseAudio/HowToUseGitSendEmail/>`_.)
Coding style
------------
* Please keep the code consistent by adhering to the prevailing naming and
formatting conventions. We generally respect the `"Style Guide for Python
Code" <http://www.python.org/dev/peps/pep-0008/>`_. For docstrings, we
follow `NumPy's "Docstring Standard"
<http://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt>`_ and
`Python's "Docstring Conventions"
<http://www.python.org/dev/peps/pep-0257/>`_.
* Write tests for all the important functionality you add. Be sure not to
break existing tests.
* Create a logical sequence of commits with clear commit messages. Each
commit message consists of a summary line, and, whenever necessary, a
more detailed explanation. Both parts are separated by a blank line
and wrapped to 72 characters (unless quoting error messages and such).
The summary line should be as clear as possible. The detailed
explanation should be included whenever it helps to motivate or
understand the commit. Bear in mind that the merge request text and
discussions are not part of a commit.
Documentation
=============
Tutorial and reference manual
-----------------------------
.. class:: docs-list, button-links
* **Online**:
+ `stable version </doc/1/>`_
+ `development version </doc/dev/>`_
* **Downloads**:
+ `PDF <http://downloads.kwant-project.org/doc/latest.pdf>`_
+ `zipped HTML <http://downloads.kwant-project.org/doc/latest.zip>`_
Interactive online course
-------------------------
The APS March meeting 2016 tutorial “Introduction to Computational Quantum Nanoelectronics” focuses on the physics, but also serves as a crash course on Kwant. `All the materials are available online </mm16.html>`_ and can be run directly in a web browser, without installing Kwant locally.
Screencast
----------
.. raw:: html
A brief video introduction of Kwant:
<ul class="button-links inline-list">
<li> <a href="kwant-screencast-2014.html">watch</a> </li>
<li> <a href="http://downloads.kwant-project.org/doc/kwant-screencast-2014.mp4" download>download</a> </li>
</ul>
Article
-------
This paper (`download PDF <http://downloads.kwant-project.org/doc/kwant-paper.pdf>`__) introduces Kwant in a systematic way and discusses its design and performance (`New J. Phys. 16, 063065 (2014) <http://iopscience.iop.org/1367-2630/16/6/063065/article>`_).
Kwant documentation
===================
The two available resources for learning Kwant are its tutorial, and the paper
inctroducing Kwant structure and design. The tutorial is hands-on, and mainly
explains how to use Kwant, and its various features, while the paper presents a
more general perspective, useful to kwow for extending Kwant functionality.
Kwant tutorial:
* `browse online </doc/1.0>`_
* `download pdf <http://downloads.kwant-project.org/doc/kwant-doc-1.0.0.pdf>`_
* `download html+zip
<http://downloads.kwant-project.org/doc/kwant-doc-1.0.0.zip>`_
Kwant paper:
* `download pdf <http://downloads.kwant-project.org/doc/kwant-paper.pdf>`__
================
Kwant extensions
================
Going beyond the core package, there are several tools that extend Kwant in useful ways.
You can check these out below.
If you have some re-usable code that you think would be useful to the wider Kwant community,
post to the `Kwant development mailing list <mailto:kwant-discuss@kwant-project.org>`_ with a
link to the code and a couple of sentences describing it, and we'll add it to this page.
Semicon: k·p simulations made easy
----------------------------------
**Get the code**: https://gitlab.kwant-project.org/semicon/semicon
A package of tools for doing k·p simulations. Contains: model definitions, material parameters,
and helper functions for generating template Kwant systems.
Generating quasicrystals
------------------------
**Get the code**: https://arxiv.org/src/1510.06035v2/anc/quasicrystal.py
Code for reproducing numerics from the paper "`Aperiodic Weak Topological Superconductors <https://arxiv.org/abs/1510.06035>`_"
by Fulga et al.
Contains functionality for building 2D Ammann-Beenker tilings, an example of a quasicrystal, and
Kwant systems constructed from such tilings.
Time-dependent transport
------------------------
**Get the code**: https://gitlab.kwant-project.org/kwant/tkwant
A package for defining time-dependent systems with Kwant, and calculating
time-dependent quantities. Details of the algorithm can be found in the
following two papers:
+ `Towards realistic time-resolved simulations of quantum devices <https://dx.doi.org/10.1007/s10825-016-0855-9>`_
+ `Numerical simulations of time resolved quantum electronics <https://dx.doi.org/10.1016/j.physrep.2013.09.001>`_
Qsymm: Symmetry finder and symmetric Hamiltonian generator
----------------------------------------------------------
**Get the code**: https://gitlab.kwant-project.org/qt/qsymm
A package that makes symmetry analysis simple. It automatically generates model Hamiltonians from symmetry constraints and finds the full symmetry group of your Hamiltonian. Works with tight-binging and k dot p Hamiltonians and supports all kinds of symmetries, including conserved quantities, space group symmetries, time reversal, particle-hole and all combinations of these.
+ `Qsymm: algorithmic symmetry finding and symmetric Hamiltonian generation <http://dx.doi.org/10.1088/1367-2630/aadf67>`_
Trial pre-release of Kwant
==========================
With the release of Kwant the instructions that were here were rendered
obsolete. Please go to the `installation instructions </install.html>`_ for the
latest Kwant release.
Harvard-only trial pre-release of kwant
=======================================
kwant is made available as a special preview **exclusively** to the audience of
the 30 April 2013 presentation at Harvard University by Anton Akhmerov. Please
do not spread the link to this page. Instead, you are welcome show the link to
the `kwant website <http://kwant-project.org/>`_.
You may use kwant for your personal evaluation. Any other use, **explicitly
including further distribution**, is not allowed. Please wait for the release
of the final version that we expect to occur very soon.
So far, kwant is running on the following platforms: GNU/Linux, Mac OS, and
Windows. The usage experience on GNU/Linux is best (this is the platform
recommended by the authors of kwant), followed by Mac OS. Support for Windows
is highly experimental (help wanted).
Installation from source
------------------------
This method of installation is described in the documentation. It is extremely
easy on Debian-based GNU/Linux distributions (e.g. Ubuntu). On Mac OS and
Windows it is more involved, but documented as well. Please download the files
and follow the `installation instructions </docs/install.html>`_.
* kwant: `tar-gz-archive <kwant-0.3pre4.tar.gz>`__, `zip-archive <kwant-0.3pre4.zip>`__
* tinyarray (needed by kwant): `tar-gz-archive <tinyarray-0.0.tar.gz>`__, `zip-archive <tinyarray-0.0.zip>`__
Binary installation instructions for Windows
--------------------------------------------
**Warning:** These packages are highly experimental and likely not to work
fully. In a test with Windows XP, most tutorial examples ran. In another test
with Windows 7, most did not. We would appreciate the help of people
experienced with the Windows platform.
**Important note**: The provided binary packages are compiled for 32-bit
Microsoft Windows (win32). They can be installed on a 64-bit Windows as well,
but for them to work all the other required packages (like Python itself) have
to be present in their win32 versions.
1. Install the official Python 2.7 distribution from the official `Python
download page <http://python.org/download/>`_. Bear in mind the note above:
Choose "Python 2.7.x Windows Installer", not the 64 bit version.
2. Install the Python packages required by kwant (NumPy, SciPy, matplotlib). An
easy way to do so is to install the `scipy-stack package
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy-stack>`_ (win32-py2.7)
kindly provided by Christoph Gohlke. Please also note the instructions
at the top of that page.
3. Download and execute the `tinyarray installer <tinyarray-0.0.win32-py2.7.exe>`__.
4. Download and execute the `kwant installer <kwant-0.3pre2.win32-py2.7.exe>`__.
5. kwant and tinyarray require four libraries (DLLs) that can be downloaded
`here <kwant-dlls.zip>`__. For these libraries to be found by kwant, they
have either to be in the current directory, or in a directory that belongs to
``PATH``, or in ``C:\WINDOWS\SYSTEM32``. You have the following alternative
possibilities:
(a) Unpack the 4 files into some directory and launch all your kwant Python
scripts from the same directory.
(b) Like (a), but add that directory to the ``PATH`` environment variable
(The Web knows how to do that.). Now you should be able to launch kwant
scripts from everywhere.
(c) Copy the four DLL files directly to ``C:\WINDOWS\SYSTEM32``.
Please note that the kwant binary packages do not include any kwant examples or
documentation. Use the `online documentation </docs/>`_.
Quantum transport simulations made easy
=======================================
.. raw:: html
<div class="workflow-image">
<object type="image/svg+xml" data="kwant-workflow.svgz" class="img-responsive">kwant-workflow.svgz</object>
</div>
Kwant is a `free (open source) <https://gitlab.kwant-project.org/kwant/kwant>`_,
powerful, and easy to use Python package for numerical calculations on tight-binding
models with a strong focus on quantum transport.
.. raw:: html
<div id="recent-posts" class="section col-sm-6">
<h2> Recent blog posts </h2>
.. post-list::
:stop: 4
.. raw:: html
</div>
.. raw:: html
<div id="kwant-uses" class="section col-sm-5">
<h2> Use Kwant to... </h2>
<ul id="kwant-uses-list">
<li>
<a href="/about#quantum-hall-effect"> Compute differential conductance </a>
</li>
<li>
<a href="/about#graphene-flake"> Visualize edge states </a>
</li>
<li>
<a href="/about#numerical-experiment-flying-qubit"> Conduct numerical experiments </a>
</li>
<li>
<a href="/doc/1/tutorial/spectrum#band-structure-calculations"> Explore band structure </a>
</li>
<li>
<a href="https://tkwant.kwant-project.org/"> Simulate time-dependent problems </a>
</li>
</div>
Quantum transport simulations made easy
=======================================
Kwant is a Python package for numerical calculations on tight-binding models
with a strong focus on quantum transport. It is designed to be flexible and
easy to use, while not sacrificing performance.
Tight-binding models are ubiquitous in quantum physics and they can be used to
describe a vast variety of systems and phenomena, such as semiconductors,
metals, graphene, topological insulators, quantum Hall effect,
superconductivity, spintronics, molecular electronics, any combination of the
above and many other things. While all these systems exhibit very distinct
physical behavior, the underlying mathematical description is very similar.
Kwant has been designed so that the computer simulation of various physical
systems and phenomena is within reach of one software package.
Kwant does not use the traditional input files often found in scientific
software packages. Instead, one writes simple Python programs (using the
Python's simple and very expressive syntax) to define the system and calculate
its quantum properties (conductance, density of states, etc). This workflow is
summarized as follows:
.. image:: kwant-workflow.svgz
:width: 90%
Kwant was designed to be easy to use: for example the program that generates
the right panel of the image above is only 42 lines long (including detailed
comments). Kwant is also accessible for people without expertise in
numerics. To aid that, it is provided along with a detailed hand-on `tutorial
</doc/1.0/tutorial/>`_ and the Kwant `paper </paper>`_, which describes the
guiding principles underlying its design.
Examples of Kwant usage
-----------------------
The following examples are mostly taken from real research projects done with
Kwant. The tutorial_ and the `Kwant paper
<http://downloads.kwant-project.org/doc/kwant-paper.pdf>`_ each contain several
pedagogical examples with line-by-line explanations (`zipfile of all examples
<http://downloads.kwant-project.org/examples/kwant-examples.zip>`_).
Graphene flake
..............
.. container:: rightside
.. image:: graphene-edgestate.svgz
:width: 15em
Wave function of a low energy eigenstate of a graphene flake. The size of each
circle is proportional to the wave function probability amplitude on that site.
It is clearly seen that the wave function is peaked near the zigzag segments of
the boundary, as can be `expected <http://arxiv.org/abs/1003.4602>`_ for
graphene quantum dots. The image is taken from the Kwant `plotting tutorial
<doc/1.0/tutorial/tutorial6.html>`_.
3-d system: Majorana states
...........................
.. container:: rightside
.. image:: quantum-wire.png
Kwant allows systems of any dimensionality, for example three-dimensional ones.
This image shows a 3-d model of a semiconducting quantum wire (gray cylinder).
The red region is a tunnel barrier, used to measure tunneling conductance, the
blue region is a superconducting electrode. In this simulated device, a
Majorana bound state appears close to the superconducting-normal interface.
Taken from: S. Mi, A. R. Akhmerov, M. Wimmer (to be published).
Numerical experiment: flying qubit
..................................
.. container:: rightside
.. image:: flying-qubit.png
Numerical simulations and experimental results for a flying qubit sample made in
a GaAs/GaAlAs heterostrucutre. The Kwant simulations were performed with
particular attention to a realistic model of the confining potential seen by the
electrons. This allows for rather subtle aspects of the experiment could be
reproduced. Such "numerical experiments" can not only be used to interpret the
experimental data but also can help to design the sample geometry and in to
choose the right materials.
Taken from T. Bautze et al., to be submitted to Phys. Rev. B. See Yamamoto et
al., `Nature Nanotechnology 7, 247 (2012)
<http://dx.doi.org/doi:10.1038/nnano.2012.28>`_ for details about the
experiment.
conductance of a Corbino disk in a quantum Hall regime
......................................................
.. container:: leftside
.. image:: corbino-layout.svgz
:width: 15em
.. container:: rightside
.. image:: corbino-conductance.png
Transport properties of a Corbino disk across a quantum Hall transition. Left:
geometry of the sample consisting of a ring-shaped two-dimensional electron gas
(grey) in a perpendicular magnetic field. Right: conductance across the
transition, showing quantized conductance peaks.
Taken from I. C. Fulga, F. Hassler, A. R. Akhmerov, C. W. J. Beenakker,
`Phys. Rev. B 84, 245447 (2011)
<http://link.aps.org/doi/10.1103/PhysRevB.84.245447>`_; `arXiv:1110.4280
<http://arxiv.org/abs/1110.4280>`_.