|q⟩ Bad Qubits

intermediate · Physics · The Harmonic Oscillator: Ladder Operators

Checkpoint: Ladder Algebra

This checkpoint draws together everything in the module: the ladder operators, their action on number states, the inversion x^=(a+a)/2\hat{x} = (a + a^\dagger)/\sqrt{2}, and the rule for matrix elements. You will compute an element of x^2\hat{x}^2 that connects states two rungs apart.

The setup

Squaring the position operator gives four terms,

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

Group them by how they shift the number eigenvalue:

So x^2\hat{x}^2 connects n|n\rangle to n|n\rangle, n±2|n\pm 2\rangle — never to odd-shifted states. This Δn{0,±2}\Delta n \in \{0, \pm 2\} structure for x^2\hat{x}^2 is the squared-operator analogue of the Δn=±1\Delta n = \pm 1 rule for x^\hat{x}.

Working out ⟨2|x²|0⟩

Apply x^2\hat{x}^2 to the ground state. Three of the four terms die or stay put:

a20=0,aa0=0,aa0=0,a^2|0\rangle = 0, \qquad a a^\dagger|0\rangle = |0\rangle, \qquad a^\dagger a|0\rangle = 0,

leaving only the double-raising term, which climbs two rungs:

(a)20=a(11)=122=22.(a^\dagger)^2|0\rangle = a^\dagger\left(\sqrt{1}\,|1\rangle\right) = \sqrt{1}\sqrt{2}\,|2\rangle = \sqrt{2}\,|2\rangle.

Projecting onto 2\langle 2| kills the level-0 pieces and keeps the coefficient of 2|2\rangle:

2x^20=122=120.7071.\langle 2|\hat{x}^2|0\rangle = \frac{1}{2}\cdot\sqrt{2} = \frac{1}{\sqrt{2}} \approx 0.7071.

Why this matters

Off-diagonal elements of x^2\hat{x}^2 govern two-quantum processes — for instance second-order transitions and the anharmonic corrections that split the otherwise-degenerate harmonic line. Computing them directly from wavefunctions would mean evaluating Gaussian-weighted integrals of Hermite polynomials; the ladder algebra reduces the whole calculation to tracking which terms raise or lower by the right amount. That economy is the central lesson of this module.

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}, square it, and return the off-diagonal element 2x^20=1/2\langle 2|\hat{x}^2|0\rangle = 1/\sqrt{2}.

Run your code to see the quantum state.

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