  The energy levels, generally known as the Landau levels, which characterize
the motion of an electron in a constant magnetic field, are those of the
one-dimensional harmonic oscillator, with each level being infinitely
degenerate. We show in this paper how the associated von Neumann algebra of
observables display a modular structure in the sense of the Tomita-Takesaki
theory, with the algebra and its commutant referring to the two orientations of
the magnetic field. A KMS state can be built which in fact is the Gibbs state
for an ensemble of harmonic oscillators. Mathematically, the modular structure
is shown to arise as the natural modular structure associated to the Hilbert
space of all Hilbert-Schmidt operators.
