# Quantum Variational Optimization of Ramsey Interferometry and Atomic Clocks

Raphael Kaubruegger∗ Center for Quantum Physics, University of Innsbruck, 6020
Innsbruck, Austria  Institute for Quantum Optics and Quantum Information of
the Austrian Academy of Sciences, 6020 Innsbruck, Austria  Denis V. Vasilyev∗
Center for Quantum Physics, University of Innsbruck, 6020 Innsbruck, Austria
Institute for Quantum Optics and Quantum Information of the Austrian Academy
of Sciences, 6020 Innsbruck, Austria  Marius Schulte  Institute for
Theoretical Physics, Institute for Gravitational Physics (Albert Einstein
Institute), Leibniz University Hannover, 30167 Hannover, Germany  Klemens
Hammerer  Institute for Theoretical Physics, Institute for Gravitational
Physics (Albert Einstein Institute), Leibniz University Hannover, 30167
Hannover, Germany  Peter Zoller  Center for Quantum Physics, University of
Innsbruck, 6020 Innsbruck, Austria  Institute for Quantum Optics and Quantum
Information of the Austrian Academy of Sciences, 6020 Innsbruck, Austria

###### Abstract

We discuss quantum variational optimization of Ramsey interferometry with
ensembles of $N$ entangled atoms, and its application to atomic clocks based
on a Bayesian approach to phase estimation. We identify best input states and
generalized measurements within a variational approximation for the
corresponding entangling and decoding quantum circuits. These circuits are
built from basic quantum operations available for the particular sensor
platform, such as one-axis twisting, or finite range interactions.
Optimization is defined relative to a cost function, which in the present
study is the Bayesian mean squared error of the estimated phase for a given
prior distribution, i.e. we optimize for a finite dynamic range of the
interferometer. In analogous variational optimizations of optical atomic
clocks, we use the Allan deviation for a given Ramsey interrogation time as
the relevant cost function for the long-term instability. Remarkably, even
low-depth quantum circuits yield excellent results that closely approach the
fundamental quantum limits for optimal Ramsey interferometry and atomic
clocks. The quantum metrological schemes identified here are readily
applicable to atomic clocks based on optical lattices, tweezer arrays, or
trapped ions. While in the present work variationally optimized circuits are
found with classical simulations, optimization can also be performed ‘on’ the
(physical) quantum sensor, also in regimes not accessible to classical
computations and in presence of imperfections.

††thanks: Equal author contribution††thanks: Equal author contribution

##  I Introduction

Recent progress in quantum technology of sensors has provided us with the most
precise measurement devices available in physical sciences. Examples include
the development of optical clocks [1], atom [2] and light [3] interferometers,
and magnetic field sensing [4]. These achievements have opened the door to
novel applications from the practical to the scientific. Atomic clocks and
atomic interferometers allow height measurements in relativistic geodesy [5,
6, 7, 8] or fundamental tests of our understanding of the laws of nature [9,
10, 11], such as time variation of the fine structure constant. In the
continuing effort to push the boundaries of quantum sensing, entanglement as a
key element of quantum physics gives the opportunity to reduce quantum
fluctuations inherent in quantum measurements below the standard quantum limit
(SQL), i.e. what is possible with uncorrelated constituents [12]. Squeezed
light improves gravitational wave detection [13], allows lifescience
microscopy below the photodamage limit [14], further, squeezing has been
demonstrated in atom interferometers [15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30]. However, beyond the SQL, quantum physics imposes
ultimate limits on quantum sensing, and one of the key challenges is to
identify, and in particular devise experimentally realistic strategies
defining _optimal quantum sensors_ [31].

Figure 1: (a) Quantum circuit representation of Ramsey interferometer with
uncorrelated atoms. The phase $\phi$ is imprinted on the atomic spin-
superposition prepared by global $\pi/2$-rotation around $y$-axis,
$\mathcal{R}_{y}(\pi/2)$. Consequent rotation, $\mathcal{R}_{x}(\pi/2)$, and
measurement of difference $m$ of atoms in eigenstates $\ket{\uparrow}$ and
$\ket{\downarrow}$ in $z$-basis allows estimating the phase $\phi$ using an
estimator function $\phi_{\rm est}(m)$. (b) Quantum circuit of a generalized
Ramsey interferometer with generic _entangling_ and _decoding_ operations
$\mathcal{U}_{\rm En}$ and $\mathcal{U}_{\rm De}$, respectively. Our
variational approach (c) consists of an ansatz, where optimal
$\mathcal{U}_{\rm En}$ and $\mathcal{U}_{\rm De}$ are approximated by low-
depth circuits. These are built from ‘layers’ of elementary operations, which
are provided by the given platform. We specify the variationally optimized
quantum sensor by circuits $\mathcal{U}_{\rm En}(\bm{\theta})$ and
$\mathcal{U}_{\rm De}(\bm{\vartheta})$ [see Eqs. (6) and (7)], of depth
$n_{\rm En}$ and $n_{\rm De}$, respectively. Here
$\bm{\theta}\equiv\\{\theta_{i}\\}$ and
$\bm{\vartheta}\equiv\\{\vartheta_{i}\\}$ are vectors of variational
parameters to be optimized for a given strategy represented by a cost function
$\mathcal{C}$ defined here as Bayesian mean squared error (BMSE) [see Eqs. (2)
and (10)]. We illustrate the approach with a variational circuit built from
global spin rotations $\mathcal{R}_{x}$ and one-axis-twisting gates
$\mathcal{T}_{x,z}$ available in neutral atom and ion quantum simulation
platforms, as discussed in Sec. II.2. The circuits optimization, shown as a
feedback loop (in red), can be performed on a classical computer, or, if the
complexity of underlying quantum many-body problem exceeds capabilities of
classical computers, on the sensor itself, thus, leading to a (relevant)
quantum advantage, see Sec. II.7.

In our discussion below we will focus on optimal Ramsey interferometry, where
‘optimality’ is defined as achieving the best average signal to noise ratio
(SNR) for phase estimation in a single-shot measurement. The distinguishing
feature of the present work is that we consider optimal Ramsey interferometry
with finite dynamic range, i.e. we wish to achieve optimal sensitivity for
phases $\phi$ in a given finite interval of width $\delta\phi$ [32, 33, 34,
31, 35, 36, 37] as is relevant for numerous applications including atomic
clocks [38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48]. To implement this optimal
Ramsey interferometry we devise an approach based on variational quantum
circuits [49, 50, 51, 52, 53, 54, 55, 56]. Here, entangled input states and
the entangled measurement protocols [57, 58, 59, 60, 61, 62, 63] defining the
generalized Ramsey interferometer are represented as variational quantum
circuits built from ‘natural’ quantum resources available on the specific
sensor platform (see Fig. 1), which are optimized in light of a given cost
function defining the optimal interferometer. As we will show, already low-
depth variational quantum circuits can provide excellent approximations to the
optimal interferometer. Intermediate scale atomic quantum devices [64, 65],
acting as programmable quantum sensors [66], present the opportunity to
implement these low-depth quantum circuits, defining an experimental route
towards _optimal_ Ramsey interferometry.

As noted above, optimality of a quantum sensing protocol is defined via a cost
function $\mathcal{C}$ which is identified in context of a specific
metrological task. In our study of variational $N$-atom Ramsey interferometry,
we wish to optimize for phase estimation accuracy defined as the mean squared
error $\epsilon(\phi)$ relative to the actual phase $\phi$, averaged with
respect to a prior distribution $\mathcal{P}(\phi)$ with width $\delta\phi$,
which represents the finite _finite dynamic range_ of the interferometer. Thus
the cost function is ${\cal C}\equiv(\Delta\phi)^{2}=\int
d\phi\,\epsilon(\phi)\mathcal{P}(\phi)$. This corresponds to a Bayesian
approach to optimal interferometry where the prior width of the phase
distribution $\delta\phi$ is updated through measurement to $\Delta\phi$
characterizing the posterior distribution. As outlined in Fig. 1, our
variational approach to optimal Ramsey interferometry seeks to minimize $\cal
C$ over variational quantum circuits, and thus identifying optimal input
states and measurements for a given $\delta\phi$. Note that in the present
work we optimize a metrological cost function for the complete quantum sensing
protocol with variational quantum circuits. We distinguish this from
variational state preparation schemes, e.g. variational squeezed state
preparation of Ref. [66], where a squeezing parameter was optimized as cost
function.

We contrast our Bayesian approach of identifying a metrological cost function
to a Fisher information approach, which optimizes accuracy locally at a
specific value of the phase, corresponding to the limit $\delta\phi\rightarrow
0$ [3]. Discussions of fundamental limits in quantum sensing are often phrased
in terms of quantum Fisher information and the quantum Cramèr-Rao bound
leading to definition of the Heisenberg limit (HL) [67, 68, 69]. This
identifies GHZ states [70], saturating the HL, as the optimal states for
Ramsey interferometry. Furthermore, this leads to the conclusion that adding a
decoding step (see Fig. 1) is not beneficial for quantum metrology since a
separable measurement is optimal in this context [68]. This conclusion,
however, is not applicable to phase estimation with _finite_ prior width since
the GHZ state interferometry in single-shot scenarios is optimal only for
estimation of phase values in an interval $\delta\phi_{\rm GHZ}\sim 1/N$,
which shrinks as number of atoms $N$ increases [71, 37], see Sec. II.6 below.
In fact, for large priors $\delta\phi$ tailored quantum input states will
differ greatly from squeezed spin states (SSS) [72, 73] or GHZ states [31, 3],
and a nontrivial measurement is required for an optimal metrological protocol.
Our variational approach to optimal Ramsey interferometry (see Fig. 1) finds
these optimal entangling and decoding circuits 111Variational algorithms for
quantum metrology optimizing local phase sensitivity, i.e. maximizing the
quantum Fisher information, are considered in Refs. [111, 112, 113].

Our discussion of optimal single-shot Ramsey interferometry 222While we
consider optimal non-adaptive measurement protocols, adaptive protocols for
phase estimation have been studied in [104, 103, 102, 114, 105, 115, 116, 117,
118]. has immediate relevance for atomic clocks [76, 77, 78, 12, 79]. An
optical atomic clock operates by locking the frequency of an oscillator,
represented by a classical laser field with fluctuating frequency
$\omega_{L}(t)$, to the transition frequency $\omega_{A}$ of an ensemble of
$N$ isolated atoms [1]. The locking of the laser to the atomic transition is
achieved by repeatedly measuring the accumulated phase
$\phi=\int_{0}^{T}dt[\omega_{L}(t)-\omega_{A}]$ in Ramsey interferometry with
interrogation time $T$. Importantly, the width $\delta\phi$ of the
distribution of this phase increases with the Ramsey time $T$. It is therefore
critical to achieve a good phase estimate in conjunction with a wide dynamic
range for making an accurate inference about the frequency deviation, and
ultimately for stabilizing the clock laser to the atomic transition. Our
variational approach for Bayesian phase estimation is made to satisfy these
requirements, and provides optimal quantum states and measurements minimizing
the instability in atomic clocks as measured by its Allan deviation. We
predict significant improvements over previously known one-shot non-adaptive
strategies. Our predictions are backed up by comprehensive numerical
simulations of the clock laser and its stabilization to the atomic reference
in a closed feedback loop [78, 79].

In the following, we first develop the general theory of variationally
optimized Ramsey interferometry based on Bayesian phase estimation in Sec. II,
and then apply this theory to the specific problem of an optical atomic clock
in Sec. III.

##  II Quantum Variational Optimization of Ramsey Interferometry

For concreteness, we consider estimation of the phase $\phi$ in an atomic
interferometer consisting of an ensemble of $N$ identical two-level atoms
described as spin-1/2 particles [12]. The general idea developed in the
following applies to any $SU(2)$ interferometer. The interferometer encodes
the phase in the atomic state by evolving according to
$\ket{\psi_{\phi}}=\exp(-i\phi J_{z})\ket{\psi_{\rm in}}$. Here
$\ket{\psi_{\rm in}}$ is an initial probe state 333For simplicity of notation
we assume pure states. This discussion is readily extended to mixed states
with density operator $\rho_{\rm in}$., and
${J}_{x,y,z}=1/2\sum_{k=1}^{N}{\sigma}^{x,y,z}_{k}$ is the collective spin
with $\sigma^{x,y,z}$ the Pauli operators. The task is to determine the
unknown phase $\phi$ by performing a measurement on the atoms.

###  II.1 Bayesian approach to phase interferometry

The most general measurement is described by a positive operator valued
measure (POVM), that is a set $\\{\Pi_{x}\\}$ of positive Hermitian operators
such that $\int dx\,\Pi_{x}=\openone$. The parameter $\phi$ is estimated on
the basis of a measurement result $x$ using an estimator function $\phi_{\rm
est}(x)$. The phase estimation accuracy is characterized by a mean squared
error (MSE) with respect to the actual phase $\phi$

$\epsilon(\phi)=\int dx\big{[}\phi-\phi_{\rm est}(x)\big{]}^{2}p(x|\phi),$ (1)

where
$p(x|\phi)=\operatorname{\mathrm{Tr}}\\{\Pi_{x}\ket{\psi_{\phi}}\bra{\psi_{\phi}}\\}$
is the conditional probability of the measurement outcome $x$ [3]. In our
discussion we consider the phase $\phi$ to be defined on the interval
$-\infty<\phi<\infty$ 444A phase $-\infty<\phi<\infty$ is consistent with a
laser phase in atomic clocks. A diffusion of the laser phase as a phase
winding outside of $-\pi<\phi<\pi$ corresponds to a phase slip which must be
avoided in clock operation..

In order to find an interferometer performing the most accurate measurement of
the phase $\phi$ we cannot minimize the MSE (1) for all values of $\phi$
simultaneously. First, the atomic interferometer is only sensitive to phase
values modulo $2\pi$ as $\exp(-i\phi J_{z})$, and hence also $p(x|\phi)$ is
periodic. Thus, it can not distinguish arbitrary phases. Second, an initial
state and measurement working well for one phase value might be insensitive to
another value. Thus we consider an estimation error minimized for a weighted
range of phase values relevant for a given sensor and measurement task. In the
following we will adopt a Bayesian approach where the estimation error is
averaged over a prior phase distribution $\mathcal{P}(\phi)$. The cost
function of interest is thus defined as the MSE averaged over the prior
distribution, defining the Bayesian mean squared error (BMSE)

$\displaystyle{\cal
C}\equiv(\Delta\phi)^{2}=\int_{-\infty}^{\infty}d\phi\,\epsilon(\phi)\mathcal{P}(\phi).$
(2)

The prior distribution $\mathcal{P}(\phi)$ reflects the statistical properties
of the unknown phase $\phi$ hence it is, in general, sensor and task
dependent.

Optimal interferometry is based on minimizing the cost function (2) over
$\ket{\psi_{\rm in}}$, $\\{\Pi_{x}\\}$, and $\phi_{\rm est}(x)$ for the given
prior distribution. For simplicity, we will focus on prior distribution as a
normal distribution centered around zero

$\mathcal{P}_{\delta\phi}(\phi)=\frac{1}{\sqrt{2\pi(\delta\phi)^{2}}}\exp\left[{-\frac{\phi^{2}}{2(\delta\phi)^{2}}}\right].$
(3)

This problem was addressed in [31], where the optimal quantum interferometer
has been identified. Below we optimize the cost function (2) within a
variational quantum algorithmic approach.

###  II.2 Variational Ramsey interferometry

Our goal is to find an implementation of the optimal interferometer given a
restricted set of quantum gates available on an experimental platform such as
neutral atoms or trapped ions. We will show that low-depth variational quantum
circuits of given depth [see Fig. 1(c)] are excellent approximations to
optimal interferometry, and can yield significant improvements over SQL
defined for uncorrelated atoms.

In the most general form the variational interferometer, illustrated in Fig.
1(b), can be defined by a generic entangling unitary operation
$\mathcal{U}_{\rm En}$ preparing an entangled input state from the initial
product state $\ket{\psi_{0}}=\ket{\downarrow}^{\otimes N}$

$\displaystyle\ket{\psi_{\rm in}}=\mathcal{U}_{\rm En}\ket{\psi_{0}},$ (4)

and a decoding operation $\mathcal{U}_{\rm De}$ transforming the projective
measurement of a typical observable $J_{z}$, with eigenbasis $\ket{m}$, into a
generic projection

$\displaystyle\Pi_{x_{m}}\equiv\ket{x_{m}}\\!\bra{x_{m}}=\mathcal{U}_{\rm
De}^{\dagger}\ket{m}\bra{m}\mathcal{U}_{\rm De}.$ (5)

Here we consider the subspace spanned by the states $\ket{m}$,
$m\in\\{-N/2,\dots,N/2\\}$, which are completely symmetric under permutations
of $N$ atoms, and $\ket{\psi_{0}}=\ket{-N/2}$. The measurement amounts to
counting the difference $m$ of atoms in state $\ket{\uparrow}$ and
$\ket{\downarrow}$. As shown in [34], this assumption can be made without loss
of generality. The basis states $\ket{m}$ are given by the eigenstates of
total spin of maximum length, $j=N/2$, thus satisfying
${\bm{J}}^{2}\ket{m}=j(j+1)\ket{m}$ and $J_{z}\ket{m}=m\ket{m}$. As shown in
[31], the optimal POVM may be restricted to the class of standard projection
von Neumann measurements $\Pi_{x}=\ket{x}\\!\bra{x}$,
$\braket{x}{x^{\prime}}=\delta_{xx^{\prime}}$. Thus the measurement of the
collective spin component $J_{z}$ transformed by a decoder $\mathcal{U}_{\rm
De}$ represents the measurement problem in full generality.

We assume that the programmable quantum sensor provides us with a set of
native resource Hamiltonians $\\{H_{R}^{(i)}\\}$. The unitaries generated by
these Hamiltonians determine a corresponding native set of quantum gates as
variational ansatz for $\mathcal{U}_{\rm En}$ and $\mathcal{U}_{\rm De}$. A
generic example is provided by global rotations
$\mathcal{R}_{\mu}(\theta)=\exp(-i\theta{J}_{\mu})$ and the infinite range
one-axis-twisting (OAT) interaction [73]
$\mathcal{T}_{\mu}(\theta)=\exp(-i\theta J^{2}_{\mu})$ with $\mu=x,y,z$. Such
interactions have been realized on quantum simulation platforms [15, 16, 17,
18, 19, 82, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 83], and very recently
also on an optical clock transition [30]. Within this set of gates we
constrain the quantum circuits to be invariant under the spin $x$-parity
transformation ensuring an anti-symmetric estimator at and around $\phi=0$
(see App. B). The most general circuits satisfying the $x$-parity constraint
for a fixed number $n_{\rm En}$ and $n_{\rm De}$ of layers of entangling and
decoding gates are

$\displaystyle\mathcal{U}_{\text{En}}(\bm{\theta})=\Big{[}$
$\displaystyle\mathcal{R}_{x}(\theta_{n_{\text{En}}}^{(3)})\mathcal{T}_{x}(\theta_{n_{\text{En}}}^{(2)})\mathcal{T}_{z}(\theta_{n_{\text{En}}}^{(1)})\cdots$
$\displaystyle\mathcal{R}_{x}(\theta_{1}^{(3)})\mathcal{T}_{x}(\theta_{1}^{(2)})\mathcal{T}_{z}(\theta_{1}^{(1)})\Big{]}\mathcal{R}_{y}\big{(}\tfrac{\pi}{2}\big{)},$
(6)

and

$\displaystyle\mathcal{U}_{\text{De}}(\bm{\vartheta})=\mathcal{R}_{x}\big{(}\tfrac{\pi}{2}\big{)}\Big{[}$
$\displaystyle\mathcal{T}_{z}(\vartheta_{1}^{(1)})\mathcal{T}_{x}(\vartheta_{1}^{(2)})\mathcal{R}_{x}(\vartheta_{1}^{(3)})\cdots$
$\displaystyle\mathcal{T}_{z}(\vartheta_{n_{\text{De}}}^{(1)})\mathcal{T}_{x}(\vartheta_{n_{\text{De}}}^{(2)})\mathcal{R}_{x}(\vartheta_{n_{\text{De}}}^{(3)})\Big{]}.$
(7)

Here the subscripts on the parameters indicate the layer containing the same
three gates and the superscript identifies the gate within the layer. The
complexity of the circuit is thus classified by $(n_{\rm En},n_{\rm De})$, and
we have $3(n_{\rm En}\\!+\\!n_{\rm De})$ (global) variational parameters in a
$(n_{\rm En},n_{\rm De})$–circuit, independent of $N$. Note that here
$\mathcal{U}_{\text{En}}$ and $\mathcal{U}_{\text{De}}$ commute with particle
exchange. The Hilbert space dimension for dynamics in the symmetric subspace
is linear in $N$, which allows us to study theoretically the scaling for large
particle numbers $N$ below — in contrast to the case of finite range
interactions in Sec. II.7.

We note that conventional Ramsey interferometry with uncorrelated atoms
corresponds to the $(0,0)$–circuit with $\mathcal{U}_{\rm
En}=\mathcal{R}_{y}(\pi/2)$ and $\mathcal{U}_{\rm De}=\mathcal{R}_{x}(\pi/2)$.
Here atoms are prepared initially in a product state, or coherent spin state
(CSS), and remain in a product state during the evolution in interferometer
followed by measurement of $J_{y}$. On the other hand, the interferometer with
SSS as input, and GHZ interferometry emerge as $(1,0)$– and $(2,1)$–circuits,
respectively.

In the presented entangler-decoder framework the performance of the
interferometer is described, similar to Eq. (1), by the MSE

$\epsilon(\phi)=\sum_{m}\big{[}\phi-\phi_{\rm
est}(m)\big{]}^{2}p_{\bm{\theta},\bm{\vartheta}}(m|\phi),$ (8)

where the conditional probability is

$\displaystyle p_{\bm{\theta},\bm{\vartheta}}(m|\phi)=|\bra{m}\mathcal{U}_{\rm
De}(\bm{\vartheta})e^{-i\phi J_{z}}\mathcal{U}_{\rm
En}(\bm{\theta})\ket{\psi_{0}}|^{2}.$ (9)

Therefore, the optimal interferometer found within the restricted set of
available operations is described by the minimum of the BMSE

$\displaystyle(\Delta\phi)^{2}=\min_{\bm{\theta},\bm{\vartheta},a}\int_{-\infty}^{\infty}d\phi\,\sum_{m}$
$\displaystyle(\phi-am)^{2}$ $\displaystyle\times
p_{\bm{\theta},\bm{\vartheta}}(m|\phi)\mathcal{P}_{\delta\phi}(\phi).$ (10)

To be specific, we assume for the prior a normal distribution
$\mathcal{P}_{\delta\phi}(\phi)$ with standard deviation $\delta\phi$ [see Eq.
(3)]. In addition, (10) assumes a linear estimator $\phi_{\rm est}(m)=am$
which is close to optimal, as shown below. We note that it is possible to use
the optimal Bayesian estimator, which however is computationally demanding. We
describe the corresponding iterative procedure in App. D for the case of a
phase operator as observable.

Figure 2: Performance of the variationally enhanced interferometer with $N=64$
particles. Performance is shown in terms of the posterior phase distribution
width relative to the prior width, $\Delta\phi/\delta\phi$, for a given prior,
that is, for a given dynamic range of the interferometer. Colored lines show
the performance of variationally optimized circuits for the depth $(n_{\rm
En},n_{\rm De})$ of entangling and decoding layers as indicated. The number of
variational parameters is given by $3(n_{\rm En}+n_{\rm De})$. The performance
of the optimal quantum interferometer (OQI) [31] is indicated by the dotted
line. The shaded areas indicate the classically accessible (purple) and the
quantum mechanically forbidden (gray) regions (for $N=64$). Related results
applied to atomic clocks are shown in Fig. 10

Figure 3: Visualization of quantum states $\ket{\psi_{\phi}}=\exp(-i\phi
J_{z})\ket{\psi_{\rm in}}$, and quantum measurement operators as Wigner
distributions on the generalized Bloch sphere for $N=64$ and
$\delta\phi\approx 0.7$. The first (a,d), second (b,e), and third column (c,f)
correspond to $(n_{\rm En},n_{\rm De})=(1,0)$ (squeezed input state, and
$J_{y}$ measurement operator), the optimal quantum interferometer, and to a
$(1,3)$ quantum circuit, respectively. Measurement operators are visualized as
colored contours on the Bloch sphere corresponding to different measurement
outcomes. The corresponding optimized (optimal) states $\ket{\psi_{\phi}}$ are
shown at various angles $\phi$ as gray shaded areas. (a,b,c) three dimensional
view of the generalized Bloch sphere with a state rotated to $\phi=\pi/3$. (d,
e, f) Top view of the Bloch sphere with the state rotated to angles $\phi=\
0,\ \pi/3,\ 2\pi/3$. (g) Measurement probability $p(m|\phi)$ [see Eq. (9)]
corresponding to the overlap between the contours of the measurement
distribution and the respective state distribution, displayed in the same
column. The three rows correspond to the above three angles $\phi$. Note that
for the $J_{y}$ measurement the distributions at angles $\pi/3$ and $2\pi/3$
are indistinguishable in measurement statistics. In contrast, for the OQI and
the $(1,3)$ quantum circuit these angles are well resolved.

###  II.3 Results of optimization

Results of interferometer optimizations 555For the optimization results
presented throughout this manuscript, we calculate exact gradients and use a
combination of sequential quadratic programming and the Nelder-Mead method, as
implemented in Matlab, to determine optimal solutions. are shown in Fig. 2 for
$N=64$ atoms. The figure plots the ratio $\Delta\phi/\delta\phi$ of the root
BMSE $\Delta\phi$ relative to the normal prior width $\delta\phi$. The more
information we gain about the parameter $\phi$ in a single measurement, the
smaller the value of this ratio.

The black dotted line shows the result of the unrestricted minimization of the
cost function (2) with normal prior [31], which we refer to as optimal quantum
interferometer (OQI). It defines the region (shaded area) inaccessible to any
$N$-particle quantum interferometer. The purple line represents performance of
the conventional Ramsey interferometer with CSS as input and a linear
estimator, given by the $(0,0)$–circuit. Thus, the shaded area above the
purple line roughly defines the classically achievable performance.

The performance of the entanglement enhanced interferometer is shown with
colored lines. The orange curve represents a $(1,0)$–circuit corresponding to
a squeezed spin state (SSS) interferometer [72, 73], employing the OAT
interaction to generate an entangled initial state with suppressed
fluctuations along the axis of the effective $J_{y}$ measurement. The minimum
of the orange line is located at smaller $\delta\phi$ values when compared to
the minimum of the purple line corresponding to the SQL. This manifests the
fact that SSS input state increases the sensitivity of the phase measurement
at expense of dynamic range [76, 85, 86]. By adding a single layer of a
decoding circuit we obtain the blue curve corresponding to the
$(1,1)$–interferometer with a slightly enhanced sensitivity and dynamic range.
The red and green lines correspond to $(1,3)$– and $(2,5)$–circuits,
respectively, and show striking improvement in sensitivity, providing an
excellent approximation for the optimal interferometer (black dotted line).
Remarkably, the minima of the red, green, and black curves are located at a
wider dynamic range $\delta\phi$ than that of the CSS interferometer. Hence
the optimal entangled initial state and the effective nonlocal observable
allows us to achieve both _a higher phase sensitivity_ and _a wider dynamic
range_.

Figure 4: (a) Phase $\phi$ dependence of the estimator expectation value [Eq.
(11)] of the optimized $N$ = 64 particle interferometer at different circuit
depths $(n_{\rm En},n_{\rm De})$ with $3(n_{\rm En}+n_{\rm De})$ variational
parameters, in comparison to the optimal quantum interferometer (OQI). The
optimization is performed for the prior distribution width $\delta\phi\approx
0.7$, indicated by the vertical lines. (b) Mean squared error [Eq. (8)]
corresponding to the estimator expectation values curves above.

To gain understanding of the physical meaning of the measurements and initial
states emerging from the numerical optimization, we show their Wigner
functions in Fig. 3. A formal definition of the Wigner distribution is
provided in App. C. The three columns correspond, in consecutive order, to the
$(1,0)$–circuit (SSS interferometer), the optimal quantum interferometer of
[31], and the $(1,3)$–circuit. The chosen prior width $\delta\phi\approx 0.7$
is indicated in Fig. 2 by the vertical dashed line. The first row of panels
3(a-c) shows 3D views of the generalized Bloch sphere with Wigner functions of
the measurement operators shown in shades of red and blue for $J_{y}$, the
optimal observable, and $\smash{\mathcal{U}_{\rm
De}^{\dagger}J_{z}\mathcal{U}_{\rm De}}$ operators, respectively. A contour of
constant color corresponds roughly to a certain measurement outcome which is
obtained with the probability given by the overlap of the contour with the
Wigner function of a quantum state. The states are shown in 3(a-f) with the
gray outlined areas.

Panel 3(a) shows clearly the non-optimality of the SSS interferometer with a
measurement of the spin projection $J_{y}$. Optimization of the SSS results in
a moderate level of squeezing (gray ellipse squeezed along the $y$-axis). More
squeezing would produce stronger anti-squeezing along $z$-axis leading to
overlap with more contours of the $J_{y}$ Wigner function, thus increasing the
variance of the measurement results for nonzero $\phi$ [76, 86]. Another
limitation of the SSS interferometer, illustrated in panels (d) and (g), is
the reduced dynamic range in the interval $-\pi/2$ and $\pi/2$. Panels (d) and
(g) show that states rotated by the phase angle $\phi=2\pi/3>\pi/2$ have the
same measurement statistics as states rotated by $\phi=\pi/3$. Thus, phases
outside the $[-\pi/2,\pi/2]$ interval can not be reliably estimated.

The optimal quantum interferometer is explained in the central column of Fig.
3. Here panel (b) shows that the initial state is squeezed significantly
stronger than in the SSS interferometer. This is possible because the
corresponding optimal measurement is very similar to the phase operator of
Pegg and Barnett [87], which has eigenstates with well defined phases (see
Sec. II.4 below for detailed comparison). One can see that the color contours
of the optimal measurement Wigner function in panels (b) and (e) are aligned
with the meridians and thus overlap favorably with the strongly squeezed
initial state rotated by a wide range of phase angles $\phi$. Strikingly, the
OQI can effectively use the full $2\pi$ dynamic range, as illustrated in
panels (e) and (g).

Finally, the $(1,3)$–interferometer, presented in the third column of Fig. 3,
exhibits properties similar to the OQI. Interestingly, the initial state in
this case is not a conventional squeezed state, as shown in panel (c), but a
slightly twisted one. This, however, does not impair the performance of the
interferometer as the effective measurement is also twisted such that it
matches the initial state rotated by a wide range of phase angles. This
peculiarity is a consequence of the restricted gate set available for the
variational optimization in a realistic system. It is remarkable that the low
depth $(1,3)$–circuit already provides an excellent approximation for the OQI.

The extended dynamic range of the variationally optimized interferometer is
explored in Fig. 4. Panels (a) and (b) show, respectively, the estimator
expectation value

$\displaystyle\bar{\phi}_{\rm est}\equiv\sum_{m}\phi_{\rm est}(m)p(m|\phi)$
(11)

and the estimator mean squared error (8) as functions of the actual phase
$\phi$ for an interferometer optimized for prior width of $\delta\phi\approx
0.7$ (indicated with vertical dashed lines).

The estimator expectation value of the $(0,0)$– and $(1,0)$–circuit (CSS and
SSS interferometer) is given by a sine function [purple and orange line in
panel (a)], thus, it can unambiguously map the estimated phase to the actual
phase in the range between $-\pi/2$ and $\pi/2$. However, the useful dynamic
range of the interferometer is even narrower as shown by the estimator error
in panel (b). The estimator error of the SSS state is suppressed below the CSS
benchmark line only for phases between, roughly, $-\pi/4$ and $\pi/4$. The
$(1,1)$–interferometer [blue line in (a) and (b)] starts to exploit the
entangled measurement and achieves a bit wider linear regime of
$\bar{\phi}_{\rm est}$ in (a) and a wider region of suppressed estimator error
in (b). Although the minimum error of $(1,1)$–circuit is larger than that of
$(1,0)$–circuit, it still has superior overall sensitivity as phases in the
tails of the prior distribution are better resolved.

Finally, more complex decoding operations employed by the $(1,3)$– and
$(2,5)$–circuit (red and green lines) allow to approach the performance of the
optimal interferometer (black dotted lines). The linear regime of
$\bar{\phi}_{\rm est}$ extends almost to the full $2\pi$ range, and the
estimator error is well suppressed for phases deeply within the tails of the
prior.

###  II.4 Comparison between variational and phase operator based
interferometers

Figure 5: Relative performance of the covariant, phase operator based
interferometer (POI) (blue) and the variational $(1,3)$– and
$(2,5)$–interferometers (green and red points, respectively) with respect to
the OQI for a given system size $N$. The $\chi$ ratio is defined in Eq. (12),
OQI corresponds to $\chi=1$. The dashed lines represent empirical scalings,
green and red one scale as $\sim N$, and blue is $\sim N^{-0.77}$.

From a theory perspective it is interesting to compare the performance of the
variationally optimized interferometer and the interferometer based on
covariant measurement [33, 34]. Here covariant measurements represent the
class of measurements optimal for phase estimation with no _a priori_
knowledge and phase-shift symmetry, i.e. assuming a prior distribution
$\mathcal{P}(\phi)=(2\pi)^{-1}$ and a $2\pi$-periodic cost function, as
opposed to the MSE (1).

In the case of clocks and magnetometry, the free evolution encoding the phase
$\phi$ is the collective spin rotation, $e^{-i\phi J_{z}}$. The corresponding
covariant measurement optimal for estimation of the rotation angle $\phi$ can
be represented by the von Neumann measurement [88] with phase operator
$\hat{\Phi}$ [87], which we define in App. D.

In order to evaluate the performance of the phase operator based
interferometer (POI), we minimize the cost function (2) for $\hat{\Phi}$ as
the observable and the normal prior $\mathcal{P}_{\delta\phi}(\phi)$. To this
end, we use the optimal Bayesian estimator known as the _Minimum Mean Squared
Error_ (MMSE) estimator [3] and find the corresponding optimal initial state
$\ket{\psi_{\hat{\Phi}}}$ (see App. D for details). This results in the
optimal posterior width $\Delta\phi_{\rm POI}$ as discussed in Sec. II.3 for
the variationally optimized interferometer.

To compare different interferometers we consider their performance at the
optimal prior width with respect to the OQI performance and define the ratio:

$\chi=\frac{\min_{\delta\phi}(\Delta\phi/\delta\phi)}{\min_{\delta\phi}(\Delta\phi_{\rm
OQI}/\delta\phi)}.$ (12)

The $\chi$ value corresponds to the ratio of minima of an interferometer and
the OQI curves in Fig. 2. The OQI corresponds to $\chi=1$.

Figure 5 shows the $\chi-1$ value for variationally optimized and $\hat{\Phi}$
based interferometers for various system sizes up to $N=512$. The figure
highlights sub-optimality of the POI (blue points) for the task of phase
estimation with _non-periodic_ cost function, as is relevant for frequency
estimation in, e.g., optical clocks. For small systems, $N\lesssim 16$, the
POI is up to $\sim 10\%$ less efficient than the OQI and the variational
$(1,3)$– and $(2,5)$–interferometers (green and red points, respectively).
$(1,3)$–circuit outperforms POI for systems of up to $N\sim 40$ atoms, whereas
$(2,5)$–circuit is better for up to $N\sim 100$ atoms. In the limit of large
number of atoms, $N\ggg 1$, the POI approaches the OQI performance. Empirical
fitting indicates convergence rate $\chi_{\rm POI}-1\sim N^{-0.77}$, as $N$
increases. On the other hand, the variationally optimized interferometers
diverge from OQI linearly with $N$.

###  II.5 Variational Optimization in Presence of Imperfections and Noise

Variational optimization can be extended to include imperfections and
decoherence. This optimization can also be carried out on the physical quantum
sensor. This is particularly beneficial when the experimental characterization
of imperfections and noise is incomplete.

There are various sources of imperfections and decoherence, which are relevant
in our context. First, there are control errors in implementing variational
quantum gates. These include offsets of control parameters and Hamiltonian
design errors. The latter are deviations of the physically realized vs. the
ideal Hamiltonian, e.g. in the implementation of one-axis twisting
interaction. However, if these (unknown) control or design errors are static,
i.e. do not fluctuate between experimental runs, a variational algorithm
performed on the device will still optimize, and thus compensate in the best
possible way for these errors in $\mathcal{U}_{\text{En}}$ and
$\mathcal{U}_{\text{De}}$, i.e. find the best gate decomposition for given
building blocks. In addition, there will be decoherence due to fluctuations of
control parameters, or coupling to an environment as in spontaneous emission
or dephasing.

To incorporate the latter we need to extend the formalism to density matrices
instead of the previously discussed pure states. Below we illustrate this by
an optimization of the Ramsey interferometer in the presence of single atom
dephasing noise during the Ramsey interrogation time $T$, as one example of
experimentally relevant decoherence. Local dephasing noise is described by the
Lindbladian
$\mathcal{L}\circ\rho=(1/4)\sum_{j=1}^{N}\left(\sigma^{z}_{j}\rho\,\sigma^{z}_{j}-\rho\right)$.
Thus the density matrix after the Ramsey interrogation time,

$\displaystyle\rho_{\bm{\theta}}^{\phi,\gamma T}=e^{-i\phi
J_{z}}\left(e^{\gamma T\mathcal{L}\circ}\rho_{\bm{\theta}}\right)e^{i\phi
J_{z}},$ (13)

can be expressed in terms of the dimensionless phase $\phi$ accumulated during
the Ramsey interrogation time $T$ and the effective exposure to the dephasing
noise $\gamma T$ with dephasing rate $\gamma$. Here
$\rho_{\bm{\theta}}=\mathcal{U}_{\rm
En}(\bm{\theta})\ket{\psi_{0}}\bra{\psi_{0}}\mathcal{U}^{\dagger}_{\rm
En}(\bm{\theta})$, where we used that the dephasing Lindbladian and the free
evolution of the clock supercommute. The particle permutation symmetry of the
Lindbladian enables us to simulate systems at a cubic cost in $N$ [89, 90].
The conditional probability, required to determine the BMSE in Eq. (10)
therefore reads

$\displaystyle p_{\bm{\theta},\bm{\vartheta}}(m|\phi,\gamma
T)=\bra{m}\mathcal{U}_{\rm De}(\bm{\vartheta})\rho_{\bm{\theta}}^{\phi,\gamma
T}\mathcal{U}^{\dagger}_{\rm De}(\bm{\vartheta})\ket{m}.$ (14)

Figure 6: Accuracy of an optimized $N=64$ particle interferometer in the
presence of single particle dephasing noise exposures $\gamma T/\delta\phi$
relative to the prior distribution width, indicated by different line styles.
The results are displayed for different circuit complexities $(n_{\rm
En},n_{\rm De})$ with $3(n_{\rm En}+n_{\rm De})$ variational parameters. For
comparison the accuracy of the noise free optimal quantum interferometer (OQI)
is indicated by the black dotted line.

Figure 6 shows that the optimized $\Delta\phi/\delta\phi$ increases as the
noise increases, as expected. For a small $\gamma T/\delta\phi=0.01$ the
variational $(1,3)$–interferometer is close to optimal without noise.
Remarkably for all ratios $\gamma T/\delta\phi\lesssim 1$, the minimum of the
$(1,3)$ interferometer remains well below the uncorrelated $(0,0)$– and the
SSS $(1,0)$–interferometers. This ordering of the respective global minimum is
independent of $N$, whereas for $\gamma T/\delta\phi=10$ none of the
entangling sequences improve significantly compared to SQL [91].

###  II.6 Towards the Heisenberg limit

The variationally optimized interferometer with low-depth quantum circuits
found within the Bayesian framework quickly approaches the accuracy of the
optimal Ramsey interferometer. We will now discuss our results from the
perspective of reaching the Heisenberg limit (HL).

The HL is a lower bound on the accuracy of an interferometer imposed by
quantum mechanics. For an $N$-atom interferometer the HL and SQL are
traditionally written as

$\displaystyle\Delta\phi_{{\rm
HL}}^{2}\geq\frac{1}{N^{2}},\quad\Delta\phi^{2}_{{\rm SQL}}\geq\frac{1}{N},$
(15)

which must be understood in context of the quantum Fisher information [92, 67,
69] and quantum Cramér-Rao bound [93, 33] (implying $\delta\phi\rightarrow
0$). In contrast, in the present work we have adopted a Bayesian approach,
which includes optimizing for a _finite dynamic range_ $\delta\phi$. To
evaluate the performance of our quantum variational results for a given
circuit depth in comparison with HL, we will adopt below van Trees inequality
[94, 95] as a bound for the BMSE.

In brief, for any given conditional probability distribution $p(m|\phi)$ the
Cramér-Rao inequality

$V(\phi)\geq\frac{1}{F_{\phi}}$ (16)

provides a bound on the variance of an unbiased ($\bar{\phi}_{{\rm
est}}=\phi$) estimator $V(\phi)\equiv\sum_{m}[\phi_{{\rm
est}}(m)-\bar{\phi}_{{\rm est}}]^{2}p(m|\phi)$ based on the Fisher information

$F_{\phi}=\sum_{m}\big{[}\partial_{\phi}\log p(m|\phi)\big{]}^{2}p(m|\phi).$
(17)

For pure states, i.e. in the absence of decoherence, $\smash{F_{\phi}\leq
N^{2}}$ in correspondence to the HL above. We emphasize that the Cramér-Rao
inequality seeks to identify optimal unbiased estimators, which can in general
be achieved only _locally_ in $\phi$, i.e. in a small neighborhood of a given
phase, and not for a finite dynamic range as is the goal in our Bayesian
approach.

Figure 7: Plot of $\Delta\phi_{M}\,N$, i.e. the standard deviation of an
effective measurement rescaled by the ensemble size $N$, vs. prior width
$\delta\phi$. Solid lines show results for the optimized interferometer with
circuit depth $(n_{\rm En},n_{\rm De})=(2,5)$ in comparison to the analytic
expression describing a GHZ-state interferometer [Eq. (21)] shown with dashed
lines and the _$\pi$ -corrected Heisenberg limit_ including phase slips [Eq.
(22)] shown with dotted lines. The _Heisenberg limit_ and the _$\pi$
-corrected Heisenberg limit_ are indicated with dotted horizontal lines.

Figure 8: Performance of the variationally optimized $N=16$ Ramsey
interferometer on a $4\times 4$ lattice interacting via finite range Rydberg
dressing interactions (23) with interaction radii $R_{C}$ in units of the
array spacing $a$. Colored lines show the reduction of the posterior phase
distribution width $\Delta\phi$ relative to the prior distribution width
$\delta\phi$ for variationally optimized circuits complexity $(n_{\rm
En},n_{\rm De})$ with $3(n_{\rm En}+n_{\rm De})$ variational parameters. The
performance of the optimal quantum interferometer (OQI) [31] is indicated by
dotted lines. The shaded areas indicate the classically accessible (purple)
and the quantum mechanically inaccessible (gray) regions. (a) Prior width
dependence of the optimized solution at $R_{C}/a=2$. (b) Interaction range
dependence of the optimal solution at a prior distribution width
$\delta\phi\approx 0.8$ indicated by the vertical dashed line in (a).

In the Bayesian framework, a bound on the BMSE is imposed by van Trees’
inequality,

$\displaystyle\big{(}\Delta\phi\big{)}^{2}\geq\frac{1}{\overline{F}_{\phi}+\mathcal{I}}.$
(18)

Here, the first term in the denominator is the Fisher information (17)
averaged over the prior distribution, $\overline{F}_{\phi}=\int
d\phi\mathcal{P}(\phi)F_{\phi}$. The second term is the Fisher information of
the prior distribution, $\mathcal{I}=\int
d\phi\mathcal{P}(\phi)\big{[}\partial_{\phi}\log\mathcal{P}(\phi)\big{]}^{2}$,
representing the prior knowledge. To isolate the measurement contribution from
the prior knowledge, we define an effective measurement variance
$(\Delta\phi_{M})^{2}$ via

$\frac{1}{(\Delta\phi_{M})^{2}}\equiv\frac{1}{(\Delta\phi)^{2}}-\mathcal{I},$
(19)

and obtain

$(\Delta\phi_{M})^{2}\geq\frac{1}{\overline{F}_{\phi}}\geq\frac{1}{N^{2}},$
(20)

reminiscent of the Cramér-Rao inequality (16). In case of a normal prior
distribution (3) we have $\mathcal{I}=(\delta\phi)^{-2}$, and the effective
measurement variance (19) reads
$(\Delta\phi_{M})^{-2}\equiv(\Delta\phi)^{-2}-(\delta\phi)^{-2}$.

In Fig. 7 we plot $(\Delta\phi_{M})\times N$, the measurement error scaled to
the atom number, for the $(2,5)$–variational interferometer (solid lines) as a
function of the prior width $\delta\phi$ for a range of atom numbers $N$. In
addition, we indicate the HL and the $\pi$-corrected HL (see below) as dotted
lines and show results for a GHZ interferometer with spin $x$-parity
measurement [70] (dashed lines). In the case of the GHZ interferometer with a
normal prior we have

$(\Delta\phi_{M}^{{\rm
GHZ}})^{2}=\frac{e^{(N\delta\phi)^{2}}}{N^{2}}-(\delta\phi)^{2}$ (21)

showing that the GHZ interferometer attains the HL uncertainty
$\Delta\phi_{M}\rightarrow 1/N$ for a given prior width $\delta\phi$ only for
atom numbers $N\lesssim 1/\delta\phi$. This fact is illustrated in Fig. 7 by
the dashed lines which diverge from the HL for smaller and smaller
$\delta\phi$ as $N$ grows. In contrast, the variational interferometer (solid
lines) is of the order of the $\pi$-corrected HL [34, 96, 35, 37],
$\Delta\phi_{M}\rightarrow\pi/N$, for a wide range of prior widths
$\delta\phi$ as $N$ increases.

Intuitively, the emergence of $\pi$-corrected HL can be understood as follows.
The optimal $N$ atom quantum interferometer can be described as a von Neumann
measurement in the particle permutation symmetric subspace [34, 31]. Thus,
there are $N+1$ possible measurement outcomes to distinguish at most $N+1$
phase values in the interval $[-\pi,\pi]$. The corresponding estimation error
for evenly spread estimates reads $\Delta\phi\sim(1/2)\,2\pi/(N+1)\to\pi/N$.

For large $\delta\phi$ the solid lines in Fig. 7 exhibit strong deviations
from the asymptotic $\pi$-corrected HL behavior. The cusps are explained by
phase slips outside the interval $[-\pi,\pi]$ which lead to a squared
estimation error of $4\pi^{2}$. For a normal prior distribution, the
performance of an interferometer limited by the $\pi$-corrected HL including
the phase slips is given by

$(\Delta\phi_{M}^{{\pi\rm
HL}})^{2}=\frac{\pi^{2}}{N^{2}}+4\pi^{2}\Big{(}1-\mathrm{erf}\frac{\pi}{\sqrt{2}\delta\phi}\Big{)}.$
(22)

Results of this section are obtained in absence of decoherence.

###  II.7 Finite range interactions

Our previous discussion assumed infinite range interactions as entangling
quantum resource, while e.g. neutral atoms stored in tweezer arrays feature
finite range interactions. The variational optimization of the BMSE can be
directly generalized to finite range interactions, which we illustrate by
optimizing a sensor based on Rydberg dressing resources [97, 98]
$\mathcal{D}_{\mu}(\theta)=\exp[{-i\theta(H^{D}_{\mu}/V_{0})}]$, as is
realized in alkaline earth tweezer clocks [46, 47, 48]. The effective
interaction Hamiltonian we use for the optimization reads

$\displaystyle
H^{D}_{\mu}=\sum_{k,l=1}^{N}\frac{V_{0}R_{C}^{6}/4}{|\bm{r}_{k}-\bm{r}_{l}|^{6}+R_{C}^{6}}{\sigma}^{\mu}_{k}{\sigma}^{\mu}_{l},\quad(\mu=x,y,z)$
(23)

where $\bm{r}_{k}$ represents the position of particle $k$. The interaction
strength at short distances $V_{0}$ and interaction radius $R_{C}$ depend on
the Rydberg level and the dressing laser used to let the particles interact
[99].

Ref. [66] presented a study of variationally optimized spin-squeezed input
states, and we refer to this work for the elementary gates we employ as
building blocks for variationally optimizing entangling and decoding
operations. In analogy to Eqs. (6) and (7), we write the entangler and
decoder, effectively replacing the ${\cal T}_{x,z}$ by ${\cal D}_{x,z}$. In a
similar way we can rewrite Eq. (9) to account for dynamics in full
$2^{N}$-dimensional Hilbert space.

Figure 8(a) shows the optimized $\Delta\phi/\delta\phi$ for a $4\times 4$
square array for $R_{C}=a$ with $a$ the lattice constant. We find variational
solutions approximating the OQI, similarly to the OAT interactions in Fig. 2.
In contrast to the infinite range OAT interaction we are not able to exactly
reproduce the optimal GHZ-state interferometer at $\delta\phi<1/N$.
Nonetheless, at any prior distribution width significant improvement beyond
the uncorrelated interferometer is achieved and in particular around global
minimum of the optimal interferometer (vertical dashed line), the decoder-
enhanced circuits clearly surpass sensitivity of entangled input states only.

In Fig. 8(b) we further study the dependence on the scaled interaction radius
$R_{C}/a$ for a fixed prior distribution width $\delta\phi$ corresponding to
the minima of variational and optimal interferometer curves in Fig. 8(a)
(vertical dashed line). We see that even in the limit of an effective nearest
neighbor interaction $R_{C}=a$ a clear improvement beyond the classical
sensitivity limit is possible. As the interaction radius increases, the root
BMSE of the variationally optimized interferometer decreases, ultimately
reproducing the results of infinite-range interactions in the limit
$R_{C}/a\rightarrow\infty$.

Theoretical treatment of the variational interferometry with finite range
interactions involves solution of a quantum many-body problem. This, in
general, is an exponentially hard problem representing the regime where
variational optimization on the quantum sensor as a physical device provides a
(relevant) quantum advantage, beyond the capabilities of classical
computation.

##  III Application to Atomic Clocks

Atomic clocks realized with neutral atoms in optical trap arrays or trapped
ions provide us with natural entanglement resources to implement variationally
optimized Ramsey interferometry. Below we provide a study of a variationally
optimized clock assuming as quantum resources global spin rotations and OAT,
as realized, for example, with trapped ions as Mølmer-Sørensen gate, or in
cavity setups with neutral atoms. This discussion is readily extended to other
platforms and resources.

Optical atomic clocks operate by locking the fluctuating laser frequency
$\omega_{L}(t)$ to an atomic transition frequency $\omega_{A}$ [1]. To this
end, an atomic interferometer is used to repeatedly measure the phase
$\phi_{k}=\int_{t_{k}}^{t_{k}+T}dt[\omega_{L}(t)-\omega_{A}]$ accumulated
during interrogation time $T$ at the $k$-th cycle of clock operation, i.e.
$k=1,2,\ldots$. After each cycle, the measurement outcome $m_{k}$ providing
the phase estimate $\phi_{\rm est}(m_{k})$ is used to infer an estimated
frequency deviation $\phi_{\rm est}(m_{k})/T$. In combination with previous
measurement results this is used to correct the laser frequency fluctuations
via a feedback loop yielding the corrected frequency of the clock $\omega(t)$.
For further details on the actual clock operation we refer to App. G, where we
also describe our numerical simulations of optical atomic clocks. We emphasize
the importance of finite dynamic range in phase estimation in identifying the
optimal clock operation, as provided by the Bayesian approach of Sec. II.

The relevant quantity characterizing the long-term clock instability is the
Allan deviation $\sigma_{y}(\tau)$ for fluctuations of fractional frequency
deviations $y\equiv[\omega(t)-\omega_{A}]/\omega_{A}$, averaged over time
$\tau\gg T$ [1]. To connect the Bayesian posterior phase variance of the
optimized interferometer (10) of Sec. II, we follow the approach of [78] to
obtain predictions for the clock instability in the limit of large averaging
time $\tau$. Our predictions are supported by numerical simulations of the
closed servo-loop of the optical atomic clocks.

In the following we assume that interrogation cycles can be performed without
dead times (Dick effect). This can be achieved using interleaved interrogation
of two ensembles [100]. For interrogation of a single ensemble, Dick noise may
pose limitations for interaction-enhanced protocols especially for larger
ensembles, as was analyzed for squeezed states in Ref. [79]. In App. F and
App. H we characterize in more detail the requirements regarding dead time for
the class of variational protocols developed here.

###  III.1 Prediction of clock instability in the Bayesian framework

As shown in [78], the Allan deviation can be well approximated by means of the
effective measurement uncertainty $\Delta\phi_{M}$ which isolates the
measurement contribution from the prior knowledge, as in Eq. (19). Assuming no
dark times between interrogation cycles, the Allan deviation reads

$\sigma_{y}(\tau)=\frac{1}{\omega_{A}}\frac{\Delta\phi_{M}(T)}{T}\sqrt{\frac{T}{\tau}}.$
(24)

Here $\tau/T$ is the number of cycles of clock operation and
$\Delta\phi_{M}(T)\equiv[(\Delta\phi_{T})^{-2}-(\delta\phi_{T})^{-2}]^{-1/2}$
is the effective measurement uncertainty of one cycle. The posterior width
$\Delta\phi_{T}$ is found according to (10) assuming a prior width
$\delta\phi_{T}=(b_{\alpha}T)^{\alpha/2}$ corresponding to laser noise
dominated spreading of the phase distribution within one interrogation cycle.
The labels $\alpha=1,2,3$ specify temporal correlations in the phase noise of
the laser and correspond to atomic clocks with a white-, flicker-, or random-
walk-frequency-noise-limited laser, respectively. The laser noise bandwidth
$b_{\alpha}$ and the exponent $\alpha$ are related to the power spectral
density $S_{L}(f)\propto f^{1-\alpha}$ of the free running laser (see App. A).
Representative examples for $\sigma_{y}(\tau)$ when using variationally
optimized protocols are shown in Fig. 9. The solid lines result from numerical
simulations of the full feedback loop of an atomic clock in which an
integrating servo corrects out frequency fluctuations over the course of
multiple cycles, see App. G for details. For the simulations we assume the
atoms as ideal frequency references without any systematic shift of
$\omega_{A}$.

Figure 9: Allan deviation representing a single run of a flicker frequency
noise limited clock servo loop based on variationally optimized $N=64$
particle interferometers at different circuit complexities $(n_{\rm En},n_{\rm
De})$ and a Ramsey interrogation time $b_{2}T\approx 0.5$ (solid lines). For
comparison the long time scaling predicted by Eq. (25) is shown by the dashed
lines.

Figure 10: Dimensionless Allan deviation $\sigma$ [see Eq. (25)] of a $N=64$
flicker-frequency-noise limited clock at constant averaging time $\tau$ as a
function of the Ramsey interrogation time $T$ rescaled to the bandwidth of the
laser noise. The dotted black line indicates the instability of the optimal
quantum clock (OQC). (a) Analytic expressions for the instability of coherent
spin state (CSS) and GHZ-state clock (solid lines) in comparison to quantum
projection noise limits, namely the standard quantum noise limit (SQL),
$\pi-$corrected Heisenberg limit ($\pi$HL), HL (dashed) and the coherence time
limits (CTL) of a CSS clock and the OQC (densely dotted). (b) Variational
approximation of the OQC at increasing circuit complexities $(n_{\rm
En},n_{\rm De})$ with $3(n_{\rm En}+n_{\rm De})$ variational parameters.
Markers show the numerically determined instability extracted from simulations
of the full feedback loop of an atomic clock, described in detail in App. G,
for a selection of optimized protocols. The numerical data is displayed only
up to values of $b_{2}T$ where no fringe-hop occurred within the $2\times
10^{6}$ simulated clock cycles. Beyond this point an abrupt loss of stability
was observed.

In atomic clocks the simulated Allan deviations presented in Fig. 9 are larger
at small averaging times $\tau/T\sim 1$, due to the delayed feedback, before
reducing as $\sigma_{y}(\tau)\propto\tau^{-1/2}$ at long averaging times
$\tau/T\gg 1$ when all correlated laser noise is corrected out. To determine
long-term stability the Allan deviation is measured experimentally for a time
$\tau$ long enough that clock instability has reached this asymptotic scaling.
Therefore, we introduce and consider below a dimensionless prefactor for the
asymptotic scaling

$\displaystyle\sigma=\frac{\Delta\phi_{M}(T)}{\sqrt{b_{\alpha}T}},$ (25)

which gives the Allan deviation in units of
$\smash{\omega_{A}^{-1}(b_{\alpha}/\tau)^{1/2}}$, as shown by the dashed lines
in Fig. 9. In the following, we use Eq. (25) to re-evaluate the performance of
the optimized interferometers presented in Fig. 2 as the achievable long-term
clock instability $\sigma$ at an averaging time $\tau$. In comparison to the
framework of Sec. II the BMSE is replaced by the Allan deviation and the prior
width by the interrogation time $T$. We note that the scaling of the Allan
deviation with respect to $T$ is more intricate than the one of the BMSE with
the prior width: On the one hand, a large interrogation time means good
accuracy in frequency estimation, but on the other hand, it also broadens the
prior distribution and therefore degrades the phase estimation.

###  III.2 Results of the clock optimization

Figure 10(a,b) shows the achievable long-term clock instability $\sigma$ as a
function of the interrogation time $T$ for clocks made of $N=64$ atoms and the
flicker-noise-limited laser. The purple line (in both panels) represents
performance of the conventional clock exploiting Ramsey interferometer with
CSS as input, collective spin projection measurement, and a linear estimator,
given by the circuit $(0,0)$. Thus, the shaded area above the purple line
roughly defines the performance achievable by classical clocks. In the case of
CSS based classical clocks the cost function (10) can be analytically
minimized [78] yielding the dimensionless Allan deviation

$\sigma^{\rm
CSS}=\sqrt{\frac{1}{b_{\alpha}T}\left[\frac{e^{\nu}}{N}+\Big{(}1-\frac{1}{N}\Big{)}\mathrm{sinh}\,\nu-\nu\right]},$
(26)

where $\nu\equiv(\delta\phi_{T})^{2}$. The expression (26) has two important
limits. For small interrogation times and, consequently, small prior widths
the performance of the clock is limited by the quantum projection noise of the
uncorrelated atoms as $\sigma_{\rm SQL}=(N\,b_{\alpha}T)^{-1/2}$. The SQL
limited clock instability $\sigma_{\rm SQL}$ (dashed purple line) decreases as
the interrogation time grows. For large interrogation times, $b_{\alpha}T\sim
1$, however, the laser noise becomes dominant and generates accumulated phase
values exceeding the dynamic range of the atomic interferometer, thus, leading
to the laser coherence time limit (CTL) [79] of the clock $\sigma^{\rm
CSS}_{\rm
CTL}=\\{{[\mathrm{sinh}(\delta\phi_{T}^{2})-\delta\phi_{T}^{2}]}/(b_{\alpha}T)\\}^{1/2}$
(dotted purple line). Between these two limits there exists an optimal
interrogation time delivering the minimum Allan deviation $\sigma_{\rm
opt}\equiv\min_{T}\sigma$ which defines the optimal clock performance.

The black dotted line in Fig. 10(a,b) shows the instability of the optimal
quantum clock (OQC), $\sigma^{\rm OQC}$, exploiting single-shot protocols with
the optimal interferometer. The gray shaded region below the black dotted
curve is inaccessible to any $N$-particle clock not using entanglement between
different clock cycles for initial state preparations and/or measurements. The
laser CTL for the optimal clock in the asymptotic limit of large $N$ can be
estimated from Eq. (2) by assuming zero phase estimation error within the
$[-\pi,\pi]$ interval and $\epsilon(\phi)=4\pi^{2}$ outside of the interval
due to the phase slip

$\sigma_{\rm CTL}^{\rm
OQC}=\sqrt{\frac{4\pi^{2}}{b_{\alpha}T}\Big{(}1-\mathrm{erf}\frac{\pi}{\sqrt{2}\,\delta\phi_{T}}\Big{)}}.$
(27)

The green dotted line in panel (a) shows the laser CTL for the optimal clock,
$\sigma_{\rm CTL}^{\rm OQC}$. The optimal clock instability at shorter
interrogation times demonstrates two distinct scalings corresponding to the
two Heisenberg limits discussed in Sec. II.6. At very short times,
$(b_{\alpha}T)^{\alpha/2}\lesssim N^{-1}$, the GHZ state based clock (red
line) becomes optimal approaching the instability limit given by the
conventional HL, $\smash{\sigma_{\rm HL}=N^{-1}({b_{\alpha}T})^{-1/2}}$ (red
dashed line). Larger interrogation times correspond to wider prior phase
distributions hence the $\pi$-corrected HL becomes the limiting factor,
$\smash{\sigma_{\pi{\rm HL}}=\pi N^{-1}({b_{\alpha}T})^{-1/2}}$ (green dashed
line). The optimal quantum clock instability in the limit of large number of
atoms, $N\to\infty$, is fundamentally restricted by the interplay between the
$\sigma_{\pi{\rm HL}}$ and $\sigma^{\rm OQC}_{\rm CTL}$ as we will discuss
below.

The instabilities of clocks based on variationally optimized interferometers
employing quantum circuits of various complexities are shown in Fig. 10(b)
with solid color lines. In particular, the orange line corresponds to the SSS
based clock, given by the circuit $(1,0)$. As the circuits depth grows, the
enhanced dynamic range of the variational interferometer shifts the laser CTL
towards larger interrogation times which in combination with suppressed shot
noise reduces the clock instability. The figure shows that variational clocks
of growing complexity quickly outperform the SSS clock and approach the
optimal quantum clock instability. Beyond the model predictions this
improvement is also observed in simulations of a full clock operation using
variationally optimized protocols, as shown by the markers in Fig. 10(b).
Deviations between theory and numerical results can arise due to a number of
different effects. For one, the onset of fringe-hops for $b_{2}T\sim 1$ is not
included explicitly in the models. Especially for small $N$ a sudden loss of
stability, resulting from fringe-hops, can occur before reaching the CTL due
to stronger, non-Gaussian measurement noise [78, 79]. In contrast, for clocks
with larger $N$ and increasing complexity it is expected that the onset of
fringe-hops and the minimum of CTL coincide. Another source of discrepancy is
the assumption of a laser noise dominated prior width
$\delta\phi_{T}=(b_{\alpha}T)^{\alpha/2}$. Propagation of the measurement
uncertainty and delay within the feedback control can lead to a broadening of
the true phase distribution. Especially protocols which are highly optimized
to a particular prior width may thus not achieve their predicted stability in
the simulations, e.g. around $b_{2}T\approx 0.02$ in Fig. 10(b).

Nevertheless, good agreement between the numerically determined instability
and the theory prediction is found around the overall optimal protocols.

Figure 11: Particle number $N$ dependence of the dimensionless Allan deviation
of a flicker-frequency-noise limited clock at a constant averaging time $\tau$
and the optimal Ramsey interrogation time for different circuit complexities
$(n_{\rm En},n_{\rm De})$ with $3(n_{\rm En}+n_{\rm De})$ variational
parameters. For comparison we also show the performance of the optimal quantum
clock (dotted line) and the asymptotic [see Eq. (28)] obtained from the
$\pi$-corrected HL (dashed line).

In Fig. 11 we study optimal instability of the variational clocks $\sigma_{\rm
opt}$ (corresponds to minima in Fig. 10) as a function of the atomic ensemble
size $N$. The CSS clock is represented by the purple line which scales
asymptotically as $\sigma_{\rm opt}^{\rm CSS}\propto
N^{-(3\alpha-1)/(6\alpha)}$. The scaling is a bit slower than the conventional
SQL limit $\smash{\propto N^{-1/2}}$ due to the laser CTL which reduces the
optimal interrogation time as $N$ grows. Any classical clock using one-shot
protocols with collective spin measurements belongs to the shaded purple
region above the CSS clock line.

The $N$-scaling of the optimal quantum clock is shown with the black dotted
line for system sizes up to $N=64$. For larger system sizes we show the
asymptotic behavior (black dashed line) obtained by combining the noise
contributions of the $\pi$-corrected HL and the laser CTL, $\smash{\sigma_{\rm
asym}\equiv\min_{T}[{\sigma_{\pi\rm HL}^{2}+(\sigma_{\rm CTL}^{\rm
OQC})^{2}}]^{1/2}}$. Similar to the classical clock scaling, the laser CTL
prevents the optimal quantum clock (OQC) from achieving the Heisenberg scaling
$\smash{\propto N^{-1}}$, instead, leading to a logarithmic correction in the
large $N$ limit as found in [101, 102]. The present approach allows obtaining
tighter bounds on the asymptotic scaling for general $\alpha$ (see App. E). In
particular, for the flicker-noise-limited laser, $\alpha=2$, the OQC
instability scales as

$\sigma_{\rm opt}^{\rm OQC}\propto\frac{\sqrt{\pi}}{N}\left[\ln(z\ln
z)^{-1/2}+\ln(z\ln z)^{1/2}\right]^{1/2},$ (28)

with $z\equiv{32N^{4}}/{\pi}$ and the corresponding optimal interrogation time
scaling as $T_{\rm opt}^{\rm OQC}\simeq\pi b^{-1}_{2}\ln(z\ln z)^{-1/2}$. The
gray shaded area below the dashed and dotted black lines is inaccessible to
quantum clocks without entangled clock cycles. Finally, the variationally
optimized clocks of various circuit complexities are shown with solid color
lines and demonstrate scalings approaching the optimal quantum clock as the
circuit depth increases.

We have also studied performance of the variationally optimized clocks
experiencing individual atomic dephasing during the interrogation period $T$.
Similar to the results of Sec. II.5, the optimized clocks perform well for
decoherence rates small compared to the laser noise bandwidth,
$\gamma/b_{\alpha}\ll 1$. For stronger noise, $\gamma/b_{\alpha}\gtrsim 1$,
the optimized clock instability approaches the one of the classical clock, as
expected. We also checked the performance of optimized clocks for other types
of laser noise $\alpha=1,3$, and found no significant changes to the results
presented above.

In summary, atomic clocks based on variational quantum interferometers with
low-depth circuits can approach the performance of the optimal quantum clock
in single-shot protocols. The variationally optimized clocks can be readily
complemented with more sophisticated interrogation schemes [103, 104],
eventually also approaching the ultimate quantum bound on the Allan deviation
[105, 106].

##  IV Outlook and Conclusions

In this work we have studied optimal Ramsey interferometry for phase
estimation with entangled $N$-atom ensembles, and application of these optimal
protocols to atomic clocks. We have considered a Bayesian approach to quantum
interferometry, and have defined optimality via a cost function, which in the
present study is the BMSE for a given prior distribution or, in the context of
atomic clocks, the Allan deviation for a given Ramsey time. The key feature of
the present work is that optimization is performed within the family of
operational quantum resources provided by a particular programmable quantum
sensor platform. Thus identifying the optimal quantum sensor is recast as a
variational quantum optimization where the entangling circuits generating the
optimal input state, and the decoding circuits implementing the optimal
generalized measurement are variationally approximated with the given resource
up to a certain circuit depth. We have presented two model studies: in our
first model, we considered one-axis twisting as quantum resource; our second
model uses finite range interactions as entangling operations. Our examples
demonstrate that already low-depth circuits provide excellent approximations
for optimal quantum interferometry. We emphasize that the familiar discussions
of interferometry with spin-squeezing and GHZ states are included as special
cases. Furthermore, advanced measurement strategies including adaptive
measurement and quantum phase estimation are not advantageous for the present
problem, as a von Neumann measurement has been proven optimal.

Given advances in building small atomic scale quantum computers, or
programmable quantum simulators which can act also as quantum sensors, the
variational approach to optimal quantum sensing provides a viable route to
entanglement enhanced quantum measurements with existing experimental
entangling, possibly non-universal resources, and optimizing in presence of
noise. Indeed trapped ions with Mølmer-Sørensen entangling gates, and optical
arrays interacting via Rydberg finite range interactions or cavity setups
provide the necessary ingredients for implementing such variational protocols,
and quantum sensors. While first generation experiments might demonstrate
optimal Ramsey interferometry for a specified dynamic range of the phase, and
optimization of quantum circuits ‘on the quantum sensor’ for various circuit
depths (Sec. II), the present work also promises application of variational
quantum sensing on existing quantum sensors, in particular atomic clocks (Sec.
III). The guiding principle behind the present work of identifying for a
sensing task the optimal sensing protocol given the quantum resources provided
by a particular sensor and sensor platform, is, of course, general and
generic, and applies beyond Ramsey interferometry, and beyond the BMSE as cost
function.

As an outlook, we emphasize that the search for optimal sensing can also be
run directly as a quantum–classical feedback loop on the physical quantum
sensor. This offers the intriguing possibility of optimizing with given
quantum resources and in presence of imperfections of the actual device, which
might include control errors and noise. Further studies are needed to explore
best optimization strategies of the cost function on the classical side of the
optimization loop given the limited measurement budget on the programmable
quantum sensor. This applies to both the initial global parameter search,
supported by theoretical modeling, and small iterative readjustments of
optimal operation points due to slow drifts of the quantum sensor.

Optimization on the (physical) quantum sensor can also be performed in the
regime of large particle numbers $N$, which might be inaccessible to classical
computations, i.e. in the regime of quantum advantage. Hybrid classical-
quantum algorithms have been discussed previously as variational quantum
eigensolvers for quantum chemistry and quantum simulation, where ‘lowest
energy’ plays the role of the cost function which is evaluated on the quantum
device. In contrast, in variational quantum sensing we optimize quantum
circuits in view of an ‘optimal measurement’ cost function, and it is the
(potentially large scale) entanglement represented by the variational many-
particle wavefunction in $N$-atom quantum memory, which provides the quantum
resource and gain for the quantum measurement.

_Note added._ After submission of the present manuscript, Ref. [107] reported
an experimental implementation of variationally optimized Ramsey
interferometry in a systems of up to $N=26$ trapped ions, in one-to-one
correspondence to the present theoretical work. This includes demonstration of
quantum enhancement in metrology beyond squeezing through low-depth,
variational quantum circuits, and on-device quantum-classical feedback
optimization to ‘self-calibrate’ the variational parameters. In both cases it
is found that variational circuits outperform classical and direct spin
squeezing strategies under realistic noise and imperfections.

###### Acknowledgements.

We thank R. Blatt, T. Feldker, A. Kaufman, D. Leibrandt, K. Macieszczak, C.
Marciniak, T. Monz, I. Pogorelov, P. Schmidt, P. Silvi and Jun Ye for
discussions and valuable comments on the manuscript. Computational results
were based on the LEO HPC infrastructure of the University of Innsbruck.
Research in Innsbruck is supported by the US Air Force Office of Scientific
Research (AFOSR) via IOE Grant No. FA9550-19-1-7044 LASCEM, the European
Union’s Horizon 2020 research and innovation program under Grant Agreement No.
817482 (PASQuanS) and No. 731473 (QuantERA via QTFLAG), and by the Simons
Collaboration on Ultra-Quantum Matter, which is a grant from the Simons
Foundation (651440, P.Z.), and by the Institut für Quanteninformation.
Innsbruck theory is a member of the NSF Quantum Leap Challenge Institute
Q-Sense. M.S. and K.H. acknowledge funding by the Deutsche
Forschungsgemeinschaft (DFG, German Research Foundation) under Germany’s
Excellence Strategy – EXC-2123 QuantumFrontiers – 390837967 and CRC 1227 ‘DQ-
mat’ project A06.

##  Appendix A Laser noise and prior distribution width

To present results in Sec. III in dimensionless units, we follow [78] and
define an effective bandwidth $\tilde{b}$ via

$\displaystyle\sigma_{L}(1/\tilde{b})\ \omega_{A}/\tilde{b}=1,$ (29)

where $\sigma_{L}$ is the Allan deviation of the uncorrected reference laser.
For a laser that is mainly limited by a single power spectral density
component, i.e $S_{L}(f)=h_{1-\alpha}f^{1-\alpha}$ one can unambiguously
express the bandwidth in terms of the prefactors $h_{1-\alpha}$ in the power
spectral density and the respective Allan deviation [108], so that

$\displaystyle\tilde{b}_{1}$ $\displaystyle=\frac{h_{0}}{2}\omega_{A}^{2},$
$\displaystyle\tilde{b}_{2}$ $\displaystyle=\sqrt{h_{-1}2\ln 2}~{}\omega_{A},$
$\displaystyle\tilde{b}_{3}$
$\displaystyle=(h_{-2}/6)^{-1/3}(2\pi)^{-2/3}\omega_{A}^{-2/3}.$

Numerical simulation of the clock feedback loop [78] reveal that the
dimensionless time $b_{\alpha}T$ is related to the prior distribution width of
a stabilized clock by the relation $(\delta\phi)^{2}=(b_{\alpha}T)^{\alpha},$
where $b_{\alpha}=\chi(\alpha)^{1/\alpha}\tilde{b}_{\alpha}$ is a rescaled
bandwidth, differing from $\tilde{b}_{\alpha}$ only by an empirically
determined prefactor $\chi\approx 1,1.8,2$ for $\alpha=1,2,3$. For a laser
spectrum containing all three contributions Eq. (29) can still be used to
determine an effective bandwidth, and servo loop simulations of the clock can
reveal the modified time dependence of the prior distribution width enabling
one to extend the clock model to realistic laser noise parameters.

##  Appendix B Spin $x$-parity in entangling and decoding circuits

We consider global rotations $\mathcal{R}_{\mu}$, OAT interactions
$\mathcal{T}_{\mu}$ (see Sec. II.2) and finite range dressing interactions
$\mathcal{D}_{\mu}$ (see Sec. II.7) with $\mu=x,y,x$ as resources for the
variational optimization. Within is this set of resources we are able to
ensure an anti-symmetric estimator by imposing invariance under the spin
$x$-parity $P_{x}$ on the Entangler and Decoder, i.e. $P_{x}\mathcal{U}_{\rm
En}\mathcal{R}_{y}(-\pi/2)P_{x}=\mathcal{U}_{\rm En}\mathcal{R}_{y}(-\pi/2)$
and $P_{x}\mathcal{U}_{\rm De}P_{x}=\mathcal{U}_{\rm De}$ under the spin
$x$-parity $P_{x}=\mathcal{R}_{x}(\pi/2)$, since this implies

$\displaystyle\bar{\phi}_{\rm est}(\phi)$
$\displaystyle=\bra{\psi_{0}}\mathcal{U}_{\rm En}^{{\dagger}}e^{i\phi
J_{z}}\mathcal{U}_{\rm De}^{{\dagger}}J_{y}\mathcal{U}_{\rm De}e^{-i\phi
J_{z}}\mathcal{U}_{\rm En}\ket{\psi_{0}}$
$\displaystyle=-\bra{\psi_{0}}\mathcal{U}_{\rm En}^{{\dagger}}e^{-i\phi
J_{z}}\mathcal{U}_{\rm De}^{{\dagger}}J_{y}\mathcal{U}_{\rm De}e^{i\phi
J_{z}}\mathcal{U}_{\rm En}\ket{\psi_{0}}$ $\displaystyle=-\bar{\phi}_{\rm
est}(-\phi)$ (30)

where we use that $P_{x}J_{x}P_{x}=J_{x}$, $P_{x}J_{y,z}P_{x}=-J_{y,z}$,
$P_{x}^{\dagger}=P_{x}$ and
$P_{x}\mathcal{R}_{y}(\pi/2)\ket{\psi_{0}}=\mathcal{R}_{y}(\pi/2)\ket{\psi_{0}}$.
The most general entangling and decoding sequences satisfying these
constraints are used in Eq. (6),(7) and displayed in Fig. 1.

##  Appendix C Wigner distribution

In Secs. II.3, II.5 we visualize collective spin operators $\mathcal{O}$ like
the density matrix $\rho=\ket{\psi_{\rm in}}\bra{\psi_{\rm in}}$ of the
initial state of the interferometer [Eq. (4)], or the variationally decoded
measurement operator $M=\sum_{m}\phi_{\rm est}(m)\mathcal{U}_{\rm
De}^{\dagger}\ket{m}\bra{m}\mathcal{U}_{\rm De}$ [decomposed in terms of the
projection in Eq. (5)] by means of the Wigner distribution [109].

To obtain the Wigner distribution, the operator is expanded in terms of
spherical tensors

$\displaystyle
T_{k,q}=\sum_{m,m^{\prime}=-N/2}^{N/2}(-1)^{j-m}\sqrt{2k+1}\quad$
$\displaystyle\times\ \bigl{(}\begin{smallmatrix}j&k&j\\\
-m&q&m^{\prime}\end{smallmatrix}\bigr{)}\ket{m}\bra{m^{\prime}},$ (31)

where $\bigl{(}\begin{smallmatrix}j&k&j\\\
-m&q&m^{\prime}\end{smallmatrix}\bigr{)}$ denotes the Wigner $3j$ symbol.
$\mathcal{O}$ can be represented in the spherical tensor basis

$\displaystyle\mathcal{O}=\sum_{k=0}^{N}\sum_{q=-k}^{k}c_{k,q}T_{k,q}$ (32)

where $c_{k,q}=\operatorname{\mathrm{Tr}}\big{(}\mathcal{O}T_{k,q}\big{)}$.
Replacing $T_{k,q}$ in this representation by spherical harmonics
$Y_{k,q}(\theta,\phi)$, one arrives at the Wigner distribution,

$\displaystyle
W_{\mathcal{O}}(\theta,\phi)=\sum_{k=0}^{N}\sum_{q=-k}^{k}c_{k,q}Y_{k,q}(\theta,\phi)$
(33)

as a quasi-probability distribution on a generalized Bloch sphere.

The Wigner function can be used to calculate the expectation value

$\displaystyle\operatorname{\mathrm{Tr}}(\rho
M)=\int_{0}^{\pi}d\theta\int_{0}^{2\pi}d\varphi
W_{M}(\theta,\varphi)W_{\rho}(\theta,\varphi)$ (34)

by integrating the overlap of the respective Wigner functions over the
generalized Bloch sphere. This implies that we can interpret contours of the
measurement distribution with the different eigenvalues of the measurement
operator while the amplitude of the state distribution indicates how much the
state overlaps with the respective projection of the measurement projection.

##  Appendix D Numerical optimization of the phase-operator based
interferometer

Here we define the phase operator and describe an iterative optimization
procedure allowing us to minimize the cost function (2) for a given observable
using the Minimal Mean Squared Error (MMSE) estimator [3]. The phase operator
$\hat{\Phi}$ reads [88, 87]:

$\displaystyle\hat{\Phi}$
$\displaystyle=\sum_{s=-J}^{J}\phi_{s}\ket{s}\bra{s},$ (35)
$\displaystyle\phi_{s}$ $\displaystyle=\frac{2\pi s}{2J+1},$ (36)
$\displaystyle\ket{s}$
$\displaystyle=\frac{1}{\sqrt{2J+1}}\sum_{m=-J}^{J}e^{-i\phi_{s}m}\ket{m},$
(37)

where $J_{z}\ket{m}=m\ket{m}$.

Our goal is to minimize the cost function Eq. (2) for the observable
$\hat{\Phi}$ and the MMSE estimator by finding the optimal initial state
$\ket{\psi_{\hat{\Phi}}}$. The MMSE estimator reads [3]:

$\phi_{\rm est}^{\rm MMSE}(s)=\int\phi\,p(\phi|s)d\phi,$ (38)

where the conditional probability is $p(\phi|s)\propto
p(s|\phi)\mathcal{P}(\phi)$ with $p(s|\phi)=|\braket{s}{e^{-i\phi
J_{z}}}{\psi_{\rm in}}|^{2}$ and the observable eigenstate $\ket{s}$ defined
in Eq. (37).

The optimization is performed iteratively. Initially we start with $s=0$
eigenstate of $\hat{\Phi}$ as the input state $\ket{\psi_{\rm
in}^{(0)}}=\ket{s=0}$, which is a good approximation for a state highly
sensitive to phases around $\phi=0$. The state defines the corresponding MMSE
estimator $\phi_{\rm est(0)}^{\rm MMSE}(s)$ as given by Eq. (38). In the next
iteration we find the state $\ket{\psi_{\rm in}^{(1)}}$ minimizing the cost
function (2) for the given $\phi_{\rm est(0)}^{\rm MMSE}(s)$ estimator by
solving a corresponding eigenproblem, as described in [31]. The iterative
procedure converges quickly yielding the optimal initial state for the POI
$\ket{\psi_{\rm in}^{(k)}}\to_{k\to\infty}\ket{\psi_{\hat{\Phi}}}$ which, in
turn, defines the optimal estimator via Eq. (38) and the corresponding
posterior width $\Delta\phi_{\rm POI}$. This result is used in Sec. II.4.

##  Appendix E $N$-scaling of the optimal quantum clock instability

Here we derive asymptotic scaling of the optimal interrogation time and the
corresponding minimal instability of the optimal quantum clock. As discussed
in Sec. III, the instability of clocks exploiting single-shot protocols is
fundamentally limited by the measurement shot noise given by the
$\pi$-corrected HL for short interrogation times $T$, and the laser CTL for
large $T$. For the dimensionless Allan variance we write

$\displaystyle(\sigma^{\rm OQC})^{2}$ $\displaystyle=\sigma_{\pi\rm
HL}^{2}+(\sigma_{\rm CTL}^{\rm OQC})^{2},$
$\displaystyle=\frac{1}{s\pi^{\frac{2}{\alpha}}}\left\\{\frac{\pi^{2}}{N^{2}}+4\pi^{2}\left[1-\mathrm{erf}\big{(}\frac{1}{\sqrt{2s^{\alpha}}}\big{)}\right]\right\\}.$
(39)

where $s\equiv\pi^{-\frac{2}{\alpha}}b_{\alpha}T$ is the dimensionless Ramsey
time. The goal is to minimize Eq. (39) with respect to $s$ in the limit of
large number of atoms, $N\to\infty$. The derivative with respect to $s$ reads

$\displaystyle\frac{d}{ds}(\sigma^{\rm
OQC})^{2}=-\frac{1}{s^{2}\pi^{\frac{4}{\alpha}}}\Big{\\{}$
$\displaystyle\frac{\pi^{2}}{N^{2}}+4\pi^{2}\left[1-\mathrm{erf}\big{(}\frac{1}{\sqrt{2s^{\alpha}}}\big{)}\right]$
$\displaystyle-2\sqrt{\frac{2\pi^{3}\alpha^{2}}{s^{\alpha}}}e^{-\frac{1}{2s^{\alpha}}}\Big{\\}},$

and, using a self-consistent assumption for optimal time $s_{*}\ll 1$, results
in the following equation for $s_{*}$,

$e^{s_{*}^{-\alpha}}s_{*}^{\alpha}=\frac{8\alpha^{2}N^{4}}{\pi}.$ (40)

Here we used the error function asymptotic $1-\mathrm{erf}(x)\to
e^{-x^{2}}/(\sqrt{\pi}x)$ for $x\to\infty$. Taking the logarithm of the
expression (40) ($s_{*}$, $\alpha$, and $N$ are positive) we obtain an
equation for $w\equiv s_{*}^{-\alpha}$,

$w-\ln w=\ln z,$

with $z\equiv 8\alpha^{2}N^{4}/\pi$. For $z>e$, the solution can be written as
the infinitely nested logarithm, $w(z)=\ln(z\ln(z\ln(z(\ln\ldots)\ldots)))$,
and can be checked by direct substitution. Using the $w(z)$ function we can
express the optimal Ramsey time for $N\gg 1$ as follows

$\displaystyle b_{\alpha}T_{\rm opt}=\pi^{\frac{2}{\alpha}}s_{*}$
$\displaystyle=\left[\frac{1}{\pi^{2}}w(z)\right]^{-\frac{1}{\alpha}}$ (41)

Finally, we substitute the optimal Ramsey time into Eq. (39)

$(\sigma^{\rm OQC}_{\rm
opt})^{2}\simeq\frac{\pi^{2}}{N^{2}}\left[\frac{w(z)}{\pi^{2}}\right]^{\frac{1}{\alpha}}\left[1+\frac{2}{\alpha
w(z)}\right].$ (42)

We use Eqs. (41) and (42) and keep only the first two logarithms in the
definition of $w(z)$ to obtain expressions for the optimal interrogation time
and minimal instability of the optimal quantum clocks in Sec. III for
$\alpha=2$.

##  Appendix F Finite dead time in the atomic clock protocol

Here we discuss upper limits to the dead times of atomic clocks, which are
required to reach the variationally optimized stability presented in Sec. III.
When each interrogation cycle of duration $T_{C}=T_{D}+T$ is composed of a
dead time $T_{D}>0$, and Ramsey free evolution time $T$, the stability is
reduced compared to the ideal case at $T_{D}=0$ discussed in the main text.

Let us consider $S_{L}(f)=h_{-1}f^{-1}$ as the power spectral density of the
free running laser. In addition, we assume that the protocols are sensitive to
phase shifts during $T$ only and that all entangling and decoding operations
are included in the dead time where we assume no sensitivity. Given these
assumptions, the instability contribution of the Dick effect is [110]

$\sigma_{\rm
Dick}^{2}(\tau)=\frac{b_{2}}{\omega_{A}^{2}\tau}\frac{b_{2}T}{\chi(2)2\ln
2}\frac{1}{d^{3}}\sum_{n=1}^{\infty}\frac{\sin^{2}(\pi nd)}{\pi^{2}n^{3}}$
(43)

with $\chi$ given in App. A and the duty cycle $d=T/T_{C}$. In addition, the
instability predicted in the Bayesian framework, Eq. (24), becomes

$\sigma_{\rm
Bay}^{2}(\tau)=\frac{b_{2}}{\omega_{A}^{2}\tau}\frac{\sigma^{2}}{d}$ (44)

with $\sigma$ as defined in Eq. (25).

In the following we want to estimate below which level of dead time the
combined instability $\sigma_{y}(\tau)=\sqrt{\sigma_{\rm
Bay}^{2}(\tau)+\sigma_{\rm Dick}^{2}(\tau)}$ is no longer dominated by the
contribution of the Dick effect. The minimal required duty cycle $d_{\rm min}$
where the value for $\sigma_{\rm Dick}^{2}(\tau)$ at optimal Ramsey time
$b_{2}T_{\rm opt}$ dives below the lowest variational instability is

$d_{\rm min}=\min\left\\{d\Big{|}\frac{b_{2}T_{\rm opt}}{\chi(2)2\ln
2}\frac{1}{d^{2}}\sum_{n=1}^{\infty}\frac{\sin^{2}(\pi
nd)}{\pi^{2}n^{3}}\leq\sigma^{2}_{\rm opt}\right\\}.$ (45)

From $d_{\rm min}$ one can directly infer the maximum fraction $R=T_{D,\rm
max}/T_{C}=1-T_{\rm opt}/T_{C}=1-d_{\rm min}$ of dead time in the clock cycle,
where $T_{C}=T_{\rm opt}+T_{D,\rm max}$. In the limit $R\ll 1$ it can be shown
that $-\ln(R)R^{2}/(1-R)^{2}\propto(b_{2}T_{\rm opt})\sigma_{\rm opt}^{2}$, so
it is expected that for $N\gg 1$ this ratio will eventually follow a similar
scaling as $\sigma_{\rm opt}^{2}$. The exact relation is shown in Fig. 12. It
is worth noting that $R\ll 1$ is still recommended for small ensemble sizes,
even though this condition is not required based on $d_{\rm min}$, to prevent
unnecessarily increasing the clock instability. A more complete model for the
influence of dead time and the Dick effect requires to include the full
spectral density $S_{L}(f)$ of the laser and evaluating the sensitivity
function during the entangling and decoding dynamics.

Figure 12: Largest fraction $T_{\rm D,{\rm max}}/T_{\rm C}$ of dead time
compared to cycle time for which the clock operation is limited predominantly
by the variationally optimized instability displayed in Fig. 11. The overall
instabilities at dead time fractions above the lines are limited by the Dick
effect instead.

##  Appendix G Numerical simulation of the variational clock operation

In order to see how well $\sigma$ [Eq. (25)] reflects an achievable
instability we perform numerical simulations of all essential parts involved
in the closed feedback loop of an optical atomic clock when operating with the
variationally optimized Ramsey protocols.

Building up the simulations proceeds as follows:

(i) The free-running laser is simulated. Given a particular spectral density
$S_{L}(f)=h_{1-\alpha}f^{1-\alpha}$ and the Ramsey time $T$ we generate a
sequence of random numbers
$\bar{y}_{k}=\frac{1}{T}\int_{t_{k}}^{t_{k}+T}dt[\omega_{L}(t)-\omega_{A}]/\omega_{A}$
which gives the average frequency fluctuations of the laser without any
feedback in each cycle $k$. Correlations between different cycles, required
when $\alpha\neq 1$, can e.g. be obtained in the time domain by implementing
$\bar{y}_{k}$ as a random walk or a sum of multiple damped random walks [78].

(ii) To stabilise the laser frequency for long averaging times $\tau\gg T$ a
feedback correction is applied to the laser frequency at the end of each
cycle. In the simulations, the estimated frequency deviation $\bar{y}_{\rm
est,k}=m_{k}/(2\pi\omega_{A}T\partial_{\phi}\bar{m}(\phi)_{|\phi=0})$ obtained
from measurement result $m_{k}$ at $t_{k}$ is multiplied by a gain factor
$0<g\leq 1$ and subtracted from the true laser frequency. This integrating
servo corrects frequency errors over $\sim 1/g$ cycles and is sufficient to
achieve a robust stabilization at $\tau/T\gg 1/g$ for flicker noise limited
lasers [79]. However, to simulate the quantum probabilities $p(m|\phi_{k})$ at
$t_{k}$ the phase $\phi_{k}=\omega_{A}T\bar{y}^{\prime}_{k}$ based on the
actual laser noise $\bar{y}^{\prime}_{k}$ is needed. Thus, later measurements
are affected not only by the noise of the free-running laser but also by the
measurement results and corrections from earlier cycles. To implement this
efficiently, the simulation runs sequentially: At the beginning the phase
$\phi_{1}$ is calculated for the first cycle only. Then the probabilities
$p(m|\phi_{1})$ with this particular phase are calculated and a single
measurement result $m_{1}$ is sampled according to this distribution. The
estimator $y_{\rm est,1}$ is calculated and the servo corrects the laser
frequency so that $\bar{y}^{\prime}_{2}=\bar{y}_{2}-g\bar{y}_{\rm est,1}$ is
the actual noise in the second cycle. This procedure is repeated in each cycle
with the corrected frequencies, meaning e.g.
$\phi_{2}=\omega_{A}T\bar{y}^{\prime}_{2}$.

(iii) The clock stability is evaluated, based on the simulated sequence of
stabilized frequency deviations $\bar{y}^{\prime}_{k}$. The overlapping Allan
deviation $\sigma_{y}(\tau=nT)$ is calculated numerically from averages over
$n$ cycles. Statistical averaging is performed over many intervals of length
$n$ in a single run with $n_{\rm tot}\gg n$ cycles and then averaging again
over multiple runs. Finally, the long term instability is extracted by fitting
the prefactor to the asymptotic scaling $\sigma_{y}(\tau)\propto\tau^{1/2}$
reached typically after $n\sim 10^{4}$ cycles in simulations of $n_{\rm
tot}=2\times 10^{6}$ cycles.

To compare numerical results to theory predictions, as in Fig. 10(b), the
values for $T$ and $h_{1-\alpha}$ in the simulations are matched to reproduce
the same laser induced prior width $(\delta\phi)^{2}=(b_{\alpha}T)^{\alpha}$.

##  Appendix H Cumulative interaction angle

Figure 13: (a) Recalculation of the particle number dependence of the
dimensionless Allan deviation in Fig. 11 for constrained interaction angles.
(b) The cumulative angle of all one axis twisting gates $\mathcal{T}_{x,y}$
required to obtain the dimensionless Allan deviations displayed above. The
vertical dashed line indicated the interaction angle of $\pi/2$ required to
prepare a GHZ-state.

A relevant question regarding the Dick effect is the time it takes to perform
the entangling and decoding sequence. The slowest time scale on a quantum
simulator is usually the interaction strength. Results presented in Fig. 2, 10
were obtained for interaction angles $\leq\pi/2$. From a practical point of
view, however, it might be beneficial to consider smaller interaction angles.

Here we show that, close to the respective minima in Fig. 2, 10, the displayed
results of the variationally optimized interferometers can be well
approximated by quantum circuits with small cumulative interaction angles
$\theta_{\rm OAT}=\sum_{k=1}^{n_{\rm
En}}\big{(}\theta_{k}^{(1)}+\theta_{k}^{(2)}\big{)}+\sum_{k=1}^{n_{\rm
De}}\big{(}\vartheta_{k}^{(1)}+\vartheta_{k}^{(2)}\big{)}$. In Fig. 13 we
constrain each interaction angle to be positive and smaller than a threshold
that decreases with the depth of the circuit. In addition we require that the
cumulative interaction angle $\theta_{\rm OAT}$ is always smaller or equal
than $\pi/2$, the interaction angle required to prepare a GHZ-state. Similarly
to the OAT squeezing [73], the variational sequences can also work with a
cumulative interaction that decrease rapidly with $N$ while the resulting
Allan deviation remains a good approximation of the unconstrained optimization
in Fig. 11.

## References

  * Ludlow  _et al._ [2015] A. D. Ludlow, M. M. Boyd, J. Ye, E. Peik, and P. O. Schmidt, Optical atomic clocks, Rev. Mod. Phys. 87, 637 (2015).
  * Cronin  _et al._ [2009] A. D. Cronin, J. Schmiedmayer, and D. E. Pritchard, Optics and interferometry with atoms and molecules, Rev. Mod. Phys. 81, 1051 (2009).
  * Demkowicz-Dobrzański  _et al._ [2015] R. Demkowicz-Dobrzański, M. Jarzyna, and J. Kołodyński,  _Quantum Limits in Optical Interferometry_, Progress in Optics, Vol. 60 (Elsevier, 2015) pp. 345 – 435\.
  * Degen  _et al._ [2017] C. L. Degen, F. Reinhard, and P. Cappellaro, Quantum sensing, Rev. Mod. Phys. 89, 035002 (2017).
  * Grotti  _et al._ [2018] J. Grotti, S. Koller, S. Vogt, S. Häfner, U. Sterr, C. Lisdat, H. Denker, C. Voigt, L. Timmen, A. Rolland, F. N. Baynes, H. S. Margolis, M. Zampaolo, P. Thoumany, M. Pizzocaro, B. Rauf, F. Bregolin, A. Tampellini, P. Barbieri, M. Zucco, G. A. Costanzo, C. Clivati, F. Levi, and D. Calonico, Geodesy and metrology with a transportable optical clock, Nature Physics 14, 437 (2018).
  * Mehlstäubler  _et al._ [2018] T. E. Mehlstäubler, G. Grosche, C. Lisdat, P. O. Schmidt, and H. Denker, Atomic clocks for geodesy, Reports on Progress in Physics 81, 064401 (2018).
  * Bothwell  _et al._ [2021] T. Bothwell, C. J. Kennedy, A. Aeppli, D. Kedar, J. M. Robinson, E. Oelker, A. Staron, and J. Ye, Resolving the gravitational redshift within a millimeter atomic sample (2021), arXiv:2109.12238 [physics.atom-ph] .
  * Zheng  _et al._ [2021] X. Zheng, J. Dolde, V. Lochab, B. N. Merriman, H. Li, and S. Kolkowitz, High precision differential clock comparisons with a multiplexed optical lattice clock (2021), arXiv:2109.12237 [physics.atom-ph] .
  * Kolkowitz  _et al._ [2016] S. Kolkowitz, I. Pikovski, N. Langellier, M. D. Lukin, R. L. Walsworth, and J. Ye, Gravitational wave detection with optical lattice atomic clocks, Phys. Rev. D 94, 124043 (2016).
  * Safronova  _et al._ [2018] M. S. Safronova, D. Budker, D. DeMille, D. F. J. Kimball, A. Derevianko, and C. W. Clark, Search for new physics with atoms and molecules, Rev. Mod. Phys. 90, 025008 (2018).
  * Sanner  _et al._ [2019] C. Sanner, N. Huntemann, R. Lange, C. Tamm, E. Peik, M. S. Safronova, and S. G. Porsev, Optical clock comparison for lorentz symmetry testing, Nature 567, 204 (2019).
  * Pezzè  _et al._ [2018] L. Pezzè, A. Smerzi, M. K. Oberthaler, R. Schmied, and P. Treutlein, Quantum metrology with nonclassical states of atomic ensembles, Rev. Mod. Phys. 90, 035005 (2018).
  * Tse  _et al._ [2019] M. Tse, H. Yu, N. Kijbunchoo, A. Fernandez-Galiana, P. Dupej, L. Barsotti, C. D. Blair, D. D. Brown, S. E. Dwyer, A. Effler, M. Evans, P. Fritschel, V. V. Frolov, A. C. Green, G. L. Mansell, F. Matichard, N. Mavalvala, D. E. McClelland, L. McCuller, T. McRae, J. Miller, A. Mullavey, E. Oelker, I. Y. Phinney, D. Sigg, B. J. J. Slagmolen, T. Vo, R. L. Ward, C. Whittle, R. Abbott, C. Adams, R. X. Adhikari, A. Ananyeva, S. Appert, K. Arai, J. S. Areeda, Y. Asali, S. M. Aston, C. Austin, A. M. Baer, M. Ball, S. W. Ballmer, S. Banagiri, D. Barker, J. Bartlett, B. K. Berger, J. Betzwieser, D. Bhattacharjee, G. Billingsley, S. Biscans, R. M. Blair, N. Bode, P. Booker, R. Bork, A. Bramley, A. F. Brooks, A. Buikema, C. Cahillane, K. C. Cannon, X. Chen, A. A. Ciobanu, F. Clara, S. J. Cooper, K. R. Corley, S. T. Countryman, P. B. Covas, D. C. Coyne, L. E. H. Datrier, D. Davis, C. Di Fronzo, J. C. Driggers, T. Etzel, T. M. Evans, J. Feicht, P. Fulda, M. Fyffe, J. A. Giaime, K. D. Giardina, P. Godwin, E. Goetz, S. Gras, C. Gray, R. Gray, A. Gupta, E. K. Gustafson, R. Gustafson, J. Hanks, J. Hanson, T. Hardwick, R. K. Hasskew, M. C. Heintze, A. F. Helmling-Cornell, N. A. Holland, J. D. Jones, S. Kandhasamy, S. Karki, M. Kasprzack, K. Kawabe, P. J. King, J. S. Kissel, R. Kumar, M. Landry, B. B. Lane, B. Lantz, M. Laxen, Y. K. Lecoeuche, J. Leviton, J. Liu, M. Lormand, A. P. Lundgren, R. Macas, M. MacInnis, D. M. Macleod, S. Márka, Z. Márka, D. V. Martynov, K. Mason, T. J. Massinger, R. McCarthy, S. McCormick, J. McIver, G. Mendell, K. Merfeld, E. L. Merilh, F. Meylahn, T. Mistry, R. Mittleman, G. Moreno, C. M. Mow-Lowry, S. Mozzon, T. J. N. Nelson, P. Nguyen, L. K. Nuttall, J. Oberling, R. J. Oram, B. O’Reilly, C. Osthelder, D. J. Ottaway, H. Overmier, J. R. Palamos, W. Parker, E. Payne, A. Pele, C. J. Perez, M. Pirello, H. Radkins, K. E. Ramirez, J. W. Richardson, K. Riles, N. A. Robertson, J. G. Rollins, C. L. Romel, J. H. Romie, M. P. Ross, K. Ryan, T. Sadecki, E. J. Sanchez, L. E. Sanchez, T. R. Saravanan, R. L. Savage, D. Schaetzl, R. Schnabel, R. M. S. Schofield, E. Schwartz, D. Sellers, T. J. Shaffer, J. R. Smith, S. Soni, B. Sorazu, A. P. Spencer, K. A. Strain, L. Sun, M. J. Szczepańczyk, M. Thomas, P. Thomas, K. A. Thorne, K. Toland, C. I. Torrie, G. Traylor, A. L. Urban, G. Vajente, G. Valdes, D. C. Vander-Hyde, P. J. Veitch, K. Venkateswara, G. Venugopalan, A. D. Viets, C. Vorvick, M. Wade, J. Warner, B. Weaver, R. Weiss, B. Willke, C. C. Wipf, L. Xiao, H. Yamamoto, M. J. Yap, H. Yu, L. Zhang, M. E. Zucker, and J. Zweizig, Quantum-enhanced advanced ligo detectors in the era of gravitational-wave astronomy, Phys. Rev. Lett. 123, 231107 (2019).
  * Casacio  _et al._ [2021] C. A. Casacio, L. S. Madsen, A. Terrasson, M. Waleed, K. Barnscheidt, B. Hage, M. A. Taylor, and W. P. Bowen, Quantum-enhanced nonlinear microscopy, Nature 594, 201 (2021).
  * Leibfried  _et al._ [2005] D. Leibfried, E. Knill, S. Seidelin, J. Britton, R. B. Blakestad, J. Chiaverini, D. B. Hume, W. M. Itano, J. D. Jost, C. Langer, R. Ozeri, R. Reichle, and D. J. Wineland, Creation of a six-atom ‘schrödinger cat’ state, Nature 438, 639 (2005).
  * Appel  _et al._ [2009] J. Appel, P. J. Windpassinger, D. Oblak, U. B. Hoff, N. Kjærgaard, and E. S. Polzik, Mesoscopic atomic entanglement for precision measurements beyond the standard quantum limit, Proceedings of the National Academy of Sciences 106, 10960 (2009), https://www.pnas.org/content/106/27/10960.full.pdf .
  * Gross  _et al._ [2010] C. Gross, T. Zibold, E. Nicklas, J. Estève, and M. K. Oberthaler, Nonlinear atom interferometer surpasses classical precision limit, Nature 464, 1165 (2010).
  * Riedel  _et al._ [2010] M. F. Riedel, P. Böhi, Y. Li, T. W. Hänsch, A. Sinatra, and P. Treutlein, Atom-chip-based generation of entanglement for quantum metrology, Nature 464, 1170 (2010).
  * Leroux  _et al._ [2010] I. D. Leroux, M. H. Schleier-Smith, and V. Vuletić, Implementation of cavity squeezing of a collective atomic spin, Phys. Rev. Lett. 104, 073602 (2010).
  * Lücke  _et al._ [2011] B. Lücke, M. Scherer, J. Kruse, L. Pezzé, F. Deuretzbacher, P. Hyllus, O. Topic, J. Peise, W. Ertmer, J. Arlt, L. Santos, A. Smerzi, and C. Klempt, Twin matter waves for interferometry beyond the classical limit, Science 334, 773 (2011), https://www.science.org/doi/pdf/10.1126/science.1208798 .
  * Sewell  _et al._ [2012] R. J. Sewell, M. Koschorreck, M. Napolitano, B. Dubost, N. Behbood, and M. W. Mitchell, Magnetic sensitivity beyond the projection noise limit by spin squeezing, Phys. Rev. Lett. 109, 253605 (2012).
  * Hamley  _et al._ [2012] C. D. Hamley, C. S. Gerving, T. M. Hoang, E. M. Bookjans, and M. S. Chapman, Spin-nematic squeezed vacuum in a quantum gas, Nature Physics 8, 305 (2012).
  * Berrada  _et al._ [2013] T. Berrada, S. van Frank, R. Bücker, T. Schumm, J. F. Schaff, and J. Schmiedmayer, Integrated mach–zehnder interferometer for bose–einstein condensates, Nature Communications 4, 2077 (2013).
  * Barontini  _et al._ [2015] G. Barontini, L. Hohmann, F. Haas, J. Estève, and J. Reichel, Deterministic generation of multiparticle entanglement by quantum zeno dynamics, Science 349, 1317 (2015), https://www.science.org/doi/pdf/10.1126/science.aaa0754 .
  * Zhang  _et al._ [2015] Y.-L. Zhang, C.-L. Zou, X.-B. Zou, L. Jiang, and G.-C. Guo, Detuning-enhanced cavity spin squeezing, Phys. Rev. A 91, 033625 (2015).
  * Bohnet  _et al._ [2016] J. G. Bohnet, B. C. Sawyer, J. W. Britton, M. L. Wall, A. M. Rey, M. Foss-Feig, and J. J. Bollinger, Quantum spin dynamics and entanglement generation with hundreds of trapped ions, Science 352, 1297 (2016).
  * Hosten  _et al._ [2016a] O. Hosten, N. J. Engelsen, R. Krishnakumar, and M. A. Kasevich, Measurement noise 100 times lower than the quantum-projection limit using entangled atoms, Nature 529, 505 (2016a).
  * Norcia  _et al._ [2018] M. A. Norcia, R. J. Lewis-Swan, J. R. K. Cline, B. Zhu, A. M. Rey, and J. K. Thompson, Cavity-mediated collective spin-exchange interactions in a strontium superradiant laser, Science 361, 259 (2018), https://www.science.org/doi/pdf/10.1126/science.aar3102 .
  * Zou  _et al._ [2018] Y.-Q. Zou, L.-N. Wu, Q. Liu, X.-Y. Luo, S.-F. Guo, J.-H. Cao, M. K. Tey, and L. You, Beating the classical precision limit with spin-1 dicke states of more than 10,000 atoms, Proceedings of the National Academy of Sciences 115, 6381 (2018), https://www.pnas.org/content/115/25/6381.full.pdf .
  * Pedrozo-Peñafiel  _et al._ [2020] E. Pedrozo-Peñafiel, S. Colombo, C. Shu, A. F. Adiyatullin, Z. Li, E. Mendez, B. Braverman, A. Kawasaki, D. Akamatsu, Y. Xiao, and V. Vuletić, Entanglement on an optical atomic-clock transition, Nature 588, 414 (2020).
  * Macieszczak  _et al._ [2014] K. Macieszczak, M. Fraas, and R. Demkowicz-Dobrzański, Bayesian quantum frequency estimation in presence of collective dephasing, New Journal of Physics 16, 113002 (2014).
  * Personick [1971] S. Personick, Application of quantum estimation theory to analog communication over quantum channels, IEEE Transactions on Information Theory 17, 240 (1971).
  * Holevo [1982] A. Holevo,  _Probabilistic and Statistical Aspects of Quantum Theory_ , North-Holland series in statistics and probability (North-Holland Publishing Company, 1982).
  * Bužek  _et al._ [1999] V. Bužek, R. Derka, and S. Massar, Optimal quantum clocks, Phys. Rev. Lett. 82, 2207 (1999).
  * Jarzyna and Demkowicz-Dobrzański [2015] M. Jarzyna and R. Demkowicz-Dobrzański, True precision limits in quantum metrology, New Journal of Physics 17, 013010 (2015).
  * Martínez-Vargas  _et al._ [2017] E. Martínez-Vargas, C. Pineda, F. Leyvraz, and P. Barberis-Blostein, Quantum estimation of unknown parameters, Phys. Rev. A 95, 012136 (2017).
  * Górecki  _et al._ [2020] W. Górecki, R. Demkowicz-Dobrzański, H. M. Wiseman, and D. W. Berry, $\pi$-corrected heisenberg limit, Phys. Rev. Lett. 124, 030501 (2020).
  * Bloom  _et al._ [2014] B. J. Bloom, T. L. Nicholson, J. R. Williams, S. L. Campbell, M. Bishof, X. Zhang, W. Zhang, S. L. Bromley, and J. Ye, An optical lattice clock with accuracy and stability at the ${10}^{-18}$ level, Nature 506, 71 (2014).
  * Ushijima  _et al._ [2015] I. Ushijima, M. Takamoto, M. Das, T. Ohkubo, and H. Katori, Cryogenic optical lattice clocks, Nature Photonics 9, 185 (2015).
  * McGrew  _et al._ [2018] W. F. McGrew, X. Zhang, R. J. Fasano, S. A. Schäffer, K. Beloy, D. Nicolodi, R. C. Brown, N. Hinkley, G. Milani, M. Schioppo, T. H. Yoon, and A. D. Ludlow, Atomic clock performance enabling geodesy below the centimetre level, Nature 564, 87 (2018).
  * Origlia  _et al._ [2018] S. Origlia, M. S. Pramod, S. Schiller, Y. Singh, K. Bongs, R. Schwarz, A. Al-Masoudi, S. Dörscher, S. Herbers, S. Häfner, U. Sterr, and C. Lisdat, Towards an optical clock for space: Compact, high-performance optical lattice clock based on bosonic atoms, Phys. Rev. A 98, 053443 (2018).
  * Oelker  _et al._ [2019] E. Oelker, R. B. Hutson, C. J. Kennedy, L. Sonderhouse, T. Bothwell, A. Goban, D. Kedar, C. Sanner, J. M. Robinson, G. E. Marti, D. G. Matei, T. Legero, M. Giunta, R. Holzwarth, F. Riehle, U. Sterr, and J. Ye, Demonstration of 4.8 $\times{10}^{-17}$ stability at 1 s for two independent optical clocks, Nature Photonics 13, 714 (2019).
  * Chou  _et al._ [2010] C. W. Chou, D. B. Hume, J. C. J. Koelemeij, D. J. Wineland, and T. Rosenband, Frequency comparison of two high-accuracy ${\mathrm{al}}^{+}$ optical clocks, Phys. Rev. Lett. 104, 070802 (2010).
  * Huntemann  _et al._ [2016] N. Huntemann, C. Sanner, B. Lipphardt, C. Tamm, and E. Peik, Single-ion atomic clock with $3\times{}{10}^{-18}$ systematic uncertainty, Phys. Rev. Lett. 116, 063001 (2016).
  * Brewer  _et al._ [2019] S. M. Brewer, J.-S. Chen, A. M. Hankin, E. R. Clements, C. W. Chou, D. J. Wineland, D. B. Hume, and D. R. Leibrandt, ${}^{27}{\mathrm{al}}^{+}$ quantum-logic clock with a systematic uncertainty below ${10}^{-18}$, Phys. Rev. Lett. 123, 033201 (2019).
  * Covey  _et al._ [2019] J. P. Covey, I. S. Madjarov, A. Cooper, and M. Endres, 2000-times repeated imaging of strontium atoms in clock-magic tweezer arrays, Phys. Rev. Lett. 122, 173201 (2019).
  * Wilson  _et al._ [2019] J. Wilson, S. Saskin, Y. Meng, S. Ma, R. Dilip, A. Burgers, and J. Thompson, Trapped arrays of alkaline earth rydberg atoms in optical tweezers (2019), arXiv:1912.08754 [quant-ph] .
  * Young  _et al._ [2020] A. W. Young, W. J. Eckner, W. R. Milner, D. Kedar, M. A. Norcia, E. Oelker, N. Schine, J. Ye, and A. M. Kaufman, Half-minute-scale atomic coherence and high relative stability in a tweezer clock, Nature 588, 408 (2020).
  * Farhi  _et al._ [2014] E. Farhi, J. Goldstone, and S. Gutmann, A quantum approximate optimization algorithm (2014), arXiv:1411.4028 [quant-ph] .
  * Wecker  _et al._ [2015] D. Wecker, M. B. Hastings, and M. Troyer, Progress towards practical quantum variational algorithms, Phys. Rev. A 92, 042303 (2015).
  * McClean  _et al._ [2016] J. R. McClean, J. Romero, R. Babbush, and A. Aspuru-Guzik, The theory of variational hybrid quantum-classical algorithms, New Journal of Physics 18, 023023 (2016).
  * 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, B. Campbell, Y. Chen, Z. Chen, B. Chiaro, A. Dunsworth, A. G. Fowler, E. Jeffrey, E. Lucero, A. Megrant, J. Y. Mutus, M. Neeley, C. Neill, C. Quintana, D. Sank, A. Vainsencher, J. Wenner, T. C. White, P. V. Coveney, P. J. Love, H. Neven, A. Aspuru-Guzik, and J. M. Martinis, Scalable quantum simulation of molecular energies, Phys. Rev. X 6, 031007 (2016).
  * Kokail  _et al._ [2019] C. Kokail, C. Maier, R. van Bijnen, T. Brydges, M. K. Joshi, P. Jurcevic, C. A. Muschik, P. Silvi, R. Blatt, C. F. Roos, and P. Zoller, Self-verifying variational quantum simulation of lattice models, Nature 569, 355 (2019).
  * McArdle  _et al._ [2020] S. McArdle, S. Endo, A. Aspuru-Guzik, S. C. Benjamin, and X. Yuan, Quantum computational chemistry, Rev. Mod. Phys. 92, 015003 (2020).
  * Zhou  _et al._ [2020] L. Zhou, S.-T. Wang, S. Choi, H. Pichler, and M. D. Lukin, Quantum approximate optimization algorithm: Performance, mechanism, and implementation on near-term devices, Phys. Rev. X 10, 021067 (2020).
  * Cerezo  _et al._ [2021] M. Cerezo, A. Arrasmith, R. Babbush, S. C. Benjamin, S. Endo, K. Fujii, J. R. McClean, K. Mitarai, X. Yuan, L. Cincio, and P. J. Coles, Variational quantum algorithms, Nature Reviews Physics 3, 625 (2021).
  * Hosten  _et al._ [2016b] O. Hosten, R. Krishnakumar, N. J. Engelsen, and M. A. Kasevich, Quantum phase magnification, Science 352, 1552 (2016b), https://www.science.org/doi/pdf/10.1126/science.aaf3397 .
  * Davis  _et al._ [2016] E. Davis, G. Bentsen, and M. Schleier-Smith, Approaching the heisenberg limit without single-particle detection, Phys. Rev. Lett. 116, 053601 (2016).
  * Fröwis  _et al._ [2016] F. Fröwis, P. Sekatski, and W. Dür, Detecting large quantum fisher information with finite measurement precision, Phys. Rev. Lett. 116, 090801 (2016).
  * Macrì  _et al._ [2016] T. Macrì, A. Smerzi, and L. Pezzè, Loschmidt echo for quantum metrology, Phys. Rev. A 94, 010102(R) (2016).
  * Nolan  _et al._ [2017] S. P. Nolan, S. S. Szigeti, and S. A. Haine, Optimal and robust quantum metrology using interaction-based readouts, Phys. Rev. Lett. 119, 193601 (2017).
  * Anders  _et al._ [2018] F. Anders, L. Pezzè, A. Smerzi, and C. Klempt, Phase magnification by two-axis countertwisting for detection-noise robust interferometry, Phys. Rev. A 97, 043813 (2018).
  * Schulte  _et al._ [2020a] M. Schulte, V. J. Martínez-Lahuerta, M. S. Scharnagl, and K. Hammerer, Ramsey interferometry with generalized one-axis twisting echoes, Quantum 4, 268 (2020a).
  * Deutsch [2020] I. H. Deutsch, Harnessing the power of the second quantum revolution, PRX Quantum 1, 020101 (2020).
  * of Sciences Engineering and Medicine [2020] National Academies of Sciences and Medicine,  _Manipulating Quantum Systems: An Assessment of Atomic, Molecular, and Optical Physics in the United States_ (The National Academies Press, Washington, DC, 2020).
  * Kaubruegger  _et al._ [2019] R. Kaubruegger, P. Silvi, C. Kokail, R. van Bijnen, A. M. Rey, J. Ye, A. M. Kaufman, and P. Zoller, Variational spin-squeezing algorithms on programmable quantum sensors, Phys. Rev. Lett. 123, 260505 (2019).
  * Braunstein  _et al._ [1996] S. L. Braunstein, C. M. Caves, and G. Milburn, Generalized uncertainty relations: Theory, examples, and lorentz invariance, Annals of Physics 247, 135 (1996).
  * Giovannetti  _et al._ [2006] V. Giovannetti, S. Lloyd, and L. Maccone, Quantum metrology, Phys. Rev. Lett. 96, 010401 (2006).
  * Paris [2009] M. G. A. Paris, Quantum estimation for quantum technology, International Journal of Quantum Information 07, 125 (2009).
  * Bollinger  _et al._ [1996] J. J. Bollinger, W. M. Itano, D. J. Wineland, and D. J. Heinzen, Optimal frequency measurements with maximally correlated states, Phys. Rev. A 54, R4649 (1996).
  * Hayashi  _et al._ [2018] M. Hayashi, S. Vinjanampathy, and L. C. Kwek, Resolving unattainable cramer–rao bounds for quantum sensors, Journal of Physics B: Atomic, Molecular and Optical Physics 52, 015503 (2018).
  * Wineland  _et al._ [1992] D. J. Wineland, J. J. Bollinger, W. M. Itano, F. L. Moore, and D. J. Heinzen, Spin squeezing and reduced quantum noise in spectroscopy, Phys. Rev. A 46, R6797 (1992).
  * Kitagawa and Ueda [1993] M. Kitagawa and M. Ueda, Squeezed spin states, Phys. Rev. A 47, 5138 (1993).
  * Note [1] Variational algorithms for quantum metrology optimizing local phase sensitivity, i.e. maximizing the quantum Fisher information, are considered in Refs. [111, 112, 113].
  * Note [2] While we consider optimal non-adaptive measurement protocols, adaptive protocols for phase estimation have been studied in [104, 103, 102, 114, 105, 115, 116, 117, 118].
  * André  _et al._ [2004] A. André, A. S. Sørensen, and M. D. Lukin, Stability of atomic clocks based on entangled atoms, Phys. Rev. Lett. 92, 230801 (2004).
  * Fraas [2016] M. Fraas, An analysis of the stationary operation of atomic clocks, Communications in Mathematical Physics 348, 363 (2016).
  * Leroux  _et al._ [2017] I. D. Leroux, N. Scharnhorst, S. Hannig, J. Kramer, L. Pelzer, M. Stepanova, and P. O. Schmidt, On-line estimation of local oscillator noise and optimisation of servo parameters in atomic clocks, Metrologia 54, 307 (2017).
  * Schulte  _et al._ [2020b] M. Schulte, C. Lisdat, P. O. Schmidt, U. Sterr, and K. Hammerer, Prospects and challenges for squeezing-enhanced optical atomic clocks, Nature Communications 11, 5955 (2020b).
  * Note [3] For simplicity of notation we assume pure states. This discussion is readily extended to mixed states with density operator $\rho_{\rm in}$.
  * Note [4] A phase $-\infty<\phi<\infty$ is consistent with a laser phase in atomic clocks. A diffusion of the laser phase as a phase winding outside of $-\pi<\phi<\pi$ corresponds to a phase slip which must be avoided in clock operation.
  * Monz  _et al._ [2011] T. Monz, P. Schindler, J. T. Barreiro, M. Chwalla, D. Nigg, W. A. Coish, M. Harlander, W. Hänsel, M. Hennrich, and R. Blatt, 14-qubit entanglement: Creation and coherence, Phys. Rev. Lett. 106, 130506 (2011).
  * Pogorelov  _et al._ [2021] I. Pogorelov, T. Feldker, C. D. Marciniak, L. Postler, G. Jacob, O. Krieglsteiner, V. Podlesnic, M. Meth, V. Negnevitsky, M. Stadler, B. Höfer, C. Wächter, K. Lakhmanskiy, R. Blatt, P. Schindler, and T. Monz, Compact ion-trap quantum computing demonstrator, PRX Quantum 2, 020343 (2021).
  * Note [5] For the optimization results presented throughout this manuscript, we calculate exact gradients and use a combination of sequential quadratic programming and the Nelder-Mead method, as implemented in Matlab, to determine optimal solutions.
  * He  _et al._ [2011] Q. Y. He, S.-G. Peng, P. D. Drummond, and M. D. Reid, Planar quantum squeezing and atom interferometry, Phys. Rev. A 84, 022107 (2011).
  * Braverman  _et al._ [2018] B. Braverman, A. Kawasaki, and V. Vuletić, Impact of non-unitary spin squeezing on atomic clock performance, New Journal of Physics 20, 103019 (2018).
  * Pegg and Barnett [1988] D. T. Pegg and S. M. Barnett, Unitary phase operator in quantum mechanics, Europhysics Letters (EPL) 6, 483 (1988).
  * Derka  _et al._ [1998] R. Derka, V. Bužek, and A. K. Ekert, Universal algorithm for optimal estimation of quantum states from finite ensembles via realizable generalized measurement, Phys. Rev. Lett. 80, 1571 (1998).
  * Chase and Geremia [2008] B. A. Chase and J. M. Geremia, Collective processes of an ensemble of spin-$\frac{1}{2}$ particles, Phys. Rev. A 78, 052101 (2008).
  * Shammah  _et al._ [2018] N. Shammah, S. Ahmed, N. Lambert, S. De Liberato, and F. Nori, Open quantum systems with local and collective incoherent processes: Efficient numerical simulations using permutational invariance, Phys. Rev. A 98, 063815 (2018).
  * Huelga  _et al._ [1997] S. F. Huelga, C. Macchiavello, T. Pellizzari, A. K. Ekert, M. B. Plenio, and J. I. Cirac, Improvement of frequency standards with quantum entanglement, Phys. Rev. Lett. 79, 3865 (1997).
  * Braunstein and Caves [1994] S. L. Braunstein and C. M. Caves, Statistical distance and the geometry of quantum states, Phys. Rev. Lett. 72, 3439 (1994).
  * Helstrom [1976] C. W. Helstrom,  _Quantum detection and estimation theory_, Math. Sci. Eng. (Academic Press, New York, NY, 1976).
  * Trees [1968] H. L. V. Trees,  _Detection, Estimation and Modulation_ (Wiley, New York, 1968).
  * Gill and Levit [1995] R. D. Gill and B. Y. Levit, Applications of the van trees inequality: a bayesian cramér-rao bound, Bernoulli 1, 59 (1995).
  * Berry and Wiseman [2000] D. W. Berry and H. M. Wiseman, Optimal states and almost optimal adaptive measurements for quantum interferometry, Phys. Rev. Lett. 85, 5098 (2000).
  * Henkel  _et al._ [2010] N. Henkel, R. Nath, and T. Pohl, Three-dimensional roton excitations and supersolid formation in rydberg-excited bose-einstein condensates, Phys. Rev. Lett. 104, 195302 (2010).
  * Pupillo  _et al._ [2010] G. Pupillo, A. Micheli, M. Boninsegni, I. Lesanovsky, and P. Zoller, Strongly correlated gases of rydberg-dressed atoms: Quantum and classical dynamics, Phys. Rev. Lett. 104, 223002 (2010).
  * Gil  _et al._ [2014] L. I. R. Gil, R. Mukherjee, E. M. Bridge, M. P. A. Jones, and T. Pohl, Spin squeezing in a rydberg lattice clock, Phys. Rev. Lett. 112, 103601 (2014).
  * Schioppo  _et al._ [2017] M. Schioppo, R. C. Brown, W. F. McGrew, N. Hinkley, R. J. Fasano, K. Beloy, T. H. Yoon, G. Milani, D. Nicolodi, J. A. Sherman, N. B. Phillips, C. W. Oates, and A. D. Ludlow, Ultrastable optical clock with two cold-atom ensembles, Nature Photonics 11, 48 (2017).
  * Borregaard and Sørensen [2013a] J. Borregaard and A. S. Sørensen, Near-heisenberg-limited atomic clocks in the presence of decoherence, Phys. Rev. Lett. 111, 090801 (2013a).
  * Kessler  _et al._ [2014] E. M. Kessler, P. Kómár, M. Bishof, L. Jiang, A. S. Sørensen, J. Ye, and M. D. Lukin, Heisenberg-limited atom clocks based on entangled qubits, Phys. Rev. Lett. 112, 190403 (2014).
  * Borregaard and Sørensen [2013b] J. Borregaard and A. S. Sørensen, Efficient atomic clocks operated with several atomic ensembles, Phys. Rev. Lett. 111, 090802 (2013b).
  * Rosenband and Leibrandt [2013] T. Rosenband and D. R. Leibrandt, Exponential scaling of clock stability with atom number (2013), arXiv:1303.6357 [quant-ph] .
  * Chabuda  _et al._ [2016] K. Chabuda, I. D. Leroux, and R. Demkowicz-Dobrzański, The quantum allan variance, New Journal of Physics 18, 083035 (2016).
  * Chabuda  _et al._ [2020] K. Chabuda, J. Dziarmaga, T. J. Osborne, and R. Demkowicz-Dobrzański, Tensor-network approach for quantum metrology in many-body quantum systems, Nature Communications 11, 250 (2020).
  * Marciniak  _et al._ [2021] C. D. Marciniak, T. Feldker, I. Pogorelov, R. Kaubruegger, D. V. Vasilyev, R. van Bijnen, P. Schindler, P. Zoller, R. Blatt, and T. Monz, Optimal metrology with variational quantum circuits on trapped ions (2021), arXiv:2107.01860 [quant-ph] .
  * Barnes  _et al._ [1971] J. A. Barnes, A. R. Chi, L. S. Cutler, D. J. Healey, D. B. Leeson, T. E. McGunigal, J. A. Mullen, W. L. Smith, R. L. Sydnor, R. F. C. Vessot, and G. M. R. Winkler, Characterization of frequency stability, IEEE Transactions on Instrumentation and Measurement IM-20, 105 (1971).
  * Dowling  _et al._ [1994] J. P. Dowling, G. S. Agarwal, and W. P. Schleich, Wigner distribution of a general angular-momentum state: Applications to a collection of two-level atoms, Phys. Rev. A 49, 4101 (1994).
  * Dick [1888] G. J. Dick, Local oscillator induced instabilities in trapped ion frequency standards, in  _Proceedings of the 19th Annu. Precise Time and Time Inverval Meeting, Redendo Beach, 1987_ (U.S. Naval Observatory, 1888) pp. 133–147, http://tycho.usno.navy.mil/ptti/1987/Vol%2019_13.pdf.
  * Koczor  _et al._ [2020] B. Koczor, S. Endo, T. Jones, Y. Matsuzaki, and S. C. Benjamin, Variational-state quantum metrology, New Journal of Physics 22, 083038 (2020).
  * Beckey  _et al._ [2020] J. L. Beckey, M. Cerezo, A. Sone, and P. J. Coles, Variational quantum algorithm for estimating the quantum fisher information (2020), arXiv:2010.10488 [quant-ph] .
  * Ma  _et al._ [2020] Z. Ma, P. Gokhale, T.-X. Zheng, S. Zhou, X. Yu, L. Jiang, P. Maurer, and F. T. Chong, Adaptive circuit learning for quantum metrology (2020), arXiv:2010.08702 [quant-ph] .
  * Mullan and Knill [2014] M. Mullan and E. Knill, Optimizing passive quantum clocks, Phys. Rev. A 90, 042310 (2014).
  * Hume and Leibrandt [2016] D. B. Hume and D. R. Leibrandt, Probing beyond the laser coherence time in optical clock comparisons, Phys. Rev. A 93, 032138 (2016).
  * Demkowicz-Dobrzański  _et al._ [2017] R. Demkowicz-Dobrzański, J. Czajkowski, and P. Sekatski, Adaptive quantum metrology under general markovian noise, Phys. Rev. X 7, 041009 (2017).
  * Pezzè and Smerzi [2020] L. Pezzè and A. Smerzi, Heisenberg-limited noisy atomic clock using a hybrid coherent and squeezed state protocol, Phys. Rev. Lett. 125, 210503 (2020).
  * Pezzè and Smerzi [2021] L. Pezzè and A. Smerzi, Quantum phase estimation algorithm with gaussian spin states, PRX Quantum 2, 040301 (2021).