|q⟩ Bad Qubits

intermediate · Physics · The Harmonic Oscillator: Ladder Operators

Matrix Elements of x and p

The ladder operators turn the otherwise hard problem of computing integrals like ψm(x)xψn(x)dx\int \psi_m^*(x)\,x\,\psi_n(x)\,dx into simple bookkeeping. Because x^\hat{x} and p^\hat{p} are linear in aa and aa^\dagger, every matrix element is just a pair of square roots.

Matrix elements of position

Use x^=(a+a)/2\hat{x} = (a + a^\dagger)/\sqrt{2} and act to the right with the lowering and raising rules an=nn1a|n\rangle = \sqrt{n}|n-1\rangle, an=n+1n+1a^\dagger|n\rangle = \sqrt{n+1}|n+1\rangle:

x^n=12(nn1+n+1n+1).\hat{x}|n\rangle = \frac{1}{\sqrt{2}}\left(\sqrt{n}\,|n-1\rangle + \sqrt{n+1}\,|n+1\rangle\right).

Projecting onto m\langle m| and using orthonormality mk=δmk\langle m|k\rangle = \delta_{mk},

 mx^n=12(nδm,n1+n+1δm,n+1) \boxed{\ \langle m|\hat{x}|n\rangle = \frac{1}{\sqrt{2}}\left(\sqrt{n}\,\delta_{m,n-1} + \sqrt{n+1}\,\delta_{m,n+1}\right)\ }

The element is nonzero only for m=n±1m = n \pm 1: position connects a level only to its immediate neighbours. This is the harmonic selection rule.

Matrix elements of momentum

The same calculation for p^=i(aa)/2\hat{p} = i(a^\dagger - a)/\sqrt{2} gives

mp^n=i2(n+1δm,n+1nδm,n1).\langle m|\hat{p}|n\rangle = \frac{i}{\sqrt{2}}\left(\sqrt{n+1}\,\delta_{m,n+1} - \sqrt{n}\,\delta_{m,n-1}\right).

Momentum obeys the same Δn=±1\Delta n = \pm 1 rule, but its elements are pure imaginary and antisymmetric in mnm \leftrightarrow n — consistent with p^\hat{p} being Hermitian (its matrix is ii times a real antisymmetric matrix, hence equal to its own conjugate transpose).

Reading the tables

Restoring physical units multiplies x^\hat{x} by /2mω\sqrt{\hbar/2m\omega} and p^\hat{p} by mω/2\sqrt{m\omega\hbar/2}, but the structure is fixed by the dimensionless coefficients above. A few specific values:

1x^0=12=12,2x^1=22=1,2x^3=32=32.\langle 1|\hat{x}|0\rangle = \frac{\sqrt{1}}{\sqrt{2}} = \frac{1}{\sqrt{2}}, \qquad \langle 2|\hat{x}|1\rangle = \frac{\sqrt{2}}{\sqrt{2}} = 1, \qquad \langle 2|\hat{x}|3\rangle = \frac{\sqrt{3}}{\sqrt{2}} = \sqrt{\tfrac{3}{2}}.

The growth of the elements like n\sqrt{n} reflects the widening of the wavefunction at higher levels — exactly the x^2=n+12\langle\hat{x}^2\rangle = n + \tfrac{1}{2} trend found earlier.

Try it

This is a numerical exercise — your code should return a number. Build the truncated matrix of x^=(a+a)/2\hat{x} = (a + a^\dagger)/\sqrt{2} and read off the element 2x^3=3/2=3/2\langle 2|\hat{x}|3\rangle = \sqrt{3}/\sqrt{2} = \sqrt{3/2}.

Run your code to see the quantum state.

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