3.1. kwant – Top level package

For convenience, short names are provided for a few widely used objects from the sub-packages. Otherwise, this package has only very limited functionality of its own.

Generic functionality

kwant.__version__ = '1.5.0a0.dev103+ge154dc0'[source]

The version of Kwant is available under the name __version__.

This string respects PEP 440 and has the following format

  • Released version: ‘1.3.0’, ‘1.3.1’, etc.

  • Alpha version: ‘1.2.0a0’, ‘1.2.0a1’, etc.

  • Beta version: ‘1.1.0b0’, ‘1.1.0b1’, etc.

  • Development version (derived from git describe --first-parent --dirty): ‘1.3.2.dev27+gdecf6893’, ‘1.1.1.dev10+gabcd012.dirty’, etc.

  • Development version with incomplete information: ‘unknown’, ‘unknown+g0123abc’, etc.


Class of warnings about a deprecated feature of Kwant.


Class for errors that occur in user-provided code.

From kwant.builder

Builder([symmetry, conservation_law, …])

A tight binding system defined on a graph.

HoppingKind(delta, family_a[, family_b])

A pattern for matching hoppings.

From kwant.lattice


A translational symmetry defined in real space.

From kwant.plotter

plot(sys[, num_lead_cells, unit, …])

Plot a system in 2 or 3 dimensions.

From kwant.solvers.default

greens_function(sys[, energy, args, …])

Compute the retarded Green’s function of the system between its leads.

ldos(sys[, energy, args, check_hermiticity, …])

Calculate the local density of states of a system at a given energy.

smatrix(sys[, energy, args, out_leads, …])

Compute the scattering matrix of a system.

wave_function(sys[, energy, args, …])

Return a callable object for the computation of the wave function inside the scattering region.