Quantum-Mechanical Rate Equations for Semiconductor Lasers