Adiabatic Dynamics In Closed And Open Quantum Systems