Put and . The torus partition function is the trace
The continuum momentum states have density , so their contribution is
Each left-moving oscillator contributes , with the complex conjugate for the right mover. The zero-point factor combines these products into the Dedekind eta function
Therefore the torus partition function of a free boson is