Quantum mechanics of the damped harmonic oscillator