In systems with multiple quantum states s sharing the same energy E s, it is said that the energy levels of the system are degenerate. In the case of degenerate energy levels, we can write the partition function in terms of the contribution from energy levels (indexed by j) as follows: Z = ∑ ∑ j g j ⋅ ⋅ e − − β β E j , where g j is the degeneracy factor, or number of quantum states s that have the same energy level defined by E j = E s.