This article explains the user-visible changes in Kwant 1.1, released on 21 October 2015. Please consult the full list of changes in Kwant for all the changes up to the most recent bugfix release.
Bands with modes¶Kwant’s convention is that momenta are positive in the direction of
TranslationalSymmetry. While the momenta returned by
modes did respect this convention, the momenta read off the
band structure as given by Bands had the wrong sign. This has
been fixed now.
add_cells of attach_lead¶Before actually attaching a lead to a builder, the method
attach_lead of Builder prepares a
“nice” interface by adding “missing” sites such that the first unit cell of the
lead is completely connected with the system under construction. These sites
and their hoppings are taken over from the lead.
By setting the new option add_cells, attach_lead can now be told to add
in addition any number of complete unit cells of the lead to the system
before attaching it. Among other things, this can be useful for
To support these applications, attach_lead now returns a list of all the
sites that have been added to the system. Creating a buffer for disorder can
be thus done as follows:
sys[sys.attach_lead(lead, add_cells=10)] = onsite
Note how we set the onsite Hamiltonians of the sites that have been added to the value used in the system.
conductance_matrix¶SMatrix and GreensFunction
have each gained a method conductance_matrix that returns the matrix
such that
where
and
are,
respectively, the vectors of currents and voltages for all the leads. This
matrix is useful for calculating non-local resistances. See Section 2.4 of the
book by S. Datta.
If kwant.smatrix or kwant.greens_function have been called with
check_hermicity=True (on by default) and a restricted number of leads in
the out_leads and in_leads parameters, calls to transmission and
conductance_matrix will work whenever it is possible to deduce the result
from current conservation.
This allows leaving out one lead (preferably the widest) from out_leads
and in_leads, and still to calculate all transmission probabilities.
Doing so has been measured to speed up computations by 20% in some
cases.
The error messages (exceptions) that appear when the Kwant interface is used incorrectly have been improved in many cases. For example, if instead of
builder[lattice(0, 1)] = 1
one writes
builder[(0, 1)] = 1
the error message will be more helpful now.
Please continue reporting confusing error messages on the Kwant mailing list.
pos_transform of map¶This option which already existed for kwant.plotter.plot is now also
available for kwant.plotter.map.