kwant.system.InfiniteSystem#

class kwant.system.InfiniteSystem[source]#

Bases: System

Abstract infinite low-level system.

An infinite system consists of an infinite series of identical cells. Adjacent cells are connected by identical inter-cell hoppings.

cell_size[source]#

The number of sites in a single cell of the system.

Type:

integer

Notes

The system graph of an infinite systems contains a single cell, as well as the part of the previous cell which is connected to it. The first cell_size sites form one complete single cell. The remaining N sites of the graph (N equals graph.num_nodes - cell_size) belong to the previous cell. They are included so that hoppings between cells can be represented. The N sites of the previous cell correspond to the first N sites of the fully included cell. When an InfiniteSystem is used as a lead, N acts also as the number of interface sites to which it must be connected.

The drawing shows three cells of an infinite system. Each cell consists of three sites. Numbers denote sites which are included into the system graph. Stars denote sites which are not included. Hoppings are included in the graph if and only if they occur between two sites which are part of the graph:

    * 2 *
... | | | ...
    * 0 3
    |/|/|
    *-1-4

<-- order of cells

The numbering of sites in the drawing is one of the two valid ones for that infinite system. The other scheme has the numbers of site 0 and 1 exchanged, as well as of site 3 and 4.

Methods

cell_hamiltonian(args=(), sparse=False, *, params=None)[source]#

Hamiltonian of a single cell of the infinite system.

Providing positional arguments via ‘args’ is deprecated, instead, provide named parameters as a dictionary via ‘params’.

discrete_symmetry(args, *, params=None)[source]#

Return the discrete symmetry of the system.

The returned object is an instance of DiscreteSymmetry.

Providing positional arguments via ‘args’ is deprecated, instead, provide named parameters as a dictionary via ‘params’.

abstract hamiltonian(i, j, *args, params=None)[source]#

Return the hamiltonian matrix element for sites i and j.

If i == j, return the on-site Hamiltonian of site i.

if i != j, return the hopping between site i and j.

Hamiltonians may depend (optionally) on positional and keyword arguments.

Providing positional arguments via ‘args’ is deprecated, instead, provide named parameters as a dictionary via ‘params’.

hamiltonian_submatrix(self, args=(), to_sites=None, from_sites=None, sparse=False, return_norb=False, *, params=None)[source]#

Return a submatrix of the system Hamiltonian.

Parameters:
  • args (tuple, defaults to empty) – Positional arguments to pass to the hamiltonian method. Mutually exclusive with ‘params’.

  • to_sites (sequence of sites or None (default)) –

  • from_sites (sequence of sites or None (default)) –

  • sparse (bool) – Whether to return a sparse or a dense matrix. Defaults to False.

  • return_norb (bool) – Whether to return arrays of numbers of orbitals. Defaults to False.

  • params (dict, optional) – Dictionary of parameter names and their values. Mutually exclusive with ‘args’.

Returns:

  • hamiltonian_part (numpy.ndarray or scipy.sparse.coo_matrix) – Submatrix of Hamiltonian of the system.

  • to_norb (array of integers) – Numbers of orbitals on each site in to_sites. Only returned when return_norb is true.

  • from_norb (array of integers) – Numbers of orbitals on each site in from_sites. Only returned when return_norb is true.

Notes

The returned submatrix contains all the Hamiltonian matrix elements from from_sites to to_sites. The default for from_sites and to_sites is None which means to use all sites of the system in the order in which they appear.

inter_cell_hopping(args=(), sparse=False, *, params=None)[source]#

Hopping Hamiltonian between two cells of the infinite system.

Providing positional arguments via ‘args’ is deprecated, instead, provide named parameters as a dictionary via ‘params’.

modes(energy=0, args=(), *, params=None)[source]#

Return mode decomposition of the lead

This is a wrapper around kwant.physics.modes. The said function is applied to the infinite system at hand. Any discrete symmetries that are declared for the system are validated, and, if present, passed on as well. (Warnings are emitted for declared symmetries that are broken.)

The result of the wrapped function (an instance of PropagatingModes along with an instance of StabilizedModes) is returned unchanged.

The wave functions of the returned modes are defined over the unit cell of the system, which corresponds to the degrees of freedom on the first cell_sites sites of the system (recall that infinite systems store first the sites in the unit cell, then connected sites in the neighboring unit cell).

Providing positional arguments via ‘args’ is deprecated, instead, provide named parameters as a dictionary via ‘params’.

selfenergy(energy=0, args=(), *, params=None)[source]#

Return self-energy of a lead.

The returned matrix has the shape (s, s), where s is sum(len(self.hamiltonian(i, i)) for i in range(self.graph.num_nodes - self.cell_size)).

Providing positional arguments via ‘args’ is deprecated, instead, provide named parameters as a dictionary via ‘params’.

validate_symmetries(args=(), *, params=None)[source]#

Check that the Hamiltonian satisfies discrete symmetries.

Returns validate applied to the onsite matrix and the hopping. See its documentation for details on the return format.

Providing positional arguments via ‘args’ is deprecated, instead, provide named parameters as a dictionary via ‘params’.