## Abstract

Steering quantum dynamics such that the target states solve classically hard problems is paramount to quantum simulation and computation. And beyond, quantum control is also essential to pave the way to quantum technologies. Here, important control techniques are reviewed and presented in a unified frame covering quantum computational gate synthesis and spectroscopic state transfer alike. We emphasize that it does not matter whether the quantum states of interest are pure or not. While pure states underly the design of quantum circuits, ensemble mixtures of quantum states can be exploited in a more recent class of algorithms: it is illustrated by characterizing the Jones polynomial in order to distinguish between different (classes of) knots. Further applications include Josephson elements, cavity grids, ion traps and nitrogen vacancy centres in scenarios of closed as well as open quantum systems.

## 1. Introduction

Controlling quantum dynamics may provide access to efficiently performing computational tasks or to simulating the behaviour of other quantum systems that are beyond experimental handling themselves. In particular, quantum systems can also simulate classical systems efficiently [1,2] sometimes even separating controllable parameters in the quantum analogue that classically cannot be tuned independently. Therefore, both in simulation and in computation, the complexity of a problem may reduce upon going from a classical to a quantum setting [3]. On the computational end, most prominently, there is the exponential speed-up by Shor's quantum algorithm of prime factorization [4,5] relating to the ample class of quantum algorithms [6,7] efficiently solving hidden subgroup problems [8,9]. Inspired by topological quantum computation exploring braid groups, recently another type of quantum algorithm has come into focus, to wit the algorithm of Aharonov, Jones and Landau (AJL) [10] for approximating the Jones polynomial, i.e. a central invariant in knot theory. For broader context, see also [11]. While classically it is NP-hard to distinguish two (classes of) knots in terms of their characteristic Jones polynomials, the quantum AJL algorithm, or its predecessor by Kauffman & Lomonaco [12,13], can do so more efficiently with quantum resources. Moreover, as has been experimentally demonstrated by NMR [14,15], these algorithms can be implemented using thermal mixtures of quantum states. Moreover, it suffices to approximate the trace of a controlled unitary encapsulating the information of the Jones polynomial. This class of quantum algorithms is equivalent to deterministic quantum computation with one clean qubit (DQC1) [16], and actually it is even DQC1-complete [17,18], where general belief has it that P DQC1 BQP (e.g. Shor & Jordan [17]). As has nicely been pointed out in Passante *et al*. [15], note that DQC1 does not require the quantum bit to be in a pure state.

While the demands for accuracy (‘error-correction threshold’) in quantum computation may seem daunting at the moment, the quantum simulation end is far less sensitive. Thus, simulating quantum systems [19]—in particular at phase transitions [20]—has shifted into focus [21–24].

Both quantum computation and simulation are challenging quantum engineering tasks requiring high-level manipulations of quantum dynamics. To this end, also among the mathematical tools [25,26] optimal control algorithms have been establishing themselves as indispensable [27,28]. They have matured from principles [29] and early implementations [30–32] via spectroscopic applications [33–35] to advanced numerical algorithms [36,37] for state-to-state transfer and quantum-gate synthesis [38–40] alike as will be illustrated in more detail.

On the practical end of engineering high-end quantum experiments, progress has been made in many areas, including cold atoms in optical lattice potentials [41,42], trapped ions [43–49] and superconducting qubits [50–52], to name just a few. At the interface of theory and experiment, optimal control among numerical tools has become increasingly important (see [53] for a recent review). For instance, near time-optimal control may take pioneering realizations of solid-state qubits being promising candidates for a computation platform [54] from their fidelity limit to the decoherence limit [39]. More recently, open systems governed by a Markovian master equation have been addressed [40], and even smaller non-Markovian subsystems can be tackled, if they can be embedded into a larger system that in turn interacts in a Markovian way with its environment [55]. Taking the concept of decoherence-free subspaces [56,57] to more realistic scenarios, avoiding decoherence in encoded subspaces [58] complements recent approaches of dynamic error correction [59,60]. Along these lines, quantum control is anticipated to contribute significantly to bridging the gap between quantum principles demonstrated in pioneering experiments and high-end quantum engineering [27,61]. Many results from controlling spin systems, as can also be found in this Theme Issue in the contributions by the groups of Laflamme at IQC or Jones in Oxford, are paradigmatic for finite-dimensional quantum systems. So their implications reach far beyond spin systems and, in particular, beyond ensembles, which is why we first focus on the general toolbox.

To this end, the paper is structured as follows: §2 casts many of the standard quantum optimal control tasks into the framework of bilinear control systems. We show that all of them can conveniently be tackled by a unified program platform dynamo comprising concurrent (grape), sequential (Krotov-type) as well as hybrid algorithms. In §3, we outline a number of applications to synthesizing quantum gates in closed quantum systems referring to experimental settings such as Josephson charge qubits and cavity grids. Section 4 departs from quantum circuits and shows how control applications help to distinguish classes of knots by way of their Jones polynomials. As demonstrated in §5, also open quantum systems profit from optimal control, e.g. as a means of error avoidance.

## 2. Algorithmic platform for bilinear quantum control systems

In practice, quantum control problems amount to steering a dynamic system such as to maximize a given figure of merit subject to the constraint of following a given equation of motion. In (finite-dimensional) quantum dynamics, the pertinent equations of motion are typically linear both in the drift as well as in the control terms, and dynamic systems of this form are known as *bilinear control systems* [62–64]
2.1and with ‘state’ , drift , controls , and control amplitudes thus defining the as effective generators. Table 1 elucidates how the six standard tasks encountered in quantum optimal control take the form of bilinear control systems.

More precisely, the quality function may be expressed via the scalar product as the overlap between the final state (or operator) of the controlled system at time *T* and the target state so that the common options amount to
2.2Define the boundary conditions as , and fix the total time *T*. For simplicity, we henceforth assume equal discretized time spacing for all timeslices . So . Then the total generator (i.e. Hamiltonian *H* or Lindbladian *L*) governing the evolution in the time interval shall be labelled by its final time *t*_{k} as
2.3generating the propagator
2.4which governs the controlled time evolution in the timeslice (*t*_{k−1,tk}. Then the optimal control algorithms proceed in the following basic steps:

—

*initialize*with a random (or guessed) control vector (pulse sequence) consisting of the piecewise-constant control amplitudes*u*_{j}:={*u*_{j}(*t*) | 0≤*t*≤*T*};—

*exponentiate**X*_{k}=e^{−iΔtAu(tk)}for all*k*∈ with ;—

*calculate forward-propagation**X*_{k:0}:=*X*_{k}*X*_{k−1}⋯*X*_{1}*X*_{0};—

*calculate back-propagation*;—

*evaluate fidelity*say*f*=|*g*|, where ;—

*evaluate gradients*for all*k*: with ∂*X*_{k}/∂*u*_{j}of equation (2.5) or (2.6) and e^{−iϕg}:=*g**/|*g*|;—

*update amplitudes*for all*k*, e.g. by quasi-Newton , where*α*_{k}is a suitable step size and is (an l-bfgs-approximation to) the inverse Hessian;—

*re-iterate*up to terminal condition (e.g. ∂*f*_{k}/∂*u*_{j}≤*f*′_{limit}for all*k*).

Here the exact derivative in closed systems (or uncontrolled unital open systems characterized by their *normal* Lindblad generators) can be read element-wise from the eigendecomposition (with eigenvectors |*λ*_{l}〉 to the eigenvalues *λ*_{l})
2.5while, in controlled open systems, other methods apply like
2.6as long as the digitization by Δ*t* is sufficient to satisfy ∥*A*_{u}∥_{2}≪1/Δ*t*, or one will have to resort to finite-differences, etc. [65]. This scheme covers all the optimal control problems specified by table 1.

Recently, we have provided a unified Matlab-based programming frame ‘dynamo’ [65] designed in a modular way such that for the earlier-mentioned set of bilinear control problems, it embraces the different algorithmic approaches known in the literature and shown in figure 1. While the grape algorithm (*gradient-assisted pulse engineering*) [37] updates all timeslices in the pulse sequence (control vector) *concurrently*, another set of well-established algorithms of Krotov type [30,36,66–68] do so *sequentially*. It has turned out that for optimizing unitary gate synthesis for quantum information, concurrent updates of grape type overtake sequential algorithms of Krotov type well before reaching qualities of the order of the *error-correction threshold*. This is due to the fact that the recursive scheme (bfgs) to approximate the inverse Hessian pays when a constant set of timeslices is updated as in grape, while sequential updates preclude full profit from such recursions for second-order methods, and their first-order variants naturally lose power in the vicinity of critical points. In the dynamo platform, one may also easily change between the different schemes, and the switch can actually be done on the fly during the course of an optimization run, whenever needed to save computation time. Thus dynamo can readily be kept state-of-the-art with respect to future developments such as improved preconditioning, further Newton-type algorithms, or including incoherent degrees of freedom to the control parameters.

## 3. Applications in closed systems

In order to interface theory and experiment, optimal control tools have become increasingly important [27,53,69]. The applications reach from ion traps via cold atoms in optical lattices to superconducting qubits [51,52], the latter two being of particular interest to quantum electronics.

For instance, in Josephson elements, we have shown how to take the pioneering realization [70] from the fidelity limit to the decoherence limit [39]. For two capacitively coupled Josephson elements, we could speed up the implementation time to realize a cnot by a factor of five, while in three linearly coupled elements a Toffoli gate can be realized some 12.5 times faster than by a sequence of nine cnot gates.

More recently, after seminal work of White [71] on exploiting auxiliary levels to speed up the synthesis of quantum gates, such a Toffoli gate has been implemented in a superconducting circuit by the Wallraff group [72] as elaborated on in [73]. In our case, the symmetry of the system (real symmetric Hamiltonians that can be expressed in terms of *σ*_{x} and *σ*_{z} Pauli matrices) could be matched with the fact that the target cnot gate is a square root of unity (i.e. the cnot is self-inverse) in order to exploit optimal control to find a palindromic control sequence. Palindromic sequences can be synthesized by a cosine Fourier series. For the experimental realization by an electronic *LCR* terminal, this means the symmetry of the problem translates into Cauer synthesis without resistive components (*R*) as shown in detail in [39].

On a general level, numerical optimal control lends itself to solve the *quantum compilation task* of translating quantum computational components of the high language of a unitary module into the machine language of a sequence of controlled quantum evolutions of the dynamic system given experimentally [74]. Thus, optimal control allows one to depart from synthesizing a unitary target only from local operations plus cnot gates, i.e. from a restricted instruction set (RISC). Rather one may exploit precompiled few-qubit complex instruction sets (CISC) [75]. Thereby, the tight error-correction threshold of RISC computations may be relaxed to the CISC modules, which also have the advantage of being considerably faster. At the same time, we want to emphasize that the algorithms for synthesizing unitary target modules are themselves entirely independent of the experimental realization in as much as it does not matter whether the underlying experimental system operates with pure states or with ensemble mixtures [69].

As an example from cavity quantum electrodynamics, take the paradigmatic setting of a cavity grid [76], where the qubits are arranged in the configuration of a square grid as shown in figure 2. Here the pair interactions between two qubits in one column (respectively row) can be switched on and off in a fashion that only the desired qubit pair interact, while the remaining ones are left invariant. Now consider the task of implementing an indirect 1–3 quantum gate *U*_{13}. To this end, common wisdom would suggest the following sequential decomposition:
3.1i.e. to first swap qubits 2 and 3, then perform the 1–2 operation before swapping qubits 2 and 3 again. However, because there is no experimental limitation that would enforce the row and column operations to be performed sequentially, one can exploit optimal control to arrive at parallel operations which are much faster. Actually, for a variety of standard gates, the speed-up against sequential decompositions varies between factors of two and nearly four (see also table 2) as has been demonstrated in [77].

## 4. Implementation for ‘untying knots by NMR’

Many of the well-established quantum algorithms operate by solving the hidden subgroup problem in an efficient way [8,9]. Moreover, they do so by resorting to the circuit model with its experimentally challenging accuracy demands (‘error-correction threshold’). In the search for different and more robust classes of quantum algorithms, *topological quantum computing* with anyonic quasi-particles brought up relations to braid groups [12,78,79]. This is because anyonic world lines in a three-dimensional model of space–time (consisting of two spatial and one temporal dimensions) form braids that can be exploited as quantum gates. These gates have the power of the circuit model with the advantage of being more robust. When establishing the relation between topological and ordinary quantum computation, it turned out that unitary representations of braid groups that are useful for anyonic topological quantum computing can also be used to compute invariants of knots and links such as the Jones polynomial.

Thus, there is a fruitful interplay between topological and circuit-based algorithms mediated via braid groups of knots, i.e. by unitary representations of the braid operations. In order to implement these unitaries experimentally, control aspects are of practical importance once again.

Therefore, in this section, we will illustrate how thermal ensembles can be used for approximating the trace of a unitary matrix [80]. This paves the way to a recent class of quantum algorithms related to the knot theory, because it allows for efficiently evaluating Jones polynomials over a range of parameters. Because knots with different Jones polynomials are clearly inequivalent (while the converse does not hold), efficient quantum algorithms determining the trace of unitaries can be of great help (in the cases distinguishable by the Jones polynomials) to solve the classically NP-hard decision problem whether two knots are equivalent in the sense they can be transformed into one another by using only Reidemeister moves and trivial moves, i.e. those which do not change the number of crossings.

More precisely, while a *knot* is defined as an embedding of the circle in three-space up to ambient isotopy, a *link* is an analogous embedding of several disjoint circles again up to isotopy. Now a *knot invariant* is any function that remains invariant under Reidemeister (and trivial) moves mentioned already. The Jones polynomial is a special form of Laurent polynomial (i.e. a polynomial with terms of both positive and negative degrees forming a ring) that itself has a degree that grows at most linearly with the number of crossings in the corresponding link. Note there is an important relation to *braid groups* established by Alexander's theorem. It says that any link can be constructed as a plait closure of some braid, namely by moving ‘return’ strands back into the braid (see Shor & Jordan [17] for details).

Now the algorithm of Aharonov [10,78,81] takes the trace of some unitary representation of the corresponding braid group to give the Jones polynomial. Here the braid group with *n* strands, *B*_{n}, is generated by its *n*−1 generators representing right-handed twists {*σ*_{1},*σ*_{2},…,*σ*_{n−1}}. For evaluating the trace, it is most convenient to exploit the connection to the Temperley–Lieb algebra [11,82] and its unitary representation *ρ* by
4.1where is of modulus one and *U*_{i} is real symmetric, while *σ*_{i} is the generator of the braid group associated with the knot of interest.^{1}

Next, we focus on the three-stranded braid group *B*_{3} generated by the elements {*σ*_{1},*σ*_{2}}. It comprises the well-known standard knots *Trefoil* (up to addition of a circle disjoint from the knot), *Figure-Eight* and the *Borromean Rings* shown in figure 3.

In the unitary (path model) representation of *B*_{3}, one ends up with the following unitaries that contain *θ* (related to the variable *A* of the bracket and Jones polynomial):
4.2

Now, in order to get hold of the trace of *U*_{i} by a quantum measurement, we follow Fahmy *et al*. [80] and enlarge the quantum register by one ancilla qubit. Then the unitary *U*_{i} is translated into a controlled unitary with respect to the ancilla in the sense
4.3

On the basis of thermal ensemble states with , it is routine (here on the molecule chloroform by ^{1}H saturation followed by gradient filters) to prepare the suitable initial state *ρ*_{0}=(1/*N*)(11−(*α*_{1}/2)*σ*_{1z}) with the *z*-magnetization on the natural abundance ^{13}C used as qubit. With these stipulations, it is easy to proceed in three final steps:

— prepare

— let

*ρ*_{1}evolve under the signature sequence (*vide infra*) of*cU*_{i}'s specific to the knot in question. This gives the total— measure the expectation value of the phase sensitive ensemble detection operator

^{2}as to give 〈*D*〉:=*tr*{*D*^{†}*ρ*_{2}}=−(*α*_{1}/2*N*)*trU*.

In simple cases, it is well known how to translate unitary operators into NMR pulse sequences. In the more intricate case here, similar recipes apply, and backed by grape, one arrives at the pulse sequences shown in figure 4, which are specifically designed to continuously depend on the variable *θ* via
4.4so that they can be implemented over a range of values of *θ*. Now, for the Trefoil knot the NMR pulse sequence for *cU*_{1} has to be applied thrice , while for the Figure-Eight knot it is and for the Borromean Rings to be read from right to left to give the respective *cU*_{fig8} and *cU*_{borr}.

As shown in figure 5, the Jones polynomial was experimentally evaluated for each knot or link at 31 values of *θ* distributed over a continuous part of the domain accessible by the quantum algorithm. This readily discriminates the three-stranded knots or links by two qubits, while in Passante *et al*. [15] only single values of *θ* were used. Note that the experimental data nicely follow the theoretical prediction and the functional dependence is so different that the predictive power of distinguishing knots or links is higher than by mere evaluation of single points.

Yet both experimental demonstrations include an evaluation of the Jones polynomial at a root of unity and thus implement a DQC1-complete quantum algorithm [84]. In Passante *et al*. [15], only links that contain disjoint circles were evaluated. As already mentioned, a much simpler quantum calculation using fewer qubits (here 2 qubits for a 2-strand braid representation) can calculate the Jones polynomials of the given links equally well. In contrast, the evaluations for the Figure-Eight knot and the Borromean Rings cannot do with fewer than 3 strands and 2 qubits as shown in Marx *et al*. [14].

Note that even moderately intricate molecular hardware with several qubits and realistic coupling topologies goes beyond pulse sequences as easy as in figure 4 for the two-qubit molecule chloroform. Already the four-carbon architecture of *trans*-crotonic acid used in Passante *et al*. [15] required the optimal control algorithm grape to be efficiently implemented experimentally. We therefore anticipate that control algorithms will play a major role even for algorithms inspired by topological quantum computation.

## 5. Applications in open systems

Controlling open systems is a particular challenge, because time-optimal controls need no longer be best adapted to cope with the specific dissipative process related to a given experimental implementation. As has been shown in more detail, the reason for this complication is rooted in the fact that in the controlled Lindblad master equation 5.1the generators of the dissipative part and the coherent part do not commute in the sense 5.2It is for the same reason that many control problems in open systems are beyond algebraic tractability. On the other hand, this paves the way to benefit from numerical optimal control.

In order to elucidate its power, consider the following example of a physical four-qubit system encoding two logical qubits: the starting point is the usual encoding of one logical qubit in Bell states of two physical ones
5.3The corresponding density operators simply take the form *ρ*^{±}:=|*ψ*^{±}〉〈*ψ*^{±}|. So four density-operator elements then span a Hermitian operator subspace
5.4that is protected against *T*_{2}-type relaxation. Clearly, an analogous subspace exists for the second logical qubit {|0〉_{CD},|1〉_{CD}} on the physical qubits *C*,*D*.

Henceforth, we use the shorthand for *μ*,*ν*∈{*x*,*y*,*z*,11}. So one obtains a fully controllable system over the protected subspace of two logical qubits realized by four physical qubits, where the drift Hamiltonian reads
5.5where the coupling constants are set to *J*_{xx}=2 Hz and *J*_{zz}=1 Hz. In the model system, the control Hamiltonians amount to the two independent (anti-phase) *z*-rotations
5.6

While for both qubit pairs (AB) and (CD) the density operators form a fully controllable pair of *T*_{2}-protected logical qubits, they are not protected against (the usually much weaker) *T*_{1}-relaxation mechanisms. Now the task of finding relaxation-optimized controls implementing the target cnot gate on the logical two qubits is highly non-trivial, because at the same time the system has to be decoupled from the Hamiltonian components of Heisenberg-type *H*_{XX} that otherwise would drive the protected subsystem into fast relaxing modes. In Schulte-Herbrüggen *et al*. [40], we have shown that opengrape produces control sequences that are some 30 times faster than Trotter-based paper-and-pen decompositions. Moreover, the controls found numerically approximate the target cnot with a fidelity of greater than or equal to 95 per cent, as shown in figures 6 and 7, while the paper-and-pen solutions would only work in the absence of *T*_{1} processes: already *T*_{1} relaxation as small as 1/170 of the *T*_{2} process suffices to limit the fidelity of the paper-and-pen version to less than 15 per cent in this example as shown in Schulte-Herbrüggen *et al*. [40].

In another instance, time-optimal control for a spin- particle in a dissipative environment has been addressed in [85,86]. This system provides an illustrative example to show the role of singular extremals in the control of quantum systems. A simple case where the control law is explicitly determined is analysed and its optimal controls have been experimentally implemented in nuclear magnetic resonance. To our knowledge, this has been the first experimental demonstration of singular extremals in quantum systems with bounded control amplitudes.

Also for non-Markovian settings, relaxation-optimized control can be put to good use. We [55] showed that a working qubit dissipatively interacts with a two-level fluctuator in a *non*-Markovian way, where, however, the fluctuator itself interacts with a surrounding Bosonic bath in a Markovian way. To this end, one extends the qubit to a qubit-plus-fluctuator system, which by construction dissipates in a Markovian way so that it can be readily treated as just described already. For the task of implementing a *z*-gate in such a model system, the opengrape controls outperform conventional Rabi-based pulses by cutting the residual error (i.e. 1−fidelity) by about one order of magnitude, even if constraints such as smooth pulses have to be respected for experimental reasons [55]. Actually, the same holds on a very general scale: any non-Markovian system that can be embedded into system-plus-shell leaving only Markovian relaxation processes with the remaining bath can be tackled likewise as long as the enlarged system-plus-shell is of tractable dimensionality as explained in detail in [40]. This idea has found further recent application in a number of standard gates [87] thus underpinning the guidelines of table 3 drawn from [40].

## 6. Conclusions

We have discussed control aspects of quantum computation in a universal frame also underlying the unified programming platform dynamo [65]. It serves to provide concrete experimental controls for quantum computational gate synthesis or spectroscopic state transfer in general finite-dimensional control systems. The toolbox comprises the fastest among the currently known algorithms and owing to its modular structure it will be easy to keep it state-of-the-art.

Quantum gate synthesis or state transfer can thus be achieved with optimized fidelities for the experimental settings given, no matter whether the implementation is meant to be via pure states or not. In a previous review [69], we have treated experimental aspects of implementing pure and pseudo-pure states in ensemble spectroscopy. Here, we have pointed out an ensemble implementation of the quantum algorithm DQC1. By characterizing invariants of braid groups, it provides a bridge to topological quantum computation.

While in spin systems optimal control methods are well established (as has become obvious by several other contributions in this issue; see also the review in Nielsen *et al*. [88]), here we have focused on wider applicability by examples from Josephson elements and cavity grids, and further implementations in ion traps and nitrogen vacancy centres of diamonds are in progress. Most often standard decompositions into local gates plus cnot gates are far less robust and less efficient than the assembly of effective multi-qubit gates compiled via optimal control. So on a very general scale, quantum optimal control can contribute a lot to exploit *error-avoidance*, thus leaving only the experimentally inevitable errors to be treated by costly *error correction* schemes. Therefore, we anticipate that the control methods presented will be widely used in many further implementations of quantum simulation and quantum information processing including topological quantum computation. To this end, the dynamo package will be updated by the latest developments. This includes most recent Newton–Raphson schemes [89], filtering techniques for fast-modulating Hamiltonians [90] as well as extending the controls from coherent to encompass incoherent degrees of freedom [91]. The latter will pave the way to new classes of applications.

## Acknowledgements

This work was supported in part by the EU programmes QAP, Q-ESSENCE, and the exchange with COQUIT, and by the Bavarian excellence network ENB via the International Doctorate Programme of Excellence *Quantum Computing, Control, and Communication* (QCCC) as well as by the Deutsche Forschungsgemeinschaft (DFG) in the collaborative research centre SFB 631 as well as the international research group supported via the grant SCHU 1374/2-1. A.F. thanks NIH GM47467. Pictures for knots and links were created with KnotPlot (http://knotplot.com/).

## Footnotes

One contribution of 14 to a Theme Issue ‘Quantum information processing in NMR: theory and experiment’.

↵1 As the number of strands in the braid representation of a knot determines the number of qubits needed to evaluate the Jones polynomial, avoid evaluating links which contain circles

*disjoint*from the rest of the link: then an easier quantum calculation can evaluate the Jones polynomial of the knot without disjoint circles. Finally, add*n*circles to the knot and multiply the Jones polynomial evaluated by (−*A*^{2}−*A*^{−2})^{n}.↵2 As the polarization in NMR ensembles is very low, a semiclassical description applies, in which phase sensitive detection (of −1-quantum coherences) is standard [83] without being in conflict with the non-commuting observables {

*σ*_{x},*σ*_{y}}.

- This journal is © 2012 The Royal Society