# Apparent discrepancy between partition function from density matrix and partition function from counting microstates in finite level system

Consider a quantum two-level system indexed by states $|l\rangle = |0\rangle,|1\rangle$ and energies $\epsilon_l$, where $\epsilon_0 = 0$,$\epsilon_1 = \epsilon$. I throw in 2 bosons into the system and let it thermalize to temperature $T$. Now, if I want to get the partition function, I can do it two ways

• Partition function from counting microstates: Here, the system has $\displaystyle\frac{(2+1)!}{2!\;1!}=3$ microstates, $|00\rangle^+,|01\rangle^+$ and ,$|11\rangle^+$ (the '$+$' superscript signifies symmetric combination), with energies $0,\epsilon, 2\epsilon$ respectively. Thus, the partition function is $$Z \equiv \displaystyle\sum_{\rm{microstates}}e^{-\beta E_{\rm{microstate}}}=e^{-\beta\times 0}+e^{-\beta\times \epsilon} + e^{-\beta\times 2\epsilon}=1+e^{-\beta\epsilon}+e^{-2\beta\epsilon}$$.
• Partition function from density matrix: Here, $$Z = \rm{Tr}[e^{-\beta \hat{H}}]=\rm{Tr}[e^{-\beta\sum_l\epsilon_l\hat{n}_l}]=\displaystyle\prod_l\sum_{n\in[0,1,2]} e^{-\beta\epsilon_l n}\\ =\sum_{n\in[0,1,2]} e^{-\beta\epsilon_0 n}\times \sum_{n\in[0,1,2]} e^{-\beta\epsilon_1 n}\\ = \left(e^{-\beta\times 0\times 0 }+e^{-\beta\times 1\times 0 }+e^{-\beta\times 2\times 0 }\right)\times\left(e^{-\beta\times 0\times \epsilon }+e^{-\beta\times 1\times \epsilon }+e^{-\beta\times 2\times \epsilon }\right)\\ = 3\left(1+e^{-\beta\epsilon}+e^{-2\beta\epsilon}\right).$$

Why is there a discrepancy of a factor of $3$ between these two methods? While constant factors in partition functions don't affect any thermodynamics AFAIK, why is the discrepancy there anyways?

• Yeah, sorry about that. I fixed the title. Apr 18 '18 at 19:55

In the first calculation once you know the number of particles in the upper state is $n$ you know the number in the lower state is simply $2-n$ and so you can compute view states as being labelled by the number of particles in the upper state. In the second calculation, however, if you have $n$ particles in the upper state you can still have $0$, $1$ or $2$ particles in the lower state. Since the lower state has $0$ energy however, these possibilities have the same total energy and just result in a 3 fold degeneracy factor.
• @AlekseyDruggist I suspect that depends on context and how formal you are being. You could also consider something along the lines of a hard core boson model. My point is that, in the second calculation, only occupation numbers $n \le 2$ are included in the sum Apr 18 '18 at 10:17