🎱 Quantum Billiard — Particle in a Box
A quantum billiard is a particle confined inside a hard-walled cavity. For a rectangle the eigenstates are separable products of sine functions (ψnx,ny ∝ sin(nπx/L)·sin(mπy/L)); for the Bunimovich stadium the classical orbits are chaotic and the quantum spectrum shows level repulsion — a signature of quantum chaos. Choose a geometry, pick quantum numbers, and watch the probability density |ψ|² rendered as a heat map. The time-dependent superposition shows wavepacket interference.
Geometry
Quantum numbers
Visualization
|ψ|² = probability density. Re(ψ) and Superposition animate in time (Space = play/pause); the slider scrubs the phase. Classical draws two bouncing rays 0.001 rad apart.
Info
(2/L)·sin(nπx/L)·sin(mπy/L)
En,m = E₁(n²+m²)
E₁ = ℏ²π²/(2mL²)
About Quantum Billiards
The rectangular billiard is integrable: constants of motion pₓ and pᵧ quantize independently so scarring, nodal lines, and regular lattice spectra result. The Bunimovich stadium has completely chaotic classical orbits, and quantum mechanically its eigenvalue spacings obey GUE/GOE statistics (random-matrix universality class) — a key result of quantum chaos theory. Scarring (Heller 1984) shows that some eigenstates concentrate probability along unstable classical periodic orbits, violating naive ergodic expectations.
The science
A particle in a hard-walled 2D cavity obeys −(ħ²/2m)∇²ψ = Eψ with ψ = 0 on the wall. Rectangle: ψ = sin(nₓπx/Lₓ)sin(n_yπy/L_y), E ∝ nₓ²/Lₓ² + n_y²/L_y². Disk: ψ = Jm(jmnr/R)cos(mθ), E ∝ jmn². Right isosceles triangle: antisymmetrised sine pairs, E ∝ p²+q². Stadium: no closed form, so the program discretises −∇² on a 72×62 grid and finds the lowest eigenvectors with the Lanczos method (checked against the rectangle: the same code reproduces the exact eigenvalues to about 3 %, a typical finite-difference error). Time evolution of a superposition: |ψ|² = |Σ cₖψₖe−iEₖt/ħ|², which beats at the energy difference. Simplifications: time is in arbitrary units, the stadium has only the 12 lowest levels, and the classical rays use constant speed and specular reflection (the orange ray separates exponentially from the cyan one in the stadium but not in the rectangle).