# Does the number operator $N$ of the Quantum Harmonic Oscillator commute with $x$? [closed]

Does the number operator $$N$$ of the Quantum Harmonic Oscillator commute with $$x$$?

• It is not proportional, up to a shift, to the oscillator hamiltonian? What do you see? – Cosmas Zachos Nov 10 at 16:50

## 1 Answer

The number operator does not commute with the position operator. We have $$\hat{H}=\frac{\hat{P}^2}{2m}+\frac{1}{2}m\omega^2\hat{X}^2=\left(a^\dagger a+\frac{1}{2}\right)\hbar\omega=\left(\hat{N}+\frac{1}{2}\right)\hbar\omega$$ Then, $$\hat{N}=\frac{\hat{H}}{\hbar\omega}-\frac{1}{2}$$ where $$\hat{H}$$ is the Hamiltonian for the harmonic oscillator.

Using $$[\hat{X},\hat{P}]=i\hbar$$, $$[\hat{X},\hat{H}]$$ is \begin{align}[\hat{X},\hat{H}]&=\hat{X}\hat{H}-\hat{H}\hat{X}\\ &=\frac{1}{2m}\hat{X}\hat{P}^2+\frac{1}{2}m\omega\hat{X}^3 -\left(\frac{1}{2m}\hat{P}^2\hat{X}+\frac{1}{2}m\omega^2\hat{X}^3\right) \\ &=\frac{i\hbar}{2m}\hat{P}+\frac{1}{2m}\hat{P}\hat{X}\hat{P}+\frac{i\hbar}{2m}\hat{P}-\frac{1}{2m}\hat{P}\hat{X}\hat{P} \\ &= \frac{i\hbar}{m}\hat{P} \end{align} Now, we can calculate $$[\hat{X}, \hat{N}]$$: \begin{align} [\hat{X},\hat{N}]&=\hat{X}\hat{N}-\hat{N}\hat{X} \\ &=\frac{\hat{X}\hat{H}}{\hbar\omega}-\frac{\hat{X}}{2}-\left(\frac{\hat{H}\hat{X}}{\hbar\omega}-\frac{\hat{X}}{2}\right) \\ &= \frac{1}{\hbar\omega}\left(\hat{X}\hat{H}-\hat{H}\hat{X}\right) \\ &= \frac{i}{m\omega}\hat{P} \end{align} So no, they do not commute.

• A small correction: $\hat{X}\hat{P}^2 = i\hbar \hat{P} + \hat{P}\hat{X}\hat{P}$, not $\hat{X}\hat{P}^2 = i\hbar + \hat{P}\hat{X}\hat{P}$, and a similar correction has to be done for $\hat{P}^2 \hat{X}$. – HicHaecHoc Nov 10 at 21:40
• Ach! Thank you very much. – Tesseract Nov 10 at 21:41
• Thanks a lot! Very helpful! – Shomroni Nov 11 at 15:01