Quantum mechanics

Explore double-slit interference, bound-state wave functions, barrier tunneling, and the uncertainty principle.

Particles fired one at a time build up a wave interference pattern, as if each particle went through both slits. Switch between particle and wave modes. Lengths here are in simulation units, not meters.

MODE:
Paused
Particles fired0
Fringe spacing Δy ≈ λD/d-
Intensity formulaI ∝ cos²(πd sinθ/λ) · sinc²(πa sinθ/λ)

Quantum wave functions for a particle in an infinite square well (ψn = √2 · sin(nπx/L)) and quantum harmonic oscillator. Blue = Re[ψ(x,t)], shaded area = probability density |ψ(x)|².

Paused
Energy En-
Interior nodes0
Wave function-

A wave packet hits a rectangular barrier. This is a live numerical solution of the Schrödinger equation (ℏ = 1, m = ½), not an animation: the packet splits, part of it leaks through even when E < V0, and Re ψ decays inside the barrier at rate κ = √(V0−E). Try E above V0 too: some of the packet still reflects, which a classical particle never does.

Paused
Transmitted (simulated)-
Reflected (simulated)-
Exact T at this E-
κ = √(V−E)-

Heisenberg uncertainty principle: Δx · Δp ≥ ℏ/2. A minimum-uncertainty Gaussian wave packet achieves the lower bound exactly. Drag the Δx slider and watch Δp respond inversely. Click Animate to see the packet spread over time.

Paused
Δx (pos. width)-
Δp (mom. width)-
Δx · Δp-
ℏ/2 (minimum)0.500
PrincipleΔx · Δp ≥ ℏ/2
What to try

What you'll learn

  • Why single particles still build a wave interference pattern
  • What a wave function is, and why energy comes in fixed levels
  • How a particle can tunnel through a barrier it "can't" climb
  • Why position and momentum can't both be pinned down

Try this

  1. Double slit: fire 300+ particles, then switch to Wave mode. Do the fringes match?
  2. Wave function: step n from 1 to 4 and count the nodes. Compare how the energy grows in each potential.
  3. Tunneling: double the barrier width and watch T drop exponentially, not by half.
  4. Uncertainty: shrink Δx and see Δp widen so their product never goes below ħ/2.

Understanding quantum mechanics

At the scale of electrons and photons, matter stops behaving like tiny billiard balls. Every particle is described by a wave function ψ(x, t), and the probability of finding the particle at a point is |ψ|². The four experiments above each show one consequence of this idea. All of them use natural units (ħ = 1) so the numbers stay simple.

1. Double slit and wave-particle duality

Each particle lands on the screen as a single dot, like a particle. But after many particles, the dots pile up in bright and dark bands, like a wave that went through both slits and interfered with itself. The screen brightness follows:

I(y) ∝ cos²(π Δr / λ)

where Δr is the difference in distance from the two slits to that point. Bright fringes sit where Δr is a whole number of wavelengths, and they are spaced about Δy ≈ λD/d apart (D = slit-to-screen distance, d = slit separation). Increase the wavelength or move the slits closer and the fringes spread out.

2. Wave functions and quantized energy

A particle trapped in a region can only have certain standing-wave shapes, so its energy is quantized. In an infinite square well of width L the allowed states are:

ψn(x) = √(2/L) sin(nπx/L),   En ∝ n²

In a harmonic oscillator (a particle on a spring) the levels are evenly spaced instead, En = (n + ½)ħω, and even the ground state n = 0 has energy ½ħω: the particle can never sit perfectly still. In both cases state n has more nodes (points where ψ = 0) as n increases. The blue curve shows Re[ψ], which oscillates in time at a rate set by En, while the shaded |ψ|² stays constant. That is why these are called stationary states.

3. Quantum tunneling

Classically, a ball with energy E cannot cross a hill of height V₀ > E. Quantum mechanically, the wave function doesn't stop at the barrier. Inside it decays exponentially, and if the barrier is thin enough some of the wave leaks out the other side. For a wide barrier the transmission probability is approximately:

T ≈ e−2κL,   κ = √(2m(V₀ − E)) / ħ

Because L sits in an exponent, doubling the barrier width squares the (already small) transmission instead of halving it. Tunneling is real and useful: it powers nuclear fusion in the Sun, scanning tunneling microscopes, and flash memory.

4. The Heisenberg uncertainty principle

A wave packet that is narrow in position must be built from many different wavelengths, which means a wide spread in momentum (p = ħk). The tradeoff is a law of nature, not a limit of our instruments:

Δx · Δp ≥ ħ/2

A Gaussian packet reaches the minimum exactly at t = 0. Press Animate and the packet spreads out in position while its momentum spread stays fixed, so the product grows above ħ/2. A narrower starting packet spreads faster, because its larger Δp means its parts move apart more quickly.