🌊 Quantum Wave Packet

A Gaussian wave packet is a superposition of plane waves ψ(x) = exp(ikx) weighted by a Gaussian in momentum space, giving ψ(x,0) = exp(ik₀x)·exp(−x²/(4σ₀²)). In a free-particle dispersion relation ω(k) = ħk²/(2m), different frequency components travel at different phase velocities, causing the packet to spread over time. The packet's centre moves at the group velocity v_g = ħk₀/m while each wave crest moves at the phase velocity v_φ = ħk₀/(2m). Heisenberg uncertainty: Δx·Δp ≥ ħ/2 — a narrow packet spreads faster. 🇺🇦 Українська

Initial conditions

Group vel v_g
Phase vel v_φ
Carrier λ
σ_x (width)
σ/σ₀ spread
Δx·Δp
Time t

How dispersion works

The exact free-particle solution is computed analytically: the Gaussian spreads as σ(t) = σ₀·√(1 + (ħt/(2mσ₀²))²) while its centre moves as ⟨x⟩(t) = x₀ + (ħk₀/m)t. The probability density |ψ|² remains a Gaussian at all times. The minimum uncertainty product Δx·Δp = ħ/2 holds only at t=0; it increases as the packet spreads. This spreading is a purely quantum-mechanical effect with no classical counterpart — it reflects the wave-like nature of matter described by the de Broglie relation λ = h/p.

About this simulation

This simulation renders the exact analytic solution for a free 1-D Gaussian wave packet with a GLSL fragment shader — it is not a discretised Schrödinger-equation solver. Given the initial momentum k₀, width σ₀ and mass m, the packet's centre translates at the group velocity v_g = ħk₀/m while its width grows as σ(t) = σ₀·√(1+τ²), where τ = ħt/(2mσ₀²) is the dimensionless spreading time. The glowing filled curve traces the probability density |ψ|², whose peak height shrinks by a factor σ₀/σ(t) so total probability stays conserved as the packet flattens, while the tinted fringes beneath trace the faster-oscillating carrier phase k₀(x−⟨x⟩)−ωt. Each launch animates 4 atomic time units of physics time over 7 seconds, then automatically restarts from t=0.

🔬 What it shows

The shader draws two things layered together: the outer glowing envelope is the probability density |ψ(x,t)|², shrinking in height and widening as the packet disperses, while the coloured fringes underneath — tinted by cos and sin of the carrier phase — visualise the faster oscillation of Re(ψ) and Im(ψ) riding inside that envelope. The stats panel reports the group velocity, phase velocity, carrier wavelength λ=2π/k₀, the current width σ_x, the spreading ratio σ/σ₀, and the running uncertainty product Δx·Δp.

🎮 How to use it

Drag k₀ to change the packet's momentum (and hence its group velocity and carrier wavelength), σ₀ to set how tightly localised it starts, and Mass m to change how fast it disperses. Launch / Restart re-fires the packet from t=0 at any time, and Pause freezes the animation so you can inspect the profile and the live stat readouts.

💡 Did you know?

At t=0 the packet sits exactly at the Heisenberg minimum, Δx·Δp = ħ/2 — the tightest position-momentum trade-off quantum mechanics allows. Because the momentum spread Δp = 1/(2σ₀) is fixed by the initial width and never changes for a free particle, every bit of extra position spread σ(t) as the packet disperses pushes Δx·Δp strictly above ħ/2, which is exactly what the live "Δx·Δp" readout demonstrates as the simulation runs.

Frequently asked questions

Why does the wave packet spread out over time?

A Gaussian wave packet is a superposition of plane waves with a spread of momenta around k₀. For a free particle each momentum component k evolves with its own phase according to the dispersion relation ω(k)=ħk²/(2m), so components with different k drift apart in phase as time passes. Recombining them gives a packet whose width grows as σ(t)=σ₀·√(1+τ²) with τ=ħt/(2mσ₀²) — exactly the formula this simulator evaluates every frame to set the shader's envelope width.

What is the difference between group velocity and phase velocity here?

The group velocity v_g=ħk₀/m is the speed at which the packet's envelope — and hence the peak of |ψ|² — moves, and is what you actually see the glowing profile translate at. The phase velocity v_φ=ħk₀/(2m) is exactly half of that: it is the speed of the individual wave crests (the carrier oscillation) underneath the envelope, which is why the coloured fringes appear to slide through the envelope rather than staying locked to its peak.

Why does the peak height shrink as the packet spreads?

Total probability, the integral of |ψ|² over all space, must always equal 1. As the width σ(t) grows, the shader scales the peak of the density by a factor σ₀/σ(t) (visible in the code as envSq = exp(...) * (s0 / sigT)) so that a wider, flatter bump still integrates to the same normalised probability as the narrower one it started as.

Why does Δx·Δp grow above ħ/2 as the simulation runs?

The momentum uncertainty Δp=1/(2σ₀) is fixed the moment the packet is launched — a free particle's momentum distribution never changes in time. Only the position uncertainty Δx=σ(t) grows, so the product Δx·Δp increases monotonically away from its minimum value of ħ/2 at t=0. The "Δx·Δp" stat is recomputed every frame directly from σ(t), so you can watch the uncertainty principle's minimum bound being left behind in real time.

Why does the animation restart on its own every few seconds?

Each launch maps 4 atomic units of simulated physics time onto a fixed 7-second on-screen animation (the LAUNCH_DURATION in the code). Once the launch progress reaches 1.0, the simulator automatically resets the launch clock and progress back to zero, so the packet keeps re-appearing at its starting position and width without you needing to click "Launch / Restart" — clicking that button manually simply forces an early reset to t=0.