Quantum-cascade lasers: Theory and simulation