HomeArticlesQuantum Physics

The Quantum Harmonic Oscillator: Energy Levels and Wavefunctions

Evenly spaced energy levels, a zero-point energy that can never reach zero, and wavefunctions built from Hermite polynomials — the one quantum system every physicist solves by hand.

mysimulator teamUpdated June 2026≈ 8 min read▶ Open the simulation

The one exactly-solvable problem every physicist learns first

The quantum harmonic oscillator (QHO) — a particle in a potential V(x) = ½mω²x² — is the quantum-mechanical version of a mass on a spring, and it is one of the small handful of quantum systems that can be solved exactly in closed form. It matters far beyond springs, because any smooth potential looks approximately parabolic near a local minimum (the first non-trivial term of a Taylor expansion), so the QHO is the standard first approximation for molecular bond vibrations, phonons in a crystal lattice, and the quantised modes of the electromagnetic field itself.

Ĥψ = Eψ,     Ĥ = −(ℏ²/2m) d²/dx² + ½mω²x²

Eₙ = ℏω(n + ½),     n = 0, 1, 2, 3, …
live demo · wavefunctions ψₙ(x) and probability density |ψ|² for n ≤ 5● LIVE

Why the energy levels are evenly spaced — and never zero

Solving the Schrödinger equation for this potential gives an infinite ladder of energy levels spaced by exactly ℏω, the same gap between every consecutive pair — unlike, say, the hydrogen atom, whose levels crowd closer together as n grows. The lowest level, E₀ = ½ℏω, is not zero. This zero-point energy is a direct consequence of the Heisenberg uncertainty principle: a state with exactly zero energy would need exactly zero momentum and exactly zero position simultaneously, which the uncertainty relation Δx·Δp ≥ ℏ/2 forbids. The oscillator can never fully sit still, even at absolute zero temperature — a genuinely quantum effect with no classical analogue, later measured directly in zero-point vibrations of trapped ions and in the Casimir effect.

Wavefunctions and Hermite polynomials

Each energy level's wavefunction has the same universal shape: a Gaussian envelope multiplied by a polynomial that adds n oscillations across the classically allowed region:

ψₙ(x) = Nₙ · Hₙ(√(mω/ℏ) x) · exp(−mωx² / 2ℏ)

Hₙ = the n-th physicists' Hermite polynomial, generated by the recurrence:
H₀ = 1,  H₁ = 2y,  Hₙ₊₁(y) = 2y·Hₙ(y) − 2n·Hₙ₋₁(y)

The recurrence is what makes the wavefunctions cheap to compute numerically — rather than evaluating a closed-form polynomial expression for each n independently, you build H₀ and H₁ once and generate every higher Hₙ from the two before it with one multiply-add per step, which is exactly the approach a real-time simulation needs to overlay several energy levels at once without recomputing everything from scratch each frame.

What the probability density tells you about the classical limit

The ground state |ψ₀|² is a single smooth Gaussian bump centred at x = 0 — the particle is most likely to be found exactly where a classical particle at rest would sit, which looks reassuringly familiar. But look at a high-n state and the classical intuition inverts: |ψₙ|² develops n peaks and n−1 nodes (points of exactly zero probability) across the well, and its envelope becomes largest near the classical turning points at the edges of the motion and smallest in the middle — exactly backwards from a classical oscillator, which lingers longest where it moves slowest, at the turning points, and this quantum probability envelope does converge to the classical time-averaged position distribution as n → ∞, an explicit illustration of Bohr's correspondence principle: quantum predictions must reproduce classical ones in the limit of large quantum numbers.

Ladder operators: the algebraic shortcut

Rather than solving the differential equation directly, the standard modern derivation defines raising and lowering (creation and annihilation) operators ↠and â built from position and momentum, which shift a state up or down exactly one rung of the energy ladder: â†|n⟩ = √(n+1)|n+1⟩ and â|n⟩ = √n|n−1⟩. This algebraic method sidesteps Hermite polynomials almost entirely and generalises directly to quantum field theory, where the same ladder-operator structure describes creating and destroying individual photons or phonons — the QHO is, in that sense, the seed of the entire framework of second quantisation.

Frequently asked questions

Why can't the quantum harmonic oscillator have zero energy?

Zero total energy would require the particle to have exactly zero position and exactly zero momentum at the same time, which the Heisenberg uncertainty principle forbids. The lowest possible energy, ½ℏω, is called the zero-point energy, and it is a purely quantum effect with no equivalent in classical mechanics.

Why are Hermite polynomials computed by a recurrence instead of a formula?

The recurrence Hₙ₊₁ = 2y·Hₙ − 2n·Hₙ₋₁ builds each polynomial from the previous two with a single multiply-add, which is far cheaper and more numerically stable than evaluating a closed-form sum for each order independently — especially when overlaying several energy levels in a live, real-time simulation.

Why do high-energy wavefunctions look nothing like the ground state?

The ground state's smooth Gaussian bump matches a classical particle sitting at rest, but higher states develop multiple peaks concentrated near the classical turning points, which is actually the correct classical behaviour — a classical oscillator spends most of its time near the edges of its swing, where it moves slowest. As n grows, the quantum probability density converges to that classical picture, an example of the correspondence principle.

Try it live

Everything above runs in your browser — open Quantum Harmonic Oscillator and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Quantum Harmonic Oscillator simulation

What did you find?

Add reproduction steps (optional)