---
title: "Spin Echo & Noise Spectroscopy Interactive Lab | Sandbox Physics"
description: "Which lost coherence can a pulse bring back? Only dephasing from frequency offsets that stay steady through the sequence."
canonical_url: "https://sandboxphysics.com/labs/spin-echo-noise/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/spin-echo-noise/"
last_modified: "2026-10-27"
---

Q021 · Echoes and the noise behind dephasing

# Spin Echo & Noise Spectroscopy

**Which lost coherence can a pulse bring back?** Only dephasing from frequency offsets that stay steady through the sequence. A flip halfway through reverses the phase each spin has gathered, so the spins line up again at the end. Fast fluctuations, irreversible dephasing and errors in the pulse area are not undone.

Watch the phase arrows fan out, flip and come back together. Compare the same fixed detunings with and without a pulse, predict the result, then test it with simulated counts. Open the full experiment to explore fluctuating noise and how its spectrum can be inferred.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

The model is a two-level system in the rotating frame, with classical Gaussian noise in the detuning. Pulses act instantly and can carry a set area error; finite pulse width and energy relaxation are left out. Ideal pulses have an exact filter-function reference. Imperfect pulses are averaged over a finite set of noise trajectories, and the numerical error of that average is reported separately. A finite decay scan cannot uniquely reconstruct an arbitrary noise spectrum.

Explore the evidence · counts, fits and raw data

Simulated acquisition

## Use the records to identify the noise.

Predict whether the selected inversions beat Ramsey. Acquire both time records, then inspect the conditional noise fit. Dashed curves are model references; colored points and bars are acquired fractions and 95% Wilson intervals.

No acquired record yet.

### Inference from acquired counts

$\text{—}$

Current counts and 95% intervals

| Basis | Positive / total | 95% Wilson interval |
| --- | --- | --- |

Model density matrix · not reconstructed data

$\rho=\frac{I+\boldsymbol r\cdot\boldsymbol\sigma}{2}$

Latest raw events · full record in CSV

| Event / run | Protocol / basis | Duration (ms) | Outcome |
| --- | --- | --- | --- |

Scientific basis: [Hahn 1950](https://journals.aps.org/pr/abstract/10.1103/PhysRev.80.580) · [Álvarez & Suter 2011](https://arxiv.org/abs/1106.3463)

Physics tutorial

## Ask what an echo reverses

**Background** Spins prepared along a transverse direction lose their ensemble coherence when different members pick up different phases. An inversion pulse flips the sign of the phase that builds up afterwards.

**Why it matters** A refocusing experiment reveals how the noise is timed and correlated. It does not undo every physical source of information loss.

Start with the essentials

- **Focus question**: When do more inversion pulses preserve less coherence?
- **One-sentence intuition**: Compared with an independently measured Ramsey baseline, the chosen pulse sequence refocuses slow detuning. Fast changes, irreversible dephasing and pulse-area errors remain.

### Core mathematical model

#### Gaussian detuning model

$$
C_f(u)=\sigma_f^2e^{-|u|/\tau_c},\quad H/\hbar=\pi\delta f(t)\sigma_z
$$

The OU process is stationary and has zero mean. Detuning is in kHz and time in ms. A separate static mode keeps one Gaussian detuning fixed throughout each preparation.

#### Coherence with ideal pulses

$$
W(T)=e^{-\Gamma_\varphi T-\frac{(2\pi)^2}{2}\int_0^T\!\int_0^T y(t)y(s)C_f(t-s)\,dt\,ds}
$$

The switching function changes sign at each instantaneous inversion. This exact Gaussian expression holds only when every pulse has the ideal area.

#### Quasi-static Hahn limit

$$
W(T)=e^{-\Gamma_\varphi T-2\pi^2\sigma_f^2T^2(2\eta-1)^2}
$$

A single inversion at the midpoint refocuses a static spread exactly. Moving it off the midpoint leaves a net signed free-evolution time that no longer cancels.

#### The OU noise spectrum

$$
S_f(\omega)=\frac{2\sigma_f^2\tau_c}{1+\omega^2\tau_c^2},\quad \operatorname{Var}\Phi=(2\pi)^2\int_{-\infty}^{\infty}\frac{d\omega}{2\pi}S_f(\omega)|Y(\omega)|^2
$$

The lower plot shows the model's power spectral density and the filter weight, each normalized for display. It is a diagnostic, not a spectrum reconstructed from measured counts.

### Common difficulties

#### Coherence is not energy

**Typical misconception** Whenever the transverse vector shrinks, energy has been lost.

**Better mental model** This experiment has dephasing and rotations but no bath for energy relaxation. An imperfect rotation can change the populations without any thermal relaxation.

#### A filter covers a band, not a single frequency

**Typical misconception** One decay curve identifies the whole noise spectrum.

**Better mental model** The filter has a finite width and side lobes. The two-parameter OU fit is valid only given the chosen noise family, the scan window and a Markov rate known independently.

#### The dots are simulation, not data

**Typical misconception** The small dots are the directions of individual spins, all measured at the same time.

**Better mental model** They are hidden simulation trajectories, drawn in a toggling frame used for analysis. Each acquired record holds only a two-valued outcome, and the density matrix averages over noise that is never observed.

### Run the experiment

1. 01

   #### Refocus a static spread

   Choose Exact static refocusing. Replay the protocol, then acquire a time scan.

   **What to observe:** The Hahn-echo counts stay close to certainty, while the independent Ramsey record decays. A shortened vector stands for the density matrix of the whole ensemble.

2. 02

   #### Break the timing

   Drag the orange inversion marker away from the midpoint and reacquire.

   **What to observe:** Some phase spread comes back. The keyboard sliders set the same timing, and moving the camera changes neither the physics nor the counts.

3. 03

   #### Probe noise with a finite memory

   Choose Hahn echo, acquire the two decay records, then choose Four-pulse train and repeat.

   **What to observe:** The likelihood fit uses only the counts and assumes OU noise with a known Markov rate. A parameter range that comes out broad, or touches the search boundary, means the data pin that parameter down only weakly.

4. 04

   #### Watch an inference fail

   Choose Imperfect inversions, compare the selected counts with the dashed ideal reference, then choose Fast noise.

   **What to observe:** When a pulse-area error is present, the spectrum fit that assumes ideal pulses is switched off. The numerical error of the trajectory integration is reported separately and never becomes part of a shot confidence interval.

Physical conclusion

Measure a baseline, vary the timing, and keep pulse errors apart from numerical errors. When coherence comes back, it shows that part of the dephasing can be refocused, not that every process is reversible.

Quantum & fields · Starter path

## Start from a single measurement

Predict an outcome, then count what the measurements actually give. The path starts with one qubit and moves on to wave packets, bound states and two-photon interference.

[Start here → **Quantum State & Born Measurement** Predict a probability, turn the analyzer, then compare your prediction with the measured frequency over many shots. Observe · 15 min](https://sandboxphysics.com/labs/qubit-state/)

1. [1 Quantum State & Born Measurement](https://sandboxphysics.com/labs/qubit-state/)
2. [2 Stern–Gerlach Sequence](https://sandboxphysics.com/labs/stern-gerlach-sequence/)
3. [3 Wave Packet & Uncertainty](https://sandboxphysics.com/labs/wave-packet-uncertainty/)
4. [4 Quantum Harmonic Oscillator](https://sandboxphysics.com/labs/quantum-harmonic-oscillator/)
5. [5 Which Path & Quantum Eraser](https://sandboxphysics.com/labs/quantum-eraser/)
6. [6 Hong–Ou–Mandel Two-Photon Interference](https://sandboxphysics.com/labs/hong-ou-mandel/)

[View the full path →](https://sandboxphysics.com/topics/quantum/#starter-path)
