NumericsParameters

class qdflow.physics.simulation.NumericsParameters(calc_n_max_iterations_no_guess=1000, calc_n_max_iterations_guess=200, calc_n_rel_tol=0.001, calc_n_abs_tol=0.0001, calc_n_coulomb_steps=1, calc_n_use_combination_method=True, island_relative_cutoff=0.1, island_min_occupancy=0.001, cap_model_matrix_softening=1e-06, stable_config_N_limit=1, count_transitions_sigma=1e-08, count_transitions_eps=1.95, create_graph_max_changes=2)

Bases: object

Set of options for numeric calculations.

Parameters:
  • calc_n_max_iterations_no_guess (int) – The maximum number of iterations to perfom, if no initial guess for n(x) is provided, when calculating the particle density n(x).

  • calc_n_max_iterations_guess (int) – The maximum number of iterations to perfom, if an initial guess for n(x) is provided, when calculating the particle density n(x).

  • calc_n_rel_tol (float) – The relative tolerance to accept a solution for the particle density n(x). The calculation will terminate if the difference delta_n between successive iterations of n(x) is small enough that norm(delta_n) < rel_tol * norm(n), or when the abs_tol condition is satisfied.

  • calc_n_abs_tol (float) – The absolute tolerance to accept a solution for the particle density n(x). The calculation will terminate if the difference delta_n between successive iterations of n(x) is small enough that norm(delta_n) * delta_x < abs_tol, or when the rel_tol condition is satisfied.

  • calc_n_coulomb_steps (int) – The number of steps over which to turn on the Coulomb interaction when calculating the particle density n(x).

  • calc_n_use_combination_method (bool) – Whether to use a linear combination of the previous 2 iterations when solving for n(x), as described in Sec. 2.2 of arXiv:2509.13298.

  • island_relative_cutoff (float) – Cutoff for partitioning the nanowire into “islands”. Regions where n(x) is greater than relative_cutoff * max(n) are considered islands, whereas regions where n(x) is smaller are considered barriers.

  • island_min_occupancy (float) – The minimum charge occupancy to be considered an “island”. If n integrated over a region is less than island_min_occupancy, it is not counted as an island.

  • cap_model_matrix_softening (float) – A small value added to the denominator of the capacitance matrix formula to prevent blowup near zero charge states.

  • stable_config_N_limit (int) – The algorithm will look for a stable configuration of particles which differs from the integral of n(x) over the island by at most N_limit. This must be at least 1.

  • count_transitions_sigma (float) – The minimum weight to accept as a transition when counting transitions.

  • count_transitions_eps (float) – The maximum relative difference between incoming and outgoing weights to accept as a transition.

  • create_graph_max_changes (int) – The maximum number of changes from the stable charge configuration to allow when creating the Markov graph.

__init__(calc_n_max_iterations_no_guess=1000, calc_n_max_iterations_guess=200, calc_n_rel_tol=0.001, calc_n_abs_tol=0.0001, calc_n_coulomb_steps=1, calc_n_use_combination_method=True, island_relative_cutoff=0.1, island_min_occupancy=0.001, cap_model_matrix_softening=1e-06, stable_config_N_limit=1, count_transitions_sigma=1e-08, count_transitions_eps=1.95, create_graph_max_changes=2)

Methods

copy()

Creates a copy of a NumericsParameters object.

from_dict(d)

Creates a new NumericsParameters object from a dict of values.

to_dict()

Converts the NumericsParameters object to a dict.