NoiseRandomization

class qdflow.physics.noise.NoiseRandomization(n_gates=2, noise_axis=0, use_pink_noise_all_dims=True, latching_positive=True, white_noise_magnitude=0.0, pink_noise_magnitude=0.0, telegraph_magnitude=0.0, telegraph_relative_stdev=0.0, telegraph_low_pixels=1.0, telegraph_high_pixels=1.0, latching_pixels=0.0, sech_blur_width=0.0, unint_dot_magnitude=0.0, unint_dot_spacing=None, unint_dot_offset=0.0, unint_dot_width=0.0, coulomb_peak_offset=0.0, coulomb_peak_width=None, coulomb_peak_spacing=1.0, sensor_gate_coupling=None)

Bases: object

Meta-parameters used to determine how random NoiseParameters should be generated.

All attributes should either be provided a single value (if no randmization is needed), or a randomize.Distribution object, from which the value will be drawn.

Parameters:
  • n_gates (int) – The number of plunger gates in the device.

  • noise_axis (int) – The axis along which to add telegraph noise, latching, and sech blur.

  • white_noise_magnitude (float | Distribution[float]) – Magnitude of the white noise to add to the data. The noise at each pixel is drawn from a Gaussian distribution with standard deviation white_noise_magnitude.

  • pink_noise_magnitude (float | Distribution[float]) – Magnitude of the pink noise to add to the data. The noise at each pixel will have standard deviation pink_noise_magnitude, but will have 1/f correlation.

  • telegraph_magnitude (float | Distribution[float]) – The magnitude of the telegraph noise to add to the data. Each jump will add or subtract a constant drawn from a normal distribution with mean telegraph_magnitude/2 and standard deviation telegraph_stdev/sqrt(2). This means that the total jump distance will have mean telegraph_magnitude.

  • telegraph_relative_stdev (float | Distribution[float]) – The relative standard deviation of the telegraph noise to add to the data. Each jump will add or subtract a constant drawn from a normal distribution with mean telegraph_magnitude/2 and standard deviation telegraph_stdev/sqrt(2). This means that the total jump distance will have standard deviation telegraph_stdev. telegraph_stdev is found by multiplying telegraph_relative_stdev by telegraph_magnitude.

  • telegraph_low_pixels (float | Distribution[float]) – The average number of pixels before a jump from low to high in the telegraph noise. Must be greater than or equal to 1.

  • telegraph_high_pixels (float | Distribution[float]) – The average number of pixels before a jump from high to low in the telegraph noise. Must be greater than or equal to 1.

  • latching_pixels (float | Distribution[float]) – The average number of pixels to extend past transitions when applying latching noise.

  • latching_positive (bool | Distribution[bool]) – Whether to shift in the positive or negative direction when applying latching noise.

  • sech_blur_width (float | Distribution[float]) – The width in pixels of the sech blur.

  • unint_dot_magnitude (float | Distribution[float]) – The strength of the unintended dot effects.

  • unint_dot_spacing (ndarray[float] | Distribution[float] | Distribution[ndarray] | None) – A vector (with length equal to the number of gates) normal to the unitended dot transition, with magnitude equal to the spacing between transitions. If a float distribution is provided, an ndarray of the appropriate size will be generated by repeatedly drawing from the distribution. If None, no unitended dot peaks will be applied.

  • unint_dot_width (float | Distribution[float]) – The width of the unitended dot peaks.

  • uint_dot_offset (float | Distribution[float]) – A value between 0 and 1 which defines by how much each unintended dot peak should be offset, relative to the norm of unint_dot_spacing.

  • coulomb_peak_width (float | Distribution[float] | None) – The width of the sech^2 curve for applying coulomb peak effects. If None, no Coulomb peak effects will be applied.

  • coulomb_peak_offset (float | Distribution[float]) – A value between 0 and 1 which defines by how much each sech^2 peak should be offset applying coulomb peak effects, relative to coulomb_peak_spacing.

  • coulomb_peak_spacing (float | Distribution[float]) – A value which determines how far apart each sech^2 peak should be when applying coulomb peak effects.

  • sensor_gate_coupling (ndarray[float] | Distribution[float] | Distribution[ndarray] | None) – A vector with length equal to the number of gates, giving the value of the sensor-gate coupling per pixel for each gate. If a float distribution is provided, an ndarray of the appropriate size will be generated by repeatedly drawing from the distribution. If None, no sensor-gate coupling will be applied.

  • use_pink_noise_all_dims (bool) – Whether pink noise should be correlated in all dimensions (True), or only along noise_axis (False).

__init__(n_gates=2, noise_axis=0, use_pink_noise_all_dims=True, latching_positive=True, white_noise_magnitude=0.0, pink_noise_magnitude=0.0, telegraph_magnitude=0.0, telegraph_relative_stdev=0.0, telegraph_low_pixels=1.0, telegraph_high_pixels=1.0, latching_pixels=0.0, sech_blur_width=0.0, unint_dot_magnitude=0.0, unint_dot_spacing=None, unint_dot_offset=0.0, unint_dot_width=0.0, coulomb_peak_offset=0.0, coulomb_peak_width=None, coulomb_peak_spacing=1.0, sensor_gate_coupling=None)

Methods

copy()

Creates a copy of a NoiseRandomization object.

default([q_positive])

Creates a new NoiseRandomization object with default values.

from_dict(d)

Creates a new NoiseRandomization object from a dict of values.

to_dict()

Converts the NoiseRandomization object to a dict.