# Optimal Control for Quantum Metrology via Pontryagin’s principle

Chungwei<EMAIL_ADDRESS>Yanting Ma1, Dries Sels2,3,4 1Mitsubishi
Electric Research Laboratories, 201 Broadway, Cambridge, MA 02139, USA
2Department of physics, Harvard University, Cambridge, MA 02138, USA
3Department of physics, New York University, New York City, NY 10003, USA
4Center for Computational Quantum Physics, Flatiron Institute, 162 5th Ave,
New York, NY 10010, USA

###### Abstract

Quantum metrology comprises a set of techniques and protocols that utilize
quantum features for parameter estimation which can in principle outperform
any procedure based on classical physics. We formulate the quantum metrology
in terms of an optimal control problem and apply Pontryagin’s Maximum
Principle to determine the optimal protocol that maximizes the quantum Fisher
information for a given evolution time. As the quantum Fisher information
involves a derivative with respect to the parameter which one wants to
estimate, we devise an augmented dynamical system that explicitly includes
gradients of the quantum Fisher information. The necessary conditions derived
from Pontryagin’s Maximum Principle are used to quantify the quality of the
numerical solution. The proposed formalism is generalized to problems with
control constraints, and can also be used to maximize the classical Fisher
information for a chosen measurement.

##  I Introduction

Modern quantum technology Nielsen and Chuang (2011); Kaye et al. (2007); Shor
(1997); Caves and Drummond (1994); Braunstein and van Loock (2005);
Collaboration (2011) requires manipulating the wave function to achieve
performance beyond the scope of classical physics. A typical quantum task
starts from an easily prepared initial state, undergoes a designed control
protocol, and hopefully ends up with a state sufficiently close to the target
state. When the closeness to the target state can be quantified by a scalar
metric (a terminal cost function), the quantum task can be formulated as an
optimal control problem – one tries to find the best control protocol that
maximizes the performance metric for given resources. Many quantum
applications (or at least an intermediate step of the application) fit this
description. Important examples include quantum state preparation Bao et al.
(2018); Omran et al. (2019); Jirari and Pötz (2006); Friis et al. (2018);
Doherty et al. (2014); Van Damme et al. (2014); Pichler et al. (2016) where
the cost function is the overlap to the known target state, the “continuous-
time” variation-principle based quantum computation Farhi et al. (2000);
Rezakhani et al. (2009); Zhuang (2014); Peruzzo et al. (2014); O’Malley et al.
(2016) where the cost function is the ground state energy, and quantum
parameter estimation (quantum metrology) Helstrom (1976); Holevo (2011);
Giovannetti et al. (2006); Brif et al. (2010); Glaser et al. (2015);
Giovannetti et al. (2011); Tsang et al. (2016); Zhuang et al. (2017); Pezzè et
al. (2018); Zhou et al. (2020); Haine (2013); Sekatski et al. (2017); Gefen et
al. (2017); Rembold et al. (2020); Tóth et al. (2020) where the cost function
is the Fisher information. Maximal Fisher information has been used for
optimal estimation of Hamiltonian parameters Pang and Jordan (2017);
Kaubruegger et al. (2019); Haine and Hope (2020); Koczor et al. (2020).
Numerically, the Fisher information can be optimized by e.g. GRAPE (GRadient
Ascent Pulse Engineering Khaneja et al. (2005)) both for single and multiple
parameter estimations in the presence of noise Liu and Yuan (2017a, b);
Basilewitsch et al. (2020); Liu et al. (2019). The Fisher information has also
been used to quantify the precision to which certain parameters of external
signals (external to the sensing qubit) can be measured Hyllus et al. (2010);
Poggiali et al. (2018); Müller et al. (2018). For quantum metrology
application, optimal control has been applied to the preparation of entangled
superposition states that are required for optimal measurement, e.g., squeezed
spin states Huang and Moore (2008); Pichler et al. (2016) or Ramsey
interferometry with BEC on atom-chips Lovecchio et al. (2016); van Frank et
al. (2014).

Pontryagin’s Maximum Principle (PMP) Pontryagin (1987); Sussmann (1987);
Luenberger (1979); Heinz Schattler (2012) is a powerful tool in classical
control theory, and it has been applied to quantum state preparation Bao et
al. (2018); Lin et al. (2020) and non-adiabatic quantum computation Yang et
al. (2017); Lin et al. (2019). In essence, PMP adopts the variational
principle to derive a set of necessary conditions for the optimal control. In
particular, it provides an efficient way to compute the gradient of the cost
function with respect to the control field as well as the evolution time by
introducing an auxiliary system (described by costate variables) that follows
the dynamics similar to the original problem. When the system degrees of
freedom are small (such as a single qubit), these necessary conditions are
very restrictive and analytical solutions can sometimes be constructed Bao et
al. (2018); Lin et al. (2019, 2020). For systems of higher dimensions, these
necessary conditions become less informative but the efficient procedure of
computing gradient is still useful for numerical solutions. Moreover, PMP
optimality conditions are valuable in quantifying the quality of a numerical
solution and can be done with almost no extra computational overhead. In this
work, we extend PMP to quantum metrology applications where the natural choice
of the terminal cost function is the quantum/classical Fisher information
(QFI/CFI). The fact that QFI/CFI involves a derivative with respect to the
external parameter causes some non-trivial complications. To properly use PMP,
we devise an augmented dynamical system that involves the variables appearing
in QFI, based on which the switching functions can be stably and efficiently
obtained. With the provided formalism, we are able to numerically demonstrate
that the optimal control indeed satisfies all the necessary conditions of PMP.

The rest of the paper is organized as follows. First we describe the concrete
problem and review the necessary background of PMP. We then introduce the
augmented dynamics that is designed for QFI and CFI. The formalism will be
applied to a few problems, including maximizing QFI within a given control
constraint and maximizing CFI for a given measurement basis. A short
conclusion is provided in the end.

##  II Problem and augmented dynamics for PMP

The concrete problem we consider is the “twist and turn” Hamiltonian Pezzè et
al. (2018); Hayes et al. (2018); Haine and Hope (2020)

$H(t)=\chi\hat{J}_{z}^{2}+\omega\hat{J}_{z}+\Omega(t)\hat{J}_{x},$ (1)

with $[\hat{J}_{i},\hat{J}_{j}]=i\,\epsilon_{ijk}\hat{J}_{k}$ ($i=x,y,z$)  and
the initial state the non-entangled maximum-eigenvalue state of $\hat{J}_{x}$,
denoted as $|\Psi_{\text{coh-x}}\rangle$. The potential physical realizations
include interacting (generalized) spins Kaubruegger et al. (2019); Zhou et al.
(2020), the two-arm interferometer Tóth (2012); Yurke et al. (1986), and
superradiance Dicke (1954); Gross and Haroche (1982). The goal of the control
is to efficiently estimate the parameter $\omega$ (around zero) in Eq. (1),
i.e., to produce a final state $|\psi(T)\rangle$ over the total evolution time
$T$ that is as sensitive as possible to the change of the parameter $\omega$
around zero. The quantitative metric is QFI:

$\mathcal{F}_{Q}(|\psi(T)\rangle)=4\left[\langle\partial_{\omega}\psi(T)|\partial_{\omega}\psi(T)\rangle-|\langle\psi(T)|\partial_{\omega}\psi(T)\rangle|^{2}\right].$
(2)

In Eq. (1), $\hat{J}_{z}^{2}$ is the source of entanglement and referred to as
a “twist” term; $\hat{J}_{x}$ is the external control and referred to as a
“turn” term. For eigenstates of $\hat{J}_{z}$, denoted as $|m\rangle_{z}$,
$\hat{J}_{z}^{2}$ determines their relative phases but not amplitudes whereas
$\hat{J}_{x}$ determines their relative amplitudes but not phases. The optimal
control problem is to find an $\Omega(t)$ that steers
$|\psi(0)\rangle=|\Psi_{\text{coh-x}}\rangle$ to a final state
$|\psi(T)\rangle$ that maximizes QFI at a given terminal time $T$. Using the
terminology of control theory, Eq. (1) is control-affine as it depends
linearly on the control $\Omega(t)$, and is time-invariant as  the time
dependence of $H(t)$ is exclusively through the control $\Omega(t)$.

Hamiltonian (1) represents a set of $N$ all-to-all interacting spins where
$\hat{J}_{i}=\sum_{n=1}^{N}\frac{\sigma_{i}}{2}$ ($i=x,y,z$ and $\sigma$’s are
Pauli matrices). For a system composed of $N$ spins, QFI$(t)$ = $Nt^{2}$ is
referred to as the “shot-noise” limit (SNL) which can be achieved without any
quantum entanglement; QFI$(t)$ = $N^{2}t^{2}$ as the Heisenberg’s limit (HL)
which is the upper bound of QFI and is achieved by preparing the initial state
as $|\Psi_{\text{HL}}\rangle=(|M\rangle_{z}+|-M\rangle_{z})/\sqrt{2}$ with
$|\pm M\rangle_{z}$ the largest/smallest-eigenvalue eigenstate of
$\hat{J}_{z}$ (the maximum eigenvalue $M=N/2$) Giovannetti et al. (2006). A
system displays quantum enhancement when QFI is larger than SNL. One of the
key insights from Haine and Hope in Ref.Haine and Hope (2020) is that for a
limited evolution time $T$, the process of state preparation (i.e., to produce
an entangled state) should also be regarded as a degree of freedom to maximize
QFI. This becomes essential when $T$ is too short (small $N\chi T$) to produce
a highly entangled state.

To compute QFI we need $|\partial_{\omega}\psi(T)\rangle$ which can be
obtained by evolving $|\partial_{\omega}\psi(t)\rangle$ via the differential
equation
$\partial_{t}|\partial_{\omega}\psi(t)\rangle=-i\hat{J}_{z}|\psi(t)\rangle-
iH(\omega,t)|\partial_{\omega}\psi(t)\rangle$ and the initial condition
$|\partial_{\omega}\psi(t=0)\rangle=0$. To apply PMP, we regard $|\psi\rangle$
and $|\partial_{\omega}\psi\rangle$ as independent dynamical variables.
Denoting $|\psi\rangle$ as $|\psi_{0}\rangle$, $|\partial_{\omega}\psi\rangle$
as $|\psi_{1}\rangle$, the augmented dynamics satisfies

$\displaystyle\partial_{t}\begin{bmatrix}|\psi_{0}\rangle\\\
|\psi_{1}\rangle\end{bmatrix}=\begin{bmatrix}-iH(\omega)&0\\\
-i\hat{J}_{z}&-iH(\omega)\end{bmatrix}\begin{bmatrix}|\psi_{0}\rangle\\\
|\psi_{1}\rangle\end{bmatrix}.$ (3)

The initial augmented state is
$(|\psi_{0}\rangle,|\psi_{1}\rangle)=(|\Psi_{\text{coh-x}}\rangle,0)$. The
terminal cost function (to minimize) is

$\mathcal{C}_{\text{Q}}=-(\langle\psi_{1}(T)|\psi_{1}(T)\rangle-|\langle\psi_{1}(T)|\psi_{0}(T)\rangle|^{2}\rangle),$
(4)

which, up to a positive factor, is the negative QFI. The subscript ’Q’
indicates the quantum case.

Given a dynamical system Eq. (3), PMP introduces a set of auxiliary costate
variables based on which the switching function and control Hamiltonian
(c-Hamiltonian) are defined. Following the standard procedure Bao et al.
(2018); Lin et al. (2019, 2020); Luenberger (1979), we denote
$|\pi_{0}\rangle$ and $|\pi_{1}\rangle$ as the costate variables (in the form
of wave function) of $|\psi_{0}\rangle$ and $|\psi_{1}\rangle$, and derive
their dynamics as

$\partial_{t}\begin{bmatrix}|\pi_{0}\rangle\\\
|\pi_{1}\rangle\end{bmatrix}=\begin{bmatrix}-iH(\omega)&-i\hat{J}_{z}\\\
0&-iH(\omega)\end{bmatrix}\begin{bmatrix}|\pi_{0}\rangle\\\
|\pi_{1}\rangle\end{bmatrix},$ (5)

with the costate boundary conditions

$\displaystyle|\pi_{0}(T)\rangle$
$\displaystyle=\frac{\partial\mathcal{C}_{\text{Q}}}{\partial\langle\psi_{0}(T)|}=+|\psi_{1}(T)\rangle\langle\psi_{1}(T)|\psi_{0}(T)\rangle,$
(6) $\displaystyle|\pi_{1}(T)\rangle$
$\displaystyle=\frac{\partial\mathcal{C}_{\text{Q}}}{\partial\langle\psi_{1}(T)|}=-|\psi_{1}(T)\rangle+|\psi_{0}(T)\rangle\langle\psi_{0}(T)|\psi_{1}(T)\rangle.$

Note that $\langle\psi_{0}(t)|\psi_{1}(t)\rangle=0$ when $\omega=0$. The
switching function $\Phi(t)$ and c-Hamiltonian $\mathcal{H}_{c}(t)$ are

$\displaystyle\Phi(t)$
$\displaystyle=\text{Im}\left\\{\begin{bmatrix}\langle\pi_{0}|&\langle\pi_{1}|\end{bmatrix}\begin{bmatrix}\hat{J}_{x}&0\\\
0&\hat{J}_{x}\end{bmatrix}\begin{bmatrix}|\psi_{0}\rangle\\\
|\psi_{1}\rangle\end{bmatrix}\right\\},$ (7) $\displaystyle\mathcal{H}_{c}(t)$
$\displaystyle=\text{Im}\left\\{\begin{bmatrix}\langle\pi_{0}|&\langle\pi_{1}|\end{bmatrix}\begin{bmatrix}H(\omega)&0\\\
\hat{J}_{z}&H(\omega)\end{bmatrix}\begin{bmatrix}|\psi_{0}\rangle\\\
|\psi_{1}\rangle\end{bmatrix}\right\\}.$

According to PMP, $\Phi(t)\sim\frac{\delta\mathcal{C}}{\delta\Omega(t)}$ and
$\mathcal{H}_{c}\sim\frac{\partial\mathcal{C}}{\partial T}$. The necessary
conditions for an optimal control $\Omega(t)$ are (i) $\Phi(t)=0$ and (ii)
$\mathcal{H}_{c}(t)$ is a constant over the entire evolution time $T$
Luenberger (1979); Heinz Schattler (2012). Condition (i) is general (optimal
solution requires a zero gradient with respect to the cost function) whereas
condition (ii) is specific to time-invariant control problems; both can be
served to quantify the control quality. Practically, $\Phi(t)$ can be used in
the gradient-based optimization algorithm (i.e.,
$\Omega(t)\rightarrow\Omega(t)-\gamma\Phi(t)$ with a learning rate $\gamma$)
for numerical solutions. The sign of $\mathcal{H}_{c}(t)$ tells if increasing
the evolution time $T$ reduces ($\mathcal{H}_{c}(t)<0$) or increases
($\mathcal{H}_{c}(t)>0$) the terminal cost function Lin et al. (2020). In all
our simulations, $\mathcal{H}_{c}(t)<0$ meaning increasing the evolution time
increases QFI. This holds for unitary dynamics but is not expected to be the
case in the presence of quantum decoherence.

Three general remarks are pointed out. First, as the dynamics based on
Schrödinger equation [Eq. (1)] is typically control-affine, the optimal
control is expected to contain some “bang” sector(s) Yang et al. (2017); Bao
et al. (2018); Lin et al. (2019, 2020). Based on the control theory, this
expectation requires a terminal cost function that is also linear in
$|\psi(T)\rangle$, which is true when using the fidelity as the terminal cost
for a known target state Bao et al. (2018); Lin et al. (2019, 2020). As QFI is
quadratic in the final state, the optimal control is not expected to be bang-
bang in general. Second, the augmented dynamics (3) is non-unitary. This is
not essential for the formalism but imposes demands on the numerical ODE
(ordinary differential equation) solver. In the implementation we express the
dynamics using real-valued variables and use the explicit Runge-Kutta method
of order 5 as the ODE solver. Finally, the proposed formalism regards
$|\psi\rangle$, $|\partial_{\omega}\psi\rangle$ as independent dynamical
variables and introduces $|\lambda_{0}\rangle$, $|\lambda_{1}\rangle$ as their
corresponding costate variables.  Compared to the GRAPE algorithm where
computing the gradient $\frac{\delta\mathcal{C}}{\delta\Omega(t)}$ at each $t$
requires an integration over time (Appendix of Ref. Liu and Yuan (2017a)), in
the proposed formalism the gradient
$\frac{\delta\mathcal{C}}{\delta\Omega(t)}\sim\Phi(t)$ is local in time [Eq.
(7)], greatly reducing the computation complexity.  We notice that the forward
augmented dynamics alone [Eq. (3)] can be used to compute the gradients with
respect to multiple control parameters Kuprov and Rodgers (2009) and has been
applied to construct the optimal gate operations Kuprov and Rodgers (2009);
Machnes et al. (2018). Before moving to concrete examples we point out that
the model considered here [Eq. (1)] contains three parameters: the number of
spins $N$, the twist strength $\chi$, and the total evolution time $T$. In the
following discussions $T=1$ unless assigned specifically. We now apply the
formalism to analyze a few interesting cases.

##  III Applications

###  III.1 Convergence of optimal control

Figure 1:  The optimal controls using 8 (a), 16 (b), 32 (c), and 64 (d)
controls (time intervals) with $(N,\chi)=(20,4)$. Increasing the number of
controls reduces the magnitudes of the switching function and results in a
flatter negative c-Hamiltonian.

The control function $\Omega(t)$ is typically approximated by a piece-wise
constant function, i.e., $\Omega(t)=\Omega_{i}$ for $t\in[t_{i},t_{i+1})$,
with the evolution time $T$ divided into $N_{t}$ equal time intervals Khaneja
et al. (2005). As the first application, we investigate how the optimal QFI
converges upon increasing $N_{t}$ to approximate $\Omega(t)$. The motivation
is to quantify the solution quality from the smallness of the switching
function, which can be characterized by a mean and a standard deviation:

$\displaystyle\Phi_{\text{m}}$
$\displaystyle\equiv\frac{1}{T}\int_{0}^{T}dt\,\Phi(t),$ (8)
$\displaystyle\Phi_{\text{sd}}$
$\displaystyle\equiv\frac{1}{\sqrt{T}}\left[\int_{0}^{T}dt\,\Phi^{2}(t)\right]^{1/2}.$

The normalizations are chosen such that $\Phi_{\text{m}}$ and
$\Phi_{\text{sd}}$ have no dependence on $T$. For an optimal control,
$\Phi(t)=0$ so both $\Phi_{\text{m}}$ and $\Phi_{\text{sd}}$ vanish. When the
piece-wise constant function is approaching to the optimal solution,
$\Phi_{\text{m}}$ is also close to zero and the value of
$\Phi_{\text{sd}}(>0)$ can be used to characterize how good a solution is.

$(N,\chi)$ | QFI8/$\Phi_{\text{sd}}$ | QFI16/$\Phi_{\text{sd}}$ | QFI32/$\Phi_{\text{sd}}$ | QFI64/$\Phi_{\text{sd}}$
---|---|---|---|---
(10,4) | 80.16/8.96$\times 10^{-1}$ | 87.96/4.72$\times 10^{-2}$ | 88.15/3.00$\times 10^{-3}$ | 88.15/2.10$\times 10^{-3}$
(20,1) | 270.13/6.62$\times 10^{-1}$ | 273.19/4.34$\times 10^{-2}$ | 273.28/6.10$\times 10^{-3}$ | 273.28/5.55$\times 10^{-3}$
(20,2) | 320.38/1.72 | 330.26/3.00$\times 10^{-1}$ | 331.86/1.81$\times 10^{-2}$ | 331.88/1.00$\times 10^{-2}$
(20,4) | 223.31/7.95 | 341.35/1.11 | 356.37/3.2$\times 10^{-1}$ | 364.60/1.08$\times 10^{-2}$
(30,1) | 648.24/4.12 | 659.27/4.14$\times 10^{-1}$ | 661.74/4.04$\times 10^{-2}$ | 661.78/2.86$\times 10^{-2}$
Table 1: Optimal (maximum) QFI for different number of controls. The subscript
denotes the number of controls $N_{t}$; $\Phi_{\text{sd}}$ is defined in Eq.
(8). $(N,\chi)$=(10,4), (20,1), (20,2), (20,4), (30,1) are considered. For a
given $(N,\chi)$, a control resulting in a smaller standard deviation
$\Phi_{\text{sd}}$ has a larger QFI.

Table 1 summarizes the optimal QFI’s for $(N,\chi)$=(10,4), (20,1), (20,2),
(20,4), (30,1) using different number of controls and their corresponding
$\Phi_{\text{sd}}$’s. As expected, the control that results in a smaller
$\Phi_{\text{sd}}$ gives a larger QFI. Fig. 1 plots the optimal $\Omega(t)$
and the corresponding $\Phi(t)$ and $\mathcal{H}_{c}(t)$ for $(N,\chi)$=(20,4)
using 8, 16, 32, 64 controls. The optimal control using more time intervals
gives a smaller switching function and a flatter (negative) c-Hamiltonian.

Figure 2:  The optimal controls (blue, left axis), the overlap
$|\langle\psi_{\text{HL}}|\psi(t)\rangle|$ (red dashed, right axis), and
QFI/$(Nt)^{2}$ (red solid, right axis) for ($N$, $\chi$) = (20, 0.1) (a) and
(20,4) (b). In (a), $\Omega(t)$ is non zero during the whole evolution, and
the overlap to $|\psi_{\text{HL}}\rangle$ increases to $\lesssim 0.1$ around
$t=0.96$. In contrast in (b), the optimal control $\Omega(t)$ vanishes after
$t\gtrsim 0.18$ around which $|\langle\Psi_{\text{HL}}|\psi(t)\rangle|$ is
approaching one. 64 controls are used in these simulations. (c) The
dimensionless controls [Eq. (10)] for $(N,\chi)=$ (20,2), (20,4), (30,1),
(30,2), (40,1) and (50,1): they almost collapse to a single curve. (d) The
dimensionless controls using $|\Psi_{\text{HL}}\rangle$ as the target state
for $(N,\chi,T)=$ (20,2,1/4), (20,4,1/8), (30,1,1/3), (30,2,1/6), (40,1,0.26)
and (50,1,0.21). All overlaps $|\langle\Psi_{\text{HL}}|\psi(T)\rangle|$ are
larger than 0.985.

###  III.2 Strong twist limit

When $N\chi$ is large, the optimal control appears to be strong during early
evolution and vanish after a certain amount of time (the same observation is
also pointed out in Ref. Haine and Hope (2020)). This behavior can be
understood by invoking the state that achieves HL. If preparing
$|\psi_{\text{HL}}\rangle$ takes only a small fraction of the total evolution
time $T$, one way to maximize QFI is to first produce
$|\Psi_{\text{HL}}\rangle$ and then let system interact freely with the
environment. The resulting QFI is roughly $N^{2}(T-t_{\text{prep}})^{2}$ which
approaches the HL $N^{2}T^{2}$ when $T\gg t_{\text{prep}}$ ($t_{\text{prep}}$
is time to produce $|\psi_{\text{HL}}\rangle$). To see what the optimal
control does, Fig. 2(a) and (b) contrast the optimal controls for $\chi=0.1$
and 4 using $N=20$. For $\chi=0.1$, $\Omega(t)$ is non-zero over the entire
$T$; for $\chi=4$, $\Omega(t)$ vanishes around $t=0.18$. The overlap
$|\langle\psi_{\text{HL}}|\psi(t)\rangle|$ and the normalized QFI/$(Nt)^{2}$
are also provided. As $\hat{J}_{x}$ is the only term in Eq. (1) capable of
changing the $|m\rangle_{z}$ population, $\Omega(t)$ has to be non-zero to
change the overlap; once $\Omega(t)$ is zero the value of
$|\langle\psi_{\text{HL}}|\psi(t)\rangle|$ is fixed. For $\chi=0.1$ where the
entanglement source is too weak to bring the state close to
$|\psi_{\text{HL}}\rangle$, the control is always non-zero and
$|\langle\psi_{\text{HL}}|\psi(t)\rangle|$ gradually increases to $\lesssim
0.1$. For $\chi=4$ where the entanglement source is strong, the control steers
the state close to $|\psi_{\text{HL}}\rangle$ during $t\leq 0.18$ and then is
turned off; QFI is maximized via steering the state to
$|\psi_{\text{HL}}\rangle$ fast. This behavior appears to be general once
$N\chi$ is sufficiently large [Fig. 2(c)].

One can further analyze the the optimal control by expressing Eq. (1) at
$\omega=0$ as

$\displaystyle
i\partial_{t}|\psi\rangle=N\chi\left[\frac{\hat{J}_{z}^{2}}{N}+\frac{\Omega(t)}{N\chi}\hat{J}_{x}\right]|\psi\rangle$
(9) $\displaystyle\Rightarrow$ $\displaystyle
i\frac{\partial|\psi\rangle}{\partial(N\chi
t)}=\left[\frac{\hat{J}_{z}^{2}}{N}+\left(\frac{\Omega(t)}{N\chi}\right)\hat{J}_{x}\right]|\psi\rangle.$

with the given initial state $|\Psi_{\text{coh-x}}\rangle$. The additional
information in the strong $N\chi$ limit is that target state is also known, at
least approximately, to be $|\Psi_{\text{HL}}\rangle$. The second expression
of Eq. (9) is scaled such that the spectral ranges of $\hat{J}_{z}^{2}/N$ and
$\hat{J}_{x}$ are comparable for all $N$ and therefore $\Omega(t)/(N\chi)$
represents the $N$-independent strength ratio between the “twist” and “turn”.
Eq. (9) also introduces a dimensionless time $N\chi t$. Denoting
$\Omega_{N\chi}(t)$ to be the optimal control for a given $(N,\chi,T=1)$, we
define the corresponding dimensionless control as

$\bar{\Omega}_{N\chi}(t)\equiv\frac{\Omega_{N\chi}(N\chi t)}{N\chi}.$ (10)

Because of similar structures of the initial and target states for all $N$
(i.e., $|\Psi_{\text{coh-x}}\rangle$ is peaked at $|m=0\rangle_{z}$ and is
monotonously decreased as $|m|$ increases; $|\Psi_{\text{HL}}\rangle$ is only
non-zero at $|m=\pm N/2\rangle_{z}$), the dimensionless control
$\bar{\Omega}_{N\chi}(t)$ is expected to be only weakly dependent on $N\chi$.
Fig. 2(c) gives $\bar{\Omega}_{N\chi}(t)$ for $(N,\chi)=$ (20,2), (20,4),
(30,1), (30,2), (40,1) and (50,1): their optimal dimensionless controls [Eq.
(10)] to a good approximation collapse to a single curve. A direct consequence
is that the total input energy to maximize QFI, defined by
$\int_{0}^{T}dt\,\Omega(t)$, is roughly a constant.

To examine this picture more carefully, Fig. 2(d) shows the dimensionless
controls that maximize $|\langle\Psi_{\text{HL}}|\psi(T)\rangle|^{2}$ Lin et
al. (2019, 2020) for $(N,\chi,T)=$ (20,2,1/4), (20,4,1/8), (30,1,1/3),
(30,2,1/6), (40,1,0.26) and (50,1,0.21). The evolution time $T$ is chosen to
be close to and smaller than the optimal time (i.e. a $T$ such that
$\mathcal{H}_{c}$ being small and negative) and all overlaps
$|\langle\Psi_{\text{HL}}|\psi(T)\rangle|$ are larger than 0.985; note the
product $N\chi T\sim 10$. The optimal controls based on maximizing
$|\langle\Psi_{\text{HL}}|\psi(T)\rangle|^{2}$ [Fig. 2(d)] share the following
features: (i) $\Omega(t)$ has a peak around $N\chi$ at $t\sim T/3$; (ii)
$\Omega(t)$ increases drastically from $\Omega\sim 0$ around $t\lesssim T$.
Feature (i) is captured by the optimal controls that maximize QFI [Fig. 2(c)]
but (ii) is not because maximizing QFI requires turning off $\Omega$ once the
state reaches $|\Psi_{\text{HL}}\rangle$. Feature (ii) thus highlights the
difference between maximizing $|\langle\Psi_{\text{HL}}|\psi(T)\rangle|^{2}$
(the traditional sensing intuition that separates the state preparation and
the state evolution Haine and Hope (2020)) and maximizing QFI in the strong
$N\chi$ limit.

###  III.3 System with constrained control amplitude

Figure 3: Optimal control of $N=100$, $\chi=0.1$ using 100 time intervals. (a)
No constraint on the control. (b)-(d) Optimal controls with
$\Omega(t)<u_{\text{max}}$: (b) $u_{\text{max}}=6$; (c) $u_{\text{max}}=4$;
(d) $u_{\text{max}}=2$. When the optimal control takes one of the extreme
values, $\Phi(t)$ has an opposite sign.

As a second application, we consider $N=100$, $\chi=0.1$. These parameters are
used as an example in Ref. Haine and Hope (2020). With the ability to compute
the gradient efficiently, we use 100 time intervals to approximate $\Omega(t)$
and the obtained optimal control is given in Fig. 3(a). We see that the
necessary conditions are to a good approximation satisfied; specifically
$|\Phi_{\text{m}}|\lesssim 10^{-3}$ and $\Phi_{\text{sd}}\approx 0.006$.

In practice the control amplitude is bounded, i.e., $|\Omega(t)|\leq
u_{\text{max}}$ and to obtain the optimal control with amplitude constraint
requires an additional step during the iteration: $\Omega(t)$ is taken to be
the closest extreme (bang) value when $|\Omega(t)|>u_{\text{max}}$. The
necessary condition is modified: when $\Omega(t)$ takes the extreme value, the
sign of the switching function $\Phi(t)$ is opposite to that of $\Omega(t)$;
otherwise $\Phi(t)=0$. Fig. 3(b)-(d) show the results of
$u_{\text{max}}=6,4,2$. We see that the necessary conditions are well
satisfied. Imposing the maximum $|\Omega(t)|$ reduces the optimal QFI from
2895.0 (no constraint), 2869.9 ($u_{\text{max}}=6$), 2431.1
($u_{\text{max}}=4$), to 1347.5 ($u_{\text{max}}=2$). Consistent with the
intuition, the bang control appears when $|\Omega^{*}(t)|>u_{\text{max}}$ with
$\Omega^{*}(t)$ the optimal control without constraints.

###  III.4 Classical Fisher Information

As a final application, we use PMP to maximize CFI defined as

$\mathcal{F}_{C}=\sum_{m}\frac{(\partial_{\omega}{P}_{m})^{2}}{{P}_{m}}.$ (11)

$P_{m}=|_{x}\langle m|e^{i\phi\hat{J}_{z}}|\psi(T)\rangle|^{2}$ is the
probability distribution of $\hat{J}_{x}$ measurement ($|m\rangle_{x,z}$’s are
eigenstates of $\hat{J}_{x,z}$). Following Ref. Nolan et al. (2017); Haine and
Hope (2020) an additional phase offset $\phi$ is introduced. The terminal cost
function (to minimize) is chosen to be
$\mathcal{C}_{\text{C}}=-\mathcal{F}_{C}$ (the subscript ’C’ indicates
“classical”), and the most crucial step is to compute
$\frac{\partial\mathcal{C}_{\text{C}}}{\partial\langle\psi_{0,1}(T)|}$ to get
the boundary condition for the costates $|\pi_{0,1}(T)\rangle$.

Denoting the solution of Eq. (3) at $t=T$ to be
$|\psi_{0}(T)\rangle=\sum_{m}\bar{\alpha}_{m}|m\rangle_{z}$ and
$|\psi_{1}(T)\rangle=\sum_{m}\bar{\beta}_{m}|m\rangle_{z}$, and applying
$e^{i\hat{J}_{z}\phi}$ to the terminal state leads to

$\displaystyle e^{i\hat{J}_{z}\phi}|\psi_{0}(T)\rangle$
$\displaystyle=\sum_{m}e^{i\phi
m}\bar{\alpha}_{m}|m\rangle_{z}=\sum_{m}\alpha_{m}|m\rangle_{x}=\sum_{m}\left[\sum_{n}U_{mn}\bar{\alpha}_{n}e^{in\phi}\right]|m\rangle_{x},$
(12) $\displaystyle e^{i\hat{J}_{z}\phi}|\psi_{1}(T)\rangle$
$\displaystyle=\sum_{m}e^{i\phi
m}\bar{\beta}_{m}|m\rangle_{z}=\sum_{m}\beta_{m}|m\rangle_{x}=\sum_{m}\left[\sum_{n}U_{mn}\bar{\beta}_{n}e^{in\phi}\right]|m\rangle_{x}.$

What we have directly from Eq. (3) are $\bar{\alpha}_{n}$, $\bar{\beta}_{n}$,
and $U_{mn}$ (where each row vector of $U$ is an eigenvector of $\hat{J}_{x}$
and $U$ is real-valued in z-basis), based on which we get
$\alpha_{m}=\sum_{n^{\prime}}U_{mn^{\prime}}\bar{\alpha}_{n^{\prime}}e^{+in^{\prime}\phi}$,
$\beta_{m}=\sum_{n^{\prime}}U_{mn^{\prime}}\bar{\beta}_{n^{\prime}}e^{+in^{\prime}\phi}$,
$P_{m}=\alpha_{m}^{*}\alpha_{m}$,
$\partial_{\omega}{P}_{m}=\beta^{*}_{m}\alpha_{m}+\alpha^{*}_{m}\beta_{m}$ and

$\mathcal{F}_{C}=\sum_{m}\frac{(\beta^{*}_{m}\alpha_{m}+\alpha^{*}_{m}\beta_{m})^{2}}{\alpha^{*}_{m}\alpha_{m}}.$
(13)

Straightforward derivatives give

$\displaystyle\frac{\partial\mathcal{F}_{C}}{\partial\bar{\alpha}_{n}^{*}}$
$\displaystyle=\sum_{m}\frac{-(\partial_{\omega}{P}_{m})^{2}}{{P}_{m}^{2}}\frac{\partial{P}_{m}}{\partial\bar{\alpha}^{*}_{n}}+\sum_{m}\frac{2(\partial_{\omega}{P}_{m})}{{P}_{m}}\frac{\partial(\partial_{\omega}{P}_{m})}{\partial\bar{\alpha}^{*}_{n}},$
(14)
$\displaystyle\frac{\partial\mathcal{F}_{C}}{\partial\bar{\beta}_{n}^{*}}$
$\displaystyle=\sum_{m}\frac{2(\partial_{\omega}{P}_{m})}{{P}_{m}}\frac{\partial(\partial_{\omega}{P}_{m})}{\partial\bar{\beta}^{*}_{n}},$
$\displaystyle\frac{\partial\mathcal{F}_{C}}{\partial\phi}$
$\displaystyle=\sum_{m}\frac{-(\partial_{\omega}{P}_{m})^{2}}{{P}_{m}^{2}}\frac{\partial{P}_{m}}{\partial\phi}+\sum_{m}\frac{2(\partial_{\omega}{P}_{m})}{{P}_{m}}\frac{\partial(\partial_{\omega}{P}_{m})}{\partial\phi}$

where
$\frac{\partial{P}_{m}}{\partial\bar{\alpha}^{*}_{n}}=\left[U_{mn}e^{-in\phi}\right]\alpha_{m}$,
$\frac{\partial(\partial_{\omega}{P}_{m})}{\partial\bar{\alpha}^{*}_{n}}=\left[U_{mn}e^{-in\phi}\right]\beta_{m}$,
$\frac{\partial(\partial_{\omega}{P}_{m})}{\partial\bar{\beta}^{*}_{n}}=\left[U_{mn}e^{-in\phi}\right]\alpha_{m}$,
and

$\displaystyle\frac{\partial{P}_{m}}{\partial\phi}$
$\displaystyle=\left[\sum_{n}U_{mn}(-i\cdot
n)e^{-in\phi}\bar{\alpha}^{*}_{n}\right]\alpha_{m}+c.c.,$ (15)
$\displaystyle\frac{\partial(\partial_{\omega}{P}_{m})}{\partial\phi}$
$\displaystyle=\left[\sum_{n}U_{mn}(-i\cdot
n)e^{-in\phi}\bar{\beta}^{*}_{n}\right]\alpha_{m}+\beta^{*}_{m}\left[\sum_{n}U_{mn}(+i\cdot
n)e^{+in\phi}\bar{\alpha}_{n}\right]+c.c..$

The negative of Eq. (14) is used as the terminal boundary condition of the
costate variables $|\pi_{0}(t)\rangle$, $|\pi_{1}(t)\rangle$, i.e.,

$\displaystyle|\pi_{0}(T)\rangle$
$\displaystyle=\sum_{n}\left[-\frac{\partial\mathcal{F}_{C}}{\partial\bar{\alpha}_{n}^{*}}\right]|n\rangle_{z},$
(16) $\displaystyle|\pi_{1}(T)\rangle$
$\displaystyle=\sum_{n}\left[-\frac{\partial\mathcal{F}_{C}}{\partial\bar{\beta}_{n}^{*}}\right]|n\rangle_{z}.$

The phase $\phi$ is updated by
$\phi\rightarrow\phi+\gamma\frac{\partial\mathcal{F}_{C}}{\partial\phi}$.

Figure 4: (a) Optimal control for $N=4$, $\chi=1$ using 64 controls to
maximize CFI. The optimal CFI is about 8.19 with $\phi=\pi/2$. (b) Optimal
control for $N=100$, $\chi=0.1$ using 64 controls to maximize CFI. The optimal
CFI is about 2867.5 with $\phi=0$.

Results of $N=4$, $\chi=1$ and $N=100$, $\chi=0.1$ are presented in Fig. 4(a)
and (b). 64 time intervals are used to approximate $\Omega(t)$. For $N=4$,
$\chi=1$ [Fig. 4(a)], both the mean and standard deviation are smaller than
$10^{-3}$. For $N=100$, $\chi=0.1$ [Fig. 4(b)], $\Phi(t)$ does not converge to
zero but its mean is close to zero. The mean and standard deviation of $\Phi$
are respectively $\sim 0.06$ and $0.37$. Overall, all necessary conditions are
approximately satisfied for CFI optimization. As discussed in Refs. Nolan et
al. (2017); Haine and Hope (2020), the measurement uncertainty can be taken
into account by replacing $P_{m}$ by
$\tilde{P}_{m}=\sum_{m^{\prime}}\Gamma_{m,m^{\prime}}P_{m^{\prime}}$ in Eq.
(11) (with $\sum_{m}\Gamma_{m,m^{\prime}}=1$ for all $m^{\prime}$). The
proposed method can apply to this problem as well (not shown).

##  IV Conclusion

To conclude, we apply Pontryagin’s Maximum Principle to the quantum parameter
estimation in the context of the “twist and turn” Hamiltonian. What PMP
provides are (i) a formalism to efficiently evaluate the gradient with respect
to a terminal cost function (the switching function); and (ii) a set of
necessary conditions that can be used to quantify the quality of an
approximate solution. For the quantum metrology application, the performance
is characterized by a single scalar – the quantum or classical Fisher
information, and the optimal control finds the control protocol that maximizes
QFI or CFI for a given evolution time. One non-trivial complication pertaining
to quantum metrology is that the cost function involves derivatives with
respect to the external parameter which one wants to estimate, and we overcome
this obstacle by designing an augmented dynamical system  where the wave
function and its derivative to the external parameter $|\psi\rangle$ and
$|\partial_{\omega}\psi\rangle$ are regarded as independent dynamical
variables. By introducing the corresponding costate variables, all PMP
quantities, particularly the switching function, can be stably obtained.  The
ability to efficiently compute the gradient greatly accelerates the
optimization process and significantly expands the scope of problems one can
solve. With the developed formalism, we are able to maximize QFI/CFI with more
than 100 control variables. Moreover, the quality of an obtained control can
be quantified by how well the PMP necessary conditions are satisfied (this
applies to any approximate optimal controls). As a concrete example, we show
how an optimal solution converges upon increasing the number of controls by
correlating the QFI and the smallness of the switching function. Specific to
the “twist and turn” problem, we explicitly confirm the “traditional sensing
intuition” in the strong twist limit: the main function of the optimal control
is to steer the state to be close to $|\psi_{\text{HL}}\rangle$ (the state
that maximizes QFI) quickly and then let the system freely interact with the
environment. An important and natural question is the effect of quantum
decoherence, and a quantitative answer requires calculations using density
matrix as dynamical variables with dynamics involving dissipation channel(s).
We expect the maximum QFI to occur at a finite evolution time (as a compromise
between QFI $\sim t^{2}$ and decoherence), but the actual behavior should
depend critically on the dissipation channel, especially when there is
decoherence-free subspace Lin et al. (2020).

## Acknowledgment

We thank Yebin Wang (Mitsubishi Electric Research Laboratories) for very
helpful discussions. D.S. acknowledges support from the FWO as post-doctoral
fellow of the Research Foundation – Flanders.

## References

  * Nielsen and Chuang (2011) M. A. Nielsen and I. L. Chuang, _Quantum Computation and Quantum Information_ (Cambridge University Press, 2011).
  * Kaye et al. (2007) P. Kaye, R. Laflamme, and M. Mosca, _An introduction to quantum computing_ (Oxford University Press, USA, 2007).
  * Shor (1997) P. W. Shor, SIAM J. Comput. 26, 1484 (1997), ISSN 0097-5397, URL http://dx.doi.org/10.1137/S0097539795293172.
  * Caves and Drummond (1994) C. M. Caves and P. D. Drummond, Rev. Mod. Phys. 66, 481 (1994), URL https://link.aps.org/doi/10.1103/RevModPhys.66.481.
  * Braunstein and van Loock (2005) S. L. Braunstein and P. van Loock, Rev. Mod. Phys. 77, 513 (2005), URL https://link.aps.org/doi/10.1103/RevModPhys.77.513.
  * Collaboration (2011) T. L. S. Collaboration, Nature Physics 7, 962 (2011).
  * Bao et al. (2018) S. Bao, S. Kleer, R. Wang, and A. Rahmani, Phys. Rev. A 97, 062343 (2018).
  * Omran et al. (2019) A. Omran, H. Levine, A. Keesling, G. Semeghini, T. T. Wang, S. Ebadi, H. Bernien, A. S. Zibrov, H. Pichler, S. Choi, et al., 365, 570 (2019), ISSN 0036-8075, URL https://science.sciencemag.org/content/365/6453/570.
  * Jirari and Pötz (2006) H. Jirari and W. Pötz, Phys. Rev. A 74, 022306 (2006), URL https://link.aps.org/doi/10.1103/PhysRevA.74.022306.
  * Friis et al. (2018) N. Friis, O. Marty, C. Maier, C. Hempel, M. Holzäpfel, P. Jurcevic, M. B. Plenio, M. Huber, C. Roos, R. Blatt, et al., Phys. Rev. X 8, 021012 (2018).
  * Doherty et al. (2014) M. W. Doherty, V. V. Struzhkin, D. A. Simpson, L. P. McGuinness, Y. Meng, A. Stacey, T. J. Karle, R. J. Hemley, N. B. Manson, L. C. L. Hollenberg, et al., Phys. Rev. Lett. 112, 047601 (2014).
  * Van Damme et al. (2014) L. Van Damme, R. Zeier, S. J. Glaser, and D. Sugny, Phys. Rev. A 90, 013409 (2014), URL https://link.aps.org/doi/10.1103/PhysRevA.90.013409.
  * Pichler et al. (2016) T. Pichler, T. Caneva, S. Montangero, M. D. Lukin, and T. Calarco, Phys. Rev. A 93, 013851 (2016), URL https://link.aps.org/doi/10.1103/PhysRevA.93.013851.
  * Farhi et al. (2000) E. Farhi, J. Goldstone, S. Gurmann, and M. Sipser, _Quantum computation by adiabatic evolution_ (2000), eprint arXiv:quant-ph/0001106.
  * Rezakhani et al. (2009) A. T. Rezakhani, W.-J. Kuo, A. Hamma, D. A. Lidar, and P. Zanardi, Phys. Rev. Lett. 103, 080502 (2009), URL https://link.aps.org/doi/10.1103/PhysRevLett.103.080502.
  * Zhuang (2014) Q. Zhuang, Phys. Rev. A 90, 052317 (2014), URL https://link.aps.org/doi/10.1103/PhysRevA.90.052317.
  * Peruzzo et al. (2014) A. Peruzzo, J. McClean, P. Shadbolt, M.-H. Yung, X.-Q. Zhou, P. J. Love, A. Aspuru-Guzik, and J. L. O’Brien, Nature Communications 5, 4213 (2014).
  * O’Malley et al. (2016) P. J. J. O’Malley, R. Babbush, I. D. Kivlichan, J. Romero, J. R. McClean, R. Barends, J. Kelly, P. Roushan, A. Tranter, N. Ding, et al., Phys. Rev. X 6, 031007 (2016), URL https://link.aps.org/doi/10.1103/PhysRevX.6.031007.
  * Helstrom (1976) C. W. Helstrom, _Quantum Detection and Estimation Theory_ , Mathematics in Science and Engineering 123 (Elsevier, Academic Press, 1976).
  * Holevo (2011) A. S. Holevo, _Probabilistic and Statistical Aspects of Quantum Theory_ (Edizioni della Normale, 2011), 1st ed.
  * Giovannetti et al. (2006) V. Giovannetti, S. Lloyd, and L. Maccone, Phys. Rev. Lett. 96, 010401 (2006), URL https://link.aps.org/doi/10.1103/PhysRevLett.96.010401.
  * Brif et al. (2010) C. Brif, R. Chakrabarti, and H. Rabitz, New Journal of Physics 12, 075008 (2010), URL https://doi.org/10.1088%2F1367-2630%2F12%2F7%2F075008.
  * Glaser et al. (2015) S. J. Glaser, U. Boscain, T. Calarco, C. P. Koch, W. Kockenberger, R. Kosloff, I. Kuprov, B. Luy, S. Schirmer, T. Schulte-Herbruggen, et al., The European Physical Journal D / Atomic, Molecular, Optical and Plasma Physics 69, 279 (2015).
  * Giovannetti et al. (2011) V. Giovannetti, S. Lloyd, and L. Maccone, Nature Photonics 5, 222 (2011).
  * Tsang et al. (2016) M. Tsang, R. Nair, and X.-M. Lu, Phys. Rev. X 6, 031033 (2016), URL https://link.aps.org/doi/10.1103/PhysRevX.6.031033.
  * Zhuang et al. (2017) Q. Zhuang, Z. Zhang, and J. H. Shapiro, Phys. Rev. A 96, 040304 (2017), URL https://link.aps.org/doi/10.1103/PhysRevA.96.040304.
  * Pezzè et al. (2018) L. Pezzè, A. Smerzi, M. K. Oberthaler, R. Schmied, and P. Treutlein, Rev. Mod. Phys. 90, 035005 (2018), URL https://link.aps.org/doi/10.1103/RevModPhys.90.035005.
  * Zhou et al. (2020) H. Zhou, J. Choi, S. Choi, R. Landig, A. M. Douglas, J. Isoya, F. Jelezko, S. Onoda, H. Sumiya, P. Cappellaro, et al., Phys. Rev. X 10, 031003 (2020), URL https://link.aps.org/doi/10.1103/PhysRevX.10.031003.
  * Haine (2013) S. A. Haine, Phys. Rev. Lett. 110, 053002 (2013), URL https://link.aps.org/doi/10.1103/PhysRevLett.110.053002.
  * Sekatski et al. (2017) P. Sekatski, M. Skotiniotis, J. Kołodyński, and W. Dür, Quantum 1, 27 (2017), ISSN 2521-327X, URL https://doi.org/10.22331/q-2017-09-06-27.
  * Gefen et al. (2017) T. Gefen, F. Jelezko, and A. Retzker, Phys. Rev. A 96, 032310 (2017), URL https://link.aps.org/doi/10.1103/PhysRevA.96.032310.
  * Rembold et al. (2020) P. Rembold, N. Oshnik, M. M. Müller, S. Montangero, T. Calarco, and E. Neu, AVS Quantum Science 2, 024701 (2020), URL https://doi.org/10.1116/5.0006785.
  * Tóth et al. (2020) G. Tóth, T. Vértesi, P. Horodecki, and R. Horodecki, Phys. Rev. Lett. 125, 020402 (2020), URL https://link.aps.org/doi/10.1103/PhysRevLett.125.020402.
  * Pang and Jordan (2017) S. Pang and A. N. Jordan, Nature Communications 8, 14695 (2017).
  * Kaubruegger et al. (2019) R. Kaubruegger, P. Silvi, C. Kokail, R. van Bijnen, A. M. Rey, J. Ye, A. M. Kaufman, and P. Zoller, Phys. Rev. Lett. 123, 260505 (2019), URL https://link.aps.org/doi/10.1103/PhysRevLett.123.260505.
  * Haine and Hope (2020) S. A. Haine and J. J. Hope, Phys. Rev. Lett. 124, 060402 (2020), URL https://link.aps.org/doi/10.1103/PhysRevLett.124.060402.
  * Koczor et al. (2020) B. Koczor, S. Endo, T. Jones, Y. Matsuzaki, and S. C. Benjamin, New Journal of Physics 22, 083038 (2020), URL https://doi.org/10.1088%2F1367-2630%2Fab965e.
  * Khaneja et al. (2005) N. Khaneja, T. Reiss, C. Kehlet, T. Schulte-Herbrüggen, and S. J. Glaser, Journal of Magnetic Resonance 172, 296 (2005).
  * Liu and Yuan (2017a) J. Liu and H. Yuan, Phys. Rev. A 96, 012117 (2017a), URL https://link.aps.org/doi/10.1103/PhysRevA.96.012117.
  * Liu and Yuan (2017b) J. Liu and H. Yuan, Phys. Rev. A 96, 042114 (2017b), URL https://link.aps.org/doi/10.1103/PhysRevA.96.042114.
  * Basilewitsch et al. (2020) D. Basilewitsch, H. Yuan, and C. P. Koch, Phys. Rev. Research 2, 033396 (2020), URL https://link.aps.org/doi/10.1103/PhysRevResearch.2.033396.
  * Liu et al. (2019) J. Liu, H. Yuan, X.-M. Lu, and X. Wang, Journal of Physics A: Mathematical and Theoretical 53, 023001 (2019), URL https://doi.org/10.1088%2F1751-8121%2Fab5d4d.
  * Hyllus et al. (2010) P. Hyllus, O. Gühne, and A. Smerzi, Phys. Rev. A 82, 012337 (2010), URL https://link.aps.org/doi/10.1103/PhysRevA.82.012337.
  * Poggiali et al. (2018) F. Poggiali, P. Cappellaro, and N. Fabbri, Phys. Rev. X 8, 021059 (2018), URL https://link.aps.org/doi/10.1103/PhysRevX.8.021059.
  * Müller et al. (2018) M. M. Müller, S. Gherardini, and F. Caruso, Scientific Reports 8, 14278 (2018).
  * Huang and Moore (2008) Y. P. Huang and M. G. Moore, Phys. Rev. Lett. 100, 250406 (2008), URL https://link.aps.org/doi/10.1103/PhysRevLett.100.250406.
  * Lovecchio et al. (2016) C. Lovecchio, F. Schäfer, S. Cherukattil, M. Alì Khan, I. Herrera, F. S. Cataliotti, T. Calarco, S. Montangero, and F. Caruso, Phys. Rev. A 93, 010304 (2016), URL https://link.aps.org/doi/10.1103/PhysRevA.93.010304.
  * van Frank et al. (2014) S. van Frank, A. Negretti, T. Berrada, R. Bucker, S. Montangero, J.-F. Schaff, T. Schumm, T. Calarco, and J. Schmiedmayer, Nature Communications 5, 4009 (2014).
  * Pontryagin (1987) L. Pontryagin, _Mathematical Theory of Optimal Processes_ (CRC Press, Boca Raton, FL, 1987).
  * Sussmann (1987) H. J. Sussmann, SIAM Journal on Control and Optimization 25, 433 (1987).
  * Luenberger (1979) D. G. Luenberger, _Introduction to dynamic systems: theory, models, and applications_ (Wiley, 1979).
  * Heinz Schattler (2012) U. L. Heinz Schattler, _Geometric Optimal Control: Theory, Methods and Examples_ , Interdisciplinary Applied Mathematics 38 (Springer-Verlag New York, 2012), 1st ed., ISBN 978-1-4614-3833-5,978-1-4614-3834-2.
  * Lin et al. (2020) C. Lin, D. Sels, and Y. Wang, Phys. Rev. A 101, 022320 (2020).
  * Yang et al. (2017) Z.-C. Yang, A. Rahmani, A. Shabani, H. Neven, and C. Chamon, Phys. Rev. X 7, 021027 (2017), URL https://link.aps.org/doi/10.1103/PhysRevX.7.021027.
  * Lin et al. (2019) C. Lin, Y. Wang, G. Kolesov, and U. Kalabic, Phys. Rev. A 100, 022327 (2019).
  * Hayes et al. (2018) A. J. Hayes, S. Dooley, W. J. Munro, K. Nemoto, and J. Dunningham, Quantum Science and Technology 3, 035007 (2018), URL https://doi.org/10.1088%2F2058-9565%2Faac30b.
  * Tóth (2012) G. Tóth, Phys. Rev. A 85, 022322 (2012), URL https://link.aps.org/doi/10.1103/PhysRevA.85.022322.
  * Yurke et al. (1986) B. Yurke, S. L. McCall, and J. R. Klauder, Phys. Rev. A 33, 4033 (1986), URL https://link.aps.org/doi/10.1103/PhysRevA.33.4033.
  * Dicke (1954) R. H. Dicke, Phys. Rev. 93, 99 (1954), URL https://link.aps.org/doi/10.1103/PhysRev.93.99.
  * Gross and Haroche (1982) M. Gross and S. Haroche, Physics Reports 93, 301 (1982), ISSN 0370-1573, URL http://www.sciencedirect.com/science/article/pii/0370157382901028.
  * Kuprov and Rodgers (2009) I. Kuprov and C. T. Rodgers, The Journal of Chemical Physics 131, 234108 (2009), URL https://doi.org/10.1063/1.3267086.
  * Machnes et al. (2018) S. Machnes, E. Assémat, D. Tannor, and F. K. Wilhelm, Phys. Rev. Lett. 120, 150401 (2018), URL https://link.aps.org/doi/10.1103/PhysRevLett.120.150401.
  * Nolan et al. (2017) S. P. Nolan, S. S. Szigeti, and S. A. Haine, Phys. Rev. Lett. 119, 193601 (2017), URL https://link.aps.org/doi/10.1103/PhysRevLett.119.193601.


Light guided in tailored environments: from basic aspects to applications Dr
hab. Piotr Kolenderski Doctor of Philosophy Physics Nicolaus Copernicus
University Faculty of Physics, Astronomy and Informatics Single Photon
Applications Laboratory Institute of Physics

Doctoral Thesis (revised after submission)

_Author:_

_Supervisors:_

Dr hab. Karolina Słowik

A thesis submitted in fulfillment of the requirements
for the degree of
in the

May 9, 2022

###### Acknowledgements.

The author would like to acknowledge and thank his supervisor Dr Piotr
Kolenderski for the support and collaboration in research through the past 8
years. Special thanks go to  Dr Karolina Słowik not only for the joint
research, but also for the fact that she always had time for the author. The
author would like to thank and apologize at the same time for all the weekends
and holidays that Dr Słowik spent reading this doctoral dissertation. The
research presented within this thesis was supported and partially financed by
Project HEIMaT No. Homing/2016-1/8.

To my late father, who unfortunately didn’t live long enough to see his son
become a doctor.