qtcad.device.schrodinger_poisson module

Self-consistent Schrodinger-Poisson solver.

class qtcad.device.schrodinger_poisson.Solver(d, subdevice=None, solver_params=None, poisson_solver_params=None, schrod_solver_params=None)

Bases: Solver

Self-consistent solver for the Poisson and Schrodinger equation.

Attributes:
  • d (device object) – The device to simulate

  • d_schrod (device object) – The subdevice used by the Schrodinger solver.

  • mixer (mixer object) – Object used to store mixing parameters (linear or broyden), if mixing is used.

  • iter (int) – Number of iterations of the self-consistent loop performed.

  • diff (2D array) – Difference between input and output electron densities in the quantum-confined region

  • psolver (solver object) – The Poisson solver.

  • ssolver (solver object) – The Schrodinger solver

  • nprecorr (2D array or None) – Predictor-corrector expression of the electron density at each global node. If None, exchange- correlation term is ignored. Initialized as None and updated after every predictor-corrector iteration.

  • population_factors (1D array) – Weight of each energy level in the calculation of the electron density.

  • maxiter (int) – Maximum number of iterations in the self-consistent Schrodinger-Poisson loop.

  • tol (float) – Tolerance on the electric potential for the self- consistency criterion.

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

  • output_interval (int) – Number of iterations between outputs.

  • sc_method (str) – Method used for self-consistent solution: under-relaxation (‘underrelax’) or predictor-corrector (‘p-c’).

  • initialization (bool) – Initialize by solving the semiclassical problem (True) or not (False).

  • verbose (bool) – Verbosity level.

  • xc (bool) – Option to specify whether to include the exchange- correlation potential (True) or not (False).

  • use_submesh (bool) – If True, use separate meshes for Schrodinger and Poisson solvers.

  • poisson_solver_params (SolverPrams object) – SolverParams for the Poisson solver in the self-consistent Schrodinger-Poisson loop.

  • schrod_solver_params (SolverPrams object) – SolverParams for the Schrodinger solver in the self-consistent Schrodinger-Poisson loop.

Note

If errortype is ‘rel’, the convergence criterion is

2*||nq_out - nq_in||_2 /||nq_out + nq_in||_2 < tol

If errortype is ‘abs’, the convergence criterion is

max(abs(nq_out - nq_in)) < tol

__init__(d, subdevice=None, solver_params=None, poisson_solver_params=None, schrod_solver_params=None)

Initialize from device object d.

Parameters:
  • d (device object) – The device from which to initialize the solver.

  • subdevice (device object) – A subset of the device to use for the Schrodinger solver. If None, use the full device for both Poisson and Schrodinger.

  • solver_params (SolverParams object, optional) – Parameters of the self-consistent solver.

  • poisson_solver_params (SolverParams object, optional) – Solver parameters for Poisson solver. This argument is deprecated. Use solver_params instead.

  • schrod_solver_params (SolverParams object, optional) – Solver parameters for Schrodinger solver.This argument is deprecated. Use solver_params instead.

solve()

Iterates the self-consistent solver until a specified convergence criterion is achieved for the electron or hole density (currently, only electrons are considered).

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

Bases: SolverParams

Parameters to pass to a Schrödinger-Poisson solver.

Attributes:
  • tol (float) – Tolerance to use for the electric potential in the self-consistent Schrödinger-Poisson iterations, in volts. Default: 1e-5.

  • maxiter (int) – Maximum number of iterations in a self-consistent Schrödinger-Poisson loop. Default: 100.

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

  • output_interval (int) – Number of iterations between outputs in a self-consistent loop. Default: 1.

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

  • sc_method (str) – Method used for Schrodinger-Poisson solution: under-relaxation (‘underrelax’) or predictor-corrector (‘p-c’). Default: ‘p-c’.

  • initialization (bool) – Initialize by solving the semiclassical problem (True) or not (False). Default: True.

  • xc (bool) – Option to specify whether to include the exchange- correlation potential in the total confinement potential (True) or not (False). Default: False.

  • tuning_param (float) – Tuning parameter to use in the predictor-corrector method. Default: 0.

  • mixing_algo (str) – Mixer to use: “linear” or “broyden”. Default: “linear”.

  • mixing_param (float) – Parameter beta (sometimes called alpha) used by the mixer. Must be between 0 and 1. Default: 1.

  • mixing_maxit (int) – Number of iterations to keep in memory in Broyden mixing. Default: 20.

  • guess (2d array or None) – Initial guess to use in first Schrödinger iteration. If None, use default guess (random). Otherwise, must be the wave functions, with global node index first, and state index second. Default: None.

  • poisson_solver_params (SolverPrams object) – SolverParams for the Poisson solver in the self-consistent Schrodinger-Poisson loop.

  • schrod_solver_params (SolverPrams object) – SolverParams for the Schrodinger solver in the self-consistent Schrodinger-Poisson loop.

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