# Beyond spectator qubits: Heisenberg-limited noise mitigation via photonic
modes and continuous measurement

Andrew Lingenfelter1,2 and Aashish A. Clerk  Pritzker School of Molecular
Engineering, University of Chicago, Chicago, IL 60637, USA
2Department of Physics, University of Chicago, Chicago, IL 60637, USA

(August 27, 2024)

###### Abstract

Noise is an ever-present challenge to the creation and preservation of fragile
quantum states. Recent work suggests that spatial noise correlations can be
harnessed as a resource for noise mitigation via the use of spectator qubits
to measure environmental noise. In this work we generalize this concept from
spectator qubits to a spectator mode: a photonic mode which continuously
measures spatially correlated classical dephasing noise and applies a
continuous correction drive to frequency-tunable data qubits. Our analysis
shows that by using many photon states, spectator modes can surpass many of
the quantum measurement constraints that limit spectator qubit approaches. We
also find that long-time data qubit dephasing can be arbitrarily suppressed,
even for white noise dephasing. Further, using a squeezing (parametric) drive,
the error in the spectator mode approach can exhibit Heisenberg-limited
scaling in the number of photons used. We also show that spectator mode noise
mitigation can be implemented completely autonomously using engineered
dissipation. In this case no explicit measurement or processing of a classical
measurement record is needed. Our work establishes spectator modes as a
potentially powerful alternative to spectator qubits for noise mitigation.

##  I Introduction

The protection of quantum states against decoherence due to noise is a
fundamental challenge to robust quantum information processing. With recent
progress in the scale-up of quantum hardware, efficient noise mitigation for
many qubit systems is increasingly necessary [1, 2, 3]. One strategy to
protect quantum states against decoherence is quantum error correction (QEC),
which is well suited to mitigating local Markovian noise [4, 5, 6]. Temporal
and spatial noise correlations are however generically hostile to QEC [7, 8,
9], although there are exceptions for weak correlations [10, 11]. Dynamical
decoupling (DD), another common noise mitigation strategy, is effective
against slow, non-Markovian noise [12, 13, 14, 15, 16, 17, 18]; however,
standard DD does not take advantage of any spatial noise correlations. In
systems with many qubits, long range spatial noise correlations have been
measured [19, 20, 21, 22, 23]. There is thus ample motivation for
understanding how spatial correlations could be harnessed as a resource for
improved noise mitigation.

Figure 1:  Spectator photonic mode for mitigating correlated classical noise.
(a) A qubit is dephased by classical noise $\xi_{q}(t)$, which is correlated
with the frequency noise $\xi_{s}(t)$ of a driven photonic spectator mode. The
spectator’s output field is continuously measured, and the resulting
measurement record is fedforward to the qubit to mitigate $\xi_{q}(t)$. (b)
Qubit decoherence
$1-|\rho_{\uparrow\downarrow}(t)/\rho_{\uparrow\downarrow}(0)|$ vs. time for
perfectly correlated white noise, $S[\omega]=S_{0}$, with and without
spectator mode mitigation. Without the spectator (red dashed curve), the qubit
dephases at the rate $\Gamma_{0}=S_{0}/2$. With spectator mitigation, the
dephasing can be highly suppressed. Results are shown for $\bar{n}_{\rm
cav}=1000$ intracavity photons, with and without a parametric drive
$\lambda_{2}$. For these parameters, an optimized $\lambda_{2}$ dramatically
suppresses dephasing. We also plot the case $\bar{n}_{\rm cav}\to\infty$,
which completely suppresses the long-time dephasing rate. The dephasing time
$T_{\phi}$ (when the coherence falls by $1/e$) is shown for each curve. The
parameters are $\beta_{s}=0.5$, $S_{0}/\kappa_{c}=0.001$, and $\alpha_{s}=1$;
the noise strength satisfies Eq. (10) and the squeezing $\lambda_{2}\approx
0.74$ satisfies Eq. (11).

To this end, there has been a flurry of activity developing spectator qubits
(SQ) protocols which explicitly use spatial correlations to fight noise [24,
25, 26, 27, 28]. The SQ are a dedicated set of qubits in a quantum processor
or register which do not interact with the data qubits – those whose states
are to be protected – but are in close enough physical proximity to be
susceptible to the same noise. By making appropriate measurements of the SQ,
one can obtain information about the noise in real time and use this
information to apply corrective controls to the data qubits. Recent advances
in the fabrication and control of many-qubit devices [2, 3] suggests that the
use of qubits as spectators could be an attractive approach when spatial noise
correlations are present. Nevertheless, there are some important limitations
to the use of SQ. First, the SQ strategy requires strong spatial noise
correlations to work; in fact most existing theory work on SQ has assumed
perfect noise correlation. Second, there are limitations associated with
measurement noise: one cannot perfectly estimate the correlated environmental
noise from a finite set of measurements of the SQ [26]. These unavoidable
measurement errors corrupt subsequent correction pulses applied to the target
data qubits, ultimately reducing their coherence. As argued in Ref. [26] on
information theoretic grounds and taken as an necessary starting assumption in
Ref. [27], to have the SQ scheme be effective despite a finite measurement
imprecision, one must make the SQ much more sensitive to the correlated noise
than the data qubits.

In this paper we introduce an alternate approach to the spectator philosophy
that alleviates many of these problems. Instead of a qubit, we use a driven
mode of a photonic cavity as the spectator quantum system: it detects and
mitigates the classical dephasing noise affecting the qubit (see Fig. 1(a)).
The use of a multi-level photonic mode as the spectator quantum system
dramatically suppresses the measurement imprecision problem, for the simple
reason that one can now use many photons to estimate the noise. As we show,
the only way to achieve such low measurement imprecision using SQ would be to
measure a large number of SQ, something that is infeasible in many systems.
Our analysis also reveals another advantage of using a spectator photonic
mode: by parametrically driving the spectator mode, the resulting squeezing-
induced reduction of the measurement imprecision can exhibit Heisenberg-
limited scaling in the number of measurement photons used [29].

In addition to analyzing a spectator cavity rather than a qubit, there is
another crucial difference in the setup we consider. Whereas standard SQ
schemes involve repeated discrete measurements, here we consider an approach
based on weak continuous measurements, something that is generally easier and
more natural for photonic modes [30]. The photons in the mode are allowed to
leak into a waveguide which is continuously monitored (e.g. via a homodyne
measurement), producing a continuous measurement record that reflects the
correlated noise of interest. Assuming the data qubit is frequency tunable,
this measurement record is continuously fedforward to the data qubit,
modulating its frequency to correct the noise-induced dephasing. This
represents a new application of continuous feedback control via weak
continuous measurements [31, 32, 33, 34]. Perhaps even more interesting is
that the continuous measurement and feedforward noise mitigation strategy we
depict could also be implemented in a completely autonomous fashion. In such
an approach, no explicit measurements or processing of a classical measurement
record are needed; instead, one engineers effective dissipation that mimics
the effects of the feedforward process [35].

Our analysis has other salient features. We go beyond the idealized situation
assumed in most previous studies of perfect noise correlation, and explicitly
consider the impact of partial noise correlations between the spectator mode
and data qubit. We also consider environmental noise with an arbitrary noise
spectral density (as opposed to focusing on one specific form). Our analysis
reveals that the spectator mode approach can still be useful even with partial
noise correlations, and for almost any kind of noise spectrum. In particular,
it can even help ameliorate the effects of white noise, despite the finite
bandwidth of the feedforward dynamics. Mitigation of white noise is shown in
Fig. 1(b).

The remainder of this paper is organized as follows. In Sec. II we discuss the
detailed setup of the spectator mode, the frequency-tunable qubit, and the
measurement and feedforward quantum master equation describing the composite
system. In Sec. III we discuss the noise mitigation properties of the
spectator mode under both perfect and partial noise correlation. In Sec. IV we
show that the measurement imprecision exhibits Heisenberg-limited scaling in
the number of photons used in the measurement, and discuss practical
considerations for minimizing measurement imprecision. We conclude in Sec. V.

##  II Physical setup

The spectator mode setup is depicted schematically in Fig. 1(a). The
frequency-tunable qubit is coupled to the classical noise $\xi_{q}(t)$, which
modulates its frequency. The time-dependent qubit Hamiltonian is

$\displaystyle\hat{H}_{q,[\xi]}(t)=\frac{1}{2}\left[\Omega_{q}(\Phi)+\xi_{q}(t)\right]\hat{\sigma}_{z},$
(1)

where
$\hat{\sigma}_{z}={\lvert\uparrow\rangle\langle\uparrow\rvert}-{\lvert\downarrow\rangle\langle\downarrow\rvert}$
for qubit energy eigenstates
${\lvert\uparrow\rangle},{\lvert\downarrow\rangle}$ and $\Omega_{q}(\Phi)$ is
the qubit splitting frequency controlled by some external parameter $\Phi$.
Here the $[\xi]$ subscript denotes quantities that are functions of noise
variables $\xi(t)$. We work in a rotating frame about the static qubit
splitting frequency set by the operating point $\Phi_{0}$. Thus
$\Omega_{q}(\Phi_{0})\equiv 0$ in Eq. (1).

The spectator photonic mode is dispersively coupled to the classical noise
$\xi_{s}(t)$, and is continuously driven by a _required_ linear drive and an
_optional_ parametric drive. These drives are resonant with the spectator mode
frequency $\omega_{0}$. In the rotating frame at $\omega_{0}$, the time-
dependent spectator mode Hamiltonian is given by

$\displaystyle\hat{H}_{{\rm
spec},[\xi]}(t)=\beta_{s}\xi_{s}(t)\hat{a}^{\dagger}\hat{a}+\hat{H}_{\rm
drive},$ (2)

where $\beta_{s}$ is a _dimensionless_ coupling factor (i.e. how strongly does
the spectator see the noise), and $\hat{H}_{\rm drive}$ is given by Eq. (5),
discussed in detail below.

###  II.1 Classical dephasing noise

Our noise model is classical stationary Gaussian noise with an arbitrary
spectral density $S[\omega]$. We also consider a generic situation where the
qubit noise $\xi_{q}(t)$ and spectator noise $\xi_{s}(t)$ have identical
spectral densities (reflecting translational invariance, i.e. the noise is the
same at the spectator and data qubit positions):

$\displaystyle\overline{\xi_{q}(t)\xi_{q}(0)}=\overline{\xi_{s}(t)\xi_{s}(0)}=\int\frac{d\omega}{2\pi}e^{-i\omega
t}S[\omega].$ (3)

The notation $\overline{\bullet}$ indicates the ensemble average over the
classical noise variables $\xi(t)$, and $\langle\bullet\rangle$ indicates a
quantum expectation value without averaging over $\xi(t)$. $\xi_{q}(t)$ and
$\xi_{s}(t)$ will not in general be perfectly correlated. Partial correlation
between the two noise sources is encoded in the cross-correlation

$\displaystyle\overline{\xi_{s}(t)\xi_{q}(0)}=\eta\int\frac{d\omega}{2\pi}e^{-i\omega
t}S[\omega],$ (4)

where $\eta$ parameterizes the degree of correlation, $0\leq\eta\leq 1$
(negative correlation $\eta<0$ requires inverting the signal fedforward to the
qubit). Here we are considering a simple model of partially correlated noise:
$\xi_{s}(t)$ is a linear combination of $\xi_{q}(t)$ and another independent
noise source with the same spectral density.

###  II.2 Spectator mode drives

The linear and parametric drives applied to the spectator mode are described
in Eq. (2) by the following drive Hamiltonian (in the rotating frame of the
the mode):

$\displaystyle\hat{H}_{\rm
drive}=\frac{i\kappa_{c}}{2}\left[\lambda_{1}\left(\hat{a}^{\dagger}-\hat{a}\right)+\frac{\lambda_{2}}{2}\left(\hat{a}^{\dagger
2}-\hat{a}^{2}\right)\right].$ (5)

We choose to parameterize the drive amplitudes by the rate $\kappa_{c}$, which
will be the coupling rate between the mode and an external waveguide (cf. Fig.
1(a)). The dimensionless real parameters $\lambda_{1},\lambda_{2}>0$ are the
linear drive strength and parametric drive strength, respectively, and
$\lambda_{2}<1$ to avoid parametric instability. We assume that there is
negligible internal loss in the spectator mode, $\kappa_{i}\ll\kappa_{c}$,
thus the mode is overcoupled to the external waveguide such that the total
damping rate is $\kappa_{\rm tot}=\kappa_{c}$.

The first drive we apply is _required_ to implement the measurement: it is a
linear drive $\lambda_{1}$ in Eq. (5) that displaces the mode from vacuum.
With our phase choice, the drive defines the amplitude quadrature
[$\hat{X}\equiv(\hat{a}^{\dagger}+\hat{a})/\sqrt{2}$] of the mode. The
displacement causes the frequency fluctuations $\propto\xi_{s}(t)$ to appear
as fluctuations in the corresponding phase quadrature [$\hat{P}\equiv
i(\hat{a}^{\dagger}-\hat{a})/\sqrt{2}$] (cf. Fig. 2(a)). These phase
quadrature fluctuations are imprinted on the light that leaks into the
waveguide.

The second drive we apply is an _optional_ parametric drive $\lambda_{2}$ in
Eq. (5) that, with our phase choice, squeezes the phase quadrature of the
mode, as well as the phase quadrature of the mode’s output field. Further, the
parametric drive increases the effective damping rate of the intracavity phase
quadrature to

$\displaystyle{\kappa_{\phi}}\equiv(1+\lambda_{2})\kappa_{c}.$ (6)

Recent work has shown that this kind of in-situ squeezing generation can
enhance parameter-estimation measurements, despite the modification of the
cavity susceptibility [36, 37, 38, 39]. As we show, the same will be true in
our setup (cf. Fig. 2(b)), and will allow our spectator scheme to achieve a
Heisenberg-limit scaling in the number of measurement photons used.

Figure 2:  Phase space representation of spectator output field. The spectator
drives $\hat{H}_{\rm drive}$ (cf. Eq. (5)) create a displaced squeezed state
in the cavity that is continuously emitted into the output field $\hat{a}^{\rm
out}$ (cf. Eq. (14)). The linear drive $\propto\lambda_{1}$ displaces the
output field along the amplitude quadrature ($\hat{X}$) and the parametric
drive $\propto\lambda_{2}$ squeezes the phase quadrature ($\hat{P}$). (a) The
dispersive coupling to $\xi_{s}(t)$ in Eq. (2) rotates the output field by a
small angle $\theta(t)\sim\xi_{s}(t)/\kappa_{c}$ in phase space. To first
order in small $\theta$, the rotation causes displacement in the phase
quadrature with negligible rotation of the squeezed state. (b) After making
the linear noise drive approximation (cf. Eqs. (8) and (12)), the noise is
imprinted as fluctuations in the phase quadrature of the output field.

###  II.3 Displacement transformation, linear noise drive approximation

It is convenient to make the displacement transformation
$\hat{a}=\hat{d}+\sqrt{\bar{n}_{1}}$ in terms of the average photon number
associated with the average mode amplitude $\langle\hat{a}\rangle$:

$\displaystyle\bar{n}_{1}\equiv\left|\langle\hat{a}\rangle\right|^{2}=\frac{\lambda_{1}^{2}}{(1-\lambda_{2})^{2}}.$
(7)

In the displaced frame, the spectator Hamiltonian Eq. (2) becomes

$\displaystyle\hat{H}_{{\rm spec},[\xi]}^{\prime}(t)=$
$\displaystyle\leavevmode\nobreak\
\beta_{s}\xi_{s}(t)\sqrt{\bar{n}_{1}}(\hat{d}+\hat{d}^{\dagger})$ (8)
$\displaystyle-\frac{i\kappa_{c}}{4}\lambda_{2}(\hat{d}^{2}-\hat{d}^{\dagger
2})+\hat{H}_{{\rm freq},[\xi]}(t),$ $\displaystyle\hat{H}_{{\rm
freq},[\xi]}(t)=$ $\displaystyle\leavevmode\nobreak\
\beta_{s}\xi_{s}(t)\hat{d}^{\dagger}\hat{d}.$ (9)

In this frame, the noise couples to the mode in two ways. The first is via an
effective linear drive $\propto\sqrt{\bar{n}_{1}}\xi_{s}(t)$ that displaces
the cavity’s phase quadrature. It is this driving that we wish to exploit. The
second coupling is a quadratic residual phase noise term $\hat{H}_{{\rm
freq},[\xi]}(t)$ that has no $\sqrt{\bar{n}_{1}}$ enhancement factor. We wish
to work in regimes where this coupling is negligible, as without it, the phase
quadrature will have a simple linear dependence on $\xi_{s}(t)$, greatly
simplifying our spectator scheme.

A careful analysis lets us identify regimes where the effects of
$\hat{H}_{{\rm freq},[\xi]}(t)$ can be neglected (see App. B). In the case
where no squeezing is employed ($\lambda_{2}=0$), we require:

$\displaystyle\beta_{s}^{2}\int$
$\displaystyle\frac{d\omega}{2\pi}\frac{S[\omega]}{\omega^{2}}\sin^{2}(\omega/2\kappa_{c})\ll
1.$ (10)

Heuristically, this condition ensures that the phase diffusion induced by the
residual phase noise term is negligible during the relevant correlation time
of the cavity mode. For example, in the case of white noise $S[\omega]=S_{0}$,
Eq. (10) reduces to the constraint $\beta_{s}^{2}S_{0}\ll\kappa_{c}$.

The residual phase noise term also constrains the use of squeezing in our
scheme, i.e. a non-zero $\lambda_{2}$. Heuristically, this unwanted dynamics
induces a rotation in phase space that mixes the enhanced amplitude quadrature
quantum noise into the squeezed phase quadrature [40, 41, 42]. To have this
extra noise not overwhelm the desired noise squeezing, the following condition
must also be satisfied:

$\displaystyle(1-\lambda_{2})^{4}\gtrsim 16\beta_{s}^{2}\int$
$\displaystyle\frac{d\omega}{2\pi}\frac{S[\omega]}{\omega^{2}}\sin^{2}(\omega/2\kappa_{c}).$
(11)

See App. B for a detailed discussion. We stress that even when Eq. (10) is
satisfied, this condition determines the maximum value of $\lambda_{2}$ (and
hence squeezing) that can be usefully employed to enhance noise mitigation.

In what follows, we assume both that $\bar{n}_{1}\gg 1$ and that the noise is
weak enough that both Eqs. (10) and (11) hold. We can thus safely approximate
the spectator mode Hamiltonian as

$\displaystyle\hat{H}_{s,[\xi]}(t)$
$\displaystyle\simeq\beta_{s}\xi_{s}(t)\sqrt{\bar{n}_{1}}(\hat{d}+\hat{d}^{\dagger})-\frac{i\kappa_{c}}{4}\lambda_{2}(\hat{d}^{2}-\hat{d}^{\dagger
2}),$ (12)

i.e. the spectator is only linearly driven by the noise.

###  II.4 Homodyne measurement and feedforward

The final elements of our setup are the spectator measurement and feedforward
operations. While we start by analyzing a protocol that involves an explicit
continuous measurement, we will end with an effective description that could
be implemented in a fully autonomous manner (i.e. without needing any explicit
measurement or processing of a classical measurement record).

Via Eq. (12), the noise $\xi_{s}(t)$ modulates the phase of the light leaving
the cavity (see Fig. 2(b)). This information is captured in the output field
phase quadrature:

$\displaystyle\hat{P}^{\rm out}_{[\xi]}(t)$
$\displaystyle=\frac{i}{\sqrt{2}}\left(\hat{a}^{{\rm
out}\dagger}_{[\xi]}(t)-\hat{a}^{{\rm out}}_{[\xi]}(t)\right),$ (13)
$\displaystyle\hat{a}^{\rm out}_{[\xi]}(t)$ $\displaystyle=\hat{a}^{\rm
in}(t)+\sqrt{\kappa_{c}}\hat{a}_{[\xi]}(t).$ (14)

This output field phase quadrature can be continuously measured using a
standard homodyne measurement (see e.g. [43, 44]), producing the continuous
homodyne current $\hat{J}_{{\rm hom},[\xi]}(t)=\hat{P}^{\rm out}_{[\xi]}(t)$.
To implement our noise mitigation, we will use this homodyne current (which
has units of $\sqrt{\rm rate}$) for feedforward control of the qubit, namely
to directly modulate the qubit frequency. This amounts to using the
measurement record $\sim\langle\hat{J}_{{\rm hom},[\xi]}\rangle$ to modulate
the external parameter $\Phi$ that controls the qubit frequency in Eq. (1).
Ignoring delays, we obtain a modified qubit Hamiltonian

$\displaystyle\hat{H}_{q,[\xi]}^{\prime}(t)=\frac{1}{2}\left(\xi_{q}(t)+\sqrt{\gamma_{\rm
ff}}\hat{J}_{{\rm hom},[\xi]}(t)\right)\hat{\sigma}_{z},$ (15)

where the rate $\gamma_{\rm ff}$ parameterizes the strength of the
feedforward.

If the spectator were a perfect, noiseless classical system with an
instantaneous response, we could tune the feedforward strength to achieve
$\sqrt{\gamma_{\rm ff}}J_{{\rm hom},[\xi]}(t)\rightarrow-\xi_{q}(t)$. The
feedforward would thus cancel the noise experienced by the qubit in Eq. (15)
completely. For a realistic quantum spectator mode, this perfect cancellation
is degraded by two basic effects. First, the spectator mode always has a non-
instantaneous response which limits its sensitivity to high-frequency noise.
Second, the homodyne current is operator-valued and thus has quantum
fluctuations which add unwanted quantum noise to the measurement record. The
added noise is effectively a random error at each time step, thus it is the
continuous analog of imprecision errors in a set of discrete measurements. The
fully quantum description we develop below allows us treat both the
limitations due to quantum noise and the delayed spectator response.

Using standard continuous measurement theory [30], the unconditional dynamics
of our feedforward setup (i.e. averaged over measurement outcomes) can be
described using a Lindblad master equation that governs the combined spectator
mode and qubit dynamics. As the mode is included in our description, we retain
all effects associated with its non-instantaneous response. The resulting
master equation is still a function of the specific classical noise
realizations $\xi_{j}(t)$ (which need not be white noise), and takes the form:

$\displaystyle\frac{d}{dt}\hat{\rho}_{[\xi]}(t)=$
$\displaystyle-i[\hat{H}_{q,[\xi]}(t)+\hat{H}_{s,[\xi]}(t)+\hat{H}_{\rm
int},\hat{\rho}]+\mathcal{D}[\hat{L}]\hat{\rho},$ (16)

where
$\mathcal{D}[\hat{X}]\hat{\rho}=\hat{X}\hat{\rho}\hat{X}^{\dagger}-\\{\hat{X}^{\dagger}\hat{X},\hat{\rho}\\}/2$
the the standard Lindblad dissipator, $\hat{H}_{q,[\xi]}(t)$ is given by Eq.
(1), and $\hat{H}_{s,[\xi]}(t)$ is given by Eq. (12). The measurement and
feedforward induces a Hamiltonian interaction and collective dissipation given
by

$\displaystyle\hat{H}_{\rm int}$ $\displaystyle=\frac{1}{2i}\sqrt{\gamma_{\rm
ff}\kappa_{c}}\left(\hat{d}-\hat{d}^{\dagger}\right)\hat{\sigma}_{z},$ (17)
$\displaystyle\hat{L}$
$\displaystyle=\sqrt{\kappa_{c}}\hat{d}+\sqrt{\gamma_{\rm
ff}}\hat{\sigma}_{z}.$ (18)

We pause to make an important comment on Eq. (16): while this dissipative
dynamics can be generated (as discussed) via continuous measurement and
feedforward, it could also be directly generated without any measurement,
using instead the tools of reservoir engineering. This autonomous approach
would replace the measurement and feedforward parts of our setup by an
engineered dissipative bath that couples to both the qubit and spectator [35],
in such a way to realize Eq. (16) (see Fig. 3). We provide more details in
App. D showing how such a reservoir could be constructed using standard tools
in cavity QED. This autonomous realization is a potentially powerful approach
to spectator-based noise mitigation, as it does not require high fidelity
measurements nor any interface with the classical world beyond the pump tones
needed to implement the spectator mode and reservoir engineering.

Figure 3:  Autonomous spectator mode noise mitigation. The autonomous
implementation of the spectator mode requires a direct Hamiltonian interaction
$\hat{H}_{\rm int}$ (cf. Eq. (17)) between the spectator and the qubit as well
as an engineered reservoir that mediates the collective dissipation
$\mathcal{D}[\hat{L}]\hat{\rho}$ (cf. Eq. (18)). These elements replace the
measurement and feedforward apparatus shown in Fig. 1(a), and could be
engineered in cavity QED setups using auxiliary cavity modes, parametric
couplings and external drives. See App. D for more details.

###  II.5 Qubit decoherence function

The qubit evolution governed by Eq. (16) conserves $\hat{\sigma}_{z}$, and
thus it has pure dephasing dynamics. Suppose the qubit is prepared in the
superposition state
$\lvert\psi_{q}(0)\rangle=(\lvert\uparrow\rangle+\lvert\downarrow\rangle)$.
The noise can only change the superposition phase as
$\lvert\psi_{q}(t)\rangle=(\lvert\uparrow\rangle+\exp{[-i\int_{0}^{t}ds\xi_{q}(s)]}\lvert\downarrow\rangle)$.
We are thus interested in studying the decay of the qubit coherence due to
this random phase accumulation. The qubit coherence is given by the noise-
averaged off-diagonal matrix element of the qubit density matrix

$\displaystyle\rho_{\uparrow\downarrow}(t)=\overline{\langle\uparrow\rvert\hat{\rho}_{q}(t)\lvert\downarrow\rangle},$
(19)

where $\lvert\uparrow\rangle,\lvert\downarrow\rangle$ are the eigenstates of
$\hat{\sigma}_{z}$ and $\hat{\rho}_{q}(t)$ is the qubit density matrix. The
loss of qubit coherence is characterized by a decay in the magnitude of
$\rho_{\uparrow\downarrow}(t)$ with time.

We will parameterize the qubit coherence by the decoherence function
$\chi(t)$, defined via

$\displaystyle\rho_{\uparrow\downarrow}(t)=\rho_{\uparrow\downarrow}(0)e^{-\chi(t)}.$
(20)

In the simple case of Markovian dephasing (i.e. due to white noise), we have
$\chi(t)=\Gamma_{\phi}t$, where $\Gamma_{\phi}$ is the linear dephasing rate.
_Without the spectator system_ , the bare qubit decoherence function
$\chi_{0}(t)$ is given by

$\displaystyle\chi(t)\to\chi_{0}(t)=\frac{1}{2}\int\frac{d\omega}{2\pi}\frac{S[\omega]}{\omega^{2}}|Y_{\rm
fid}(\omega,t)|^{2}$ (21)

where we have used the Gaussian nature of the environmental noise (spectrum
$S[\omega]$), and the free induction decay (FID) filter function $Y_{\rm
fid}(\omega,t)$ is

$\displaystyle Y_{\rm fid}(\omega,t)=e^{-i\omega t}-1.$ (22)

To find the decoherence function when the spectator mode is introduced, we
compute the stochastic qubit coherence $\rho_{\uparrow\downarrow,[\xi]}(t)$,
then average over noise realizations. The qubit reduced density matrix is
given by $\hat{\rho}_{q,[\xi]}(t)={\rm tr}_{s}\\{\hat{\rho}_{[\xi]}(t)\\}$,
where the partial trace is over the spectator mode, and
$\hat{\rho}_{[\xi]}(t)$ evolves under Eq. (16). We find that

$\displaystyle\rho_{\uparrow\downarrow,[\xi]}(t)=\rho_{\uparrow\downarrow}(0)e^{-i\phi_{[\xi]}(t)}e^{-\Lambda_{\rm
imp}(t)}$ (23)

where $\phi_{[\xi]}(t)$ is the total stochastic phase accumulation, and
$\Lambda_{\rm imp}(t)\geq 0$ is the “measurement imprecision noise dephasing”
i.e., the qubit decoherence due to quantum noise associated with the
measurement-plus-feedforward dynamics. As we will show, this decoherence is a
direct consequence of the imprecision noise associated with the spectator
“measuring” the environmental noise.

First, consider the accumulated phase $\phi_{[\xi]}(t)$. We find:

$\displaystyle\phi_{[\xi]}$ $\displaystyle(t)=$ (24)
$\displaystyle\int_{0}^{t}dt^{\prime}\left[\xi_{q}(t^{\prime})-\alpha_{s}\frac{\kappa_{\phi}}{2}\int_{-\infty}^{t^{\prime}}dse^{-{\kappa_{\phi}}(t^{\prime}-s)/2}\xi_{s}(s)\right],$

where the $\xi_{q}(t^{\prime})$ term is the direct noise on the qubit and the
$\xi_{s}(s)$ term is the filtered, fedforward noise driving the spectator.
This expression and $\Lambda_{\rm imp}(t)$ (given below) are derived in App.
A. The parameter $\alpha_{s}$ is the dimensionless spectator transduction
factor

$\displaystyle\alpha_{s}$
$\displaystyle\equiv\frac{8\beta_{s}}{\kappa_{\phi}}\sqrt{\bar{n}_{1}\kappa_{c}\gamma_{\rm
ff}}.$ (25)

It controls how the environmental noise sensed by the spectator ultimately
drives the qubit. The transduction strength is set by the spectator detection
factor $\beta_{s}$ (cf. Eq. (2)), spectator mode displacement
$\sqrt{\bar{n}_{1}}$ (cf. Eq. (7)), the feedforward rate
$\sqrt{\kappa_{c}\gamma_{\rm ff}}$ (cf. Eqs. (5) and (15)), and the inverse of
the phase quadrature damping rate $1/\kappa_{\phi}$ (cf. Eq. (6)) – strong
damping requires a stronger transduction strength. We view $\alpha_{s}$ as the
relevant control parameter and henceforth write $\gamma_{\rm ff}$ in terms of
$\alpha_{s}$.

One can easily confirm that this expression for the accumulated phase
$\phi_{[\xi]}(t)$ has a completely classical form, i.e. what we would expect
if the spectator were a classical (noiseless) system with a delayed,
exponential response. The quantum nature of the spectator mode only appears in
the measurement imprecision noise dephasing $\Lambda_{\rm imp}(t)$, which
stems from (squeezed) vacuum noise in the spectator phase quadrature. We find

$\displaystyle\Lambda_{\rm imp}(t)=$ (26) $\displaystyle\leavevmode\nobreak\
\frac{\alpha_{s}^{2}}{32\beta_{s}^{2}\bar{n}_{1}}\frac{1}{1+\lambda_{2}}\left[(1-\lambda_{2})^{2}\kappa_{\phi}t+8\lambda_{2}\left(1-e^{-\kappa_{\phi}t/2}\right)\right].$

Without squeezing $\lambda_{2}=0$, the added quantum dephasing noise is white
so $\Lambda_{\rm imp}(t)$ is linear in time; this is no longer true when
$\lambda_{2}\neq 0$. One already sees the advantage of squeezing by the
dramatic reduction in the long-time added-noise dephasing:

$\displaystyle\Lambda_{\rm imp}(t)=\begin{cases}2\gamma_{\rm ff}t&t\ll
1/\kappa_{\phi}\\\
\left(\frac{1-\lambda_{2}}{1+\lambda_{2}}\right)^{2}(2\gamma_{\rm ff}t)+{\rm
const}&t\gg 1/\kappa_{\phi}\end{cases}.$ (27)

At short times, we have exponential dephasing set by the feedforward rate,
whereas at long times, squeezing can strongly suppress this exponential
dephasing.

Returning to the decoherence function $\chi(t)$, we finally take the ensemble
average of Eq. (23) over realizations of the environmental noise:

$\displaystyle\rho_{\uparrow\downarrow}(t)=\rho_{\uparrow\downarrow}(0)\overline{e^{i\phi_{[\xi]}(t)}}e^{-\Lambda_{\rm
imp}(t)}.$ (28)

As the accumulated phase is linear in the Gaussian noise $\xi(t)$, the average
can be done exactly. The final form of the decoherence function can thus be
written in terms of the spectrum $S[\omega]$ of our environmental noise:

$\displaystyle\chi(t)$ $\displaystyle=\Lambda_{\rm imp}(t)$ (29)
$\displaystyle+\frac{1}{2}\int\frac{d\omega}{2\pi}\frac{S[\omega]}{\omega^{2}}\left[\lvert
Y(\omega,t,\alpha_{s})\rvert^{2}+\lvert\tilde{Y}(\omega,t,\alpha_{s})\rvert^{2}\right].$

We have introduced the filter functions $Y(\omega,t,\alpha_{s})$ and
$\tilde{Y}(\omega,t,\alpha_{s})$, which correspond to the contributions of the
correlated and uncorrelated parts of the noise. The correlated-noise filter
function is

$\displaystyle Y(\omega,t,\alpha_{s})$
$\displaystyle=\left(1-\eta\alpha_{s}\frac{{\kappa_{\phi}}/2}{i\omega+{\kappa_{\phi}}/2}\right)Y_{\rm
fid}(\omega,t),$ (30)

where $Y_{\rm fid}(\omega,t)$ is given by Eq. (22), and $\eta$ sets the level
of noise correlation (c.f. Eq. (4)). The two terms here correspond to the two
ways the environmental noise reaches the qubit: directly (first term) and
through the feedforward process (second term). The spectator scheme relies on
getting these terms to cancel as best as possible.

In contrast, the uncorrelated-noise filter function is

$\displaystyle\tilde{Y}(\omega,t,\alpha_{s})$
$\displaystyle=\sqrt{1-\eta^{2}}\alpha_{s}\frac{{\kappa_{\phi}}/2}{i\omega+{\kappa_{\phi}}/2}Y_{\rm
fid}(\omega,t).$ (31)

This contribution to the qubit dephasing increases monotonically with
$\alpha_{s}$ as expected (i.e. this is just like an independent new source of
noise driving the qubit).

##  III Noise mitigation

We start by considering the limit of perfect noise correlation between
spectator and data qubit ($\eta=1$); this lets us understand the basic
features of our scheme. We then show how the noise mitigation is affected by
partial noise correlation $\eta<1$. We stress our treatment includes the delay
associated with the spectator mode response; in App. E, we discuss the
additional impact of delay assocaited with applying the feedforward control on
the data qubit.

###  III.1 Ideal spectator transduction factor

Our spectator-based noise mitigation ultimately relies on optimizing the
cancellation of the two terms in Eq. (30) to minimize the dephasing factor in
Eq. (29). There is only a single effective parameter to optimize: the
transduction factor $\alpha_{s}$, c.f. Eq. (25). One might guess that the
optimal value of $\alpha_{s}$ will depend on the form of the noise spectrum
$S[\omega]$ and on the evolution time $t$. This is not the case. As
$\alpha_{s}$ is constrained to be real, a simple calculation shows that there
is a single ideal value of $\alpha_{s}$ which minimizes
$|Y(\omega,t,\alpha_{s})|^{2}$ at all frequencies for all times:

$\displaystyle\alpha_{s}^{\rm ideal}=1.$ (32)

For the perfect correlation case we consider, this in turn minimizes the
second term in the dephasing factor $\chi(t)$ in Eq. (29), regardless of the
time $t$ or form of noise spectrum. Note this optimal value matches what we
would naively expect if there were no delay in the spectator mode response.

The filter function at ideal transduction strength ($\alpha_{s}=1$) takes the
simple form:

$\displaystyle Y(\omega,t,\alpha_{s}=1)$
$\displaystyle=\frac{i\omega/2}{i\omega+{\kappa_{\phi}}/2}Y_{\rm
fid}(\omega,t).$ (33)

As expected, the filter function is strongly suppressed over the no-
feedforward case at low frequencies $\omega\lesssim\kappa_{\phi}$, with a
perfect suppression at zero frequency. This latter property implies that the
environmental noise will not give any long-time exponential dephasing of the
qubit.

A key feature of the spectator mode approach is its ability to mitigate the
effects of white noise. This is directly related to a property of its filter
function: its total spectral weight, given by

$\displaystyle\int\frac{d\omega}{2\pi}$
$\displaystyle|Y(\omega,t,\alpha_{s})|^{2}=$ (34)
$\displaystyle\left(1-\alpha_{s}\right)^{2}t+\frac{2}{\kappa_{\phi}}\alpha_{s}(2-\alpha_{s})(1-e^{-\kappa_{\phi}t/2}),$

is not fixed. In particular, this weight can be made arbitrarily small for the
optimal tuning $\alpha_{s}=1$ by letting the spectator detection bandwidth
$\kappa_{\phi}$ be arbitrarily large. This is in stark contrast to typical
dynamical decoupling spectral functions that conserve spectral weight:

$\displaystyle\int\frac{d\omega}{2\pi}\frac{1}{\omega^{2}}|Y_{\rm
dd}(\omega,t)|^{2}=\int\frac{d\omega}{2\pi}\frac{1}{\omega^{2}}|Y_{\rm
fid}(\omega,t)|^{2}.$

The conservation of spectral weight in dynamical decoupling means that one
cannot mitigate white noise: the suppression of contributions at one frequency
to the dephasing factor necessarily imply increases contributions at other
frequencies [45, 46]. The spectator based approach (which cancels noise
induced dephasing via a completely different mechanism) does not have a
similar constraint.

###  III.2 Long-time decoherence

We now analyze the ultimate performance of the spectator mode approach in
mitigating qubit dephasing. We first consider the asymptotic long-time limit
$t\rightarrow\infty$. As $Y_{\rm fid}(\omega,t)$ approaches a $\delta$
function in this limit, for non-singular spectral densities, the long-time
decoherence for any $\alpha_{s}$ (but assuming $\eta=1$) is:

$\displaystyle\chi(t\to\infty)$
$\displaystyle=\frac{1}{2}(\alpha_{s}-1)^{2}S[0]t+\Lambda_{\rm
imp}(t)+\chi_{\textrm{init}}(\infty)$ (35)

where $\chi_{\textrm{init}}(\infty)$ is a $t$-independent constant (arising
from the finite spectator bandwidth) that we analyze more below. For an ideal
choice of transduction factor $\alpha_{s}=1$, the linear-in-$t$ phase
diffusion from the environmental noise is completely cancelled. In its place,
we have the imprecision noise dephasing $\Lambda_{\rm imp}$ (c.f. Eq. (26)).
Crucially, while $\Lambda_{\rm imp}$ also grows linearly with $t$ in the long-
time limit, the corresponding rate can be made arbitrarily small by using many
photons for the measurement. Defining the long time dephasing rate
$\Gamma_{\phi}=\lim_{t\rightarrow\infty}\chi(t)/t$, and considering the simple
case where there is no parametric drive on the spectator cavity (i.e.
$\lambda_{2}=0$) and $\alpha_{s}=1$, we have both with and without
feedforward:

$\left(\Gamma_{\phi}=\frac{1}{2}S[0]t\right)\rightarrow\left(\Gamma_{\phi}=\frac{1}{32\beta_{s}^{2}\bar{n}_{1}}\kappa_{c}\right)$
(36)

We see that the spectator mode approach (in this ideal limit) suppresses the
long time dephasing rate by a factor scaling as
$\kappa_{c}/(\bar{n}_{1}S[0])$. We stress that this result is valid for any
noise spectrum that is non-singular at $\omega=0$, including white noise.

The suppression of the long-time qubit dephasing rate is shown in Fig. 1(b)
and in Fig. 4. In both plots, the qubit is subject to perfectly correlated
white noise, $S[\omega]=S_{0}$. We see in Fig. 1(b) that the use of squeezing,
$\lambda_{2}\neq 0$, dramatically suppresses the long-time dephasing rate
relative to the modest suppression achieved using no squeezing (cf. the solid
and dashed blue curves of Fig. 1(b)). In Fig. 4 we demonstrate that
significant suppression of the long-time dephasing rate is achievable without
the use of squeezing. The requirement of sufficiently weak noise strength, Eq.
(10), is much less restrictive when no squeezing is applied. For Fig. 1(b), we
must have $S_{0}/\kappa_{\phi}\lesssim 0.001$ whereas for Fig. 4, we require
only $S_{0}/\kappa_{\phi}\lesssim 0.01$.

Figure 4:  Spectator cavity performance without squeezing. Qubit decoherence
$1-|\rho_{\uparrow\downarrow}(t)/\rho_{\uparrow\downarrow}(0)|$ vs. time for
perfectly correlated white noise, $S[\omega]=S_{0}$, with and without
spectator mode mitigation. The characteristic dephasing time $T_{\phi}$,
defined as the time at which the qubit coherence falls by a factor $1/e$
(i.e., when the decoherence function $\chi(T_{\phi})=1$, cf. Eq. (29)), is
shown for each curve. Without the spectator mode (red dashed curve), the qubit
linearly dephases, losing $1/e$ of its coherence at time $T_{\phi,0}=2/S_{0}$.
Results are shown with only a one-photon drive applied to the spectator mode.
The number of intracavity photons $\bar{n}_{\rm cav}=\bar{n}_{1}$ (cf. Eq.
(7)) is indicated above each curve. The spectator mode can dramatically
increase the coherence time of the qubit even without the two-photon drive
applied. The parameters are $\beta_{s}=1$, $S_{0}/\kappa_{\phi}=0.01$,
$\lambda_{2}=0$ and $\alpha_{s}=1$; the noise strength satisfies Eq. (10).

###  III.3 Short-time decoherence: finite detection bandwidth effects

In many cases, one is interested in understanding the qubit coherence at all
times, not just in the long time limit. For finite evolution times, the qubit
coherence will be sensitive to the environmental noise (and filter function)
over a finite bandwidth. Even for an optimal transduction strength
$\alpha_{s}=1$, the relevant filter function is only suppressed (compared to
$\alpha_{s}=0$) for frequencies $\omega\lesssim\kappa_{\phi}$, c.f. Eq. (33).
Heuristically, this means that even though there is no environmental-noise
induced long-time dephasing in this case, there will be some dephasing over a
time interval $0\leq t\lesssim 1/\kappa_{\phi}$. This initial dephasing gives
rise to the constant term $\chi_{\rm init}$ in Eq. (35).

For $\alpha_{s}=1$, the extra contribution to the dephasing factor from
finite-frequency environmental noise is given by:

$\displaystyle\chi_{\textrm{init}}(t)=\frac{1}{2}\int\frac{d\omega}{2\pi}\frac{S[\omega]}{\omega^{2}+\kappa_{\phi}^{2}/4}|Y_{\rm
fid}(\omega,t)|^{2}.$ (37)

As an example, for white noise $S[\omega]=S_{0}$, this extra dephasing
initially grows linearly in time as $\chi_{\rm init}(t)=S_{0}t/2$ for $t\ll
1/\kappa_{\phi}$, but then it saturates to a constant $\chi_{\rm init}\to
S_{0}/\kappa_{\phi}$ when $t\sim 1/\kappa_{\phi}$.

The short-time dephasing that arises for $\alpha_{s}=1$ and a finite spectator
bandwidth $\kappa_{\phi}$ are are illustrated in Fig. 5, for the case of a
Lorentzian environmental noise spectrum,
$S[\omega]=S_{0}(\gamma^{2}/4)/(\omega^{2}+\gamma^{2}/4)$. As expected,
broadband noise ($\gamma\gg\kappa_{\phi}$) cannot be mitigated over short
timescales, hence the spectator-mitigated decoherence closely tracks the bare
qubit decoherence until $t\sim 1/\kappa_{\phi}$ (see right plot of Fig. 5).
Around $t\sim 1/\kappa_{\phi}$ the decoherence quickly saturates to a finite
value. The initially quadratic dephasing becomes linear when $t>1/\gamma$. In
contrast, narrowband noise ($\gamma\ll\kappa_{\phi}$) is much more effectively
mitigated by the spectator at all times, as demonstrated by the prefactor
suppression of the initial quadratic dephasing (see right plot of Fig. 5). At
times $t\sim 1/\kappa_{\phi}$ the initially quadratic dephasing becomes linear
with a suppressed rate $(\gamma/\kappa_{\phi})^{2}\Gamma_{0}$. After a time
$t\sim 1/\gamma$, $\chi_{\textrm{init}}(t)$ saturates to a finite value.

Figure 5:  Finite detection bandwidth effects for broadband and narrowband
noise. The qubit decoherence function (less $\Lambda_{\rm imp}(t)$) versus
time for Lorentzian noise (bandwidth $\gamma$, zero-frequency strength
$S[0]=0.01\kappa_{\phi}$). In both plots the black dashed curves are the bare
qubit decoherence function (in the right plot, relative vertical position
corresponds to same-position labeled curve), and the vertical dot-dashed line
indicates $t=1/\kappa_{\phi}$. Left plot: broadband noise. For short times
$t<1/\kappa_{\phi}$ the spectator cannot mitigate the noise so the qubit
dephases as it would without the spectator, while for longer times there is
strongly suppressed dephasing. Right plot: Narrowband noise. For short times
$t<1/\kappa_{\phi}$ the spectator greatly suppresses the initial quadratic-
in-$t$ dephasing. For times $1/\kappa_{\phi}<t<1/\gamma$ the spectator reduces
dephasing to linear in time with suppressed rate
$(\gamma/\kappa_{\phi})^{2}S_{0}/2\ll S_{0}/2$. Dephasing finally saturates
after $t>1/\gamma$.

###  III.4 Partial noise correlation

Our discussion in this section so far has focused on the case of perfect noise
correlation between the spectator mode and data qubit, $\eta=1$. When there is
only partial noise correlation between the spectator and qubit ($\eta<1$), we
must retain both filter functions Eqs. (30) and (31) in the expression Eq.
(29) for $\chi(t)$. The uncorrelated noise prevents the spectator mode from
perfectly canceling the long-time dephasing rate, and creates a penalty for
increasing the transduction factor $\alpha_{s}$ from $0$.

For a general correlation $\eta$, the qubit decoherence function in the long-
time limit is

$\displaystyle\chi(t)$
$\displaystyle=\frac{1}{2}(\alpha_{s}^{2}-2\eta\alpha_{s}+1)S[0]t+\Lambda_{\rm
imp}(t)+{\rm const}.$ (38)

For imperfect correlation, it is no longer possible to cancel the dominant
$S[0]t$ term in this expression. The best we can do it minimize its prefactor,
by tuning the transudction factor to the optimal value

$\displaystyle\alpha_{s}^{\rm ideal}=\eta.$ (39)

resulting in

$\displaystyle\chi(t)$
$\displaystyle\rightarrow\frac{1}{2}(1-\eta^{2})S[0]t+\Lambda_{\rm
imp}(t)+{\rm const}.$ (40)

Hence, the environmental-noise contribution to the long time dephasing rate
can be suppressed by a factor $(1-\eta^{2})$, showing that the spectator
approach can still be useful even with partial noise correlations.

Of course, in asking whether spectator based feedforward is beneficial in
suppressing long-time dephasing, one also needs to consider the measurement
imprecision noise dephasing $\Lambda_{\rm imp}$. The excess dephasing from
imprecision can always (in principle) be mitigated by is can always be
achieved by using a sufficiently large number of photons $\bar{n}_{1}$, c.f.
Eq. (36).

##  IV Measurement imprecision noise dephasing: approaching Heisenberg-limited
scaling

As discussed, the key quantum aspect of the spectator mode scheme is the
measurement imprecision noise contribution to the qubit’s dephasing,
$\Lambda_{\rm imp}(t)$ (c.f. Eq. (26)). This term is ultimately due to the
(possibly squeezed) vacuum noise of the spectator mode. Minimizing this
dephasing is a key aspect to the spectator mode strategy. We imagine a
situation where the transduction factor $\alpha_{s}$ (c.f. Eq. (25)) can be
fixed to the optimal value of $1$, while the drive amplitudes $\lambda_{1}$
and $\lambda_{2}$ can still vary; this can be accomplished by appropriately
tuning the feedforward strength $\gamma_{\rm ff}$. The measurement-imprecision
noise dephasing can be made arbitrarily small by using an arbitrarily large
number of photons, i.e. let $\lambda_{1}\to\infty$ and $\lambda_{2}\to 1$. We
wish to understand this more quantitatively, and in a manner more relevant to
experiment. Given that we are able to use some fixed total number of photons
for the measurement, how small can we make $\Lambda_{\rm imp}(t)$? Further,
how does this optimized added dephasing scale with photon number?

The above questions are directly connected to quantum limits on parameter
estimation [29]. As discussed, $\Lambda_{\rm imp}(t)$ can be viewed as the
variance of the measurement imprecision noise associated with the spectator’s
estimate of the environmental noise $\xi_{s}(t)$. Finding the optimal scaling
of $\Lambda_{\rm imp}(t)$ with photon number is thus analogous to minimizing a
parameter estimation error with photon number, a standard task in quantum
metrology. We make this connection explicit in what follows. We show that in
the long-time limit, given a total photon number $\bar{n}_{\rm inc}$ incident
on the signal port of the homodyne detector beamsplitter, the measurement
imprecision noise dephasing scales as $\Lambda_{\rm imp}(t)\sim 1/\bar{n}_{\rm
inc}$ in the case where $\lambda_{2}=0$ (no squeezing). This is standard
quantum limit (SQL) scaling with photon number, expected in the absence of
squeezing or entanglement. We also show that if one uses an optimal parametric
drive $\lambda_{2}$, one can improve this scaling to $\Lambda_{\rm imp}(t)\sim
1/\bar{n}_{\rm inc}^{2}$. This corresponds to Heisenberg limited scaling with
photon number.

In addition to these fundamental long-time scalings, we also discuss below the
minimization of $\Lambda_{\rm imp}(t)$ at finite evolution times
$t_{0}<\infty$, subject to experimentally relevant constraints for
$\lambda_{1}$ and $\lambda_{2}$.

###  IV.1 Heisenberg-limited scaling

In the long-time limit, the qubit is only sensitive to the zero frequency
environmental noise $\xi_{q}(t)$. Hence, noise mitigation in this limit
requires the spectator mode to effectively estimate the zero-frequency noise
it experiences with minimal error, i.e. estimate the parameter
$\xi_{s}[0]\equiv\lim_{T\to\infty}(1/T)\int_{0}^{T}dt\xi_{s}(t)$ of
$\xi_{s}(t)$ 111 The choice of a $1/T$ normalization here ensures that the
parameter $\xi_{s}[0]$ being estimated is infinitesimally small. This lets us
connect to standard quantum metrology limits (cf. App. C). As we show below,
the measurement imprecision noise dephasing in this limit, $\Lambda_{\rm
imp}(t\to\infty)$, is directly proportional to the estimation error of
$\xi_{s}[0]$.

We can make a direct analogy to the problem of optimally estimating a small
phase space rotation $\theta\ll 1$ of a single-mode squeezed displaced state.
For our setup in the long time limit, the relevant mode is the zero-frequency
output field mode of the spectator, and the rotation $\theta$ is created by
zero frequency environmental noise $\xi_{s}[0]$ (see Fig. 2(a)). The results
of this basic, single-mode parameter estimation problem are reviewed in App.
C. The optimal measurement is a homodyne measurement of the phase quadrature
of the state, and Heisenberg scaling of the estimation error with photon
number is achieved by balancing the number of squeezing photons and
displacement photons.

We now make the analogy to the single-mode parameter estimation problem
precise. The optimal estimator for the zero-frequency environmental noise
$\xi_{s}[0]$ will be proportional to the average of the integrated output-
field phase quadrature (which is also proportional to our homodyne current).
We thus introduce the zero-frequency output-field temporal mode $\hat{A}$:

$\displaystyle\hat{A}$
$\displaystyle=\frac{1}{\sqrt{T}}\int_{0}^{T}dt\,\hat{a}^{\rm out}(t),$ (41)

where we will consider the large-$T$ limit throughout. This is a standard
bosonic mode satisfying $[\hat{A},\hat{A}^{\dagger}]=1$. The expectation value
of its phase quadrature [$\hat{P}_{A}=i(\hat{A}^{\dagger}-\hat{A})/\sqrt{2}$]
is

$\displaystyle\langle\hat{P}_{A}\rangle=\frac{2\beta_{s}\sqrt{2\bar{n}_{1}\kappa_{c}T}}{1+\lambda_{2}}\frac{\xi_{s}[0]}{\kappa_{c}}.$
(42)

Hence, up to a prefactor, $\hat{P}_{A}$ will be our estimator for
$\xi_{s}[0]$, and the fluctuations in this quadrature $(\Delta
P_{A})^{2}\equiv\langle\hat{P}_{A}^{2}\rangle-\langle\hat{P}_{A}\rangle^{2}$
will determine our estimation error. In the long-time limit, this variance
just reflects the squeezing created by the parametric drive:

$\displaystyle(\Delta P_{A})^{2}$
$\displaystyle=\frac{(1-\lambda_{2})^{2}}{(1+\lambda_{2})^{2}}.$ (43)

The estimation error $\Delta\xi_{s}[0]$ of the zero frequency component
$\xi_{s}[0]$ is thus given by

$\displaystyle\Delta\xi_{s}[0]$ $\displaystyle=\frac{\Delta
P_{A}}{\left|\partial\langle\hat{P}_{A}\rangle/\partial\xi_{s}[0]\right|}=\frac{(1-\lambda_{2})\kappa_{c}}{2\beta_{s}\sqrt{2\bar{n}_{1}\kappa_{c}T}}.$
(44)

We would like to understand how this estimation error scales with the number
of photons $\bar{n}_{\rm inc}$ used to make the estimate. This is just the
average photon number of the $\hat{A}$ mode, which also coincides with the
number of photons incident on our homodyne detector during the measurement
interval $T$. We have:

$\displaystyle\bar{n}_{\rm inc}$
$\displaystyle=\langle\hat{A}^{\dagger}\hat{A}\rangle=\bar{n}_{\rm
d}+\bar{n}_{\rm s}.$ (45)

where

$\displaystyle\bar{n}_{\rm
d}=\frac{\lambda_{1}^{2}}{(1-\lambda_{2})^{2}}\kappa_{c}T,\qquad\bar{n}_{\rm
s}=\frac{4\lambda_{2}^{2}}{(1-\lambda_{2}^{2})^{2}}.$ (46)

The two terms here correspond to photons $\bar{n}_{\rm
d}=|\langle\hat{A}\rangle|^{2}$ associated with the displacement of the mode,
and photons $\bar{n}_{\rm s}$ associated with the squeezing of the mode. Note
that $\bar{n}_{\rm d}=\bar{n}_{1}\kappa_{c}T$ (cf. Eq. (7)). This is just the
average output photon flux induced by $\lambda_{1}$, $\bar{n}_{1}\kappa_{c}$,
integrated over a time $T$. We see immediately that if we do not use any
squeezing (i.e. $\lambda_{2}=0$), then $\bar{n}_{\rm inc}=\bar{n}_{\rm d}$,
and the estimation error in Eq. (44) exhibits the expected SQL scaling with
photon number, $\Delta\xi_{s}[0]\propto 1/\sqrt{\bar{n}_{\rm inc}}$.

To see how the squeezing induced by a non-zero parametric drive $\lambda_{2}$
can help us, we can re-write the above expression in terms of the photon
numbers $\bar{n}_{\rm d}$ and $\bar{n}_{\rm s}$. In the limit where all photon
numbers $\bar{n}_{\rm inc},\bar{n}_{\rm d},\bar{n}_{\rm s}\gg 1$, we have
$(1-\lambda_{2})=1/\sqrt{\bar{n}_{\rm s}}+\mathcal{O}(1/\bar{n}_{\rm s})$, and
the estimation error reduces to:

$\displaystyle\Delta\xi_{s}[0]$
$\displaystyle=\frac{\kappa_{c}}{2\beta_{s}\sqrt{2\bar{n}_{\rm d}\bar{n}_{\rm
s}}}.$ (47)

The final step is to now fix the total incident photon number $\bar{n}_{\rm
inc}$, and to minimize the estimation error over how we partition these
photons between squeezing photons $\bar{n}_{\rm s}$ and displacement photons
$\bar{n}_{\rm d}$. In complete analogy to the analysis in App. C, we find that
the optimal partition is an equal split, $\bar{n}_{\rm d}=\bar{n}_{\rm
s}=\bar{n}_{\rm inc}/2$. The resulting optimized estimation error is then

$\displaystyle\Delta\xi_{s}[0]$
$\displaystyle=\frac{\sqrt{2}\kappa_{c}}{\beta_{s}\bar{n}_{\rm inc}}.$ (48)

We obtain a scaling $1/\bar{n}_{\rm inc}$, which is Heisenberg-limited scaling
in the number of photons used for the estimation [29].

The last step here is to show that the estimation error does indeed coincide
with the measurement imprecision noise qubit dephasing $\Lambda_{\rm imp}(T)$
in the long time limit. We focus on the optimal tuning of the transduction
factor defined in Eq. (25) for noise mitigation, $\alpha_{s}=1$ (something
that can be achieved for any photon number by tuning the feedforward rate
$\gamma_{\rm ff}$). The interpretation of $\Lambda_{\rm imp}(T)$ as the
estimation error only makes sense for optimal $\alpha_{s}=1$. Using Eq. (27),
we find that in this limit, we have (for arbitrary $\bar{n}_{\rm d}$ and
$\bar{n}_{\rm s}$):

$\displaystyle\Lambda_{\rm imp}(T)$
$\displaystyle=\frac{1}{4}T^{2}\left(\Delta\xi_{s}[0]\right)^{2}.$ (49)

We see that the spectator-added noise has the same dependence on photon
numbers as the estimation error. Hence, optimizing the estimation error at
fixed $\bar{n}_{\rm inc}$ is also optimizes $\Lambda_{\rm imp}(T)$, and the
Heisenberg-limit scaling $\left(\Delta\xi_{s}[0]\right)^{2}\propto
1/\bar{n}_{\rm inc}^{2}$ is also inherited by $\Lambda_{\rm imp}(T)$ 222The
apparent $T^{2}$-dependence of $\Lambda_{\rm imp}$ here may seem strange.
However, this is simply an artifact of writing $\Lambda_{\rm imp}$ in terms of
$\bar{n}_{\rm d}$ which is implicitly $\propto T$. Holding $\bar{n}_{\rm
d}\propto\lambda_{1}^{2}\kappa_{c}T$ fixed while increasing $T$ requires
reducing the linear drive strength $\lambda_{1}$ in proportion..

###  IV.2 Optimization with fixed intracavity photon number

The potential for Heisenberg-limited scaling discussed above is interesting
from the perspective of fundamental performance limits. In App. F, we discuss
the breakdown of this Heisenberg-limited scaling caused by non-zero internal
loss in the spectator mode. While these fundamental scaling constraints
involve output photon number, from a practical perspective, a more common
constraint comes from only being able to work with a finite number of total
_intracavity_ photons. These technical limitations can arise for a variety of
reasons, e.g. nonlinear effects, heating, input power limits, or a breakdown
of the dispersive approximation. In addition, minimizing $\Lambda_{\rm
imp}(t)$ at some finite time $t_{0}$ is more important in most cases than
minimizing the asymptotic dephasing rate in the long-time limit (as we did in
the previous subsection).

Figure 6:  Optimized intracavity squeezing. The optimal fraction of
$\bar{n}_{\rm cav}$ intracavity photons applied to squeezing,
$\bar{n}_{2}/\bar{n}_{\rm cav}$, vs. target evolution time $\kappa_{c}t_{0}$
(i.e., the time $t_{0}$ at which $\Lambda_{\rm imp}(t_{0})$ is minimized) for
various $\bar{n}_{\rm cav}$. For very long times
$\kappa_{\phi}t_{0}\gg\bar{n}_{\rm cav}^{3}$, the squeezing photon number
fraction approaches the asymptotic optimal value $\frac{2}{3}\bar{n}_{\rm
cav}$ (cf. Eq. (52)). The parameters are $\alpha_{s}=1$ and $\beta_{s}=1$.

We minimize $\Lambda_{\rm imp}(t_{0})$ (cf. Eq. (26)) at a fixed target
evolution time $t_{0}<\infty$ over the partition of intracavity photon number
$\bar{n}_{\rm cav}=\bar{n}_{1}+\bar{n}_{2}$, while holding $\bar{n}_{\rm
cav}\gg 1$ fixed 333The assumption of $\bar{n}_{\rm cav}\gg 1$ is used to
identify the long-time regime in what follows; however, $\bar{n}_{\rm
cav}\gtrsim 10$ is sufficient.. The intracavity displacement photon number
$\bar{n}_{1}=|\langle\hat{a}\rangle|^{2}$ is given by Eq. (7), and the
intracavity squeezing photon number $\bar{n}_{2}$ is given by

$\bar{n}_{2}=\frac{1}{2}\frac{\lambda_{2}^{2}}{1-\lambda_{2}^{2}}.$ (50)

Recall that $\kappa_{\phi}=(1+\lambda_{2})\kappa_{c}$ is dependent on
$\bar{n}_{2}$ through $\lambda_{2}$, thus it is allowed to vary when
minimizing $\Lambda_{\rm imp}(t_{0})$. We find that there are three distinct
optimization regimes in $t_{0}$: the short-time regime $t_{0}\lesssim
1/\kappa_{c}$, the long-time regime $t_{0}\gg\bar{n}_{\rm
cav}^{2}/\kappa_{c}$, and the intermediate regime $1/\kappa_{c}\lesssim
t_{0}\lesssim\bar{n}_{\rm cav}^{2}/\kappa_{c}$.

In the extreme short-time limit $t_{0}\ll 1/\kappa_{c}$, squeezing has no
ability to reduce $\Lambda_{\rm imp}(t_{0})$ (cf. Eq. (27)). Even for
$t_{0}\lesssim 1/\kappa_{c}$, squeezing has very little ability to reduce the
added-noise dephasing because the qubit is sensitive to noise with a bandwidth
$1/t_{0}\gtrsim\kappa_{c}$ but the squeezing bandwidth is only $\kappa_{c}$.
Thus, since $\Lambda_{\rm imp}(t_{0})\propto 1/\bar{n}_{1}$, the optimal
partition is $\bar{n}_{1}\approx\bar{n}_{\rm cav}$ and $\bar{n}_{2}\approx 0$.

The long-time regime is identified by $t_{0}$ (already assumed $\gg
1/\kappa_{c}$) being sufficiently large such that the constant term of
$\Lambda_{\rm imp}(t_{0})$ is negligible compared to the linear-in-$t_{0}$
term (cf. Eq. (27)):

$\displaystyle\Lambda_{\rm
imp}(t_{0})=\frac{\alpha_{s}^{2}}{32\beta_{s}^{2}}\frac{1}{\bar{n}_{1}}\left(\frac{1}{16\bar{n}_{2}^{2}}\kappa_{c}t_{0}+4\right).$
(51)

From this we find that the constant is negligible when
$t_{0}\gg\bar{n}_{2}^{2}/\kappa_{c}\sim\bar{n}_{\rm cav}^{2}/\kappa_{c}$. This
regime has as its optimal partition

$\displaystyle\bar{n}_{2}=\frac{2}{3}\bar{n}_{\rm cav},\leavevmode\nobreak\
\leavevmode\nobreak\ \bar{n}_{1}=\frac{1}{3}\bar{n}_{\rm
cav};\quad(t_{0}\gg\bar{n}_{\rm cav}^{2}/\kappa_{c}).$ (52)

This optimal partition of _intracavity photons_ is equivalent to the partition
of photons incident on the homodyne detector ($\bar{n}_{\rm d}=\bar{n}_{\rm
s}=\bar{n}_{\rm inc}/2$ as discussed in the previous subsection) that
optimizes the Heisenberg-limited scaling of the measurement error. This
equivalence is easily shown via Eq. (46) for a target evolution time
$t_{0}=T$.

The cross-over behavior of optimal $\bar{n}_{2}$ between the limiting regimes
of $t_{0}\lesssim 1/\kappa_{c}$ and $t_{0}\gg\bar{n}_{\rm cav}^{3}/\kappa_{c}$
is shown in Fig. 6. The surprisingly small fraction of photons allocated to
squeezing in the intermediate regime might suggest that the use of squeezing
is not very effective at reducing the qubit dephasing rate. However, this is
not necessarily the case. In Fig. 1(b) we show that for $\kappa_{c}t_{0}\sim
1$, a relatively small number of intracavity squeezing photons can still
dramatically reduce the long-time qubit dephasing rate. For the optimal
$\lambda_{2}$ curve in Fig. 1(b), we minimize $\Lambda_{\rm imp}(t_{0})$ at
time $t_{0}=5/\kappa_{c}$ ($t_{0}=0.005/S_{0}$) to achieve a $\approx 10^{-2}$
reduction in the long-time dephasing rate versus $\Gamma_{0}=S_{0}/2$. Using
$\bar{n}_{\rm cav}=1000$, at $t_{0}=5/\kappa_{c}$, the optimal number of
intracavity squeezing photons is only $\bar{n}_{2}^{\star}\approx 0.6$.

##  V Conclusion

We have shown that a spectator photonic mode can harness spatial correlations
in classical dephasing noise as a resource for noise mitigation and is a
powerful generalization of the spectator qubits concept. The spectator mode
can perfectly cancel qubit dephasing due to $\xi(t)$ in the long-time limit,
and despite having a finite noise detection bandwidth, can mitigate white
noise. The multi-leveled nature of the spectator mode allows the use of many
photons to be simultaneously measured, thereby reducing the measurement
imprecision noise to arbitrarily small levels. The use of many photons in the
measurement is a significant advantage over spectator qubits which suffer the
imprecision error of single measurements. The spectator mode even offers
better than standard quantum limit scaling of the measurement imprecision
error with the number of photons: using parametric driving, we show that it
achieves Heisenberg-limited scaling. Finally, we show that even under the
constraint of a limited intracavity photon number, the use of a parametric
drive dramatically improves the performance of the spectator mode, even if
true Heisenberg-limited scaling is not achieved.

In this work we have explored the basic spectator mode system. We use a linear
measurement of the phase quadrature which necessitates neglecting higher order
corrections due to spectator mode dephasing. A more sophisticated measurement
apparatus could improve upon that, and perhaps relax the requirement for
sufficiently weak noise. Recent work in using various adaptive algorithms [30,
24] or machine learning [50, 51] has been shown to improve the performance
spectator qubits. It remains an open question whether the use of such
techniques could improve the performance of spectator modes and to what extent
there are optimal strategies for specific spectral densities or noise models
(e.g., $1/f$, telegraph, etc).

Furthermore, the generalization of the spectator qubit concept could lead to
other spectator quantum systems such as qubit or spin ensembles. The recent
experiment reported in Ref. [28] has many spectator qubits available; using
those in a coordinated way may offer some of the advantages of the spectator
mode regarding measurement imprecision. Furthermore, one could imagine that
the advantages of parametric driving to the spectator mode could be realized
in spin ensembles using spin squeezing. These are all new avenues of the
spectator quantum system concept to explore.

## Acknowledgements

This work was supported by the Army Research Office under Grant No.
W911NF-19-1-0380. AC acknowledges support from the Simons Foundation, through
a Simons Investigator award (Grant No. 669487, A. A. C.)

## References

  * Preskill [2018] J. Preskill, Quantum Computing in the NISQ era and beyond, Quantum 2, 79 (2018).
  * Arute  _et al._ [2019] F. Arute, K. Arya, R. Babbush, D. Bacon, J. C. Bardin, R. Barends, R. Biswas, S. Boixo, F. G. S. L. Brandao, D. A. Buell, B. Burkett, Y. Chen, Z. Chen, B. Chiaro, R. Collins, _et al._ , Quantum supremacy using a programmable superconducting processor, Nature 574, 505 (2019).
  * Koch  _et al._ [2020] D. Koch, B. Martin, S. Patel, L. Wessing, and P. M. Alsing, Demonstrating NISQ era challenges in algorithm design on IBM’s 20 qubit quantum computer, AIP Advances 10, 095101 (2020).
  * Shor [1995] P. W. Shor, Scheme for reducing decoherence in quantum computer memory, Phys. Rev. A 52, R2493 (1995).
  * Steane [1996] A. M. Steane, Error Correcting Codes in Quantum Theory, Phys. Rev. Lett. 77, 793 (1996).
  * Terhal [2015] B. M. Terhal, Quantum error correction for quantum memories, Rev. Mod. Phys. 87, 307 (2015).
  * Klesse and Frank [2005] R. Klesse and S. Frank, Quantum Error Correction in Spatially Correlated Quantum Noise, Phys. Rev. Lett. 95, 230503 (2005).
  * Clader  _et al._ [2021] B. D. Clader, C. J. Trout, J. P. Barnes, K. Schultz, G. Quiroz, and P. Titum, Impact of correlations and heavy tails on quantum error correction, Phys. Rev. A 103, 052428 (2021).
  * Clemens  _et al._ [2004] J. P. Clemens, S. Siddiqui, and J. Gea-Banacloche, Quantum error correction against correlated noise, Phys. Rev. A 69, 062313 (2004).
  * Terhal and Burkard [2005] B. M. Terhal and G. Burkard, Fault-tolerant quantum computation for local non-Markovian noise, Phys. Rev. A 71, 012336 (2005).
  * Aharonov  _et al._ [2006] D. Aharonov, A. Kitaev, and J. Preskill, Fault-Tolerant Quantum Computation with Long-Range Correlated Noise, Phys. Rev. Lett. 96, 050504 (2006).
  * Viola and Lloyd [1998] L. Viola and S. Lloyd, Dynamical suppression of decoherence in two-state quantum systems, Phys. Rev. A 58, 2733 (1998).
  * Viola  _et al._ [1999] L. Viola, E. Knill, and S. Lloyd, Dynamical Decoupling of Open Quantum Systems, Phys. Rev. Lett. 82, 2417 (1999).
  * Uhrig [2007] G. S. Uhrig, Keeping a Quantum Bit Alive by Optimized $\pi$ -Pulse Sequences, Phys. Rev. Lett. 98, 100504 (2007).
  * Cywiński  _et al._ [2008] Ł. Cywiński, R. M. Lutchyn, C. P. Nave, and S. Das Sarma, How to enhance dephasing time in superconducting qubits, Phys. Rev. B 77, 174509 (2008).
  * Uhrig [2008] G. S. Uhrig, Exact results on dynamical decoupling by $\pi$ pulses in quantum information processes, New J. Phys. 10, 083024 (2008).
  * Medford  _et al._ [2012] J. Medford, Ł. Cywiński, C. Barthel, C. M. Marcus, M. P. Hanson, and A. C. Gossard, Scaling of Dynamical Decoupling for Spin Qubits, Phys. Rev. Lett. 108, 086802 (2012).
  * Zhang  _et al._ [2014a] J. Zhang, A. M. Souza, F. D. Brandao, and D. Suter, Protected Quantum Computing: Interleaving Gate Operations with Dynamical Decoupling Sequences, Phys. Rev. Lett. 112, 050502 (2014a).
  * Chwalla  _et al._ [2007] M. Chwalla, K. Kim, T. Monz, P. Schindler, M. Riebe, C. Roos, and R. Blatt, Precision spectroscopy with two correlated atoms, Appl. Phys. B 89, 483 (2007).
  * 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).
  * Schindler  _et al._ [2011] P. Schindler, J. T. Barreiro, T. Monz, V. Nebendahl, D. Nigg, M. Chwalla, M. Hennrich, and R. Blatt, Experimental Repetitive Quantum Error Correction, Science 332, 1059 (2011).
  * Harper  _et al._ [2020] R. Harper, S. T. Flammia, and J. J. Wallman, Efficient learning of quantum noise, Nat. Phys. 16, 1184 (2020).
  * Wilen  _et al._ [2021] C. D. Wilen, S. Abdullah, N. A. Kurinsky, C. Stanford, L. Cardani, G. D’Imperio, C. Tomei, L. Faoro, L. B. Ioffe, C. H. Liu, A. Opremcak, B. G. Christensen, J. L. DuBois, and R. McDermott, Correlated charge noise and relaxation errors in superconducting qubits, Nature 594, 369 (2021).
  * Gupta  _et al._ [2020a] R. S. Gupta, C. L. Edmunds, A. R. Milne, C. Hempel, and M. J. Biercuk, Adaptive characterization of spatially inhomogeneous fields and errors in qubit registers, npj Quantum Inf 6, 1 (2020a).
  * Gupta  _et al._ [2020b] R. S. Gupta, L. C. G. Govia, and M. J. Biercuk, Integration of spectator qubits into quantum computer architectures for hardware tune-up and calibration, Phys. Rev. A 102, 042611 (2020b).
  * Majumder  _et al._ [2020] S. Majumder, L. Andreta de Castro, and K. R. Brown, Real-time calibration with spectator qubits, npj Quantum Information 6, 1 (2020).
  * Song  _et al._ [2022] H. Song, A. Chantasri, B. Tonekaboni, and H. M. Wiseman, Optimal mitigation of random-telegraph-noise dephasing by spectator-qubit sensing and control (2022), arXiv:2205.12567 [cond-mat, physics:quant-ph] .
  * Singh  _et al._ [2022] K. Singh, C. E. Bradley, S. Anand, V. Ramesh, R. White, and H. Bernien, Mid-circuit correction of correlated phase errors using an array of spectator qubits (2022), arXiv:2208.11716 [cond-mat, physics:physics, physics:quant-ph] .
  * Giovannetti  _et al._ [2004] V. Giovannetti, S. Lloyd, and L. Maccone, Quantum-Enhanced Measurements: Beating the Standard Quantum Limit, Science 306, 1330 (2004).
  * Wiseman and Milburn [2009] H. M. Wiseman and G. J. Milburn,  _Quantum Measurement and Control_ (Cambridge University Press, Cambridge, 2009).
  * Hofmann  _et al._ [1998] H. F. Hofmann, G. Mahler, and O. Hess, Quantum control of atomic systems by homodyne detection and feedback, Phys. Rev. A 57, 4877 (1998).
  * Korotkov [2001] A. N. Korotkov, Selective quantum evolution of a qubit state due to continuous measurement, Phys. Rev. B 63, 115403 (2001).
  * Gillett  _et al._ [2010] G. G. Gillett, R. B. Dalton, B. P. Lanyon, M. P. Almeida, M. Barbieri, G. J. Pryde, J. L. O’Brien, K. J. Resch, S. D. Bartlett, and A. G. White, Experimental Feedback Control of Quantum Systems Using Weak Measurements, Phys. Rev. Lett. 104, 080503 (2010).
  * Vijay  _et al._ [2012] R. Vijay, C. Macklin, D. H. Slichter, S. J. Weber, K. W. Murch, R. Naik, A. N. Korotkov, and I. Siddiqi, Stabilizing Rabi oscillations in a superconducting qubit using quantum feedback, Nature 490, 77 (2012).
  * Metelmann and Clerk [2017] A. Metelmann and A. A. Clerk, Nonreciprocal quantum interactions and devices via autonomous feedforward, Physical Review A 95, 10.1103/PhysRevA.95.013837 (2017).
  * Levitan [2016] B. Levitan,  _Dispersive qubit measurement using an on-chip parametric amplifer_ , Ph.D. thesis, McGill University (2016).
  * Peano  _et al._ [2015] V. Peano, H. G. L. Schwefel, C. Marquardt, and F. Marquardt, Intracavity Squeezing Can Enhance Quantum-Limited Optomechanical Position Detection through Deamplification, Phys. Rev. Lett. 115, 243603 (2015).
  * Korobko  _et al._ [2017] M. Korobko, L. Kleybolte, S. Ast, H. Miao, Y. Chen, and R. Schnabel, Beating the Standard Sensitivity-Bandwidth Limit of Cavity-Enhanced Interferometers with Internal Squeezed-Light Generation, Phys. Rev. Lett. 118, 143601 (2017).
  * Eddins  _et al._ [2019] A. Eddins, J. M. Kreikebaum, D. M. Toyli, E. M. Levenson-Falk, A. Dove, W. P. Livingston, B. A. Levitan, L. C. G. Govia, A. A. Clerk, and I. Siddiqi, High-Efficiency Measurement of an Artificial Atom Embedded in a Parametric Amplifier, Phys. Rev. X 9, 011004 (2019).
  * Zhang  _et al._ [2003] T. C. Zhang, K. W. Goh, C. W. Chou, P. Lodahl, and H. J. Kimble, Quantum teleportation of light beams, Phys. Rev. A 67, 033802 (2003).
  * Aoki  _et al._ [2006] T. Aoki, G. Takahashi, and A. Furusawa, Squeezing at 946nm with periodically poled KTiOPO4, Opt. Express, OE 14, 6930 (2006).
  * Oelker  _et al._ [2016] E. Oelker, G. Mansell, M. Tse, J. Miller, F. Matichard, L. Barsotti, P. Fritschel, D. E. McClelland, M. Evans, and N. Mavalvala, Ultra-low phase noise squeezed vacuum source for gravitational wave detectors, Optica, OPTICA 3, 682 (2016).
  * Scully and Zubairy [1997] M. O. Scully and M. S. Zubairy,  _Quantum Optics_ (Cambridge University Press, Cambridge, 1997).
  * Gerry and Knight [2004] C. Gerry and P. Knight,  _Introductory Quantum Optics_ (Cambridge University Press, Cambridge, 2004).
  * Biercuk  _et al._ [2011] M. J. Biercuk, A. C. Doherty, and H. Uys, Dynamical decoupling sequence construction as a filter-design problem, J. Phys. B: At. Mol. Opt. Phys. 44, 154002 (2011).
  * Suter and Álvarez [2016] D. Suter and G. A. Álvarez, Colloquium: Protecting quantum information against environmental noise, Rev. Mod. Phys. 88, 041001 (2016).
  * Note [1] The choice of a $1/T$ normalization here ensures that the parameter $\xi_{s}[0]$ being estimated is infinitesimally small. This lets us connect to standard quantum metrology limits (cf. App. C).
  * Note [2] The apparent $T^{2}$-dependence of $\Lambda_{\rm imp}$ here may seem strange. However, this is simply an artifact of writing $\Lambda_{\rm imp}$ in terms of $\mathaccentV{bar}016{n}_{\rm d}$ which is implicitly $\propto T$. Holding $\mathaccentV{bar}016{n}_{\rm d}\propto\lambda_{1}^{2}\kappa_{c}T$ fixed while increasing $T$ requires reducing the linear drive strength $\lambda_{1}$ in proportion.
  * Note [3] The assumption of $\mathaccentV{bar}016{n}_{\rm cav}\gg 1$ is used to identify the long-time regime in what follows; however, $\mathaccentV{bar}016{n}_{\rm cav}\gtrsim 10$ is sufficient.
  * Gupta and Biercuk [2018] R. S. Gupta and M. J. Biercuk, Machine Learning for Predictive Estimation of Qubit Dynamics Subject to Dephasing, Phys. Rev. Applied 9, 064042 (2018).
  * Mavadia  _et al._ [2017] S. Mavadia, V. Frey, J. Sastrawan, S. Dona, and M. J. Biercuk, Prediction and real-time compensation of qubit decoherence via machine learning, Nature Communications 8, 14106 (2017).
  * Clerk and Utami [2007] A. A. Clerk and D. W. Utami, Using a qubit to measure photon-number statistics of a driven thermal oscillator, Phys. Rev. A 75, 042302 (2007).
  * Zhang  _et al._ [2014b] Y. Zhang, J. Moser, J. Güttinger, A. Bachtold, and M. I. Dykman, Interplay of Driving and Frequency Noise in the Spectra of Vibrational Systems, Phys. Rev. Lett. 113, 255502 (2014b).
  * Zhang and Dykman [2015] Y. Zhang and M. I. Dykman, Spectral effects of dispersive mode coupling in driven mesoscopic systems, Phys. Rev. B 92, 165419 (2015).
  * Metelmann and Clerk [2015] A. Metelmann and A. A. Clerk, Nonreciprocal Photon Transmission and Amplification via Reservoir Engineering, Physical Review X 5, 10.1103/PhysRevX.5.021025 (2015).
  * Kerman [2013] A. J. Kerman, Quantum information processing using quasiclassical electromagnetic interactions between qubits and electrical resonators, New J. Phys. 15, 123011 (2013).
  * Billangeon  _et al._ [2015] P.-M. Billangeon, J. S. Tsai, and Y. Nakamura, Circuit-QED-based scalable architectures for quantum information processing with superconducting qubits, Phys. Rev. B 91, 094517 (2015).
  * Didier  _et al._ [2015] N. Didier, J. Bourassa, and A. Blais, Fast Quantum Nondemolition Readout by Parametric Modulation of Longitudinal Qubit-Oscillator Interaction, Phys. Rev. Lett. 115, 203601 (2015).
  * Eichler and Petta [2018] C. Eichler and J. R. Petta, Realizing a Circuit Analog of an Optomechanical System with Longitudinally Coupled Superconducting Resonators, Phys. Rev. Lett. 120, 227702 (2018).
  * Touzard  _et al._ [2019] S. Touzard, A. Kou, N. E. Frattini, V. V. Sivak, S. Puri, A. Grimm, L. Frunzio, S. Shankar, and M. H. Devoret, Gated Conditional Displacement Readout of Superconducting Qubits, Phys. Rev. Lett. 122, 080502 (2019).

##  Appendix A Derivation of accumulated phase and measurement imprecision
noise dephasing

In this appendix we derive the accumulated phase $\phi_{[\xi]}(t)$ and
measurement imprecision noise dephasing $\Lambda_{\rm imp}(t)$ starting from
the master equation for $\hat{\rho}_{[\xi]}(t)$, Eq. (16). For the analysis in
App. B on the linear noise drive approximation, we retain the residual phase
noise term in Eq. (8):

$\displaystyle\hat{H}_{{\rm spec},[\xi]}^{\prime}(t)$
$\displaystyle=\epsilon\beta_{s}\xi_{s}(t)\hat{d}^{\dagger}\hat{d}+\beta_{s}\xi_{s}(t)\sqrt{\bar{n}_{1}}(\hat{d}+\hat{d}^{\dagger})$
(53)
$\displaystyle-\frac{i\kappa_{c}\lambda_{2}}{4}(\hat{d}^{2}-\hat{d}^{\dagger
2}).$

To differentiate phase noise terms from the quadrature noise, we include a
bookkeeping prefactor $\epsilon$ in the phase noise terms. The full
Hamiltonian has $\epsilon=1$ and the linear noise drive approximation Eq. (12)
has $\epsilon=0$.

In writing Eq. (16) for $\hat{\rho}_{[\xi]}(t)$, we have assumed that the
measurement and feedforward is running at all times. Instead, the anticipated
operation would have the feedforward turned off and the spectator mode in
steady state at the start of the experiment. At a definite time $t=0$, i.e.,
the start of the experiment, the qubit has a known coherence
$\rho_{\uparrow\downarrow}(0)$, thus we neglect all qubit dynamics for $t<0$
by modifying Eq. (1) to

$\displaystyle\hat{H}_{q,[\xi]}(t)$
$\displaystyle=\frac{1}{2}\xi_{q}(t)\hat{\sigma}_{z}\theta(t),$ (54)

where $\theta(t)$ is the step function. To implement the turn-on of the
feedforward in the master equation at $t=0$, we modify Eqs. (17) and (18)

$\displaystyle\hat{H}_{\mathrm{int}}(t)$
$\displaystyle=\frac{1}{2i}\sqrt{\gamma_{\rm
ff}\kappa_{c}}\left(\hat{d}-\hat{d}^{\dagger}\right)\hat{\sigma}_{z}\theta(t),$
(55) $\displaystyle\hat{L}(t)$
$\displaystyle=\sqrt{\kappa_{c}}\hat{d}+\sqrt{\gamma_{\rm
ff}}\hat{\sigma}_{z}\theta(t).$ (56)

For $t<0$, the master equation simply describes a damped, driven oscillator
dispersively coupled to the environmental noise.

With the above refinement in hand, we now find the deformed master equation of
the coherence operator [52],

$\displaystyle\hat{\rho}_{\uparrow\downarrow,[\xi]}(t)\equiv\langle\uparrow\rvert\hat{\rho}_{[\xi]}(t)\lvert\downarrow\rangle.$
(57)

The equation of motion for the coherence operator is (dropping its explicit
$t$-dependence and $[\xi]$ subscript for clarity)

$\displaystyle\frac{d}{dt}$
$\displaystyle\hat{\rho}_{\uparrow\downarrow}=-i[\hat{H}_{s},\hat{\rho}_{\uparrow\downarrow}]+\kappa_{c}\mathcal{D}[\hat{d}]\hat{\rho}_{\uparrow\downarrow}$
(58) $\displaystyle-\theta(t)\left[2\sqrt{\kappa_{c}\gamma_{\rm
ff}}(\hat{d}\hat{\rho}_{\uparrow\downarrow}-\hat{\rho}_{\uparrow\downarrow}\hat{d}^{\dagger})+2\gamma_{\rm
ff}\hat{\rho}_{\uparrow\downarrow}-i\xi_{q}(t)\hat{\rho}_{\uparrow\downarrow}\right]$

We represent $\hat{\rho}_{\uparrow\downarrow,[\xi]}(t)$ by its Wigner function
$W_{[\xi]}(x,p;t)$ via

$\displaystyle W_{[\xi]}(x,p;t)$ $\displaystyle=\frac{1}{\pi}\int
dye^{-2ipy}\langle x+y|\hat{\rho}_{\uparrow\downarrow,[\xi]}(t)|x-y\rangle$
(59)

where $|x\rangle$ are the amplitude quadrature eigenstates,
$\hat{X}|x\rangle=x|x\rangle$. We thus derive the equation of motion for
$W_{[\xi]}(x,p;t)$:

$\displaystyle\partial_{t}W_{[\xi]}(x,p;t)=$
$\displaystyle\left[\epsilon\beta_{s}\xi_{s}(t)\left(x\partial_{p}-p\partial_{x}\right)+\beta_{s}\xi_{s}(t)\sqrt{2\bar{n}_{1}}\partial_{p}+\frac{\kappa_{c}}{2}\left(\partial_{x}x+\partial_{p}p+\frac{1}{2}\partial_{p}^{2}+\frac{1}{2}\partial_{x}^{2}\right)\right.$
(60) $\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\
\left.\vphantom{\int}+\frac{\kappa_{c}}{2}\lambda_{2}\left(\partial_{p}p-\partial_{x}x\right)-i\xi_{q}(t)\theta(t)-i\sqrt{2\kappa_{c}\gamma_{\rm
ff}}\left(\partial_{p}+2p\right)\theta(t)-2\gamma_{\rm
ff}\theta(t)\right]W_{[\xi]}(x,p;t).$

This deformed Fokker-Planck equation is at most quadratic in $x$, $p$, and
their derivatives, as expected because the original master equation is at most
quadratic in $\hat{d},\hat{d}^{\dagger}$. Thus for a Gaussian initial
condition of the spectator, the Wigner function is Gaussian for all times.

We introduce the Fourier-transformed Wigner function via

$\displaystyle
W(x,p;t)=\int\frac{dk}{2\pi}\int\frac{dq}{2\pi}e^{ikx+iqp}W[k,q;t],$ (61)

for which the Gaussian ansatz is given by

$\displaystyle\frac{W[k,q;t]}{W[0,0;0]}$
$\displaystyle=\exp\left[-i\nu(t)+ik\bar{x}(t)+iq\bar{p}(t)\right]$ (62)
$\displaystyle\times\exp\left[-\frac{1}{2}\\{k^{2}\sigma_{x}(t)+q^{2}\sigma_{p}(t)\\}-kq\sigma_{xp}(t)\right].$

Here the Gaussian parameters are: the quadrature means
$\bar{x}(t),\bar{p}(t)$, the covariances $\sigma_{x}(t)$, $\sigma_{p}(t)$, and
$\sigma_{xp}(t)$, and finally the overall phase $\nu(t)$ which yields the
stochastic qubit coherence:

$\displaystyle\rho_{\uparrow\downarrow,[\xi]}(t)=\mathrm{tr}_{s}[\hat{\rho}_{\uparrow\downarrow,[\xi]}(t)]=\int
dxdpW_{[\xi]}(x,p;t)=e^{-i\nu(t)}.$ (63)

In general $\nu(t)$ is complex-valued; the real part is a true accumulated
phase, and the imaginary part is the mean loss of coherence due to the quantum
average over measurement outcomes implicit in the unconditional master
equation. We thus identify the real and imaginary parts of $\nu(t)$ with the
accumulated phase $\phi_{[\xi]}(t)$ and the measurement imprecision noise
decoherence $\Lambda_{\rm imp}(t)$ (cf. Eqs.(24) and (26)):

$\displaystyle\phi_{[\xi]}(t)$
$\displaystyle\equiv\mathrm{Re}[\nu(t)];\quad\Lambda_{\rm
imp}(t)\equiv-\mathrm{Im}[\nu(t)].$ (64)

After substituting the Gaussian ansatz in Eq. (60) and matching Fourier
coefficients, we find

$\displaystyle\partial_{t}\nu(t)=$
$\displaystyle\left[-\xi_{q}(t)+2\sqrt{2\kappa_{c}\gamma_{\rm
ff}}\bar{p}(t)+2i\gamma_{\rm ff}\right]\theta(t),$ (65)
$\displaystyle\partial_{t}\bar{x}(t)=$
$\displaystyle-\frac{\kappa_{a}}{2}\bar{x}(t)+\epsilon\beta_{s}\xi_{s}(t)\bar{p}(t)$
(66) $\displaystyle+2i\sqrt{2\kappa_{c}\gamma_{\rm
ff}}\sigma_{xp}(t)\theta(t),$ $\displaystyle\partial_{t}\bar{p}(t)=$
$\displaystyle-\frac{\kappa_{\phi}}{2}\bar{p}(t)-\epsilon\beta_{s}\xi_{s}(t)\bar{x}(t)+\sqrt{2\bar{n}_{1}}\beta_{s}\xi_{s}(t)$
(67) $\displaystyle+i\sqrt{2\kappa_{c}\gamma_{\rm
ff}}\left[2\sigma_{p}(t)-1\right]\theta(t),$
$\displaystyle\partial_{t}\sigma_{x}(t)=$
$\displaystyle-\kappa_{a}\sigma_{x}(t)+\frac{\kappa_{c}}{2}+2\epsilon\beta_{s}\xi_{s}(t)\sigma_{xp}(t),$
(68) $\displaystyle\partial_{t}\sigma_{p}(t)=$
$\displaystyle-\kappa_{\phi}\sigma_{p}(t)+\frac{\kappa_{c}}{2}-2\epsilon\beta_{s}\xi_{s}(t)\sigma_{xp}(t),$
(69) $\displaystyle\partial_{t}\sigma_{xp}(t)=$
$\displaystyle-\kappa_{c}\sigma_{xp}(t)+\epsilon\beta_{s}\xi_{s}(t)\left[\sigma_{p}(t)-\sigma_{x}(t)\right],$
(70)

where $\kappa_{\phi}=\kappa_{c}(1+\lambda_{1})$ (cf. Eq. (6)) and
$\kappa_{a}=\kappa_{c}(1-\lambda_{2})$ is the amplitude quadrature damping
rate. The overall phase $\nu(t)$ has three contributions: the direct
environmental noise $\xi_{q}(t)$, the added noise from the homodyne current
$\propto\gamma_{\rm ff}$, and the signal in the homodyne current
$\propto\bar{p}(t)$ containing both the environmental and added quantum
noises.

Making the linear noise drive approximation (by setting $\epsilon=0$), we find
the overall phase $\nu(t)$:

$\displaystyle\nu$ $\displaystyle(t)=$ (71)
$\displaystyle\int_{0}^{t}dt^{\prime}\left[\xi_{q}(t^{\prime})-\frac{\kappa_{\phi}}{2}\alpha_{s}\int_{-\infty}^{t^{\prime}}dse^{-\kappa_{\phi}(t^{\prime}-s)/2}\xi_{s}(s)\right]$
$\displaystyle-\frac{2i\gamma_{\rm
ff}}{(1+\lambda_{2})^{2}}\left[(1-\lambda_{2})^{2}t+\frac{8\lambda_{2}}{\kappa_{\phi}}\left(1-e^{-\kappa_{\phi}t/2}\right)\right].$

We immediately read off the real part of $\nu(t)$ as Eq. (24), and the
imaginary part of $\nu(t)$ as Eq. (26), upon replacement of $\gamma_{\rm ff}$
using Eq. (25).

##  Appendix B Linear noise drive approximation

We analyze here the effects of the unwanted displaced-frame residual phase
noise term $\beta_{s}\xi_{s}(t)\hat{d}^{\dagger}\hat{d}$ (c.f. Eq. (8)), and
derive Eqs. (10) and (11) that determine when it is valid to drop this
interaction. We also derive an approximate expression that describes the small
amount of extra qubit dephasing that would result from retaining the residual
phase noise coupling, and confirm via explicit numerical simulations its
validity.

###  B.1 Effect of phase noise without squeezing

We start with Eqs. (65)-(70) with $\epsilon=1$, so as to retain the phase
noise terms. Generically, these equations are not analytically solvable for
nonzero squeezing ($\lambda_{2}\neq 0$). We discuss the interplay of phase
noise and squeezing below. For now, we let $\lambda_{2}=0$ which sets
$\kappa_{\phi}=\kappa_{a}=\kappa_{c}$ in Eqs. (65)-(70). With one decay rate
for both quadratures, the equations are solvable. The overall complex qubit
phase is thus given by

$\displaystyle\nu(t)=-2i\gamma_{\rm ff}t$ (72)
$\displaystyle+\int_{0}^{t}\\!\\!dt^{\prime}\left[\xi_{q}(t^{\prime})-\frac{\kappa_{c}}{2}\alpha_{s}\int_{-\infty}^{t^{\prime}}\\!\\!\\!\\!\\!\\!dse^{-\frac{\kappa_{c}}{2}(t^{\prime}-s)}\xi_{s}(s)\cos\psi(t^{\prime},s)\right]$

where $\psi(t^{\prime},s)$ is the accumulated phase due to the displaced-frame
residual phase noise:

$\displaystyle\psi(t^{\prime},s)\equiv\epsilon\beta_{s}\int_{s}^{t^{\prime}}d\tau\xi_{s}(\tau).$
(73)

From this we see that making the linear noise drive approximation (setting
$\epsilon=0$) amounts to assuming $\psi(t,s)=0$ (cf. the real part of Eq. (72)
vs. the real part of Eq. (71)).

This exact closed-form expression for the accumulated phase
$\phi_{[\xi]}(t)=\mathrm{Re}[\nu(t)]$ is a remarkably simple extension of Eq.
(24). Unfortunately, it makes $\phi_{[\xi]}(t)$ a nonlinear function of
$\xi_{s}(t)$, making analytic classical stochastic averaging challenging.
While perturbative approaches to this problem are possible (see e.g. Refs.
[53, 54]), we consider a more heuristic approach.

We want to find conditions where it is safe to neglect the unwanted frequency
noise, i.e. approximate the phase $\psi(t^{\prime},s)\simeq 0$. Note crucially
that from Eq. (72), contributions from this phase are exponentially suppressed
if $t^{\prime}-s>1/\kappa_{c}$: the cavity only experiences this phase
diffusion over a limited time window $\sim 1/\kappa_{c}$. This observation
then motivates the following heuristic condition: the effect of frequency
noise (in the displaced frame) can be neglected as long as the RMS value of
$\psi(t^{\prime},s)$ is small on timescales $t^{\prime}-s\sim 1/\kappa_{c}$,
i.e.

$\displaystyle
1-\overline{\cos\psi(1/\kappa_{c},0)}\approx\frac{1}{2}\overline{\psi(1/\kappa_{c},0)^{2}}\ll
1$ (74)

Computing the variance of $\psi(1/\kappa_{c},0)$ in terms of the noise
spectral density, the condition of Eq. (74) becomes

$\displaystyle\frac{1}{2}\beta_{s}^{2}\int\frac{d\omega}{2\pi}\frac{S[\omega]}{\omega^{2}}|Y_{\rm
fid}(\omega,1/\kappa_{c})|^{2}\ll 1,$ (75)

where $Y_{\rm fid}(\omega,\tau)$ is the free induction decay filter function
in Eq. (22). Substituting for $Y_{\rm fid}(t)$, this becomes Eq. (10).

###  B.2 Estimate of residual decoherence without squeezing

Because the expression Eq. (24) for the accumulated qubit phase
$\phi_{[\xi]}(t)$ is an approximation, the perfect noise cancellation that can
be achieved for optimal $\alpha_{s}=1$ is only approximately true. Here we
seek an estimate of the additional small qubit dephasing that will arises from
the displaced-frame residual phase noise, Eq. (9). We again focus on the no
squeezing case, $\lambda_{2}=0$, and assume that the spectral density always
satisfies Eq. (10) for a given $\kappa_{c}$.

In Eq. (72), whose real part is $\phi_{[\xi]}(t)$, the $\propto\alpha_{s}$
term will typically be suppressed by the phase noise. Following the argument
above, a nonzero RMS value of $\psi(1/\kappa_{c},0)$ results in
$\overline{\cos\psi(1/\kappa_{c},0)}<1$, thereby effectively renormalizing
$\alpha_{s}$ to $\tilde{\alpha}_{s}<\alpha_{s}$. We equate the renormalized
linear-in-$\xi_{s}(t)$ qubit phase accumulation (with transduction strength
$\tilde{\alpha}_{s}$) to the full qubit phase accumulation with the RMS-
averaged phase $\psi(1/\kappa_{c},0)$:

$\displaystyle\tilde{\alpha}_{s}\approx\alpha_{s}\overline{\cos\psi(1/\kappa_{c},0)}$
(76)

This renormalization effect suggests a simple mitigation strategy: to
optimally cancel long-time qubit dephasing, one should increase $\alpha_{s}$
above one, so that the renormalized parameter $\tilde{\alpha}_{s}=1$. In
practice, this tuning would happen naturally if one adjusted the experimental
parameters that control $\alpha_{s}$ to minimize the long-time dephasing. This
suggests that our general strategy can be effective even in regimes where the
leading effects of the residual displaced-frame phase noise contribute.

In what follows, we will use Eq. (76) to test whether our approximate
treatment of the residual phase noise is indeed accurate. If $\alpha_{s}=1$,
then the renormalization in Eq. (76) will lead to a small amount of extra
dephasing. Using Eq. (35) the long-time qubit dephasing is now given by

$\displaystyle\chi(t\to\infty)$
$\displaystyle=\frac{1}{2}\left[\beta_{s}^{2}\int\frac{d\omega}{2\pi}\frac{S[\omega]}{\omega^{2}}|Y_{\rm
fid}(\omega,1/\kappa_{c})|^{2}\right]S[0]t$ $\displaystyle+\Lambda_{\rm
imp}(t)+\chi_{\rm init}(\infty)$ (77)

where the first term is our estimate for the extra dephasing from cavity phase
noise (expanded to lowest order in the noise). We see that this extra
dephasing is suppressed over the bare dephasing $\Gamma_{0}=S[0]/2$ by the LHS
of Eq. (10):

$\displaystyle\frac{\Gamma_{\rm
res}}{\Gamma_{0}}\approx\left[\beta_{s}^{2}\int\frac{d\omega}{2\pi}\frac{S[\omega]}{\omega^{2}}|Y_{\rm
fid}(\omega,1/\kappa_{c})|^{2}\right]\ll 1.$ (78)

In the next subsection, we will text this approximation against numerically-
exact stochastic averaging, showing a good agreement. This shows that our
approximate treatment of the residual displaced-frame phase noise is valid.

###  B.3 Numerical verification of linear noise drive approximation

To check the validity of the linear noise drive approximation, we numerically
compute the qubit coherence function under the full spectator Hamiltonian Eq.
$\eqref{eq:Hspecprime}$ using generated noise time series and averaging over
the noise realizations. We numerically integrate Eqs. (65)-(70) for the
Gaussian parameters and neglect the quantum effects (i.e., the imaginary
parts).

Neglecting squeezing ($\lambda_{2}=0$) to simplify the numerical integration,
we compare the numerically computed dephasing function $\chi_{\rm n}(t)$ to
the analytic expression Eq. (29) calculated under the linear noise drive
approximation. We consider Lorentzian noise

$\displaystyle S[\omega]=S_{0}(\gamma^{2}/4)/(\omega^{2}+\gamma^{2}/4)$ (79)

of moderate to large bandwidth $\gamma\geq\kappa_{c}$ and varying zero-
frequency noise strengths $10^{-3}\leq S_{0}/\kappa_{c}\leq 10^{-1}$.

We average over $10^{5}$ noise realizations for each numerically integrated
$\chi_{\rm n}(t)$. We verify convergence of the numerical simulations by also
numerically integrating the linear noise drive approximation decoherence
functions at each parameter choice and comparing with the analytic
expressions. To compare the approximation with the full spectator dynamics, we
compute a residual dephasing function

$\displaystyle\chi_{\rm res}(t)=\chi_{\rm n}(t)-\chi(t),$ (80)

where $\chi(t)$ is the analytic expression Eq. (29), neglecting $\Lambda_{\rm
imp}(t)$. This is compared with the estimated linear residual dephasing with
rate $\Gamma_{\rm res}$ given by Eq. (78). The results are shown in Fig. 7
where we plot the ratio $\chi_{\rm res}(t)/(\Gamma_{\rm res}t)$ as a function
of time. We see that Eq. (78) is a good order-of-magnitude estimate of the
residual long-time dephasing rate.

Figure 7:  Numerical verification of the linear noise drive approximation. The
ratio of residual dephasing due to the residual phase noise $\chi_{\rm
res}(t)$ (cf. Eq. (80)) to the estimated residual linear dephasing (rate
$\Gamma_{\rm res}$, cf. Eq. (78)) vs. time. Here we consider Lorentzian noise
of indicated zero-frequency strengths $S_{0}=S[0]$ (this is the relevant small
parameter which should satisfy $S_{0}/\kappa_{c}\ll 1$). Each plot shows a
different noise bandwidth $\gamma$, as indicated. We see that, after some
initial nonlinear residual dephasing, the linear rate estimate Eq. (78) is a
reasonable estimate of the residual dephasing, validating the linear noise
drive approximation. Here we take $\beta_{s}=1$ and $\lambda_{2}=0$. The
linear drive strength $\lambda_{1}$ is irrelevant.

###  B.4 Effects of phase noise with squeezing

The interplay between classical residual phase noise (c.f. Eq. (9)) and
squeezing places further constraints on the operating regime of the spectator
mode beyond Eq. (75). This is due to the random mixing of canonical squeezed
and amplified quadratures by the phase noise. Generically, the Gaussian
parameter equations of motion (cf. Eqs. (65)-(70)) are not solvable in closed
form when the spectator mode is parametrically driven, $\lambda_{2}\neq 0$.
However, following Refs. [40, 41, 42], we obtain the following heuristic
estimate for how much the phase noise degrades the squeezing.

The phase noise generates an RMS average rotation of phase space by angle
$\theta_{\rm rms}$, thus rotating the maximally-amplified amplitude quadrature
($X$) fluctuations into the maximally-squeezed phase quadrature ($P$):

$\displaystyle(\Delta P)^{2}=(\Delta P^{(0)})^{2}\cos^{2}\theta_{\rm
rms}+(\Delta X^{(0)})^{2}\sin^{2}\theta_{\rm rms}$ (81)

The unperturbed quadrature fluctuation levels are $\Delta
P^{(0)}=(1-\lambda_{2})/(1+\lambda_{2})$ and $\Delta
X^{(0)}=(1+\lambda_{2})/(1-\lambda_{2})$. Because of this quadrature mixing, a
non-zero $\theta_{\rm rms}$ sets a limit to the maximum amount of squeezing
that can be used. By minimizing $(\Delta P)^{2}$ with respect to
$\lambda_{2}$, the optimal parametric drive (i.e. squeezing strength) is
determined by:

$\displaystyle\frac{(1-\lambda_{2})^{4}}{(1+\lambda_{2})^{4}}=\theta_{\rm
rms}^{2}.$ (82)

Applying more squeezing than this limit increases $(\Delta P)^{2}$. To be
safe, we want to err on the side of using less than the optimal amount of
squeezing. We thus use the following (heuristic) constraint (obtained by
bounding the denominator on the RHS above by its maximum value):

$\displaystyle(1-\lambda_{2})^{4}\gtrsim 16\theta_{\rm rms}^{2},$ (83)

The mean rotation angle $\theta_{\rm rms}$ is set by the RMS-averaged
accumulated phase space rotation over the lifetime of the spectator mode
$1/\kappa_{c}$:

$\displaystyle\theta_{\rm
rms}^{2}=\overline{\left[\phi(t)\right]^{2}};\qquad\phi(t)=\int_{0}^{1/\kappa_{c}}dt\beta_{s}\xi_{s}(t).$
(84)

For Gaussian noise the limit on squeezing is thus

$\displaystyle(1-\lambda_{2})^{4}\gtrsim
16\beta_{s}^{2}\int\frac{d\omega}{2\pi}\frac{S[\omega]}{\omega^{2}}\sin^{2}(\omega/2\kappa_{c}).$
(85)

To check whether this condition is indeed sufficient, we consider the limit of
quasistatic noise, where we can perform exact calculations. In this case,
$\xi_{s}(t)=\xi_{s}$, a Gaussian random variable with variance $\sigma^{2}$.
The Gaussian parameter equations of motion are exactly solvable. It can be
shown that the most stringent limit on squeezing is set by the increased
measurement imprecision noise due to amplitude quadrature noise being rotated
into the squeezed phase quadrature. This causes an increase in the long-time
measurement imprecision noise dephasing $\Lambda_{\rm imp}(t\to\infty)$. For
each noise realization $\xi_{s}$, $\Lambda_{\rm imp}(t\to\infty)$ is (up to a
constant)

$\displaystyle\Lambda_{\rm imp}(t\to\infty)=\frac{2\gamma_{\rm
ff}t}{(1+\lambda_{2})^{2}}\left[(1-\lambda_{2})^{2}+\frac{16\lambda_{2}\beta_{s}^{2}\xi_{s}^{2}}{(1-\lambda_{2})^{2}\kappa_{c}^{2}}\right],$
(86)

where the first term in brackets is the dephasing due to the fluctuations in
the squeezed phase quadrature, and the second term is the contribution due to
the small rotation $\theta\propto\xi_{s}/\kappa_{c}$ of the amplitude
quadrature into the phase quadrature.

We can now use this expression to determine when it is permissible to neglect
the last term, i.e. the unwanted rotated noise from the amplified quadrature
is valid. We immediately obtain

$\displaystyle(1-\lambda_{2})^{4}\gtrsim
16\beta_{s}^{2}\xi_{s}^{2}/\kappa_{c}^{2}.$ (87)

Taking the stochastic average of this condition over the classical noise then
yields the quasistatic noise limit of our more general Eq. (85) derived above:

$\displaystyle(1-\lambda_{2})^{4}\gtrsim
16\beta_{s}^{2}\sigma^{2}/\kappa_{c}^{2}.$ (88)

##  Appendix C Parameter estimation in a photonic state

Here we briefly review the problem of estimating the small rotation angle of a
squeezed displaced state and show that the estimation error exhibits
Heisenberg scaling when the coherent state is correctly squeezed. We start
with a coherent state and show that the estimation error is bounded by the
standard quantum limit in total photon number, then we consider a squeezed
state and show an improved scaling of the estimation error with total photon
number.

Suppose we have a coherent state $|\psi_{0}\rangle=\hat{D}(\alpha)|0\rangle$,
where the displacement operator is
$\hat{D}(\alpha)=\exp[\alpha\hat{a}^{\dagger}-\alpha^{*}\hat{a}]$. Without
loss of generality, we take the displacement to be real $\alpha>0$ which
defines the amplitude quadrature [$\hat{X}=(\hat{a}^{\dagger}+\hat{a})/2$].
This state is rotated in phase space by a small angle $\theta\ll 1$:

$\displaystyle|\psi_{\theta}\rangle=e^{i\theta\hat{a}^{\dagger}\hat{a}}|\psi_{0}\rangle.$
(89)

The problem is to estimate this angle given $\bar{n}=\alpha^{2}$ photons in
the state $|\psi_{\theta}\rangle$. For small $\theta\ll 1$, a measurement of
the phase quadrature [$\hat{P}=i(\hat{a}^{\dagger}-\hat{a})/2$] yields the
estimate

$\displaystyle\langle\hat{P}\rangle=\alpha\sin\theta\approx\alpha\theta=\sqrt{\bar{n}}\theta.$
(90)

The uncertainty $\Delta P$ associated with this measurement depends on the
variance of the phase quadrature:

$\displaystyle(\Delta
P)^{2}=\sqrt{\langle\hat{P}^{2}\rangle-\langle\hat{P}\rangle^{2}}=\frac{1}{4}.$
(91)

The estimation error, $\Delta\theta=\Delta
P/(|\partial\langle\hat{P}\rangle/\partial\theta|)$, is thus

$\displaystyle\Delta\theta=\frac{1}{2\sqrt{\bar{n}}}$ (92)

in terms of the total number of photons $\bar{n}$ in the state
$|\psi_{\theta}\rangle$. This is the standard quantum limit scaling of the
estimation error with $\bar{n}$ measurement photons (i.e., $\bar{n}$ photons
in the state $|\psi_{\theta}\rangle$) [29].

Now we turn to the case where the state is squeezed. The initial state is
$|\psi_{0}\rangle=\hat{D}(\alpha)\hat{S}(-r)|0\rangle$, where the squeeze
operator is $\hat{S}(\xi)=\exp[(\xi^{*}\hat{a}^{2}-\xi\hat{a}^{\dagger 2})/2]$
for $\xi=re^{i\phi}$. The phase $\phi=\pi$ is chosen to reduce the variance of
the phase quadrature. Again the state is rotated in phase space by an angle
$\theta\ll 1$ (cf. Eq. (89)) and again the angle estimate is given by the
measurement of the phase quadrature
$\langle\hat{P}\rangle=\alpha\sin\theta\approx\alpha\theta$. The uncertainty
$\Delta P$ associated with this measurement is now

$\displaystyle(\Delta P)^{2}\approx\frac{1}{4}e^{-2r},$ (93)

assuming a small rotation angle $\theta\ll e^{-2r}$. The estimation error is
thus

$\displaystyle\Delta\theta=\frac{1}{2\alpha}e^{-r}.$ (94)

The total number of photons in the squeezed coherent state is $\bar{n}$ =
$\bar{n}_{\rm d}$ \+ $\bar{n}_{\rm s}$ where $\bar{n}_{\rm
d}=|\langle\hat{a}\rangle|^{2}=\alpha^{2}$ is the displacement photon number,
and $\bar{n}_{\rm
s}=\langle\hat{a}^{\dagger}\hat{a}\rangle-|\langle\hat{a}\rangle|^{2}=\sinh^{2}r$
is the squeezing photon number. For $r\gg 1$ we have
$e^{r}=2\sqrt{\bar{n}_{\rm s}}$, thus the estimation error is
$\Delta\theta=1/4\sqrt{\bar{n}_{\rm d}\bar{n}_{\rm s}}$. Minimizing over the
partition of the fixed total photon number $\bar{n}$ yields $\bar{n}_{\rm
d}=\bar{n}_{\rm s}=\bar{n}/2$. Therefore, in terms of $\bar{n}$, the
estimation error is

$\displaystyle\Delta\theta=\frac{1}{\bar{n}},$ (95)

which is Heisenberg-limited scaling of the estimation error with $\bar{n}$
measurement photons [29].

##  Appendix D Autonomous spectator

As discussed in Sec. II of the main text, Eq. (16) is not limited to
describing the physical setup of homodyne measurement and feedforward. As
shown in Ref. [35], measurement and feedforward can be implemented
autonomously using nonreciprocal interactions generated via engineered
dissipation. Here we give a basic overview of how such an autonomous spectator
system can be engineered.

To implement an autonomous spectator mode, nothing must change in Eq. (12) for
$\hat{H}_{s,[\xi]}(t)$ nor in Eq. (1) for $\hat{H}_{q,[\xi]}(t)$. Only the
physical system which implements the coherent interaction $\hat{H}_{\rm int}$,
Eq. (17), and the dissipation $\hat{L}$, Eq. (18), must change. Namely,
$\hat{H}_{\rm int}$, must actually be implemented as written, and $\hat{L}$,
must be engineered by coupling the qubit and spectator to a reservoir [55,
35]. Recall that in the measurement and feedforward picture, the combination
of dissipation and coherent interaction is a description of the homodyne
detection and feedforward of the measurement record; no $\hat{H}_{\rm int}$
between the spectator and qubit is actually directly implemented. These
changes to the physical setup are shown in Fig. 3.

A crucial element of the autonomous spectator implementation is the
longitudinal coupling to the qubit required by $\hat{H}_{\rm int}$ (cf. Eq.
(17)), i.e., an interaction of the form

$\displaystyle\hat{H}_{\rm
long}=g\left(e^{i\theta}\hat{d}+e^{-i\theta}\hat{d}^{\dagger}\right)\hat{\sigma}_{z},$
(96)

where $\hat{a}$ is a photonic mode and $\theta$ picks out a quadrature of that
mode. E.g., in the context of superconducting circuits, such couplings have
been studied theoretically [56, 57, 58] and demonstrated experimentally for
linear resonators [59]. Longitudinal couplings have also been experimentally
realized by dispersively coupling a cavity to a qubit and displacing the
linear cavity [60].

To engineer the collective dissipation generated by $\hat{L}$ (cf. Eq. (18),
we follow Refs. [55, 35] and introduce an auxiliary mode $\hat{b}$ with a
damping rate $\gamma_{b}$ to which we couple both the spectator and the qubit:

$\displaystyle\hat{H}_{\rm
aux}=\frac{1}{2}\sqrt{\gamma_{b}\kappa_{c}}\left(\hat{d}^{\dagger}\hat{b}+{\rm
h.c.}\right)+\frac{1}{2}\sqrt{\gamma_{b}\gamma_{\rm
ff}}\left(\hat{b}+\hat{b}^{\dagger}\right)\hat{\sigma}_{z}.$ (97)

By heavily damping this mode, $\gamma_{b}\gg\kappa_{c},\gamma_{\rm ff}$, we
can adiabatically eliminate it from the dynamics, thus deriving a dissipative
interaction between the spectator and qubit.

The auxiliary Hamiltonian can be rewritten as

$\displaystyle\hat{H}_{\rm
aux}=\frac{1}{2}\sqrt{\gamma_{b}}\left(\hat{b}^{\dagger}\hat{L}+{\rm
h.c.}\right),$ (98)

in terms of the collective jump operator $\hat{L}$. Thus in the limit
$\gamma_{b}\gg\kappa_{c}\gamma_{\rm ff}$ we arrive at the dissipative
interaction

$\displaystyle\mathcal{D}[\hat{L}]\hat{\rho},$ (99)

for the reduced spectator-qubit density matrix $\hat{\rho}={\rm
tr}_{b}\\{\hat{\rho}_{\rm tot}\\}$ (i.e., after tracing out the auxiliary mode
$\hat{b}$).

##  Appendix E Feedforward delay

Figure 8:  Effects of feedforward delay on qubit decoherence. The qubit
decoherence function (less $\Lambda_{\rm imp}(t)$) vs. time for various
indicated delays $\tau_{d}$ and for white noise $S[\omega]=S_{0}$ with
$S_{0}=0.01\kappa_{\phi}$. The dotted line is the bare qubit decoherence
function and its intersection with the delay curves denotes the minimum break-
even time $t_{\rm br}$ for that delay $\tau_{d}$. The dashed “pre-delay
$\chi(t)$” curve is given by Eq. (101) evaluated as though $t<\tau_{d}$ for
all times, and the vertical dot-dashed lines indicate the delay time
$\kappa_{\phi}\tau_{d}$ for each delay curve – this is the time when the
spectator begins mitigating noise.

Delay in the measurement and feedforward will degrade the noise mitigation
performance of the spectator. To include delay in the measurement and
feedforward, we use the fact that the measurement is classical and
nonreciprocal. The classicality implies that the qubit and spectator never
become entangled; thus from the perspective of the qubit, the spectator mode
is another classical noise source that happens to be correlated with
$\xi_{q}(t)$. The nonreciprocity implies that there is no feedback from the
qubit to the spectator; thus there is no way for the qubit to learn about the
feedforward delay. Together these imply that from the perspective of the
qubit, a delay in the measurement and feedforward, is equivalent to
instantaneous measurement and feedforward of a delayed noise signal. We
therefore model the feedforward delay as a detection delay: at time $t$, the
spectator detects delayed noise $\xi_{s}(t-\tau_{d})$ instead of the
instantaneous noise $\xi_{s}(t)$. The delayed signal is then instantaneously
fed forward to the qubit.

Due to the delay, the spectator transduction factor $\alpha_{s}$ picks up a
phase factor

$\displaystyle\alpha_{s}\mapsto e^{-i\omega\tau_{d}}\alpha_{s}$ (100)

which reduces the spectator mode’s ability to mitigate noise within its
detection bandwidth. In the long-time limit, however, the qubit remains
sensitive only to the zero-frequency noise, thus the long-time dephasing rate
vanishes for $\alpha_{s}=1$.

The effects of delay are best illustrated with an example. We consider a white
noise spectral density $S[\omega]=S_{0}$ and a delay $\tau_{d}$. The
decoherence function is

$\displaystyle\chi$ $\displaystyle(t)=\Lambda_{\rm imp}(t)$ (101)
$\displaystyle+\begin{cases}S_{0}t+\frac{S_{0}}{{\kappa_{\phi}}}\left(e^{-{\kappa_{\phi}}t/2}-1\right)&t<\tau_{d}\\\
S_{0}\tau_{d}+\frac{S_{0}}{{\kappa_{\phi}}}\left(1-2e^{-{\kappa_{\phi}}(t-\tau_{d})/2}+e^{-{\kappa_{\phi}}t/2}\right)&t>\tau_{d}\end{cases}$

where $\Lambda_{\rm imp}(t)$ is still given by Eq (26). For pre-delay times
$t<\tau_{d}$ the spectator feedforward noise is uncorrelated with the direct
noise on the qubit, leading to the initial dephasing at twice the bare rate,
$S_{0}t$. There is also an exponential decay to a constant due to the
Lorentzian spectral density of the noise fed forward from the spectator
(bandwidth $\kappa_{\phi}$). In the long-time limit the dephasing due to
$\xi(t)$ is constant in time:

$\displaystyle\chi(t\to\infty)=\Lambda_{\rm
imp}(t)+S_{0}\tau_{d}+\frac{S_{0}}{{\kappa_{\phi}}}$ (102)

where the constants are the delay-dependent dephasing ($S_{0}\tau_{d}$) and
the zero-delay initial dephasing ($\chi_{\rm
init}(\infty)=S_{0}/{\kappa_{\phi}}$, cf. Eq. (37)).

The qubit decoherence function with feedforward delay is shown in Fig. 8 for
white noise. The bare dephasing of the qubit $\chi(t)=S_{0}t/2$ intersects
each delay dephasing function at the minimum possible the break-even time
$t_{\rm br}$: the time at which the spectator system improves over the bare
decoherence assuming negligible $\Lambda_{\rm imp}(t_{\rm br})\ll S_{0}t_{\rm
br}$. For $\tau_{d}\gtrsim 1/{\kappa_{\phi}}$, the minimum break-even time is
$t_{\rm br}\approx 2(\tau_{d}+1/{\kappa_{\phi}})$, and for $\tau_{d}\ll
1/{\kappa_{\phi}}$ the minimum break-even time vanishes as $t_{\rm
br}=(2+\sqrt{2})\tau_{d}$.

##  Appendix F Internal loss and optimal squeezing

Figure 9:  Effects of spectator mode internal loss on the optimal ratio of
temporal mode squeezing photons. $\Lambda_{\rm imp}(T)/(\kappa_{\phi}T)^{2}$
(cf. Eq. (106)) vs. squeezing photon number ratio $\bar{n}_{\rm
s}/\bar{n}_{\rm inc}$ in the presence of indicated degrees of internal loss
$\kappa_{i}/\kappa_{c}$, for a fixed long evolution time $T\gg
1/\kappa_{\phi}$ and $g=1$. We show $\bar{n}_{\rm inc}=250$ in solid lines and
$\bar{n}_{\rm inc}=2500$ in dashed lines; the colors denote various
$\kappa_{i}/\kappa_{c}$. The minimum of each curve is marked by a red dot and
denotes the optimal fraction of the total photon number which should be used
in the squeezing to minimize the long-time dephasing rate. Note that for a
given $\kappa_{i}/\kappa_{c}$, the optimal squeezing photon number ratio
decreases for increasing $\bar{n}_{\rm inc}$; this is the breakdown of
Heisenberg-limited scaling with internal loss.

Throughout the main text, we assume that the coupling rate of the spectator to
the output waveguide is the dominant source of damping and any internal loss
is extremely weak: $\kappa_{i}\ll\kappa_{c}$. Internal loss is experimentally
unavoidable, however, and it effectively acts as a second pathway for the
feedforward signal to leak out of the spectator. This additional signal sink
is most clearly an issue when the spectator is strongly squeezed as it limits
how much the vacuum noise in the output field can be reduced.

We let the mode couple to a zero temperature internal loss bath (although this
can be generalized to finite temperature in a straightforward manner) with
rate $\kappa_{i}$. The total loss rate is

$\displaystyle\kappa_{\rm tot}=\kappa_{c}+\kappa_{i}$ (103)

The drive strengths must be increased in proportion to the damping rate; the
overall rate scale $\kappa_{c}$ in the drive Hamiltonian Eq. (5) is replaced
by $\kappa_{c}\mapsto\kappa_{\rm tot}$. The ideal spectator transduction
factor is now

$\displaystyle\alpha_{s}^{\rm ideal}=\frac{\kappa_{\rm tot}}{\kappa_{c}}\geq
1,$ (104)

and all of the properties of the spectator at ideal transduction strength
discussed in Sec. III otherwise hold.

The internal loss effects a qualitative change to the measurement imprecision
noise dephasing $\Lambda_{\rm imp}$:

$\displaystyle\Lambda_{\rm imp}(t)$
$\displaystyle=\frac{\alpha_{s}^{2}}{32\beta_{s}^{2}\bar{n}_{1}}\frac{\kappa_{c}}{\kappa_{\mathrm{tot}}}\left[\frac{(1-\lambda_{2})^{2}}{1+\lambda_{2}}+\frac{\kappa_{i}}{\kappa_{c}}(1+\lambda_{2})\right]\kappa_{\phi}t.$
(105)

Here we neglect the exponential decay to a constant. These terms each receive
a $(\kappa_{c}/\kappa_{\rm tot})^{2}$ prefactor, and the exponential gets the
replacement $\kappa_{\phi}\mapsto\kappa_{{\rm tot},\phi}$. The linear-in-$t$
term is no longer simply proportional to $(1-\lambda_{2})^{2}$. The term
$\propto\kappa_{i}$ is caused by the splitting of the mode’s output field
between the internal loss and the waveguide, which limits the degree of
squeezing in the waveguide.

In terms of the number of photons in the temporal mode $\hat{A}$ (cf. Eq.
(41)), and for $\bar{n}_{\rm inc},\bar{n}_{\rm d},\bar{n}_{\rm s}\gg 1$, the
long-time measurement imprecision noise dephasing is now given by

$\displaystyle\Lambda_{\rm
imp}(T)=\frac{(\kappa_{\phi}T)^{2}}{64\beta_{s}^{2}}\frac{\kappa_{\rm
tot}}{\kappa_{c}}\left[\frac{1}{\bar{n}_{\rm d}\bar{n}_{\rm
s}}+\frac{2\kappa_{i}/\kappa_{c}}{\bar{n}_{\rm d}}\right]$ (106)

where we have let $\alpha_{s}=\kappa_{\rm tot}/\kappa_{c}$, its ideal value.
For a fixed $\bar{n}_{\rm inc}$ in the temporal mode, the optimal choice of
$\bar{n}_{\rm d}$ and $\bar{n}_{\rm s}$ is no longer $\bar{n}_{\rm
d}=\bar{n}_{\rm s}=\bar{n}_{\rm inc}/2$, but is now dependent on the internal
loss ratio $\kappa_{i}/\kappa_{c}$, as we show in Fig. 9. The optimal choice
rapidly approaches $\bar{n}_{\rm d}=\bar{n}_{\rm inc}$ when the product
$\bar{n}_{\rm inc}(\kappa_{i}/\kappa_{c})\gg 1$. Furthermore the Heisenberg-
limited scaling $\Lambda_{\rm imp}(T)\propto 1/\bar{n}_{\rm inc}^{2}$ rapidly
breaks down as the internal loss term in Eq. (106) becomes dominant with
increasing $\bar{n}_{\rm inc}$ because it is $\propto\bar{n}_{\rm d}\sim
1/\bar{n}_{\rm inc}$ instead of $\sim 1/\bar{n}_{\rm inc}^{2}$.