🎱 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

Info

E/E₁
Nodes X
Nodes Y
⟨x⟩ / Lx
ψn,m(x,y) =
 (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.

About this simulation

This simulation renders the eigenstates of a quantum billiard — a particle trapped in a hard-walled 2D cavity — as a live heat map of |ψ|² on a 120×104 grid. For the rectangle it evaluates the exact separable solution ψn,m ∝ sin(nπx/L)·sin(mπy/L); for the circle, stadium and triangle it uses simplified approximate mode functions that reproduce the qualitative nodal-line structure rather than solving the true boundary-value problem numerically. A separate Classical mode traces 3000 straight-line reflections of a point particle inside the same boundary, letting you compare regular (rectangle, circle) versus chaotic (Bunimovich stadium) trajectories side by side with the quantum picture.

🔬 What it shows

A colour-mapped probability density |ψ|² (or the real part Re(ψ)) for a chosen cavity shape and quantum numbers nx, ny. The rectangle uses the exact product-of-sines solution with energy En,m = E₁(n²+m²); the other three geometries (circle, stadium, triangle) use masked approximate mode functions confined to the cavity outline, drawn with the same colour scale from deep blue/purple (low density) through cyan, green, yellow to red (high density).

🎮 How to use

Choose a Geometry (Rectangle, Circle, Stadium, Triangle) from the dropdown, then drag the nx and ny sliders (1–10) to select quantum numbers — the info panel updates E/E₁, node counts and ⟨x⟩/Lx live. Switch between |ψ|², Re(ψ) and Superposition (which animates two rectangle modes mixing via the Time phase slider) using the visualization buttons, or press Classical to instead trace 3000 reflections of a bouncing point particle inside the same boundary.

💡 Did you know?

The Bunimovich stadium — a rectangle capped with two semicircles — was proven in 1979 to have fully chaotic classical dynamics despite its simple shape, because the curved end caps defocus nearby trajectories exponentially. Quantum mechanically its energy-level spacings follow random-matrix (GOE) statistics, while a handful of its eigenstates unexpectedly "scar" — concentrating extra probability along unstable periodic orbits, a phenomenon discovered by Eric Heller in 1984.

Frequently asked questions

What is a quantum billiard?

A quantum billiard is the quantum-mechanical version of a particle bouncing inside a hard-walled 2D cavity: the potential is zero inside the boundary and infinite outside, so the particle's wavefunction must vanish exactly at the walls. Solving the time-independent Schrödinger equation with this boundary condition gives a discrete set of allowed standing-wave patterns (eigenstates), each with its own energy — this simulation lets you pick the cavity shape and view those standing waves directly.

How is the rectangular case solved, and why is it different from the other shapes?

For a rectangle the boundary condition separates cleanly into independent x and y equations, giving the exact closed-form solution ψn,m(x,y) ∝ sin(nπx/L)·sin(mπy/L) with energy En,m = E₁(n²+m²). The circle, stadium and triangle geometries in this simulation do not have such simple separable solutions in general, so the code instead draws simplified, masked mode functions that reproduce the right qualitative nodal pattern rather than the numerically exact eigenstates you would get from solving the boundary-value problem on a computer.

What does the Classical mode show, and why does it matter?

Classical mode replaces the wavefunction with a single point particle launched at an angle set by the current nx, ny values, then traces 3000 straight-line bounces off the cavity wall using specular reflection. Comparing this to the quantum picture is the point of quantum-billiard research: in the rectangle or circle the trajectory stays on a simple repeating pattern (integrable motion), but in the Bunimovich stadium it wanders unpredictably and eventually covers the whole cavity (chaotic motion) even though the shape looks almost as simple as a rectangle.

What is "quantum chaos" and how does the stadium billiard demonstrate it?

Quantum chaos is the study of how quantum systems behave when their classical counterpart is chaotic, since the Schrödinger equation itself is linear and cannot literally be chaotic. The Bunimovich stadium is the classic example: its classical trajectories are exponentially sensitive to initial conditions, and its quantum energy levels statistically repel each other in the same way as the eigenvalues of random matrices (GOE/GUE ensembles), unlike the regular, non-repelling spectrum of the integrable rectangle or circle.

What is "scarring" in quantum billiards?

Scarring, discovered by Eric Heller in 1984, refers to certain eigenstates of a chaotic billiard (like the stadium) that unexpectedly concentrate extra probability density along the path of an unstable classical periodic orbit, instead of spreading uniformly across the cavity as naive quantum-ergodic theory would predict. It shows that even in a fully chaotic system, the "ghost" of simple periodic classical paths can leave a visible imprint on individual quantum wavefunctions.