Optimal-control method that discretises the control fields into piecewise-constant amplitudes and climbs the gradient of a gate or state fidelity, which can be computed for all time slices from one forward and one backward propagation.
Established resultMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01
AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.
Problem. With uk(t)=uk,j on slice j, the slice propagators are
Uj=exp(−iΔtH(j)), H(j)=H0+∑kuk,jHk, and the total
propagator is U=UN⋯U1. Maximise
Φ(u)=∣g∣2,g=d1Tr(W†UN⋯U1),
over u∈RK×N, possibly with amplitude bounds or penalty terms.
Gradient. Put Xj=Uj⋯U1 (forward propagation, X0=I) and
Pj=Uj+1†⋯UN†W (backward propagation, PN=W). Then
g=d1Tr(Pj†Xj) for every j, and the exact derivative of a matrix exponential gives
The integral form is exact (it can be evaluated in the eigenbasis of H(j)); the first-order
form is the one of Khaneja et al. and is accurate when
Δt∥H(j)∥≪1.
Algorithm.
Choose an initial guess u (random or a smooth analytic pulse).
Compute all Uj, then X1,…,XN forwards and PN,…,P1 backwards.
Evaluate Φ and all KN partial derivatives from the formula above: the cost is
O(N) matrix products, not O(KN2).
Update u←u+η∇Φ (or take a quasi-Newton step, e.g. L-BFGS), apply
bounds, and repeat from step 2 until Φ stops improving.
Correctness. The first identity holds because
Pj†Xj=W†UN⋯Uj+1Uj⋯U1. The derivative of g with respect to
uk,j involves only Uj, so by the product rule
∂g=d1Tr(Pj†∂UjXj−1), and
∂∣g∣2=2Re(g∗∂g). The integral formula for the derivative of
eA(u) with A′=−iΔtHk follows from differentiating
esA(u) in u and solving the resulting linear differential equation in s (Duhamel's
formula); replacing both exponentials inside by I+O(Δt) gives the first-order form,
with HkUj and UjHk agreeing to that order.
GRAPE finds local optima only; the landscape, constraints, robustness to parameter spreads and
open-system extensions are reviewed by Glaser et al..
Holds when
Closed, finite-dimensional system H(t)=H0+∑k=1Kuk(t)Hk with Hermitian H0,Hk on Cd and real controls.
Controls piecewise constant on N slices of length Δt=T/N; the fidelity is the phase-insensitive gate overlap with a unitary target W.
Claude (AI drafting assistant)Writing, original draft (CRediT roles)
Review history
Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)
Forward/backward propagator identity, product-rule derivative, Duhamel integral and first-order gradient re-derived. Numerical check with numpy/scipy: for a random 2-level problem (20 slices, dt = 0.05, controls X and Y) the first-order gradient formula agrees with central finite differences to 7e-4, within the expected O(dt^2) = 2.5e-3. Khaneja et al. (J. Magn. Reson. 172, 296, 2005) and Glaser et al. (EPJ D 69, 279, 2015) metadata checked on Crossref; Khaneja et al. full text not read (paywalled), the first-order form is the standard GRAPE gradient as reviewed in Glaser et al., arXiv 1508.00442.
Revision history
2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e
Current revision 4937678c216a5912. Source file knowledge/records/algorithm/grape.md in the content repository (readable there once it is public).