# Anomalous energy exchanges and Wigner function negativities in a single
qubit gate

Maria Maffei  Université Grenoble Alpes, CNRS, Grenoble INP, Institut Néel,
38000 Grenoble, France  Cyril Elouard  Inria, ENS Lyon, LIP, F-69342, Lyon
Cedex 07, France  Bruno O. Goes  Université Grenoble Alpes, CNRS, Grenoble
INP, Institut Néel, 38000 Grenoble, France  Benjamin Huard  Ecole normale
supérieure de Lyon, CNRS, Laboratoire de Physique, F-69342 Lyon, France
Andrew N. Jordan  Institute for Quantum Studies, Chapman University, 1
University Drive, Orange, CA 92866, USA  Department of Physics and Astronomy,
University of Rochester, Rochester, New York 14627, USA  Alexia Auffèves
Université Grenoble Alpes, CNRS, Grenoble INP, Institut Néel, 38000 Grenoble,
France

###### Abstract

Anomalous weak values and Wigner function’s negativity are well known
witnesses of quantum contextuality. We show that these effects occur when
analyzing the energetics of a single qubit gate generated by a resonant
coherent field traveling in a waveguide. The buildup of correlations between
the qubit and the field is responsible for bounds on the gate fidelity, but
also for a nontrivial energy balance recently observed in a superconducting
setup. In the experimental scheme, the field is continuously monitored through
heterodyne detection and then post-selected over the outcomes of a final
qubit’s measurement. The post-selected data can be interpreted as field’s weak
values and can show anomalous values in the variation of the field’s energy.
We model the joint system dynamics with a collision model, gaining access to
the qubit-field entangled state at any time. We find an analytical expression
of the quasi-probability distribution of the post-selected heterodyne signal,
i.e. the conditional Husimi-Q function. The latter grants access to all the
field’s weak values: we use it to obtain that of the field’s energy change and
display its anomalous behaviour. Finally, we derive the field’s conditional
Wigner function and show that anomalous weak values and Wigner function’s
negativities arise for the same values of the gate’s angle.

##  I Introduction

Weak values have been originally defined as the average values for the results
of weak measurements post-selected on particular outcomes of a final strong
(projective) measurement [1], where weak measurements are defined as
measurements that minimally disturb the system [2]. Later on, the concept of
weak values has been generalized to any POVM (positive operator valued
measurement) and any choice of the observable and the conditioning [3]. When
the outcome used for the post-selection is unlikely, weak values can exceed
the range of eigenvalues of the corresponding operators [4]. In correspondence
of such anomalous values, the Wigner function dictating the statistical
distribution of the post-selected measurements takes negative values [5].
Furthermore it can be proven that both anomalous weak values [6, 7, 5], and
Wigner function’s negativity [8, 9, 10] are witnesses of contextuality.

Figure 1: Schematics of the detection of the field’s weak values in the
single-qubit gate. The gate is implemented by coherently driving a 1D atom
with a pulse of area $\theta=\Omega\tau$; the output field is continuously
detected in the time interval $[0,\tau]$ with a heterodyne measurement (weak
measurement); at time $\tau$ a projective (strong) measurement is performed on
the qubit and the heterodyne data acquired are post-selected according on the
outcome. The plot shows the values of the change of the number of field’s
excitations as a function of time for $\theta=0.93\pi$ and $\gamma\tau=3/40$.
The gray line represents the unconditional change of the number of
excitations.

Here we show that those effects occur in a paradigmatic setting of waveguide
quantum electrodynamics where energy exchanges feature anomalous weak values.
The setting is the so called one-dimensional (1D) atom, a two-level emitter
(qubit) interacting with an electromagnetic field propagating in 1D. When the
field is prepared in a coherent state resonant with the qubit’s transition
this system implements a single qubit gate with a fidelity limited by the
buildup of qubit-field correlations [11]. Weak values arise in the 1D atom
when the electromagnetic field is monitored via heterodyne detection and the
data are post-selected over the outcomes of a qubit’s projective measurement.
This may be understood by regarding the propagating field as a weak
measurement apparatus for the qubit [12, 13], see Fig. 1(a). Superconducting
circuits represent the ideal setup to implement such a detection scheme as
they grant independent access to the states of qubit and field. A recent
experiment on a superconducting single qubit gate [14] showed anomalous weak
values of the field’s energy change, i.e. values exceeding by far the single
quantum of energy that qubit and field can physically exchange, see Fig. 1(b).

We study the 1D atom using a collision model [15] where individual temporal
modes of the electromagnetic field locally interact with the qubit in a
sequential fashion [16, 17]. When the field is prepared in a resonant coherent
state, this method provides the exact analytical expression of the qubit-field
entangled state at any time [18]. From the collision model of the driven 1D
atom, we derive the analytical expression of the field’s Husimi-Q function
conditioned on the outcomes of the final qubit’s measurement. This function
gives access to all the moments of the post-selected heterodyne distribution,
namely the field’s weak values. Then we use the conditional Husimi-Q function
to derive the weak value of the field’s energy change and we show that, in the
typical working regime of single qubit gates, it takes anomalous values as
observed in [14]. Finally we explore the relation between anomalous weak
values and negativity of the corresponding Wigner function. Exploiting the
analytical expression of the field’s state obtained with the collision model,
we compute the field’s conditional Wigner function and we show that anomalous
weak values and Wigner function’s negativities arise for the same values of
the gate’s angle.

The paper is organized as follows: In Sec. II we describe the coherently
driven 1D atom and present the collision model of its dynamics. In Sec. III we
present our main results: the analytical derivations of the field’s
conditional Husimi-Q function and the weak value of the field’s energy change.
In Sec. IV we derive the conditional Wigner function. Finally, in Sec. V we
draw the conclusions of our work.

##  II System and model

###  II.1 The coherently driven 1D atom

The 1D atom comprises a qubit coupled to a single-mode, semi-infinite
waveguide. The waveguide field constitutes a reservoir of electromagnetic
modes of frequencies $\omega_{k}$ and linear momentum $k=\omega_{k}v^{-1}$
with $v$ being the field’s group velocity taken as positive. These modes are
destroyed (created) by the operators $a_{k}(a^{\dagger}_{k})$. The dynamics of
the joint system is ruled by the Hamiltonian:

$\displaystyle H$
$\displaystyle=\left[\hbar\omega_{0}\sigma^{\dagger}\sigma+\hbar\sum_{k=0}^{\infty}\omega_{k}a_{k}^{\dagger}a_{k}\right]+i\hbar
g\sum_{k=0}^{\infty}\left(\sigma^{\dagger}a_{k}-a_{k}^{\dagger}\sigma\right),$
(1)

where $\sigma\equiv\ket{g}\bra{e}$, with $\ket{g(e)}$ being the ground
(excited) state of the emitter. Writing the above Hamiltonian we implicitly
assumed that the light-matter interaction is weak enough that only frequency
modes close to $\omega_{0}$ play a role (quasi-monochromatic approximation)
[17]. In this regime, the rotating wave approximation is allowed [19], and the
coupling $g$ can be considered uniform in frequency [20].

The field’s lowering operator at the position $x$ in the interaction picture
[16, 17, 18] is given by

$b(x,t)=\sqrt{\frac{1}{\varrho}}\sum_{k}e^{-i\omega_{k}(t-x/v)}a_{k}=b(0,t-x/v),$
(2)

where $\varrho$ is the modes’ density verifying the relation
$\sum_{k}e^{-i\omega_{k}(t-t^{\prime})}/\varrho=\delta(t-t^{\prime})$. The
operators $b(0,t)$ satisfy the bosonic commutation relation, i.e.
$[b(0,t),b^{\dagger}(0,t^{\prime})]=\delta(t-t^{\prime})$ [17]. The qubit is
located at the position $x=0$ of the waveguide, such that the interaction
picture Hamiltonian reads:

$H_{I}(t)=i\hbar\sqrt{\gamma}\left(\sigma^{\dagger}(t)b(0,t)-b^{\dagger}(0,t)\sigma(t)\right),$
(3)

where we defined the interaction picture lowering operator
$\sigma(t)=e^{-i\omega_{0}t}\sigma$, and the emitter’s decay rate
$\gamma=g^{2}\varrho$. In the regions where $x<0$ or $x>0$, the field travels
without deformation, it is then natural to define field’s input and output
operators respectively as $b_{\text{in}}(t)\equiv\lim_{\epsilon\rightarrow
0^{-}}b(\epsilon,t)$, and $b_{\text{out}}(t)\equiv\lim_{\epsilon\rightarrow
0^{+}}b(\epsilon,t)$. These operators satisfy the mean input-output relation
$\langle b_{\text{out}}(t)\rangle=\langle
b_{\text{in}}(t)\rangle-\sqrt{\gamma}\langle\sigma(t)\rangle$, in agreement
with the textbook input-output relation written in the Heisenberg
representation [20].

The gate’s input field is a square coherent pulse of amplitude $\langle
b_{in}(t)\rangle=\alpha_{t}=\alpha e^{-i\omega_{0}t}/\sqrt{\varrho}$, with
$\alpha$ real. Hence, the field’s state at the initial time ($t=0^{-}$) reads
$\ket{\alpha}\equiv\mathcal{D}(\alpha)\ket{0}$, where
$\mathcal{D}(\alpha)=e^{\left(\alpha a^{\dagger}_{0}-\alpha^{*}a_{0}\right)}$
is the displacement operator of the mode with frequency $\omega_{0}$ which can
be equivalently written as $\mathcal{D}(\alpha)=e^{\int
dt\left(\alpha_{t}b^{\dagger}(t)-\alpha^{*}_{t}b(t)\right)}$ using the
transformation (2). A unitary driving on the qubit, $H_{D}(t)$, arises
naturally when displacing the interaction Hamiltonian in Eq. (3),
$\mathcal{D}(-\alpha)H_{I}(t)\mathcal{D}(\alpha)=H_{I}(t)-\Omega\sigma_{y}/2=H_{I}(t)+H_{D}(t)$,
with $\Omega/2=g\alpha$ and $\sigma_{y}=i\sigma^{\dagger}-i\sigma$. In the
classical limit of the field [11], the qubit reduced dynamics is solely
dictated by $H_{D}(t)$ and hence it reduces to a pure rotation around the $y$
axis of an angle $\theta=\Omega\tau$, where $\tau$ is the duration of the
qubit-field interaction. In this limit, the light-matter interaction (int) is
equivalent to the map:

$\displaystyle\ket{g}\otimes\ket{\alpha}\xrightarrow{\text{int}(\tau)}\left[\cos{(\theta/2)}\ket{g}+\sin{(\theta/2)}\ket{e}\right]\otimes\ket{\alpha}.$

Beyond the classical limit, the interaction entangles qubit and field
resulting in a loss of purity of the reduced qubit’s state and a degradation
of the coherence of the input field. The joint qubit-field state at time
$\tau$ can be written as the pure state:

$\displaystyle\ket{\Psi(\tau)}=\sqrt{P_{g}(\tau)}\ket{g,\psi_{g}(\tau)}+\sqrt{P_{e}(\tau)}\ket{e,\psi_{e}(\tau)}$

with

$\ket{\psi_{\epsilon}(\tau)}=\mathcal{D}(\alpha)\left(\frac{f_{\epsilon}^{(0)}(\tau)-\int_{0}^{\tau}dtf^{(1)}_{\epsilon}(\tau,t)e^{-i\omega_{0}t}b^{\dagger}(t)+\dots}{\sqrt{P_{\epsilon}(\tau)}}\right)\ket{0},$
(4)

where $\epsilon=g,e$, and we adopted the short notation $b(t)\equiv b(0,t)$.
The state in the parenthesis is the field state in the displaced reference
frame, where the interaction Hamiltonian is
$\mathcal{D}(-\alpha)H_{I}(t)\mathcal{D}(\alpha)$, and the input field is the
vacuum. In such a frame, the only mechanism responsible for the photons’
creation is the spontaneous emission, hence the field coincides with the
emitter’s fluorescence having amplitude $\langle b_{out}(t)\rangle-\langle
b_{in}(t)\rangle=-\sqrt{\gamma}\langle\sigma(t)\rangle$. The ellipsis
represent the components with $j>1$ spontaneously emitted photons, having the
form $(-)^{j}\int
d\textbf{t}_{j}f_{\epsilon}^{(j)}(\tau,\textbf{t}_{j})e^{-i\omega_{0}t_{1}}b^{\dagger}(t_{1})..e^{-i\omega_{0}t_{j}}b^{\dagger}(t_{j})\ket{0}$,
with $\textbf{t}_{j}=\\{t_{1},t_{2},...t_{j}\\}$. The functions
$f_{\epsilon}^{(j)}(\tau,\textbf{t}_{j})$ are real and their explicit
expression has been derived in [18] and is reported in the App. A. Since their
amplitude is proportional to $\gamma^{j/2}$, the components with $j>2$ can be
neglected in the regime usually considered in single-qubit gates where
$\Omega\gg\gamma$. We can define the probability that the qubit spontaneously
emits $j$ photons during the evolution from $\ket{g}$ to $\ket{\epsilon}$ as
$p^{(j)}_{\epsilon}(\tau)\equiv\int
d\textbf{t}_{j}|f_{\epsilon}^{(j)}(\tau,\textbf{t}_{j})|^{2}/P_{\epsilon}(\tau)$.

###  II.2 Collision model of the coherently driven 1D atom

We now define adimensional discrete-temporal modes of the electromagnetic
field [17, 16, 18], i.e. $b_{n}\equiv\sqrt{\Delta t}b(t_{n})$, where $\Delta
t$ is an infinitesimal time-increment, $n$ is an integer number, and
$[b_{n},b^{\dagger}_{n^{\prime}}]=\delta_{n,n^{\prime}}$ with
$\delta_{n,n^{\prime}}$ being the Kronecker delta [16, 17].

The initial state of the field can be written in terms of the discrete-
temporal modes as: $\ket{\alpha}=\bigotimes_{n}\ket{\alpha_{n}}$, where
$\ket{\alpha_{n}}=\mathcal{D}^{(n)}(\alpha_{n})\ket{0_{n}}$, with
$\mathcal{D}^{(n)}(\alpha_{n})=e^{(\alpha_{n}b^{\dagger}_{n}-\alpha_{n}^{*}b^{\dagger}_{n})}$,
and $\alpha_{n}=\sqrt{\Delta t/\varrho}\alpha e^{-i\omega_{0}t_{n}}$.

We can write the infinitesimal unitary evolution operator $U(t_{n+1}-t_{n})$
as:

$\displaystyle U^{(n)}$ $\displaystyle\equiv
U\left(t_{n+1}-t_{n}\right)\approx\exp\left\\{-\frac{i}{\hbar}\Delta
tH_{I}\left(t_{n}\right)\right\\},\mbox{with }$ (5) $\displaystyle
H_{I}(t_{n})$ $\displaystyle\equiv i\hbar\sqrt{\frac{\gamma}{\Delta
t}}\left(\sigma^{\dagger}(t_{n})b_{n}-b^{\dagger}_{n}\sigma(t_{n})\right).$

The joint system evolution can be decomposed in a sequence of collisions:

$\displaystyle\rho(t_{n+1})=U^{(n)}\rho(t_{n})U^{(n)\dagger}.$ (6)

The qubit’s reduced state at time $t_{n+1}$ can be found by tracing Eq. (6)
over the state of the $n$-th temporal mode prepared in the state
$\ket{\alpha_{n}}$:

$\displaystyle\rho_{q}(t_{n+1})=\text{Tr}_{n}\\{U^{(n)}\rho_{q}(t_{n})\ket{\alpha_{n}}\bra{\alpha_{n}}U^{(n)\dagger}\\}.$
(7)

As expected, expanding $U^{(n)}$ at the second order in $\Delta t$, equation
(7) becomes a discrete-time Lindblad master equation [16, 17]:

$\displaystyle\frac{\rho_{\text{q}}(t_{n})-\rho_{\text{q}}(t_{n-1})}{\Delta
t}$
$\displaystyle=\frac{\Omega}{2}[\sigma-\sigma^{\dagger},\rho_{\text{q}}(t_{n-1})]$
(8)
$\displaystyle+\gamma\Big{(}\sigma\rho_{\text{q}}(t_{n-1})\sigma^{\dagger}-\tfrac{1}{2}\Big{\\{}\sigma^{\dagger}\sigma,\rho_{\text{q}}(t_{n-1})\Big{\\}}\Big{)}.$

Notice that at time $t_{n}$, the $(n-1)$-th discrete-temporal mode of the
field has just interacted with the qubit, while the $n$-th is going to
interact next. Then, input and output operators correspond to the limits:

$\displaystyle b_{in}(t_{n})$ $\displaystyle=\lim_{\Delta t\rightarrow
0}\frac{b_{n}}{\sqrt{\Delta t}},$ (9) $\displaystyle b_{out}(t_{n})$
$\displaystyle=\lim_{\Delta t\rightarrow 0}\frac{b_{n-1}}{\sqrt{\Delta t}}.$

##  III Field weak values

The weak value of an operator at time $t$ can be written as [3, 21, 13]:

$\displaystyle\langle
O(t)\rangle_{f,i}=\frac{\text{Tr}\\{\Pi_{f}U(\tau-t)O(t)\rho_{i}(t)U^{\dagger}(\tau-t)\\}}{P_{f}(\tau)},$
(10)

where $\Pi_{f}=\ket{f}\bra{f}$ is the projector on the final measurement’s
outcome,
$U(\tau-t)=\text{exp}\\{(-i/\hbar)\int_{t}^{\tau}dt^{\prime}H_{I}(t^{\prime})\\}$,
and $\rho_{i}(t)=U(t)\ket{i}\bra{i}U^{\dagger}(t)$ is the system’s state at
time $t$ starting from the pure state $\ket{i}$. From now on we will consider
that the joint qubit-field system starts its evolution from the state
$\ket{g,\alpha}$, and that the qubit is measured in its energy basis at the
final time $\tau$. Then, in the rest of the paper, we will simplify the weak
values’ notation by omitting the subscript that refers to the initial state,
and by using $\epsilon=e,g$ to denote the possible outcomes of the qubit’s
final measurement.

We are particularly interested in the weak values of the output field’s
quadratures, $\text{Re}\\{\langle b_{out}(t)\rangle_{\epsilon}\\}$ and
$\text{Im}\\{\langle b_{out}(t)\rangle_{\epsilon}\\}$, and intensity, $\langle
b^{\dagger}_{out}(t)b_{out}(t)\rangle_{\epsilon}$. Indeed, these quantities
can be measured by implementing the driven 1D atom with a superconducting
circuit, performing heterodyne detection on the output field, and
postselecting it on the outcomes of the final qubit’s measurement as in Refs.
[22, 14].

Furthermore, from the weak value of the output intensity, we can derive the
weak value of the change of the field’s number of excitations:

$\displaystyle\Delta\mathcal{N}_{\epsilon}$
$\displaystyle\equiv\int_{0}^{\tau}dt\langle
b_{out}^{\dagger}(t)b_{out}(t)\rangle_{\epsilon}-|\alpha_{t}|^{2}\tau.$ (11)

In the typical regime used to perform single qubit gates, i.e.
$\Omega\gg\gamma$, this quantity may take anomalous values, namely values
exceeding by far the single quantum of excitation that the field can
physically exchange with the qubit, i.e. $|\Delta\mathcal{N}_{\epsilon}|>1$,
see Fig. 1(b), and Refs. [23, 24].

Using the collision model picture introduced in the previous section, we can
derive explicit expressions of the weak values of any field’s operator of the
kind $O(t)=\left(b^{\dagger}_{out}(t)\right)^{m}\left(b_{out}(t)\right)^{l}$,
hence including output quadratures and intensity. The first step is to write
these weak values in terms of the discrete-time output operator (Eq. (9)):

$\displaystyle\langle\left(b^{\dagger}_{out}(t_{n})\right)^{m}\left(b_{out}(t_{n})\right)^{l}\rangle_{\epsilon}$
$\displaystyle=\lim_{\Delta t\rightarrow
0}\frac{\text{Tr}\\{\Pi_{\epsilon}U(\tau-
t_{n})\left(b^{\dagger}_{n-1}\right)^{m}b_{n-1}^{l}\rho(t_{n})U^{\dagger}(\tau-
t_{n})\\}}{\sqrt{\Delta t}}$ (12) $\displaystyle=\lim_{\Delta t\rightarrow
0}\frac{\bra{\psi_{\epsilon}(\tau)}\left(b^{\dagger}_{n-1}\right)^{m}b_{n-1}^{l}\ket{\psi_{\epsilon}(\tau)}}{\sqrt{\Delta
t}},$

where we used the fact that $b_{n-1}$ commutes with $U(\tau-t_{n})$. Equation
(12) shows that the weak value of an arbitrary observable of the output field
is simply its average value on the state $\ket{\psi_{\epsilon}(t)}$ given in
Eq. (4).

Hence, to evaluate Eq. (12) we can use the conditional Husimi-Q function of
the $n$-th temporal mode:

$\displaystyle\mathcal{Q}^{(n)}_{\epsilon}(s)\equiv\frac{1}{\pi}\text{Tr}\\{\Pi^{(n)}_{s}\ket{\psi_{\epsilon}(\tau)}\bra{\psi_{\epsilon}(\tau)}\\},$
(13)

where $\Pi^{(n)}_{s}=\ket{s_{n}}\bra{s_{n}}$ with
$\ket{s_{n}}=\mathcal{D}^{(n)}(s)\ket{0_{n}}$ and
$\mathcal{D}^{(n)}(s)=e^{(sb^{\dagger}_{n}-s^{*}b^{\dagger}_{n})}$ being the
displacement operator of the $n$-th temporal mode. From the Husimi function it
is possible to obtain any moment of the output field’s distribution just
performing an integral in the complex plane [25]. So, for instance, the weak
value of the output intensity at time $t_{n}$ can be obtained from
$\mathcal{Q}^{(n)}_{\epsilon}(s)$ by doing the integral:

$\displaystyle\langle
b^{\dagger}_{out}(t_{n})b_{out}(t_{n})\rangle_{\epsilon}$
$\displaystyle=\lim_{\Delta t\rightarrow 0}\frac{1}{\Delta t}\int
d^{2}s(|s|^{2}-1)\mathcal{Q}^{(n)}_{\epsilon}(s).$ (14)

The explicit expression of $\mathcal{Q}^{(n)}_{\epsilon}(s)$ in terms of
qubit’s operators can be computed using the collision model. This is the main
result of this section. First, we rewrite Eq. (13) as:

$\displaystyle\mathcal{Q}^{(n)}_{\epsilon}(s)=\frac{1}{\pi
P_{\epsilon}(\tau)}\text{Tr}\\{E_{\epsilon}(\tau,t_{n+1})\Pi^{(n)}_{s}\rho(t_{n+1})\Pi^{(n)}_{s}\\},$
(15)

where $E_{\epsilon}(\tau,t)\equiv
U^{\dagger}(\tau-t)\ket{\epsilon}\bra{\epsilon}U(\tau-t)$ is the so-called
effect matrix [26]. Now, plugging Eq. (7) in Eq. (15), and expanding $U^{(n)}$
at the second order in $\Delta t$, we find:

$\displaystyle{\cal Q}_{\epsilon}^{(n)}(s)$ $\displaystyle=\frac{1}{\pi
P_{\epsilon}(\tau)}\text{Tr}\left\\{E_{\epsilon}(\tau,t_{n+1})\langle
s_{n}|U^{(n)}|\alpha_{n}\rangle\rho_{q}(t_{n})\langle\alpha_{n}|\left(U^{(n)}\right)^{\dagger}|s_{n}\rangle\right\\}$
(16)
$\displaystyle=\text{Tr}\left\\{E_{\epsilon}(\tau,t_{n+1})\left[\rho_{q}(t_{n+1})+\gamma\Delta
t\left(|\alpha_{n}-s|^{2}-1\right)\sigma\rho_{q}(t_{n})\sigma^{\dagger}+\sqrt{\gamma\Delta
t}\left((\alpha_{n}-s)^{*}\sigma(t_{n})\rho_{q}(t_{n})+(s-\alpha_{n})\rho_{q}(t_{n})\sigma^{\dagger}(t_{n})\right)\right]\right\\}\frac{\exp\left\\{-|s-\alpha_{n}|^{2}\right\\}}{\pi
P_{\epsilon}(\tau)}$

Noticing that
$\text{Tr}\\{E_{\epsilon}(\tau,t_{n+1})\sigma(t_{n})\rho_{q}(t_{n})\\}/P_{\epsilon}(\tau)=\langle\sigma(t_{n})\rangle_{\epsilon}$
[26], and that
$\text{Tr}\\{E_{\epsilon}(\tau,t_{n+1})\rho_{q}(t_{n+1})\\}=P_{\epsilon}(\tau)$,
we find:

$\displaystyle\mathcal{Q}^{(n)}_{\epsilon}(s)$
$\displaystyle=\frac{e^{-|s-\alpha_{n}|^{2}}}{\pi}\left[1+\left(|\alpha_{n}-s|^{2}-1\right)\gamma\Delta
t\mathcal{J}_{\epsilon}(t_{n})\right.$ (17)
$\displaystyle\left.+2\sqrt{\gamma\Delta
t}\text{Re}\\{(s-\alpha_{n})\langle\sigma(t_{n})\rangle_{\epsilon}\\}\right],$

where we defined
$\gamma\mathcal{J}_{\epsilon}(t_{n})=\text{Tr}\\{\Pi_{\epsilon}U(\tau-
t_{n})\sigma\rho_{\text{q}}(t_{n})\sigma^{\dagger}U^{\dagger}(\tau-
t_{n})\\}/P_{\epsilon}(\tau)$. An alternative, although equivalent, derivation
of the conditional Husimi-Q function from the wavefunction in Eq. (4) is
reported in the App. B.

Uning Eq. (17) to perform the integral in Eq. (14), and then plugging the
result in Eq. (11), we find:

$\displaystyle\Delta\mathcal{N}_{\epsilon}=\int_{0}^{\tau}dt\left(\gamma\mathcal{J}_{\epsilon}(t)-\Omega\text{Re}\\{\langle\sigma(t)\rangle_{\epsilon}\\}\right).$
(18)

Notice that $\int_{0}^{\tau}dt\gamma\mathcal{J}_{\epsilon}(t)=\sum_{j\geq
1}p^{(j)}_{\epsilon}(\tau)/P_{\epsilon}(\tau)$ is the total probability that
the qubit undergoes spontaneous emission along its evolution from $\ket{g}$ to
$\ket{\epsilon}$. While the last term,
$-\int_{0}^{\tau}dt\Omega\text{Re}\\{\langle\sigma(t)\rangle_{\epsilon}\\}=2\int_{0}^{\tau}dt\text{Re}\\{\langle
b_{in}(t)\rangle^{*}\left(\langle b_{out}(t)\rangle_{\epsilon}-\langle
b_{in}(t)\rangle\right)\\},$ features an interference between the input field
and the emitter’s fluorescence post-selected over the outcome $\epsilon$; this
term is the only part of $\Delta\mathcal{N}_{\epsilon}$ whose modulus can
exceed $1$ leading to anomalous values.

##  IV Conditional Wigner function

Figure 2: Anatomy of the single-qubit gate with $\gamma\tau=3/40$, varying the
gate’s angle $\theta$. (a) Weak values of the change of number of excitations
in the field when the qubit at time $\tau$ is found in $\ket{\epsilon}$ with
$\epsilon=e,g$, $\Delta\mathcal{N}_{\epsilon}$. (b-c) Color plots of
$\mathcal{W}_{g}$ and $\mathcal{W}_{e}$ for $\theta/\pi=0.93$. (d) Wigner
function’s negativity, $N(\mathcal{W}_{\epsilon})=\int
d^{2}\mu|\mathcal{W}_{\epsilon}(\mu)|-1$, as a function of $\theta$:
$\mathcal{W}_{e}$ is always positive, while $\mathcal{W}_{g}$ can take
negative values in the region of anomalous weak values of
$\Delta\mathcal{N}_{g}$. (e) Plot of $\mathcal{W}_{g}$ (log. scale) in the
region of anomalous values of $\Delta\mathcal{N}_{g}$, i.e.
$\theta\in[0.6\pi,\pi]$.

In the previous section, we derived the conditional Husimi-Q function of the
field’s temporal modes to predict the results of a continuous heterodyne
detection with post-selection. Here instead we consider the mode of frequency
$\omega_{0}$, being the qubit’s frequency and the center of the field’s
spectrum. In the quasi-monochromatic, resonant regime usually employed in
single qubit gates, $\omega_{0}$ is much more populated than the other
frequencies, so $\mathcal{N}(\omega_{0})\equiv\langle
a^{\dagger}_{0}a_{0}\rangle\approx\int_{0}^{\tau}dt\langle
b^{\dagger}(t)b(t)\rangle$, and consequently
$\Delta\mathcal{N}_{\epsilon}(\omega_{0})\equiv\langle
a^{\dagger}_{0}a_{0}\rangle_{\epsilon}-|\alpha|^{2}\approx\Delta\mathcal{N}_{\epsilon}$
with $\Delta\mathcal{N}_{\epsilon}$ given by Eq. (18), see the App. C.

The expectation value of the number operator $a^{\dagger}_{0}a_{0}$ can be
equivalently found using either its Glauber-Sudarshan, Husimi, or Wigner
quasi-probability distributions [25]. The latter is particularly interesting
as its negative values certify the quantum nature of the electromagnetic field
[27] and may witness contexuality [8, 9, 10], exactly as anomalous weak values
[6, 7, 5]. For this reason here we derive the conditional Wigner function of
the mode of frequency $\omega_{0}$:

$\displaystyle\mathcal{W}_{\epsilon}(\mu)\equiv\frac{1}{\pi^{2}}\int\text{d}^{2}\lambda
e^{-\lambda\mu^{*}+\lambda^{*}\mu}\text{Tr}\left\\{e^{-\lambda^{*}a_{0}+\lambda
a_{0}^{\dagger}}\ket{\psi_{\epsilon}(\tau)}\bra{\psi_{\epsilon}(\tau)}\right\\}$
(19) $\displaystyle=\frac{2e^{-2|\mu-\alpha|^{2}}}{\pi
P_{\epsilon}(\tau)}\left[\left(P_{\epsilon}(\tau)-|\tilde{f}_{\epsilon}^{(1)}(\tau,0)|^{2}\right)-|\tilde{f}_{\epsilon}^{(1)}(\tau,0)|^{2}(1-4|\mu-\alpha|^{2})\right.$
$\displaystyle\left.-4\text{Re}\left\\{\tilde{f}^{(1)*}_{\epsilon}(\tau,0)f^{(0)}_{\epsilon}(\tau)\left(\mu-\alpha\right)\right\\}+..\right],$

where
$\tilde{f}_{\epsilon}^{(1)}(\tau,\omega_{k}-\omega_{0})=\sqrt{\frac{1}{\varrho}}\int_{0}^{\tau}dtf^{(1)}_{\epsilon}(\tau,t)e^{-i(\omega_{k}-\omega_{0})t}$,
and $|\tilde{f}_{\epsilon}^{(1)}(\tau,0)|^{2}/P_{\epsilon}(\tau)$ is the
probability that the qubit spontaneously emits one photon of frequency
$\omega_{0}$. In the limit of monochromatic emission, no photon with frequency
$\omega_{k}\neq\omega_{0}$ is emitted, hence
$|\tilde{f}_{\epsilon}^{(1)}(\tau,0)|^{2}=p^{(1)}(\tau)$. The explicit
derivation of Eq. (19), including the terms coming from the multi-photon
emission (ellipsis), is given in the App. C.

Figure 2 shows the main result of this section: the conditional Wigner
function $\mathcal{W}_{\epsilon}(\mu)$ takes negative values when
$\Delta\mathcal{N}_{\epsilon}$ takes anomalous values. Figure 2(a) shows the
values of $\Delta\mathcal{N}_{\epsilon}$ varying the gate’s angle $\theta$ in
$[0,\pi]$. While $\Delta\mathcal{N}_{e}$ remains between 0 and -1,
$\Delta\mathcal{N}_{g}$ takes anomalous values (smaller than -1) for some
gate’s angle. Figures 2(d-e) show the Wigner function’s negativity,
$N(\mathcal{W}_{\epsilon})\equiv\int d^{2}\mu|\mathcal{W}_{\epsilon}(\mu)|-1$,
[27]. This quantity is zero when $\mathcal{W}_{\epsilon}(\mu)$ is non-negative
for every $\mu$, and bigger than zero otherwise. The plot shows
$N(\mathcal{W}_{e})$ is zero for every value of $\theta$ in the range
$[0,\pi]$, see Fig. 2(d), while $N(\mathcal{W}_{g})$ is non-zero for all the
values of $\theta$ such that $\Delta\mathcal{N}_{g}$ is smaller than $-1$, see
Fig. 2(e).

##  V Conclusion

We presented an anatomical study of a single-qubit gate implemented with a 1D
atom driven by a coherent field at resonance. The scattered field is
continuously monitored via heterodyne and post-selected over the outcomes of a
qubit’s projective measurement. Using a collision model, we derived the
analytical expression of the field’s Husimi-Q function conditioned on the
outcomes of the qubit’s measurement. The conditional Husimi grants access to
all the moments of the post-selected heterodyne distribution, i.e. the field’s
weak values. In particular, we used the conditional Husimi-Q function to
derive the weak value of the field’s energy change. As recently observed in
[14], this quantity can exceed by far the single quantum, hence reaching
anomalous values. Using the analytical expression of the atom-field
wavefunction, we derived the field’s conditional Wigner functions. Then, we
showed that, as expected from general foundational results [5], anomalous weak
values of the energy change correspond to non-zero Wigner function’s
negativity.

## Acknowledgments

We warmly thank Mattia Walschaers for his helpful advices. We gratefully
acknowledge financial support from the European Union’s Horizon 2020
Researchand innovation Programme under the Marie Sklodowska-Curie Grant
Agreement No. 861097, the Foundational Questions Institute Fund (Grant No.
FQXi-IAF19-01 and Grant No. FQXi-IAF19-05), the John Templeton Foundation
(Grant No. 61835), the ANR Research Collaborative Project “Qu-DICE” (Grant No.
ANR-PRC-CES47).

##  Appendix A Explicit expression of the field’s wavefunction

Explicit expressions of the functions
$f^{(j)}_{\epsilon}(\tau,\textbf{t}_{j})$, for the joint system’s initial
state being $\ket{g,\alpha}$, have been derived in [18]. Here we report them
for the sake of completeness.

$\displaystyle f^{(0)}_{g}(t)=e^{-\gamma
t/4}\left[\cos(\Omega^{\prime}t/2)+\sin(\Omega^{\prime}t/2)(\gamma)/(2\Omega^{\prime})\right],$
$\displaystyle f^{(0)}_{e}(t)=e^{-\gamma
t/4}\sin(\Omega^{\prime}t/2)\Omega/\Omega^{\prime}$

The amplitude of the emitted photons read:

$\displaystyle f^{(1)}_{\epsilon}(\tau,t)$
$\displaystyle=\sqrt{\gamma}f^{(0)}_{\epsilon}(\tau-t)e^{-i\omega_{0}t}f^{(0)}_{e}(t),$
$\displaystyle f^{(j>1)}_{\epsilon}(\tau,\textbf{t}_{j})$
$\displaystyle=(\sqrt{\gamma})^{j}f^{(0)}_{\epsilon}(\tau-
t_{j})e^{-i\omega_{0}t_{j}}\times$
$\displaystyle\left[\prod_{i=2}^{j}f^{(0)}_{e}(t_{i}-t_{i-1})e^{-i\omega_{0}t_{i-1}}\right]f^{(0)}_{e}(t_{1}).$

where $\Omega^{\prime}=\sqrt{(\Omega)^{2}-\gamma^{2}/4}$.

##  Appendix B Alternative derivation of the Husimi function

The field’s wavefunction in Eq.(4) can be rewritten in terms of discrete-
temporal modes:

$\displaystyle\ket{\psi_{\epsilon}(\tau)}=\frac{\bigotimes_{n}\mathcal{D}^{(n)}(\alpha_{n})\left(f^{(0)}_{\epsilon}(\tau)-\sum_{n=0}^{N-1}\sqrt{\Delta
t}f^{(1)}_{\epsilon}(\tau,t_{n})e^{-i\omega_{0}t_{n}}b^{\dagger}_{n}\right)+..}{\sqrt{P_{\epsilon}(\tau)}}\ket{0}$
(20)

where $N=\tau/\Delta t$.

The conditional Husimi function can be equivalently computed from the
wavefunction (20), including also the components arising from the spontaneous
emission of 2-photons. The components with $j>2$ are irrelevant in the present
study, as they can be neglected in the typical gate regime
$(\gamma\ll\Omega)$, but they can be included following a conceptually
analogous derivation. $\mathcal{Q}_{\epsilon}^{(n)}(s)$ can be rewritten as:

$\displaystyle\mathcal{Q}^{(n)}_{\epsilon}(s)\equiv\frac{1}{\pi}\text{Tr}\\{\Pi^{(n)}_{s-\alpha_{n}}\eta^{(n)}_{\epsilon}\\}$
(21)

where $\eta_{\epsilon}^{(n)}$ is reduced density matrix of the mode $b_{n}$
written in the displaced reference frame, and $\Pi_{s-\alpha_{n}}$ projects it
over the coherent state of amplitude $s-\alpha_{n}$. The field state in the
displaced reference frame (now including the components with 2-photon emitted)
reads:

$\displaystyle\ket{\phi_{\epsilon}}$
$\displaystyle=\frac{1}{\sqrt{P_{\epsilon}(\tau)}}\left(f^{(0)}_{\epsilon}(\tau)-\sum_{n}\sqrt{\Delta
t}f^{(1)}_{\epsilon}(\tau,t_{n})e^{-i\omega_{0}t_{n}}b^{\dagger}_{n}\right.$
$\displaystyle\left.+\sum_{n}\sum_{m>n}\Delta
tf^{(2)}_{\epsilon}(\tau,t_{n},t_{m})e^{-i\omega_{0}(t_{n}+t_{m})}b^{\dagger}_{n}b^{\dagger}_{m}\right)\ket{0}.$

Taking the trace over all the discrete-time modes $m\neq n$, we find
$\eta_{\epsilon}^{(n)}$:

$\displaystyle\eta^{(n)}_{\epsilon}$ $\displaystyle=\text{Tr}_{\otimes m\neq
n}\ket{\phi_{\epsilon}}\bra{\phi_{\epsilon}}$ (22)
$\displaystyle=\frac{1}{P_{\epsilon}(\tau)}\left[\ket{\phi_{\epsilon}^{01}}\bra{\phi_{\epsilon}^{01}}+\sum_{m\neq
n}\ket{\phi_{\epsilon}^{12}(m)}\bra{\phi_{\epsilon}^{12}(m)}\right.$
$\displaystyle\left.+\Delta t^{2}\sum_{m\neq n}\sum_{l\neq
n}|f^{(2)}_{\epsilon}(\tau,t_{m},t_{l})|^{2}\ket{0_{n}}\bra{0_{n}}\right]$

where

$\displaystyle\ket{\phi_{\epsilon}^{01}}=f_{\epsilon}^{(0)}(\tau)\ket{0_{n}}-\sqrt{\Delta
t}f_{\epsilon}^{(1)}(\tau,t_{n})e^{-i\omega_{0}t_{n}}\ket{1_{n}},$

and

$\displaystyle\ket{\phi_{\epsilon}^{12}(m)}=-\sqrt{\Delta
t}f_{\epsilon}^{(1)}(\tau,t_{m})e^{-i\omega_{0}t_{n}}\ket{0_{n}}$
$\displaystyle+\Delta
t(f_{\epsilon}^{(2)}(\tau,t_{n},t_{m})+f_{\epsilon}^{(2)}(\tau,t_{m},t_{n}))e^{-i\omega_{0}(t_{n}+t_{m})}\ket{1_{n}}.$

Plugging Eq. (22) in Eq. (21), we obtain:

$\displaystyle\mathcal{Q}^{(n)}_{\epsilon}(s)=\frac{e^{-|s-\alpha_{n}|^{2}}}{\pi
P_{\epsilon}(\tau)}\left[P_{\epsilon}(\tau)\right.$ (23) $\displaystyle+\Delta
t\left(|f^{(1)}_{\epsilon}(\tau,t_{n})|^{2}+\sum_{m>n}\Delta
t|f^{(2)}_{\epsilon}(\tau,t_{n},t_{m})|^{2}\right.$
$\displaystyle\left.+\sum_{m<n}\Delta
t|f^{(2)}_{\epsilon}(\tau,t_{m},t_{n})|^{2}\right)(|\alpha_{n}-s|^{2}-1)$
$\displaystyle-2\sqrt{\Delta
t}\text{Re}\left\\{e^{i\omega_{0}t_{n}}\left(s-\alpha_{n}\right)\left(f^{(1)}_{\epsilon}(\tau,t_{n})f^{(0)}_{\epsilon}(\tau)\right.\right.$
$\displaystyle+\sum_{m>n}\Delta
tf^{(2)}_{\epsilon}(\tau,t_{n},t_{m})f^{(1)}_{\epsilon}(\tau,t_{m})$
$\displaystyle\left.\left.+\sum_{m<n}\Delta
tf^{(2)}_{\epsilon}(\tau,t_{m},t_{n})f^{(1)}_{\epsilon}(\tau,t_{m})\right)\right\\}]$

Figure 3: (a) Comparison between $\Delta\mathcal{N}_{\epsilon}$ computed using
different truncation of the field’s wavefunction. The gate considered has
$\gamma\tau=3/40$, and the gate’s angle $\theta$ varies on the $x-$axis in
units of $\pi$. The exact values of $\Delta\mathcal{N}_{\epsilon}$ (solid
lines) have been computed from Eq. (18), by numerical integration of the
qubit’s forward and backwards Lindblad master equation. The values computed
truncating the field’s wavefunction at the component with 2 photons emitted
(dashed lines) match the exact solutions, while those computed with the
truncation at 1 photon emitted (dots) diverge from the exact result after
$\theta\approx 0.8\pi$. (b) Comparison between the change in the total field’s
number of excitations, $\Delta\mathcal{N}_{\epsilon}$, and the change of the
field’s number of excitations with frequency $\omega_{0}$,
$\Delta\mathcal{N}_{\epsilon}(\omega_{0})$, in the considered regime the
mismatch among the two data sets is negligible, i.e. the output field can be
considered as monochromatic.

Using this expression we find the following average change in the photon
number:

$\displaystyle\Delta\mathcal{N}_{\epsilon}=\frac{1}{P_{\epsilon}(\tau)}\left(p^{(1)}_{\epsilon}(\tau)+p^{(2)}_{\epsilon}(\tau)\right.$
(24)
$\displaystyle-2\text{Re}\left\\{f^{(0)}_{\epsilon}(\tau)\int_{0}^{\tau}dt\alpha^{*}_{t}e^{-i\omega_{0}t}f^{(1)}_{\epsilon}(\tau,t)\right\\}$
$\displaystyle-2\text{Re}\left\\{\int_{0}^{\tau}dt\int_{t}^{\tau}dt^{\prime}f^{(1)}_{\epsilon}(\tau,t^{\prime})\alpha^{*}_{t}e^{-i\omega_{0}t}f^{(2)}_{\epsilon}(\tau,t,t^{\prime})\right.$
$\displaystyle\left.\left.+\int_{0}^{\tau}dt\int_{0}^{t}dt^{\prime}f^{(1)}_{\epsilon}(\tau,t^{\prime})\alpha^{*}_{t}e^{-i\omega_{0}t}f^{(2)}_{\epsilon}(\tau,t^{\prime},t)\right\\}\right).$

Figure 3(a) shows that, in the regime considered, i.e. $\gamma^{-1}=8\tau$,
Eq. (24) matches the exact expression of $\Delta\mathcal{N}_{\epsilon}$ given
in Eq. (18).

##  Appendix C Wigner function of the mode with frequency $\omega_{0}$

Here we give the explicit derivation of the Wigner function in Eq. (19),
including also the components arising from the spontaneous emission of
2-photons. The components with $j>2$ are irrelevant in the present study, as
they can be neglected in the typical gate regime $(\gamma\ll\Omega)$, but they
can be included following a conceptually analogous derivation. Let us first
rewrite the field’s wavefunction, Eq. (4), in terms of the frequency modes
using the inverse transformation of Eq. (2):

$\displaystyle\ket{\psi_{\epsilon}}=\frac{\mathcal{D}(\alpha)\left(f^{(0)}_{\epsilon}(\tau)-\sum_{k}\tilde{f}^{(1)}_{\epsilon}(\tau,\omega_{k}-\omega_{0})a^{\dagger}_{k}+..\right)\ket{0}}{\sqrt{P_{\epsilon}(\tau)}},$
(25)

where
$\tilde{f}_{\epsilon}^{(1)}(\tau,\omega_{k}-\omega_{0})=\sqrt{\frac{1}{\varrho}}\int_{0}^{\tau}dtf^{(1)}_{\epsilon}(\tau,t)e^{-i(\omega_{k}-\omega_{0})t}$,
and $a_{k}$ destroys a photon of frequency $\omega_{k}$.

Now le us notice that $\mathcal{W}_{\epsilon}(\mu)$ can be rewritten as:

$\displaystyle\mathcal{W}_{\epsilon}(\mu)$
$\displaystyle\equiv\frac{1}{\pi^{2}}\int\text{d}^{2}\lambda
e^{-\lambda(\mu-\alpha)^{*}+\lambda^{*}(\mu-\alpha)}\text{Tr}\left\\{e^{-\lambda^{*}a_{0}+\lambda
a_{0}^{\dagger}}\zeta_{\epsilon}\right\\}$ (26)

where $\zeta_{\epsilon}$ is reduced density matrix of the mode of frequency
$\omega_{0}$ written in the displaced reference frame. In order to obtain
$\zeta_{\epsilon}$ let us first write the field state (Eq.(25)) in the
displaced reference frame, including the components with 2-photon emitted, in
terms of frequency modes:

$\displaystyle\ket{\phi_{\epsilon}}=\frac{1}{\sqrt{P_{\epsilon}(\tau)}}\left(f^{(0)}_{\epsilon}(\tau)-\sum_{k}\tilde{f}^{(1)}_{\epsilon}(\tau,\omega_{k}-\omega_{0})a^{\dagger}_{k}\right.$
$\displaystyle\left.+\sum_{k}\sum_{k^{\prime}}\tilde{f}^{(2)}_{\epsilon}(\tau,\omega_{k}-\omega_{0},\omega_{k^{\prime}}-\omega_{0})a^{\dagger}_{k}a^{\dagger}_{k^{\prime}}\right)\ket{0},$

where

$\tilde{f}_{\epsilon}^{(2)}(\tau,\omega_{k}-\omega_{0},\omega_{k^{\prime}}-\omega_{0})=\frac{1}{\varrho}\int_{0}^{\tau}dte^{-i(\omega_{k}-\omega_{0})t}\int_{0}^{t}dt^{\prime}f^{(2)}_{\epsilon}(\tau,t^{\prime},t)e^{-i(\omega_{k}-\omega_{0})t^{\prime}}.$

Now we can define the reduced density matrix of the mode of frequency
$\omega_{0}$ taking the trace over the modes with $k\neq 0$.

$\displaystyle\zeta_{\epsilon}$ $\displaystyle=\text{Tr}_{\otimes k\neq
0}\ket{\phi_{\epsilon}}\bra{\phi_{\epsilon}}$
$\displaystyle=\frac{1}{P_{\epsilon}(\tau)}\left[\ket{\varphi_{\epsilon}^{012}}\bra{\varphi_{\epsilon}^{012}}+\sum_{k\neq
0}\ket{\varphi_{\epsilon}^{12}(k)}\bra{\varphi_{\epsilon}^{12}(k)}\right.$
$\displaystyle\left.+\sum_{k^{\prime}\neq 0}\sum_{k\neq
0}|\tilde{f}^{(2)}_{\epsilon}(\tau,\omega_{k}-\omega_{0},\omega_{k^{\prime}}-\omega_{0})|^{2}\ket{0}\bra{0}\right],$

where

$\displaystyle\ket{\varphi_{\epsilon}^{012}}=f_{\epsilon}^{(0)}(\tau)\ket{0}-\tilde{f}_{\epsilon}^{(1)}(\tau,0)\ket{1}+\sqrt{2}\tilde{f}_{\epsilon}^{(2)}(\tau,0,0)\ket{2},$

and

$\displaystyle\ket{\varphi_{\epsilon}^{12}(k)}=-\tilde{f}_{\epsilon}^{(1)}(\tau,\omega_{k}-\omega_{0})\ket{0}$
$\displaystyle+(\tilde{f}_{\epsilon}^{(2)}(\tau,0,\omega_{k}-\omega_{0})+\tilde{f}_{\epsilon}^{(2)}(\tau,\omega_{k}-\omega_{0},0))\ket{1}.$

The matrix $\zeta_{\epsilon}$ can be simplified:

$\displaystyle\zeta_{\epsilon}$
$\displaystyle=\frac{1}{P_{\epsilon}(\tau)}[\left(P_{\epsilon}(\tau)-|\tilde{f}_{\epsilon}^{(1)}(\tau,0)|^{2}-2|\tilde{f}_{\epsilon}^{(2)}(\tau,0,0)|^{2}\right)\ket{0}\bra{0}$
$\displaystyle-\tilde{f}_{\epsilon}^{(1)*}(\tau,0)\tilde{f}_{\epsilon}^{(0)}(\tau)\ket{0}\bra{1}+h.c.$
(27)
$\displaystyle+|\tilde{f}_{\epsilon}^{(1)}(\tau,0)|^{2}\ket{1}\bra{1}+\sqrt{2}\tilde{f}_{\epsilon}^{(2)*}(\tau,0,0)\tilde{f}_{\epsilon}^{(0)}(\tau)\ket{0}\bra{2}+h.c.$
$\displaystyle-\sqrt{2}\tilde{f}_{\epsilon}^{(2)*}(\tau,0,0)\tilde{f}_{\epsilon}^{(1)}(\tau,0)\ket{1}\bra{2}+h.c.$
$\displaystyle+2|\tilde{f}_{\epsilon}^{(2)}(\tau,0,0)|^{2}\ket{2}\bra{2}]$

where we neglected the terms containing
$\tilde{f}_{\epsilon}^{(2)}(\tau,0,\omega_{k}-\omega_{0})$ or
$\tilde{f}_{\epsilon}^{(2)}(\tau,\omega_{k}-\omega_{0},0)$ with $k\neq 0$
since they correspond to the unlikely emission of two photons with frequency
different from $\omega_{0}$. The Wigner function can be now computed
analytically plugging Eq.(C) in Eq.(26):

$\displaystyle\mathcal{W}(\mu)=\frac{2e^{-2|\mu-\alpha|^{2}}}{\pi
P_{\epsilon}(\tau)}\left[\left(P_{\epsilon}(\tau)-|\tilde{f}_{\epsilon}^{(1)}(\tau,0)|^{2}-2|\tilde{f}_{\epsilon}^{(2)}(\tau,0,0)|^{2}\right)\right.$
$\displaystyle-|\tilde{f}_{\epsilon}^{(1)}(\tau,0)|^{2}L_{1}(4|\mu-\alpha|^{2})+2|\tilde{f}_{\epsilon}^{(2)}(\tau,0,0)|^{2}L_{2}(4|\mu-\alpha|^{2})$
$\displaystyle-8\text{Re}\\{\tilde{f}_{\epsilon}^{(2)*}(\tau,0,0)\tilde{f}_{\epsilon}^{(1)}(\tau,0)(\mu-\alpha)^{*}\\}(2|\mu-\alpha|^{2}-1)$
$\displaystyle+8\text{Re}\\{\tilde{f}_{\epsilon}^{(2)*}(\tau,0,0)f_{\epsilon}^{(0)}(\tau)(\mu-\alpha)^{2}\\}$
$\displaystyle\left.-4\text{Re}\\{f^{(0)}_{\epsilon}(\tau)\tilde{f}^{(1)*}_{\epsilon}(\tau,0)\left(\mu-\alpha\right)\\}\right],$
(28)

where $L_{n}(x)$ are the Laguerre polynomials. The change in the number of
excitations of the field with frequency $\omega_{0}$, for the two post-
selections, can be computed from the corresponding Wigner functions:

$\displaystyle\Delta\mathcal{N}_{\epsilon}(\omega_{0})=\int
d^{2}\mu\left(|\mu|^{2}-\frac{1}{2}\right)\mathcal{W}_{\epsilon}(\mu)-|\alpha|^{2}$
(29)
$\displaystyle=\frac{1}{P_{\epsilon}(\tau)}\left(|\tilde{f}^{(1)}_{\epsilon}(\tau,0)|^{2}-2\text{Re}\\{\alpha\tilde{f}^{(1)*}_{\epsilon}(\tau,0)f^{(0)}_{\epsilon}(\tau)\\}+..\right).$

When the scattered field can be considered as monochromatic
$\Delta\mathcal{N}_{\epsilon}(\omega_{0})\approx\Delta\mathcal{N}_{\epsilon}$,
see Fig. 3(b).

## References

  * Aharonov  _et al._ [1988] Y. Aharonov, D. Z. Albert, and L. Vaidman, How the result of a measurement of a component of the spin of a spin-1/2 particle can turn out to be 100, Phys. Rev. Lett. 60, 1351 (1988).
  * Wiseman and Milburn [2009] H. M. Wiseman and G. J. Milburn,  _Quantum measurement and control_ (Cambridge university press, 2009).
  * Dressel  _et al._ [2010] J. Dressel, S. Agarwal, and A. N. Jordan, Contextual values of observables in quantum measurements, Phys. Rev. Lett. 104, 240401 (2010).
  * Aharonov and Vaidman [1990] Y. Aharonov and L. Vaidman, Properties of a quantum system during the time interval between two measurements, Phys. Rev. A 41, 11 (1990).
  * Pusey [2014] M. F. Pusey, Anomalous weak values are proofs of contextuality, Phys. Rev. Lett. 113, 200401 (2014).
  * Aharonov  _et al._ [2002] Y. Aharonov, A. Botero, S. Popescu, B. Reznik, and J. Tollaksen, Revisiting hardy’s paradox: counterfactual statements, real measurements, entanglement and weak values, Physics Letters A 301, 130 (2002).
  * Williams and Jordan [2008] N. S. Williams and A. N. Jordan, Weak values and the leggett-garg inequality in solid-state qubits, Phys. Rev. Lett. 100, 026804 (2008).
  * Spekkens [2008] R. W. Spekkens, Negativity and contextuality are equivalent notions of nonclassicality, Phys. Rev. Lett. 101, 020401 (2008).
  * Booth  _et al._ [2021] R. Booth, U. Chabaud, and P.-E. Emeriau, Contextuality and wigner negativity are equivalent for continuous-variable quantum measurements, arXiv preprint arXiv:2111.13218 (2021).
  * Haferkamp and Bermejo-Vega [2021] J. Haferkamp and J. Bermejo-Vega, Equivalence of contextuality and wigner function negativity in continuous-variable quantum optics, arXiv preprint arXiv:2112.14788 (2021).
  * Bertet  _et al._ [2001] P. Bertet, S. Osnaghi, A. Rauschenbeutel, G. Nogues, A. Auffeves, M. Brune, J. Raimond, and S. Haroche, A complementarity experiment with an interferometer at the quantum–classical boundary, Nature 411, 166 (2001).
  * Wiseman [2002] H. M. Wiseman, Weak values, quantum trajectories, and the cavity-qed experiment on wave-particle correlation, Phys. Rev. A 65, 032111 (2002).
  * Dressel  _et al._ [2014] J. Dressel, M. Malik, F. M. Miatto, A. N. Jordan, and R. W. Boyd, Colloquium: Understanding quantum weak values: Basics and applications, Reviews of Modern Physics 86, 307 (2014).
  * Stevens  _et al._ [2022] J. Stevens, D. Szombati, M. Maffei, C. Elouard, R. Assouly, N. Cottet, R. Dassonneville, Q. Ficheux, S. Zeppetzauer, A. Bienfait, A. N. Jordan, A. Auffèves, and B. Huard, Energetics of a single qubit gate, Phys. Rev. Lett. 129, 110601 (2022).
  * Cilluffo  _et al._ [2020] D. Cilluffo, A. Carollo, S. Lorenzo, J. A. Gross, G. M. Palma, and F. Ciccarello, Collisional picture of quantum optics with giant emitters, Phys. Rev. Research 2, 043070 (2020).
  * Ciccarello [2017] F. Ciccarello, Collision models in quantum optics, Quantum Measurements and Quantum Metrology 4, 53 (2017).
  * Gross  _et al._ [2018] J. A. Gross, C. M. Caves, G. J. Milburn, and J. Combes, Qubit models of weak continuous measurements: Markovian conditional and open-system dynamics, Quantum Science and Technology 3, 024005 (2018).
  * Maffei  _et al._ [2022] M. Maffei, P. A. Camati, and A. Auffèves, Closed-system solution of the 1d atom from collision model, Entropy 24, 10.3390/e24020151 (2022).
  * Loudon [2000] R. Loudon,  _The quantum theory of light_ (OUP Oxford, 2000).
  * Gardiner and Collett [1985] C. W. Gardiner and M. J. Collett, Input and output in damped quantum systems: Quantum stochastic differential equations and the master equation, Phys. Rev. A 31, 3761 (1985).
  * Dressel and Jordan [2012] J. Dressel and A. N. Jordan, Weak values are universal in von neumann measurements, Phys. Rev. Lett. 109, 230402 (2012).
  * Campagne-Ibarcq  _et al._ [2014] P. Campagne-Ibarcq, L. Bretheau, E. Flurin, A. Auffèves, F. Mallet, and B. Huard, Observing interferences between past and future quantum states in resonance fluorescence, Phys. Rev. Lett. 112, 180402 (2014).
  * Stevens  _et al._ [2021] J. Stevens, D. Szombati, M. Maffei, C. Elouard, R. Assouly, N. Cottet, R. Dassonneville, Q. Ficheux, S. Zeppetzauer, A. Bienfait, A. N. Jordan, A. Auffèves, and B. Huard, Energetics of a single qubit gate (2021), arXiv:2109.09648 [quant-ph] .
  * Rogers and Jordan [2022] S. Rogers and A. N. Jordan, Post-selection and quantum energetics, arXiv preprint arXiv:2207.14194 (2022).
  * Walls and Milburn [2008] D. Walls and G. J. Milburn, Representations of the electromagnetic field, in  _Quantum Optics_ (Springer, 2008) pp. 57–72.
  * Gammelmark  _et al._ [2013] S. Gammelmark, B. Julsgaard, and K. Mølmer, Past quantum states of a monitored system, Phys. Rev. Lett. 111, 160401 (2013).
  * Kenfack and Zyczkowski [2004] A. Kenfack and K. Zyczkowski, Negativity of the wigner function as an indicator of non-classicality, Journal of Optics B: Quantum and Semiclassical Optics 6, 396 (2004).