Commit fa012f86 authored by Christoph Groth's avatar Christoph Groth
Browse files

capitalize Kwant and Tinyarray where appropriate

parent a7cbcdc1
================
Authors of kwant
Authors of Kwant
================
The principal developers of kwant are
The principal developers of Kwant are
* Christoph W. Groth (SPSMS-INAC-CEA Grenoble)
* Michael Wimmer (Leiden University)
......@@ -15,12 +15,12 @@ The contributions of Christoph and Xavier are part of their work at `CEA
<http://cea.fr>`_, the French Commissariat à l'énergie atomique et aux énergies
alternatives.
Other people that have contributed to kwant include
Other people that have contributed to Kwant include
* Daniel Jaschke
* Joseph Weston
-------------------------------------------------------------
To find out who exactly wrote a certain part of kwant, please use the "blame"
To find out who exactly wrote a certain part of Kwant, please use the "blame"
feature of `git <http://git-scm.com/>`_, the version control system.
=============================
Building and installing kwant
Building and installing Kwant
=============================
Prerequisites
=============
Building kwant requires
Building Kwant requires
* `Python <http://python.org>`_ 2.6 or 2.7 (Python 3 is not supported yet),
* `SciPy <http://scipy.org>`_ 0.7.2 or newer,
* `LAPACK <http://netlib.org/lapack/>`_ and `BLAS <http://netlib.org/blas/>`_,
(For best performance we recommend the free `OpenBLAS
<http://xianyi.github.com/OpenBLAS/>`_ or the unfree `MKL
<http://software.intel.com/en-us/intel-mkl>`_.)
* tinyarray, a NumPy-like Python package optimized for very small arrays,
* Tinyarray, a NumPy-like Python package optimized for very small arrays,
* An environment which allows to compile Python extensions written in C and
C++.
The following software is highly recommended though not strictly required:
* `matplotlib <http://matplotlib.sourceforge.net/>`_, for kwant's plotting
* `matplotlib <http://matplotlib.sourceforge.net/>`_, for Kwant's plotting
module and the tutorial,
* `MUMPS <http://graal.ens-lyon.fr/MUMPS/>`_, a sparse linear algebra library
that will in many cases speed up kwant several times and reduce the memory
footprint. (kwant uses only the sequential, single core version
of MUMPS. The advantages due to MUMPS as used by kwant are thus independent
of the number of CPU cores of the machine on which kwant runs.)
that will in many cases speed up Kwant several times and reduce the memory
footprint. (Kwant uses only the sequential, single core version
of MUMPS. The advantages due to MUMPS as used by Kwant are thus independent
of the number of CPU cores of the machine on which Kwant runs.)
* The `nose <http://nose.readthedocs.org/>`_ testing framework for running the
tests included with kwant.
tests included with Kwant.
In addition, to build a copy of kwant that has been checked-out directly from
In addition, to build a copy of Kwant that has been checked-out directly from
version control (git), you will also need `Cython <http://cython.org/>`_ 0.17.1
or newer. You do not need Cython to build kwant that has been unpacked from a
or newer. You do not need Cython to build Kwant that has been unpacked from a
source .tar.gz-file.
......@@ -38,9 +38,9 @@ Generic instructions
Please note the `system-specific instructions`_ below.
kwant can be built and installed following the `usual Python conventions
Kwant can be built and installed following the `usual Python conventions
<http://docs.python.org/install/index.html>`_ by running the following commands
in the root directory of the kwant distribution. ::
in the root directory of the Kwant distribution. ::
python setup.py build
python setup.py install
......@@ -53,7 +53,7 @@ After installation, tests can be run with::
python -c 'import kwant; kwant.test()'
The tutorial examples can be found in the directory ``tutorial`` inside the root
directory of the kwant source distribution.
directory of the Kwant source distribution.
System-specific instructions
......@@ -62,7 +62,7 @@ System-specific instructions
Unix-like systems (Linux)
-------------------------
kwant should run on all recent Unix-like systems. The following instructions
Kwant should run on all recent Unix-like systems. The following instructions
have been verified to work on Debian 6 (Squeeze) or newer, and on Ubuntu 12.04
(see :ref:`Note <ubuntu-problem>` below) or newer. For other distributions step
1 will likely have to be adapted. If Ubuntu-style ``sudo`` is not available,
......@@ -73,12 +73,12 @@ the respective command must be run as root.
sudo apt-get install python-dev python-scipy python-matplotlib python-nose g++ gfortran libopenblas-dev liblapack-dev libmumps-scotch-dev
2. Unpack tinyarray, enter its directory. To build and install, run ::
2. Unpack Tinyarray, enter its directory. To build and install, run ::
python setup.py build
sudo python setup.py install
3. Inside the kwant source distribution's root directory run ::
3. Inside the Kwant source distribution's root directory run ::
python setup.py build
sudo python setup.py install
......@@ -88,11 +88,11 @@ change this using the ``--prefix`` option, e.g.::
sudo python setup.py install --prefix=/opt
If you would like to install kwant into your home directory only you can use ::
If you would like to install Kwant into your home directory only you can use ::
python setup.py install --home=~
This does not require root privileges. If you install kwant in this way
This does not require root privileges. If you install Kwant in this way
be sure to tell python where to find it. This can be done by setting the
``PYTHONPATH`` environment variable::
......@@ -108,7 +108,7 @@ Known problem on Ubuntu 12.04 32-bit (i486)
...........................................
With Ubuntu 12.04 running on 32-bit Intel architecture processors the following
error has been observed when running the tests included with kwant: "Arrays are
error has been observed when running the tests included with Kwant: "Arrays are
not almost equal to 7 decimals". That problem seems to be due to a bug in the
OpenBLAS package included with that version of Ubuntu. It can be worked-around
by installing a different BLAS. Execute the following shell commands::
......@@ -125,7 +125,7 @@ Mac OS X
These instructions were verified in April 2013 under Mac OS X 10.8.2
The instructions also include installing MUMPS for optimal performance
of kwant. If you choose to omit MUMPS, you can skip over the optional
of Kwant. If you choose to omit MUMPS, you can skip over the optional
steps 3 and 5.
1. Install the current version of `MacPorts
......@@ -182,12 +182,12 @@ steps 3 and 5.
Then, execute ``make all``.
4. Unpack tinyarray, enter its directory, build and install::
4. Unpack Tinyarray, enter its directory, build and install::
python setup.py build
sudo python setup.py install
5. (OPTIONAL) To make kwant use MUMPS, go to the kwant directory, and
5. (OPTIONAL) To make Kwant use MUMPS, go to the Kwant directory, and
edit ``build.conf`` to read::
[mumps]
......@@ -198,7 +198,7 @@ steps 3 and 5.
where ``<mumpsdir>`` and <metisdir>`` are the driectories of the previously
installed MUMPS and METIS.
6. Then, build and install kwant. ::
6. Then, build and install Kwant. ::
python setup.py build
sudo python setup.py install
......@@ -207,20 +207,20 @@ steps 3 and 5.
Microsoft Windows
-----------------
This describes one way to build a 32 bit (win32) version of kwant without MUMPS
This describes one way to build a 32 bit (win32) version of Kwant without MUMPS
on Windows using free software only. These instructions were verified in April
2013 with the following software versions: Windows XP SP3, Python 2.7.4,
scipy-stack 13.4.9, mingw-get-inst-20120426, OpenBLAS 0.2.6.
32-bit kwant without MUMPS will be limited to rather small systems and will run
significantly slower than a kwant with MUMPS. Volunteers who would like to
32-bit Kwant without MUMPS will be limited to rather small systems and will run
significantly slower than a Kwant with MUMPS. Volunteers who would like to
improve these instructions are welcome.
1. Install the official win32 Python 2.7 distribution from `the official Python
download page <http://python.org/download/>`_. See the point "Python 2.7.x
Windows Installer" there.
2. Install the Python packages required by kwant (NumPy, SciPy, matplotlib). An
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
......@@ -247,7 +247,7 @@ improve these instructions are welcome.
occurrences of the string ``-mno-cygwin``.
Now you have a complete environment for compiling Python extensions. To be
able to build kwant, we need to install the required linear algebra
able to build Kwant, we need to install the required linear algebra
libraries.
6. Download `OpenBLAS <http://xianyi.github.com/OpenBLAS/>`_ (the download link
......@@ -272,18 +272,18 @@ improve these instructions are welcome.
cp libopenblas_nehalem-r0.2.6.lib /c/MinGW/lib/openblas.lib
7. Unpack tinyarray, enter its directory. To build and install, run ::
7. Unpack Tinyarray, enter its directory. To build and install, run ::
c:\python27\python setup.py build
c:\python27\python setup.py install
8. Inside the kwant source distribution's root directory create a file
8. Inside the Kwant source distribution's root directory create a file
``build.conf`` with the following contents.::
[lapack]
libraries = openblas gfortran
Finally, build and install kwant::
Finally, build and install Kwant::
c:\python27\python setup.py build
c:\python27\python setup.py install
......@@ -292,13 +292,13 @@ improve these instructions are welcome.
Build configuration
===================
The setup script of kwant has to know how to link against LAPACK & BLAS, and,
The setup script of Kwant has to know how to link against LAPACK & BLAS, and,
optionally, MUMPS. Be default it will assume that LAPACK and BLAS can be found
under their usual names. MUMPS will be not linked against by default, except
on Debian-based systems when the package ``libmumps-scotch-dev`` is installed.
All these settings can be configured by creating/editing the file
``build.conf`` in the root directory of the kwant distribution. This
``build.conf`` in the root directory of the Kwant distribution. This
configuration file consists of sections, one for each dependency, led by a
[dependency-name] header and followed by name = value entries. Possible names
are keyword arguments for ``distutils.core.Extension`` (For a complete list,
......@@ -310,7 +310,7 @@ The two currently possible sections are [lapack] and [mumps]. The former
configures the linking against LAPACK _AND_ BLAS, the latter against MUMPS
(without LAPACK and BLAS).
Example ``build.conf`` for linking kwant against a self-compiled MUMPS, `SCOTCH
Example ``build.conf`` for linking Kwant against a self-compiled MUMPS, `SCOTCH
<http://www.labri.fr/perso/pelegrin/scotch/>`_ and `METIS
<http://glaros.dtc.umn.edu/gkhome/metis/metis/overview>`_::
......@@ -318,7 +318,7 @@ Example ``build.conf`` for linking kwant against a self-compiled MUMPS, `SCOTCH
libraries = zmumps mumps_common pord metis esmumps scotch scotcherr mpiseq
gfortran
Example ``build.conf`` for linking kwant with Intel MKL.::
Example ``build.conf`` for linking Kwant with Intel MKL.::
[lapack]
libraries = mkl_intel_lp64 mkl_sequential mkl_core mkl_def
......@@ -333,12 +333,12 @@ Python's configparser module
Building the documentation
==========================
To build the documentation, kwant has to be installed as described above.
To build the documentation, Kwant has to be installed as described above.
Additionally, the `sphinx documentation generator <http://sphinx.pocoo.org/>`_
is required.
HTML documentation can be built by entering the ``doc`` subdirectory of the
kwant package and executing ``make html``. PDF documentation is generated by
Kwant package and executing ``make html``. PDF documentation is generated by
executing ``make latex`` followed by a ``make all-pdf`` in ``doc/build/latex``.
Because of some quirks of how sphinx works, it might be necessary to execute
......@@ -349,13 +349,13 @@ done, sphinx might mistakenly use PNG files for PDF output.
Hacking
=======
To work on kwant itself it is useful to build it in-place. This can be done
To work on Kwant itself it is useful to build it in-place. 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 which can be imported. To be able to import kwant from
a proper python package which 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.
......
=============
kwant License
Kwant License
=============
(This license applies to all files of this distribution except those within the
``doc/sphinxext`` subdirectory for which ``doc/sphinxext/LICENSE.txt``
applies.)
Copyright 2011-2013, kwant authors. All rights reserved.
Copyright 2011-2013 Kwant authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
......
......@@ -2,7 +2,7 @@ Roughly in order of importance. -*-org-*-
* Document the order of sites/orbitals in finalized builders
* Make kwant run on windows
* Make Kwant run on windows
* Add calculation of current density
......@@ -24,7 +24,7 @@ Roughly in order of importance. -*-org-*-
way to do it is to sort the sites in finalized builders.)
One could then also RLE compress sites in finalized builders.
* Make kwant objects pickleable
* Make Kwant objects pickleable
* Implement "inhomogeneous arrays" for ldos and wavefunc
The point is to have ldos or wavefunc return objects that behave like 2d
......@@ -37,9 +37,9 @@ Roughly in order of importance. -*-org-*-
This would mean:
- When referring to functions, we always append "()" to their name.
- Names of objects (types, functions, ...) that are a documented part of
kwant are always hyperlinks _when_ the object itself is meant.
Kwant are always hyperlinks _when_ the object itself is meant.
- Concepts that are meant in a more general sense are not hyperlinked, even if
there exists an object of the same name in kwant. (Consider the usage of
there exists an object of the same name in Kwant. (Consider the usage of
linking for the term "Thread" in the document linked above.)
* Plotter: show site upon click
......@@ -63,7 +63,7 @@ Roughly in order of importance. -*-org-*-
* In finalized leads, only keep the sites of a single lead unit cell.
* Add a test of kwant that verifies QHE conductance quantization
* Add a test of Kwant that verifies QHE conductance quantization
* Add support for optimization of lead fundamental domains.
......
# Makefile for Sphinx documentation
# Copyright 2011-2013 kwant authors.
# Copyright 2011-2013 Kwant authors.
#
# This file is part of kwant. It is subject to the license terms in the
# This file is part of Kwant. It is subject to the license terms in the
# LICENSE file found in the top-level directory of this distribution and at
# http://kwant-project.org/license. A list of kwant authors can be found in
# http://kwant-project.org/license. A list of Kwant authors can be found in
# the AUTHORS file at the top-level directory of this distribution and at
# http://kwant-project.org/authors.
......
# -*- coding: utf-8 -*-
#
# kwant documentation build configuration file, created by
# Kwant documentation build configuration file, created by
# sphinx-quickstart on Tue Jan 11 09:39:28 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
......@@ -38,8 +38,8 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'kwant'
copyright = u'2011-2012, kwant Developers'
project = u'Kwant'
copyright = u'2011-2012, Kwant Developers'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
......@@ -184,7 +184,7 @@ latex_paper_size = 'a4'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'kwant.tex', u'kwant Documentation',
('index', 'kwant.tex', u'Kwant Documentation',
u'A. R. Akhmerov, C. W. Groth, X. Waintal, M. Wimmer',
'manual'),
]
......
......@@ -4,13 +4,13 @@ Contributed modules
.. module:: kwant.contrib
:mod:`kwant.contrib` is a collection of independent modules that is part of the
official kwant distribution, but is not considered to be an integral part of
kwant. The intention is to keep interesting modules that are useful with kwant
official Kwant distribution, but is not considered to be an integral part of
Kwant. The intention is to keep interesting modules that are useful with Kwant
here (maybe even experimental ones) to give users an easier access to them, and
them wider exposure. Users of kwant are welcome to submit their own modules for
them wider exposure. Users of Kwant are welcome to submit their own modules for
inclusion.
For simplicity, all contributions share the same license as kwant. (This
For simplicity, all contributions share the same license as Kwant. (This
requirement may be relaxed to allow other free licenses if requested.)
.. toctree::
......
===================
kwant documentation
Kwant documentation
===================
.. include:: ../../README
:end-before: See also the files
Researchers, please note that even though :doc:`kwant is Free Software
Researchers, please note that even though :doc:`Kwant is Free Software
<license>`, scientific integrity requires to give appropriate credit. If you
write a scientific paper whose results have been obtained with the help of
kwant, please :doc:`acknowledge <acknowledgements>` the work of the :doc:`people
Kwant, please :doc:`acknowledge <acknowledgements>` the work of the :doc:`people
that have developed it <authors>`.
.. toctree::
......
Reference guide
===============
In the following, all kwant modules appear in the order of decreasing end-user
In the following, all Kwant modules appear in the order of decreasing end-user
relevance.
.. toctree::
......
......@@ -6,7 +6,7 @@
This package wraps some selected LAPACK functionality not available via NumPy
and also contains a Python-wrapper for MUMPS. It also has several algorithms
for finding approximately orthonormal lattice bases. It is meant for internal
use by kwant itself, but of course nothing prevents you from using it directly.
use by Kwant itself, but of course nothing prevents you from using it directly.
The documentation of this package is not included here on purpose in order not
to add too many things to this reference. Please consult the source code
......
......@@ -23,4 +23,3 @@ Data-generating functions
sys_leads_pos
sys_leads_hopping_pos
mask_interpolate
......@@ -3,7 +3,7 @@
.. module:: kwant
The top-level kwant package serves as a container for sub-packages and does not
The top-level Kwant package serves as a container for sub-packages and does not
have any functions of its own. For convenience, short names are provided for a
few widely used objects from the sub-packages:
......
......@@ -4,12 +4,12 @@
Overview
--------
kwant offers several modules for computing the solutions to quantum transport
Kwant offers several modules for computing the solutions to quantum transport
problems, the so-called solvers. Each of these solvers may use different
internal algorithms and/or depend on different external libraries. If the
libraries needed by one solver are not installed, trying to import it will
raise an ``ImportError`` exception. The :doc:`Installation instructions
<../install>` list all the libraries that are required or can be used by kwant
<../install>` list all the libraries that are required or can be used by Kwant
and its solvers.
......@@ -19,7 +19,7 @@ and its solvers.
.. module:: kwant.solvers.default
There is one solver, `kwant.solvers.default` that is always available. For
each kwant installation it combines the best functionality of the *available*
each Kwant installation it combines the best functionality of the *available*
solvers into a single module. We recommend to use it unless there are specific
reasons to use another. The following functions are provided.
......@@ -60,7 +60,7 @@ default solver are listed in the documentation of each module.
kwant.solvers.sparse
kwant.solvers.mumps
For kwant-experts: detail of the internal structure of a solver
For Kwant-experts: detail of the internal structure of a solver
---------------------------------------------------------------
Each solver module (except the default one) contains a class ``Solver`` (e.g.
......
Note for kwant developers
Note for Kwant developers
-------------------------
Say you have modified SCRIPT.py in this directory. Make sure that the tutorial
......
Tutorial: Learning kwant through examples
Tutorial: Learning Kwant through examples
=========================================
In the following, the most important features of kwant are explained using
In the following, the most important features of Kwant are explained using
simple, but still physically meaningful examples. Each of the examples
is commented extensively. In addition, you will find notes about more subtle,
technical details at the end of each example. At first reading,
......
......@@ -4,7 +4,7 @@ Introduction
The Python programming language
...............................
kwant is a library for `Python <http://python.org/>`_. Care was taken to fit
Kwant is a library for `Python <http://python.org/>`_. Care was taken to fit
well with the spirit of the language and to take advantage of its expressive
power. If you do not know Python yet, do not fear: Python is widely regarded
as one of the most accessible programming languages. For an introduction we
......@@ -13,14 +13,14 @@ The `Beginner's Guide to Python <http://wiki.python.org/moin/BeginnersGuide>`_
contains a wealth of links to other tutorials, guides and books including some
for absolute beginners.
kwant
Kwant
.....
There are two steps in obtaining a numerical solution to a problem: The first
is defining the problem in a computer-accessible way, the second solving it.
The aim of a software package like kwant is to make both steps easier.
The aim of a software package like Kwant is to make both steps easier.
In kwant, the definition of the problem amounts to the creation of a tight
In Kwant, the definition of the problem amounts to the creation of a tight
binding system. The solution of the problem, i.e. the calculation of the
values of physical observables, is achieved by passing the system to a
*solver*.
......@@ -32,15 +32,15 @@ are the sites of the tight binding system, the edges are the hoppings. Sites
are annotated with the corresponding on-site Hamiltonian matrix, hoppings are
annotated with the corresponding hopping integral matrix.
One of the central goals of kwant is to allow easy creation of such annotated
graphs that represent tight binding system. kwant can be made to know about
One of the central goals of Kwant is to allow easy creation of such annotated
graphs that represent tight binding system. Kwant can be made to know about
the general structure of a particular system, the involved lattices and
symmetries. For example, a system with a 1D translational symmetry may be used
as a lead and attached to a another system. If both systems have sites which
belong to the same lattices, the attaching can be done automatically, even if
the shapes of the systems are irregular.
Once a tight binding system has been created, solvers provided by kwant can be
Once a tight binding system has been created, solvers provided by Kwant can be
used to compute physical observables. Solvers expect the system to be in a
different format than the one used for construction -- the system has to be
*finalized*. In a finalized system the tight binding graph is fixed but the
......@@ -48,7 +48,7 @@ matrix elements of the Hamiltonian may still change. The finalized format is
both more efficient and simpler -- the solvers don't have to deal with the
various details which were facilitating the construction of the system.
The typical workflow with kwant is as follows:
The typical workflow with Kwant is as follows:
#. Create an "empty" tight binding system.
......@@ -58,8 +58,8 @@ The typical workflow with kwant is as follows:
#. Pass the finalized system to a solver.
Please note that even though this tutorial only shows 2-d systems, kwant is
completely general with respect to the number of dimensions. kwant does not
Please note that even though this tutorial only shows 2-d systems, Kwant is
completely general with respect to the number of dimensions. Kwant does not
care in the least whether systems live in one, two, three, or any other number
of dimensions. The only exception is plotting, which out-of-the-box only works
for up to three dimensions. (But custom projections can be specified!)
......@@ -7,7 +7,7 @@
# - Using iterables and builder.HoppingKind for making systems
# - introducing `reversed()` for the leads
#
# Note: Does the same as tutorial1a.py, but using other features of kwant
# Note: Does the same as tutorial1a.py, but using other features of Kwant.
#HIDDEN_BEGIN_xkzy
import kwant
......
First steps in kwant: Setting up a simple system and computing transport
First steps in Kwant: Setting up a simple system and computing transport
------------------------------------------------------------------------
Transport through a quantum wire
......@@ -14,13 +14,13 @@ model representing the two-dimensional Schroedinger equation
with a hard wall confinement :math:`V(y)` in y-direction.
In order to use kwant, we need to import it:
In order to use Kwant, we need to import it:
.. literalinclude:: quantum_wire.py
:start-after: #HIDDEN_BEGIN_dwhx
:end-before: #HIDDEN_END_dwhx
Enabling kwant is as easy as this [#]_ !
Enabling Kwant is as easy as this [#]_ !
The first step is now the definition of the system with scattering region and
leads. For this we make use of the `~kwant.builder.Builder` type that allows to
......@@ -32,7 +32,7 @@ define a system in a convenient way. We need to create an instance of it:
Observe that we just accessed `~kwant.builder.Builder` by the name
``kwant.Builder``. We could have just as well written
``kwant.builder.Builder`` instead. kwant consists of a number of sub-packages
``kwant.builder.Builder`` instead. Kwant consists of a number of sub-packages
that are all covered in the :doc:`reference documentation
<../reference/index>`. For convenience, some of the most widely-used members
of the sub-packages are also accessible directly through the top-level `kwant`
......@@ -248,7 +248,7 @@ subbands that increases with energy.
``matplotlib.pyplot`` has to be imported. (An informative error message
will remind you if you forget.) The reason for this is pretty technical:
matplotlib's "backend" can only be chosen before ``matplotlib.pyplot`` has
been imported. Would kwant import that module by itself, it would deprive
been imported. Would Kwant import that module by itself, it would deprive
you of the possibility to choose a non-default backend later.
......@@ -260,7 +260,7 @@ subbands that increases with energy.
The same but different: Alternative system building
...................................................
kwant is very flexible, and often allows you more than one way to
Kwant is very flexible, and often allows you more than one way to
build up your system. The reason is that `~kwant.builder.Builder`
is essentially just a container, and allows for different
ways to be filled. Here we present a more compact rewrite of
......@@ -299,7 +299,7 @@ python).
Having added all lattice points in one line, we now turn to the
hoppings. In this case, an iterable like for the lattice
points becomes a bit cumbersome, and we use instead another
feature of kwant:
feature of Kwant:
.. literalinclude:: quantum_wire_revisited.py
:start-after: #HIDDEN_BEGIN_nooi
......@@ -314,7 +314,7 @@ certain kind that can be added to this builder without adding new sites. When
`~kwant.builder.HoppingKind` is given to `~kwant.builder.Builder` as a key, it
means that something is done to all the possible hoppings of this kind. A list
of `~kwant.builder.HoppingKind` objects corresponding to nearest neighbors in
lattices in kwant is obtained using ``lat.neighbors()``. ``sys[lat.neighbors()]
lattices in Kwant is obtained using ``lat.neighbors()``. ``sys[lat.neighbors()]
= -t`` then sets all of those hopping matrix elements at once. In order to set
values for all the nth-nearest neighbors at once, one can similarly use
``sys[lat.neighbors(n)] = -t``. More detailed example of using
......
......@@ -33,8 +33,8 @@ realistic parameters).
The tight-binding model corresponding to the Rashba-Hamiltonian naturally
exhibits a 2x2-matrix structure of onsite energies and hoppings. In order to
use matrices in our program, we import the tinyarray package. (`NumPy
<http://numpy.scipy.org/>`_ would work as well, but tinyarray is much faster
use matrices in our program, we import the Tinyarray package. (`NumPy
<http://numpy.scipy.org/>`_ would work as well, but Tinyarray is much faster