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 gives
Thus . 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.