qtcad.device.schrodinger module

Schrodinger solver.

class qtcad.device.schrodinger.Solver(d, solver_params=None)

Bases: Solver

Finite element solver for Schrodinger’s equation.

Attributes:
  • d (device object) – The device for which to solve Schrodinger’s equation

  • num_states (int) – Number of states to solve for, starting from the lowest eigenvalue.

  • tol (float) – Solver tolerance (stopping criterion). Relative accuracy for eigenvalues.

  • maxiter (int) – Maximum number of iterations.

  • method (string) – Method to use for the solution of the eigenvalue problem. ‘direct’ or ‘iterative’.

  • verbose (bool) – Verbosity level.

  • mass_tensor (2D 3x3 array or None) – Inverse mass tensor to be used in Schrodinger equation eigenvalue problem.

Note

When using electrons (conf_carriers = ‘e’), the Hamiltonian is constructed using either the effective mass matrix of the device, or the effective mass specified in the solver parameters.

When using holes (conf_carriers = ‘h’), the D matrix of the device is used. The D matrix must be written in units of \(\hbar^2/m_e\), and must lead to positive dispersion in k space.

tol and maxiter are None by default, meaning that they are left to the default values in the SciPy solvers.

__init__(d, solver_params=None)

Initialize from device object d.

Parameters:
  • d (Device object) – The device to simulate.

  • solver_params (SolverParams obj or None, optional) – The parameters of the solver.

band_structure(K, basis_vec=None, mixing=True)

Computes the band structure for some translationally invariant problem

Parameters:
  • K (1d array) – Magnitudes to multiply the basis vector by to obtain the wavevectors for which we wish to compute the band structure

  • basis vector (1d array) – Direction along the translationally invariant directions. Defaults to None, in which case the basis vector is taken to be one with entries of 1 along each translationally invariant direction.

  • mixing (bool) – If False, the band off-diagonal matrix elements of the new a matrix will be set to 0

Returns:

2d array – Energies from the band structure calculation. First index runs over the k values and the second over the energy levels.

solve(k=None, mixing=True)

Solve Schrodinger’s equation.

Parameters:
  • k (1d numpy array) – k vector along translationally invariant directions. This array should have as many components as the length of the attribute ti_directions. Defaults to None in which case it is taken to be an array of zeros.

  • mixing (boolean) – Whether to consider band off-diagonal elements in the problem.

Note

Modifies: self.d.energies and self.d.eigenfunctions.

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

Bases: SolverParams

Parameters to pass to a Schrödinger solver.

Attributes:
  • tol (float) – Tolerance to use in a calculation, in eV. Default: 1e-6.

  • maxiter (int) – Maximum number of iterations in the iterative eigenvalue solver. Default: 1000.

  • errortype (str) – Type of error to use in a convergence criterion. Relative (‘rel’ or ‘relative’) or absolute (‘abs’ or ‘absolute’). Default: ‘abs’.

  • method (str) – The method to use to the eigenvalue problems: “direct” or “iterative”. Default: “iterative”.

  • num_states (int) – Number of states to solve for, starting from the lowest eigenvalue. Default: 10.

  • guess (2d array, str, or None) – Initial guess to use in the first Schrödinger iteration when the iterative solver is used. If None, use default guess (random). If “box”, uses the particle-in-a-box eigenfunctions. Otherwise, must be a tuple whose first entry is the wave functions (with global node index first, and state index second), and whose second entry is the eigenenergies. Default: None.

  • mass_tensor (2D 3x3 array or None) – Inverse mass tensor to be used in Schrodinger equation eigenvalue problem that supersedes the mass tensor from the device. Default: None, meaning that the mass tensor of the device is used.

  • ti_directions (list) – List of strings labeling directions (‘x’, ‘y’, or ‘z’) along which translational invariance is assumed by the Schrödinger solver. Default: None.

  • verbose (bool) – Verbosity level. Default: False.

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