A quantum optimal control problem specifies a terminal task, admissible fields and resource costs. Pure-state transfer can minimize ; mixed-state transfer on an accessible spectral orbit can minimize ; preparing an observable value can minimize . A gate task can minimize for an -dimensional Hilbert space, which is insensitive to an overall phase. These different terminal functions encode different tasks even when the dynamics are the same. Fluence penalties, amplitude bounds, bandwidth limits, or the total duration can be added to express experimental requirements.
For example, minimize
subject to and a specified . For a closed system, ; for an open system add the known Lindblad equation dissipator. Introducing a Hermitian costate and taking the Hilbert-Schmidt inner product gives the forward and backward equations and functional gradient
For Hamiltonian controls the second term is . The adjoint is defined by the Hilbert-Schmidt inner product; in particular, the closed-system costate equation is , integrated backward from its terminal condition. An unconstrained interior optimum has zero gradient; amplitude constraints replace this by the corresponding constrained first-order conditions.
Numerically, represent the fields by piecewise constant amplitudes on slices, or by a finite basis such as splines or Fourier modes. For piecewise constant closed-system dynamics, and . Forward products and backward costates provide all slice derivatives in one pair of propagations. In gradient ascent pulse engineering, update these amplitudes to improve the chosen objective, with projection onto amplitude bounds if needed. The exact slice derivative is the derivative of the matrix exponential
Replacing it by is only a short-slice approximation when and do not commute. Other gradient descent or nonlinear optimization methods can optimize the same finite parameter set; direct-adjoint looping avoids a separate dynamical simulation for each control coefficient.
A pulse is accepted after propagation with the actual constrained waveform confirms its terminal error and resource use. Sampling model uncertainties in the objective can favor robust pulses. Nonconvexity means a numerical stationary point need not be a global optimum, so initial guesses, convergence tolerances and a sufficiently resolved time grid matter.
At a fixed , write and . Differentiating the matrix exponential in the direction gives
The order of factors matters because matrix multiplication need not be commutative.
To prove the derivative of the matrix exponential formula, expand its power series. The coefficient linear in in is . On bounded sets of matrices, the exponential series and its directional derivative series converge uniformly: the latter is dominated in operator norm by . Terms with two or more factors have sum locally. Hence the derivative is
On the other hand, the integral in the box expands absolutely as
The integral identity follows by repeated integration by parts. Grouping by gives the same derivative. Finally differentiability means ; the locally bounded derivative of the exponential sends the error to , proving the chain rule even when is not continuous. If , the formula simplifies to .