Storage of photonic time-bin qubits for up to 20 ms in a rare-earth doped crystal

Long-duration quantum memories for photonic qubits are essential components for achieving long-distance quantum networks and repeaters. The mapping of optical states onto coherent spin-waves in rare earth ensembles is a particularly promising approach to quantum storage. However, it remains challenging to achieve long-duration storage at the quantum level due to read-out noise caused by the required spin-wave manipulation. In this work, we apply dynamical decoupling techniques and a small magnetic field to achieve the storage of six temporal modes for 20, 50 and 100 ms in a $^{151}$Eu$^{3+}$:Y$_2$SiO$_5$ crystal, based on an atomic frequency comb memory, where each temporal mode contains around one photon on average. The quantum coherence of the memory is verified by storing two time-bin qubits for 20 ms, with an average memory output fidelity of $F=(85\pm 2)\%$ for an average number of photons per qubit of $\mu_\text{in}$ = 0.92$\pm$0.04. The qubit analysis is done at the read-out of the memory, using a type of composite adiabatic read-out pulse we developed.


INTRODUCTION
The realization of quantum repeaters [1][2][3] , and more generally quantum networks, is a long-standing goal in quantum communication. It will enable long-range quantum entanglement distribution, long-distance quantum key distribution (QKD), distributed quantum computation and quantum simulation 4 . Many schemes of quantum repeaters rely on the heralding of entanglement between quantum nodes in elementary links 2,5 , followed by local swapping gates 1 to extend the entanglement. The introduction of atomic ensembles as repeater nodes, and the use of linear optics for the entanglement swapping, stems from the seminal DLCZ proposal 2 . A key advantage of atomic ensembles is their ability to store qubits in many modes through multiplexing [6][7][8][9][10][11][12] , which is crucial for distributing entanglement efficiently and with practical rates 13 .
Rare-earth-ion (RE) doped crystals provide a solidstate approach for ensemble-based quantum nodes. RE doped crystals can provide multiplexing in different degrees of freedom 8,9,11,[14][15][16] , efficient storage 17,18 , long optical coherence times 19,20 and long coherence times of hyperfine states 21-24 that allows long-duration and ondemand storage of optical quantum states. Long optical coherence times, in combination with the inhomogeneous broadening, offer the ability to store many temporal modes 7,13 . Repeater schemes based on both time and spectral multiplexing schemes have been proposed 8,13 . Here we focus on repeaters employing time-multiplexing and on-demand read-out in time 13 , which require the long storage times provided by hyperfine states 25 .
The longest reported spin storage time of optical states with mean photon number of around 1 in RE doped solids is about 1 ms in 151 Eu 3+ :Y 2 SiO 5 26 . However, even nearterm quantum repeaters spanning distances of 100 km or * Corresponding author, mikael.afzelius@unige.ch above would certainly require storage times of at least 10 ms, and more likely of hundreds of ms 25 . A particular challenge of long duration quantum storage in RE systems is noise introduced by the application of the dynamical decoupling (DD) sequences that are required to overcome the inhomogeneous spin dephasing 26 and the spectral diffusion 22,24 . To reduce the noise one can apply error-compensating DD sequences 27 , or increase the spin coherence time by applying magnetic fields to reduce the required number of pulses 22,28,29 .
In this article we report on an atomic frequency comb (AFC) spin-wave memory in 151 Eu 3+ :Y 2 SiO 5 , in which we demonstrate storage of 6 temporal modes with mean photon occupation number µ in = 0.711 ± 0.006 per mode for a duration of 20 ms using a XY-4 DD sequence with 4 pulses. The output signal-to-noise (SNR) ratio is 7.4 ± 0.5, for an internal storage efficiency of η s = 7%, which excludes the contribution of losses due to the optical path between the memory output and the detector. These results represent a 40-fold increase in qubit storage time with respect to the longest photonic qubit storage in a solid-state device 26 . The improvement in storage time is due to the application of a small magnetic field of 1.35 mT, see also 24,29 , which increases the spin coherence time with more than an order of magnitue while simultaneously resulting in a Markovian spin diffusion that can be further suppressed by DD sequences. By applying a longer DD sequence of 16 pulses (XY-16) we demonstrate storage with µ in = 1.062 ± 0.007 per mode for a duration of 100 ms, with a SNR of 2.5 ± 0.2 and an efficiency of η s = (2.60 ± 0.02)%. In addition we stored two time-bin qubits for 20 ms and performed a quantum state tomography of the output state, showing a fidelity of F = (85 ± 2)% for µ in = 0.92 ± 0.04 photons per qubit. To analyse the qubit we propose a composite adiabatic control pulse that projects the output qubit on superposition states of the time-bin modes. The current limit in storage time is technical, due to heating effects in the cryo cooler caused by the high power of the DD pulses and the duty cycle of the sequence. The measured spin and (c), sketches of the experimental setup around the memory and filter crystals, respectively. The crystals are glued on a custom mount with two levels at different heights, in the same cryostat. The memory crystal is at the center of a small coil used to generate the RF signal. A larger coil (not shown) on top of the cryostat generates a static magnetic field along the D1 axis of the Y2SiO5 crystal. Optical beams are depicted with exaggerated angles for clarity. AOM: acousto-optic modulator; SPAD: single photon detector (d) Sketch of the time sequence of pulses used for multimode spin-storage. (e) AFC efficiency measured as a function of AFC time 1/∆, with bright input pulses and magnetic field of 1.35 mT along D1. The solid line indicates the exponential fit resulting in zero-time efficiency η0 = (36 ± 3)% and effective coherence time T AFC 2 = (240 ± 30) µs, see text for details. Error bars represent 95% confidence intervals. More information on the experimental setup and pulse sequences can be found in the Methods section and in Supplementary Notes 1 and 3.
coherence time as a function of the DD pulse number n p follows closely the expected n 2/3 p dependence, which suggests that considerably longer storage times are within reach with some engineering efforts.

RESULTS
The 151 Eu 3+ :Y2SiO5 system The platform for our quantum memory is a 151 Eu 3+ :Y 2 SiO 5 crystal with an energy structure at zero magnetic field as in Figure 1a. The excited and ground states can be connected via optical transitions at about 580 nm 30 . The quadrupolar interaction due to the effective nuclear spin I = 5/2 of the Eu 3+ ions generates three doublets in both the ground and excited states, separated by tens of MHz. This structure allows to choose a Λ-system with a first ground state |g into which the population is initialized, connected to an excited state |e for optical absorption of the input light, and a second ground state |s for on-demand long-time storage.
The full AFC-spin wave protocol 7,31 , sketched in Figure 1d, begins by initializing the memory so to have a comb-like structure in the frequency domain with periodicity ∆ on |g and an empty |s state, via an optical preparation beam (see Figure 1b). The initialization step closely follows the procedure outlined by Jobez et al. 32 . The photons to be stored are sent along the input path and are absorbed by the AFC on the |g ↔ |e transition, leading to a coherent superposition in the atomic ensemble. The AFC results in a rephasing of the atoms after a duration 1/∆, while normally they would dephase quickly due to the inhomogeneous broadening. Before the AFC echo emission, the excitation is transferred to the storage state |s via a strong transfer pulse. The radio-frequency (RF) field at 46.18 MHz then dynamically decouples the spin coherence from external perturbations and compensates for the spin dephasing induced by the inhomogeneous broadening of the spin transition |g ↔ |s . In our particular crystal, the shape of the spin transition absorption line is estimated to be Gaussian with a width of about 60 kHz (Supplementary Note 2). A second strong optical pulse transfers the coherent atoms back into the |e state, after which the AFC phase evolution concludes with an output emission along |e → |g .
To implement the memory scheme, a coherent and powerful laser (1.8 W) at 580 nm is generated by amplifying and frequency doubling a 1160 nm laser that is locked on a high-finesse optical cavity 33 . The 580 nm beam traverses a cascade of bulk acousto-optic modulators (AOM), each controlling an optical channel of the experiment, namely optical transfer, memory preparation, filter preparation and input. The optical beams and the main elements of the setup are represented in Figure 1b, c. A memory and two filtering crystals are cooled down in the same closed-cycle helium cryostat to ∼ 4 K, placed on two levels of a single custom mount. The 1.2 cm long memory crystal is enveloped by a coil of the same length to generate the RF field. Another larger coil is placed outside the cold chamber and used to generate a static magnetic field. After the cryostat, the light in the input path can be detected either by a linear Si photodiode for experiments with bright pulses, or by a Si single photon avalanche diode (SPAD) detector for weak pulses at the single photon-level. For photon counting it is necessary to use a filtering setup ( Figure 1c) to block any scattered light and noise generated by the second transfer pulse. Another AOM acts as a temporal gate, before passing the beam through two filtering crystals that are optically pumped so to have a transmission window around the input photon frequency and maximum absorption corresponding to the transfer pulse transition.
The 151 Eu 3+ :Y 2 SiO 5 crystals are exposed to a small static magnetic field along the crystal D 1 axis 34 . At zero magnetic field, the protocol enabled to achieve storage of multiple coherent single photon-level pulses up to about 1 ms 26 . However, it has been shown that even a weak magnetic field can increase the coherence lifetime 19,24,35,36 , which motivated us to use a ∼ 1.35 mT field along the D 1 axis 29 .

Spin-wave AFC
The AFC spin-wave memory consists of three distinct processes: the AFC echo, the transfer pulses and the RF sequence, and each process introduces a set of parameters that will need to be optimized globally in order to achieve the best possible SNR, multimode capacity and storage time. Below we briefly describe some of the constraints leading to the particular choice of parameters used in these experiments.
The maximum AFC spin-wave efficiency is limited by the AFC echo efficiency for a certain 1/∆, which typically decreases exponentially as a function of 1/∆. We can define an effective AFC coherence lifetime T AFC 2 and efficiency η AFC as η AFC = η 0 exp −4/(∆T AFC 2 ) 32 , where η 0 depends on the optical depth and the AFC parameters. With an external magnetic field of 1.35 mT D 1 , we obtained T AFC 2 = (240 ± 30) µs with an extrapolated zerotime efficiency of η 0 = (36 ± 3) %, see Figure 1e. The η 0 efficiency is consistent with the initial optical depth of 6 in our double-pass input configuration (each pass provides an optical depth of about 3). The effect of the fieldinduced Zeeman split on the AFC preparation process is discussed in detail Ref 29 . In short no adverse effects of the comb quality is expected when the comb periodicity is a multiple of the excited state splitting, provided more than two ground states are available for optical pumping as in Eu 3+ :Y 2 SiO 5 , while other periodicities can lead to a lower AFC efficiency. In Figure 1e the modulation period of about 25 µs indeed corresponds to the excited state splitting of 41.4 kHz. The exponential decay implies that there is a trade-off between the memory efficiency (favoring short 1/∆) and temporal multi-mode capacity (favoring long 1/∆). In addition we must consider the shortest input duration that can be stored, which is limited by the effective memory bandwidth.
The optical transfer pulses should ideally perform a perfect coherent population inversion between states |e and |s , uniformly over the entire bandwidth of the in-put pulse. Efficient inversion with a uniform transfer probability in frequency space can be achieved by adiabatic, chirped pulses 37 . Here we employ two HSH pulses proposed by Tian et al. 38 , which are particularly efficient given a limitation in pulse duration. For a fixed Rabi frequency the bandwidth of the pulse can be increased by increasing the pulse duration 37 , which however reduces the multimode capacity of the AFC spin-wave memory.
Considering as a priority to preserve the storage efficiency while still being able to store several time modes, we set 1/∆ = 25 µs, corresponding to the first maximum (with efficiency 28%) on the AFC echo decay curve in Figure 1e. Given the 1/∆ delay, we optimized the HSH control pulse duration, leading to a bandwidth of 1.5 MHz for a HSH pulse duration of 15 µs. The remaining 10 µs were used to encode 6 temporal modes, giving a mode duration of T m = 1.65 µs. Each mode contained a Gaussian pulse with a full-width at half-maximum of about 700 ns.
The RF sequence compensates for the inhomogeneous spin dephasing and should ideally reduce the spectral diffusion due to spin-spin interactions through dynamical decoupling (DD) 24,39-41 . However, effective dynamical decoupling requires many pulses, with pulse separations less than the characteristic time of the spin fluctuations. Pulse errors can then introduce noise at the memory output 26 , which in principle can be reduced by using error-compensating DD sequences 27 . In practice, however, other factors such as heating of the crystal due to the intense RF pulses limit the effectiveness of such sequences, and noise induced by the RF sequence is the main limitation in SNR of long-duration AFC spin-wave memories 9,26,42 .

Characterization with bright pulses
We first present a characterization of the memory using bright input pulses and a linear Si photodiode, implementing four decoupling sequences with a number of pulses ranging from a minimum of 2 to a maximum of 16. (1) = (47 ± 2) ms, as expected for a Ornstein-Uhlenbeck spectral diffusion process 40,41,44 . A similar scaling was obtained in Holzäpfel et al. 24 , using a slightly different experimental setup, magnetic field and Λ-system, which indicates that much longer storage times could be achieved. However, adding more pulses for the same storage times introduces additional heating, causing temperature-dependent frequency shifts of the optical transition 30,45 . This technical issue could be addressed in the future by optimizing the heat dissipation in proximity of the crystal. The extrapolated zero-time efficiencies vary between 6 and 9%, and the data appears relatively scattered around the fitted curves for the longer decoupling sequences. These two observations might be a sign of the presence of beats originating in the different phase paths available to the atoms during storage, due to the small Zeeman splitting of the ground state doublets in this regime of weak magnetic field. Similar effects have been shown in a more detailed model of interaction between a system with splittings smaller than the RF pulses chirp 29 .

Single-photon level performance
We now discuss the memory performance at the single photon level. The dark histograms in Figure 3 show three examples of spin storage outputs with their respective input modes for reference. The lighter histograms show the noise background, measured while executing the complete memory scheme without any input light (see Methods section for details). This noise floor, when integrated over the mode size T m , gives us the noise probability p N . When compared to the sum of the counts in the retrieved signal in the mode, the summed noise count is well below the retrieved signal for all the storage times here reported. We used an XY-4 type of RF sequence for storage at 20 ms, XY-8 for 50 ms and XY-16 for 100 ms. Table 1 summarizes the relevant results, in particular with SNR values ranging from 7.4 to 2.5 for 20 ms and 100 ms respectively. The average input photon number per time mode µ in is close to 1 in all cases, although it varies slightly. To account for this, an independent figure of merit is the parameter µ 1 = p N /η, which corresponds to the average input photon number that would give an SNR of 1 in output 46 . Since it scales as the inverse of the efficiency 26 , it increases with storage time, but for all cases studied here it is well below 1.
The noise probability p N varied from 7 · 10 −3 to 11 · 10 −3 , see Table 1, similar to previous experiments 26 . An independent noise measurement at 20 ms showed that the XX, XY-4 and XY-8 resulted in almost identical noise values of p N = 7.4 · 10 −3 , 8.1 · 10 −3 and 8.6 · 10 −3 (error ±0.3 · 10 −3 ), respectively. This shows that pulse area errors are effectively suppressed by the higher order DD sequences, and that the read-out noise is caused by other types of errors, which at this point are not well understood.
If compared with the efficiencies measured with bright pulses in Figure 2, the storage efficiency measured at the single photon-level is noticeably lower for 50 and 100 ms. We believe this is due to the long measurement times required for accumulating the necessary statistics, which exposes the experiment to long-term fluctuations affecting optical alignment in general and specifically fiber coupling efficiencies. Nonetheless, our results show that our memory is capable of storing successfully multiple time modes at the single photon level, with a SNR that is in principle compatible with storage of quantum states 26 for up to 100 ms. More information on the memory parameter estimations from the data can be found in Supplementary Table 2.

Time-bin qubit storage
To characterize the quantum fidelity of the memory, we analyzed the storage of time-bin-encoded qubits. Both qubits were prepared in the ideally pure superposition state ψ in = 1/ √ 2 (|E + |L ), where |E and |L represent the early and late time modes of each qubit. Exploiting our 6-modes capacity, we encoded the components |E and |L of the first qubit into the temporal modes 2 and 3 respectively, and similarly for the second qubit in modes 5 and 6.
To perform a full quantum tomography of the memory output state, represented by the density matrix ρ out , one needs to be able to perform measurements of the ob-  servables represented by the Pauli matrices σ x , σ y and σ z . The observable σ z can simply be measured using histogram traces as shown in Figure 3. The σ x and σ y observables can be measured by making two partial readouts of the memory 46-48 , separated by the qubit mode spacing T m , where each partial transfer pulse should ideally perform a 50% transfer as both modes are emitted after the second transfer pulse. In the past, this has been achieved by using two distinct, shorter transfer pulses 46,48,49 , separated by T m , which in practice can reduce the efficiency below the ideal 50% transfer 46 . This is particularly true for long adiabatic, chirped pulses, which would then need to be severely shortened to produce two distinct pulses separated by the mode spacing T m . In addition the first control pulse would need to be reduced in duration as well, as the chirp rate of all the transfer pulses should be the same 37 .
To overcome the efficiency limitation for qubit analysis based on partial read-outs with adiabatic pulses, we propose a composite pulse that can achieve the ideal 50% partial transfer, independently of the pulse duration and mode separation. The composite HSH pulse (cHSH) is a linear sum of two identical adiabatic HSH pulses, with their centers separated in time by T m . The cHSH has a characteristic amplitude oscillation due to the interference of the two chirps, see Figure 4a. Intuitively, one can think of each specific frequency within the AFC band-width as being addressed twice by the cHSH, once by each component, at two distinct times separated exactly by T m , despite the fact that the whole cHSH pulse itself is much longer than T m . As a consequence, the addressed atomic population partially rephases after the pulse at two times separated by T m . An alternative method for analysing qubits consists in using an AFC-based analyser in the filtering crystal 50,51 . However, we observed that the SNR was deteriorated when using the same crystal as both filtering and analysing device. The cHSH-based analyser resulted in a significantly better SNR after the filters, yielding a higher storage fidelity.
The phase difference θ between the two cHSH components sets the measurement basis, where θ = 0 (θ = π/2) and θ = π (θ = 3π/2) projects respectively on the |+ and |− eigenstates of σ x (σ y ), encoded in the early-late time modes basis as 1/ √ 2 (|E + e iθ |L ). Note that this type of analyser can only project onto one eigenstate of each basis, hence two measurements are required per Pauli operator. Figure 4b shows the histograms corresponding to the two σ x projections.
After measuring the expectation value of all three Pauli operators, we can reconstruct the full quantum stateρ out using direct inversion 52 , after verifying that the corresponding state matrix is indeed physical. We hence derive a fidelity of F = (85 ± 2) %, averaged over the two qubits. Raw counts and the resulting expactation val- ues can be found in Supplementary Table 4, with corresponding numbers of experiment repetitions in Supplementary Table 6. The average number of photons per qubit was µin = 0.92±0.04 and the reconstructed density matrixρ out is shown in Figure 4c. The purity of the reconstructed state is P = (76 ± 3) %, which limits the maximum achievable fidelity in absence of any unitary errors to 87%. This indicates that the fidelity is limited by white noise generated by the RF sequence at the memory read-out. Another element supporting this conclusion is given by the fidelity measured with bright pulses, so that the noise is negligible (see Supplementary Note 4), yielding a value of 96 %. We further note that the σ z measurement yielded a SNR of 3.48 ± 0.15, which when scaled up to the single photon level in one time bin becomes about 7.0. This is compatible with the value reported in Table 1  The measured qubit fidelity can be compared to different criteria for quantum storage. In this work we characterize the memory by storing qubits encoded onto weak coherent states. In this context Specht et al. 53 introduced a classical fidelity limit by comparing to a measure-andprepare strategy, where the memory inefficiency and multiphoton components of the states are exploited. Nevertheless, for the efficiency of 7.39% and the mean qubit photon number of µ in = 0.92 the criterion gives a maximum classical fidelity of 81.2% (see Supplementary Note 4), such that our qubit fidelity at 20 ms surpasses the classical limit. We can also consider future applications of the memory in terms of storing a qubit encoded onto a true single photon (Fock state), for which the classical limit is F = 2/3 54 . For storage of true single photon qubits it can be shown that this limit can be surpassed provided that the probability p of finding the photon before the memory is larger than the µ 1 parameter (see Table 1) 9,26 . Recent quantum memory experiments in praesodymium-doped Y 2 SiO 5 has reached a heralding efficiency of 19% of finding a true single photon before the memory 55 , which with our µ 1 = 0.098 at 20 ms storage time would result in a theoretical qubit fidelity of about 75%. The fidelity can be improved by a combination of increasing current memory efficiency and single-photon heralding efficiency.

DISCUSSION
The results presented here demonstrate that longduration quantum storage based on dynamical decoupling of spin-wave states in 151 Eu 3+ :Y 2 SiO 5 is a promising avenue. In terms of qubit storage, we observe a 40fold increase in storage time with respect to the previous longest quantum storage of photonic qubits in a solid-state device 9 . Currently, the storage time in 151 Eu 3+ :Y 2 SiO 5 is limited by the heating observed when adding more pulses in the decoupling sequence, which is a technical limitation, but the classical storage experiments by Holzäpfel et al. 24 suggest that even longer storage times are within reach in 151 Eu 3+ :Y 2 SiO 5 . Solving the heating problem will also allow applying DD pulses in a rapid succession with fixed time separation, as done by Holzäpfel et al. 24 , giving more flexifibilty in the read out time and reducing any deadtime of the memory. In general the implications of the timing of DD sequences have not yet been adressed in rate calculations of quantum repeaters. Our observation that DD sequences with more pulses did not generate more read-out noise is key to achieving longer storage times also at the quantum level. We also note that these techniques could be applied also to Pr 3+ doped Y 2 SiO 5 crystals, where currently quantum entanglement storage experiments are limited to about 50 µs 56 . Another interesting avenue is to apply these techniques to extend the storage time of spin-photon correlations experiments 42,51 in rare-earth-doped crystals.

Expanded setup
The core of the setup consist of a closed-cycle pulsed helium cryostat with a sample chamber at a typical temperature of 3.5 K. In the sample chamber, a custom copper mount holds the memory crystal, with dimensions 2.5 x 2.9 x 12.3 mm along the (D 1 , D 2 , b) axes 34 , and a series of two filtering crystals with similar size. All these are 151 Eu 3+ :Y 2 SiO 5 crystals with a doping concentration of 1000 ppm 26 . Around the memory crystal, a copper coil generates the RF field to manipulate the atoms on their spin transitions. The coil is coupled to a resonator circuit, with resonance tuned on the 46 MHz spin transition, which produces a Rabi frequency of 120 kHz, corresponding roughly to an AC field of amplitude 12 mT. Before the resonator, the RF signal is created by an arbitrary wave generator, and amplified with a 100 W amplifier coupled to a circulator to redirect unwanted reflection from the resonator system.
The input beam is used to create the optical pulses to be stored, and it goes through the memory crystal twice with a waist diameter of 50 µm. The memory preparation beam is overlapped with the input path with a larger spot size around 700 µm, to ensure homogeneity of the preparation along the crystal length, with an incident angle of about 1°. The transfer beam is overlapped in a similar way, with a beam diameter at the waist of 250 µm.
The AFC structure is prepared with a 3 MHz total spectral width, which however is not fully exploited since the 1.5 MHz bandwidth of the HSH transfer pulses limits the effective memory bandwidth. The width of the transparency and absorption windows in the filter crystals were of 2 MHz, with a total optical depth of approximately 7.4 in the absorption window through the two crystals. The relative spectral excinction ratio should thus be exp(7.4) : 1 = 1636 : 1.
More information on the setup can be found in Supplementary Note 1 and Supplementary Note 2.

Photon counting and noise measurement
The quantities µ in and p N in Table 1, correspond to average number of photons at the memory output for a single storage attempt. They are obtained by summing raw detections in modes of duration T m = 1.65 µs, then dividing by the number of experiment repetitions, averaging over the 6 modes, and dividing by the detector efficiency η D = 57 % and cryostat-to-detector path transmission (typically between 17 and 20 %). The histograms in Figure 3 and Figure 4b are obtained in the same way for a binning resolution of 200 ns.
Noise photons at the memory read-out originate from excitation of ions from the |g state to the |s state during the DD sequence, due to imperfections of the RF pulses 26,27 . These ions are then excited by the readout transfer pulse and decay on the |e -|g transition trough spontaneous emission. These noise photons are thus spectrally indistinguishable from the stored photons. The spontaneous character was verified by observing that its decay constant corresponds to the radiative lifetime T 1 . Note that without RF manipulation the read-out noise is significantly reduced, i.e. the main SNR limitation in current spin-wave experiments is due to RFinduced photon noise.
The noise parameter p N indicates the probability of a noise photon being emitted by the memory during a time corresponding to the mode size T m = 1.65 µs. For the spin storage data at T s = 20 ms, visible in Figure 3a and Table 1, it is measured independently by blocking the input beam during the full storage sequence in the same time-modes in which the retrieved modes would be. A more detailed analysis per-mode and the exact number of repetitions for all experiments are reported respectively in Supplementary Table 3 and Supplementary Table 5.
To decrease the total acquisition time of the experiments at T s = 50 and 100 ms, we calculated the respective p N values reported in Table 1 from a ∼ 225 µs time window centered at about 190 µs after the first retrieved mode in the same dataset. By doing so, we exploited the fact that the noise floor is due to spontaneous emission with a decay time of 1.9 ms 19 , and can be considered uniform up to ∼ 200 µs after readout. This is confirmed experimentally on the 20 ms datasets, as the difference in p N calculated in the retrieved mode position of the data with input blocked correspond to the result of the procedure above within the Poissonian standard deviation. The histograms displaying noise in Figure 3b and c are representative regions of the noise floor taken at about 20 µs after the retrieved modes in the same dataset.
All errors are estimated from Poissonian standard deviations on the raw detector counts and propagated considering the memory temporal modes as independent.

DATA AVAILABILITY
The data sets generated and/or analysed during the current study are available from the corresponding authors upon reasonable request.