Δx·Δp / (ħ/2) over one revival period; it never drops below 1 (dashed).
For the current state, the overlap |⟨ψ(0)|ψ(t)⟩|² (autocorrelation) is computed from the eigenstate amplitudes, Σ|cn|² e−iEnt, at fractions of Trev. Measured = this sum; predicted = 1 at t = Trev and a small value elsewhere.
The science
Eigenstates. φn(x) = √(2/L) sin(nπx/L), En = n²π²ħ²/(2mL²). The state is ψ(x,t) = Σ cn φn(x) e−iEnt/ħ with cn = ∫φnψ(x,0)dx (computed here by Simpson integration with 160 terms).
Revivals. En t/ħ = n² (π²ħ t/(2mL²)); at Trev = 4mL²/(πħ) every phase is a multiple of 2π, so ψ(x,Trev) = ψ(x,0) exactly. At Trev/2, e−in²π = (−1)n and φn(L−x) = (−1)n+1φn(x), so ψ(x,Trev/2) = −ψ(L−x,0): a mirror image. At Trev/4 and 3Trev/4 a smooth packet splits into two copies shifted by L/2 (fractional revivals, the Talbot effect of optics). The picture drawn over x and t is the quantum carpet.
Uncertainty. Δx Δp ≥ ħ/2. ⟨p⟩ and ⟨p²⟩ are computed from finite differences of the grid wavefunction; for a Gaussian well inside the box, Δx Δp = ħ/2 at t = 0.
Simplifications. The truncation to 160 eigenstates smooths sharp features (a square pulse or a packet narrower than ~0.03 L shows Gibbs ripples); the walls are perfectly rigid and infinite; relativistic and many-body effects are ignored; the sketched real-time scale Trev = 4mL²/(πħ) is exact for the model but a real nanometre well is not an infinite well. The displayed values for the "hydrogen-sized" box are for orientation only.