|q⟩ Bad Qubits

intermediate · Physics · The Harmonic Oscillator: Ladder Operators

Position and Momentum in Terms of a, a†

The ladder operators were built from x^\hat{x} and p^\hat{p}. Inverting that relationship lets us express position and momentum back in terms of aa and a†a^\dagger — and that is what makes the algebra so practical, because aa and a†a^\dagger have such simple matrix elements.

The inversion

Adding and subtracting the definitions a=(x^+ip^)/2a = (\hat{x} + i\hat{p})/\sqrt{2} and a†=(x^−ip^)/2a^\dagger = (\hat{x} - i\hat{p})/\sqrt{2} isolates x^\hat{x} and p^\hat{p}:

a+a†=2x^2=2 x^,a−a†=2ip^2=i2 p^.a + a^\dagger = \frac{2\hat{x}}{\sqrt{2}} = \sqrt{2}\,\hat{x}, \qquad a - a^\dagger = \frac{2i\hat{p}}{\sqrt{2}} = i\sqrt{2}\,\hat{p}.

Solving,

 x^=a+a†2,p^=a−a†i2=i(a†−a)2 \boxed{\ \hat{x} = \frac{a + a^\dagger}{\sqrt{2}}, \qquad \hat{p} = \frac{a - a^\dagger}{i\sqrt{2}} = \frac{i(a^\dagger - a)}{\sqrt{2}}\ }

(in natural units; restoring constants gives x^=ℏ/2mω (a+a†)\hat{x} = \sqrt{\hbar/2m\omega}\,(a + a^\dagger) and p^=imωℏ/2 (a†−a)\hat{p} = i\sqrt{m\omega\hbar/2}\,(a^\dagger - a)). Both x^\hat{x} and p^\hat{p} are Hermitian, as they must be: x^†=(a†+a)/2=x^\hat{x}^\dagger = (a^\dagger + a)/\sqrt{2} = \hat{x}, and similarly for p^\hat{p}.

Why this is so useful

The operators aa and a†a^\dagger shift the number by exactly one rung. Therefore x^\hat{x} and p^\hat{p}, being their sum and difference, connect only neighbouring number states:

⟨m∣x^∣n⟩≠0 only when m=n±1.\langle m|\hat{x}|n\rangle \neq 0 \ \text{only when}\ m = n \pm 1.

This selection rule — that x^\hat{x} has matrix elements only between adjacent levels — is the algebraic origin of the dipole selection rule Δn=±1\Delta n = \pm 1 for harmonic transitions. We quantify these matrix elements in the next lesson.

Mean square of position

A clean application: the spread of position in a number state. Square x^\hat{x},

x^2=12(a+a†)2=12(a2+(a†)2+aa†+a†a).\hat{x}^2 = \tfrac{1}{2}(a + a^\dagger)^2 = \tfrac{1}{2}\left(a^2 + (a^\dagger)^2 + a a^\dagger + a^\dagger a\right).

Sandwiched between ⟨n∣\langle n| and ∣n⟩|n\rangle, the a2a^2 and (a†)2(a^\dagger)^2 pieces shift the level by ±2\pm 2 and so are orthogonal to ∣n⟩|n\rangle; only the number-diagonal terms survive:

⟨n∣x^2∣n⟩=12(⟨n∣aa†∣n⟩+⟨n∣a†a∣n⟩)=12((n+1)+n)=n+12.\langle n|\hat{x}^2|n\rangle = \tfrac{1}{2}\left(\langle n|a a^\dagger|n\rangle + \langle n|a^\dagger a|n\rangle\right) = \tfrac{1}{2}\left((n+1) + n\right) = n + \tfrac{1}{2}.

Since ⟨x^⟩=0\langle\hat{x}\rangle = 0 in any number state, this is also the variance: (Δx)2=n+12(\Delta x)^2 = n + \tfrac{1}{2}. By symmetry (Δp)2=n+12(\Delta p)^2 = n + \tfrac{1}{2} as well, so excited states are progressively more spread out in both position and momentum.

Try it

This is a numerical exercise — your code should return a number. Build x^=(a+a†)/2\hat{x} = (a + a^\dagger)/\sqrt{2} as a truncated matrix, square it, and return the first-excited-state spread ⟨1∣x^2∣1⟩=n+12=32\langle 1|\hat{x}^2|1\rangle = n + \tfrac{1}{2} = \tfrac{3}{2}.

Run your code to see the quantum state.

Sign in on the full site to ask questions and join the discussion.