qdflow.physics.noise
This module contains classes and functions for adding noise to CSDs.
The main noise-adding functions are contained within the NoiseGenerator class.
Each NoiseGenerator object must be initialized with a NoiseParameters
object which contains parameters defining the strength of each type of noise.
Often, a wide variety of noise types and strengths are desired in a dataset.
This is accomplished by using different NoiseGenerator objects, each initialized
by a different NoiseParameters object. Different NoiseParameters objects
can be obtained with the random_noise_params() function.
random_noise_params() generates NoiseParameters based on a set of
distributions cointained within the NoiseRandomization dataclass.
Thus there are two randomization steps:
NoiseRandomization metaparameters -> NoiseParameters parameters
-> specific noise realization.
Examples
>>> from qdflow.physics import noise
>>> from qdflow.util import distribution
>>> meta_params = noise.NoiseRandomization.default()
>>> meta_params.unint_dot_mag = distribution.Uniform(0,.05) # adjust meta_params here
>>> noise_params_1 = random_noise_params(meta_params)
>>> noise_params_2 = random_noise_params(meta_params)
>>> noise_gen_1 = NoiseGenerator(noise_params_1)
>>> noise_gen_2 = NoiseGenerator(noise_params_2)
>>> csd = np.load("csd_data.npy")
>>> noisy_csd_1a = noise_gen_1.calc_noisy_map(csd)
>>> noisy_csd_1b = noise_gen_1.calc_noisy_map(csd)
>>> noisy_csd_2 = noise_gen_2.calc_noisy_map(csd)
Here noisy_csd_1a and noisy_csd_1b will look very similar, since they
both have the same white noise strength, the same pink noise strength, the same
amount of latching noise, etc. They will not be exactly the same, as the exact
noise realizations will be different in each case.
However, noisy_csd_2 will (likely) look significantly different, since it
is generated with a completely different white noise strength, pink noise strength,
amount of latching noise, etc.
Functions
|
Generates a random set of noise parameters. |
|
Initializes a new random number generator with the given seed, used to generate random data. |
Classes
|
Adds noise and other postprocessing to simulated quantum dot devices. |
|
Set of parameters used to describe the various types and strengths of noise. |
|
Meta-parameters used to determine how random |