  A robust control over quantum dynamics is of paramount importance for quantum
technologies. Many of the existing control techniques are based on smooth
Hamiltonian modulations involving repeated calculations of basic unitaries
resulting in time complexities scaling rapidly with the length of the control
sequence. On the other hand, the bang-bang controls need one-time calculation
of basic unitaries and hence scale much more efficiently. By employing a global
optimization routine such as the genetic algorithm, it is possible to
synthesize not only highly intricate unitaries, but also certain nonunitary
operations. Here we demonstrate the unitary control through the first
implementation of the optimal fixed-point quantum search algorithm in a
three-qubit NMR system. More over, by combining the bang-bang pulses with the
twirling process, we also demonstrate a nonunitary transformation of the
thermal equilibrium state into an effective pure state in a five-qubit NMR
system.
