Robust concurrent remote entanglement between two superconducting qubits

Entangling two remote quantum systems which never interact directly is an essential primitive in quantum information science and forms the basis for the modular architecture of quantum computing. When protocols to generate these remote entangled pairs rely on using traveling single photon states as carriers of quantum information, they can be made robust to photon losses, unlike schemes that rely on continuous variable states. However, efficiently detecting single photons is challenging in the domain of superconducting quantum circuits because of the low energy of microwave quanta. Here, we report the realization of a robust form of concurrent remote entanglement based on a novel microwave photon detector implemented in the superconducting circuit quantum electrodynamics (cQED) platform of quantum information. Remote entangled pairs with a fidelity of $0.57\pm0.01$ are generated at $200$ Hz. Our experiment opens the way for the implementation of the modular architecture of quantum computation with superconducting qubits.


I. INTRODUCTION
The concept of a photon, the quantum of excitation of the electromagnetic field, was introduced by Planck and Einstein to explain the blackbody radiation spectrum [1] and the photoelectric effect [2]. However, experiments that would definitively prove the existence of traveling optical photons as independent entities were only understood [3,4] and realized [5] much later in the 20th century. Although there is no reason to suppose that microwave photons would behave differently than their optical counterparts, revealing and manipulating them is challenging because their energies are 4 to 5 orders of magnitude lower. Cavity-QED and, later, circuit-QED (cQED) have established the reality of stationary quantum microwave excitations of a superconducting resonator by strongly coupling them to Rydberg [6] and superconducting artificial atoms [7]. The production of traveling microwave photons was then indirectly demonstrated using linear amplifiers to measure the state of the radiation [8][9][10]. However, while there have been proposals and implementations of single flying microwave photon detectors [11][12][13], controlling and employing the single-photon nature of microwave radiation is still an open challenge. Here, we carry over to the microwave domain the remote entanglement experiment performed in quantum optics by realizing and operating a single-photon detector based on a superconducting 3D transmon qubit [14].
With single microwave photon detectors still not commonly used, the only form of remote entanglement realized so far with superconducting qubits has been through the use of continuous-variable coherent states as the flying information carriers [15]. While such states can be efficiently synthesized by standard microwave equipment and processed by quantum-limited linear parametric amplifiers [16,17] readily available at microwave frequencies, the disadvantage of this route is its sensitivity to losses in the paths of the flying states. In contrast, remote entanglement using flying single photons is robust to these losses, as demonstrated in the optical domain [18][19][20][21][22]. This protocol offers the advantage that only the successful detection of photons is linked to the production of a pure entangled state [23,24]. This feature is particularly important for generating entanglement between two distant stationary qubits, a crucial element of the modular architecture of quantum computation [25] and the proposed quantum internet [26]. Furthermore, scaling up the modular architecture requires no direct connections between modules, unlike previously demonstrated sequential methods [15], to maintain a strong on/off ratio. Thus, demonstrating robust remote entanglement that satisfies this requirement, i.e., a concurrent protocol, is a vital step in the implementation of the modular architecture with superconducting qubits.

II. OVERVIEW OF EXPERIMENT AND PROTOCOL
The experiment, housed in a dilution refrigerator below 20 mK, consists of two different superconducting transmon qubits [see Fig. 1(a)], referred to as Alice and Bob, in separate 3D cavities [14]. The cavities have nearly identical resonance frequencies ω g A =2π ¼ 7.6314 GHz, ω g B =2π ¼ 7.6316 GHz and bandwidths κ A =2π ¼ 1.2 MHz, κ B =2π ¼ 0.9 MHz. Their strongly coupled output ports are connected by microwave coaxial cables to the two input ports of a 180°hybrid, the microwave equivalent of a 50=50 beam splitter. One of the output ports of the hybrid is connected to a microwave single-photon detector, which is realized by a third 3D cavity also containing a transmon. The other output port of the hybrid is terminated in a 50 Ω load. To ensure signal flow as shown by the arrows in Fig. 1(a), microwave circulators (not shown, see experimental schematic in Appendix A) are inserted into the lines connecting each qubit to the hybrid. These provide robust isolation between modules and connect the system output to readout electronics.
To entangle the remote qubits, flying microwave singlephoton states are used as carriers of quantum information according to the protocol proposed in Ref. [24]. As outlined in Fig. 1(b), the remote entanglement protocol begins by initializing both qubit-cavity systems in ð1= ffiffi ffi 2 p Þðjgi þ jeiÞ ⊗ j0i, the state on the equator of the Bloch sphere with no photons in their respective cavities. Through a controlled-NOT (CNOT)-like operation, whose implementation is detailed later in the text, the qubits are now entangled with flying single photons where the state of each qubit-photon pair becomes ð1= ffiffi ffi 2 p Þðjg0i þ je1iÞ. The joint state of all stationary and flying qubits can be expressed as jψi 1 Þðjgei AE jegiÞ represent the odd Bell states of the Alice and Bob qubits and jo AE i ¼ ð1= ffiffi ffi 2 p Þðj10i AE j01iÞ represent the odd Bell states of flying single photons in Alice's and Bob's channels, respectively. The photons interfere on the 180°hybrid whose action, analogous to that of a beam splitter, is described by the unitary U BS ¼ e −3πða † b−ab † Þ=4 . This maps jo þ i → j10i (a) Two superconducting 3D transmon qubits, Alice and Bob, are connected by coaxial cables to the two input ports of the microwave equivalent of a 50=50 beam splitter. One of the output ports of the splitter is connected to a microwave single-photon detector also realized by a 3D transmon qubit. The other port of the splitter is terminated in a cold 50 Ω load. (b) Quantum circuit diagram of the remote entanglement protocol, with the states of the quantum system at various steps. The Alice and Bob (red and blue) qubits are each prepared in the state ð1= ffiffi ffi 2 p ÞðjgiþjeiÞ by a single-qubit gate R y ðπ=2Þ. Þðj10i AE j01iÞ represent odd Bell states of flying single photons in the Alice and Bob channels, respectively. The flying photons interfere on the beam splitter whose unitary action U BS erases their which-path information. Following a π-pulse on Alice and Bob, the CNOT-like operation and beam-splitter steps are repeated to remove contributions of the unwanted jeei state. Detecting two photon clicks in a pair of consecutive rounds heralds the jO þ i ¼ ð1= ffiffi ffi 2 p Þðjgei þ jegiÞ Bell state of Alice and Bob.
(jo − i → j01i), taking the two flying odd Bell states to a single-photon state in the Alice or Bob branch of the detector part of the system. This operation erases the which-path information of the photons and produces Hong-Ou-Mandel interference [5]. After the hybrid, the total system state is . At this point, the photons in the Alice channel enter the detector that distinguishes between detecting a photon, a "click," or detecting nothing, called "no click." Ideally, by heralding on only single-photon detection events, the jO þ i is selected out from all the other states. However, losses in the system between the qubits and the detector and the inability of the detector to distinguish between the Fock states j1i and j2i instead result in the mixed density matrix ρ click Here, the normalization constant N depends on loss in the system and the characteristics of the detector (see Appendix F). In particular, it depends on the probabilities with which it maps the input flying photon states, j1i and j2i, to an outcome of click. Another crucial assumption in ρ click 3 is that the detector has no dark counts; i.e., it never clicks when it receives j0i. A fuller version of ρ click 3 including dark counts is given in Appendix F. Thus, at this stage, the qubits are in the state jO þ i with probability N , and we would like to remove the undesired jeei state.
To achieve this, a R y ðπÞ pulse is applied on both Alice and Bob followed by a second round of entangling the qubits with flying photons, interfering them on the hybrid and detecting them. The π-pulse takes jeei → jggi; consequently, in the second round, the unwanted state is mapped onto jggij00i, and thus it can be selected out by detecting a photon. On the other hand, jO þ i is mapped onto a superposition of jO þ ij10i and jO − ij01i. Conditioning on measuring clicks in two consecutive rounds of the protocol results in the odd Bell state jψi click;click 6 ¼ jO þ i. A result of this dual conditioning is that losses in the system only reduce the success probability of the protocol and not the fidelity of the generated entangled state. Replacing the cold 50 Ω load with a second detector would increase the success probability by a factor of 4 and allow for the generation of both the jO þ i and jO − i states depending on whether the same or different detectors go click on each round, respectively. Since it does not improve the fidelity of entanglement, we omitted the second detector to simplify the microwave control electronics and cold hardware.
Successfully realizing this protocol simultaneously required the following: (1) implementing the generation of single-photon Fock states which are entangled with the stationary qubits and (2) detecting the subsequent singlephoton states. Furthermore, the frequencies and temporal envelopes of the photons arising from each cavity had to be controlled to ensure that the detector cannot distinguish between them.

III. DESCRIPTION OF THE QUBIT-PHOTON ENTANGLEMENT PROCESS
The first ingredient, previously termed a CNOT-like operation, actually maps an arbitrary qubit state αjg0i þ βje0i, where α and β are arbitrary complex coefficients, onto the joint qubit-flying photon state αjg0i þ βje1i (this operation is not a unitary in the manifold fjg0i; jg1i; je0i; je1ig because it takes je1i to jf1i; however, this has no effect on the protocol since the cavity always starts in j0i). This is done by exploiting jfi, the second excited state of the transmon qubit [27], as well as the two-photon transition jf0i ↔ je1i [28,29]. As shown in Fig. 2(a), starting with the qubit in αjgi þ βjei, the operation is realized by first applying a π-pulse at ω ef , taking the qubit to αjgi þ βjfi, and then applying a π-pulse on the jf0i ↔ je1i transition with two sideband tones (ω QSB , ω CSB ). This maps the qubit state onto the joint qubitintracavity state, αjg0i þ βje1i. Finally, the photon state leaks out of the cavity, becoming a flying state that is entangled with the qubit. As a result, the traveling photon has the frequency ω e A (ω e B ) and a decaying exponential temporal waveform with the decay constant κ A (κ B ). The indistinguishability of the photons, then, was achieved in this experiment by the nearly identical frequencies and bandwidths of the Alice and Bob cavities (as given above and further discussed in Appendix C). Note that although the photons need to overlap in frequency, there is no requirement here for the qubits to be identical.

IV. DESCRIPTION OF MICROWAVE SINGLE-PHOTON DETECTION
The second ingredient of the experiment, microwave single-photon detection, is the novel technical component of our demonstration. Put simply, this detector is just another transmon-3D cavity system like Alice and Bob. The strongly coupled port of the cavity is the detector input port. In the strong dispersive regime where the qubit is operated (χ D =2π ¼ 3 MHz, κ D =2π ¼ 1 MHz), we can selectively π-pulse the qubit conditioned on the presence of one intracavity photon [7], mapping the flying photon onto the state of the detector qubit. To operate this system as a detector of single flying photons, we tuned the cavity frequency ω g D =2π ¼ 7.6222 GHz close to ω e A and ω e B and matched the line widths of all three cavities. This condition ensured that the detector efficiency is maximized. The incident single photons from Alice and Bob will excite the detector cavity about 50% of the time (see Appendix D) since their decaying exponential temporal waveforms are not mode matched to the cavity. Thus, the selective π-pulse excites the qubit only if a photon was received, with the length and timing of this pulse determining the detector efficiency (see Appendix D). Once the photon leaks back out, a conventional cQED dispersive readout of the qubit state [30] completes the quantum nondemolition (QND) photon detection process. Measuring the qubit in the excited state corresponds to a photon detection event (click). Finally, the detector is reset by returning the qubit to jgi with an unselective π-pulse. This microwave photon detector satisfies three important criteria in an architecture that is easily integrated with current state-of-the-art cQED experiments. First, the detector has a reasonable efficiency, η ≈ 0.5, since about half of all incident photons enter the detector. Second, this detector has low dark counts (the probability of the detector reporting a click even when no photon entered the detector), P d < 0.01, limited by the frequency selectivity of the π-pulse. Finally, it has a short re-arm time of 450 ns determined by how long it takes to empty the cavity and reset the qubit. We discuss avenues to further improve this detector in Appendix D. Nevertheless, as we show below, the detector performance is sufficient for generating remote entanglement.

V. EXPERIMENTAL RESULTS
As a preliminary step towards the realization of the full remote entanglement protocol, we demonstrate in Figs. 2(b) and 2(c) signatures of entanglement between the Alice qubit and its corresponding traveling photon state by showing that the CNOT-like operation maps αjg0i þ βje0i to αjg0i þ βje1i (for data on the Bob qubit and simulations, see Appendix C). We first show that the relative weights of jgi and jei were correctly mapped by initializing the qubit in cos ðθ=2Þjgi þ sin ðθ=2Þjei, followed by a π-pulse at ω A;ef and sideband pulses for a varying time T SB [see Fig. 2(a), right]. The selective π-pulse on the detector was a 480-ns Gaussian pulse (σ ¼ 120 ns) and was timed such that the center of the Gaussian coincides with the end of the sideband pulse. Finally, we measured the probability of detecting a photon in the detector, P click , and the Alice polarization, hZ A i. As shown in Fig. 2(b) (black dashed line), a π-pulse on the jf0i ↔ je1i transition occurs for T SB ¼ 254 ns when the probability of detecting a photon, P click , is maximized. On the other hand, for shorter sideband pulse lengths, no photons are generated and P click ¼ 0. Moreover, the observed increase in P click with θ confirms that the relative weight of the superposition state between jgi and jei is mapped onto jg0i and je1i [ Fig. 2(b), left]. We also confirm that this process does not destroy the qubit state by observing that the final value of hZ A i agrees with the initial preparation angle θ [ Fig. 2 Furthermore, in Fig. 2(c), we show that this operation also maps the phase of αjgi þ βjei onto αjg0i þ βje1i. Directly measuring the phase of je1i relative to jg0i is not possible in this experiment since the detector only detects the presence or absence of a photon. Instead, the Alice qubit was first prepared on the equator of the Bloch sphere in ð1= ffiffi ffi 2 p Þðjgi þ e iϕ jeiÞ, the CNOT-like operation was either performed or not, and finally, both P click and the qubit equatorial Bloch vector components, hX A i and hY A i, were measured. When no photon is generated, P click ¼ 0 as expected, and hX A i and hY A i oscillate with the preparation phase ϕ [ Fig. 2(c), top]. However, when the operation is (a) Frequency spectra of the Alice and detector qubit-cavity systems (left) and experimental pulse sequence (right). The colors denote transitions which are driven to perform the CNOT-like operation and flying single-photon detection. The Alice qubit is prepared in an arbitrary initial state by the pulse R ge ϕ ðθÞ at ω ge . The CNOT-like operation consists of a R y ðπÞ pulse at ω ef followed by a pair of sideband pulses. The sideband pulses are applied at ω QSB , detuned by Δ from ω ef , and ω CSB , detuned by Δ from ω e A . To detect flying photons, a frequency-selective π-pulse is applied to the detector qubit at ω 1 ge , followed by a measurement of the qubit state. (b) Color plots of the probability P click of the detector qubit ending in jei (left) and the Alice qubit polarization hZ A i (right), as a function of the sideband pulse length T SB and θ (for ϕ ¼ π=2). The dashed line at T SB ¼ 254 ns corresponds to a transfer jf0i → je1i, i.e., a CNOT-like operation. (c) Detector click probability P click and Alice equatorial Bloch vector components hX A i and hY A i, as a function of ϕ for θ ¼ π=2 when the CNOT-like operation is either performed (bottom) or not (top). Open circles are experimental data, and lines are fits.
performed, a photon is generated, and thus P click is now nonzero. Since the preparation phase ϕ is now mapped onto the entangled state, the measurement of the photon, either by the detector or some other loss in the system, results in the unconditional dephasing of the qubit, Having demonstrated qubit-photon entanglement, we next perform the full remote entanglement protocol. The final two-qubit density matrix was measured in the Pauli basis with joint tomography (see Appendix B) conditioned on detecting two clicks. For an arbitrary Bell state, the only nonzero Pauli components are hZZi, hXXi, hYYi, hXYi, and hYZi, which are displayed in Fig. 3. We first demonstrate that the protocol entangles the qubits only when they start in the correct state. With Bob initialized in ð1= ffiffi ffi 2 p Þðjgi þ jeiÞ, Alice was prepared in cos ðθ=2Þjgi þ sin ðθ=2Þjei. Entanglement is maximized for θ ¼ π=2 [see Fig. 3(a) dotted line], with extremal values for hXXi, hYYi, hXYi, and hYXi, and with the expected negative hZZi indicating a state of odd parity. On the other hand, for θ ¼ 0 (θ ¼ π), the final two-qubit state should be the separable state jegi ðjgeiÞ as indicated by hXXi ¼ hYYi ¼ hXYi ¼ hYXi ¼ 0 and hZZi < 0. We attribute the deviation of hZZi from −1 to the dark counts in the detector and the finite T 1 's of the two qubits.
Next, we show that when both qubits are initialized along the equator of the Bloch sphere, remote entanglement is always generated. Alice was prepared in ð1= ffiffi ffi 2 p Þ× ðjgi þ jeiÞ, with Bob prepared in ð1= ffiffi ffi 2 p Þðjgi þ e iϕ jeiÞ. In this case, the final state should be ð1= ffiffi ffi 2 p Þðjgei þ e iðϕþϕ off Þ jegiÞ, where ϕ off is an arbitrary offset phase included to account for frequency offsets and path-length differences between the two flying photons. This Bell state is witnessed by the tomography results in Fig. 3 where hZZi is constant and negative, while the other four displayed Pauli components follow the expected sinusoidal behavior. From the fits to the data, we extract ϕ off ¼ 3π=10.
The complete density matrix ρ meas is shown in Fig. 4 (left) in the Pauli basis for ϕ given by the dotted line in Fig. 3(b), where the fidelity F ¼ Trðρ meas jO þ ihO þ jÞ is maximum. The theoretically calculated density matrix ( Fig. 4, right) includes the effects of the coherence times 3. Two-qubit remote entanglement. Measured amplitudes of the relevant two-qubit Pauli vector components as a function of qubit preparation. After the remote entanglement protocol described in Fig. 1(b), joint tomography was performed on the qubits conditioned on the detector reporting a click for each round. (a) With Bob always initialized in ð1= ffiffi ffi 2 p Þðjgi þ jeiÞ, Alice was prepared in the variable state cos ðθ=2Þjgi þ sin ðθ=2Þjei. Data (points) and fits (lines) confirm that entanglement is maximized when Þðjgi þ jeiÞ, Bob was prepared in the variable state ð1= ffiffi ffi 2 p Þðjgi þ e iϕ jeiÞ. The components of the Pauli vector oscillate with ϕ sinusoidally, as expected. The complete density matrix for ϕ given by the dotted line is shown in Fig. 4 (left) in the Pauli basis.  of the Alice and Bob qubits, T 2Bell , the imperfections of the detector, and the imperfections in the joint tomography (see Appendix B). As expected, most of the state information lies in the two-qubit Pauli components rather than the single-qubit ones. The measured fidelity F ¼ 0.53 AE 0.01 and concurrence C ¼ 0.1 AE 0.01 [31] exceed the entanglement threshold. The error bars for the fidelity and concurrence were determined by the statistical noise from the number of measurements used for each tomography axis (see Appendix F). When accounting for systematic errors in tomography (see Appendix B), we obtain the corrected fidelity F corr ¼ 0.57 AE 0.01. This fidelity can be understood as a result of various imperfections in the entanglement generation protocol: (1) decoherence of the two qubits, which limits the fidelity to F T 2Bell , and (2) imperfections of the detector, which are characterized by F det . From the measured value of T 2Bell ¼ 6μs and the protocol time T seq ¼ 2.5 μs, we expect F T 2Bell ≅ 0.8. The infidelity associated with the imperfect detector is characterized by the dark count ratio P d =P click , which is the fraction of detection events that are reported as clicks even though no actual photon was sent. In this experiment, P d =P click ¼ 0.05, primarily limited by the finite selectivity of the detection pulse and the imperfect readout of the detector qubit, which results in F det ≅ 0.9. A theoretical model incorporating these two imperfections was used to calculate an expected fidelity F thy ¼ 0.76 (see Appendix F). The remaining infidelity is a result of sources that are harder to characterize and will need to be explored in future work, like, for instance, the imperfections of the CNOT-like operation and the distinguishability of the photons. Nevertheless, the current results clearly establish the viability of this protocol and, by extension, the modular architecture for superconducting qubits.
Another figure of merit for this experiment is the entanglement generation rate, which is determined by the repetition rate T rep ¼ 21 μs and the success probability of the experiment. The latter is determined by the product of state initialization via post-selection (57%) and the detector click probability in the first (8%) and second (9%) rounds, respectively, leading to an overall success probability of 0.4%. The corresponding generation rate of about 200 s −1 is orders of magnitude faster than similar experiments performed with nitrogen-vacancy centers in diamond (2 × 10 −3 s −1 ) [20], neutral atoms (9 × 10 −3 s −1 ) [19], or trapped ion systems (4.5 s −1 ) [32]. We note, however, that our generation rate (200 Hz) does not exceed the decoherence rate of the two qubits (26 kHz) and thus does not yet cross the threshold for fault tolerance [25,32], though there are many prospects for enhancement.

VI. OUTLOOK AND CONCLUSIONS
Improvements in generation rate and fidelity are possible with readily available upgrades to the hardware and software of our experiment. First, a factor of 4 increase in success can be achieved by installing the omitted second detector. Second, shaping the generated photons and detection pulse to mode match the flying photons to the detector would increase the detection efficiency by at least 50% and hence multiply the generation rate by at least a factor of 2. Moreover, this would reduce both the dark count fraction and the distinguishability of the traveling photons, which would directly benefit the entanglement fidelity by bringing F det closer to unity. Third, an order of magnitude better coherence time for the two qubits has been demonstrated in similar 3D qubit-cavity systems [33], which should readily carry over to this experiment and improve F T 2Bell . Finally, the overall throughput of the experiment can be increased by an order of magnitude by the use of real-time feedback capabilities that have recently been demonstrated for superconducting qubits [34,35].
Combined, these upgrades could increase the entanglement generation rate by a few orders of magnitude to around 10 kHz, to beyond the decoherence rates of approximately 100 Hz experimentally demonstrated in 3D cQED-based quantum memories [36]. These 3D microwave-cavity-based memories can be readily integrated into the current system to store the generated remote entangled states, thus allowing for the qubits to be reused to generate additional entangled pairs. Together with the ability to perform high-fidelity local operations between the qubit and the memory, this would offer the possibility of realizing remote entanglement distillation [37,38], a crucial next step in realizing fault-tolerant modular systems.
In this work, we have demonstrated, in a single experiment, the set of tools that had previously been the exclusive privilege of quantum-optics experiments: the availability of flying microwave single-photon sources and detectors, together with the spatial and temporal control of traveling photons to make them indistinguishable. With these tools, we have realized two-photon interference of microwave photons and the generation of loss-tolerant entanglement between distant superconducting qubits with concurrent measurements. The protocol speed and prospects for improving fidelity make this a very promising implementation for remote entanglement and the distribution of quantum information with microwave flying photons. Thus, this experiment opens new prospects for the modular approach to quantum information with superconducting circuits. The three transmon qubits consist of Al=AlO x =Al Josephson junctions fabricated using a bridge-free electron-beam lithography technique [39] on double-sidepolished 3-mm-by-13-mm chips of c-plane sapphire. The junctions are connected via 1-μm leads to two rectangular pads (1900 μm × 145 μm for Alice and Bob, 1100 μm × 250 μm for the detector) separated by 100 μm. The qubit chips are placed in their respective rectangular indium-plated copper cavities (21.34 mm × 7.62 mm × 43.18 mm). The transmon parameters and couplings to the TE 101 cavity mode were designed using finite-element simulations and black-box quantization [40]. Experimentally measured device parameters are listed in Table 1.
A coaxial coupler was used as the input port of each cavity, with the length of the pin determining the input coupling quality factor Q in ∼ 10 6 . The output port for each cavity was an aperture in the cavity wall at the antinode of the TE 101 mode. The size of the aperture was chosen so that Q out ¼ 7.5 × 10 3 , yielding a total cavity bandwidth κ ≃ 1=Q out . Waveguide-to-coaxial-cable adapters (WR-102 to SMA) were used on the output port of the cavities; since the qubit frequency is below the cutoff frequency of the waveguide while the cavity frequency is inside the passband, this section of waveguide acts as a Purcell filter for the qubit.
As shown in Fig. 5, the qubits were mounted to the base stage of a cryogen-free dilution fridge maintained below 50 mK. The cavities were housed inside μ-metal (Amumetal A4K) cans to shield them from magnetic fields. The input and output lines connected to the experiment were filtered with homemade lossy Eccosorb filters, commercial low-pass microwave filters, attenuators, and isolators to attenuate radiation incident on the experiment. A commercial cryogenic HEMT amplifier was used at 3 K to additionally amplify the output signals before subsequent room-temperature amplification and demodulation.
A critical requirement for the experiment was matching the frequencies of the Alice and Bob cavities to render the flying single photons indistinguishable. In addition, the detector cavity frequency also needs to be matched to the Alice and Bob cavity frequencies so that incident photons can enter the detector cavity. This was achieved by an aluminum screw inserted into each cavity at the TE 101 antinode to fine-tune the cavity frequencies until they satisfied ω e A ¼ ω e B ¼ ω g D [see Fig. 6(a)].

B. Readout
All three qubit-cavity systems were measured on the same output line using a single Josephson Parametric Converter (JPC) operated as a nearly quantum-limited phase-preserving amplifier. The JPC was biased to provide 20 dB of gain with a bandwidth of 8 MHz centered at 7.6314 GHz to realize high-fidelity single-shot readout of all three qubit-cavity system. At this operating point, a noise visibility ratio (NVR) [41] of 8 dB was measured, indicating that 86% of the noise measured at room temperature was amplified quantum fluctuations from the JPC.
As shown in Fig. 5, readout pulses for the three cavities were generated using a single microwave generator powering an IQ mixer. The output of the mixer was split and sent to each cavity on separate input lines with the relative room-temperature attenuation on each line adjusted so that an applied readout amplitude at room temperature resulted in the same measured signal-to-noise ratio (SNR) for each qubit-cavity system. Room-temperature microwave switches were used on each line to gate the pulses generated by the IQ mixer. The amplified cavity outputs were mixed down to radio frequencies, along with a copy of the generator tone that did not pass through the cryostat to provide a reference. The signal and reference were digitized and demodulated to yield in-phase and quadrature components [IðtÞ, QðtÞ] that are insensitive to drifts in the generator and other microwave components. With this setup, high-fidelity readout of all the modules in the fridge was possible with minimal hardware and complexity. In the experiments described in this paper, two types of measurements were performed: (1) joint measurement of the Alice and Bob qubits and (2) single-qubit measurement of the detector

Joint Alice and Bob measurement
The Alice and Bob cavities were measured jointly by energizing them with 2-μs pulses at f ABD msmt ¼ ω g A =2π ¼ 7.6314 GHz. Using a phase shifter on the Bob cavity arm, the relative phase of the pulses on the Alice and Bob cavities (including all system path lengths) was adjusted to π=2. The output signals from each cavity then passed  Input lines carrying signals to the systems were attenuated and filtered using commercial low-pass filters and homemade lossy Eccosorb filters. The room-temperature electronics used to produce and shape the input signals are shown at the top of the figure. The basic setup to produce shaped signals was a microwave generator driving an IQ mixer followed by an amplifier and finally a switch to gate the signal (box in top-right corner). The signals were shaped by channels from four arbitrary waveform generators (AWGs) (not shown), which also provided the digital markers for the switches. Copies of this setup (denoted by the shorthand notation of a circle with a shaped pulse) were used to generate the drive signals (color-coded) for three modules: Alice (red), Bob (blue), and the detector (green). The Alice and Bob modules had four inputs each: the cavity readout tone, the qubit signals, and the pair of sideband pulses for photon generation. On the other hand, the detector module had two inputs: the cavity readout tone and the qubit signals. All the modules were read out using a single output line that had multiple stages of amplification. High-fidelity single-shot readout was enabled by the JPC amplifier. The output signals were downconverted and then digitized and demodulated along with a room-temperature reference copy.
through the hybrid whose output was the sum of the two cavity signals, but half the power from each signal was lost in the cold 50 Ω load. This joint output signal reflects off the detector cavity (since it is χ A above ω g D ) and was amplified by the JPC. As a result, the output signal, demodulated at 50 MHz, contained information about both qubit states along orthogonal axes [see Fig. 6(b)]. Two separatrices (white dashed lines), the first along the Q m axis and the second along the I m axis, were used to measure the state of the Alice and Bob qubits, respectively. In addition, the two-qubit correlation was calculated on a shot-by-shot basis. This resulted in an overall fidelity F joint > 90%. A primary limitation in achieving a higher fidelity was the loss of half the information in the cold load after the hybrid. This can be improved in future experiments by the use of a second detector and output line. While these joint tomography imperfections will ultimately impact the measured entanglement fidelity, they can be calibrated out (as we discuss later in Appendix B).

Detector qubit measurement
To measure the state of the detector qubit, an IF frequency of −9.2 MHz was used on the IQ mixer to generate 700-ns pulses at ω g D ¼ 7.6222 GHz. Since this is equal to ω e A and ω e B , this readout is not performed simultaneously with the joint measurement of Alice and Bob described above to avoid signal interference. The amplified output from the cavity was demodulated at 59.2 MHz, resulting in the histogram shown in Fig. 6(c). As explained in the main text, measuring the qubit in jei corresponds to a click in the detector. In this case, the measurement fidelity F m;det > 99%. The measurement was optimized for maximal fidelity in the shortest possible time by using a shaped pulse that minimized the cavity ring-up and ring-down times [42]. Since the pulse shape also decreased the time taken to depopulate the cavity, operations on the detector could be performed 400 ns after the readout instead of having to wait for the natural ringdown time.

APPENDIX B: JOINT TOMOGRAPHY AND CALIBRATION
To calculate the final state of the Alice and Bob qubit after a joint measurement, the measured in-phase and quadrature signal (IðtÞ and QðtÞ) was converted into a digital result using two thresholds, one for Alice and one for Bob [see Fig. 6(b)]. Since the four measured Gaussian distributions had equal standard deviations, these thresholds were straight lines equidistant from the two distributions. Thus, using the thresholds, the output voltage from each joint tomography measurement was converted into a final outcome of jgi or jei for each qubit. By performing measurements on an ensemble of identically prepared states, these counts were converted into expectation values of the observable being measured. Fully characterizing the state of the two qubits requires measuring the 16 components of the two-qubit density matrix. This was done in the Pauli basis using the single-qubit prerotations Id, R y ðπ=2Þ, and R x ðπ=2Þ to measure the Z, X, and Y components,  6. Alice, Bob, and detector qubit readout spectra and histograms. (a) Alice, Bob, and detector cavity frequency spectra. The Alice and Bob cavities had nearly identical frequencies (ω g A ≈ ω g B ) and dispersive shifts (χ A ≈ χ B ). To perform joint readout of Alice and Bob, microwave pulses were simultaneously applied on each cavity at ω g A with a relative phase of π=2 between the two pulses. The detector module cavity frequency ω g D was tuned to match the frequency of the photons in the experiment, ω e A . The detector was read out at ω g D . (b) Joint readout histogram for Alice and Bob. A 2-μs measurement pulse was used to measure the state of both qubits. The resulting output contained information about the state of Alice and Bob along the Q m and I m axes, respectively. Thus, the measurement provided single-shot readout of both qubit states, as well as the correlation between the two qubit states with F joint > 90%. (c) Readout histogram for the detector. The state of the detector qubit was measured with F m;det > 99% in 700 ns. respectively, of each qubit Bloch vector and the two-qubit correlators.
However, the tomography was not perfect (F joint ≠ 100%), and next we discuss how to understand the imperfect tomography and calibrate out its effects [35,43]. The ideal joint measurement of the two-qubit state can be described using the projectors into the computational basis: Here, the capital letters are used to denote a measurement outcome and distinguish it from a two-qubit state. The probability of each of those four outcomes is given by pðjÞ ¼ Tr½Π j ρ, where j ¼ fGG; GE; EG; EEg. In the case of the imperfect measurement, the state at the end of the experiment is not faithfully converted into a measurement outcome. For example, the state jggi could be recorded as EG with some probability. This can be described by the 4 × 4 matrix A, where A ji is the probability that the state i is recorded as outcome j. Thus, four new projectors, Π expt j ¼ Σ i A ji Π i , can be calculated that model this imperfection. The effects of this imperfect measurement were accounted for in the theoretically calculated density matrix in Fig. 4(b) of the main text.
To calculate A for this system, a calibration experiment was performed where the four computational states jggi, jgei, jegi, and jeei were prepared. Then joint tomography was performed to calculate the probability of each measurement outcome. By measuring p j for each of the input states, the values of A ji were calculated, yielding With this matrix, the tomography for the actual experiment could be corrected. For a given tomography prerotation k, the outcome can be written as a vector of probabilities B k ¼ ðpðGGÞ k ; pðGEÞ k ; pðEGÞ k ; pðEEÞ k Þ. Thus, the experimental state in the computational basis, P k , that resulted in this outcome is given by P k ¼ A −1 B k . This operation was applied to tomography outcomes to calculate a corrected density matrix, ρ corr , and thus a corrected fidelity, F corr ¼ 57%.

APPENDIX C: QUBIT-PHOTON ENTANGLEMENT
As discussed in the main text, the CNOT-like operation that entangles the stationary qubits with flying microwave photons is realized by a π-pulse on the qubit ef transition followed by a π-pulse between jf0i ↔ je1i following the method in Refs. [28,44]. To drive coherent transitions between jf0i ↔ je1i, two sideband tones at ω QSB;A =2π ¼ 5.1987 and ω CSB;A =2π ¼ 8.3325 (ω QSB;B =2π ¼ 4.9631 and ω CSB;B =2π ¼ 8.1302) were applied to Alice (Bob). As shown in Fig. 7, these drives result in damped sideband Rabi oscillations of the qubit state between jfi and jei (Alice top, Bob bottom). The probability of detecting a photon with the detector, P click , shown on the right axes of the graphs in Fig. 7, peaked when the qubit was in jei, confirming that a photon is generated. Thus, a π-pulse can be performed by turning on the drives for half an oscillation, i.e., the time taken to transfer the excitation from the qubit to the cavity. The amplitudes of the CSB and QSB drives on Alice and Bob were chosen so that the π-pulse on jf0i ↔ je1i took the same time, T SB ¼ 254 ns, for both modules. While the oscillations would ideally be between Alice (top) and Bob (bottom) qubit ef polarization (left axis) and detector click probability P click (right axis) as a function of sideband pulse length T SB , when the qubit is prepared in jfi. Two sideband drives (ω QSB , ω CSB ) were applied, satisfying the frequency condition ω CSB − ω QSB ¼ ω e A=B − ω ef . The drives result in coherent oscillations between jf0i and je1i, with the amplitude of the drives chosen such that a π-pulse on the transition takes the same time for the Alice and Bob qubits, T SB ¼ 254 ns. The generation of a photon was verified with the detector, which showed a peak in P click when Alice or Bob were in jei. þ1 and −1, a deviation from this behavior is observed in the data. We attribute this behavior to the QSB tone spuriously exciting the ge and ef transitions and hence driving the qubit out of jei. While increasing the detuning of the drives would lower the spurious excitation, this was not possible in our experiment because of power limitations. Similarly, the drive amplitudes could have been decreased, but this would have increased the photongeneration time and degraded the fidelity of the two-qubit entangled state because of decoherence. Thus, the drive amplitudes and detunings were chosen to balance the two effects.
Using the CNOT-like operation, signatures of qubitphoton entanglement for the Alice module were demonstrated in Fig. 2 of the main text. Similar signatures were observed for the Bob module as shown in Fig. 8. The observed behavior agrees with the results of a simplified theoretical model [right panels, Fig. 8(a)]. In this model, the action of the sideband drives on Alice or Bob was modeled using the theory of damped vacuum Rabi oscillations described in Ref. [6]. We note that although our system uses sideband transitions between a different set of states, the coupling can still be modeled with the same formalism. Thus, the three states used here were jf0i, je1i, and je0i. The sidebands drive coherent transitions between jf0i and je1i, while the cavity line width κ causes je1i to decay to je0i. For the detector signal, we made the simplification of using the state of the cavity subjected to two inefficiencies as a proxy. Thus, P click ðT SB Þ ¼ ηP e1 ðT SB Þ, where η accounts for the loss between the Alice or Bob module and the detector, as well as the detector efficiency, and P e1 ðtÞ is the probability of the system being in je1i. We find good qualitative agreement between theory and experiment.

A. Simulations
A cascaded quantum system simulation [12,45,46] was performed to understand the operation of the detector, as well as how two characteristics-dark counts and detector efficiency-depend on system parameters. We simulate a simplified model of the experiment consisting of a single emitter cavity, Alice, and the detector qubit-cavity module. The master equation for this system was solved for various initial states of Alice modeling the inputs seen by the detector in the experiment. The simulations were performed with the experimentally measured parameters (see Table 1). However, unlike the experiment, the two cavities had identical cavity frequencies.
As shown in Fig. 9, the simulation began by initializing the Alice cavity in the j0i (red trace), j1i (blue trace), or j2i (green trace) Fock state (top panel). The photon leaked out and excited the detector cavity (second panel). Simultaneously, a selective π-pulse, timed to start at the beginning of the simulation, with σ ¼ 120 ns was applied at ω 1 ge to selectively excite the detector qubit conditioned on the presence of an intracavity photon (third panel). Finally, P click was extracted by calculating the probability that the detector qubit state was jei at the end of the simulation (bottom panel). The first detector characteristic, its dark count fraction P d , is the probability that the detector clicks when the input is j0i. When no photons were sent to the detector (red trace), P click < 0.01 at the end of the simulation. The transient increase in the probability of the detector qubit being in jei observed during the course of the qubit pulse is a result of the finite selectivity of the π-pulse, which was confirmed by varying σ or χ. Thus, the dark count probability P d can be decreased by increasing σ at the Þðjgi þ e iϕ jeiÞ and the CNOT-like operation was either performed (bottom) or not (top). Open circles are experimental data, and lines are fits. cost of slowing down the detection process (and hence the detection probability).
The second detector characteristic is its efficiency η, the probability that the detector clicks when the input is j1i. When one photon was sent to the detector, the qubit was excited by the selective π-pulse, resulting in P click ¼ 0.4. On the other hand, when two photons were sent to the detector, on average, a single photon entered the detector, also resulting in P click ¼ 0.4. Since P click is similar for j1i and j2i, the detector is not photon-number resolving. Furthermore, the simulations verified that the detector efficiency is robust to small imperfections and does not require precise tuning. When the simulation parameters, such as the mismatch between the Alice and detector cavity bandwidths and the selective pulse length and timing, were varied by 20%, η changed by < 10%.

B. Detector characterization
The performance of the detector was also characterized experimentally to verify that it was detecting single photons. In these experiments [see Fig. 10(a)], the Alice and Bob modules were initialized in one of the two states, j0i or j1i. Single photons were generated by preparing the qubit in jei and then performing the CNOT-like operation to create the state je1i. Note that the generation process takes 254 ns, unlike the assumption of instantaneous generation in the simulations. Then, detection was performed by applying the selective π-pulse (σ ¼ 120 ns) on the detector, followed by measuring the state of the detector qubit to find P click . The frequency of the detection π-pulse was varied to characterize the detector response as a . The third panel shows the amplitude of a selective π-pulse with σ ¼ 120 ns applied on the detector qubit to excite it, conditioned on the presence of a single intracavity photon. Finally, the probability to find the detector qubit in jei was calculated to find P click at the end of process (bottom panel). Simulations confirm that the detector has dark counts (P click given j0i) P d < 0.01 and an efficiency (P click given j1i) η ∼ 0.4. Since P click is the same for j1i (blue trace) and j2i (green trace), the detector is not number resolving.  Fig. 10(a), when the state j0i (black circles) was sent, the P click was maximized at zero detuning, where the pulse is selective on zero intracavity photons in the detector. Instead, when the input was j1i (orange circles), an increased response at ω 0 ge − χ was observed. This is a direct result of the detector being excited when the photon enters the detector. Because of losses and the detector inefficiency, the response at zero detuning remains but with a lower P click than for j0i. Moreover, the similar detector response to inputs from Alice and Bob demonstrates that the detector can detect photons from both systems and that the losses on the two arms are similar on the two paths.
In a second characterization experiment, the delay between the end of the photon-generation and the beginning of the photon-detection steps was optimized. The probability of detecting the photon, P click , is maximized when the peak of the detection pulse coincides with the time at which the photon population inside the detector cavity is maximum. To find this point experimentally, a photon was generated by Alice or Bob and sent to the detector with a variable delay between the end of the photon-generation sideband pulse and the beginning of the selective detection π-pulse. As shown in Fig. 10 We attribute the difference between the simulated detector efficiency, η ¼ 0.4, and the measured P click when a photon was generated in experiments to the losses in our system and dark counts. Because of the hybrid and the insertion losses of the microwave components between the Alice and Bob modules and the detector, photons only reach the detector about 40% of the time, corresponding to an efficiency due to the loss of η loss ∼ 0.4. In addition, the detector can also click when no photon is incident on it, which occurred with a probability P d ¼ 0.01. Together, they result in the observed P click ∼ 0.2 when a photon was generated.

C. Detector optimization
This remote entanglement protocol is robust to loss since the generation of an entangled state is uniquely heralded by the dual detection of single photons in the detector. Hence, photon loss between Alice or Bob and the detector only affect the probability of that outcome. However, dark counts in the detector are detrimental to this experiment (for a quantitative discussion of the effect, see Appendix F) because they mix the desired Bell state with unwanted states, for example, jggi. This impacts the measured fidelity. Since the desired (undesired) outcomes occur with probabilities proportional to P click (P d ), the ratio of P d =P click is the figure of merit that must be minimized for reducing the infidelity due to dark counts. Thus, it is important to minimize the probability of dark counts in the detector, P d . In our detector, dark counts occur as a result of the finite selectivity of the detection π-pulse and imperfect readout of the qubit state. While the detection pulse could be made more selective by increasing its σ, this would increase the overall detection time. Unfortunately, this has two undesired consequences. First, the overall protocol time increases and, thus, so does the infidelity due to  11. Detector optimization. The probability of dark counts P d and detector click probability P click (left axis) and their ratio (right axis) for each round of detection as a function of the readout threshold I th m =σ. The detector readout has two probability distributions (inset), one for click and one for no click. By using a more stringent threshold for outcomes to be considered a click (black dashed line or white dashed line in inset), the ratio P d =P click can be reduced, therefore improving the fidelity of the generated Bell state. decoherence. Second, simulations show that the detector efficiency is maximized for σ ∼ κ, and thus, increasing σ further actually increases P d =P click . Therefore, we operated with σ ¼ 120 ns.
Instead, we decrease the ratio P d =P click in post-selection by reducing the probability that the detector clicks when the state j0i is incident on it. As discussed before, readout of the detector qubit results in two distributions, one for click and one for no click. As shown in Fig. 11, by moving the threshold closer to the distribution associated with a click in the detector, it was possible to decrease the dark count fraction. The data for P click (red and yellow circles) and P d (black and grey circles) were obtained from the two rounds of the remote entanglement experiment and the control experiments (see Appendix E), respectively. From these two numbers, the ratio P d =P click (blue and purple squares) was calculated for each round. A threshold in the middle of the two distributions corresponds to I th m =σ ¼ −1.8, where P d =P click ¼ 0.1 for the second round. By moving the threshold to I th m =σ ¼ 0.15 (black dashed line), the ratio decreases to P d =P click ¼ 0.05.

A. Pulse sequence
In the first step of the complete remote entanglement protocol [ Fig. 8], the Alice, Bob, and detector qubits were initialized in jgi. They were first cooled to the ground states using a driven reset protocol [47], and then a measurement was performed to post-select on experiments where all three qubits were successfully cooled. This state initialization by post-selection had a success probability of 57%. Moreover, this also allowed the experiment to be repeated at T rep ¼ 21 μs, much faster than the relaxation time of any qubit. Single-qubit pulses were then applied to the Alice and Bob qubits to prepare them in the desired initial state. Then, the first round of the remote entanglement protocol, consisting of the CNOTlike operation and photon detection, was performed. Before the second round, a π-pulse on ω ge was applied to both the Alice and Bob qubits to remove the weight in the jeei state. In addition, the detector was reset by an unselective π-pulse that returned the detector qubit to jgi if it went click in the first round. Such an unconditional reset can be used since only those trials where the detector went click were used in the final data analysis. After a second round of the CNOT-like operation and photon detection, joint tomography of the Alice and Bob qubit state was performed, conditioned on measuring two clicks in the detector. As shown in Fig. 12, the measurement of the detector qubit in the second round was performed after the joint tomography to reduce the protocol time and, hence, the effects of decoherence. This can be done because the photon detection process is completed at the end of the detection π-pulse. The measurement of the qubit state is required only for the experimenter to determine the outcome of the detection event. A set of control sequences was interleaved into the above protocol to calibrate the joint tomography. These experiments were repeated to FIG. 12. Detailed remote entanglement protocol pulse sequence. The remote entanglement protocol began with state preparation, where the three qubit-cavity systems were initialized in the desired state by cooling and single-qubit rotations. Then, the first of the two rounds of the protocol was performed. The qubits were entangled with flying single photons by a CNOT-like operation, which then interfered on the hybrid and were detected by a selective π-pulse on the detector qubit. A π-pulse was performed on both Alice and Bob to remove the unwanted jeei state and on the detector to reset it. Next, the second round of the protocol was performed, followed by joint tomography to measure the state of Alice and Bob. The measurement outcomes from the two rounds of photon detection, M 1 and M 2 , were used to post-select successful trials for the tomographic analysis. The entire protocol was repeated with T rep ¼ 21 μs, much faster than the T 1 time of any of the qubits. accumulate at least 10 5 successful shots of each sequence for adequate statistics.

B. Control experiments
To verify that the experimental results observed in the data shown in Fig. 3 are a result of the which-path erasure of the flying photons by the hybrid, two control experiments were performed. In these experiments, no flying photons were generated, but the experimental protocol was otherwise left unchanged. The joint tomography performed at the end of the protocol is no longer conditioned on photon detection events. To further rule out systematic error, these experiments were interleaved with the experiments performed in Fig. 3. The results on these experiments are shown in Fig. 13. In the first experiment, a control for the data in Fig. 3(a), Bob was initialized in ð1= ffiffi ffi 2 p Þ × ðjgi þ jeiÞ and Alice was prepared in cos ðθ=2Þjgi þ sin ðθ=2Þjei. Since the qubits were not entangled with photons, no entanglement was generated for any preparation angle θ. This is most directly demonstrated by hZZi ¼ 0, unlike in Fig. 3(a), where hZZi<0. Since Bob remained in ð1= ffiffi ffi 2 p Þðjgi þ jeiÞ at the end of the experiment independent of θ, the final single-qubit Bloch vector has Pauli components hZ B i ¼ 0, hX B i ¼ 0 and hY B i ¼ 1. Consequently, only hYYi and hXYi vary with θ and are maximized at θ ¼ π=2, while hXXi ¼ hYXi ¼ 0, unlike in Fig. 3(a).
In the second experiment, a control for the data in Fig. 3(b), Alice was initialized in ð1= ffiffi ffi 2 p Þðjgi þ jeiÞ, and Bob was prepared in ð1= ffiffi ffi 2 p Þðjgi þ e iϕ jeiÞ. In the control experiment with no photons, the final two-qubit state should be the superposition of the computation states 1 2 ðjggi þ e iϕ jgei þ jegi þ e iϕ jeeiÞ. Thus, hZZi ¼ 0 [see Fig. 13(b)]. Moreover, hXXi and hYYi do not have in-phase sinusoidal oscillations characteristic of an odd Bell state. Ideally, hXXi ¼ hXYi ¼ 0, but a small detuning error on the Alice qubit caused oscillations in them, too.

APPENDIX F: ENTANGLEMENT FIDELITY
To understand the sources of infidelity in the experiment, various sources of imperfection were built into a quantum circuit model of the entire system. The model contained both qubits, treated as two-level systems, an upper and lower branch of the experiment that could have 0, 1, or 2 flying photons and two single-photon detectors. Thus, the total system state was described by a 36 × 36 density matrix. Sources of imperfections were individually introduced, and their effects on this density matrix was calculated. By cascading their effects on the density matrix, their combined impact was also calculated. Finally, to compare to experiment, the photon parts of the density matrix were traced out to reduce it to a two-qubit density matrix, which was expressed in the Pauli basis, to generate Fig. 4(b) and calculate the expected fidelity.

A. Qubit decoherence
The effects of qubit decoherence on the density matrix were modeled using phase damping. For a single qubit, this can be represented by the quantum operation EðρÞ Here, and α ¼ ð1 þ e −t=T 2E Þ=2. The decoherence of each qubit was treated as an independent process assuming that there was no correlated noise affecting the two systems. Thus, by taking its Kronecker product with a 2 × 2 identity matrix, the single-qubit phase damping operation was converted into a two-qubit operator.  Fig. 3, the two qubits were prepared in the desired initial state, but no flying photons were generated. Joint tomography of the final two-qubit state was performed. (a) With Bob always initialized in ð1= ffiffi ffi 2 p Þðjgi þ jeiÞ, Alice was prepared in the variable state cos ðθ=2Þjgi þ sin ðθ=2Þjei. (b) With Alice always initialized in ð1= ffiffi ffi 2 p Þðjgi þ jeiÞ, Bob was prepared in the variable state ð1= ffiffi ffi 2 p Þðjgi þ e iϕ jeiÞ. In both cases, data (points) and fits (lines) confirm that no two-qubit entanglement is observed. This is most directly indicated by hZZi ¼ 0, unlike Fig. 3. obtained by cascading the two operations, resulted in a 20% infidelity due to decoherence, i.e., F T 2Bell ≅ 0.8.

B. Dark counts
This protocol's robustness to loss is a result of heralding on single-photon detection events, which are uniquely linked to the generation of a Bell state. However, dark counts mix the Bell state with other states, jggi for example, resulting in a lowered fidelity. This infidelity was calculated by modeling the impact of an imperfect detector on the twoqubit density matrix. The detector takes one of three possible input states-the flying Fock states j0i, j1i, and j2i-and returns one of two outputs, click or no click. In the generalized measurement formalism, this corresponds to the three measurement operators M 0 ¼ j0ih0j, M 1 ¼ j0ih1j, and M 2 ¼ j0ih2j for detecting 0, 1, or 2 photons, respectively [6]. To model the imperfections of dark counts and finite detector efficiency, we introduce P d , the probability of a dark count in the detector, and P real , the probability that the detector goes click when a photon arrives. Since according to simulations, the detector cannot distinguish between j1i and j2i, we make the assumption that either input results in a click with the same probability P real . Thus, the probability of the two outcomes, no-click (NC) and click (C), are Based on the measurement outcome, the input density matrix is projected to one of two output density matrices: To model the experiment and calculate the fidelity limited by dark counts, the final density matrix after two rounds of the protocol and successful photon detection was calculated, resulting in a 36 × 36 density matrix. The photon components of the density matrix were traced out, yielding the 4 × 4 density matrix ρ final . From this, the fidelity limited by dark counts, F det ¼ Trðρ final jO þ ihO þ jÞ, was found: F det ¼ 3P d;1 P d;2 þ P d;1 P real;2 þ 4P real;1 P real;2 11P d;1 P d;2 þ 8P d;2 P real;1 þ 9P d;1 P real;2 þ 4P real;1 P real;2 : Here, the numeric subscripts on P d and P real are for the two detections rounds in the experiment. The values of P real and P d for each round were extracted from the measured click probabilities from the remote entanglement and the control experiments. We find P d;1 ¼ 0.006, P d;2 ¼ 0.005, P real;1 ¼ 0.21, P real;2 ¼ 0.26, and thus F det ≅ 0.9. Combining the effects of decoherence and dark counts results in an expected theoretical fidelity of F thy ¼ 0.76.
From this model of the experiment, it is also possible to analyze the state created at the end of the first round of the protocol which, as described in the main text, is ρ click 3 ¼ N jO þ ihO þ j þ ð1 − N Þjeeiheej. In the case of a detector with no ability to distinguish between inputs j1i and j2i and with no losses or dark counts, the normalization constant N ¼ 2 3 . However, in the presence of dark counts in the detector, the mixed state is further contaminated with weights in jggi and jO − i. From the values of P d;1 and P real;1 , we find that the mixed state generated by detecting a click in the first round is While limiting the experiment to a single round would reduce the effects of decoherence and increase the generation rate by decreasing the protocol time, the advantages of performing a second round of the protocol are greater. In addition to increasing the overall fidelity by removing the weight in the jeei, the inclusion of the R y ðπÞ pulse on Alice and Bob stabilizes the phase of the generated Bell state, protecting it against inevitable drifts in experimental setup, such as the qubit frequencies or the phase of the various microwave generators, for example.

C. Tomography
To model the imperfections arising from the tomography process, we used the theory described above (see Appendix B) to calculate the Pauli components in Fig. 4. Using the experimentally measured A matrix, the imperfect projectors Π expt j were calculated. Thus, the measurement outcome is P jk ¼ Tr½Π expt j R k ρR † k , where R k is one the nine tomography prerotations. From the set of measurement outcomes, the 16 Pauli vectors were calculated and plotted in Fig. 4(b).

D. Error analysis
The error bars in the quoted fidelity were dominated by statistical error from the finite number of tomography A. NARLA et al.
PHYS. REV. X 6, 031036 (2016) 031036-16 outcomes used to reconstruct the density matrix in the Pauli basis. Since around 2 × 10 5 successful shots were used to calculate each Pauli component, the error was limited to around 1%. To convert the error in the Pauli components to an error in the fidelity and hence the concurrence, different density matrices were constructed by varying each Pauli component by its respective error amount. The fidelity to jO þ i and concurrence was then calculated for each of these density matrices to find the desired error bars.