Skip to content

Optimal Control

Optimal control designs a control protocol by optimizing a stated objective subject to physical and numerical constraints. In quantum mechanics the controls may be microwave amplitudes, laser phases, magnetic fields, tunneling amplitudes, detunings, dissipative couplings, or measurement-based feedback laws. In open systems, the target must be balanced against decoherence, leakage, bandwidth, calibration uncertainty, and model error.

The key idea is not “let an optimizer find a pulse.” The key idea is:

state the dynamical model, the allowed controls, the objective,
the constraints, and the validation tests before trusting the pulse

For a reproducible small-scale numerical contract, see Optimal Control Toy Problems. This page explains the concepts that such a notebook should make explicit. For processor-facing method selection, including CRAB, black-box search, reinforcement learning, hardware query budgets, pulse deployment, and release evidence, see Optimal Control for Quantum Processors.

A typical open-system control model has

ρ˙(t)=Lt[u](ρ(t)),\dot\rho(t) = \mathcal L_t[u](\rho(t)),

where u(t)u(t) denotes one or more control waveforms. For a driven Markovian model,

Lt[u](ρ)=−iℏ[H0+∑juj(t)Hj,ρ]+∑αγα(t)D[Lα(t)]ρ.\mathcal L_t[u](\rho) = - \frac{i}{\hbar} [H_0+\sum_j u_j(t)H_j,\rho] + \sum_\alpha \gamma_\alpha(t)\mathcal D[L_\alpha(t)]\rho.

The optimization chooses uj(t)u_j(t) from an allowed class. The class matters: a piecewise-constant waveform, a Fourier series, a spline, a Gaussian pulse family, and an arbitrary point-by-point waveform are different optimization problems.

The control problem is incomplete until it specifies:

  • initial states or input channels;
  • target state, unitary, channel, observable, or steady state;
  • final time or allowed duration;
  • amplitude, bandwidth, smoothness, phase, and energy constraints;
  • known noise and uncertainty parameters;
  • objective function and penalty terms;
  • solver tolerances and validation tests.

An objective function turns the physics goal into a number. Since many optimizers minimize, it is common to write

J[u]=1−F[u]+λP[u]+μR[u],J[u] = 1-F[u] + \lambda P[u] + \mu R[u],

where F[u]F[u] is a physical fidelity or success score, P[u]P[u] penalizes control cost or roughness, and R[u]R[u] penalizes lack of robustness. The weights λ\lambda and μ\mu are modeling choices, not constants of nature.

Common targets include:

TargetExample score
state preparationFψ=⟨ψ⋆∣ρ(T)∣ψ⋆⟩F_\psi=\langle\psi_\star\rvert\rho(T)\lvert\psi_\star\rangle
population transferF=Tr⁡[Πtargetρ(T)]F=\operatorname{Tr}[\Pi_{\mathrm{target}}\rho(T)]
unitary gateaverage gate fidelity or process fidelity
channel synthesisdistance between Choi matrices or action on a test set
coolingfinal occupation ⟨n(T)⟩\langle n(T)\rangle or energy
steady-state engineeringdistance to target fixed point plus Liouvillian gap checks
sensing protocolFisher information, contrast, or signal-to-noise objective

State-transfer objectives can be useful for calibration, but they do not certify a gate. A pulse that maps one initial state correctly may act badly on another input state. Gate or channel objectives must test the action on a basis of states, a process representation, or an equivalent fidelity formula.

Constraints are not cosmetic. They are part of the model.

ConstraintWhy it matters
amplitude boundprevents unphysical instantaneous rotations or heating
finite bandwidthmodels electronics, optics, filters, and pulse shaping
smoothnessreduces spectral leakage and calibration sensitivity
durationtrades speed against decoherence and adiabaticity
leakage penaltydiscourages population outside the computational subspace
detuning uncertaintytests robustness to calibration drift
noise modelprevents optimizing a closed-system fantasy
hardware transfer functionmaps programmed waveform to delivered waveform

Without constraints, an optimizer can exploit features not present in the apparatus. A pulse that requires arbitrarily sharp edges or enormous amplitudes is a mathematical artifact unless the hardware can deliver it and the model remains valid at those scales.

For a Markovian density-matrix model, the final state is

ρ(T)=Φu(T,0)ρ(0),\rho(T) = \Phi_u(T,0)\rho(0),

where Φu\Phi_u is a completely positive trace-preserving map when the model is valid. If the target is a unitary gate U⋆U_\star, the open-system result is generally not unitary; it is a channel. Comparing only one input state can hide amplitude damping, dephasing, leakage, and nonunital drift.

A simple gate-style score averages over a set of input states:

FS=1∣S∣∑ρj∈STr⁡[U⋆ρjU⋆† Φu(ρj)].F_{\mathcal S} = \frac{1}{|\mathcal S|} \sum_{\rho_j\in\mathcal S} \operatorname{Tr} \left[ U_\star\rho_jU_\star^\dagger \, \Phi_u(\rho_j) \right].

This is not the only fidelity convention, but it is transparent and reproducible. More formal process fidelities should state the Choi-matrix normalization, basis ordering, and whether leakage is included or postselected.

For many controls, the waveform is discretized into time slices:

uj(t)=uj,n,tn≤t<tn+1.u_j(t) = u_{j,n}, \qquad t_n\le t\lt t_{n+1}.

Gradient methods compute how the objective changes when each uj,nu_{j,n} changes. In open-system notation, an adjoint-state expression has the schematic form

∂J∂uj,n∼Re⁡⟨Λn+1,∂Φn∂uj,n(ρn)⟩+penalty terms.\frac{\partial J}{\partial u_{j,n}} \sim \operatorname{Re} \left\langle \Lambda_{n+1}, \frac{\partial \Phi_n}{\partial u_{j,n}} (\rho_n) \right\rangle + \text{penalty terms}.

Here ρn\rho_n is a forward-propagated state, Λn+1\Lambda_{n+1} is a backward-propagated costate, and Φn\Phi_n is the time-slice propagator. The exact formula depends on the fidelity, discretization, and inner-product convention.

GRAPE-style methods use this forward-backward structure efficiently for piecewise controls. Krotov methods update controls using a related variational construction designed to give monotonic improvement under suitable assumptions. Automatic differentiation can also compute gradients, but it does not remove the need to define the physics and validation tests.

GRAPE, gradient ascent pulse engineering, is widely used when controls are piecewise constant and the objective gradient can be evaluated slice by slice. It is especially natural for finite-dimensional Hamiltonian control and has open-system extensions using Liouvillian propagators.

Krotov methods frame the update as an optimal-control variational problem with forward and backward propagation. They are often used when one wants monotonic improvement guarantees under the assumptions of the method.

Both families are algorithms for a chosen mathematical problem. Neither guarantees that the optimized pulse is physically robust, experimentally deliverable, or globally optimal.

A pulse optimized for a single parameter set may fail when the detuning, coupling, noise rate, or calibration shifts. Robust control replaces a single score by an ensemble score, for example

Jrob[u]=∑mwm[1−Fm[u]]+λP[u],J_{\mathrm{rob}}[u] = \sum_m w_m \left[ 1-F_m[u] \right] + \lambda P[u],

where mm labels sampled parameter values and wmw_m are weights. The pulse is then rewarded for working across the ensemble.

Robustness should be tested on parameter values not used during optimization. Otherwise the pulse may simply overfit the training grid.

A trustworthy optimal-control result should report:

  • the model Hamiltonian, dissipators, and frame convention;
  • the control parametrization and bounds;
  • the objective and all penalty weights;
  • the time grid and propagation tolerances;
  • the optimizer and stopping criteria;
  • the initial guesses or random seed;
  • a simple baseline pulse for comparison;
  • physical fidelity separate from penalized objective;
  • robustness sweeps over noise and detuning;
  • leakage and constraint violations;
  • enough metadata for reproduction.

For density-matrix simulations, Solving Lindblad Equations gives the numerical cautionary background. For the small qubit-control benchmark, use Optimal Control Toy Problems.

Optimal control is not a replacement for analytic pulse design. It is a way to search a larger control space once the target and constraints are clear.

Rabi and Ramsey Control supplies the basic calibration primitives. Pulse Sequences collects standard hand-designed patterns. Dynamical Decoupling explains noise filtering by pulse timing. Measurement-Based Feedback designs controls that depend on a live record. Reservoir Engineering changes the dissipative dynamics rather than merely shaping Hamiltonian drives, and Dissipative State Preparation focuses on target steady states.

Optimal control can combine these ideas: optimize a shaped pulse, optimize an echo-like timing pattern, or optimize both Hamiltonian and dissipative resources. The result still needs independent validation.

  • Optimizing a closed-system model and reporting the result as open-system control.
  • Reporting the penalized objective JJ without the physical fidelity FF.
  • Treating a state-transfer score as a gate fidelity.
  • Ignoring amplitude, bandwidth, smoothness, and leakage constraints.
  • Comparing optimized pulses to no baseline pulse.
  • Trusting improvements smaller than solver tolerance or model uncertainty.
  • Optimizing on the same parameter grid used for robustness claims.
  • Hiding failed initial guesses, local traps, or sensitivity to random seed.
  • Forgetting that an experimentally delivered waveform may differ from the programmed waveform.

A pulse maps ∣0⟩\lvert0\rangle to ∣1⟩\lvert1\rangle with high fidelity. Why does this not prove it implements an XπX_\pi gate?

Solution

A gate is a map on all input states, not one state. The same pulse might map ∣0⟩\lvert0\rangle correctly while adding the wrong phase to ∣1⟩\lvert1\rangle, dephasing superpositions, leaking population, or acting nonlinearly after postselection. To certify a gate, one must test a process representation, an average gate fidelity, or enough input states to determine the channel within the intended model.

Suppose two pulses have physical fidelities FA=0.995F_A=0.995 and FB=0.990F_B=0.990. Pulse B is much smoother, so an objective J=1−F+λPJ=1-F+\lambda P assigns JB<JAJ_B\lt J_A. Which pulse is “better”?

Solution

Neither is universally better without the design goal. Pulse A has higher physical fidelity in the model. Pulse B has lower penalized objective because smoothness was rewarded. If smoothness represents a real hardware constraint or robustness requirement, B may be preferred. The result should report both FF and JJ so readers can see the tradeoff.

A pulse is optimized at detuning Δ=0\Delta=0 and works poorly at Δ=±δ\Delta=\pm\delta. Write a simple robust objective using three detunings.

Solution

One simple choice is an equally weighted infidelity average:

Jrob=13[1−F−δ+1−F0+1−F+δ]+λP[u].J_{\mathrm{rob}} = \frac13 \left[ 1-F_{-\delta} + 1-F_0 + 1-F_{+\delta} \right] + \lambda P[u].

Equivalently,

Jrob=1−F−δ+F0+F+δ3+λP[u].J_{\mathrm{rob}} = 1 - \frac{ F_{-\delta}+F_0+F_{+\delta} }{3} + \lambda P[u].

The optimized pulse should then be tested at additional detunings not included in the three-point training set.

  • C. Brif, R. Chakrabarti, and H. Rabitz, “Control of quantum phenomena: past, present and future,” New Journal of Physics 12, 075008 (2010).
  • D. D’Alessandro, Introduction to Quantum Control and Dynamics, Chapman and Hall/CRC (2007).
  • N. Khaneja, T. Reiss, C. Kehlet, T. Schulte-Herbrüggen, and S. J. Glaser, “Optimal control of coupled spin dynamics: design of NMR pulse sequences by gradient ascent algorithms,” Journal of Magnetic Resonance 172, 296–305 (2005).
  • S. J. Glaser, U. Boscain, T. Calarco, C. P. Koch, W. Kockenberger, R. Kosloff, I. Kuprov, B. Luy, S. Schirmer, T. Schulte-Herbrüggen, D. Sugny, and F. K. Wilhelm, “Training Schrödinger’s cat: quantum optimal control,” European Physical Journal D 69, 279 (2015).
  • V. F. Krotov, Global Methods in Optimal Control Theory, Marcel Dekker (1996).
  • T. Schulte-Herbrüggen, A. Spörl, N. Khaneja, and S. J. Glaser, “Optimal control for generating quantum gates in open dissipative systems,” Journal of Physics B 44, 154013 (2011).

Molecular Control Frontiers tracks current evidence for hardware-aware pulse optimization, transfer between instruments, molecular wavepacket steering, and product-selective control. The objective functions, adjoint methods, constraints, robustness ensembles, and validation principles developed here remain canonical.