Partition function of quantum harmonic oscillator: why do I get the classical result?

I am calculating the partition function of a quantum harmonic oscillator and I am getting a surprising result. I am probably wrong at some point of the derivation, but I can't find out where.

I have;

$$Z = \mathrm{Tr} \left[e^{-\beta H}\right]\\ Z = \mathrm{Tr} \left[e^{-\beta a \left(P^2+X^2\right)}\right]$$

Then I invoke the Zassenhaus formula (variant of BCH formula):

$$Z = \mathrm{Tr} \left[e^{-\beta a P^2}e^{-\beta a X^2}e^{\beta \frac{a^2}{2} \left[X^2,P^2\right]}\right]$$

If I am not mistaken, $$\left[X^2,P^2\right] = -2\hbar^2$$ so, $$Z = \mathrm{Tr} \left[e^{-\beta a P^2}e^{-\beta a X^2}e^{-\beta a^2 \hbar^2}\right]$$

The factor $e^{-\beta a^2 \hbar^2}$ does not seem to play an important role, so I factor it out and ignore it. I do the trace in the $x$ basis:

$$Z = \int \left\langle x \right| e^{-\beta a P^2}e^{-\beta a X^2} \left| x \right\rangle\mathrm{d}x\\ Z = \int e^{-\beta a x^2} \left\langle x \right| e^{-\beta a P^2} \left| x \right\rangle\mathrm{d}x$$

Inserting the closure relation for $p$, I get: $$Z = \iint e^{-\beta a x^2} \left\langle x | p \right\rangle e^{-\beta a p^2} \left\langle p | x \right\rangle\mathrm{d}x {d}p$$

Since $\left\langle x | p \right\rangle \sim e^{ipx}$, I get the classical result: $$Z = \iint e^{-\beta a x^2} e^{-\beta a p^2} \mathrm{d}x {d}p$$

Where is the mistake?

• How did you get $[X^2, P^2]=-2 \hbar^2$? This is certainly not true. – noah Nov 30 '17 at 23:21
• Interesting. At a guess, it's because you're integrating over states not allowed as solutions to the quantum harmonic oscillator. Compare what you get with the ordinary sum over Hamiltonian eigenstates: $$Z = \sum_{n=0}^\infty e^{-\beta\hbar\omega (n+1/2)} = \frac{e^{-\beta\hbar\omega/2}}{1-e^{-\beta\hbar\omega}}.$$ But that's a guess. – Sean E. Lake Nov 30 '17 at 23:22
• I don't think $[X^2, P^2] = - 2 \hbar^2$. – knzhou Nov 30 '17 at 23:23
• Use: $$[AB,\,CD] = A[B,\,C]D + [A,\,C]BD + CA[B,\,D] + C[A,\,D]B$$ from en.wikipedia.org/wiki/Commutator#Identities_.28ring_theory.29 – Sean E. Lake Nov 30 '17 at 23:26

Your commutator is wrong. The correct formula is $$[X^2,P^2]=2i\hbar( XP+PX)$$ As such you need to include more terms in the Zassenhaus formula, as higher order commutators don't vanish.
You get the classical result because you're precisely ignoring terms $\mathcal{O}(\hbar)$.