qtcad.device.quantum_well module

Self-consistent Schrodinger-Poisson solver for quantum wells.

class qtcad.device.quantum_well.Solver(d, qw_subdevice, coords, solver_params=None, adaptive=False, rho_maxiter=10)

Bases: device.core.quantum_well.Solver

Self-consistent solver for the Poisson and Schrodinger equation for quantum wells.

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

  • d_schrod (subdevice object) – The subdevice of d corresponding to the quantum well region, on which the charge density is computed through 1D Schrodinger equations on linecuts and interpolation.

  • conf_dir (int) – Index of the confinement axis; 0 for ‘x’, 1 for ‘y’, and 2 for ‘z’.

  • P (array of int) – Indices of the axes on which (quasi-)translational invariance is assumed for charge density calculation.

  • mesh_lc (1D array) – 1D coordinates of the global nodes of the linecuts, which is the same for all linecuts. These coordinates correspond to positions along the axis indexed by conf_dir.

  • coords_lc (2D array) – 3D coordinates indicating the starting point of each linecut.

  • d_1D (list of device objects) – the 1D devices on which Schrodinger’s equation is solved.

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

  • psolver (solver object) – The Poisson solver on the Device d.

  • ssolver (list of solver object) – The Schrodinger solvers on the 1D devices in d_1D.

  • 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).

  • 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, qw_subdevice, coords, solver_params=None, adaptive=False, rho_maxiter=10)

Initialize quantum well solver.

Parameters
  • d (device object) – The entire device, on which the Poisson equation is solved.

  • qw_subdevice (device object) – A subset of the device where the charge will be computed assuming there is confinement along a single direction and (quasi-)translational invariance along the other directions.

  • coords (2D array or 2D mesh) – 2D coordinates over which we will take the linecuts for the solver. If the confinement is along ‘z’, these should be ‘x’ and ‘y’ coordinates. Should be of shape (N, 2) if specified as an array.

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

  • adaptive (boolean) – Whether linecuts should be added to calculate the quantum-well charge density according to the adaptive procedure.

  • rho_maxiter (int, optional) – Maximal number of refinements steps in the adaptive procedure. Default: 10.

solve()

Iterates the self-consistent solver until a specified convergence criterion is achieved for the electron or hole density.

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

Bases: device.core.schrodinger_poisson.SolverParams

Parameters to pass to a quantum well solver.

Note that this class is identical to the Schrödinger-Poisson solver parameters class.

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.