Asymptotically optimal quantum circuits for d-level systems.