spin_pulse.environment.noise.noise_time_trace¶
Classes¶
Enumerate the supported noise models for spin-qubit simulations. |
|
Base class for generating and manipulating noise time traces. |
Module Contents¶
- class spin_pulse.environment.noise.noise_time_trace.NoiseType(*args, **kwds)[source]¶
Bases:
enum.EnumEnumerate the supported noise models for spin-qubit simulations.
Each enum value corresponds to the time-trace class used to generate the associated noise realization.
- Noise types:
- QUASISTATIC: Quasistatic noise generated by
QuasistaticNoiseTimeTrace.
PINK: Pink (1/f) noise generated by PinkNoiseTimeTrace.
WHITE: White Gaussian noise generated by WhiteNoiseTimeTrace.
- class spin_pulse.environment.noise.noise_time_trace.NoiseTimeTrace(duration)[source]¶
Base class for generating and manipulating noise time traces.
A noise time trace is represented as an array of length
duration, containing the instantaneous noise values \(\epsilon(t)\) that affect the qubit. Subclasses implement specific noise models (quasistatic, pink, white, etc.) and populate thevaluesarray accordingly.- - duration
Total number of time steps in the noise trace.
- Type:
- - values
Array of noise values of length
duration.- Type:
ndarray
Initializes an empty noise time trace of given duration.
- Parameters:
duration (int) – Total number of time steps in the noise trace.
- ramsey_contrast(ramsey_duration)[source]¶
Compute the Ramsey contrast for a qubit subject to this noise trace.
The qubit is initialized in the equal superposition state \(\frac{\\lvert 0 \rangle + \\lvert 1 \rangle}{\\sqrt{2}}\) and evolves under a pure dephasing Hamiltonian \(H(t) = \\omega(t) Z\). The Ramsey contrast is obtained from the accumulated phase \(\\sum_t \\omega(t)\) over segments of length
ramsey_duration. The trace is divided into independent experiments of equal length and the contrast is averaged over all experiments.- Parameters:
ramsey_duration (int) – Number of time steps per Ramsey experiment.
- Returns:
Averaged Ramsey contrast of length
ramsey_duration.- Return type:
float