Solution (source code)

= Solution

Single-valued rotor wavefunctions are periodic in $\phi$. The normalized eigenfunctions are $\langle\phi|n\rangle=e^{in\phi}/\sqrt{2\pi}$ with integer $n$, angular momentum $\hbar n$ and energy $E_n=\hbar^2n^2/(2I)$. The <quantum rotor> consequently has
$$
\boxed{\mathcal Z=\sum_{n\in\mathbb Z}e^{-\beta\hbar^2n^2/(2I)}.}
$$
The nonzero levels have the $n\leftrightarrow-n$ degeneracy; the <ground state> is $n=0$. No twisted boundary condition or applied flux has been introduced.