---
title: "Quantum Carpet & Revivals Interactive Lab | Sandbox Physics"
description: "Why does a wave spreading in a box come back to its starting shape? Because the energy levels in a box grow as the square of the mode number."
canonical_url: "https://sandboxphysics.com/labs/quantum-carpet-revivals/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/quantum-carpet-revivals/"
last_modified: "2026-10-27"
---

Quantum time: a particle in a box

# Quantum Carpet & Revivals

**Why does a wave spreading in a box come back to its starting shape?** Because the energy levels in a box grow as the square of the mode number. After one revival time every phase lines up again, and the scattered wave rebuilds its exact starting shape. On the way, at simple fractions of that time, it passes through mirrored and split copies of itself.

Release a localized wave packet between two perfectly reflecting walls. Drag its starting point and follow the whole space–time carpet as the packet mirrors, splits into copies and returns exactly. Freeze one moment and build its distribution from independent position measurements.

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

One particle moves in a one-dimensional infinite well. Its starting state is a Gaussian shaped to vanish at the walls, expanded in 64 sine modes and normalized. There is no environment, no interaction and no leakage through the walls. The carpet is a probability map from the model, not the path of a particle.

SPACE × TIME

START FIXED WALLS

The wave at this moment · fixed density scale

Left → right: position. Down: time. Gold line: current slice.

$t/T_{\mathrm{rev}}=0$

Preparing the spectrum…

Pause at one moment and collect data

### Where did the wave land?

Each ideal readout uses a fresh identical preparation. Collecting pauses time.

Recorded trials $0$

Return probability · model $1$

Mean position · records $\text{—}$

Total probability · model $1$

MODEL / RECORDS / PINNED

Horizontal coordinate $x/L$

Teal: model. Gold: recorded frequency density. Dashed: pinned model. Equal-width bins.

RETURN OVERLAP / ONE REVIVAL PERIOD

Overlap compares the complete complex state with its preparation. A mirrored density can have very small overlap.

$0$

Model, units and what the picture means

The initial Gaussian is multiplied by a sine envelope to vanish at both walls. Its first 64 sine coefficients evolve with the exact quadratic energy spectrum. Width denotes the Gaussian parameter before the wall envelope.

$$
E_n=\frac{\pi^2\hbar^2n^2}{2mL^2},\quad T_{\mathrm{rev}}=\frac{4mL^2}{\pi\hbar}
$$

All times are in units of the revival period. Records are drawn from the displayed 384-bin density, normalized for an ideal detector. Finite resolution, a thermal ensemble and instrument response are not modeled. Display brightness uses a fixed square-root gain.

Original research：[Loinaz & Newman (1999)](https://arxiv.org/abs/quant-ph/9902039)

Physics tutorial

## Quantum Carpet & Revivals

**Background** Release a localized wave packet between two perfectly reflecting walls. Drag its starting point and follow the whole space–time carpet as the packet mirrors, splits into copies and returns exactly. Freeze one moment and build its distribution from independent position measurements.

**Why it matters** Watch coherent time evolution unfold, then test it against a finite number of measurements.

Start with the essentials

- **Focus question**: Why does a wave spreading in a box come back to its starting shape?
- **One-sentence intuition**: The energies grow as the square of the mode number, which lets the spread-out modes come back into phase. A full revival restores the whole wave, not just its average position.

### Core mathematical model

#### The energy spectrum

$$
E_n=\frac{\pi^2\hbar^2n^2}{2mL^2},\quad T_{\mathrm{rev}}=\frac{4mL^2}{\pi\hbar}
$$

Time is shown as a fraction of this exact revival period. The rotor's rotational constant is given in energy units.

#### The evolving packet

$$
\psi(x,t)=\sum_{n=1}^{64}c_n\sqrt{\frac{2}{L}}\sin\frac{n\pi x}{L}\,e^{-iE_nt/\hbar}
$$

The prepared Gaussian is multiplied by a sine envelope that goes to zero at the hard walls. The state shown is its projection onto a finite set of modes, normalized.

#### What the measurements estimate

$$
F(t)=|\langle\psi(0)|\psi(t)\rangle|^2
$$

The return probability depends on the full complex state, so it comes from the model as a check. Position counts alone can neither measure nor reconstruct it.

### Common difficulties

#### What the picture shows

**Typical misconception** One particle moves in a one-dimensional infinite well. Its starting state is a Gaussian shaped to vanish at the walls, expanded in 64 sine modes and normalized. There is no environment, no interaction and no leakage through the walls. The carpet is a probability map from the model, not the path of a particle.

**Better mental model** The vertical coordinate is time, not a second spatial direction. Bright stripes are regions of high probability; they do not identify paths taken by individual particles.

### Run the experiment

1. 01

   #### Predict, then jump

   Compare the start, a quarter period, a half period and one full period.

   **What to observe:** The split copies, the mirror image and the exact return are different states.

2. 02

   #### Change one thing at a time

   Keep the walls fixed, and drag the starting position or add launch momentum.

   **What to observe:** Compare the whole time trace, not just one striking frame.

3. 03

   #### Measure and compare

   Collect 500 independent readouts. Pin the sample, change the time, restore the sample and export the raw CSV.

   **What to observe:** The counts fluctuate. The standard error covers only sampling noise, and the teal reference comes from the model.

Physical conclusion

One particle moves in a one-dimensional infinite well. Its starting state is a Gaussian shaped to vanish at the walls, expanded in 64 sine modes and normalized. There is no environment, no interaction and no leakage through the walls. The carpet is a probability map from the model, not the path of a particle.

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)
