Quantum mechanical Carnot engine