 Z = \sum_{j} g_j \cdot \mathrm{e}^{- \beta E_j}