spin_pulse.environment.noise.white

Classes

WhiteNoiseTimeTrace

Generate a white noise time trace.

Module Contents

class spin_pulse.environment.noise.white.WhiteNoiseTimeTrace(T2S, duration, segment_duration, seed=None)[source]

Bases: spin_pulse.environment.noise.noise_time_trace.NoiseTimeTrace

Generate a white noise time trace.

This class constructs a noise trace of length duration where each time step is drawn from an independent Gaussian distribution. The noise intensity is determined by the coherence time T2S that fixes the standard deviation \(\sqrt{2/T_2^*}\). White noise corresponds to a flat power spectral density and requires segment_duration = 1.

- segment_duration

Always equal to 1 for white noise.

Type:

int

- sigma

Standard deviation controlling the noise intensity.

Type:

float

- T2S

Coherence time parameter determining the noise intensity.

Type:

float

- values

Noise samples of length duration.

Type:

ndarray

Initialize a white noise time trace for spin qubit simulations.

Each value of the trace is drawn independently from a Gaussian distribution with zero mean and standard deviation \(\sqrt{2/T_2^*}\). The segment_duration parameter must be equal to 1, since white noise has no temporal correlations.

Parameters:
  • T2S (float) – Coherence time parameter determining the noise intensity.

  • duration (int) – Total number of time steps in the noise trace.

  • segment_duration (int) – Must be equal to 1 for white noise.

  • seed (int | None) – Optional seed for reproducible random number generation.

Returns:

The generated noise values are stored in self.values.

Return type:

None

segment_duration = 1[source]
sigma[source]
values[source]
T2S[source]
plot_ramsey_contrast(ramsey_duration)[source]

Plot analytical and numerical Ramsey contrast for white noise.

The plot overlays:

  • the analytical exponential decay expected for white noise,

  • the numerical contrast computed from the generated time trace.

Parameters:

ramsey_duration (int) – Number of time steps used in the Ramsey experiment evaluation.

Returns:

The function produces a plot of the Ramsey contrast.

Return type:

None