qtcad.device.many_body module

Solver for many body states which assembles and diagonalizes the Coulomb Hamiltonian for interacting quantum-confined electrons.

class qtcad.device.many_body.Solver(device=None, solver_params=None, single_body_solver_params=None)

Bases: Solver

Many-body solver using exact diagonalization in a truncated subspace.

Attributes:
  • device (Device object) – The device for which to solve for the many-body eigenstates

  • num_states (int) – Number of single-particle states to consider, starting from the lowest eigenvalue.

  • precision (float) – Relative precision to use upon performing the Coulomb integration

  • ham_hop (2d array) – Single particle diagonal Hamiltonian

  • coulomb_mat (4d array) – Coefficients \(V_{ijkl}\) of the Coulomb interaction in second quantization.

  • overlap (bool) – If False, neglect overlapping terms in the Coulomb interaction matrix.

__init__(device=None, solver_params=None, single_body_solver_params=None)

Constructor for the many-body solver.

Parameters:
  • device (Device object, optional) – Device for which we wish to apply the many-body solver. If no Device is provided, the energies and coulomb_mat attributes must be specified in the solver_params object. In this case, the many-body solver will use these values to solve the many-body problem.

  • solver_params (SolverParams object or None, optional) – An object containing the parameters of the solver. If None, use default parameter values.

  • single_body_solver_params (SolverParams object or None, optional) – An object containing the parameters of the single-particle solver to run to find the orbital basis states. If None, use default parameter values.

Note

The full degeneracy of the system will be a product of the spin degeneracy with any other degeneracy (e.g. band or valley). If no Device object is provided, energies and coulomb_mat must be provided to define the many-body problem to be solved. In addition, even if a Device object is provided, the energies and Coulomb matrix can be provided in the solver_params object to skip the single-particle solver and Coulomb matrix computation.

get_add_spectrum(chem_pot=0.0, temperature=None)

Gets the charge addition spectrum of the system at equilibrium.

The charge addition spectrum is defined as:

\[\frac{\partial\langle N\rangle}{\partial\mu}= \frac{\langle N^2\rangle-\langle N\rangle^2}{k_B T},\]

where \(N\) is the total particle number in the system, \(k_B\) is Boltzmann’s constant, \(T\) is temperature, and \(\mu\) is the chemical potential of reservoirs in equilibrium with the system, assuming the grand canonical ensemble. The expectation values in the above equation are taken in this grand-canonical thermodynamic equilibrium state.

This definition is taken from:

  • Hensgens et al. Nature (London), Vol. 548 pp. 70-73 (2017)

Parameters:
  • chem_pot (float, optional) – The chemical potential. Default: 0.

  • temperature (float, optional) – The temperature. Default: None, in which case the device temperature is used if it exists, and otherwise temperature is set to 1 K.

Returns:

float – The charge addition spectrum for the current electrostatic configuration.

get_avg_number(chem_pot=0.0, temperature=None)

Gets the expectation value of the particle-number operator in the thermodynamic equilibrium state of the grand canonical ensemble with user-defined temperature and chemical potential.

Parameters:
  • chem_pot (float, optional) – The chemical potential. Default: 0.

  • temperature (float, optional) – The temperature. Default: None, in which case the device temperature is used if it exists, and otherwise temperature is set to 0 K.

Returns:

float – The average particle number.

Note

Must be called after the solve method.

get_avg_number_power(power, chem_pot=0.0, temperature=None)

Gets the expectation value of the operator \(N^k\) in the thermodynamic equilibrium state of the grand canonical ensemble, where \(N\) is the total particle number and \(k\) is some arbitrary power.

Parameters:
  • power (int or float) – The power \(k\).

  • chem_pot (float, optional) – The chemical potential. Default: 0.

  • temperature (float, optional) – The temperature. Default: None, in which case the device temperature is used if it exists, and otherwise temperature is set to 1 K.

Returns:

float – The expectation value of the \(k\)-th power of the particle number.

Note

Must be called after the solve method.

get_chem_potentials()

Gets the chemical potentials of the system, defined as \(\mu(N) = E(N+1)-E(N)\) with \(N\) the total energy with \(N\) particles in their ground states.

Returns:

1d array – The chemical potentials.

get_coulomb_matrix(overlap=None, verbose=True)

Gets the Coulomb integrals matrix in the eigenbasis of the single particle eigenstates.

Parameters:
  • overlap (bool, optional) – If False, neglect overlapping terms in the Coulomb integrals matrix. If None, use the value of the overlap attribute of this Solver object. This argument is ignored for holes (overlap terms are always included in this case).

  • verbose (bool, optional) – Verbosity.

Returns:

ndarray – The Coulomb integrals matrix. If overlap is True, returns a 4D array with entries \(V_{ijkl}\). Otherwise, returns a 2D array with entries \(V_{ij} = V_{ijij}\).

Note

This method also stores the Coulomb integrals matrix in the coulomb_mat attribute of the Device object over which this Solver is instantiated.

solve(verbose=True)

Solves the many-body problem and store the solution in the device.

Parameters:

verbose (bool, optional) – Verbosity. Default: True.

Note

The solution is stored in the many_body_subspaces attribute of the device: a list containing the Subspace object for each N-body subspace. In addition, the chemical potentials and Coulomb peak positions are evaluated and stored in the chem_potentials and coulomb_peak_pos attributes of the Device object, respectively. The coulomb_peak_pos attribute is only relevant when the system being modeling is a single quantum dot with a single gate; otherwise the Junction class should be used. Finally, the coefficients V_ijkl of the Coulomb interaction in second quantization are stored in the coulomb_mat attribute of the many-body Solver object.

class qtcad.device.many_body.SolverParams(inp_dict=None)

Bases: SolverParams

Parameters to pass to a many-body solver.

Attributes:
  • energies (1d array, optional) – The single-particle energies. If None, use values stored in the input device. Default: None.

  • coulomb_mat (2d or 4d array, optional) – The Coulomb interaction matrix to use. If None, compute the Coulomb matrix using the single-particle states stored in the input device. Default: None.

  • num_states (int, optional) – Number of single-particle states to consider, starting from the lowest eigenvalue. Default: 2.

  • n_degen (int, optional) – Degeneracy of the single particle states. Can be used for e.g. spin, … Default: 2.

  • num_particles (range or list of int, optional) – Numbers of particles to solve for. Each integer value \(N\) labels an \(N\)-particle subspace to consider in the many-body solver. If None, considers all \(N\)-particle subspaces allowed by the basis states, i.e., a maximum particle number equal to \(n_\mathrm{states}\times n_\mathrm{degen}\). Default: None.

  • precision (float, optional) – Relative precision to use upon performing the Coulomb integration. Only used in the “basic” Coulomb integral filtering method. Default: 1e-6.

  • alpha (float, optional) – Lever arm of the gate of interest over the electronic structure of the device. Default: 1.

  • overlap (bool, optional) – If False, neglect overlapping terms in the Coulomb integrals matrix. This argument is ignored for holes (overlap terms are always included in this case). Default: True.

  • cutoff (float) – Relative cutoff on Coulomb integrals (with respect to the largest integral) below which Coulomb integrals are neglected. Only used in the “basic” Coulomb integral filtering method. Default: 1e-6

  • filtering_method (str) – Method to use for filtering of Coulomb integrals. Allowed values are “extensive” and “basic”. Filtering methods are used to skip the calculation of Coulomb integrals that are below a certain threshold. The “extensive” method allows to drop many more integrals than the “basic” method, leading to a faster computation esperically for large basis sets. The “basic” method is a more brute-force approach that may be useful to provide sanity checks but suffers from quartic scaling with basis set dimension, making it impractical for large basis sets. Default: “extensive”.

  • rel_trunc (float, optional) – Relative truncation threshold parameter used in the “extensive” Coulomb integral filtering method. Default: 1e-3.

  • avg_eps (bool, optional) – If True, the average permittivity matrix is computed and used to scale the Coulomb integrals. This allows for a faster treatment of non-constant permittivity, by up to a factor of two. Only used in the “extensive” Coulomb integral filtering method. Default: False.

  • memory_max (float or None, optional) – If None, then the memory limit for Coulomb integrals is automatically set to fill the available memory. If not None, must be a float setting an approximate memory limit in megabytes. Remark that this only sets a memory limit for the Coulomb integrals part of the calculation. In addition, exact memory usage by the Coulomb integrals may differ somewhat and could be slightly smaller or larger than the quantity chosen here. Only used in the “extensive” Coulomb integral filtering method. Default: None.

__init__(inp_dict=None)

Instantiate the SolverParams object.

Parameters:

inp_dict (dict, optional) – Dictionary specifying certain solver parameters to be used instead of their default values.