Solution (source code)

= Solution

With $\beta=(k_BT)^{-1}$, the normalized canonical <density operator> is
$$
\boxed{\rho=\frac{e^{-\beta H}}Z,\qquad Z=\operatorname{Tr}e^{-\beta H}}.
$$
Its <eigenvalues> are the Boltzmann probabilities and its trace is one.