Solution (source code)

= Solution

In <adaptive experimental quantum control>, parametrize a reproducible pulse by a finite real vector $c$, for example $f_c(t)=\sum_{j=1}^pc_jB_j(t)$ in a calibrated waveform basis. Prepare the same initial state for each trial, apply that pulse without feedback during the run, and estimate the objective $J(c)$ from repeated measurements. No accurate dynamical model is required if the laboratory can evaluate the objective.

One concrete algorithm is experimental finite-difference <gradient ascent>. For every parameter, run trials at $c\pm\delta e_j$ and estimate
$$
g_j\simeq\frac{\overline J(c+\delta e_j)-\overline J(c-\delta e_j)}{2\delta}.
$$
Update $c$ to an admissible projection of $c+\eta g$, test the new pulse, and reduce the step size if performance deteriorates. Averaging many shots controls statistical noise; choose $\delta$ large enough for the difference to exceed the measurement uncertainty but small enough to approximate a <derivative>. Repeat until no statistically significant improvement remains. Multiple starting pulses help explore distinct basins, but this does not guarantee a global optimum. Resource penalties and hardware restrictions belong in the objective or the admissible parameter set.

The feedback is across experimental runs: a measured objective chooses the next pulse. Each individual trial is <open-loop control>. This distinction matters because the algorithm does not require an instantaneous nondestructive state measurement on the system being controlled.