Dynamically Corrected Quantum Control: A Geometrical Framework