loading...
Quantum carpet: density against position (horizontal) and time (downwards), brighter is more probable
running...
How to use
Drag to orbit, scroll to zoom. The coloured ribbon is the probability density |ψ|² (hue = phase), the corkscrew above it is ψ itself (Re and Im), the glowing screen on the back wall draws the quantum carpet as time runs, and the green marker is 〈x〉. Try the Two-state beat preset, then Measure position and watch the packet fall apart and revive. Detect 200 electrons rains simulated detections onto the floor in proportion to the density. Space pauses.
The chamber (steel walls, slate base, brushed screen frame, ruler) is a Blender model; the wave is Three.js.
The science
The model. A particle of mass m is trapped between two impenetrable walls a distance L apart (an infinite square well, V = 0 inside). The time-independent Schrödinger equation −(ℏ²/2m) φ'' = E φ with φ(0) = φ(L) = 0 has the exact solutions
φn(x) = √(2/L) sin(nπx/L), En = n² π² ℏ² / (2 m L²) = n² E1, n = 1, 2, 3 ...
For an electron in a 1 nm box E1 = 0.376 eV; the energy grows as n² and falls as 1/(mL²), which is why a heavy proton or a wide box has crowded levels and behaves classically.
Superposition and time. Any state is a sum ψ(x,t) = Σ cn φn(x) e−i En t/ℏ with Σ|cn|² = 1. The page evolves this sum exactly (no time-stepping error): the only numerical approximation is truncating the sum at 64 modes. |ψ|² is the probability density; the colour shows the phase arg ψ. Each mode turns at its own rate, so the density changes only when two or more states are present: beats at the frequencies (En − Ek)/ℏ. For the 1+2 mix the mean position oscillates as
〈x〉(t) = L/2 − (16 L / 9π²) cos[(E2 − E1) t / ℏ]
Revival. Because En ∝ n², every phase EnT/ℏ is a multiple of 2π at Trev = 4 m L² / (π ℏ) = 2πℏ/E1: the state returns exactly to itself (a full revival; at Trev/2 a packet reappears mirrored, and at rational fractions it splits into copies: the "quantum carpet" on the screen / in the side panel). The page shows Trev in femtoseconds and plays it in slow motion, one revival every few seconds.
Measurement. The Born rule says an energy measurement gives En with probability |cn|² and leaves the particle in φn; a position measurement with resolution σ gives x with probability density |ψ(x)|² and leaves a narrow Gaussian packet of width σ (an idealised, finite-resolution detector: a perfectly sharp measurement would leave a delta function with infinite energy). After a position collapse the packet spreads at once because its momentum is now very uncertain: press "Measure position" and watch the revival machinery rebuild the packet. "Detect 200 electrons" draws 200 independent copies of the same state and builds the Born-rule histogram.
Checks run in the page (each is a separate re-implementation, not the renderer's own function): the norm by trapezoid integration on a 4001-point grid; 〈E〉 from Σ|cn|²n²E1 against the finite-difference kinetic-energy integral (ℏ²/2m)∫|ψ'|²dx; the closed-form 1+2 beat above against numerical integration at five times; the exact revival |ψ(Trev)|² = |ψ(0)|²; and 20 000 seeded energy measurements against |cn|².
Honest simplifications. One dimension, infinite walls (real quantum wells and dots have finite walls and the particle leaks a little into them), no spin, no interaction with the detector, and no decoherence: the collapse is a postulate here, not a derived process. The "electron" scale is real (E1 = π²ℏ²/2m L² with CODATA constants) but the slow-motion speed is a display choice. The effective mass 0.067 me is the typical conduction-band value of GaAs.