  Optimal control techniques are applied for the decomposition of unitary
quantum operations into a sequence of single-qubit gates and entangling
operations. To this end, we modify a gradient-ascent algorithm developed for
systems of coupled nuclear spins in molecules to make it suitable for trapped
ion quantum computing. We decompose unitary operations into entangling gates
that are based on a nonlinear collective spin operator and complemented by
global spinflip and local light shift gates. Among others, we provide explicit
decompositions of controlled-NOT and Toffoli gates, and a simple quantum error
correction protocol.
