kwant.system.FiniteVectorizedSystem

class kwant.system.FiniteVectorizedSystem[source]

Bases: kwant.system.VectorizedSystem, kwant.system.FiniteSystemMixin

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

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(args=(), sparse=False, return_norb=False, *, params=None)[source]

Return The system Hamiltonian.

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

  • 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) – The Hamiltonian of the system.

  • norb (array of integers) – 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’.

abstract hamiltonian_term(index, selector=slice(None, None, None), args=(), params=None)[source]

Return the Hamiltonians for hamiltonian term number k.

Parameters
  • index (int) – The index of the term to evaluate.

  • selector (slice or sequence of int, default: slice(None)) – The elements of the term to evaluate.

  • args (tuple) – Positional arguments to the term. (Deprecated)

  • params (dict) – Keyword parameters to the term

Returns

  • hamiltonian (3d complex array) – 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.

  • Providing positional arguments via ‘args’ is deprecated,

  • instead, provide named parameters as a dictionary via ‘params’.

precalculate(energy=0, args=(), leads=None, what='modes', *, params=None)[source]

Precalculate modes or self-energies 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) – Energy at which the modes or self-energies have to be evaluated.

  • args (sequence) – Additional parameters required for calculating the Hamiltionians. Deprecated in favor of ‘params’ (and mutually exclusive with it).

  • leads (sequence of integers or None) – Indices of the leads to be precalculated. If None, all are precalculated.

  • what ('modes', 'selfenergy', 'all') – The quantitity to precompute. ‘all’ will compute both modes and self-energies. Defaults to ‘modes’.

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

Returns

syst – A copy of the original system with some leads precalculated.

Return type

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

Attributes

site_ranges[source]

Previous topic

kwant.system.FiniteSystem

Next topic

kwant.system.PrecalculatedLead

This Page