Solution (source code)

= Solution

A <Wick rotation> $t=-i\tau_E$ changes real-time evolution into $e^{-H\tau_E/\hbar}$. At $\tau_E=\beta\hbar$, taking the trace integrates equal endpoints:
$$
\boxed{Z=\int dq\,K_E(q,q;\beta\hbar)=\int_{q(0)=q(\beta\hbar)}\mathcal Dq\,e^{-S_E[q]/\hbar},\quad S_E=\int_0^{\beta\hbar}\left[\frac m2\dot q^2+V(q)\right]d\tau_E.}
$$
Thus temperature sets the imaginary-time circumference, and bosonic coordinate paths are periodic. The measure is fixed by the short-time propagator. The trace sums paths, not just a single stationary trajectory; a quadratic action is special because the saddle plus Gaussian fluctuations is exact.