Papers
Topics
Authors
Recent
Search
2000 character limit reached

MAGICARP: Quantum Control for Gate Synthesis

Updated 5 July 2026
  • MAGICARP is a quantum optimal control method that reparameterizes the problem via Pontryagin’s Maximum Principle to optimize a single traceless Hermitian adjoint matrix.
  • It reduces the high-dimensional control search to a d²-1 parameter space, producing smoother, energy-efficient pulses compared to traditional methods like GRAPE.
  • The drift-aware extension generalizes the method to closed systems with constant drift, revealing a weak-driving quantum speed limit while maintaining robust spectral properties.

MAGICARP is a specific quantum optimal control algorithm for synthesizing quantum gates. It combines the structure provided by Pontryagin’s Maximum Principle (PMP) with the robustness of gradient ascent techniques, and is formulated as a shooting technique that determines an initial adjoint momentum sufficient to realize a target gate. In its original formulation, MAGICARP merges PMP with gradient-based optimization by optimizing a single traceless Hermitian adjoint matrix gg, rather than optimizing thousands of discretized control amplitudes directly; in a later drift-aware extension, the same basic idea is generalized to closed systems with a constant drift Hamiltonian, including two exchange-coupled spins in an external magnetic field (Janković et al., 27 May 2025, Janković et al., 20 Jun 2026).

1. Conceptual position within quantum optimal control

In quantum optimal control, the objective is to design time-dependent fields that steer a unitary propagator U(t)U(t) according to

U˙(t)=iH(t)U(t),U(0)=1,\dot{U}(t) = -i H(t) U(t), \qquad U(0)=\mathbb{1},

with

H(t)=H0+kuk(t)Hk,H(t) = H_0 + \sum_k u_k(t)\,H_k,

so that U(T)U(T) approximates a desired target gate UtargSU(d)U_{\mathrm{targ}}\in SU(d) at some final time TT. The standard objectives are gate fidelity and resource constraints such as total time, speed, energy, or amplitude (Janković et al., 27 May 2025).

MAGICARP was introduced against the background of methods such as GRAPE, which discretize time into NstepsN_{\text{steps}} slices, treat all amplitudes uk[n]u_k[n] as optimization variables, and use analytic gradients with respect to those amplitudes. The original exposition identifies four resulting issues: dimensionality, local minima or landscape complexity, the difficulty of integrating time- or energy-optimality directly into the cost functional, and the absence of built-in analytic structure in the pulse ansatz (Janković et al., 27 May 2025).

The defining move in MAGICARP is therefore a reparameterization of the optimization problem. Instead of searching over the full space of discretized pulses, it searches over a finite-dimensional adjoint object whose dynamics determine the entire pulse shape through PMP. In the driftless formulation, this reduces the optimization variables from Nsteps×NcontrolsN_{\text{steps}}\times N_{\text{controls}} to U(t)U(t)0, the number of real degrees of freedom in a traceless Hermitian U(t)U(t)1 matrix U(t)U(t)2 (Janković et al., 27 May 2025).

Algorithm Number of optimization parameters
GRAPE U(t)U(t)3
MAGICARP U(t)U(t)4

This parameter reduction is not merely a numerical convenience. It encodes the claim that, for the cost functionals considered, optimal controls can be represented through a constant adjoint matrix whose conjugation by the evolving unitary specifies the control direction at every time. A plausible implication is that MAGICARP should be most advantageous when time discretization is fine and the control grid is large, but the physical Hilbert-space dimension remains moderate (Janković et al., 27 May 2025).

2. PMP formulation and the adjoint matrix U(t)U(t)5

The original derivation distinguishes Mayer, Lagrange, and Bolza cost functionals. For gate synthesis, the discussion centers on two Lagrange-type resource costs and a separate Mayer-type fidelity objective (Janković et al., 27 May 2025).

The time-optimal cost is written as

U(t)U(t)6

while the quadratic energy cost is

U(t)U(t)7

The gate fidelity is defined as

U(t)U(t)8

In practice, the paper also uses the gate cost

U(t)U(t)9

These ingredients are combined by first deriving the PMP control structure from the resource functional and then optimizing fidelity over the adjoint parameter U˙(t)=iH(t)U(t),U(0)=1,\dot{U}(t) = -i H(t) U(t), \qquad U(0)=\mathbb{1},0 (Janković et al., 27 May 2025).

Within PMP, the state is U˙(t)=iH(t)U(t),U(0)=1,\dot{U}(t) = -i H(t) U(t), \qquad U(0)=\mathbb{1},1, the adjoint variable is a matrix U˙(t)=iH(t)U(t),U(0)=1,\dot{U}(t) = -i H(t) U(t), \qquad U(0)=\mathbb{1},2, and for the chosen Lagrangians the adjoint equation simplifies to

U˙(t)=iH(t)U(t),U(0)=1,\dot{U}(t) = -i H(t) U(t), \qquad U(0)=\mathbb{1},3

A central consequence is that one may write

U˙(t)=iH(t)U(t),U(0)=1,\dot{U}(t) = -i H(t) U(t), \qquad U(0)=\mathbb{1},4

where U˙(t)=iH(t)U(t),U(0)=1,\dot{U}(t) = -i H(t) U(t), \qquad U(0)=\mathbb{1},5 is a constant skew-Hermitian matrix, and then define

U˙(t)=iH(t)U(t),U(0)=1,\dot{U}(t) = -i H(t) U(t), \qquad U(0)=\mathbb{1},6

so that U˙(t)=iH(t)U(t),U(0)=1,\dot{U}(t) = -i H(t) U(t), \qquad U(0)=\mathbb{1},7 is a constant traceless Hermitian matrix. This constant matrix is the shooting parameter that MAGICARP optimizes (Janković et al., 27 May 2025).

For the quadratic energy cost, the optimal controls take the explicit PMP form

U˙(t)=iH(t)U(t),U(0)=1,\dot{U}(t) = -i H(t) U(t), \qquad U(0)=\mathbb{1},8

For the time-like cost, the controls are proportional to the same inner product but normalized by the control norm. The distinction is important: in the quadratic case the control is linear in the adjoint, whereas in the time-like case the control direction is fixed by the adjoint and the magnitude is normalized (Janković et al., 27 May 2025).

This induces a two-point boundary-value problem. One chooses U˙(t)=iH(t)U(t),U(0)=1,\dot{U}(t) = -i H(t) U(t), \qquad U(0)=\mathbb{1},9, propagates H(t)=H0+kuk(t)Hk,H(t) = H_0 + \sum_k u_k(t)\,H_k,0 forward under the PMP-structured controls, evaluates the final gate fidelity, and then updates H(t)=H0+kuk(t)Hk,H(t) = H_0 + \sum_k u_k(t)\,H_k,1 by gradient ascent. In control-theoretic language, this is a shooting method over the initial adjoint momentum (Janković et al., 27 May 2025).

3. Algorithmic realization as self-iterative pulse construction

MAGICARP is described as iteratively refining an adjoint matrix H(t)=H0+kuk(t)Hk,H(t) = H_0 + \sum_k u_k(t)\,H_k,2 to optimize the target quantum operation. In the driftless implementation, H(t)=H0+kuk(t)Hk,H(t) = H_0 + \sum_k u_k(t)\,H_k,3 is represented as a traceless Hermitian matrix, or equivalently as a real vector of length H(t)=H0+kuk(t)Hk,H(t) = H_0 + \sum_k u_k(t)\,H_k,4 on a basis of H(t)=H0+kuk(t)Hk,H(t) = H_0 + \sum_k u_k(t)\,H_k,5 generators (Janković et al., 27 May 2025).

For a given H(t)=H0+kuk(t)Hk,H(t) = H_0 + \sum_k u_k(t)\,H_k,6, the algorithm proceeds by computing initial controls from H(t)=H0+kuk(t)Hk,H(t) = H_0 + \sum_k u_k(t)\,H_k,7, propagating the unitary on a discrete time grid, and recomputing control amplitudes at each step through the conjugated adjoint H(t)=H0+kuk(t)Hk,H(t) = H_0 + \sum_k u_k(t)\,H_k,8. In the energy-optimal variant used for the simplified implementation,

H(t)=H0+kuk(t)Hk,H(t) = H_0 + \sum_k u_k(t)\,H_k,9

and at subsequent steps

U(T)U(T)0

The propagator is updated piecewise-constantly as

U(T)U(T)1

After evolving to U(T)U(T)2, the algorithm evaluates

U(T)U(T)3

and updates U(T)U(T)4 with a gradient-based optimizer (Janković et al., 27 May 2025).

The implementation is therefore hybrid in a precise sense. PMP provides a structured pulse ansatz, while gradient ascent supplies the outer optimization loop. In the original paper, gradients with respect to U(T)U(T)5 are described as computable numerically by finite differences or via chain-rule-based derivations; in the later drift-aware formulation, gradients with respect to the generator parameters are evaluated by automatic differentiation in JAX, and L-BFGS-B is used under box constraints on those parameters (Janković et al., 27 May 2025, Janković et al., 20 Jun 2026).

No separate ODE for the costate is integrated in the basic MAGICARP realization, because the adjoint is implicit in the transported object U(T)U(T)6, or equivalently in the fixed matrix U(T)U(T)7 conjugated by U(T)U(T)8. This is one of the reasons the method can be implemented as a self-iterative forward construction rather than as a simultaneous forward-backward scheme (Janković et al., 27 May 2025).

4. Pulse structure, constraints, and driftless numerical behavior

A notable feature of MAGICARP is that constraints are embedded in the pulse structure rather than imposed only through penalties. For time minimization, the controls are normalized versions of U(T)U(T)9, which naturally enforces maximal driving under the chosen norm. For energy minimization, the controls are linear in the same quantity. The original paper states that this tends to produce smooth, continuous pulses with a specific shape close to time- or energy-optimal trajectories under the specified norm and Hamiltonian set (Janković et al., 27 May 2025).

The physical interpretation given there is that the pulses are continuous functions of time, determined by how the adjoint matrix UtargSU(d)U_{\mathrm{targ}}\in SU(d)0 is transported by the unitary evolution and projected onto the control Hamiltonians: UtargSU(d)U_{\mathrm{targ}}\in SU(d)1 They are explicitly characterized as not bang-bang in the strict sense. Rather, their shape is governed by the evolving projection of UtargSU(d)U_{\mathrm{targ}}\in SU(d)2 under conjugation by UtargSU(d)U_{\mathrm{targ}}\in SU(d)3, which provides a controlled alternative to arbitrary piecewise-constant search over all time slices (Janković et al., 27 May 2025).

The initial numerical examples focus on constrained gate synthesis. For a single-qubit Hadamard gate with controls UtargSU(d)U_{\mathrm{targ}}\in SU(d)4 and UtargSU(d)U_{\mathrm{targ}}\in SU(d)5, the MAGICARP pulses are reported to be more continuous than the GRAPE-constrained pulses taken from previous work. The durations are given in units of the quantum speed limit UtargSU(d)U_{\mathrm{targ}}\in SU(d)6: approximately UtargSU(d)U_{\mathrm{targ}}\in SU(d)7 for the GRAPE-constrained pulse and approximately UtargSU(d)U_{\mathrm{targ}}\in SU(d)8 for the MAGICARP-constrained pulse (Janković et al., 27 May 2025).

The method is also extended to UtargSU(d)U_{\mathrm{targ}}\in SU(d)9 using TT0 generalized Pauli operators TT1 and TT2 as controls and the multi-level Hadamard or QFT gate as target. For each TT3, the study reports 300 runs from random initial TT4. The observed trend is that fidelity decreases on average with increasing dimension, the minimal duration achieving cost TT5 increases, and the scatter of results becomes larger as local minima become more frequent. For TT6, the minimal duration achieving cost TT7 is approximately TT8, or approximately TT9 (Janković et al., 27 May 2025).

These examples establish the main numerical profile of the method in the driftless setting: dimension reduction, structured smooth pulses, and competitive or shorter durations than constrained GRAPE in the cases considered. They also identify the main scaling caveat: while the search space is much smaller than a dense time-grid parameterization, it still grows as NstepsN_{\text{steps}}0, which becomes large for systems where NstepsN_{\text{steps}}1 (Janković et al., 27 May 2025).

5. Drift-aware generalization and transported-generator formalism

The 2026 extension reformulates MAGICARP for closed systems with a fixed, non-negligible drift Hamiltonian, and uses two exchange-coupled spins in an external magnetic field as the main testbed (Janković et al., 20 Jun 2026). The drift Hamiltonian is

NstepsN_{\text{steps}}2

with a single global transverse control

NstepsN_{\text{steps}}3

The total lab-frame Hamiltonian is

NstepsN_{\text{steps}}4

Because the drift is always on, the paper adopts the drift-aware target

NstepsN_{\text{steps}}5

so the gate is defined on top of the free drift evolution (Janković et al., 20 Jun 2026).

In this formulation, MAGICARP is written in terms of an anti-Hermitian generator

NstepsN_{\text{steps}}6

with real coefficients NstepsN_{\text{steps}}7. The transported generator is

NstepsN_{\text{steps}}8

and the control law is

NstepsN_{\text{steps}}9

This is explicitly identified as structurally analogous to a PMP costate transported along the trajectory (Janković et al., 20 Jun 2026).

The drift-aware method is implemented in two stages. First, the drift Hamiltonian is diagonalized to obtain dressed eigenstates and dressed transition frequencies uk[n]u_k[n]0. For each transition uk[n]u_k[n]1, the one-way operator uk[n]u_k[n]2 defines Hermitian quadratures

uk[n]u_k[n]3

Stage 1 then performs MAGICARP shooting in the rotating-wave frame, where the interaction-frame Hamiltonian is constructed from slowly varying quadratures on the retained dressed transitions. Stage 2 refines the same generator parameters in the exact laboratory frame, reconstructing the physical pulse as a sum of carriers at the dressed transition frequencies (Janković et al., 20 Jun 2026).

The extension also formalizes post-optimization control metrics. The integrated pulse energy is

uk[n]u_k[n]4

the pulse area is

uk[n]u_k[n]5

and the peak amplitude is uk[n]u_k[n]6. The paper emphasizes that the optimization objective itself is only gate infidelity; energy, area, spectral power concentration, and robustness are diagnostic quantities used for benchmarking and interpretation (Janković et al., 20 Jun 2026).

6. Benchmarks, weak-driving quantum speed limits, and open questions

The drift-aware study benchmarks MAGICARP against GRAPE and Krotov under a fair-halting protocol: same drift, same control Hamiltonian, same time grid, same dressed target gate, independent verified fidelity evaluation, and a common stopping rule at verified infidelity uk[n]u_k[n]7 or uk[n]u_k[n]8 depending on the test (Janković et al., 20 Jun 2026).

For the moderate-coupling two-qubit QFT at uk[n]u_k[n]9 and strict Nsteps×NcontrolsN_{\text{steps}}\times N_{\text{controls}}0 halt, the reported values are:

  • MAGICARP: Nsteps×NcontrolsN_{\text{steps}}\times N_{\text{controls}}1, Nsteps×NcontrolsN_{\text{steps}}\times N_{\text{controls}}2, Nsteps×NcontrolsN_{\text{steps}}\times N_{\text{controls}}3;
  • GRAPE: Nsteps×NcontrolsN_{\text{steps}}\times N_{\text{controls}}4, Nsteps×NcontrolsN_{\text{steps}}\times N_{\text{controls}}5, Nsteps×NcontrolsN_{\text{steps}}\times N_{\text{controls}}6;
  • Krotov: Nsteps×NcontrolsN_{\text{steps}}\times N_{\text{controls}}7, Nsteps×NcontrolsN_{\text{steps}}\times N_{\text{controls}}8, Nsteps×NcontrolsN_{\text{steps}}\times N_{\text{controls}}9 (Janković et al., 20 Jun 2026).
Method U(t)U(t)00 QFT benchmark
MAGICARP U(t)U(t)01, U(t)U(t)02, U(t)U(t)03
GRAPE U(t)U(t)04, U(t)U(t)05, U(t)U(t)06
Krotov U(t)U(t)07, U(t)U(t)08, U(t)U(t)09

The same comparison also shows strong differences in spectral concentration. For the QFT, MAGICARP places approximately U(t)U(t)10 of spectral power on the four dressed transitions, GRAPE approximately U(t)U(t)11, and Krotov approximately U(t)U(t)12 (Janković et al., 20 Jun 2026). The paper’s interpretation is explicit: GRAPE independently converges onto essentially the same low-energy, spectrally concentrated pulses that MAGICARP generates by design, whereas Krotov incurs an order-of-magnitude energy premium. A plausible implication is that the low-energy solution is a genuine feature of the control landscape rather than an artifact of the MAGICARP ansatz.

Robustness is examined through static fractional errors in the exchange coupling U(t)U(t)13. For the moderate-coupling QFT at U(t)U(t)14, MAGICARP and GRAPE are reported as the most robust; at U(t)U(t)15 error, the fidelities are approximately U(t)U(t)16 for MAGICARP, U(t)U(t)17 for GRAPE, and U(t)U(t)18 for Krotov (Janković et al., 20 Jun 2026).

A major conceptual result of the drift-aware paper is the identification of a weak-driving quantum speed limit. A statistical sweep of U(t)U(t)19 MAGICARP runs over gate times U(t)U(t)20 and four bounds on generator parameters is used to probe the existence of low-amplitude solutions for the dressed two-qubit QFT. A run is classified as converged if the verified infidelity is U(t)U(t)21. The study reports that no run converges for U(t)U(t)22, and the first converged run appears at U(t)U(t)23 (Janković et al., 20 Jun 2026).

The minimum energy among converged runs is fitted by the two-parameter area-pole law

U(t)U(t)24

with fitted values

U(t)U(t)25

The first term is identified as the time-optimal area cost, while the second is a pole at the weak-driving speed limit (Janković et al., 20 Jun 2026). The same paper relates this threshold to a single-axis interaction bound of approximately U(t)U(t)26 derived from the QFT’s Cartan coordinates and the exchange rate U(t)U(t)27.

The open questions are also stated with some precision across the two papers. The original formulation points to mapping stability of U(t)U(t)28, convergence as U(t)U(t)29, the cost of gradient computation with respect to U(t)U(t)30, and the scaling of the U(t)U(t)31 search space for large systems (Janković et al., 27 May 2025). The drift-aware extension adds that the analysis is limited to closed systems, studies only static robustness to misspecified U(t)U(t)32, and is demonstrated on a two-qubit setting even though the method is conceptually more general (Janković et al., 20 Jun 2026).

Taken together, these works define MAGICARP as a hybrid PMP-gradient family of shooting methods in which a single adjoint object generates the full control trajectory. In the driftless formulation, this yields a low-dimensional, resource-aware route to gate synthesis. In the drift-aware formulation, it becomes a transported-generator framework that produces smooth, low-energy, spectrally concentrated pulses and can expose a weak-driving quantum speed limit that is obscured by unconstrained high-amplitude optimization (Janković et al., 27 May 2025, Janković et al., 20 Jun 2026).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to MAGICARP.