← Notes

The quantum harmonic oscillator, gently

Ladder operators turn a differential equation into algebra. Here is the idea in five minutes.

1 min read

The harmonic oscillator is the hydrogen atom of physics courses: simple enough to solve exactly, rich enough to show up everywhere.

The Hamiltonian

We start from H^=p^22m+12mω2x^2\hat H = \frac{\hat p^2}{2m} + \tfrac12 m\omega^2 \hat x^2 and define the ladder operator

a^=mω2ℏ(x^+imωp^)\hat a = \sqrt{\frac{m\omega}{2\hbar}}\left(\hat x + \frac{i}{m\omega}\hat p\right)(1)

With it, the Hamiltonian becomes beautifully compact:

H^=ℏω(a^†a^+12)\hat H = \hbar\omega\left(\hat a^\dagger \hat a + \tfrac12\right)(2)

Check it numerically

python
import numpy as np

N = 40
a = np.diag(np.sqrt(np.arange(1, N)), k=1)
H = a.T @ a + 0.5 * np.eye(N)
print(np.linalg.eigvalsh(H)[:5])  # [0.5 1.5 2.5 3.5 4.5]

The spectrum is evenly spaced, exactly as the algebra promised.