spin_pulse.environment.noise.quasistatic

Classes

QuasistaticNoiseTimeTrace

Generate a quasi-static noise time trace for spin-qubit simulations.

Module Contents

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

Bases: spin_pulse.environment.noise.noise_time_trace.NoiseTimeTrace

Generate a quasi-static noise time trace for spin-qubit simulations.

This noise type produces a sequence of piecewise-constant Gaussian noise segments. Each segment has duration segment_duration, and all samples within a segment share the same random value. The resulting noise corresponds to a quasi-static fluctuation with standard deviation determined by the coherence time T2S.

- segment_duration

Duration of each constant-noise segment.

Type:

int

- sigma

Standard deviation of the quasistatic noise, computed as \(\sqrt{2}/T_2^*\).

Type:

float

- T2S

Coherence time parameter used to scale the noise.

Type:

float

- values

Array of noise values of length duration.

Type:

ndarray

Initialize a quasi-static Gaussian noise trace.

The noise trace is constructed from repeated Gaussian segments of length segment_duration. Each segment takes a single Gaussian random value with zero mean and standard deviation \(\sqrt{2}/T_2^*\). The total duration must be an integer multiple of the segment length.

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

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

  • segment_duration (int) – Length of each piecewise-constant segment.

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

Raises:

ValueError – If duration is not divisible by segment_duration.

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

Plot the analytical and simulated Ramsey contrast.

The analytical contrast \(\exp(-t^2 / T_2^{*2})\) is plotted together with the contrast returned by the parent NoiseTimeTrace class.

Parameters:

ramsey_duration (int) – Duration over which the Ramsey signal is evaluated.