where Z = ∑ ∑ n e − − β β ϵ ϵ n is the partition function. If the observable can be written down in the initial basis for the problem, then this sum can be evaluated after transforming to the basis of eigenstates.