Creation, storage, and on-demand release of optical quantum states with a negative Wigner function

Highly nonclassical quantum states of light, characterized by Wigner functions with negative values, have been created so far only in a heralded fashion. In this case, the desired output emerges rarely and randomly from a quantum-state generator. An important example is the heralded production of high-purity single-photon states, typically based on some nonlinear optical interaction. In contrast, on-demand single-photon sources were also reported, exploiting the quantized level structure of matter systems. These sources, however, lead to highly impure output states, composed mostly of vacuum. While such impure states may still exhibit certain single-photon-like features such as anti-bunching, they are not enough nonclassical for advanced quantum information processing. On the other hand, the intrinsic randomness of pure, heralded states can be circumvented by first storing and then releasing them on demand. Here we propose such a controlled release, and we experimentally demonstrate it for heralded single photons. We employ two optical cavities, where the photons are both created and stored inside one cavity, and finally released through a dynamical tuning of the other cavity. We demonstrate storage times of up to 300 ns, while keeping the single-photon purity around 50% after storage. This is the first demonstration of a negative Wigner function at the output of an on-demand photon source or a quantum memory. In principle, our storage system is compatible with all kinds of nonclassical states, including those known to be essential for many advanced quantum information protocols.


I. INTRODUCTION
Representing flying quantum information, photons are ideally suited for communication between the stations of a quantum network [1, 2]. Among various photonic quantum states, single-photon states are the most fundamental. In principle, single-photon-based qubits would allow for scalable quantum computation based on linearoptical circuits, auxiliary quantum states of single and many photons, and photon counters [3,4]. However, nonclassical states beyond single photons are also expected to be useful for future advanced quantum information processing [5][6][7][8][9][10][11][12].
Single-photon sources are often divided into two types [13], where one corresponds to transitions in electronic energy levels accompanied by a photon emission, and the other is implemented by probabilistically generating photon pairs, and detecting one photon and thus heralding another one. The first type of sources allow for an on-demand emission of photons, which has been demonstrated with various matter systems [13,14], such as trapped atoms, defects in diamonds, and semiconductor quantum dots. However, these systems typically share a common disadvantage, namely a very low efficiency for collecting the emitted photons in a specific single spatial mode, and so it remains unclear whether a photon emis- * yoshikawa@ap.t.u-tokyo.ac.jp † akiraf@ap.t.u-tokyo.ac.jp sion has actually happened until the photon is detected [14]. So far, only the class of heralded sources offers high fidelity and flexibility, though at the expense of their intrinsic randomness.
The photon pairs of the heralded sources are typically produced via an optical nonlinearity, namely either parametric down conversion [15] or four-wave mixing [16]. Since this only requires a perturbative coupling between light and matter, heralded photons can be emitted in a well-defined mode with good purity and optical coherence. As a consequence, a negative Wigner function has been observed so far only with this type of source [17,18]. Moreover, measuring parts of a nonlinear optical resource state also allows for the heralded preparation of quantum states beyond single photons or qubits [6][7][8][9][10]. Finally, in contrast to the highly restrictive wavelengths of existing on-demand sources, basically determined by the corresponding matter energy levels, the heralded approach allows for a broader range of wavelengths, in particular, including the telecom wavelength [19]. Owing to these advantages, the most advanced quantum information experiments have been demonstrated with such heralding schemes [8][9][10][11][12]. On the negative side, however, since those events when a photon is heralded are totally random and uncontrollable, the probability for creating many such heralded photons simultaneously, as required for instance in linear-optical quantum computation [3,4], drops exponentially with the number of photons -unless efficient quantum memories are available.  (d) Conceptual diagram in the frequency domain at the release stage. Ti:Sa, titanium-sapphire laser; CW, continuous wave; SHG, second harmonic generator; AOFS, acousto-optic frequency shifter; NOPO, non-degenerate optical parametric oscillator; PPKTP, periodically-poled KTiOPO4 crystal for parametric down conversion; EOM, electro-optic modulator; APD, silicon avalanche photodiode; LO, optical local oscillator; FPGA, field-programmable gate array to process logic signals; MC, memory cavity; SC, shutter cavity; FSR, free spectral range. randomness of the heralded schemes is to store a heralded state until it is required [20]. Indeed, single photons were stored in matter systems in previous experiments [21][22][23]. However, by introducing such buffer memories, some of the disadvantages of matter systems again emerge, such as low photon purity and limited tunability of the optical wavelength (though the memory efficiencies are actually improving [24]). As a remedy, several all-optical experiments have been reported, however, none of them demonstrated high purity [25][26][27][28][29]. Moreover, each had their own additional disadvantages: when the optical delay lines were combined with optical switches, only discrete delays were possible [26]; when the dynamical control of the Q factor of a photonic-crystal nanocavity was successful, the memory time scale was still only subnanoseconds [27][28][29]. In any case, it appears generally inefficient to first create flying photons and then couple them with stationary memories. In fact, using atomic ensemble memories, Duan et al. proposed a scalable quantum repeater with linear optics by smartly unifying the heralding and storage (write-in) processes [30,31]. Our scheme relies upon a similar one-step mechanism, however, in an all-optical fashion, where a heralded photon is created and automatically stored in an optical cavity.
Here, we propose the storage and controlled release of heralded quantum states by concatenating two cavities, and we experimentally demonstrate our scheme for the case of heralded single photons. We succeeded for the first time in acquiring, effectively on demand, a quantum feature as strong as the negativity of the Wigner function. This feature is essentially different from the more conventional single-photon character of antibunching [13], which is immune to linear optical losses and hence valid even for sources with very low purity. The Wigner-function negativity rules out any description in terms of a classical phase-space distribution, and thus is important in quantum computing [5]. Moreover, we stress that our system is much more general than a simple photon gun. It is rather an all-optical unification of a (potentially continuous-variable, high-dimensional) entanglement generator and a quantum memory. In fact, our heralding mechanism can produce quantum states of light more general than single photons [8][9][10], and all such states can be potentially stored in our system. In principle, our system may function as a universal quantum memory, where optical, flying quantum information of arbitrary dimension is written into the memory via unconditional continuous-variable quantum teleportation [11,12], and later recalled on demand.

II. WORKING PRINCIPLE
A schematic of our experimental setup with a diagram in the optical frequency domain is shown in Fig. 1. Inside a nondegenerate optical parametric oscillator (NOPO) operating far below threshold, signal and idler photons are probabilistically created and simultaneously appearing in different longitudinal modes. We placed a shutter cavity (SC) at the exit of the NOPO. Then, a photon inside the NOPO passes through the SC only when it is resonant with the SC, while otherwise it remains inside the NOPO. Therefore, the NOPO concurrently works as a memory cavity (MC). The switch for releasing a photon is quickly realized by shifting the resonance frequency of the SC using an electro-optic modulator (EOM). At first, we set the SC resonant to an idler photon. Any idler photon immediately escapes from the concatenated cavities and is then sent to a photon detector to herald the presence of its partner signal photon inside the MC [ Fig. 1(a,b)]. After the photon creation succeeded, the signal photon can be released by switching the SC whenever wanted [ Fig. 1(c,d)]. Note that an extension of this technique to multi-photon, phase-sensitive states appears to be remarkably straightforward [8][9][10]. Multiple clicks of the photon detector would project the intracavity signal state onto a multi-photon state, and, unlike previous demonstrations without memory [8][9][10], these clicks would not have to occur simultaneously. Further note that the switching EOM, which is often lossy, is placed outside the MC. This is another reason for the high purity here compared to a previous scheme based on an optical delay loop that contained the switching EOM inside the loop [26].
On a more fundamental level, that intuitive explanation for the high output purity relies on the physics of general coupled systems. More specifically, we may define the damping ratio of the coupled cavities to determine whether they are over-damped or under-damped, which is eventually reflected by the pulse shape of the released single photons. Although this observation is certainly of great interest, it is not directly related to the main experimental achievement to be reported here, which is rather the controlled timing for releasing high-purity single photons. Therefore, we choose to leave the above issue for future works.
The experimental parameters used in our demonstration are described in the following section and in the Supplemental Material [32].

III. EXPERIMENTAL RESULTS AND METHODS
The output quantum states were characterized by optical homodyne detection. Homodyne detection employs interference with a strong local-oscillator light beam, and hence it indicates the photons' coherence and their tunability to some specific wavelength. This is in strong contrast to single photons verified by anti-bunching, for which two single-photon creations are necessary and quantum coherence is confirmed by the Hong-Ou-Mandel effect [33].
The experimental results are shown in Fig. 2, arranged in an array of rows and columns. The storage time was set to 0 ns, 100 ns, 200 ns, and 300 ns in addition to the intrinsic delay of about 150 ns after occurrence of the heralding signal, corresponding to columns from left to right.
First, we focus on the leftmost column, corresponding to the intrinsic delay. Figure 2(a) shows the temporal shape of the wavepacket envelope ψ(t) of the released flying photons, which was estimated from the raw data of homodyne detection [34] (details can be found in the Supplemental Material). The horizontal axis is a relative time, where 0 ns corresponds to the events of the idler photon detection. After opening the shutter at about 150 ns, the wavepacket amplitude suddenly increases and rapidly goes to zero, which represents the emission of the photon. The photon pulse width is about 50 ns. In fact, it can be inferred from the experimental parameters that the photon wavepacket exhibits damped oscillations (corresponding to under-damping). This is experimentally indicated by the overshoot of the temporal shape down to negative values. Before the photon emission, there are already nonzero values from around −50 ns, showing pre-leakage. In Fig. 2(b), the quadrature samples and their histogram corresponding to the envelope function ψ(t) are presented. There is a dip at the center of the histogram, which is a characteristic of a single-photon state [17,18]. By performing maximum likelihood estimation on the quadrature distribution [35], we obtained the Wigner function Next, we look at the other panels to see whether the photon wavepacket alters its shape and position for longer storages. As shown in Fig. 2(a), the emission times are correctly shifted. However, the shape of the wavepacket is independent of the storage time, except for the pre-leakage. These facts together indicate the success of our demonstration. The single-photon components were estimated as 54.6%, 53.1%, and 49.7%, for 100 ns, 200 ns, and 300 ns, respectively. Although longer storage renders the Wigner function positive, the single photons may still be useful depending on applications owing to small multi-photon components [36].
All our results are combined in Fig. 3 for an easy comparison between the envelope function ψ(t) [ Fig. 3(a)], its absolute square |ψ(t)| 2 [ Fig. 3(b)], and the single-photon component [ Fig. 3(c)]. The probability density for the presence of a photon at time t is proportional to the absolute square |ψ(t)| 2 . From Fig. 3(b), we can infer that the contribution of the pre-leakage is very small. The lifetime of the photon storage is of the order of 1 µs, as can be seen from the fitting curve in Fig. 3(c), which is comparable with the lifetimes of some ensemble memories [24]. In principle, this lifetime can be further extended by decreasing the intracavity losses. In the following, we will now summarize our experimental methods.

A. Procedure
Our setup is shown in Fig. 1. The source laser is a continuous-wave Ti:sapphire laser with a wavelength of 860 nm. A part of the laser output is frequency-doubled to 430 nm, which is used as a pump beam for the NOPO. Two longitudinal modes of the NOPO at 860 nm, separated by a free spectrum range (FSR), are used as the signal and idler. A single longitudinal mode (idler) is selected by filter cavities, and a photon detection projects the twin mode (signal) onto a single-photon state. After some predetermined waiting time, a high voltage of 721 V is applied to the EOM to release the signal photon. It was experimentally essential to avoid above-threshold oscillation at the unused longitudinal modes of the NOPO. The photon generation rate was about 300 per second with a NOPO pumping power of 3 mW. The power of the LO was 18 mW, which produced an optical shot noise about 20 dB above the detector's electronic noise.

B. Cavity Configuration
The bow-tie shaped MC contains a periodically-poled KTiOPO 4 (PPKTP) crystal as a nonlinear medium to operate as a NOPO; it has a round-trip length of 1.4 m (corresponding to the FSR of 2.2 × 10 2 MHz), where the round-trip optical loss was 0.2-0.3%. These values determine the photon lifetime. The SC contains a RbTiOPO 4 (RTP) EOM for the resonant-frequency shift; it has a round-trip length of 0.7 m, where the round-trip optical loss was 3%. The coupler reflectivity between the MC and the SC is 97%, while that between the SC and the external field is 83%.

C. Verification
While the homodyne detection is a phase-sensitive measurement, the single-photon state is a phaseinsensitive state. This phase-insensitivity was confirmed by the invariance of the quadrature distribution with the scanned and unscanned phase of the local oscillator. The photon envelope ψ(t) is determined by the principal component analysis (PCA) [34]. Each quadrature sample is obtained by a weighted integral of the continuous homodyne data x(t) as x(t)ψ(t)dt. When we replaced the idler beam by other, uncorrelated light before the photon detection, the observed signal state was almost a zero-photon state, which ensures that the original signal field was indeed conditionally obtained via the idler detection.
Further information on the experimental methods can be found in the Supplemental Material [32].

IV. CONCLUSION
In conclusion, we proposed and experimentally demonstrated the insertion of a quickly tunable cavity at the exit of a NOPO, effectively serving as a kind of quantum memory. After a heralded creation, storage, and on-demand release of single photons with this system, the output states exhibited strong nonclassicality, as became manifest through their negative Wigner functions. Our device works at normal temperature and pressure. Moreover, our scheme is compatible with hybrid quantum optical experiments, where photon and homodyne detections are employed at the same time, like quantum teleportation [11,12] and entanglement distillation [37,38]. Many advanced quantum demonstrations are possible with our system in the future, e.g., the storage and release of multi-photon and/or phase-sensitive states of light [8][9][10], the controlled interference of many photons simultaneously released from independent memories [3,4,33], and the deterministic transfer of arbitrary quantum optical states into the memories via unconditional continuous-variable quantum teleportation [11,12].

ACKNOWLEDGMENTS
This work was partly supported by PDIS, GIA, G-COE, and APSA commissioned by the MEXT of Japan, FIRST initiated by the CSTP of Japan, and REFOST of Japan. P.v.L. acknowledges support from QuOReP of the BMBF in Germany.  In the analysis based on the principal component analysis (PCA) in the main text, the pre-leakage of the signal photon also contributes to the purity. The obtained wavepackets are informative in the sense that they show the actual shape of the photon wavepacket, however, the inclusion of the pre-leakage to the analysis reveals an overestimation of the memory lifetime. An important figure here is the probability of a single photon in a mode time-shifted in accordance with the storage time, because it contributes to a successful multi-photon interference from independent memories.
In Figs. 4 and 5, we show the results for time-shifted wavepackets. The wavepacket estimated from the results of the intrinsic delay is the original one. Here, the time bin from −150 ns to 450 ns was clipped, and the wavepacket then renormalized. Subsequently, it was shifted by 100 ns, 200 ns, and 300 ns to analyze the correspondingly delayed results. No correction of losses was performed in the data processing.
We anticipate a reduction of the pre-leakage by increasing the number of the shutters serially. Another interesting option would be to monitor the pre-leakage by a photon detector. If we detect a photon before opening the shutter, we can simply discard the stored light and start a new creation of quantum states. In this way, the purity will be increased compared to the case of not monitoring the pre-leakage.

VI. SUPPLEMENTAL METHODS
In this section, we will describe the experimental methods and parameters, which are not included in the main text, except for the quantum state reconstruction from the homodyne outcomes, which will be discussed separately in the next section.
The schematic setup is shown in Fig. 1 of the main text. The contents of this section can be listed as follows: first, chopping of bright beams, second, filtering of the idler path, third, detuning of optical frequencies, fourth, data storage by the oscilloscope, fifth, other experimental parameters.

A. Feedback Control of the Optical System and Beam Chopping
In order to keep the cavities resonant to the laser beams, we utilized interference of auxiliary bright beams, from which we obtained error signals for classical feedback control. However, such bright beams, except for the local oscillator (LO) beam and the pump beam, can induce fake clicks or even break down the avalanche photodiode (APD). Therefore, in the experiment, we switched the optical system cyclically between two phases: one is the phase for actively controlling the optical system with classical feedback by using bright beams (classical phase), and the other is the phase for manipulating the quantumness at the single-photon level by blocking the bright beams (quantum phase).
The blocking and unblocking of the bright beams was achieved by switching on and off the diffraction via two acousto-optic modulators (AOMs). One AOM upshifted the frequency, while the other AOM downshifted it to cancel out the frequency shift. The cavity lengths, which determine the cavity resonances, were controlled by using piezoelectric transducers (PZTs), except for the fast switching of the shutter cavity (SC), which was achieved by an electro-optic modulator (EOM). During the quantum phase, the resonance of the cavities was held by keeping the voltages applied to the PZTs. We also placed a switching AOM just before the avalanche photodiode (APD), so that only the beam at the quantum phase can enter the APD. Note that these AOMs and PZTs, as well as several EOMs that modulated the bright beams for the Pound-Drever-Holl locking of the cavities, are omitted from Fig. 1 of the main text.
We repeated the quantum-classical phase changes at a rate of 5 kHz and with a time ratio of 2 : 3. Thus, the 300 counts per second for the single-photon generation in the experiment effectively correspond to 750 counts per second if we could maintain the quantum phase. The repetition was controlled by the same FPGA that controlled the storage time after the heralding signals. The heralding signals were gated by the FPGA, so that only those at the quantum phase drive the switching EOM of the SC.

B. The Idler Beam Path and Filter Cavities
We utilized three filter cavities. One was a bow-tie shaped ring cavity with a round-trip length of 250 mm, and the other two were Fabry-Perot cavities with a round-trip lengths of several mm. The first ring cavity also worked as a spatial separator of the signal and idler beams. These three cavities had different free spectral ranges (FSRs) to prevent beams other than the target idler from entering the APD. Between the two Fabry-Perot cavities, we inserted an optical isolator in order to decouple the two cavities. After the final filter cavity, as noted above, we placed an AOM for switching the beam path. A spatial single mode was selected by a singlemode fiber before the APD to reduce fake clicks by stray light.
The transmission efficiencies of the filter cavities were 90%, 76%, and 65%. That of the optical isolator was 88%. The diffraction efficiency of the AOM was 66%.
The coupling efficiency to the single-mode fiber was 83%.
The APD was an SPCM-AQRH-16 (Excelitas Technologies), whose dark counts were 5 counts per second (taking into account the time ratio, 13 counts per second). Note that the losses on the idler line do not deteriorate the purity of the heralded signal-photon states, but only decrease the photon generation rate, including a relative increase of the dark-count contribution.

C. Optical Frequencies
The bright light source was a continuous wave (CW) Ti:sapphire laser operating at 860 nm, whose frequency is denoted by ω source . The optical frequency of the pump, signal, and idler beams for the nondegenerate optical parametric oscillator (NOPO) are denoted by ω pump , ω signal , and ω idler , respectively. From the energy conservation condition of the parametric down conversion, we have ω pump ≈ ω signal + ω idler . Here, since we must take into account the finite bandwidth of each beam, we use the approximately equal sign '≈' instead of the equal sign '='. For the characterization of the emitted light wavepacket, we employed the output of the Ti:sapphire laser without frequency shift as the LO for the homodyne detection, thus ω signal ≈ ω LO = ω source . The signal and idler frequencies were separated by nearly the FSR of the NOPO ∆ω NOPO , thus ω idler ≈ ω source ± ∆ω NOPO , while we did not distinguish plus or minus in the experiment. Therefore, the pump beam was the second harmonic of the light source with a frequency shift about the FSR, ω pump ≈ 2ω source ± ∆ω NOPO . The frequency of the second harmonic was shifted by an acousto-optic frequency shifter (AOFS) to produce the pump beam, as depicted in Fig. 1 of the main text.
However, as will be discussed below, we made use of detuning for various experimental reasons. The pump frequency shift ω pump −2ω source was not exactly ∆ω NOPO , but detuned by 5 MHz. In addition, the signal frequency ω signal was not exactly at the LO frequency ω source , but detuned by 300-500 kHz.
The former detuning was applied on the pump beam by the AOFS. The latter detuning corresponds to a shift of the resonance of the NOPO. However, this detuning was also realized via an AOFS, which is omitted from Fig. 1 of the main text. It was achieved by shifting the frequency of the auxiliary bright beam utilized for the locking of the NOPO.
Next, we explain the experimental reasons for the two detunings.

Suppressing above-threshold oscillation
As mentioned in Sec. III of the main text, our NOPO starts above-threshold oscillation at unused longitudinal modes unless detuning is utilized. Since the longitudinal modes are almost equally spaced by the FSR ∆ω NOPO in the frequency domain, whenever a pair of ω signal and ω idler satisfies the energy conservation condition, there are other pairs of longitudinal modes ω signal + n∆ω NOPO and ω idler − n∆ω NOPO with an integer n that also satisfy the energy conservation condition. Every longitudinal mode has a different finesse due to the frequency dependence of the SC. The higher the finesse is, the stronger is the intracavity vacuum field of the mode. As a result, every pair that satisfies the energy conservation has a different gain of the down conversion, proportional to the product of the corresponding intra-cavity field strengths. In the experiment, we used the pair of a high-finesse mode (signal) and a low-finesse mode (idler) at the memory excitation (write-in) stage. However, almost inevitably, pairs exist that are composed of two high-finesse modes. Such pairs have much larger gain of the down conversion than the selected signal and idler pair, thus the NOPO easily goes beyond threshold for these pairs.
On the other hand, the high-finesse modes have much narrower bandwidth than the low-finesse modes. Thus, in principle, the down conversion gain becomes very small with a small detuning of the pump frequency for a pair of two high-finesse modes, while it remains almost unchanged for a pair of high-and low-finesse modes. By this technique, the above-threshold oscillation can be avoided.
Experimentally, a relatively large detuning of 5 MHz was introduced to remove any above-threshold oscillation. Another option would be to insert wavelengthselective components inside the MC or the SC. However, since such components are typically lossy, we did not explore this option in our demonstration.

Reducing storage of scattered light
In the experiment, the LO beam for the homodyne detection was not switched. Therefore, the LO was being scattered during the quantum phase, mainly at the photodiodes of the homodyne detector. We observed that the scattered LO, corresponding to a weak coherent state at the single-photon level, was stored inside the MC and induced phase-space displacements of the stored signal states. This can be avoided though, with only a small deterioration of the measured quality of the single-photon states, by slightly detuning the signal-mode frequency of the MC from that of the LO. We detuned the signal frequency by 300 kHz-500 kHz, which is much smaller than the released photon bandwidth of about 20 MHz and thus did not significantly degrade the photon quality observed by the homodyne detection. The detuning was achieved by a small shift of the MC round-trip length from the LO resonance, controlled by a PZT.
We did not take much care of the exact value of the detuning, because the target quantum state was a phaseinsensitive single-photon state. If we did want to write in a phase-sensitive state, since the stored state during its storage is expected to rotate in phase space relative to the LO frame at the detuning frequency, we would have to either compensate this rotation or remove the displacements from the LO scattering according to the detuning condition. However, we stress that the scattered light in our experiment was solely a technical problem of the verification part of the setup, and not at all a fundamental deficiency of the memory system itself.

D. Data Storage
The heralding signals, which were processed by the FPGA, were not only to trigger the EOM driver, but also to trigger the oscilloscope storage of the homodyne signal. The oscilloscope captured the homodyne signal for 1 µs around each trigger signal. The resolution of the analogto-digital conversion was 8 bits and the sampling rate was 1 GS/s. We repeatedly acquired the frame 4.3 × 10 4 times for each condition.

E. Other Parameters
In addition to the parameters given above and in Sec. III of the main text, there are the following experimental parameters: the propagation efficiency from the exit of the SC to the homodyne detector was 97%, the quantum efficiency of the homodyne detector was 99%, and the interference visibility between the LO and the output beam of the SC was 99%.
The size of the second-order nonlinear optical PPKTP crystals for the NOPO and the SHG was 10 mm in length and 1 mm by 1 mm in cross section. The radius of curvature of the two concave mirrors of the NOPO was 150 mm, while the focal length of the lens inside the SC was 500 mm.
The FPGA that controled the bright beam chopping and the delay of the trigger signal to shift the resonance of the SC was Virtex-4 (Xilinx). The FPGA clock period was 10 ns, and thus, in our system, the photon emission times were discretized into 10 ns intervals, whereas the optical system itself would, of course, allow emissions continuous in time.

VII. VERIFICATION BY HOMODYNE DETECTION
As described above, we recorded a 1 µs frame of homodyne signal around each heralding signal. Every frame contained a single measurement result corresponding to a single-photon state. However, every frame also contained vacuum noise of other orthogonal modes. We must therefore extract the information of the target single photon from such background noise, which is a big difference from click-by-click photon detection. In this section, we will compare the homodyne and photon detections, and discuss how the information of the single-photon state can be extracted from the homodyne signal.
The contents of this section are as follows. We will first review the mathematical description of the output wavepacket, introducing the mode function. The mode function is equivalent to the wavepacket envelope used in the main text, however, here we choose a different terminology. Next, we will describe both the photon and the homodyne detection, with a focus on optical coherence. Then, we explain how to estimate the mode function via the PCA. Finally, we briefly describe how to represent quantum states by Wigner functions.

A. Mathematical Description of a Flying Single-Photon State
Since the transverse modes and the polarization are determined by the LO, here we focus on the longitudinal modes of the wavepackets. We use the time t as a continuous degree of freedom in the longitudinal direction, which could also be, alternatively, the spatial coordinate z, with z = ct and c the speed of light. We define annihilation and creation operators at time t asâ(t) andâ † (t), respectively. Their commutation relation is, where δ(t) is the Dirac delta function. The photon density operator at time t is defined as, Similarly, we define annihilation and creation operators for a wavepacket mode specified by a mode function ψ(t) as follows, where the superscript * denotes the complex conjugate. In the following, for simplicity, we often drop the argument (t) of the mode function. The usual single-mode bosonic commutation relations are equivalent to the normalization of the mode function (ψ, ψ) = 1, with the inner product of two mode functions, The corresponding photon-number operator is defined as, Note that dt|ψ(t)| 2n (t) is very different fromn ψ . Related to this fact is the impossibility to determine the photon number in a given wavepacket ψ in a simple way using photon detection, as will be discussed later. An infinite set of orthonormal mode functions {ψ k } k∈N specifies orthogonal modes such that where δ k is the Kronecker delta. We choose an infinite number of such orthonormal functions {ψ k } k∈N to obtain a basis for the function space. Then, the creation operator of an arbitrary mode ψ is expressed in this basis as,â † Since the number operators {n ψ k } k∈N of orthonormal modes are mutually commutative and independent, they have simultaneous eigenstates with independent eigenvalues n k , where |∅ is the zero-photon (vacuum) state,â(t)|∅ = 0 for all t. An arbitrary pure state is a superposition of such number states. This also means that the overall Hilbert space H of the multi-mode quantum states can be decomposed into a tensor product of single-mode Hilbert spaces, Operators acting on the total Hilbert space H may also be decomposed into such tensor products, e.g.,â † ψ0 = a † ⊗1⊗1⊗. . . where1 is the identity operator. However, this does not hold in general. For example, a density operatorˆ which cannot be expressed as a convex sum of tensor products describes an entangled (inseparable) state. The single-mode density operatorρ ψ0 is obtained by tracing out all the orthogonal modes, where Tr H X is the partial trace over a Hilbert space H X . In the following, we will useˆ for an overall density operator andρ for a density operator reduced to a single mode. An ideal single-photon state, for which exactly one photon is present in some wavepacket ψ, is expressed as Realistic single-photon states, however, are effectively mixtures of the above pure single-photon state and the vacuum state, From the decomposition in Eq. (7), the reduced density operator of the mode ψ 0 is, (13) where |n is a single-mode n-photon state. As expected, the purity is maximized by setting the observed mode function ψ 0 equal to the ideal mode function of the single photon ψ. However, whenever these two functions are different, the purity decreases depending on the mode mismatch from p to p|(ψ 0 , ψ)| 2 .
For a single-photon state, the photon density with respect to time t is, Therefore, as mentioned in the main text, the probability density for the presence of a photon at time t is proportional to the absolute square of the mode function.

B. Homodyne Detection versus Photon Detection
A photon detector, such as an APD in the Geiger mode, detects photons click by click in a particle-like manner, whereas a homodyne detector observes the wave-like interference of the signal with a LO. Therefore, unlike photon detection, a single homodyne outcome can never show the presence of a photon. However, from the statistics of the outcomes, we can estimate the statea technique known as quantum tomography. Homodyne characterization is advantageous in several respects, such as high quantum efficiencies and the full characterization of a single optical mode. On the other hand, it is also demanding, because it requires a light source coherent with the target field.
What we would like to stress here is that the sole capability of homodyne verification is already an indication for the coherence of the obtained single photons. This is in strong contrast to photon-detection-based verification relying upon the observation of anti-bunching. The latter negates the simultaneous presence of photons, but it contains no information about the coherence.
Another important point is that the anti-bunching is immune to linear optical losses. On the other hand, the purity, which is given by the probability of the corresponding wavepacket to contain exactly one photon, also directly represents the success probability for creating single photons in the specific wavepackets coherently. The purity is degraded by optical losses, and in this sense, it is generally much more difficult to obtain good purity than to obtain good anti-bunching.

Photon detection
Here we suppose that the speed of the photon detector is high enough compared to the time scale of the photon wavepacket. Then, the observable of the photon detection at time t is well approximated by the photon density operatorn(t) ≡â † (t)â(t). Given a density operator containing at most one photon, the probability density of the photon detection is P (t) = η Tr(n(t)ˆ ), where η is the quantum efficiency of the detection system. Inserting the density operatorˆ ψ,p from Eq. (12), we obtain the probability density to detect a photon at time t, Therefore, by taking statistics of the detection time t, we gain information about the mode function without its phase component, |ψ(t)|. The photon probability p is estimated from dtP (t) if the quantum efficiency η is known. However, as already mentioned, detecting a photon with a probability density η|ψ(t)| 2 can never be a proof for the presence of a photon in a wavepacket ψ. For example, we are not able to distinguish functions different in phase, ψ(t) and ψ(t)e iθ(t) . Note that an optical frequency shift by ω corresponds to setting θ(t) = ωt. Furthermore, we cannot even distinguish a pure state from a decohered mixed state. In order to show this, we consider smooth functions φ τ (t) ≡ φ(t − τ ) in order to deconvolute the photon density as |ψ(t)| 2 = dτ p(τ )|φ(t − τ )| 2 , where (φ, φ) = 1 and dτ p(τ ) = 1. Then, a mixed state, gives the same probability density P (t) = η|ψ(t)| 2 as a pure single-photon state |1 ψ 1 ψ |. However, the singlephoton purity with respect to the wavepacket ψ 0 = ψ is decreased from 1 to, The discrepancy between a photon click and the actual purity associated with some mode function ψ 0 may be explained as follows. The quantum stateρ ψ0 must be estimated from the observables on the mode ψ 0 , constructed fromâ ψ0 andâ † ψ0 . However, any observable constructed fromn(t) can never provide this due to the lack of interference termsâ † (t)â(t ) for t = t . As will be discussed later, in contrast, homodyne detection can provide observables that are constructed fromâ ψ0 andâ † ψ0 , which allows us to estimateρ ψ0 .
Since the coherence, as well as the stability of the frequency, etc., is crucial for interferometric usage, these properties should be ensured experimentally. For this purpose, in photon detection experiments, we typically create two photons and check the beam splitter interference, by which we observe the photon bunching effect depending on their indistinguishability, i.e., whether they have identical frequencies, polarizations, and so forth; but not whether some decoherence like in Eq. (16) occurs.
So far, we have discussed photon detection on fields which contain at most one photon. In the experiment, also the effective vanishing of the multi-photon probability must be checked to verify the single-photon character. This can be achieved by observing the anti-bunching effect, which appears in the second-order photon correlation, where X is the expectation value of an observableX, and :X : is the normally ordered form of an opera-torX. It is obtained by using two photon detectors (the Hanbury-Brown and Twiss setup). If the multiphoton probability is zero at any instant of time, we have g (2) (0) = 0. In contrast, when the photon probabilities are totally uncorrelated, g (2) (τ ) = 1, which is typically the case for τ → ∞. Therefore, the anti-bunching is typically observed as a gap at τ = 0 in the correlation function g (2) (τ ). A coherent state shows a Poissonian statistics corresponding to g (2) (0) = 1, irrespective of its average photon number, and we have g (2) (0) ≥ 1 for any incoherent mixture of coherent states. Therefore, a measure of the quality of a single-photon stream is, beyond the classical limit of one, how much g (2) (0) gets closer to zero. Note that g (2) (τ ) itself says nothing about the coherence of the single photons, similar to the case of a single-photon detector discussed above.
Another point is that g (2) (0) is the multi-photon probability normalized by the single-photon probabilities, such that it quantifies the deviation from a random photon emission. Therefore, g (2) (τ ) remains unchanged under linear optical losses (i.e., the effect ofâ(t) → √ ηâ(t) is canceled between the numerator and denominator). This is both good and bad. On the one hand, it can verify the nonclassicality of a very faint light beam, where the photon detection events only scarcely occur. On the other hand, it even validates very inefficient singlephoton sources, even though these may be actually creating wavepackets very close to vacuum states. Such inefficient, rarely successful single-photon generators are not useful for many applications.
On the other hand, the single-photon purity measures how much a given wavepacket ψ 0 contains the ideal single-photon state in a coherent manner. Especially, when its value exceeds one half, a stronger form of nonclassicality, that is the negativity of the Wigner function, emerges. The density matrix and the Wigner function are usually obtained by homodyne tomography, as we discuss next.

Homodyne detection
The annihilation and creation operatorsâ andâ † in the particle picture correspond to complex and complex conjugate amplitudes of the light field in the wave picture. They are not observables, because they are not selfadjoint. However, the quadrature amplitudes are selfadjoint,x Analogously to the quantum mechanical position and momentum operators,x andp cannot be simultaneously measured with perfect precision, since they do not commute with each other, [x,p] = i. The instantaneous outcome of the homodyne detection is, for an ideal detector with infinite bandwidth, a quadrature at time t, x(t) = [â(t) +â † (t)]/ √ 2, as shown below. Note that realistically, due to the finite bandwidth of the detector, we can never measure a truly instantaneous quadrature, which would have an infinitely large variance. However, since we are interested in a situation where the bandwidth of single photons is much narrower than that of the homodyne detector, we may faithfully equate an instantaneous homodyne outcome with an instantaneous quadrature outcome.
Homodyne detection measures the interference between a LO beam and a signal light field. The LO has a large coherent amplitude α = |α|e iθ . We consider a rotating frame, so that the complex amplitude of the LO is constant. By combining at a beamsplitter the LO and an instantaneous field represented by the annihilation operatorâ(t), we obtain the two output field amplitudeŝ a out-A (t) = (α +â(t))/ √ 2 andâ out-B (t) = (α −â(t))/ √ 2. We then detect their photocurrents and take the difference of the two signals, which is proportional to a certain quadrature, =2|α|(x(t) cos θ +p(t) sin θ) Therefore, by adjusting the phase θ of the LO, we can measure any quadrature at an arbitrary phase. The quadrature valuesx ψ of mode ψ can be expressed as an integral over the instantaneous quadratures, Since we cannot simultaneously measurex(t) andp(t) at any time t, in general, we do not obtain a measurement outcome forx ψ from the instantaneous outcomes.
However, if the mode function ψ is a real function in the rotating frame of the LO, we obtainx ψ by integrating overx(t) with a weight function of ψ(t). This condition is the same as matching the frequencies of the signal mode and the LO. The quadrature distribution of an arbitrary singlemode stateρ ψ0 = m,n c m,n |m n| is sensitive to the phases θ. Such a state can be reconstructed from the distributions of the quadraturesx θ ψ0 for various phases θ. However, all photon-number states, including the vacuum and single-photon states as well as their incoherent mixtures, have phase-insensitive quadrature distributions, which exactly applies to our experiment. Therefore, we could reconstruct a diagonal density operatorρ ψ0 = n c n |n n|, containing the corresponding photon-number distribution, from the quadrature distribution for some single phase. As described in Sec. III of the main text, the phase-insensitivity of our quantum states was experimentally confirmed by checking that two distributions coincide: one for which the LO phase θ was slowly scanned, and another one for which it was not scanned. This phase scan was slow enough so that the phase remained constant within each photon pulse. In the following, we choose the measured observable to bê x without loss of generality.
As can be found in standard textbooks, the quadrature distributions of the vacuum and single-photon states are, Similarly, all multi-photon states have their own distributions. The distribution for an incoherent mixture of photon-number states can be decomposed into distributions of pure photon-number states, The photon-number distribution corresponds to the coefficients of this decomposition. In the decomposition of the experimental distribution, we maximized the likelihood by using the downhill simplex method.

C. Mode Function Estimation by Principal Component Analysis
As discussed above, if we know a priori the real mode function ψ of the single photons, we can obtain the density operatorρ ψ0 that maximizes the purity 1|ρ ψ0 |1 by setting ψ 0 = ψ. In the experiment, we estimated the mode function ψ from the homodyne raw data. This was possible, because only a single mode ψ was excited, and the other orthogonal modes were basically in vacuum states. Therefore, we could easily observe the target mode ψ 0 , since its photon number is maximized. Note that this maximization of the photon number is equivalent to the maximization of the phase-insensitive quadrature variance, 2 â † ψ0â ψ0 = x 2 ψ0 + p 2 ψ0 − 1.
From the homodyne raw data, we can calculate the auto-covariance, Then, optimization of the mode function ψ 0 corresponds to finding the eigenfunction of the auto-covariance, which then gives the maximal eigenvalue. Therefore, the problem is solved via the spectral decomposition of the autocovariance. In the experiment, owing to the finite sampling rate and the finite frame length, the auto-covariance gives a finite-dimensional square matrix, whose diagonalized form serves our purposes. This method of decomposing a mixed signal into independent signals is referred to as the principal component analysis (PCA). Note that, in order to validate this method, the detector response must be sufficiently flat in the frequency region of interest. In addition, the PCA never discriminates two components with the same variance. Therefore, in case there is some noise due to experimental imperfections, with a variance close to that of a single-photon quadrature, the resulting function becomes in general a combination of that noise and the true function.
The quadrature samples are random, obeying some statistics. Therefore, an estimation via the PCA may capture the accidental deviation from the true distribution, which increases the eigenvalue, leading to some overestimation of the average photon number. This query then affects the precision of the estimation of the mode function ψ 0 . We checked that the mode match |(ψ 0 , ψ 0 )| 2 between two mode functions obtained from two different sets of quadrature samples was typically more than 99%. Even when we used different sets of samples for the estimation of mode ψ 0 and for the estimation of the photon-number distributionρ ψ0 , the change in the obtained purity was negligible.

D. Wigner Function
A Wigner function W (x, p) of a single-mode quantum state is a two-dimensional quasi-probability distribution in phase space, characterized by an operator algebra W (x, p)dp =P (x = x), The distribution of a quadraturex θ at an arbitrary phase θ is obtained similarly. The biggest difference between Wigner and classical distribution functions is that Wigner functions allow for negative values. Due to the uncertainty principle, we can never determine the conjugate variablesx andp simultaneously. Therefore, a single point of the Wigner function W (x, p) alone cannot be interpreted as a joint probability; only when integrated, the meaning of a probability density arises, like in Eq. (28). For this reason, Wigner functions may take on negative values -a strong quantum feature, because it is a consequence of the noncommutative operator algebra. Note that even though W (x, p) may take on negative values, the integrated probability densities never become negative.
In fact, a single-photon state is a prominent example of such nonclassical states with a negative Wigner function. The Wigner functions for a single-photon and a vacuum state are given by, W |1 1| (x, p) = 1 π (2x 2 − 2p 2 − 1) exp(−x 2 − p 2 ). (30) As expected, they are rotationally symmetric in the x-p plane. The function is always positive for a vacuum state (being a Gaussian function), whereas it has a negative region for a single-photon state. In particular, at the phasespace origin, the function value is W |0 0| (0, 0) = 1/π for a vacuum state, while it is W |1 1| (0, 0) = −1/π for a singlephoton state. Since the map between a Wigner function and a density operator is linear, the Wigner function for an incoherent mixture of a vacuum state and a singlephoton state is obtained by summing their Wigner functions with the corresponding weights, Thus, if the single-photon component exceeds one half, the total Wigner function has negative values around the origin. More precisely, for even-photon-number states, we have W |2k 2k| (0, 0) = 1/π, while for odd-photonnumber states, W |2k+1 2k+1| (0, 0) = −1/π. Therefore, if the contribution of multi-photon components, e.g., a three-photon component, is no longer negligible, the Wigner function can take on negative values even if the single-photon purity is below one half.