In statistical mechanics, the grand canonical ensemble is a statistical ensemble, that means a set of identically prepared systems,
each of which is in equilibrium with an external bath with respect to particle and energy exchange.
The grand canonical ensemble frequently provides the most convenient avenue for calculations.
Partition function
The partition function of the grand canonical ensemble is
Here μ is the chemical potential, β the inverse temperature, sometimes also
adorned with the inverse of the Boltzmann constant.
is the Hamiltonian of the
system class considered,
the operator that counts the total number of particles
in one system.