kwant.builder.InfiniteSystem

class kwant.builder.InfiniteSystem(builder, interface_order=None)[source]

Finalized infinite system, extracted from a Builder.

Notes

In infinite systems sites consists of 3 parts: sites in the fundamental domain (FD) with hoppings to neighboring cells, sites in the FD with no hoppings to neighboring cells, and sites in FD+1 attached to the FD by hoppings. Each of these three subsequences is individually sorted.

Attributes
sitessequence

sites[i] is the Site instance that corresponds to the integer-labeled site i of the low-level system.

id_by_sitedict

The inverse of sites; maps high-level Site instances to their integer label. Satisfies id_by_site[sites[i]] == i.

Finalize a builder instance which has to have exactly a single symmetry direction.

If interface_order is not set, the order of the interface sites in the finalized system will be arbitrary. If interface_order is set to a sequence of interface sites, this order will be kept.

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.

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

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
argstuple, defaults to empty

Positional arguments to pass to the hamiltonian method. Mutually exclusive with ‘params’.

to_sitessequence of sites or None (default)
from_sitessequence of sites or None (default)
sparsebool

Whether to return a sparse or a dense matrix. Defaults to False.

return_norbbool

Whether to return arrays of numbers of orbitals. Defaults to False.

paramsdict, optional

Dictionary of parameter names and their values. Mutually exclusive with ‘args’.

Returns
hamiltonian_partnumpy.ndarray or scipy.sparse.coo_matrix

Submatrix of Hamiltonian of the system.

to_norbarray of integers

Numbers of orbitals on each site in to_sites. Only returned when return_norb is true.

from_norbarray 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

See documentation of PropagatingModes and StabilizedModes for the return format details.

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’.

pos(i)[source]
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’.

Previous topic

kwant.builder.FiniteSystem

Next topic

kwant.builder.SiteFamily

This Page