Grand canonical partition function (source code)

= Grand canonical partition function
{title2=$\mathcal Z$}

The grand canonical partition function is
$$
\mathcal Z=\sum_s e^{-\beta(E_s-\mu N_s)}.
$$