Skip to content

Solver

Options for the system solver.

algorithm#

algorithm: Literal['rgf', 'inv'] = 'rgf'

The algorithm to use for the system solver.

  • "rgf": Uses the recursive Green's function (RGF) algorithm to compute the Green's functions. This is the default.

  • "inv": Uses a direct matrix inversion to compute the Green's functions. This is mainly useful for debugging and testing, as it is not efficient for realistically sized systems.

max_batch_size#

max_batch_size: PositiveInt = 100

The maximum number of energies that are batched together when computing the Green's functions in the system solver.

This can be used to reduce the memory footprint of the system solver, at the cost of increased computation time.

compute_current#

compute_current: bool | None = None

Whether to compute the current via the Meir-Wingreen formula.

This is only supported for the "rgf" algorithm. If not set, it is automatically determined based on the algorithm. (i.e. True for "rgf" and False for "inv")

If True, the current is computed between each layer and from/to the leads. This way of computing the current is usually preferable as it is independet of any interaction cutoffs, since it is computed from the temporarily densified Green's functions and self-energies.

Note

This is parameter is only used in the electron solver. The Coulomb screening solver does not compute currents, so this parameter is ignored for the Coulomb screening solver.

direct_solver#

direct_solver: Literal['superlu', 'mumps', 'cudss', 'pardiso', 'thomas', 'auto'] = 'auto'

The direct solver to use in wf simulations.

If set to "auto", the solver is automatically chosen based on the matrix type and the available direct solver libraries.

In runs with low_rank_obc = true, the system matrix will be Hermitian or even real and symmetric in gamma-only simulations. In those cases, libraries that can exploit the symmetry are preferred, i.e., cuDSS on GPU and PARDISO on CPU.

On GPU, SuperLU is the only fallback option if cuDSS is not available. On CPU, if PARDISO is not available, the fallback options are MUMPS and then SuperLU.

The Thomas solver involves a straight-forward tiling of the system matrix into blocks without reordering. It is therefore important that the Hamiltonian is ordered in a way that results in a block-tridiagonal structure.