= Solution
For the first two targets assume $N\ge5$, so the indexed levels exist. A possible <level population> reward is
$$
\boxed{\mathcal A_1[\rho]=\operatorname{Tr}(|5\rangle\langle5|\rho(10))=\rho_{55}(10).}
$$
It selects $\widehat A=|5\rangle\langle5|$ and $t_F=10$.
For the coherent target, use its rank-one <orthogonal projector>, not the sum of its two <level populations>:
$$
\begin{aligned}
\widehat A_2&=|\Psi\rangle\langle\Psi|
=\frac12\big(|1\rangle\langle1|+|5\rangle\langle5|+i|1\rangle\langle5|-i|5\rangle\langle1|\big),\\
\mathcal A_2[\rho]&=\operatorname{Tr}(\widehat A_2\rho(100))
=\boxed{\frac12\big(\rho_{11}(100)+\rho_{55}(100)+2\operatorname{Im}\rho_{15}(100)\big)}.
\end{aligned}
$$
The imaginary <quantum coherence> term fixes the desired relative phase $-i$. Maximizing <level populations> alone would not select this superposition.
For energy, choose a specified final energy observable $H_F$:
$$
\boxed{\mathcal A_3[\rho]=\operatorname{Tr}(H_F\rho(t_F)).}
$$
For stored energy after the control is switched off, $H_F=H_0$ is the natural choice. If a fixed external field remains, use that known final <Quantum Hamiltonian> instead. If the terminal <Quantum Hamiltonian> itself is varied through the controls, the objective has explicit control dependence and additional terminal derivatives must be included. Each reward can be combined with the given dynamics and fluence penalty as $J_j=\mathcal A_j-\mathcal D-\mathcal C$.
Back to article page