kwant.system.
VectorizedSystem
[source]¶Bases: kwant.system.System
Abstract general low-level system with support for vectorization.
Notes
The sites of the system are indexed by integers ranging from 0 to
self.graph.num_nodes - 1
.
Optionally, a class derived from System
can provide a method
pos
which is assumed to return the real-space position of a site
given its index.
The symmetry of the system.
The sites of the system. The family of each site array must have
norbs
specified.
Has 1 row per site array, plus one extra row. Each row consists
of (first_site, norbs, orb_offset)
: the index of the first
site in the site array, the number of orbitals on each site in
the site array, and the offset of the first orbital of the first
site in the site array. In addition, the final row has the form
(len(graph.num_nodes), 0, tot_norbs)
where tot_norbs
is the
total number of orbitals in the system. Note site_ranges
is directly computable from site_arrays
.
The system graph.
Each subgraph has the form ((idx1, idx2), (offsets1, offsets2))
where offsets1
and offsets2
index sites within the site arrays
indexed by idx1
and idx2
.
Each tuple has the following structure: (subgraph: int, symmetry_element: tuple, hermitian: bool,
parameters: List(str))
subgraph
indexes subgraphs
and supplies the to/from sites of this
term. symmetry_element
is the symmetry group element that should be
applied to the to-sites of this term.
hermitian
is True
if the term needs its Hermitian
conjugate to be added when evaluating the Hamiltonian, and parameters
contains a list of parameter names used when evaluating this term.
The names of the parameters on which the system depends. This attribute is provisional and may be changed in a future version of Kwant
Methods
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
(args=(), sparse=False, return_norb=False, *, params=None)[source]¶Return The system Hamiltonian.
Positional arguments to pass to hamiltonian_term
. Mutually
exclusive with ‘params’.
Whether to return a sparse or a dense matrix. Defaults to False
.
Whether to return arrays of numbers of orbitals. Defaults to False
.
Dictionary of parameter names and their values. Mutually exclusive with ‘args’.
The Hamiltonian of the system.
Numbers of orbitals on each site. Only returned when return_norb
is true.
Notes
Providing positional arguments via ‘args’ is deprecated, instead, provide named parameters as a dictionary via ‘params’.
hamiltonian_term
(index, selector=slice(None, None, None), args=(), params=None)[source]¶Return the Hamiltonians for hamiltonian term number k.
The index of the term to evaluate.
The elements of the term to evaluate.
Positional arguments to the term. (Deprecated)
Keyword parameters to the term
Has shape (N, P, Q)
where N
is the number of matrix
elements in this term (or the number selected by ‘selector’
if provided), P
and Q
are the number of orbitals in the
‘to’ and ‘from’ site arrays associated with this term.
Attributes