Direct-adjoint looping Created 2026-10-06 Updated 2026-10-07
Direct-adjoint looping repeatedly integrates a constrained state equation forward, integrates its costate or formal adjoint backward using terminal data, extracts the control gradient, and updates the control input within its constraints. It gives a practical route to local optimization but does not by itself prove a global minimum.
Hamiltonian of an optimal-control problem 2026-10-05
In a normal minimization convention for optimal control, the running cost and dynamics define . The multiplier is a costate; this Hamiltonian is a device for variational necessary conditions rather than necessarily a physical energy.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 60 4 a Solution Created 2026-10-03 Updated 2026-10-14
The terminal term is the objective reward. With the Hilbert-Schmidt inner product , a Hermitian target observable gives its final expected value. The vector is the density operator represented as a vector in operator space; it retains the same physical content as the density matrix, not a wavefunction of the system.
The term imposes the dynamical equation by a time-dependent costate . It is a Lagrange-multiplier operator in the same operator space, propagated backward from a terminal condition. It is not required to be a positive, trace-one density matrix. DefineThen the enforced state equation is . The uncontrolled coherent part is , the dissipative contribution is , and each describes a control coupling. For Quantum Hamiltonian control, .
The term is a quadratic field-energy or fluence penalty. For the positive scale and positive weights , larger make a given control amplitude more costly. Thus maximizing trades terminal performance against control fluence while enforcing the dynamics. The multiplier term vanishes on any dynamically feasible trajectory. The weights do not represent decoherence rates; they specify control-resource preferences.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 60 4 b Solution Created 2026-10-03 Updated 2026-10-14
At an unconstrained differentiable extremum the first variation vanishes independently with respect to the state, costate and real controls, with initial state fixed. For the real functional, take the real Hilbert-Schmidt pairing when necessary. The Euler-Lagrange equations are most clearly written using the forward generator :Here the dagger is the adjoint for the Hilbert-Schmidt inner product, and is the vectorized terminal observable. Equivalently,The adjoint is essential if is not self-adjoint: dissipative costate evolution must not be replaced by the forward dissipator.
For each unconstrained real field, stationarity givesThus . For Hermitian state and costate with Quantum Hamiltonian couplings, the contraction before taking its imaginary part is purely imaginary, and this is a real field. These are the Liouville-space costate equations for quantum optimal control.
Forward state propagation, backward costate propagation, and the control stationarity equations must be solved together. They give necessary conditions, not a certificate of global optimality. For a local maximum the second variation on admissible perturbations is nonpositive. If amplitude or bandwidth constraints are imposed, the unrestricted pointwise field equation must be replaced by the corresponding constrained stationarity condition.
Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 60 4 Solution Created 2026-10-03 Updated 2026-10-14
An open-loop control is computed from a dynamical model and the initial preparation, then applied without changing it in response to measurements during that run. Controllability determines which transformations are possible in principle; field design must also account for duration, available control generators, amplitude and bandwidth limits, and calibration errors.
Three useful model-based strategies are the following. Resonant quantum control chooses carrier frequencies and phases to select transitions, and uses quantum pulse area or elementary rotation gates to compile the desired transformation. Adiabatic quantum control chooses a slowly varying path of Quantum Hamiltonians whose relevant eigenstate connects the initial and target states, maintaining a sufficiently large spectral gap. Quantum optimal control parametrizes or varies the fields and maximizes a fidelity or observable objective, while penalizing resources and enforcing the dynamical equations. These can all produce predetermined laboratory waveforms; experimental feedback is a separate design choice.
For a detailed variational construction, letChoose a positive target observable , for example for pure-state transfer. MaximizeThe terminal term is the target probability or observable expectation, and the quadratic integral penalizes field energy. A costate enforces the Schrödinger equation through the real augmented functionalVariation in recovers the state equation. Integrating the variation in by parts gives the terminal boundary term and the interior adjoint equation. Thus the Euler-Lagrange conditions areThe costate obeys the same Hamiltonian equation but is propagated backward from its terminal value. The field variation isHence the variational costate gradient for Hamiltonian quantum control isAt an unconstrained stationary field,These equations couple forward and backward boundary data, so this is not a single initial-value integration, nor a direct feedback law for an unknown experimental state.
A practical direct-adjoint looping algorithm starts from an admissible trial field. Propagate forward and store its trajectory; set and propagate backward; compute along the two trajectories; then update for a positive step size . A line search evaluates the actual objective and decreases until the ascent condition is met. Project into the admissible amplitude range or optimize a finite Fourier or pulse basis to enforce bandwidth constraints. Repeat until the projected gradient and change in objective are small. Repeated initializations help explore different local optima; the stationarity equations alone do not guarantee a global optimum.
For a piecewise constant discretization, define and . Forward multiplication gives the state trajectory; backward multiplication gives the costate. The exact matrix-exponential derivative isThis supplies accurate discrete gradients even when and do not commute. The small-step expression is only an approximation. Forward/backward factorization is the basis of gradient ascent pulse engineering. For a full-gate objective, propagate all basis columns or itself and use a terminal objective such as the phase-insensitive unitary gate error; optimizing one state alone does not implement a prescribed operation on every input.
To implement the result, convert the optimized envelope and quadratures into the calibrated electric or magnetic drive fields. An arbitrary-waveform source can set time-domain quadratures; optical spectral pulse shaping applies a complex mask to the available pulse spectrum,using, for example, a 4f pulse shaper and spatial light modulator. Finite spectral support, mask resolution and actuator limits must be included in the optimization: smoothing an unconstrained optimum afterward may spoil it. Simulating the calibrated final pulse, optionally over an ensemble of detunings or calibration errors, checks its predicted fidelity and robustness. The computed fields are then executed as open-loop control, with all measurements used for later calibration rather than an assumed instantaneous state readout.
Past exam of the mathematics course of the University of Cambridge 2007 ii Paper 2 29I Solution Created 2026-09-24 Updated 2026-10-14
For fixed terminal time and fixed endpoint, use the maximizing form of the Pontryagin maximum principle. For dynamics and running cost , there are multipliers , not all zero, with , and Hamiltonian of an optimal-control problem . Along an optimum, , , and the chosen control maximizes over admissible controls almost everywhere. Fixed terminal state imposes no prescribed terminal value of ; fixed time imposes no free-time condition . The normal case scales ; abnormal extremals have .
For this problem the normal Hamiltonian of an optimal-control problem isMaximization gives , . The costate equations give , , hence , . Nonzero velocities rotate at constant angular rate, and rotational symmetry permits , . For a closed path, , with integer . Then , so the required positive endpoint has , and cost .
To prove a global minimum rather than only classify stationary extremals, write and subtract its time average; this changes neither its derivative nor . The resulting closed mean-zero path satisfies the periodic Wirtinger inequality . This follows immediately by its Fourier expansion: each nonzero mode of the derivative has squared multiplier at least . The Cauchy-Schwarz inequality now givesThe argument extends to square-integrable controls by the periodic Sobolev/Fourier interpretation. Thus the cost is at least for every feasible control. Equality is attained byThese satisfy every endpoint and have cost . Therefore the minimum is , an area-constrained quadratic control cost. The global inequality also prevents an overlooked abnormal candidate from lowering it; in fact an abnormal finite maximizing Hamiltonian of an optimal-control problem would force both linear control coefficients to vanish and then force zero velocity, incompatible with .
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 61 3 c Solution Created 2026-10-03 Updated 2026-10-14
For a concrete variational method, maximize the terminal-observable objective with a fluence penalty,where weights the control cost. Enforce the dynamics with a complex costate and the real augmented functionalVariation of restores the state equation. Integrate the variation by parts; because , the terminal coefficient gives , and the interior coefficient givesThis equation has final data, so it is integrated backward. Variation of the real control gives the variational costate gradient for Hamiltonian quantum controlIn particular an unconstrained stationary pulse satisfies . The state, adjoint and control equations form a coupled two-boundary-value problem, so the stationarity formula is not an independent explicit solution for .
Use direct-adjoint looping: start from an admissible pulse, propagate the state forward, set the terminal costate, propagate it backward, compute the gradient on the time grid, and update the pulse with an ascent step and line search. Project amplitude bounds and impose bandwidth constraints within the parametrization or update. Repeat until the projected gradient is small. For gate objectives the forward variable is the propagator and the costate is matrix-valued; for mixed-state objectives it is the density operator. Gradient ascent pulse engineering applies the same efficient forward/backward differentiation to time-slice amplitudes. The variational conditions identify local stationary controls and require numerical convergence checks; they do not prove global optimality of a nonconvex control landscape.
Past exam of the mathematics course of the University of Cambridge 2009 ii Paper 4 28I a Solution Created 2026-09-24 Updated 2026-10-14
Maximize . Along the positive- trajectory use Hamiltonian of an optimal-control problem . The terminal costate is , andThus . Maximizing over gives as long as . The state equation integrates to , and the adjoint equation gives , validating the maximization. HenceThis is globally optimal, not just an extremal: whenever , . If a competitor reaches and later becomes positive, apply that bound after its last zero; it has even less remaining time to attain a positive terminal height. A negative terminal height cannot improve this positive maximum. Therefore the minimum objective is .
Past exam of the mathematics course of the University of Cambridge 2009 ii Paper 4 28I b Solution Created 2026-09-24 Updated 2026-10-14
The fixed terminal height makes , so this is a minimum-time problem. An optimal path can be taken entirely in . To justify the positive- calculation despite the absolute value in the dynamics, the time of a spatial path is its length in the metric . Reflection to preserves this time; clipping the reflected height below to leaves the endpoints unchanged and cannot increase time, since it decreases vertical length and increases the speed available. Any excursion below strictly wastes time. Thus an optimum does not meet .
Use . Its maximum is , attained atThe costate equations and free-terminal-time transversality condition giveThe last identity holds throughout because the maximized autonomous Hamiltonian is constant. An abnormal extremal would instead have maximized Hamiltonian , forcing both costates to vanish and contradicting their nontriviality. Thus the normal choice is valid. Also , since otherwise cannot reach one; in fact because has its constant sign.
Now express both requested derivatives using the costates:Consequently the optimal trajectory satisfiesThe maximizing controls above and the fixed endpoints determine the relevant extremal; the displayed equation is the requested necessary trajectory equation.
Past exam of the mathematics course of the University of Cambridge 2009 ii Paper 4 28I Solution 2026-10-14
Pontryagin maximum principle leaves the initial costate unknown. Terminal conditions determine these unknown constants and, when terminal time is free, the time. In a maximization convention with terminal reward and running cost , use . A free terminal coordinate gives ; a fixed terminal coordinate instead allows a constraint multiplier. More generally is normal to the permitted terminal manifold. The free-terminal-time transversality condition is . These conditions convert the adjoint and state equations into a boundary-value problem. Reversing the costate sign gives the equivalent minimization convention.
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 50 1 d Solution Created 2026-10-03 Updated 2026-10-14
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, minimizesubject 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 gradientFor 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 exponentialReplacing 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.
Past exam of the mathematics course of the University of Cambridge 2017 ii Paper 4 29K Solution Created 2026-09-24 Updated 2026-10-05
Assume a finite optimum with and continuous price near its completion time. With costate for the remaining-file state, the minimization Hamiltonian of an optimal-control problem is . It is independent of , so is constant. By the Pontryagin maximum principle, pointwise minimization over givesThis is a bang-bang control away from equality. At equality partial transmission or either endpoint rate is allowed. This also follows by exchanging a small amount of transmission from a more expensive time to a cheaper unused time. The free-terminal-time transversality condition is . Since , it forces and terminal transmission at rate one, yieldingWithout regularity/existence hypotheses an arbitrary known price need not have a finite differentiable optimum; the equality is the interior terminal-time condition used here.
For , , feasible completion requires for finite cost. The price decreases to its minimum at one and then increases. Its cheapest unrestricted interval of length one has endpoints of equal price, giving and . For , the cheapest length-one subset of is the terminal interval : its left endpoint has at least the price of its right endpoint, and the earlier times are still more expensive. For the transmission minimum is unchanged from that unrestricted interval, while the delay cost increases, so no optimum lies beyond .
For the terminal-interval policy the total cost isIts derivative is strictly increasing on , since . It is negative near one and positive at , so the unique global optimum isThere is exactly one positive root: none lies in because the left side is negative, and the strictly monotone comparison gives exactly one in . Its threshold is .
Pontryagin maximum principle 2026-10-05
For a regular finite-horizon optimal control problem, an optimal trajectory admits nontrivial multipliers and a costate obeying adjoint equations, together with pointwise optimization of the Hamiltonian of an optimal-control problem. In the normal minimization convention , the conditions are , and minimization of over admissible controls; endpoint and state constraints change the terminal conditions. Abnormal extremals use a zero cost multiplier and must not be silently excluded.
Quantum optimal control 2026-10-14
Quantum optimal control minimizes a state-transfer, observable, or gate error together with resource costs, subject to a controlled Schrödinger equation or Lindblad equation. Forward propagation of the state and backward propagation of a costate compute the gradient efficiently. The optimum depends on the admissible time-dependent fields and laboratory constraints.
For and , enforce the state equation with . Variation gives the same Schrödinger equation for the costate, propagated backward from . Control variation gives the displayed real gradient. Forward state propagation, backward costate propagation, and a constrained gradient update form direct-adjoint looping. These are necessary stationarity equations, not a guarantee of a global optimum.