qdflow.generate
This module contains classes and functions for generating CSDs and ray data.
Data generation is done with the calc_csd(), calc_2d_csd(), and
calc_rays() functions. These functions input a PhysicsParameters object,
as well as the desired resolution and voltages to sweep. The functions then
run the physics simulation once for each point in the desired range, and return
the resulting data in a single instance of a CSDOutput or RaysOutput
dataclass.
Often, diagrams with a wide variety of features are desired in a dataset.
This is accomplished by randomizing the values of the PhysicsParameters
object for each diagram. random_physics() provides a convenient way of
performing this randomization, and the distributions from which each physics
parameter should be drawn can be set via the PhysicsRandomization dataclass.
Examples
>>> from qdflow import generate
>>> from qdflow.util import distribution
>>> phys_rand = generate.PhysicsRandomization.default()
>>> phys_rand.mu = distribution.Uniform(0, 1.2) # adjust parameter ranges here
>>> n_devices = 10
>>> phys_params = generate.random_physics(phys_rand, n_devices)
This will generate a list of 10 random sets of device parameters.
>>> import numpy as np
>>> phys = phys_params[0]
>>> # Set ranges and resolution of plunger gate sweeps
>>> V_x = np.linspace(2., 16., 100)
>>> V_y = np.linspace(2., 16., 100)
>>> # Run calculation
>>> csd = generate.calc_2d_csd(phys, V_x, V_y)
csd is a single instance of the CSDOutput dataclass, which contains the
results of the calculations. The sensor readout can be obtained as a numpy array
by using csd.sensor[:, :, sensor_num], where sensor_num is the index of
the desired sensor (0 if just one sensor).
Functions
|
Calculates a charge-stability diagram for the case where there are only two dots. |
|
Calculates a charge-stability diagram, varying plunger voltages on 2 dots and keeping all other gates constant. |
|
Calculates ray data, varying multiple plunger voltages at once to move along an arbitrary ray in voltage space. |
|
Calculates the locations and types of transitions in a CSD. |
|
Creates a new |
|
Creates a randomized set of physics parameters describing a QD device. |
|
Initializes a new random number generator with the given seed, used to generate random data. |
Classes
|
Output of charge stability diagram calculations. |
|
Meta-parameters used to determine how random |
|
Output of ray data calculations. |