  We discuss a general formalism to optimize quasi-adiabatic state-transfer
protocols, where high fidelity is achieved by maintaining the system in a dark
subspace protected from the dominant dissipative channels. We cast the residual
fidelity loss, induced by a combination of dissipation and non-adiabatic
transitions, in the form of a classical action where the time-dependent control
parameters act as coordinates. This allows us to apply the least action
principle, yielding the fidelity upper-bound and the corresponding optimal
transfer time. As an application, we analyze a system of two qubits subject to
weak relaxation and dephasing, interacting through a strongly dissipative
quantum bus. In this case, our formalism, we obtain a full characterization of
the optimal state-transfer fidelity.
