  Controlling the evolution of nonequilibrium systems to minimize dissipated
heat or work is a key goal for designing nanodevices, both in nanotechnology
and biology. Progress in computing optimal protocols has thus far been limited
to either simple systems or near-equilibrium evolution. Here, we present an
approach for computing optimal protocols based on automatic differentiation.
Our methodology is applicable to complex systems and multidimensional protocols
and is valid arbitrarily far from equilibrium. We validate our method by
reproducing theoretical optimal protocols for a Brownian particle in a
time-varying harmonic trap. We also compute departures from near-equilibrium
behaviour for magnetization reversal on an Ising lattice and for barrier
crossing driven by a harmonic trap, which has been used to represent a range of
biological processes including biomolecular unfolding reactions. Algorithms
based on automatic differentiation outperform the near-equilibrium theory for
far-from-equilibrium magnetization reversal and driven barrier crossing. The
optimal protocol for crossing an energy landscape barrier of 10kT is found to
hasten the approach to, and slow the departure from, the barrier region
compared to the near-equilibrium theoretical protocol.
