  Starting with the quantum brachistochrone problem of the infinitesimal form,
we solve the minimal time and corresponding time-dependent Hamiltonian to drive
a pure quantum state with limited resources along arbitrary pre-assigned
trajectories. It is also shown that out of all possible trajectories, with
limited resources, which are physically accessible and which are not. The
solution is then generalized to the mixed quantum state cases, and applied to
trajectories parameterized by single or multiple parameters with discrete or
continuous spectrum. We then compare the solution to that of the
counterdiabatic driving, and show how the Berry phase is directly involved in
both driving processes.
