  It is demonstrated by means of the optimal control theory that the energy
cost of the spin-orbit torque induced reversal of a nanomagnet with
perpendicular anisotropy can be strongly reduced by proper shaping of both
in-plane components of the current pulse. The time-dependence of the optimal
switching pulse that minimizes the energy cost associated with Joule heating is
derived analytically in terms of the required reversal time and material
properties. The optimal reversal time providing a tradeoff between the
switching speed and energy efficiency is obtained. A sweet-spot balance between
the field-like and damping-like components of the spin-orbit torque is
discovered; it permits for a particularly efficient switching by a down-chirped
rotating current pulse whose duration does not need to be adjusted precisely.
