kwant.builder.
FiniteSystem
(builder)[source]¶Bases: kwant.builder._FinalizedBuilderMixin
, kwant.system.FiniteSystem
Finalized Builder
with leads.
Usable as input for the solvers in kwant.solvers
.
Attributes
sites  (sequence) sites[i] is the Site instance that corresponds to the integerlabeled site i of the lowlevel system. The sites are ordered first by their family and then by their tag. 
id_by_site  (dict) The inverse of sites ; maps from i to sites[i] . 
Methods
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
to_sites : sequence of sites or None (default) from_sites : sequence of sites or None (default) sparse : bool
return_norb : bool
params : dict, optional


Returns:  hamiltonian_part : numpy.ndarray or scipy.sparse.coo_matrix
to_norb : array of integers
from_norb : array of integers

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.
precalculate
(energy=0, args=(), leads=None, what='modes', *, params=None)[source]¶Precalculate modes or selfenergies in the leads.
Construct a copy of the system, with the lead modes precalculated, which may significantly speed up calculations where only the system is changing.
Parameters:  energy : float
args : sequence
leads : sequence of integers or None
what : ‘modes’, ‘selfenergy’, ‘all’
params : dict, optional


Returns:  syst : FiniteSystem

Notes
If the leads are precalculated at certain energy or args values, they might give wrong results if used to solve the system with different parameter values. Use this function with caution.
validate_symmetries
(args=(), *, params=None)[source]¶Check that the Hamiltonian satisfies discrete symmetries.
Applies validate
to the
Hamiltonian, 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’.