  We introduce an iterative method to search for time-optimal Hamiltonians that
drive a quantum system between two arbitrary, and in general mixed, quantum
states. The method is based on the idea of progressively improving the
efficiency of an initial, randomly chosen, Hamiltonian, by reducing its
components that do not actively contribute to driving the system. We show that
our method converges rapidly even for large dimensional systems, and that its
solutions saturate any attainable bound for the minimal time of evolution. We
provide a rigorous geometric interpretation of the iterative method by
exploiting an isomorphism between geometric phases acquired by the system along
a path and the Hamiltonian that generates it, and discuss resulting
similarities with Grover's quantum search algorithm. Our method is directly
applicable as a powerful tool for state preparation and gate design problems.
