# Derivation of the Grand Canonical Partition Function for Fermions

I'm stuck with the summation over macrostates {$$q$$} being the same as the sum over microstates {$$n_i$$}. I have [equation 3 in the above page] $$\mathcal{Z}=\sum_q \prod_i exp\big(-\beta n_{q,i}(\varepsilon_i-\mu)\big)$$ but I'm stuck on how this summation evaluates to [equation 5] $$\mathcal{Z}=\prod_i \bigg(1+exp(-\beta(\varepsilon_i-\mu))\bigg)$$

The mediary step they provide is replacing the macrostate sum with the microstate sum: $$\sum_q \rightarrow \sum_{n_1=0}^1\sum_{n_2=0}^1...\sum_{n_{q_{max}}=0}^1$$ so they have [equation 4] $$\mathcal{Z}=\sum_{n_1=0}^1 \sum_{n_2=0}^1...\sum_{n_{q_{max}}=0}^1 \prod_i exp\big(-\beta n_{q,i}(\varepsilon_i-\mu)\big)$$ but I haven't been able to manipulate or expand this to produce [equation 5] without having additional factors. I'm not sure if $$n_{q,i}$$ has a new meaning in the microstate sum (e.g. $$n_{q,i}$$ being different from $$[n_{j}]_i$$), if I'm mistaking the way $$n_{q,i}$$ is defined (I'm looking at it as though $$q$$ and $$i$$ are indices like that of a rank-2 tensor), if I'm making a mistake with evaluating the sums, or something I'm not thinking of, but I'm stuck. Could anyone explain how to get from [equation 3] to [equation 5]?

In this context, $$q=(n_1,n_2,\ldots)$$ is a list of the occupation numbers of each energy level. When we sum over $$q$$, we are summing over every possible such list where each $$n_i\in\{0,1\}$$.

As a toy example, let's assume that our system has 2 energy levels with energies $$\epsilon_1$$ and $$\epsilon_2$$. We would then have

$$\sum_q \prod_i \exp\big[-\beta n_{q,i}(\epsilon_i-\mu)\big]= \sum_q \exp\big[-\beta n_{q,1}(\epsilon_1-\mu)\big] \exp\big[-\beta n_{q,2}(\epsilon_2-\mu)\big]$$ Now we need to sum over the four possibilities $$q\in\{(0,0),(1,0),(0,1),(1,1)\}$$. A quick bit of algebra should convince you that this is equal to

$$\left(\sum_{n_{q,1}=0}^1 \exp\big[-\beta n_{q,1}(\epsilon_1-\mu)\big]\right)\left(\sum_{n_{q,2}=0}^1 \exp\big[-\beta n_{q,2}(\epsilon_2-\mu)\big]\right)$$ $$= \prod_i \left(1+\exp\big[-\beta(\epsilon_i- \mu)\big]\right)$$

I'm stuck with the summation over macrostates $$\{q\}$$ being the same as the sum over microstates $$\{n_i\}$$.

I would also like to point out that the terminology used by your source is non-standard in a way that invites enormous confusion. Each $$q$$ is a microstate of the system, not a macrostate. It is a precise specification of the occupancy of each energy level, and consists of a list $$q=(n_1,n_2,\ldots)$$. The individual energy levels are neither macrostates nor microstates of the system.

• That makes much more sense. Thank you! Jan 22, 2022 at 21:04