I am confused as to which partition functions are classical and which are quantum. I am interested in the canonical ensemble.

Several places I have seen the "classical" partition function as:

$Z = \sum_{i=0}^{\infty}e^{{-\beta E_{i}}}$ (1)

as well as:

$Z=\frac{1}{h^3}\int_{0}^{\infty}e^{-\beta H(p,q)}dpdq$ (2)

I have seen the "quantum" partition function as:

$Z = \sum_{i=0}^{\infty}e^{{-\beta E_{i}}}$ , contradicting (1)

$Z = \sum_{i=0}^{\infty}g(E_{i}) e^{{-\beta E_{i}}}$ (3)

$Z = \sum_{n=0}^{\infty}e^{{-\beta \sum_{i}^{\infty}n_{i}E_{i}}}$ (4)

I have probably come across more as well, so it's all a bit confusing.



2 Answers 2


Formula $(1)$ can be considered a general, formal expression valid for classical and quantum systems. The critical point is to have clear in mind the meaning of the summation index $i$. The partition function $(1)$ is a sum over the microstates.

In a classical system with a finite set of microstates, like, for example, the Ising model, $i$ labels one of the $2^N$ possible microstates.

In a classical system with an infinite (continuous) set of microstates, like, for example, a system of atoms, the index $i$ and the symbol of summation must be intended as a symbolic notation for the more formally correct expression $(2)$ (however, in that formula $dpdq$ should be intended as the $6N$-dimensional phase space volume element and the integral should be divided by $h^{3N}$). The correspondence is evident in any discretized approximation of the integral in formula $(2)$: all the infinite microstates in a small volume $dpdq$ of the $6N$-dimensional classical phase space are considered as a set of $dpdq/h^{3N}$ states all with the same energy $E_i$.

In a quantum system, the canonical partition function is the trace of the unnormalized canonical density matrix operator $ e^{-\beta \hat H}$, where $\hat H$ is the Hamiltonian operator. By choosing a basis of eigenstates of the Hamiltonian, this trace reduces to expression $(1)$, provided $i$ is now intended as the complete set of quantum numbers labeling each eigenvector of the Hamiltonian.

For quantum and classical discrete systems, the expression $(1)$ can be rewritten in the form of the expression $(3)$, provided the index $i$ is intended as the label of the $i$-th energy level. In this formula, the factor $g(E_i)$ represents the degeneracy of each energy level (i.e., the number of microstates having the same energy $E_i$.

Finally, the expression $(4)$, with some corrections, would correspond to the particular case of the canonical partition functions for a separable non-interacting system. However, in that case, it should be written as $$ \sum_{\{ n_i \}} e^{-\beta \sum_{i} n_i \varepsilon_i} $$ and the meaning of the symbols is as follows

  • ${\{ n_i \}}$ is the set of all possible occupation number configurations of one-particle microstates;
  • $\sum_{\{ n_i \}}$ has to be intended as $\sum_{n_1} \sum_{n_1} \dots \sum_{n_1}$, where each sum goes over the allowed occupation numbers, taking into account every possible constraint on them;
  • $i$ in these formulas has to be intended as the label of the $i$-th one particle microstate.
  • $ \varepsilon_i$ is the energy of the $i$-th one-particle state, which is different from the energy of the $N$-particles state.
  • $\begingroup$ Just a small mistake here: "In a quantum system the canonical partition function is the trace of the canonical density matrix". The trace of the density matrix is always 1 (normalisation of probabilities). You should instead say that $Z$ is the normalisation factor of the canonical density matrix, so that $\mathrm{Tr} \rho = 1$. $\endgroup$
    – Cham
    May 17, 2022 at 23:31
  • $\begingroup$ @Cham I had in mind the unnormalized canonical density matrix $\hat \rho = e^{-\beta \hat H}$. However, thanks. I am going to clarify this point. $\endgroup$ May 18, 2022 at 5:08

For a classical system defined on a phase-space $\{q_1,...,q_n,p_1,....,p_n\}$ and a Hamiltonian $H(\{q_n,p_n\})$ the partition function for a canonical ensemble is given by $$Z_{\text{classical}}= \prod_i^n\iint dq_idp_i \exp[-\beta H(\{q_n,p_n\})].$$ For a quantum system with a discrete spectrum $\{n_1,n_2,n_3,...\}$ with energies $E_i$ and a continuous spectrum parameterized by $\mathbf{k}$ the partition function is given by $$Z_{\text{quantum}}=\sum_{n_i} \exp(-\beta E_i) + \int d^3k\exp(-\beta E(\mathbf{k}))$$ I think we should always be able to paramterize the continuous spectrum such that $$E(\mathbf{k})=E_{ij}k_ik_j$$ but I'm not entirely sure. The quantum case can be formulated more elegantly by introducing the thermal (mixed) state $$\hat{\rho} = \frac{1}{Z}e^{-\beta \hat{H}},$$ so the idea is that a thermalized system is in this mixed state. Normalization requires $\text{Tr}\hat{\rho} = 1$ which means that $$Z=\text{Tr}~e^{-\beta \hat{H}}=\sum_{n_i}\langle n_i|e^{-\beta \hat{H}}|n_i\rangle=\sum_{n_i} \exp(-\beta E_i)$$ is just the quantum partition function (with the continuum spectrum implied). The thermal expectation value for an observable $\Omega$ also follows from this as $$\langle\Omega\rangle=\text{Tr}(\Omega\hat{\rho})=\frac{1}{Z}\sum_{n_i}\langle n_i|\Omega|n_i \rangle\exp(-\beta E_i).$$ Note that the thermal state is also constant in time since $[\hat{\rho},\hat{H}]$ vanishes, which is nice.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.