Quantum theory of spin-torque driven magnetization switching