Real-time ghost imaging of Bell-nonlocal entanglement between a photon and a quantum memory

Certification of nonlocality of quantum mechanics is an important fundamental test that typically requires prolonged data collection and is only revealed in an in-depth analysis. These features are often particularly exposed in hybrid systems, such as interfaces between light and atomic ensembles. Certification of entanglement from images acquired with single-photon camera can mitigate this issue by exploiting multiplexed photon generation. Here we demonstrate this feature in a quantum memory (QM) operating in a real-time feedback mode. Through spatially-multimode spin-wave storage the QM enables operation of the real-time ghost imaging (GI) protocol. By properly preparing the spatial phase of light emitted by the atoms we enable observation of Bell-type nonlocality from a single image acquired in the far field as witnessed by the Bell parameter of $S=2.227\pm0.007>2$. Our results are an important step towards fast and efficient utilization of multimode quantum memories both in protocols and in fundamental tests.

correlations. Tremendous efforts have been put to close numerous loopholes [3,4,5,6] and to utilize different degrees of freedom (DoF) such as time-bin [6,7], position [8] and momentum [9] or angular momentum of photons [10] to trustfully rule out the local hidden variables theories by violation of the Bell inequality [11]. With the development of experimental quantum optics, the Bell test emerged as a versatile benchmarking tool providing a performance measure for various quantum protocols [12,13]. The Bell inequality [11] arose as a response to work by Einstein, Podolsky and Rosen (EPR) [14] concerning completeness of quantum theory. The so-called EPR paradox suggesting the failure of local realism has been initially demonstrated with quadratures of light [15,16] and lately with position and momenta correlated photons [17,18,19,20]. The quantum ghost imaging (GI) [21,22] -a technique that uses correlated photon pairs to reconstruct an image from photons that do not interact with the object being imaged -emerged from the latter.
In the modern quantum GI protocol the object being imaged is placed in either near or far field of an EPR photon source. The source generates correlated photons in two distinct beamsa signal and idler. The object is illuminated by the signal photons which are then detected using non-spatially-resolving bucket detector acting as a trigger source for second, spatially-resolving detector -a camera placed in the idler beam in the same optical plane as the object. As the camera registers idler photons only when a signal photon is transmitted through the object (a trigger signal is generated) the idler photon events build up the image. In such scenario the idler pho-tons have to be additionally time-delayed to surpass the trigger signal electronic propagation delay, which was up to date only achieved via an image-preserving optical delay line [23], while in other cases researchers relied on post-selection of correlated events. On the other hand, a spatiallymultimode QM [24] is a natural choice when one needs to store the idler photon and release it upon the trigger signal, thus gaining more versatility, potentially much larger storage times and simultaneously avoiding difficult engineering of delay lines.
Here we employ a wavevector-multiplexed emissive QM [24] to demonstrate a real-time GI of polarization and wavevector DoF Bell-type correlations. We utilize our ability of EPR-type entanglement generation [25] to prepare polarization Bell-states in many wave-vector modes. The tens of µs-long storage time of our memory enables us to easily realize a heralded GI setup without any additional optical delay line. The images of Belltype correlations are acquired using a state-of-the art single photon sensitive camera giving almost 79% visibility and violation of the Bell inequality by 32 standard deviations. With that, we bring this extremally versatile approach to Bell inequalities to a hybrid atom-photon system. This is not only of fundamental interest, but the atomic medium brings about a set of possible manipulations [26] and interactions [27].
The role of quantumness in GI has been a topic of debate for past two decades. While it is currently known that the ghost images can be produced with classical light [28,29] the quantum GI can lead to improved contrast or signal to noise ratio (SNR) [30,31] and resolution [32] in the produced image. Therefore, the current question is not the quantum nature of GI but rather if with the quantum illumination a new features can be observed. Finally, the recent demonstrations of imaging of Bell-type nonlocal behavior [33] and quantum GI utilizing higher order correlations [34] suggest a sparking interest in this topic, with our work bringing this issue of fundamental interest into a hybrid atom-photon system.
We use wavevector multiplexed multimode QM as a quantum light source for phase sensitive GI [24]. Our experimental setup is shown in Fig.  1(a) and described in more detail in the Supplementary Information. In the memory, the signal photons are generated together with spin waves.  After a programmable delay, the spin wave is converted into idler photons. The resulting photon pair is correlated in positions and anti-correlated in momenta (EPR state), while the polarizations are uncorrelated and simply set by collection optics. Therefore, we may write the resulting twophoton state as: where H stands for horizontal polarization and the biphoton wavefunction ψ in the realistic scenario can be approximated by [25,24,18]: where the Gaussian widths κ and σ −1 corresponds respectively to strength of the momenta and position correlations. Furthermore, as we are limited by the numerical aperture rather than spread of the phase matching spectrum determining the set of available emission angles, we will assume perfect correlation in position and take σ → 0.
The signal and idler photons are collected by two identical far-field imaging setups (represented as a single lenses on Fig. 1(a)). Next, the photons pass through setups similar to MZI, where each of the beams (either signal or idler ) is split in half and resulting components (upper-u ○ and lowerd ○) are joined together on the polarizing beam splitter (PBS), with a help of a half-wave plate. Additionally, as the MZIs are placed in the far-filed of the ensemble, tilting one of the MZI mirrors results in a wavevector-dependent phase between the two joined paths (see Fig. 1(a)). The resulting state can be written as: where N is the normalization constant,ψ(k s , k i ) is the renormalized ψ(k s − δk/2, k i − δk/2) and δk = δkŷ with δk = 286 mm −1 is the wavevector shift applied to the upper ( u ○ on Fig. 1(a)) part of beam to superimpose it on the lower part ( d ○ on Fig. 1(a)). By ϕ s(i) (k s(i) ) we denote the additional phase added before the superimposition at each side. The |ψ B represents a wavevectorindexed superposition of polarization DoF Bellstates and exhibits both EPR and Bell-type correlations.
To exploit the latter we perform a polarization measurement over large set of signal and idler wavevectors using a GI technique with feedback enabled by the QM feature of our source. In contrast to "single-channel" [35] or "dual-channel" [2] experiments we implement a hybrid scenario in which one party (signal ) measures using a "single channel" polarizer and a bucket detector when the second one (idler ) uses a "dual-channel" polarizer (BD on Fig. 1(a)) and single-photonsensitive camera (I-CMOS) [36] placed in the farfield of the atomic ensemble. The bucket detector [a multimode-fiber-coupled avalanche photiodiode (APD)] is connected to the experimental sequence controller (FPGA), which decides whether to perform the readout and gate the camera or not (experimental sequence in Fig. 1(b)). This way the readout process, and most importantly, the camera measurement is performed only if a signal photon is detected. This feedback is the central point of our experimental implementation and provides a performance boost compared with hitherto post-selection approaches.
The joint measurement of signal -idler pairs can be described by wavevector-indexed set of POVMs: where |θ = (|H + e iθ |V )/2 represents the measurement setting on the Bloch sphere's equator and by ± we denote the two possible outcomes on the "dual-channel" polarizer. Then, the outcome probability distribution is calculated as: is the phase difference profile and the integration goes over the bucket detector area, which in our case is a circle bounded by the multimode fiber numerical aperture (NA=0.2). From Eq. (5) we see that the resolution of the phase-phase sensitive GI is limited by the strength of the wavevector correlation described by Eq. (2), i.e the phase change in the signal arm ϕ s (k s ) should be slow when compared to anti-correlation width κ ≈ 6 mm −1 (see Supplementary Information). In our setup we choose the ϕ s (k s ) to be linearly and slowly varying mostly along the y direction and similarly for ϕ i (k i ) but with a higher slope. To measure the phase profiles in the signal and idler arms we classically simulate the  outcome by seeding the memory with coherent state, using an additional laser beam focused at the atomic cloud centre (see Supplementary Information and [26]). For this measurement we replace the bucket detector with a camera and calcite beam displacer (see Supplementary Information for details), and register intensity fringes in both arms. We collect frames for various measurement settings {θ s , θ i } ∈ [0, 2π] × [0, 2π] then for each frame we retrieve the phase using standard Fourier-transform based procedure [37], and finally average the results. The retreived phase profiles are presented in Fig. 2(a), where we also plot the combined profile corresponding to the φ(k s , k i ) phase difference profile. Figure 2(b) presents the comparison between the classically simulated (from retrieved phase) and measured correlation function C 0,0 (k i ) defined as: where by n θs,θ i ± (k i ) we denote the number of registered idler photons with k i wavevector in each port of the "dual channel" polarizer. From Eq. (5) we expect the correlation function to be proportional to cos(φ(−k s , k i )), and this is indeed what we see. The C 0,0 (k i ) map is build from 2 × 10 7 experiment repetitions and contain 3 × 10 5 counts corresponding to signal -idler coincidences. In Fig. 2(c) we plot k x -averaged fringes for both maps where we see good agreement between the expectation and measurement. The only parameter fitted there is the proportionality constant interpreted as the visibility V = 78%.
To perform the Bell test in our hybrid scenario we acquire ghost images for four different measurement settings (θ s , θ i ) ∈ {(0, 0), ( π /2, 0), (0, π /2), ( π /2, π /2)} =: M and for one additional (marginal) setting denoted as {∞, 0} with the the single channel polarizer removed. We use a variation of the CHSH inequality [38,39,2]: with the Bell parameter S defined as follows (see Supplementary Information for derivation): Thanks to the wavevector dependent phase difference φ(k s , k i ) that in our case changes more than 6π over observation region, the |ψ B state (Eq. (3)) maximally violates the inequality (7) for any two pairs of measurement settings separated by π/2 : |θ s − θ s | = |θ i − θ i | = π/2. It stems from the fact that there is always a particular k i and thus φ(k s , k i ) for which these settings are optimal, i.e. lead to maximal violation of inequality (7). Therefore, for the sake of simplicity we choose the angles to be 0 or π/2. In Fig. 3(a) we present acquired ghost images for the five particular measurement settings, for both polarizer channels denoted as + and −. From these images we calculate the correlation functions as defined by Eq. (6). The k x -averaged results are presented in Fig. 3(b). From these, by fitting the cosine function we obtain the following visibilities {77.9%, 78.6%, 77.2%, 78.9%}± 0.5% corresponding to the four measurement settings from M. For the marginal setting (with the "single channel" polarizer removed) we obtain C ∞,θ i (k i ) = (1 ± 3) × 10 −3 that together with the visibilities give S = 2.213 ± 0.008. This violates the CHSH inequality (7)  observed fringes. The less than 100% visibility is a result of some imperfections present at different stages of our setup, which are discussed in detail in the Supplementary Information. To directly demonstrate the high visibility of the correlation function for the four measurement bases we introduced the wavevector-dependent phase difference profile φ(k s , k i ) in the generated state. Alternatively, as this phase is built from two independent phase profiles in signal and idler arms we, could interpret it as to be responsible for different measurement settings for different wavevectors k i . This way, by treating the MZIs with the known phase profiles ϕ s(i) (k i ) as a parts of the measurement devices we can run the Bell test on the wavevector DoF entangled state given by Eq.(1). In this way, we register many independent (ϕ s , ϕ i ) measurement settings on a single ghost image. Consequently, it is convenient to redefine the Bell S parameter using the Freedman and Clauser formula [1] modified for our hybrid scenario (see Supplementary Information for derivation): where C(φ = ϕ s − ϕ i ) is defined using Eq. (6) with n θs,θ i ± (k i ) averaged over the wavevectors k i corresponding to the same phase φ: The marginal correlation function C ∞ (α) is defined in the same manner and is experimentally found to be independent of k i and thus φ as can be seen in Fig. 3(b). Figure 4 presents values of C(φ) correlation function obtained from single ghost image (the (0, 0) setting of Fig. 3(a)). The ensemble of signal and idler phase samples used to calculate C(φ) is drawn in the inset (Fig. 4(i)) where the coloring, similarly to Fig. 2(b), represents the value of the correlation function for each (ϕ s , ϕ i ). We clearly see that the correlation varies with the phase difference φ = ϕ s − ϕ i as expected. With the definition of the Bell parameter given by Eq. Eq.(7) by more than 32 SDs. In summary, we have employed an emissive QM as a quantum light source for phase-sensitive GI setup and demonstrated images of Bell-type correlations. The QM generates entangled signal and idler photon pairs in many wavevector modes and stores the idler photon for controllable delay time. The idler photon release is controlled by real-time feedback allowing us to realize the ghost imaging protocol without any additional image-preserving delay line, as comapred with Ref. [33]. To the best of our knowledge, this is the first demonstration of quantum-memoryassisted GI experiment, and effectively a demonstration of atom-photon Bell-type entanglement in a single image.
Let us finally discuss potential applications and direct advantages over previosuly demonstrated ghost imaging experiments, based on spontaneous parametric down-conversion (SPDC). In the Table 1 we compare our results with other works that use delay line (DL) instead of quantum memory (QM) to acquire the ghost images. In the SPDC experiments the signal -idler coincidence rate (R) is limited by the maximum gating frequency of the image sensor and varies from few to few hundreds coincidences per second (cps). In our setup we achieve ≈ 6 cps as we are limited by the atom cooling and trapping period that occupies 89% of the sequence. The instantaneous rate is therefore around 60 cps and can be doubled in non-phase sensitive approach by removing the interferometers. This is com-parable with most SPDC approaches although with faster camera gating SPDC-based GI could potentially reach much higher rates. The available number of modes (M) and achievable visibility (or equivalently signal to noise ratio) is comparable in both cases. The parameter that we want to focus on is the available time delay (τ ) needed to properly gate the camera which in case of SPDC experiments never exceeds 100 ns (30 m of additional optical path). In our setup the delay can be set programatically and can be as long as the wavevector-dependent memory lifetime [40], that for 45 µs allows retrieval of 50% of the modes. Such long delay can be useful in applications as quantum ghost LIDAR that can be resistant to detection path turbulences [41] and quantum radar [42,43] where the quantum illumination leads to improvement of signal to noise ratio [44]. Another difference is that the signal and idler photons emitted from our memory have few-MHz linewidths and thus they are easier to filter from the broadband background noise and can be used for remote sensing of inherently narrowband optomechanical and atomic systems, facilitating for example magnetic field imaging. Moreover, presented system equipped with a more advanced signal photon detection and combined with wavefront shaping techniques based on fast micro-mirror arrays or spatial light modulators could lead to new adaptive quantum GI schemes [45]. As the phase modulation can be realized by fast all-optical spin-wave modulation techniques [26,46,37] that effectively reshape the idler photon spatial structure, the phase reshaping can be applied conditionally on signal photon measurement outcome. We also envisage that via feedback one may shape the idler light not only spatially, but also in terms of its statistics (akin to heralding single or multi-photon states) for protocols such as quantum image distillation [47]. Our technique could also be applied in quantum information schemes such as quantum-secured imaging [48], quantum secure ghost imaging [49].  where P a,b = p a,b + − p a,b − is the probability correlation function. As all of the probabilities in (17) are associated with signal -idler coincidences the inequality can be tested without the total number of emissions being known. However, to trustfully perform measurements needed to test this inequality the source has to be very stable in time, especially when it comes to the polarizer removal (∞ setting). Therefore, to perform the Bell test in our case we use the standard fair sampling assumption and take the coincidences correlation function (10) as a fair estimate of the probability correlation function P θs,θ i = C θs,θ i /2 for any pair of measurements settings (θ s , θ i ) excluding the special case with the signal polarizer removed, for which P ∞,θ i = C ∞,θ i . With these assumptions p ∞,b + + p ∞,b − = 1 and the inequality (17) finally becomes: Further, when C θs, which is the correlation function equivalent of the inequality derived by Freedman for probabilities [1].

Visibility limitations
Here we summarize all factors contributing to reduced visibility in correlation function fringes. First of all, the ultimate visibility (assuming perfect optical components) is limited by the purity of the generated photons pairs. Any stray noise present in the idler and indirectly signal arm will appear as a nonzero floor on the acquired ghost images. As the noise comes from uncorrelated photon pairs it will appear also outside the region determined by the signal observation region (limited by the bucket detector sensitivity area). Therefore, by looking outside the correlation region we can get the average amount of the noise presentn bckg and then estimate the ultimate visibility as: V ult = (n sig −n bckg )/(n sig +n bckg ), wheren sig = 1 /A• (n ∞,0 + (k i )+n ∞,0 + (k i ))dk i is average number of registered coincidences in the circular area A • . In our case the ultimate visibility amounts about 89%. It is also noteworthy that this formula can be rewritten using Glauber second order correlation function of signal and idler pairs, as g (2) si n tot /n bckg ≈ 16.5. The imperfections of the optical components, including mirrors, polarizers and waveplates lower the achievable visibility by a factor of 0.97 2 . Additionally, finite correlation strength characterized by κ limits the visibility for fast varying phase profiles in the signal arm, however as this phase slope in our case is low this effect has minimal contribution (less than 1%) to the total visibility. Finally, the remaining drop (by a factor equivalent to about 97%) is most probably caused by the residual mismatch of the wavevector shift δk between the two MZIs.
The next sections of this Supplementary Information treat the details of various effects impacting the visbility.

Noise and photon pairs purity
The ultimate visibility that could be achieved in our setup when ideal optical components are used is limited by purity of the generated photon pair state. As the signal -idler pair generation process is purely probabilistic there always is a chance of multiple-pair generation in one shot. The higher order pairs similarly as spurious noise photons coming from the read laser leakage and I-CMOS sensor dark counts will appear at the acquired images as a constant noise floor, present even outside the correlation region determined by the bucked detector area. Therefore, by looking outside the correlation circle we can estimate the total amount of the noise present and hence calculate the ultimate visibility by comparing the noise level with the correlated coincidences.
In Fig. (5) we present the percentage noise and signal values taken from measurement with (0, 0) analyzer settings. From these we estimate the ultimate visibility to be V ult = (n sig −n bckg )/(n sig + n bckg ) ≈ 88.6%.  si between signal and idler photons as a function of mean signal photon numbern s . The solid curve represents a simple model fitted to the data. The ultimate visibility V ult corresponding to the measured g (2) si function values is present on the second vertical axis.

Correlation strength κ and its impact on visibility
The generated biphoton wavefunction ψ(k s , k i ) is characterized by near-field (σ) and far-field (κ) correlations strengths. In our case, since we are working with wavevector correlations, the κ parameter is of the most importance. It limits, the achievable resolution and in the case of the Bell-correlations demonstration it leads to the drop of the visibility of observed quantum fringes. The visibility reduction due to finite κ in this case can be estimated by evaluating the integral (see Eq. (5) of the main article) p ± (k i ) = |ψ(k s − δk, k i )| 2 cos 2 ϕ(ks)−ϕ(k i ) 2 dk s for a linearly varying ϕ(k s ), which without loss of generality can by assumed to vary only in thex direction, ϕ(k s ) = αk x . Additionally, as mentioned in the main article the wavevector-space field of view is limited by technical constraints rather than the spread σ of the generated state and thus we take σ → 0. In this case, the integral gives (1 + e −α 2 κ 2 /2 cos(ϕ s (−k i ) − ϕ(k i ))/2, where we can identify the visibility to be V κ = e −α 2 κ 2 /2 . To estimate the correlation strength κ and thus the reduction of visibility we performed additional measurement with the bucked detector replaced by camera. The results in form of correlation maps in center of mass coordinates (k s + k i ) integrated over the second direction (k s − k i ) are present in Fig. (7). The maps are drawn for two channels (+ and −) of the beam displacer (BD) with the noise backgroundn sni subtracted. The solid lines represents the fitted Gaussian curves which give estimates of κ in each direction. Since, the estimates of κ have similar values as the final estimate we take the average over the four values and obtain κ = (5.9 ± 0.7) mm −1 . This, together with our signal phase slope α ≈ 12.4 mrad × mm gives V κ ≈ 99.7% which is negligible when compared to other imperfections.

Visibility drop due to the MZIs δk mismatch
To derive the formula for the desired Bell-like sate |ψ B we assumed that the two MZIs have the same (matched) wavevector shift δk. In the experiential realization, however, these two shifts will be always matched with finite precision ξk. If this is the case, the generated state can be no longed described by the compact form, where the superposition is only at the polarization level as in Eq. limit we obtain: where we identify the visibility as V ξk = e −ξk 2 /(8κ 2 ) which we estimate to be 97% that correspond to ξk ≈ 0.5κ.

Classical interference measurements
To measure the phase profiles we replaced the bucket detector with the camera and beam displacer as in the idler path and performed interference measurements using classical light. The classical idler light was generated in the memory by seeding the write-out process using additional laser beam that was injected to the memory simultaneously with the write lase pulse. The seed beam was phase-coherent with the write laser and focused in the center of the atomic cloud. To maintain the phase coherence the seed beam is derived from the write laser by frequency shifting small fraction of the laser output by 6.834 GHz using EOM and filtering cavity (see [26] for details of the setup). This beam was used both to measure the phase profile in the signal arm and to generate strong atomic coherence in the memory. In the read-out process this coherence was retrieved to light that has been used to measure phase profile in the idler arm. Each phase profile measurement consisted of running the experiment with continuously changing the measurement settings {θ s , θ i } ∈ [0, 2π] × [0, 2π] and registering the intensity fringes I + (−) in the + and − measurement channels corresponding to two separate regions on the camera. The phase profiles were then retrieved using Fourier-transform based procedure [37] evaluated on the correlation function calculated as C = I + −I − I + +I − . In this procedure we first take a twodimensional Fourier transform of the real-valued correlation frame, then we select spatial-frequency region around one of two main (identical) frequency components that are located symmetrically to the zero-frequency point. We filter out that region by setting remaining (outside this region) values to zero. Finally inverse two-dimensional Fourier transform gives us a complex signal with phase equal to the interferometer phase profile shifted by θ s (i) . We repeat the procedure for each correlation frame for both signal and idler arm. For each calculated complex frame we set the global phase θ s (i) to 0 and finally we average the results. The final phase profiles are retrieved from the complex average by simply evaluating the arg(·) function.