---
title: The harmonic oscillator and ladder operators
heading: Equally spaced levels, from molecules to superconducting circuits
eyebrow: B10 · Lesson 7 · The harmonic oscillator and ladder operators
xp: 45
---

::: hook
Near the bottom of almost any potential well, the potential is a parabola, so the **harmonic oscillator** describes vibrating molecules, atoms in a crystal, and the modes of light in a cavity. It also describes an LC circuit, once it's cold enough: a superconducting microwave resonator at 20 mK is a quantum harmonic oscillator, and the qubits in today's quantum computers are slightly distorted versions of one. Its energy levels are evenly spaced, $E_n = (n + \frac12)\hbar\omega$, and there's an elegant way to find them without solving a differential equation at all: **ladder operators** that step from one level to the next.
:::

::: play
- The parabola is the potential, in units of ħω. Each state's probability density is drawn sitting on its energy level, $n + \frac12$.
- Step n up: one more node each time, the levels stay evenly spaced, and the density spreads out toward the classical turning points where the parabola crosses the level (the markers).
- Look past the markers: the density doesn't stop at the turning points. The particle is found in the classically forbidden region; for the ground state, 15.7% of the time.
:::
:::

```sim plot
view: graph
x: u = -5..5
y: y = 0..7
slider: n = 0..5 step 1 = 0
plot: u^2/2 | label: potential, units of ħω (u = x√(mω/ħ))
plot: n + 0.5 | dashed | label: energy
plot: n + 0.5 + 2.5*exp(-u^2)/sqrt(pi)*((step(0.5 - n)) + (step(n - 0.5) - step(n - 1.5))*(2*u)^2/2 + (step(n - 1.5) - step(n - 2.5))*(4*u^2 - 2)^2/8 + (step(n - 2.5) - step(n - 3.5))*(8*u^3 - 12*u)^2/48 + (step(n - 3.5) - step(n - 4.5))*(16*u^4 - 48*u^2 + 12)^2/384 + step(n - 4.5)*(32*u^5 - 160*u^3 + 120*u)^2/3840) | samples: 800 | label: |ψₙ|², on its level
marker: u = sqrt(2*n + 1) | label: turning point
marker: u = -sqrt(2*n + 1)
readout: energy, units of ħω = n + 0.5
readout: nodes = n
```

::: predict
## A superconducting LC resonator at 5 GHz sits in a refrigerator at 20 mK. On average, how many energy quanta does it hold?

- [ ] About 80, as $kT/hf$ suggests
- [ ] About 1
- [x] About $6 \times 10^{-6}$: it's almost always in its ground state
- [ ] Exactly 0

::: reveal
$\frac{hf}{kT} = \frac{0.048 \times 5}{0.020} = 12$, so the mean occupation $\frac{1}{e^{12} - 1} = 6.2 \times 10^{-6}$. At 20 mK the thermal energy is far below one quantum, so the circuit sits in its ground state. That's why superconducting qubits need dilution refrigerators. It isn't exactly zero, which matters for qubit errors.
:::
:::

::: nameit
## The oscillator

$$\hat H = \frac{\hat p^2}{2m} + \frac12m\omega^2\hat x^2, \qquad E_n = \left(n + \frac12\right)\hbar\omega, \quad n = 0, 1, 2, \ldots$$

The ground state is a Gaussian, $\psi_0 = \left(\frac{m\omega}{\pi\hbar}\right)^{1/4}e^{-m\omega x^2/2\hbar}$, with width $\sigma_x = \sqrt{\frac{\hbar}{2m\omega}}$. It's a minimum-uncertainty state, and its energy $\frac12\hbar\omega$ is the zero-point energy.

## Ladder operators

$$\hat a_\pm = \frac{1}{\sqrt{2\hbar m\omega}}(\mp i\hat p + m\omega\hat x), \qquad \hat H = \hbar\omega\left(\hat a_+\hat a_- + \frac12\right), \qquad [\hat a_-, \hat a_+] = 1$$

The commutator makes $\hat a_+$ raise the energy by exactly ħω and $\hat a_-$ lower it:

$$\hat a_+\psi_n = \sqrt{n + 1}\,\psi_{n+1}, \qquad \hat a_-\psi_n = \sqrt n\,\psi_{n-1}, \qquad \hat a_-\psi_0 = 0$$

The ground state is the one that can't be lowered; every other state is $\psi_n = \frac{1}{\sqrt{n!}}(\hat a_+)^n\psi_0$, a Hermite polynomial times the Gaussian.

## Useful results

- $\hat x = \sqrt{\frac{\hbar}{2m\omega}}(\hat a_+ + \hat a_-)$, so $\langle x\rangle = 0$ in every $\psi_n$ and $\langle x^2\rangle = \left(n + \frac12\right)\frac{\hbar}{m\omega}$.
- ⟨T⟩ = ⟨V⟩ = $\frac12E_n$.
- Selection rule: x only connects $\psi_n$ to $\psi_{n\pm1}$, so an oscillating charge absorbs or emits only at ω.

## The LC circuit

With charge q in place of x and flux Φ in place of p, $H = \frac{q^2}{2C} + \frac{\Phi^2}{2L}$ is an oscillator with $\omega = 1/\sqrt{LC}$. In the ground state the voltage still fluctuates, with RMS value $\sqrt{\hbar\omega/2C}$. Thermal occupation is $\bar n = \frac{1}{e^{\hbar\omega/kT} - 1}$, with $\frac{h}{k}$ = 0.048 K per GHz.
:::

::: example
## An electron in a quantum dot sits in a parabolic well with ħω = 10 meV. How wide is its ground state?

::: solution
1. **Width squared.**
   $$\begin{aligned} \sigma_x^2 &= \frac{\hbar}{2m\omega} \\ &= \frac{\hbar^2/2m}{\hbar\omega} \\ &= \frac{0.0381\text{ eV·nm}^2}{0.010\text{ eV}} \\ &= 3.81\ \text{nm}^2 \end{aligned}$$
   so $\sigma_x$ = 1.95 nm.
2. **Stiffer wells.** A stiffer well (larger ħω) makes a smaller dot, with $\sigma_x \propto 1/\sqrt{\hbar\omega}$.

**Answer:** the ground state is 1.95 nm wide (as a standard deviation).
:::
:::

::: example
## What's the RMS zero-point voltage across a 5 GHz resonator with C = 0.5 pF?

::: solution
1. **Photon energy.**
   $$\begin{aligned} \hbar\omega &= hf \\ &= 6.63 \times 10^{-34} \times 5 \times 10^9 \\ &= 3.31 \times 10^{-24}\ \text{J} \end{aligned}$$
2. **Zero-point voltage.**
   $$\begin{aligned} V_{rms} &= \sqrt{\frac{3.31 \times 10^{-24}}{2 \times 0.5 \times 10^{-12}}} \\ &= 1.8\ \text{µV} \end{aligned}$$
3. **Compare with one photon.** A single microwave photon in the same resonator adds the same again: tiny voltages, which is why qubit readout needs quantum-limited amplifiers.

**Answer:** about 1.8 µV RMS.
:::
:::

::: example
## An electron in a quantum dot sits in a parabolic well with ħω = 10 meV. What light can lift it from the ground state, and what about to the second excited state?

::: solution
1. **First step up.** The levels are evenly spaced by 10 meV, so the first step needs a photon of 10 meV:
   $$\begin{aligned} \lambda &= \frac{1239.8}{0.010}\ \text{nm} \\ &= 124\ \text{µm} \end{aligned}$$
   a frequency of 2.42 THz, in the far infrared.
2. **Straight to the second excited state.** That jump, 20 meV up, doesn't happen with light: the position operator connects each level only to its neighbors,
   $$\hat x \propto \hat a + \hat a^\dagger$$
   so the oscillator absorbs at a single frequency however many levels it has.
3. **Why that matters.** That's why a perfect oscillator can't be used as a qubit: every transition is in tune at once.

**Answer:** light at 124 µm (2.42 THz) lifts it one step; no light takes it straight to the second excited state.
:::
:::

::: check
given: w = 5 | 12 | 30; n = 1 | 2 | 4
answer: (n + 0.5)*w
unit: meV
tolerance: 0.1%

## An oscillator has ħω = {w} meV. What's $E_{\given{n}}$?

::: right
Right. $(n + \frac12)\hbar\omega$ = {answer} meV.
:::

::: misses
- [n*w] Include the zero-point energy, $\frac12\hbar\omega$.
- [any] Not yet. $E_n = (n + \frac12)\hbar\omega$.
:::
:::

::: check
given: w = 5 | 20 | 50
answer: sqrt(0.0381/(w/1000))
unit: nm
tolerance: 0.5%

## A free electron sits in a parabolic well with ħω = {w} meV. What's its ground-state width $\sigma_x$?

::: right
Right. $\sqrt{\frac{\hbar^2/2m}{\hbar\omega}}$ = {answer} nm.
:::

::: misses
- [sqrt(2*0.0381/(w/1000))] That's $\sqrt{\hbar/m\omega}$, the classical turning point; $\sigma_x$ is $1/\sqrt2$ of it.
- [any] Not yet. $\sigma_x^2 = \frac{\hbar}{2m\omega} = \frac{0.0381}{\hbar\omega}$ nm² with ħω in eV.
:::
:::

::: check
given: f = 4 | 6 | 8; T = 15 | 50 | 100
answer: 1/(exp(0.047992*f/(T/1000)) - 1)
tolerance: 1%

## A {f} GHz resonator sits at {T} mK. What's its mean number of thermal quanta?

::: right
Right. $\frac{1}{e^{hf/kT} - 1}$ = {answer}.
:::

::: misses
- [any] Not yet. $\frac{hf}{kT}$ with h/k = 0.048 K per GHz.
:::
:::

::: check
given: f = 4 | 6 | 10; C = 0.2 | 0.5 | 1
answer: 0.57559*sqrt(f/C)
unit: µV
tolerance: 0.5%

## RMS zero-point voltage across a {f} GHz resonator with C = {C} pF?

::: right
Right. $\sqrt{\frac{hf}{2C}}$ = {answer} µV.
:::

::: misses
- [0.57559*sqrt(f/C)/sqrt(2)] The ground state's ⟨V²⟩ is $\frac{\hbar\omega}{2C}$: half the zero-point energy is electric.
- [any] Not yet. $V_{rms} = \sqrt{\hbar\omega/2C}$ with ħω = hf.
:::
:::

::: check
given: n = 2 | 3 | 7
answer: sqrt(n + 1)
tolerance: 0.1%

## $\hat a_+\psi_{\given{n}} = c\,\psi_{\given{n}+1}$. What's c?

::: right
Right. $\sqrt{n + 1}$ = {answer}.
:::

::: misses
- [sqrt(n)] That's for $\hat a_-$ going down.
- [any] Not yet. $\hat a_+\psi_n = \sqrt{n + 1}\,\psi_{n+1}$.
:::
:::

::: check
given: n = 1 | 2 | 3; w = 10 | 25
answer: (2*n + 1)*0.0381/(w/1000)
unit: nm^2
tolerance: 0.5%

## For an electron in state n = {n} of a well with ħω = {w} meV, what's ⟨x²⟩?

::: right
Right. $(n + \frac12)\frac{\hbar}{m\omega}$ = {answer} nm².
:::

::: misses
- [0.0381/(w/1000)] That's the ground state's; ⟨x²⟩ grows as $n + \frac12$.
- [any] Not yet. $\frac{\hbar}{m\omega} = \frac{2 \times 0.0381}{\hbar\omega}$ nm².
:::
:::

::: check
kind: parts
given: E = 5 | 10 | 40

## An electron sits in a parabolic well with ħω = {E} meV.

::: part
answer: 1239.84/(E/1000)/1000
unit: µm
tolerance: 0.5%

### What wavelength lifts it from the ground state?

::: misses
- [any] One step of ħω: $\lambda = \frac{hc}{\hbar\omega}$.
:::
:::

::: part
answer: E/1000*1.602e-19/6.626e-34/1e12
unit: THz
tolerance: 0.5%

### What frequency is that?

::: misses
- [any] $f = \frac{E}{h}$.
:::
:::
:::

::: check
kind: derivation
vars: m = 0.00000000000000000000000000000005..0.000000000000000000000000000001, w = 1000000000..100000000000000

## An oscillator of mass m and angular frequency ω (write w).

::: step
answer: sqrt(1.0546e-34/(2*m*w))

### What is the ground state's spread in position?
:::

::: step
answer: 1.0546e-34*w

### How far apart are its levels?
:::

::: right
Right. A stiffer or heavier oscillator has a narrower ground state.
:::
:::

::: explain
## Why is the lowest energy of an oscillator $\frac12\hbar\omega$ and not zero?

::: model
Zero energy would need the particle to sit exactly at the bottom of the parabola with exactly zero momentum, so both x and p would be perfectly sharp, which the uncertainty principle forbids. Squeezing the wave function narrower lowers the potential energy but raises the kinetic energy, and spreading it out does the reverse. The best compromise is the Gaussian ground state, with potential and kinetic energy each $\frac14\hbar\omega$. In the ladder-operator picture, the ground state is the state the lowering operator sends to zero, and the leftover $\frac12$ in $\hat H = \hbar\omega(\hat a_+\hat a_- + \frac12)$ comes from x and p not commuting.
:::
:::

::: practice

::: check
given: w = 8 | 40; n = 0 | 3
answer: (n + 0.5)*w
unit: meV
tolerance: 0.1%

## $E_{\given{n}}$ for ħω = {w} meV?

::: misses
- [any] $(n + \frac12)\hbar\omega$.
:::
:::

::: check
given: w = 1 | 3 | 10 | 20 | 36 | 80
answer: sqrt(0.0381/(w/1000))
unit: nm
tolerance: 0.5%

## Ground-state width for ħω = {w} meV?

::: misses
- [any] $\sqrt{0.0381/\hbar\omega}$ nm.
:::
:::

::: check
given: f = 5 | 7; T = 30 | 200
answer: 1/(exp(0.047992*f/(T/1000)) - 1)
tolerance: 1%

## Thermal quanta in a {f} GHz mode at {T} mK?

::: misses
- [any] $\frac{1}{e^{hf/kT} - 1}$.
:::
:::
:::
