qtcad.device.solver_params module

Class defining the parameters of all the solvers defined in the device simulator.

class qtcad.device.solver_params.SolverParams(inp_dict=None, problem='schrodinger_poisson')

Bases: device.core.solver_params.SolverParams

Parameters to pass to a solver.

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

  • maxiter (int) – Maximum number of iterations in a self-consistent 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.

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

  • sc_method (str) – Method used for Schrodinger-Poisson solution: under-relaxation (‘underrelax’) or predictor-corrector (‘p-c’). Default: ‘p-c’. For Schrodinger solver, method used for eigenvalue problem solution: “eigsh” or “lobpcg”.

  • initialization (bool) – For Schrodinger-Poisson solver: initialize by solving the semiclassical problem (True) or not (False). Default: True.

  • xc (bool) – For Schrodinger-Poisson solver: option to specify whether to include the exchange-correlation potential (True) or not (False). Default: False.

  • num_states (int) – For Schrodinger solver: number of states to solve for, starting from the lowest eigenvalue.

  • tuning_param (float) – For Schrodinger-Poisson solver only. Tuning parameter to use in the predictor-corrector method.

  • mixer (str) – Mixer to use: linear or broyden. Default: linear.

  • mixing_param (float) – For Schrodinger-Poisson solver only. Parameter beta (sometimes called alpha) used by the linear mixer.

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

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

  • calculate_charges (function) – A function that calculates n, p, Nplus, Nminus, rho, and their derivatives, and saves them in the device, for use by the non-linear Poisson solver. Must be a function of a device, and accept strings for ionization model and carrier statistics as kwargs.

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

  • approx (None, ‘envelope’, or ‘ff’, optional) – Approximation applied to simplify the matrix-element calculation in the multivalley effective-mass theory solver. ‘envelope’: envelope function approximation. ‘ff’: form-factor approximation. None: exact matrix-element calculation.

  • initial_ref_factor (float between 0 and 1) – The refinement factor rate initially used by the adaptive-mesh Poisson solver. The lower the number the more refined the output mesh will be. Default: 0.1.

  • final_ref_factor (float between 0 and 1) – The refinement factor rate used in the final refinements of the adaptive-mesh Poisson solver. Default: 0.75.

  • maxiter_adapt (int) – maximal number of iterations permitted before the mesh is adapted. Default value is -1, indicating that there is no maximum.

  • dot_region (list of strings and/or lists of tuples or list of 2 – tuples or single string): Regions where we would like to set the maximal value of the characteristic length. Defaults to None, in which case no maximal characteristic length will be set in any region

  • h_dot (float or list of floats) – Maximal value of the characteristic length in each of the regions defined in dot_region.

  • max_nodes (int) – Maximal number of nodes permitted for an adaptive iteration to be performed. If the maximum is exceeded no aditional adaptive iterations will take place. (Default is 1e6)

  • min_nodes (int) – Minimal number of nodes allowed by the solver. If Poisson solver converges with less nodes, then the initial mesh will be uniformly refined and the adaptive procedure will restart. (Default is 1e5)

  • size_map_filename (string) – Path to .pos file containing size map of refined mesh. Used only for adaptive Poisson solver

  • refined_mesh_filename (string) – Path to refined mesh. Used only for adaptive Poisson solver

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

  • n_circle (int) – number of sample points on the semi-circle part of the NEGF contour as defined in Phys. Rev. B, Vol. 65, 165401.

  • n_poles (int) – number of Fermi poles for the NEGF contour integral as defined in Phys. Rev. B, Vol. 65, 165401.

  • n_plat (int) – number of sample points on the horizontal line just above the Fermi poles for the NEGF contour integral as defined in Phys. Rev. B, Vol. 65, 165401.

  • n_real (int) – number of sample points on the real axis for the NEGF contour integral as defined in Phys. Rev. B, Vol. 65, 165401.

  • ieta (complex) – small imaginary number for NEGF computation.

  • n_jobs (int) – The maximum number of concurrently running jobs for the computations of the NEGF along complex contour and transmission function. If -1, all CPUs are used. If 1 is given, no parallel computing code is used at all. For n_jobs below -1, (n_cpus + 1 + n_jobs) CPUs are used.

  • self_energy_dir (str) – path to the directory in which the self-energy matrices for NEGF calculations are stored. At Solver initialization, this directory must either not exist or be empty. Furthermore, this directory is deleted just before completion of Solver.solve(). If None, the self-energies are not saved to disk and are re-computed as necessary.

  • load_from (string) – path to the file from which the initial potential for the NEGF-Poisson algorithm is loaded.

  • save_to (string) – path to the file to which the potential resulting from the NEGF-Poisson algorithm is saved.

  • adaptive (bool) – whether the real axis integral for the charge density calculation is adaptive.

Note

This SolverParams class is deprecated in QTCAD v1.2 and above. It is now recommended to use the specific SolverParams classes defined in each module defining a Solver class. This class has stopped being maintained, and will be removed in QTCAD v1.3.

Note

If a SolverParams object is created using SolverParams(problem = "schrodinger_poisson"), by default, the following attributes values are assumed:

  • tol = 1e-5

  • maxiter = 100

  • errortype = “abs”

  • output_interval = 1

  • verbose = True

  • method = “iterative”

  • sc_method = “p-c”

  • initialization = True

  • ti_directions = None

  • xc = False

  • num_states = 10

  • tuning_param = 0.

  • smearing_T = None

  • mixing_algo = “linear”

  • mixing_param = 1

  • mixing_maxit = 20

  • guess = None

  • calculate_charges = classical_charge

  • mass_tensor = None

  • approx = “ff”

  • initial_ref_factor = 0.1

  • final_ref_factor = 0.75

  • maxiter_adapt = -1,

  • dot_region = None

  • h_dot = None

  • max_nodes = 1e6

  • min_nodes = 1e5

  • size_map_filename = ‘size_map.pos’

  • refined_mesh_filename = ‘refined_mesh.msh2’

Note

If a SolverParams object is created using SolverParams(problem = "schrodinger"), by default, the same attributes values as for problem = "schrodinger_poisson" are assumed, with the following exceptions:

  • tol = 1e-6

  • maxiter = 1000

  • verbose = False

  • guess = “box”

Note

If a SolverParams object is created using SolverParams(problem = "multivalley_EMT"), by default, the same attributes values as for problem = "schrodinger_poisson" are assumed, with the following exceptions:

  • tol = 0

  • num_states = 2

  • maxiter = None

Note

If a SolverParams object is created using SolverParams(problem = "poisson"), by default, the same attributes values as for problem = "schrodinger_poisson" are assumed, with the following exception:

  • maxiter = 200

Note

If a SolverParams object is created using SolverParams(problem = "negf_poisson"), by default, the same attributes values as for problem = "schrodinger_poisson" are assumed, with the following exceptions:

  • n_circle = 30

  • n_plat = 20

  • n_poles = 20

  • n_real = 10

  • ieta = 1e-6j

  • mixing_algo = ‘periodic_pulay

  • mixing_param = 0.1

  • mixing_maxit = 100

  • n_jobs = 1

  • self_energy_dir = None

  • load_from = None

  • save_to = None

  • adaptive = False

Note

If a SolverParams object is created using SolverParams(problem = "negf"), by default, the same attributes values as for problem = "schrodinger_poisson" are assumed, with the following exceptions:

  • n_circle = 30

  • n_plat = 20

  • n_poles = 20

  • n_real = 10

  • ieta = 1e-6j

  • n_jobs = 1

  • self_energy_dir = None

__init__(inp_dict=None, problem='schrodinger_poisson')

Instantiate the SolverParams object.

Parameters
  • inp_dict (dict, optional) – Dictionary of parameters to define.

  • problem (str, optional) – Set of default parameters to use, depending on the problem being solved (“schrodinger_poisson”, “poisson”, “schrodinger”, “negf_poisson”, “negf”).