Learning Objectives
By the end of this section you will be able to:
- Set up the time-independent Schrödinger equation for a particle in a parabolic well and explain why the parabola appears again and again in physics.
- Derive the equally-spaced energy ladder using the ladder operators .
- Recognise the Hermite-Gaussian wave functions and read off the number of nodes directly from .
- Interpret the zero-point energy as a mandatory consequence of the uncertainty principle.
- Compare the quantum probability density to the classical one and see the correspondence principle at work as .
- Build a coherent state in your head and explain why it is "the most classical" quantum state.
- Implement the QHO twice in Python: once analytically with Hermite polynomials, once by diagonalising the discretised Hamiltonian in PyTorch.
The Big Picture
Almost any smooth potential, expanded around a stable minimum, looks like a parabola. That is the secret reason the harmonic oscillator keeps reappearing — in the rumbling of atoms in a crystal (phonons), in the rungs of a laser cavity (photons), in molecular vibrations, in every quantum field. Solve the QHO once and you have the universal building block for "small oscillations of anything."
Why this section matters: the QHO is the single most useful exactly-solvable problem in quantum mechanics. Whenever you meet a new quantum system — a vibrating molecule, a trapped atom, a mode of the electromagnetic field — your first move is to ask does this reduce to a harmonic oscillator near equilibrium? Nine times out of ten the answer is yes.
- Energy is quantised. Not just "small," but discretely indexed by .
- The ground state is not at rest. Even the lowest energy is positive — perfect stillness is forbidden.
- Probability can leak past the classical turning point. The wavefunction is non-zero in regions where a classical marble simply could not reach.
The Classical Oscillator: Spring, Pendulum, Atom
A mass connected to a spring of stiffness obeys Newton's law . Solutions oscillate at the angular frequency and the total energy
is conserved. The two terms split smoothly into kinetic and potential energy; the second is the parabolic potential .
Classically, a marble released at amplitude swings between and , the two turning points where all energy is potential and the velocity is zero. Quantum mechanics is going to keep these turning points but change everything else.
The Quantum Hamiltonian
Replace position and momentum by operators — acts by multiplication, — and the classical energy becomes the Hamiltonian operator
and the time-independent Schrödinger equation reads . We are looking for the special functions that the Hamiltonian merely multiplies by a number — the energy eigenstates.
The potential is V(x) = ½ω²x². Inside it sit equally spaced energy rungs Eₙ = ℏω(n + ½). The red dots mark the classical turning points — where a marble with that energy would stop and turn around.
The Ladder Operators — Quantum Mechanics' Cleanest Trick
Define two new operators by mixing position and momentum with carefully chosen prefactors:
The first lowers a quantum number by 1; the second raises it. The single fact you need about them is the commutator
which follows from the canonical commutator . Rewriting the Hamiltonian in terms of these operators gives the punchline
and the operator is called the number operator. Its eigenvalues are non-negative integers , and the Hamiltonian is just .
Intuition: think of as a creation operator that adds one quantum of energy (a phonon, a photon — pick your favourite name), and as the annihilation operator that removes one. The integer simply counts how many quanta are in the oscillator.
Energy Quantization Falls Out Automatically
Suppose is an eigenstate of with eigenvalue . A two-line calculation using shows that is an eigenstate with eigenvalue , and is one with eigenvalue . So once you find any eigenstate, you can climb up and down a discrete ladder.
The ladder must terminate at the bottom — otherwise we would generate states with negative , which would have negative (impossible, it is a norm). The cleanest way to stop is the rule
— the ground state is annihilated by . Acting with repeatedly builds every other state: . Energies follow immediately:
| n | Eₙ (in units of ℏω) | Number of nodes | Symmetry |
|---|---|---|---|
| 0 | 1/2 | 0 | Even |
| 1 | 3/2 | 1 | Odd |
| 2 | 5/2 | 2 | Even |
| 3 | 7/2 | 3 | Odd |
| n | n + 1/2 | n | (−1)ⁿ |
The Hermite Wavefunctions
Solving in the position basis gives a first-order differential equation where . The unique normalisable solution is the Gaussian
Applying repeatedly produces the full family
where is the physicists' Hermite polynomial. The first few are
and they satisfy the simple recurrence — exactly what we use in code below.
- Number of nodes equals (the polynomial degree). Each rung of the ladder adds one zero.
- Parity alternates: even → even function; odd → odd function. Comes from the parity of the parabolic potential.
- Gaussian envelope kills the wavefunction in the classically forbidden region — but only exponentially, not abruptly, leaving a small leakage tail.
Drag the n slider to climb the ladder. Each step adds exactly one node (yellow dot). In |ψ|² mode, compare the quantum probability to the classical one (orange dashed) — they only resemble each other for large n. This is the correspondence principle in action.
Zero-Point Energy — The Lowest Rung Is Not Zero
At absolute zero a classical spring sits motionless at with . The quantum oscillator cannot — the rules of the game forbid it. To see why, use the uncertainty principle . For the ground state, the expectation value of the energy is
Minimise the right-hand side over (take a derivative, set to zero) and you find the minimum value is exactly . The uncertainty principle forces the spring to keep wobbling even at absolute zero.
Observable consequence: liquid helium remains liquid all the way down to at atmospheric pressure. The zero-point motion of the He atoms is large enough to overcome the weak van-der-Waals attraction that would otherwise lock them into a crystal.
Quantum vs Classical Probability
Classically, a marble oscillating with amplitude spends most of its time near the turning points where it is moving slowly. The classical probability density is
— a U-shape peaked at . The quantum ground state, by contrast, is a Gaussian peaked at : the opposite shape. As increases, however, the rapid oscillations of — when smoothed — bend up at the edges and start matching the classical U.
Coherent States — The Most Classical Quantum State
Energy eigenstates have probability densities that are stationary — they do not move. That seems unlike a classical oscillator, which definitely sloshes back and forth. The trick is to consider a special superposition of eigenstates, the coherent state:
This state is the unique eigenstate of the lowering operator: . Its position-space wavefunction is a Gaussian of the same width as the ground state, but centred at . Under time evolution the center oscillates classically,
while the shape of never changes — the wave packet does not spread, in stark contrast to the free-particle packet of section 29.3.
A coherent state is the closest thing quantum mechanics has to a classical oscillating particle. Its shape never changes; only its center swings back and forth at frequency ω, just like a mass on a spring. Period T = 2π/ω ≈ 6.28.
⟨n⟩ = |α|² = 6.25 (mean photon / phonon number) · ⟨H⟩ = ℏω(|α|² + ½) = 6.75 ℏω · current t = 0.00
Worked Example: A Real Carbon-Monoxide Molecule
Let's plug real numbers into the QHO. The C-O bond in carbon monoxide vibrates at wavenumber (measured by infrared spectroscopy). That fully determines the energy ladder — no extra inputs needed.
Click to work through the numbers by hand
Step 1 — convert wavenumber to angular frequency. By definition . With and :
Step 2 — compute one quantum of energy. . Converting to electron-volts (divide by ) gives .
Step 3 — build the ladder. , , , and so on. Each rung is exactly above the previous.
Step 4 — predict the absorption wavelength. A photon that bumps the molecule from to must carry energy , whose wavelength is
That puts the line squarely in the mid-infrared — and indeed every astrophysicist looking at cold molecular clouds measures CO via this 4.67 μm transition. The QHO prediction agrees with experiment to about four significant figures.
Step 5 — sanity-check zero-point motion. Convert to position units: with the reduced mass gives , roughly 3% of the equilibrium bond length of 113 pm. Tiny, but non-zero — the bond is permanently jittering at absolute zero.
Python Implementation: Hermite Wave Functions
Let's now build the QHO from scratch with a few lines of NumPy. The plan: define and in code, check that each wavefunction is properly normalised, then draw them on the parabolic well to match the picture you have been looking at.
Running this prints six normalisation integrals each equal to 1.000000, and produces the textbook layered plot of through drawn on the parabola. The Python calculation matches the analytic formulas exactly — no discretisation, no approximation.
PyTorch: Diagonalise the Hamiltonian Directly
The Hermite approach is elegant, but it works only because we already know the answer. Let's flip the problem around: discretise the Hamiltonian on a grid, treat it as a matrix, and ask PyTorch's eigensolver for its eigenvalues and eigenvectors. If we have not made an arithmetic mistake, the lowest eigenvalues had better be .
Why It Appears Everywhere
Once you have the QHO ladder, you have the language for an astonishing range of physics:
| System | Excitation quantum | Role of ℏω |
|---|---|---|
| Vibrating diatomic molecule | Vibron | Spacing of IR absorption lines (CO: 0.27 eV) |
| Atoms in a crystal lattice | Phonon | Sets specific-heat law, sound velocity |
| Single mode of the EM field | Photon | ℏω is the photon energy E = hν |
| Trapped ion in a Paul trap | Motional quantum | Underlies trapped-ion quantum computers |
| Quantum field (free boson) | Particle | Each k-mode is a QHO; n_k is occupation number |
| Variational autoencoder latent | — | Gaussian prior shares math with the ground state |
The deep reason: the harmonic oscillator is the only non-trivial system whose Hamiltonian is a sum of squares of two operators that obey a canonical commutation relation. Whenever a physical system has those ingredients — and they appear constantly — the QHO machinery is the right tool.
Test Your Understanding
Why are the energy levels of the quantum harmonic oscillator equally spaced by ℏω?
Summary
Drop a quantum particle into a parabolic well and three things happen that have no classical analogue: its energy is quantised in equal steps of , its lowest rung sits at a non-zero , and its wavefunction leaks gently past the classical turning points. The ladder operators give the whole spectrum almost without computation, the Hermite polynomials give the wavefunctions explicitly, and a small PyTorch script recovers both numerically from the bare Hamiltonian. Coherent states sit on top of this structure as the maximally classical superposition — the same mathematical object that describes laser light, microwave cavities, and many other near-classical quantum systems. Because every smooth potential looks parabolic near its minimum, this one solvable problem is the seed crystal for understanding small oscillations across the whole of physics.