Energy is restricted to discrete values Eₙ = ħω(n + ½), each level plotted as a dashed horizontal line. No intermediate energy is allowed.
Each ψₙ(x) is computed via recurrence over Hermite polynomials multiplied by a Gaussian. The n-th state has exactly n nodes.
Toggle Superposition to watch a time-evolving probability density as two eigenstates interfere, illustrating quantum beats and Ehrenfest's theorem.
The quantum harmonic oscillator describes a particle bound by a parabolic potential V(x) = ½mω²x². Solving the time-independent Schrödinger equation yields a ladder of equally spaced energy levels Eₙ = ħω(n + ½) and a set of stationary wavefunctions ψₙ(x) built from Hermite polynomials multiplied by Gaussian envelopes. Each level has exactly n nodes, and the lowest (n = 0) ground state retains non-zero zero-point energy E₀ = ½ħω due to the Heisenberg uncertainty principle. This simulation computes all wavefunctions via the numerically stable three-term Hermite recurrence in natural units where ħ = m = 1, and lets you tune the angular frequency ω to observe how the well narrows and the level spacing grows.
Beyond the static eigenstates, the Superposition mode constructs a time-dependent coherent state from two adjacent eigenstates, making the probability density oscillate back and forth like a semi-classical particle. This demonstrates Ehrenfest's theorem: the expectation value of position in a coherent superposition follows the classical equation of motion. The model underlies molecular infrared spectra, phonons in solids, quantised electromagnetic field modes in cavity QED, and the ladder-operator algebra of quantum field theory.
What is the quantum harmonic oscillator?
It is a model of a particle confined by a restoring force proportional to its displacement from equilibrium, producing a parabolic potential. Solving the Schrödinger equation for this potential gives discretised (quantised) energy levels and a set of normalised wavefunctions built from Hermite polynomials and Gaussian factors.
What does Eₙ = ħω(n + ½) mean?
This formula gives the only energies a particle in a harmonic well is allowed to have. The quantum number n counts from 0 upward. Each step increases energy by exactly ħω, so levels are equally spaced — a unique feature of the parabolic potential. The ½ offset ensures the ground state is above zero even when n = 0.
Why does the ground state have non-zero energy?
A particle at rest would have perfectly defined position and momentum, violating Heisenberg's uncertainty principle. The minimum energy E₀ = ½ħω, called zero-point energy, is the irreducible quantum “jitter” that the particle retains even at absolute zero. It has measurable consequences in the Casimir effect and helium's refusal to freeze under atmospheric pressure.
Each ψₙ(x) equals a normalisation constant Nₙ times the Hermite polynomial Hₙ(ξ) times exp(−ξ²/2), where ξ = √(mω/ħ)·x is a dimensionless coordinate. The normalisation Nₙ = (2ₙ n! √π)²⊃(−½) ensures unit probability. The simulation evaluates Hₙ through the stable three-term recurrence Hₙ = 2ξHₙ⁻¹ − 2(n−1)Hₙ⁻² rather than the unstable explicit power series.
It renders the time-dependent probability density |ψ(x,t)|² for an equal-weight superposition of eigenstates n and n+1. Because the two components evolve at different frequencies, their interference pattern oscillates in time with the beat frequency (Eₙ₊¹ − Eₙ)/ħ = ω. The expectation value of x follows the classical sinusoidal motion, illustrating Ehrenfest's theorem.
The equal spacing ħω arises from the algebraic structure of the Hamiltonian. Raising and lowering operators a† and a step the system exactly one level at a time, and their commutation relation [a, a†] = 1 forces a uniform ladder. In contrast, the hydrogen atom has levels spacing proportional to 1/n², and a particle-in-a-box has spacing proportional to n².
|ψₙ(x)|² gives the probability per unit length of finding the particle at position x. For large n the density concentrates near the classical turning points where the particle moves slowest, approaching the classical time-average distribution. This is the correspondence principle in action: quantum mechanics reproduces classical statistics for highly excited states.
A larger ω increases the curvature of the parabolic well, making it steeper and narrower. This raises all energy levels (since Eₙ ∝ ω) and squeezes the wavefunctions toward the origin. A smaller ω spreads the well, lowers the levels, and widens each ψₙ. In molecular spectroscopy, stiffer chemical bonds correspond to higher ω and shorter infrared wavelengths.
The harmonic oscillator underpins molecular vibrations observed in infrared and Raman spectroscopy, lattice vibrations (phonons) in crystal solids, the quantised modes of the electromagnetic field in quantum optics and cavity QED, the Higgs field in the Standard Model, and trapped-ion quantum computers. It is the canonical example solved exactly in every quantum mechanics textbook.
Yes, within the one-dimensional model. The code evaluates exact analytic eigenstates using the three-term Hermite recurrence and computes energies from the exact formula. It uses natural units (ħ = m = 1). The wavefunction amplitudes are scaled for visual clarity but their shapes, node counts, and energy ordering are physically correct. The superposition time evolution uses exact phase factors e⊃(−iEₙt/ħ).