At equilibrium, the density operator does not evolve in time; thus, \({\partial \rho \over \partial t} = 0\). Thus, from the equation of motion, if this holds, then \([H,\rho]=0\), and \(\rho (t) \) is a constant of the motion. This means that it can be simultaneously diagonalized with the Hamiltonian and can be expressed as a pure function of the Hamiltonian \[\rho = f(H) \nonumber \] Therefore, the eigenstates of \( {\rho} \), the vectors, we called \(\vert w_k \rangle \) are the eigenvectors \(\vert E_i \rangle \) of the Hamiltonian, and we can write \(H\) and \( {\rho} \) as \[\begin{align*} H &= \sum_i E_i \vert E_i\rangle \langle E_i\vert \\[4pt] \rho &= \sum_i f(E_i)\vert E_i\rangle \langle E_i\vert \end{align*}\] The choice of the function \(f\) determines the ensemble.