Quantum Optics and Quantum Mechanics in Statistical Mechanics