--- abstract: 'We present a systematic, perturbative method for correcting quantum gates to suppress errors that take the target system out of a chosen subspace. It addresses the generic problem of non-adiabatic errors in adiabatic evolution and state preparation, as well as general leakage errors due to spurious couplings to undesirable states. The method is based on the Magnus expansion: by correcting control pulses, we modify the Magnus expansion of an initially-given, imperfect unitary in such a way that the desired evolution is obtained. Applications to adiabatic quantum state transfer, superconducting qubits and generalized Landau-Zener problems are discussed.' author: - Hugo Ribeiro - Alexandre Baksic - 'Aashish A. Clerk' title: 'Systematic Magnus-based approach for suppressing leakage and non-adiabatic errors in quantum dynamics' --- Introduction {#sec:intro} ============ The problem of leakage errors, where a quantum gate is corrupted by populating spurious states, is generic to a variety of situations in quantum information processing. The most prominent example is the problem of high-fidelity qubit gates. Most physical implementations of qubits are multi-level systems, with two levels chosen to encode the logical states of the qubit. As a result, control sequences designed to implement a given unitary evolution can give rise to transitions out of the logical subspace (see, e.g. @chen2016). Such "leakage errors" generically become more prominent as gates are made faster, due to the increased bandwidth of control pulses (and consequent enhanced spectral weight at the frequencies of unwanted transitions). Yet another generic example of leakage errors comes from protocols utilizing adiabatic evolution, where e.g. one attempts to have a system remain in the instantaneous ground state of some time dependent Hamiltonian. The leakage errors here occur for any non-zero protocol speed, and take the form of non-adiabatic transitions between instantaneous eigenstates. Given their ubiquity, there is great interest in devising methods for suppressing leakage errors. While one could use the machinery of optimal quantum control @khaneja2005, analytic approaches which yield simple, smooth and robust control pulses are also desirable. Many approaches have been put forth in the context of specific problems. For superconducting circuits, perhaps the best known is the DRAG technique (Derivative Removal by Adiabatic Gate) @motzoi2009 [@gambetta2011], which was designed to minimize leakage errors for single qubit gates in a weakly anharmonic qubit. DRAG has also been employed to improve the fidelity of a Rydberg-blockade two-qubit entangling gate @theis2016. A technique for minimizing leakage errors in two-qubit gates in circuit QED has also been formulated @economou2015. Turning to leakage errors in adiabatic-evolution protocols, a general strategy here are the so-called "shortcuts to adiabaticity" (STA) techniques @demirplak2003 [@demirplak2008; @berry2009; @ibanez2012; @chen2012; @torrontegui2013; @baksic2016], which provide methods for improving pulse sequences. A recent technique based on a "quantum geometric" interpretation of adiabatic evolution has also been put forward @tomka2016. In this work we present an extremely general strategy for mitigating leakage errors. In certain limits, it captures aspects of both DRAG and STA approaches, but is also able to deal with situations where these methods fail or become impossible to implement. ![(Color online). Schematic representation of the Magnus-based algorithm. (a) Before applying the algorithm, the ideal evolution is corrupted by the spurious coupling, which prevents to reach the target state ${|\psi_{\mathrm{f}}\rangle}$. (b) After the first step of the Magnus-based algorithm, "pure" leakage errors are cancelled on average by the control Hamiltonian $\hW_1 (t)$. Although the system ends in $\mathcal{H}_{{\mathrm{comp}}}$ at $t_{\mathrm{f}}$, the target state ${|\psi_{\mathrm{f}}\rangle}$ is not reached. (c) The second step of the Magnus-based algorithm corrects induced phase errors within $\mathcal{H}_{{\mathrm{comp}}}$ with the help of the control Hamiltonian $\hW_2 (t)$.<span data-label="fig:idea"></span>](fig01){width="\columnwidth"} The underlying idea is sketched schematically in Fig. \[fig:idea\]. We start with a control sequence that would perfectly implement some desired quantum gate if there were no leakage levels. This evolution is however corrupted by coupling to spurious leakage levels \[Fig. \[fig:idea\] (a)\]. Our goal is to gently modify the control sequence to mitigate the errors. We do this in two steps. First, we design a control correction \[described by a Hamiltonian $\hW_1(t)$\] that cancels the effects of pure leakage to leading order. With this correction, the population of leakage levels at the final time is highly suppressed. The dominant remaining error is then a "phase" error: despite residing in the computational subspace, the final state may still deviate from the target state \[Fig. \[fig:idea\] (b)\]. Our second order control correction \[described by $\hW_2(t)$\] corrects for these errors \[Fig. \[fig:idea\] (c)\]. We stress that the goal is not to suppress leakage errors at all times, but rather to have them effectively cancel out <span>*on average.*</span> The general philosophy sketched above is in many ways similar to that of both DRAG and STA (see, e.g., Refs. @motzoi2009 [@baksic2016]). However, our means of implementing it is quite different. We use the Magnus expansion @magnus1954 [@blanes2009] to systematically improve control pulses and implement our strategy of cancelling leakage on average. As we show in detail, this allows us to treat a more general class of problems. In particular, we are able to correct leakage errors in cases where the DRAG approach fails due to the closing of a spectral gap. Also, in comparison to STA techniques, we can apply our methodology in a perturbative fashion, allowing us to treat complex systems where the exact diagonalization usually employed in STA (e.g. to find counterdiabatic driving fields @demirplak2003 [@demirplak2008; @berry2009; @ibanez2012; @chen2012; @baksic2016]) is impractical. Recently a numerical variational approach has been put forward to circumvent the need of exact diagonalization @sels2016. The general idea of using the Magnus expansion to find optimized control sequences is of course not new, with the earliest work addressing the specific problem of achieving population inversion in nuclear magnetic resonance @tycko1983. Most Magnus-based approaches for improved controls rely on simply using the first term of the expansion, and viewing this as a Fourier transform integral; one then corrects pulses to suppress spectral weight associated with unwanted leakage transitions @warren1984 [@schutjens2013]. Similar approaches based on Fourier analysis have been explored in the context of specific problems in Refs. @hansel2001 and @martinis2014. As we discuss, our Magnus approach is significantly different from these strategies: it does not rely on an analogy to a Fourier transform (allowing us to treat more general problems), and is not restricted to simply looking at the first order term in the Magnus expansion. The remainder of this paper is organized as follows: in Sec. \[sec:generalproblem\] we define the general "leakage problem" in the context of a quantum gate generated by a Hamiltonian with time-dependent control fields. In Sec. \[sec:magnussol\], we show how to systematically correct the control fields using the Magnus expansion so as to mitigate leakage errors. Finally, in Sec. \[sec:applications\], we consider a few illustrative and relevant applications of the method: suppression of non-adiabatic errors in stimulated Raman adiabatic passage (STIRAP) in a lambda-system, suppression of leakage in gates for superconducting qubits, and suppression of leakage in the multiple-crossings Landau-Zener model. Our choice of examples in Sec. \[sec:applications\] has been made to clearly contrast the Magnus-based approach against DRAG and STA techniques. The relatively simple problem of STIRAP demonstrates how the Magnus approach lets one perturbatively capture the leading effect of the STA technique; it also illustrates how DRAG fails when confronted with the closing of a spectral gap. Re-visiting the problem of leakage errors in superconducting qubits (for which DRAG was developed) helps one interpret the recent experimental result of Chen *et al.* @chen2016. This work demonstrated that optimizing the overall amplitudes of the DRAG controls (away from the theoretically-predicted optimal values) helps further reduce gate errors; our Magnus-based approach provides a natural way for understanding why this is the case. Finally, the multiple-crossings Landau-Zener model demonstrates how the Magnus approach can correct a complex adiabatic evolution problem for which STA techniques cannot be implemented. Statement of the general leakage error problem {#sec:generalproblem} ============================================== We consider a quantum system with a Hilbert space $\mathcal{H}$, having a subspace $\HHcomp$ that contains the useful computational states of the system. The goal is to implement some specified unitary gate $\hU_{\mathrm{G}}$ taking $\HHcomp \rightarrow \HHcomp$. The basic problem is that the time-dependent controls used to generate this evolution will invariably couple states inside $\HHcomp$ to those outside of it, leading to leakage and an imperfect implementation of the quantum gate. For concreteness, we consider a basis $\{ {|n\rangle}, 1 \leq n \leq N \}$, where the first $Q$ levels form the computational subspace (e.g. the coupled states of a qubit encoded in ${|0\rangle}$ and ${|1\rangle}$), and the remaining $N-Q$ levels are "leakage" levels. The generic time-dependent Hamiltonian will have the form $$\begin{aligned} \hH(t) &= \hH_0 (t) + \epsilon \hV(t) \\ \hH_0 (t) & = \hH_{Q}(t) + \sum_{n=Q+1}^N E_n(t) {{|n\rangle}\!{\langle n|}}. \end{aligned} \label{eq:Hgen}$$ $\hH_{Q}(t)$ represents the desired control of the computational levels, and only has non-zero matrix elements between these levels. $\hV(t)$ describes both the spurious couplings that are generated between computational levels and leakage levels (e.g. for a qubit, the coupling between ${|0\rangle}$ or ${|1\rangle}$ with any other excited state ${|n\rangle}$, $n\geq2$) and couplings between leakage states [^1]. We include the dimensionless parameter $\pp$ here for convenience; it will let us track powers of $\hV(t)$ in what follows. Solving the Schrödinger equation defined by Eq. leads to the unitary time evolution operator $$\hU(t) = \hU_0 (t) \hU_{\mathrm{I}}(t). \label{eq:Ugen}$$ Here, $\hU_0(t)$ describes the desired evolution generated by $\hH_0 (t)$, $$\hU_0 (t)=\hT \exp\left[-i \int_0^t {\mathrm{d}}t_1 \hH_0 (t_1)\right], \label{eq:U0}$$ with $\hT$ the time-ordering operator. For simplicity and without loss of generality, we have chosen to set $t_{\mathrm{i}}= 0$. In contrast, imperfections due to leakage are described by $\hU_{\mathrm{I}}(t)$, which is defined as $$\hU_{\mathrm{I}}(t) = \hT\exp\left[-i \epsilon \int_0^t {\mathrm{d}}t_1 \hV_{\mathrm{I}}(t_1) \right]. \label{eq:UI}$$ Symbol Meaning Equation ----------------------- ---------------------------------------------------------------------------------- ---------- $\hV (t)$ error Hamiltonian Eq. $\hO_{\mathrm{I}}(t)$ operator in the interaction picture generated by $\hH_0(t)$ Eq. $\hW_j (t)$ Hamiltonian describing $j$th-order correction to control the fields Eq. $\hV^{(j)} (t) $ modified error Hamiltonian (includes first $j$ control Hamiltonians $\hW_j (t)$) Eq. $\hOmega^{(j)} (t)$ modified "Magnus operator" associated to $\hV_{\mathrm{I}}^{(j)} (t)$ Eq. $\hOmega^{(j)}_k (t)$ $k$th term of the modified Magnus expansion Eq. Here and throughout, we denote the interaction picture representation of a Schrödinger operator $\hO(t)$ by $\hO_{\mathrm{I}}(t)$: $$\hO_{\mathrm{I}}(t) = \hU_0^\dag (t) \hO(t) \hU_0(t) = \ell_0 (t) \hO(t). \label{eq:SuperOpL}$$ The last inequality defines the superoperator $\ell_0(t)$. Note that this interaction picture is in general easy to find: one only needs to fully understand the desired dynamics in the computational subspace, as the evolution of the leakage subspace is trivial under $\hH_0(t)$[^2]. We also emphasize that the interaction picture defined in Eq. is different than the one used to derive DRAG @motzoi2009 [@gambetta2011]. Our interaction picture is defined by the full unitary evolution generated by the ideal Hamiltonian. As a consequence, our approach treats only the "spurious" couplings as a perturbation (and not the desired couplings between computational levels). We assume that the various time-dependent fields have been chosen such that if there were no leakage, the evolution described by $\hU_0 (t)$ at $t = t_{\mathrm{f}}$ corresponds to some desired unitary gate $\hU_{\mathrm{G}}$ in the computational subspace. Formally, in the case where there was no coupling to the leakage subspace, we would have: $$\hP_Q \hU_{\mathrm{I}}(t) \hP_Q = \mathbbm{1}_Q,$$ and achieving the desired gate would require $$\hP_Q \hU(t_{\mathrm{f}}) \hP_Q = \hP_Q \hU_0(t_{\mathrm{f}}) \hP_Q = \hU_{\mathrm{G}}. \label{eq:PerfectGate}$$ We have introduced here the projection operator onto the computational subspace, $\hP_Q$, and unit operator in this subspace $\mathbbm{1}_Q$. Including the effects of non-zero leakage, the ideal gate will be corrupted, and states initially in the computational subspace will evolve to states outside of it \[see Fig. \[fig:idea\] (a)\]. To mitigate the effects of leakage, one could try to somehow suppress the relevant off-diagonal elements of $\hV(t)$ at all times during the protocol. This is however an overkill: to achieve Eq. (and hence a perfect evolution), we only need the net effect of leakage transitions to <span>*average away*</span> at the final time. This implies that the final time "error propagator" $\hU_{{\mathrm{err}}} = \hU_{\mathrm{I}}(t_{\mathrm{f}})$ should essentially act as the unit operator on computational states, i.e. $$\hP_Q \hU_{\mathrm{I}}(t_{\mathrm{f}}) \hP_Q = \mathbbm{1}_Q, \label{eq:condUI}$$ The question then becomes how this cancellation can be achieved by modifying the available control fields, while still having $\hU_0(t_{\mathrm{f}})$ generate the desired unitary in the computational subspace. The modification of the control fields changes $\hH(t)$: this change is described by a "correction Hamiltonian" $\hW(t)$, defined via $$\hH (t) \to \hH (t) + \hW (t). \label{eq:Hctrl}$$ We want the combined effect of the correction Hamiltonian $\hW (t)$ and the leakage Hamiltonian $\hV(t)$ to average away at the final time. The introduction of $\hW(t)$ modifies the error propagator to be $$\begin{aligned} \hU_{{\mathrm{err,mod}}} &= \hT\exp\left\{-i \int_0^{t_{\mathrm{f}}} {\mathrm{d}}t_1 \left[\epsilon \hV_{\mathrm{I}}(t_1) + \hW_{\mathrm{I}}(t_1)\right]\right\}. \end{aligned} \label{eq:Uerrmod}$$ We thus need to chose $\hW(t)$ so that $$\hP_Q \hU_{{\mathrm{err,mod}}} \hP_Q = \mathbbm{1}_Q. \label{eq:defHctrl}$$ The basic strategy for dealing with leakage is to find (to some desired degree of accuracy) a method for fulfilling Eq. and thus cancelling on average the effects of leakage. If successful, the modified protocol will cause the system to depart from the computational subspace at intermediate times, but return to it at the final time to perform the desired gate \[see Fig. \[fig:idea\] (c)\]. Magnus approach for constructing corrected control Hamiltonains {#sec:magnussol} =============================================================== Basic approach {#sec:basicapproach} -------------- Finding a suitable $\hW(t)$ to fulfil Eq. remains a daunting problem. There is however a situation where the solution is straightforward. Suppose that the Hamiltonian $\hV_{\mathrm{I}}(t)$ commuted with itself all times, $[\hV_{\mathrm{I}}(t_1), \hV_{\mathrm{I}}(t_2)] = 0,\,\forall t_1,\,t_2$. In this case the time-ordering in Eq. plays no role, and leakage errors are completely suppressed whenever $\hW(t)$ satisfies $$\int_0^{t_{\mathrm{f}}} {\mathrm{d}}t_1 \epsilon \sq \hV_{\mathrm{I}}(t_1) = -\int_0^{t_{\mathrm{f}}} {\mathrm{d}}t_1 \hW_{\mathrm{I}}(t_1). \label{eq:Hctrlcom}$$ The superoperator $\sq$ simply nulls the part of an operator acting only in the leakage subspace; it is defined via $\sq \hO (t) = \hO (t) - \hP_{N-Q} \hO (t) \hP_{N-Q}$, with $\hP_{N-Q}$ the projector onto the leakage subspace. Eq. tells us that the time average of $\hW(t)$ needs to cancel the relevant parts of the time-averaged leakage operator $\hV_{\mathrm{I}}(t)$. While Eq. does not provide a solution to the more general (and standard) case where $\hV_{\mathrm{I}}(t)$ does not commute with itself at different times, it does provide a means of attack: we can perturbatively correct the solution for $\hW(t)$ given by Eq. to account for the non-commutativity of $\hV_{\mathrm{I}}(t)$, thus yielding a $\hW(t)$ that satisfies Eq. to a high degree of accuracy. We will construct $\hW(t)$ as a series, $$\hW (t) = \sum_{k=1}^{\infty} \hW_k (t). \label{eq:WSeries}$$ where the first term $\hW_1(t)$ satisfies Eq. and scales like $\pp$, while the $k$th term scales like $\pp^k$. As we show below, the well-known Magnus expansion @magnus1954 [@blanes2009] applied to the error propagator $\hU_{\mathrm{I}}(t)$ can be used to construct each term of the series defined in Eq. . We will show that keeping the first $k$ terms in this series allows one to cancel all leakage errors to order $\pp^k$. This is obviously beneficial in cases where the relevant matrix elements of the leakage operator $\hV_{\mathrm{I}}(t)$ are small, as a term $\propto \pp^k$ is necessarily proportional to $k$ powers of $\hV (t)$. This approach also affords advantages in cases where the matrix elements of $\hV_{\mathrm{I}}(t)$ are not necessarily small, but are rapidly oscillating. Consider $\hU_{{\mathrm{err}}}^{(j)}$, the modified error propagator in the presence of the first $j$ terms in the expansion of the correction Hamiltonian: $$\begin{aligned} \hV_{\mathrm{I}}^{(j)} (t) & = \epsilon \hV_{\mathrm{I}}(t) + \sum_{k=1}^j \hW_{k,{\mathrm{I}}} (t), \\ \hU_{{\mathrm{err}}}^{(j)} & = \hT\exp\left[-i \int_0^{t_{\mathrm{f}}} {\mathrm{d}}t_1 \hV_{\mathrm{I}}^{(j)} (t_1)\right] . \end{aligned} \label{eq:moderrprop}$$ The Magnus expansion expresses these time-ordered exponentials as the simple exponential of an operator, which is itself defined as an infinite series. Applying it to $\hU_{{\mathrm{err}}}^{(j)}$ yields: $$\begin{aligned} \hU_{{\mathrm{err}}}^{(j)} (t) & = \exp \left[ \hOmega^{(j)}(t) \right], \\ \hOmega^{(j)}(t) & = \sum_{k=1}^\infty \hOmega_k^{(j)} (t). \end{aligned} \label{eq:moderrpropMagnus}$$ The first terms of each series are given by (see, e.g. @magnus1954 [@blanes2009]) $$\begin{aligned} {\partial}_t \hOmega^{(j)}_1 (t) &= -i \hV^{(j)}_{\mathrm{I}}(t) ,\\ {\partial}_t \hOmega^{(j)}_2 (t) &= \frac{1}{2}\left[{\partial}_t \hOmega^{(j)}_1 (t), \hOmega^{(j)}_1 (t)\right],\\ {\partial}_t \hOmega^{(j)}_3 (t) &= \frac{1}{2}\left[{\partial}_t \hOmega^{(j)}_1 (t), \hOmega^{(j)}_2 (t)\right] - \frac{1}{6}\left[\hOmega_1^{(j)} (t), {\partial}_t \hOmega^{(j)}_2 (t)\right],\\ \ldots \end{aligned} \label{eq:magnus_series}$$ Further, the initial condition $\hU^{(j)}_{\mathrm{I}}(0) = \mathbbm{1}$ implies $\hOmega^{(j)}(0) = \mathbf{0}$. In what follows, we refer to $\hOmega^{(j)}(t)$ as the "Magnus operator" corresponding to the $j$th order corrected error propagator $\hU_{{\mathrm{err}}}^{(j)}$. Leaving the discussion of convergence to Appendix \[sec:magnus\_conv\], we first discuss how to use the above expansions to construct the correction Hamiltonian $\hW(t)$. Our general strategy is to pick the first $k$ terms in the series for $\hW(t)$ such that we suppress terms up to order $\pp^k$ in the corresponding error propagator $\hU_{{\mathrm{err}}}^{(k)}$. This is equivalent to requiring that at each order, we chose $\hW_k(t)$ so that the Magnus operators satisfy $$\sq \hOmega^{(j)}(t_{\mathrm{f}}) \overset{!}{=} \mathcal{O}[\pp^{j+1}] \, \, \, \forall j \leq k. \label{eq:OmegakCondition}$$ ![(Color online). Flowchart illustrating the first few steps of the Magnus-based algorithm.<span data-label="fig:flowchart"></span>](fig02){width="0.7\columnwidth"} Constructing the first order correction to the control Hamiltonian {#sec:W1} ------------------------------------------------------------------ We start with the first order term in the correction Hamiltonian $\hW_1(t)$. To cancel error terms that are order $\pp$, we require $$\sq \hOmega_1^{(1)} (t_{\mathrm{f}}) = \mathbf{0}, \label{eq:Hk_choice}$$ i.e. the first order term in the Magnus expansion of the modified error propagator should vanish. From Eq. , this implies that $\hW_1 (t)$ should satisfy Eq. , i.e. $$\int_0^{t_{\mathrm{f}}} {\mathrm{d}}t_1 \pp \sq \hV_{\mathrm{I}}(t_1) = -\int_0^{t_{\mathrm{f}}} {\mathrm{d}}t_1 \hW_{1,{\mathrm{I}}} (t_1), \label{eq:Hctrl1gen}$$ Note that with this choice $\hW_{1}(t)$ is $\mathcal{O}[\pp]$, and all remaining terms in the Magnus series for $\sq \hOmega^{(1)}(t_{{\mathrm{f}}})$ are order $\mathcal{O}[\pp^2]$ or higher. These additional terms also vanish completely in the simple case where $\hV_{\mathrm{I}}(t)$ commutes with itself at all times. There are of course many possible choices of $\hW_1 (t)$ that will satisfy Eq. ; while in principle all such choices are equally as good, in practice not all will be attainable given the typically limited set of control fields that can be experimentally implemented. Depending on the particular problem, one now has two general choices: - One can attempt to find a $\hW_1 (t)$ that <span>*exactly*</span> satisfies Eq. . As we show in Appendix \[sec:fid\], this implies that the state-averaged fidelity error scales as $\pp^4$ (as opposed to $\pp^2$ with no correction). - Alternatively, for more complex problems (or where the form of possible control Hamiltonians is tightly constrained) one can attempt to satisfy Eq. . This does not change the power with which the fidelity error scales with $\pp$, but can significantly modify the prefactor of the leading $\pp^2$ term. As we show in the Sec. \[sec:applications\] with specific examples, this can still give significant benefits. This more approximate approach is discussed in more detail in Sec. \[sec:imperfectctrls\]. In Fig. \[fig:flowchart\], we depict a flowchart illustrating the first few steps of the Magnus-based algorithm. We outline below two general methods for obtaining first order control corrections $\hW_1(t)$ that exactly satisfy Eq. . ### Derivative-based control {#sec:W1dt} One general method for obtaining a $\hW_1(t)$ satisfying Eq. is to use the fact that in most physically relevant situations, the time dependence in $\hV(t)$ arises from an external control that is switched on at $t=0$ and off at $t=t_{{\mathrm{f}}}$, and hence one often has $\hV(0) = \hV(t_{\mathrm{f}})= \mathbf{0}$. If this is the case we can always pick $\hW_{1} (t)$ so that the integrand in the first order Magnus term $\sq \hOmega^{(1)}_1(t)$ is a total derivative, ensuring it vanishes. To see this explicitly, we first define the superoperator $$\EuScript{L}_0 (t) = \int_0^t {\mathrm{d}}t_1 \ell_0(t_1), \label{eq:L0}$$ where the superoperator $\ell_0(t)$ is defined in Eq. . We then choose $$\hW_{1} (t) = \pp \ell_0^\dag (t) \EuScript{L}_0 (t) {\partial}_t \sq \hV(t). \label{eq:Hctrl1}$$ This yields $$\begin{aligned} \sq \hOmega_1^{(1)} (t_{\mathrm{f}}) &= -i \pp \int_0^{t_{\mathrm{f}}} {\mathrm{d}}t_1 \ell_0(t_1) \times \\ &\phantom{={}} \left[\sq \hV (t_1) + \ell_0^\dag (t_1) \EuScript{L}_0 (t_1) {\partial}_{t_1} \sq \hV (t_1)\right]\\ &= -i \pp \int_0^{t_{\mathrm{f}}} {\mathrm{d}}t_1 {\partial}_{t_1} \left[\EuScript{L}_0 (t_1) \sq \hV (t_1)\right]\\ &= -i \pp \left[\EuScript{L}_0 (t_{\mathrm{f}}) \sq \hV(t_{\mathrm{f}}) - \EuScript{L}_0 (0) \sq \hV(0)\right] = \mathbf{0}. \end{aligned} \label{eq:Omega1}$$ Although the form for the correction in Eq. may seem opaque, we will show in later sections that it can be explicitly found and implemented in a number of relevant problems. This solution also provides a good starting point when looking for controls that are constrained by the physical system into consideration. We refer to Eq. as the *derivative-based control*. The control defined in Eq. has a striking similarity with DRAG since it involves the time-derivative of $\hV (t)$. A crucial difference is that ${\partial}_t \hV (t)$ is multiplied by the superoperator $\ell_0^\dag (t)\EuScript{L}_0 (t)$, which ensures that $\hW_1 (t)$ is a well-behaved function of time. This is in contrast to DRAG where the control Hamiltonians may become unphysical if the unperturbed Hamiltonian is time-dependent. We give a simple example of this in Sec. \[sec:STIRAPintro\], for a problem of adiabatic state transfer where the adiabatic gap is time-dependent. ### Generating function approach {#sec:genfct} Another extremely general method is to <span>*first*</span> pick an operator-valued function $\hR (t)$ that satisfies $\hR (t_f) = \mathbf{0}$. We then can select $\hW_1(t)$ to make the leading-order Magnus term $\hOmega_1^{(1)} (t) = \hR (t)$. By definition, Eq. is then satisfied as required. Using Eq. , the required $\hW_1(t)$ is then found to be: $$\begin{aligned} \hW_1 (t) &= i \ell_0^\dag (t) {\partial}_t \sq \hR (t) - \epsilon \sq \hV (t)\\ &= i \ell_0^\dag (t) {\partial}_t \sq \hOmega_1^{(1)} (t) - \epsilon \sq \hV (t). \end{aligned} \label{eq:Hctrl1Mag1}$$ If one can find a class of functions $\hR (t)$ (depending say on a finite number of parameters), this then yields a family of possible first order control corrections $\hW_1(t)$. Note that since $\hOmega_1^{(1)} (t)$ is $\mathcal{O}(\epsilon)$, we have that $\hW_1 (t)$ is $\mathcal{O}(\epsilon)$. Higher-order corrections to the control Hamiltonian {#subsec:HigherOrder} --------------------------------------------------- We now show how to find higher-order control corrections $\hW_{k}(t)$ and in particular the second order control $\hW_2 (t)$. As for the first order correction, one has considerable freedom in picking the form of the higher-order controls. This directly follows from Eq. which only requires the Magnus operators to only vanish at $t_{\mathrm{f}}$. Consider first $\hW_{2}(t)$, which suppresses errors at order $\pp^2$. The procedure is completely analogous to how we chose $\hW_1(t)$: we pick $\hW_{2}(t)$ so that all non-zero terms in $\sq \hOmega^{(2)}(t_{{\mathrm{f}}})$ are at least order $\mathcal{O}[\pp^3]$. As we show explicitly in Appendix \[sec:cancellations\], the needed correction has to fulfill $$-i \int_0^{t_{\mathrm{f}}} {\mathrm{d}}t_1 \hW_{2,{\mathrm{I}}} (t_1) = - \sq \left[\hOmega_2^{(1)}(t_{\mathrm{f}}) - \hOmega_2^{(1)}(0)\right], \label{eq:Hctrl2avg}$$ where $\hOmega_2^{(1)}(t)$ is obtained from Eq. . We stress that $\hW_2 (t) = \ell_0^\dag (t) \hW_{2,{\mathrm{I}}} (t)$ is $\mathcal{O}[\pp^2]$ since $\hOmega_2^{(1)} (t)$ is $\mathcal{O}[\pp^2]$. The superoperator $\ell_0(t)$ is defined in Eq. . There is a particular choice of $\hW_2 (t)$ that automatically fulfills Eq. . By taking the time-derivate (with respect to $t_{\mathrm{f}}$) on both sides of Eq. , we find $$\hW_2 (t) = -i \ell_0^\dag (t) {\partial}_t \sq \hOmega_2^{(1)} (t). \label{eq:Hctrl2}$$ This choice for $\hW_2 (t)$ is very convenient as it is fully determined by the form of the leakage operator and $\hW_{1}(t)$. In particular, Eq. implies $\sq \hOmega^{(2)} (t) = \sq \hOmega_1^{(1)} (t) + \mathcal{O}[\pp^3]$. As we have explicitly ensured that $\sq \hOmega_1^{(1)} (t_{{\mathrm{f}}}) = \mathbf{0}$, this immediately implies that Eq. is satisfied as desired. The recipe for constructing $\hW_k (t)\,\forall k\geq 2$ is the same as the strategy for $k=2$: we can always choose $\hW_k (t)$ such that $\sq \hOmega^{(k)} (t) = \sq \hOmega_1^{(1)} (t) + \mathcal{O}[\pp^{k+1}]$, which in turn implies that Eq. is satisfied. While in most of the examples found in Sec. \[sec:applications\] we use Eq. to find the second order control Hamiltonian, we illustrate the use of Eq. in Sec. \[sec:ocs\]. Heuristic interpretation of the controls {#sec:interpretation} ---------------------------------------- As stated above, keeping only the first two terms in the series for $\hW(t)$ will be sufficient to enhance the fidelity; it is thus useful to have a physical picture for these corrections. The first order Magnus expansion of the uncorrected leakage operator, $\hOmega_1^{(0)}$ \[see Eq. \], represents a time-integrated effective matrix element for transitions out of the computational subspace $\HHcomp$; the correction $\hW_1(t)$ thus describes an added control that cancels direct leakage errors \[up to corrections due to the non-commutativity of $\hV(t)$\]. In contrast, we can understand ${\partial}_t \hOmega_2^{(1)} (t)$ as the operator that describes the state of the system when the corrected leakage operator $\hV_{\mathrm{I}}^{(1)} (t)$ has acted twice upon it. By writing $\hV_{\mathrm{I}}^{(1)} (t) = \sq V_{\mathrm{I}}^{(1)} (t) + \hP_{N-Q} V_{\mathrm{I}}^{(1)} (t) \hP_{N-Q}$, we can identify two sources of error: 1. $[\sq \hV_{\mathrm{I}}^{(1)} (t)]^2$ is an operator that acts only within $\HHcomp$, but where excursions to the leakage subspace at intermediate times nonetheless yield errors. We refer to the latter as "phase errors". 2. $\{\sq \hV_{\mathrm{I}}^{(1)} (t), \hP_{N-Q} V_{\mathrm{I}}^{(1)} (t) \hP_{N-Q}\}_+$ is an operator that induces leakage out of $\HHcomp$ at order $\epsilon^2$. We use $\{\hO_1,\hO_2\}_+$ to denote the anti-commutator between two operators. Thus, the second order correction $\hW_2 (t)$ describes a control Hamiltonian that corrects both the phase evolution of states belonging to $\HHcomp$ and cancels leakage errors that scale like $\mathcal{O}(\epsilon^2)$. In Figs. \[fig:idea\] (b) and (c), we have depicted the dynamics of the system in the presence of $\hW (t) = \hW_1 (t)$ and $\hW (t) = \hW_1 (t) + \hW_2 (t)$, respectively. Imperfect realizations of controls {#sec:imperfectctrls} ---------------------------------- While the Magnus approach allows one to easily find control corrections for a given problem, in many cases these corrections will require control fields that are not realizable given experimental limitations. In the following, we show that by properly implementing an optimized version of the truncated control corrections (only using experimentally accessible fields), one can still obtain significant error suppression. This statement can be quantified. If one could perfectly implement a first order Magnus correction $\hW_1(t)$, the error in the state-averaged fidelity $\bar{F}$ scales like $\epsilon^4$ (see Appendix \[sec:fid\]). In the case where $\hW_1(t)$ cannot be implemented exactly, but instead an optimized, truncated form is used, the fidelity behaves like $\bar{F} = 1 - a\epsilon^2 + \mathcal{O}(\epsilon^4)$. While the optimization cannot eliminate the $\epsilon^2$ term completely, it can make the prefactor $a \ll 1$. We consider the general situation where one has derived an ideal first order Magnus correction $\hW_1(t)$ \[i.e. satisfying Eq. \], but where not all of the terms in this control Hamiltonian can be experimentally achieved. We thus write the ideal control as $$\hW_1 (t) = \hW_1^{{\mathrm{ctrl}}} (t) + \hW_1^{{\mathrm{err}}} (t), \label{eq:partialHctrl1}$$ where $\hW_1^{{\mathrm{ctrl}}} (t)$ and $\hW_1^{{\mathrm{err}}} (t)$ are, respectively, the experimentally-implementable and unimplementable parts of $\hW_1(t)$. We discuss various truncation-plus-optimization schemes in what follows. ### Simple truncation {#sec:imperfectctrls_spr} The simplest strategy would be to simply truncate $\hW_1(t)$ and only implement its experimentally-attainable part $\hW_1^{{\mathrm{ctrl}}} (t)$. In this case, one no longer completely cancels the first order term in the Magnus expansion of the error propagator. The error at $t_{\mathrm{f}}$ is fully determined by the Magnus expansion of $\epsilon \sq \hV_{\mathrm{I}}(t) + \hW_{1,{\mathrm{I}}}^{{\mathrm{ctrl}}} (t)$, which we denote $\hXi^{(1)} (t)$. We have $$\begin{aligned} \sq \hXi_1^{(1)} (t_{\mathrm{f}}) &= -i \int_0^{t_{\mathrm{f}}} {\mathrm{d}}t_1 \left[\epsilon \sq \hV_{\mathrm{I}}(t_1) + \hW_{1,{\mathrm{I}}}^{{\mathrm{ctrl}}} (t_1)\right]\\ &= i \int_0^{t_{\mathrm{f}}} {\mathrm{d}}t_1 \hW_{1,{\mathrm{I}}}^{{\mathrm{err}}} (t_1), \end{aligned} \label{eq:errpartialHctrl1}$$ which follows from Eqs. and . The naive truncation can be sufficient if one is almost able to implement all of the ideal correction $\hW_1(t)$. This is equivalent to requiring $$\int_0^{t_{\mathrm{f}}} {\mathrm{d}}t_1 {\left\lVert\hW_{1,{\mathrm{I}}}^{{\mathrm{err}}} (t_1)\right\rVert}_2 \ll \int_0^{t_{\mathrm{f}}} {\mathrm{d}}t_1 \epsilon {\left\lVert\hV_{{\mathrm{I}}}(t_1)\right\rVert}_2,$$ i.e. the error associated to the modified leakage operator $\hV_{\mathrm{I}}(t) + \hW_{1,{\mathrm{I}}}^{{\mathrm{ctrl}}} (t)$ is smaller than the error associated to $\hV_{\mathrm{I}}(t)$. ### Variational approach {#sec:imperfectctrls_var} The general goal of our first order correction is to make the time-average of $\epsilon \hV(t) + \hW_1(t)$ vanish. While the ideal correction $\hW_1(t)$ accomplishes this task by construction, simply truncating it causes the integral to no longer be zero, c.f. Eq. . A simple way to try and reduce the magnitude of this integral is to treat the overall amplitude $\alpha$ of the implementable part of $\hW_1(t)$ as a variational parameter, i.e. $\hW_1^{{\mathrm{ctrl}}} (t) \rightarrow \alpha \hW_1^{{\mathrm{ctrl}}} (t)$. One can then optimize the value of $\alpha$ to minimize the error integral: $$\begin{aligned} \sq \hXi_1^{(1)} (\alpha,t_{\mathrm{f}}) &= -i\int_0^{t_{\mathrm{f}}} {\mathrm{d}}t_1 \left[\epsilon \sq \hV_{\mathrm{I}}(t_1) + \alpha \hW_{1,{\mathrm{I}}}^{{\mathrm{ctrl}}} (t_1) \right]. \end{aligned} \label{eq:variationalHctrl1}$$ To do this optimization, one needs a suitable scalar measure of the size of this error integral. The relevant measure here is the state-averaged fidelity $\bar{F}$ @pedersen2007, which quantifies how much on average a non-zero $\sq \hXi_1^{(1)} (\alpha,t_{\mathrm{f}})$ causes the evolution under our gate to deviate from the ideal version. One finds $$\bar{F}(\alpha) = \frac{N + {\left|{\mathrm{Tr}}\left\{ \exp\left[\sq \hXi_1^{(1)} (\alpha, t_{\mathrm{f}})\right] \mathbbm{1}_N\right\}\right|}^2}{N(N+1)} \label{eq:avgFopt}$$ where $N$ is the dimension of the total Hilbert space. The variational approach then involves minimizing $\bar{F}(\alpha)$ with respect to $\alpha$. While this variational strategy respects the ideology of our approach, one could also optimize the state-averaged fidelity for the full error propagator $\hU_{{\mathrm{err}}}^{(1)}$. We give an explicit example of this variational approach in Sec. \[sec:gaussian\], in the context of a quantum state transfer protocol. Also, as discussed more in Sec. \[sec:drag\], our variational approach sheds insight into the recent work of Chen *et al.* @chen2016. This work discusses how an ad-hoc optimization of prefactors in standard DRAG-style pulse corrections could help suppress leakage-related errors in superconducting qubit gates; it can also be viewed as a version of our variational approach to dealing with missing controls. One could of course do a more sophisticated procedure by optimizing the implementable control fields at each time. However, the resulting complexity would defeat the purpose of the Magnus-based approach, and would be akin to that of optimal control techniques. In contrast to optimal control, maximizing $\bar{F}(\alpha)$ is not demanding numerically; nonetheless, it still leads to significant improvements as compared to the simple truncation strategy. ### Iterative approach {#sec:imperfectctrls_it} If $\hV (0) = \hV (t_{\mathrm{f}}) = \mathbf{0}$, an alternate approach to optimizing the truncated control Hamiltonian, is to first focus on the form of the unattainable controls $\hW_1^{{\mathrm{err}}}(t)$. As we care about the *time-integral* of this operator, it is possible in many cases (via suitable integration by parts) to turn parts of this operator into experimentally attainable controls. This is especially easy to implement if we have $${\partial}_t \hW_1^{{\mathrm{err}}} (t) = g_{{\mathrm{e}}} (t) \hW_1^{{\mathrm{err}}} (t) + g_{{\mathrm{c}}} (t) \hW_1^{{\mathrm{ctrl}}} (t)$$ for some functions $g_e(t)$ and $g_c(t)$. If the above condition is fulfilled, then the first order Magnus expansion of the error propagator (including the ideal first order control correction) can be written $$\begin{aligned} &\sq \hOmega_1^{(1)} (t) = -i \int_0^t {\mathrm{d}}t_1 \left[\epsilon \sq \hV_{\mathrm{I}}(t_1) + \hW_{1,{\mathrm{I}}}^{{\mathrm{ctlr}}} (t_1) + \hW_{1,{\mathrm{I}}}^{{\mathrm{err}}} (t_1)\right] \\ &= -i \int_0^t {\mathrm{d}}t_1 \left\{\epsilon \sq \hV_{\mathrm{I}}(t_1) + \hW_{1,{\mathrm{I}}}^{{\mathrm{ctlr}}} (t_1) + \left[{\partial}_{t_1} \sL_0 (t_1) \right] \hW_1^{{\mathrm{err}}} (t_1)\right\} \\ &= -i \int_0^t {\mathrm{d}}t_1 \left[\epsilon \sq \hV_{\mathrm{I}}(t_1) + \hW_{1,{\mathrm{I}}}^{{\mathrm{ctlr}}} (t_1)\right] -i\sL_0 (t) \hW_1^{{\mathrm{err}}} (t) \\ &\phantom{={}} + i \int_0^t {\mathrm{d}}t_1 \sL_0 (t_1) \left[ g_{{\mathrm{e}}} (t_1) \hW_1^{{\mathrm{err}}} (t_1) + g_{{\mathrm{c}}} (t_1) \hW_1^{{\mathrm{ctrl}}} (t_1)\right], \end{aligned} \label{eq:Xctrl1derivation}$$ where the superoperator $\sL_0(t)$ is defined in Eq. . In the last equality, we have performed an integration by parts, and used the fact that $\hW_1^{{\mathrm{err}}} (0) = \hW_1^{{\mathrm{err}}} (t_{\mathrm{f}}) = \mathbf{0}$ which is a consequence of having $\hV (0) = \hV (t_{\mathrm{f}}) = \mathbf{0}$. Equation suggests a natural modification of the control Hamiltonian: $\hW_1^{{\mathrm{ctrl}}} (t) \to \hW_1^{{\mathrm{ctrl}}} (t) + \hX_1^{{\mathrm{ctrl}}} (t)$ with $$\hX_1^{{\mathrm{ctrl}}} (t) = g_{{\mathrm{c}}} (t) \ell_0^\dag (t) \sL_0 (t)\hW_1^{{\mathrm{ctrl}}} (t). \label{eq:Xctrl1}$$ The error of the new control sequence is determined by $$\sq \hXi_1^{(1)} (t_{\mathrm{f}}) = -i \int_0^{t_{\mathrm{f}}} {\mathrm{d}}t_1 g_{{\mathrm{e}}} (t_1) \sL_0 (t_1) \hW_1^{{\mathrm{err}}} (t_1). \label{eq:errorit}$$ Generically, for sufficiently slow control protocols, we expect the size of the modified error integral in Eq. (as measured e.g. by the $p=2$ operator norm) to be smaller than what we would have with just a naive truncation, Eq. . This is directly due to the presence of $\sL_0 (t)$, which involves integrating the interaction-picture evolution operator. It thus roughly scales like the inverse of the energy gap separating computational and leakage levels. If this gap is large compared to the typical magnitude of $g_{\mathrm{e}}(t)$ (which scales like the inverse timescale of the derivative of the control pulse), our procedure will significantly reduce the error. Note that the above procedure represents just the simplest version of a whole hierarchy of control optimizations. Due to the presence of $\hW_1^{{\mathrm{err}}} (t)$ in the last line of Eq. , one can repeat the procedure iteratively (i.e. via additional integration by parts) to reduce the error even further. Each iterative steps generates a new control Hamiltonian $\hX_k^{{\mathrm{ctrl}}} (t)$ ($k\geq 2$). In Sec. \[sec:drag\], we give an explicit example of implementing this procedure, in the context of fighting leakage errors in a superconducting qubit gate. We show that the approach can yield advantages over standard DRAG corrections. ### Second- and higher-order control Hamiltonians {#sec:W2approx} The previous discussion provided several approaches for dealing with the common case where the ideal first order control-correction Hamiltonian cannot be realized using the available experimental controls. Our general strategy relies in "truncating" $\hW_1 (t)$ and subsequently in optimizing the truncated control Hamiltonian $\hW_1^{{\mathrm{ctrl}}} (t)$. As mentioned earlier, this procedure will lead to a state-averaged fidelity whose leading order correction is proportional to $\epsilon^2$. Even though one has not completely cancelled the $\epsilon^2$ term in the error, there is still in general utility to finding higher-order control correction Hamiltonians as one would do in the ideal case (c.f. Sec. \[subsec:HigherOrder\]). This is perhaps best understood physically, using the heuristic interpretation of the control corrections introduced in Sec. \[sec:interpretation\]. Recall that in that section, we discussed how the principal role of the first order control correction $\hW_1(t)$ is to cancel pure leakage errors (where the final state lies outside the computational subspace $\HHcomp$), while the second order correction $\hW_2(t)$ corrects phase errors (i.e. helps make sure that the portion of the final state in $\HHcomp$ has the correct form). In general, cancelling phase errors is useful even if one has not completely cancelled pure leakage errors by implementing the ideal first order correction $\hW_1(t)$. A further reason for attempting to implement the higher-order controls is that they are very easily obtained from the first order control (exactly like the ideal case). In particular, the second order control is given by Eq. with $\sq \hOmega_2^{(1)}(t)$ replaced by $\sq \hXi_2^{(1)} (t)$. We show the utility of this approach in the examples of suppressing non-adiabatic errors in STIRAP with a time-dependent gap (Sec. \[sec:gaussian\]) and correcting superconducting qubit gates (Sec. \[sec:drag\]). Applications {#sec:applications} ============ In this section, we apply our general method to a few concrete problems. These highlight the flexibility and utility of the method, and also allow one to understand better similarities and differences from existing methods such as STA and DRAG. Suppressing non-adiabatic errors in STIRAP quantum state transfer {#sec:STIRAPintro} ----------------------------------------------------------------- We start with the problem of adiabatic quantum state transfer. Consider a $\Lambda$-system with two degenerate ground states ${|1\rangle}$ and ${|3\rangle}$, and an excited state ${|2\rangle}$. We assume (as is standard) that states ${|1\rangle}$ and ${|3\rangle}$ can be controllably coupled to ${|2\rangle}$, but cannot be coupled directly to one another. The generic control Hamiltonian thus has the form: $$\hH (t) = G_{\mathrm{p}}(t) {{|1\rangle}\!{\langle 2|}}+ G_{\mathrm{s}}(t) {{|2\rangle}\!{\langle 3|}} + {\mathrm{H.c.}}, \label{eq:lambdasysH}$$ where $G_{\mathrm{p}}(t)$ and $G_{\mathrm{s}}(t)$ denote the pump and Stokes pulse amplitudes, respectively. Stimulated Raman adiabatic passage (STIRAP) @bergmann1998 [@vitanov2001; @vitanov2016] is a technique that allows one to perform adiabatic state transfer from ${|1\rangle}$ to ${|3\rangle}$ without ever occupying ${|2\rangle}$. Since the technique is based on adiabatic passage, it is intrinsically slow. There is thus interest in finding methods to speed up this approach. Here, we use our Magnus-based algorithm to find control corrections that speed up STIRAP while keeping a high-fidelity (and while respecting the constraint of no direct coupling between ${|1\rangle}$ and ${|3\rangle}$). Apart from its physical relevance to a variety of systems, the STIRAP problem is interesting because so-called "shortcuts to adiabaticity" (STA) methods @demirplak2008 [@ibanez2012; @torrontegui2013] can be used here to find control corrections allowing a perfect transfer fidelity @baksic2016. We will use these to benchmark the performance of the Magnus method to gain further insight into the underlying physics. We stress that for more complex problems (like that in Sec. \[sec:mclz\]), STA methods are essentially impossible to implement, whereas the Magnus approach remains workable and useful. The STIRAP problem is also interesting as it highlights how the Magnus method is able to surpass limitations of the standard DRAG technique for fighting leakage @gambetta2011. ### Correcting constant-gap pulses {#sec:STIRAPconstgap} We start by considering optimal pulses which keep the instantaneous gap between adiabatic eigenstates constant. Using the pulse shape studied extensively in @vasilev2009, the control pulses are written $$\begin{aligned} G_{\mathrm{p}}(t) & = G_0 \sin\left[\theta(t)\right], \\ G_{\mathrm{s}}(t) &= G_0 \cos\left[\theta(t)\right], \\ \theta(t) & = \frac{\pi}{2} \frac{1}{1 + \exp[-\nu t]} \end{aligned} \label{eq:pumpandstokes}$$ Here, $G_0$ is the maximal strength of the coupling and $1/\nu$ determines the characteristic timescale of the protocol. ![(Color online). (a) Fidelity error for STIRAP-style adiabatic state transfer in a $\Lambda$-system (c.f. Eq. (\[eq:lambdasysH\])), as a function of the adiabatic parameter $\nu/G_0$. Different curves correspond to different choices of control corrections: "uncorrected" control sequence defined in Eq. (black), first order Magnus corrected controls (green), second order Magnus corrected controls (blue), and the optimal second order Magnus corrected controls (red). (b) Modified pump pulse $G_{\mathrm{p}}(t)$ predicted by the second order Magnus algorithm as function of $t/t_{\mathrm{f}}$ for different values of $\nu/G_0$. As $\nu/G_0 \to 0$, the modified sequence converges to the original one. The Stokes pulse $G_{\mathrm{s}}(t)$ is the time-reversed of the pump pulse.<span data-label="fig:fidlambda"></span>](fig03){width="\columnwidth"} We next move to the adiabatic frame. The Hamiltonian takes the form $$\begin{aligned} \hH_{{\mathrm{ad}}} (t) &=\hS^\dag (t) \hH (t) \hS (t) - i \hS^\dag (t) {\partial}_t \hS (t) \\ &=G_0 \left({{|{\mathrm{b}}_+\rangle}\!{\langle {\mathrm{b}}_+|}}-{{|{\mathrm{b}}_-\rangle}\!{\langle {\mathrm{b}}_-|}}\right) \\ &\phantom{=}+\frac{\dot{\theta}(t)}{\sqrt{2}}\left[i\left({{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_+|}} + {{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_-|}}\right) + {\mathrm{H.c.}}\right]\\ &= \hH_0 + \hV (t). \end{aligned} \label{eq:Hadlambda}$$ Here $\hS^\dag(t)$ is the unitary change of basis operator that diagonalizes $\hH(t)$, and maps states in the lab frame onto states in the adiabatic frame. We have denoted the adiabatic eigenstates of the system by ${|{\mathrm{b}}_+\rangle}$, ${|{\mathrm{b}}_-\rangle}$ (known as bright-states), and ${|{\mathrm{d}}\rangle}$ (dark-state). The corresponding instantaneous eigenenergies are time-independent and given by $E_{\pm} = \pm G_0$ and $E_{{\mathrm{d}}} = 0$. An ideal STIRAP-style state transfer would involve having the system stay in the ${|{\mathrm{d}}\rangle}$ state as it adiabatically evolves from being ${|1\rangle}$ to ${|3\rangle}$ (accomplished by having $\theta(t)$ evolve continuously from $0$ to $\pi/2$). Leakage errors here are due to non-adiabatic transitions between the adiabatic eigenstates. They are caused by the term $\hV (t) \propto \dot{\theta}$ in $\hH_{{\mathrm{ad}}}$. Generically, the size of $\hV(t)$ (and hence leakage errors) increases as the protocol is made faster. The goal as always is to find modifications of the original pulse sequence so as to suppress leakage (i.e. non-adiabatic) errors. To do this using our Magnus approach, we first write $\hV(t)$ in the interaction picture defined by Eq. \[i.e. generated by the time-independent $\hH_0$ in Eq. \]: $$\hV_{\mathrm{I}}(t) =\frac{\dot{\theta}(t)}{\sqrt{2}}\left[i\left({\mathrm{e}}^{-i G_0 t} {{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_+|}}+ {\mathrm{e}}^{i G_0 t}{{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_-|}} \right) + {\mathrm{H.c.}} \right]. \label{eq:VintMagnus}$$ Note that for this problem we have $\sq \hV_{\mathrm{I}}(t) = \hV_{\mathrm{I}}(t)$ (i.e. it does not have matrix elements directly coupling leakage levels to one another). The first step of the Magnus approach for deriving control corrections is to find a first order control correction $\hW_1(t)$ satisfying the cancellation condition of Eq. . Since we have $\dot{\theta}(0) = \dot{\theta}(t_{\mathrm{f}}) = 0$, we can use the *derivative-based control* choice for $\hW_1 (t)$ in Eq. . Writing the correction in the adiabatic frame \[i.e. the same frame as Eq. \], we find: $$\hW_{1,{\mathrm{ad}}} (t) = \frac{1}{\sqrt{2}}\frac{\ddot{\theta}(t)}{G_0}\left[{{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_-|}} - {{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_+|}} + {\mathrm{H.c.}}\right]. \label{eq:H1ad}$$ As always, we stress that the choice of $\hW_1(t)$ is not unique. The above choice has the merit of both being simple to find, and (as one can easily verify) of not requiring any direct coupling between levels ${|1\rangle}$ and ${|3\rangle}$ to implement. The second order control is fully determined by $\hV_{\mathrm{I}}(t)$ and $\hW_{1} (t)$; it can be found using Eq. . We find $$\hW_{2,{\mathrm{ad}}} (t) = \frac{1}{2}\frac{\dot{\theta}^2 (t)}{G_0}\left(-{{|{\mathrm{b}}_+\rangle}\!{\langle {\mathrm{b}}_+|}} + {{|{\mathrm{b}}_-\rangle}\!{\langle {\mathrm{b}}_-|}}\right). \label{eq:H2ad}$$ where we have written the control in the adiabatic frame. Again, this control Hamiltonian does not require any direct ${|1\rangle}$ and ${|3\rangle}$ coupling. Hence, implementing both the first and second order Magnus-derived corrections corresponds to a simple modification of the control pulses $G_{\rm s}(t)$ and $G_{\rm p}(t)$. The form of the modified $G_{{\mathrm{p}}}(t)$ control pulse is shown in Fig. \[fig:fidlambda\] (b) for various choices of the speed parameter $\nu/G_0$; $G_{{\mathrm{s}}}(t)$ is just given by $G_{{\mathrm{p}}}(-t)$. As $\nu/G_0 \rightarrow 0$, one is in the adiabatic limit, and the correction to the control pulses vanishes as expected. To assess the efficacy of the different control sequences, we consider the state infidelity for a STIRAP style population transfer from ${|1\rangle}$ to ${|3\rangle}$. This is defined as $$\varepsilon = 1-{\left|{\langle 3|} \hU^{(j)}(t_{\mathrm{f}}) {|1\rangle}\right|}^2. \label{eq:statefid}$$ The behaviour of this error for the uncorrected STIRAP protocol versus the Magnus-based corrected protocols are shown in Fig. \[fig:fidlambda\] (a). One sees that if the goal is an error less than $10^{-3}$[^3], the second order Magnus-based correction allows for a $\sim 2.6$-fold increase in the maximum protocol speed (i.e. speed parameter $\nu$). Note that to simulate a realistic experiment where pulses all have a finite duration, we have integrated the Schrödinger equation from $t_{\mathrm{i}}= -\ln(-1 + \pi/2\arcsin[\delta])/\nu$ to $t_{\mathrm{f}}= -\ln(-1 + \pi/2\arccos[\delta])/\nu$. This choice ensures that the control fields are small at both the initial and final protocol times: $\sin[\theta (t_{\mathrm{i}})] = \cos[\theta (t_{\mathrm{f}})] = \delta$. We take $\delta = 10^{-6}$. ### Link to shortcuts to adiabaticity {#sec:linkSATD} As previously discussed, for the STIRAP problem, one can use the STA approach to derive an exact control correction that always yields perfect fidelity, the so-called "super-adiabatic transitionless driving" (SATD) @baksic2016. These ideas were recently tested experimentally @du2016 [@zhou2016]. The added control (written in the adiabatic basis) takes the form: $$\hW_{{\mathrm{SATD}},{\mathrm{ad}}} (t) = \frac{\ddot{\theta} (t)}{\sqrt{2} G_0} \frac{1}{1 + \frac{\dot{\theta}^2 (t)}{G_0^2}} \left( {{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_-|}} -{{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_+|}} + {\mathrm{H.c.}}\right). \label{eq:satdconstgap}$$ To compare this correction against those found from our Magnus approach, we can formally expand it in powers of $\dot{\theta}(t)/G_0$. The zeroth-order term in this expansion is identical to the first order correction $\hW_1(t)$ found using our Magnus approach, c.f. Eq. . This suggests that the Magnus approach provides a perturbative route for obtaining the benefits of a STA protocol (at least to leading order). If one continues to expand the SATD correction in powers of $\dot{\theta}$, one easily sees that the correspondence to the Magnus approach does not extend past leading order (see Appendix \[sec:compsatd\] for more details). Recall that the basic physical picture underlying both approaches is the same, and corresponds to Fig. \[fig:idea\]: to fight leakage, one constructs a "dressed" dark state, and implements control corrections to ensure the system evolution follows this dressed state. We see that the dressed states for the two approaches are in general not the same (though they are similar to leading order). For the STIRAP problem, the existence of the perfect SATD correction makes the Magnus approach unnecessary. The same is not true for more complex systems, where STA approaches are impossible to implement, whereas the Magnus approach remains tractable. An explicit example of such a problem is given in Sec. \[sec:mclz\]. ### Optimal second order control correction {#sec:ocs} Given the freedom one has to pick $\hW_2 (t)$ \[see Eq. \], we can look for an "optimal" control, $\hW_{2,{\mathrm{opt}}} (t)$, that simultaneously cancels all leakage errors at order $\epsilon^2$ and $\epsilon^3$. To find such a control, one needs to (numerically) solve a set of coupled first order differential equations, which defeats the purpose of our Magnus-based method (see Appendix \[sec:optctrlSTIRAP\]). However, since for STIRAP *pure* leakage errors are more detrimental than pure phase errors, one can try to find an approximate optimal control that suppresses pure leakage errors at order $\varepsilon^3$ (i.e third order processes that take the system out of the dark state subspace) at the expense of not fully cancelling phase errors at order $\varepsilon^2$ (hence giving an approximate optimal control Hamiltonian). We find (see Appendix \[sec:optctrlSTIRAP\]) $$\hW_{2,{\mathrm{opt}},{\mathrm{ad}}} (t) \simeq \frac{1}{3}\frac{\dot{\theta}^2(t)}{\Omega_0} \left(-{{|{\mathrm{b}}_+\rangle}\!{\langle {\mathrm{b}}_+|}} + {{|{\mathrm{b}}_-\rangle}\!{\langle {\mathrm{b}}_-|}}\right). \label{eq:Hoptad}$$ Remarkably, implementing Eq. only requires changing the numerical prefactor of $\hW_2 (t)$ \[see Eq. \]. In Fig. \[fig:fidlambda\] (a), we have plotted the error obtained with the optimal second order Magnus-based control (red trace). As it can be seen, the error is always smaller than $10^{-3}$. If we define the range of validity of a "corrected" control sequence as the parameter regime for which the maximal amplitude of the corrected pulse does not exceed the maximal amplitude of the original pulse, then the validity of the optimal second order correction is very close to that of SATD. We numerically find that the optimal control obeys this criterion for $\nu/\Omega_0 \lesssim 2.21$, while SATD is valid for $\nu/\Omega_0 \lesssim 2.63$. Within our definition of high-fidelity adiabatic passage ($\varepsilon \leq 10^{-3}$), the approximate optimal control found at second order is nearly as good as the exact control. ### Corrections for a time-dependent gap and connections to DRAG {#sec:gaussian} As previously discussed, the DRAG technique @motzoi2009 [@gambetta2011] is also a perturbative technique for constructing corrections to control pulses to suppress the deleterious effects of leakage transitions. The STIRAP problem considered in this section is an excellent testbed for seeing how it compares to our Magnus approach. For the uncorrected pulse sequence of the previous subsection \[c.f. Eq. \], one finds that the DRAG approach yields identical control corrections as the Magnus approach, i.e. $\hW_1(t)$ and $\hW_2(t)$ in Eqs. and . This is however a special case where the adiabatic gap in the original pulses is completely time-dependent. As we now show, for more general pulses, the DRAG technique can fail completely, while the Magnus approach remains effective. Consider the most standard pulse shapes used for STIRAP, where both $G_{{\mathrm{p}}}(t)$ and $G_{{\mathrm{s}}}(t)$ are Gaussians @bergmann1998. We have explicitly: $$\begin{aligned} G_{\mathrm{p}}(t) &= G_0 \exp\left[ -\nu^2 (t - t_0 - \tau)^2\right],\\ G_{\mathrm{s}}(t) &= G_0 \exp\left[ -\nu^2 (t-t_0)^2\right], \end{aligned} \label{eq:gaussian}$$ with $\tau$ the delay between the sequences and $t_0 = \sqrt{-\ln(\delta)}/\nu$ is defined such that $G_{\mathrm{s}}(0) = \delta$. In the adiabatic frame, the Hamiltonian reads $$\begin{aligned} \hH_{{\mathrm{ad}}} (t) &= G (t) \left({{|{\mathrm{b}}_+\rangle}\!{\langle {\mathrm{b}}_+|}}-{{|{\mathrm{b}}_-\rangle}\!{\langle {\mathrm{b}}_-|}}\right) \\ &\phantom{=}+\frac{\dot{\theta}(t)}{\sqrt{2}}\left[i\left({{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_+|}} + {{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_-|}}\right) + {\mathrm{H.c.}}\right]\\ &= \hH_0 (t) + \hV (t), \end{aligned} \label{eq:HlambdaadG}$$ where $G (t) = \sqrt{G_{\mathrm{p}}^2 (t) + G_{\mathrm{s}}^2 (t)}$ and $\theta (t) = \arctan[G_{\mathrm{p}}(t) / G_{\mathrm{s}}(t)]$. One can straightforwardly apply standard DRAG to this problem to help cancel non-adiabatic errors. It predicts a first order correction similar to Eq. with $G_0$ replaced by $G (t)$. The amplitude of the correction is thus $\propto \ddot{\theta} (t) /G(t)$. Unfortunately, the gap $G(t) \to 0$ at both late and early times, and does so faster than $\ddot{\theta}(t)$. As a result and as shown in Fig. \[fig:fidgaussian\] (b), the DRAG correction diverges, and is thus not physical. In contrast, using the Magnus approach yields physical (non-divergent) corrections. The leakage Hamiltonian in the interaction picture is: $$\hV_{\mathrm{I}}(t) =\frac{\dot{\theta}(t)}{\sqrt{2}} \left[i\left(e^{-i \Delta (t)}{{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_+|}} + e^{i \Delta (t)} {{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_-|}} \right) + {\mathrm{H.c.}} \right], \label{eq:VIG}$$ where $\Delta (t) = \int_0^t {\mathrm{d}}t_1 G (t_1)$. As usual, the first step of the Magnus approach is to construct a first order control correction $\hW_1(t)$ satisfying Eq. . While one could again use the *derivative-based control* technique to find a well-behaved $\hW_1 (t)$, for illustrative purposes, we will use some of the other techniques discussed in Secs. \[sec:genfct\] and \[sec:imperfectctrls\]. In particular, we will use the *generating function approach* combined with the *variational approach*. The generating function approach to finding $\hW_1(t)$ requires one to first construct a well-chosen time-dependent generating function that vanishes at $t=t_f$ \[i.e. satisfies Eq. \]. Motivated by the form of $\hOmega_1^{(1)} (t)$ that was found in the last subsection for the case where $G(t)$ was time-independent, we consider the function $$\begin{aligned} &\hR(\alpha, t) = \hOmega_1^{(1)} (\alpha, t) = \\ &-\frac{i}{\sqrt{2}} \alpha\left[-e^{-i \Delta (t)} \frac{\dot{\theta}(t)}{G_0} {{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_+|}} + e^{i \Delta (t)} \frac{\dot{\theta}(t)}{G_0} {{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_-|}} + {\mathrm{H.c.}}\right], \end{aligned} \label{eq:H1GaussianEq}$$ Here, $\alpha$ is a parameter that will be set in what follows. Given this generating function, the corresponding control-correction $\hW_1(t)$ is found by using Eq. . Unfortunately, when written in the lab-frame, one sees that it has terms requiring a direct coupling between levels ${|1\rangle}$ and ${|3\rangle}$. As described in Sec. \[sec:imperfectctrls\], we can still proceed even though $\hW_{1}(t)$ cannot be fully implemented given our limited experimental controls. We first decompose it into its attainable \[$\hW_{1,{\mathrm{ad}}}^{{\mathrm{ctrl}}} (t)$\] and unattainable \[$\hW_{1,{\mathrm{ad}}}^{{\mathrm{err}}} (t)$\] parts, $\hW_{1,{{\mathrm{ad}}}}(t) = \hW_{1,{\mathrm{ad}}}^{{\mathrm{ctrl}}} (t)+ \hW_{1,{\mathrm{ad}}}^{{\mathrm{err}}} (t) $, see Eq. . We find $$\hW_{1,{\mathrm{ad}}}^{{\mathrm{ctrl}}} (t) = \alpha \frac{\ddot{\theta}(t)} {\sqrt{2} G_0} \left[ {{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_-|}} - {{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_+|}} + {\mathrm{H.c.}}\right], \label{eq:H1Gaussianctrl}$$ and $$\hW_{1,{\mathrm{ad}}}^{{\mathrm{err}}} (t) = \frac{1}{\sqrt{2}} \gamma (t) \left[ i {{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_-|}} + i {{|{\mathrm{d}}\rangle}\!{\langle {\mathrm{b}}_+|}} + {\mathrm{H.c.}}\right]. \label{eq:H1Gaussianerr}$$ Here, $\gamma (t) = (\alpha G(t)/G_0 -1)\dot{\theta} (t)$. To proceed, we will use the variational approach discussed in Sec. \[sec:imperfectctrls\_var\]. We basically assume that only the correction $ \hW_{1,{\mathrm{ad}}}^{{\mathrm{ctrl}}} (t)$ is implemented, and pick $\alpha$ to minimize the error that results from dropping $\hW_{1,{\mathrm{ad}}}^{{\mathrm{err}}} (t)$. This involves numerically minimizing the average fidelity $\bar{F}[\alpha]$ defined in Eq. . In our case, this function takes the simple form: $$\bar{F}[\alpha] = \frac{1}{4} + \frac{1}{12}\left[1+ 2\cos\left( {\left|\int_0^{t_{\mathrm{f}}} {\mathrm{d}}t_1 \exp[i \Delta (t_1)] \gamma (t_1)\right|} \right)\right]^2. \label{eq:avgFoptG}$$ ![(Color online). (Color online). (a) Fidelity error for STIRAP-style state transfer, as a function adiabatic parameter $\nu/G_0$, for uncorrected pulses having a simple Gaussian form. Curves correspond to different choice of correction: "uncorrected" control sequence defined in Eq. (black), first order Magnus corrected controls (green), and second order Magnus corrected controls (blue). (b) Modified pump pulse $G_{\mathrm{p}}(t)$ predicted by the second order Magnus algorithm as function of $t/t_{\mathrm{f}}$ for different values of $\nu/G_0$. As $\nu/G_0 \to 0$, the modified sequence converges to the original one. The Stokes
{'source': 'arXiv_out/1610'}