Introduction

The development of large-scale quantum networks1,2, comprising interconnected quantum nodes, has garnered significant attention as they provide powerful capabilities beyond the reach of classical counterparts, including global quantum communication3,4,5,6, distributed quantum computing7,8, and quantum-enhanced sensing9. For distributed quantum computing, such network-based approaches can break the technical constraints of single quantum devices, providing an efficient method to scale up the systems10,11,12. Crucially, they can leverage the collective power of multiple remote nodes within expansive quantum networks to solve complex computational tasks efficiently13,14,15,16, and could enable secure cloud quantum computing with completely classical clients17.

Towards distributed quantum networks, an essential function is the execution of nonlocal quantum gates across network nodes14,18,19, which can be implemented with the help of quantum teleportation, avoiding the direct interaction of two remote qubits. Analogous to quantum state teleportation, which has been demonstrated across diverse physical systems and implementations20,21, quantum gate teleportation requires pre-shared entanglement between two separated nodes, local two-qubit gates, and active feedforward control of remote qubits through local operations and classical communications (LOCC). Such remote quantum gates have been realized with photonic qubits without LOCC22,23, as well as two species of trapped ions24 and two superconducting qubits25, both within a single device. More recently, based on spin-photon quantum logic, a remote quantum gate has been demonstrated between two separated single atoms linked by a 60-m fiber in the same building26. A demonstration of nonlocal quantum gates over longer distances represents a great challenge in the construction of large-scale quantum computing networks.

Here, we demonstrate remote quantum gates based on long-distance distributed photonic entanglement, LOCC enabled with long-lived quantum memories, and local two-qubit operations based on multiple-degree-of-freedom encodings on photons. We characterize the nonlocal controlled-NOT (CNOT) gate by measuring its truth table and the fidelity of four Bell states created from separable states. Furthermore, we use the established nonlocal quantum gates to execute the Deutsch-Jozsa algorithm27 and quantum phase estimation algorithm28, demonstrating the prototype of distributed quantum computing over metropolitan-scale distances.

Results

Experimental setup

The main approach of our experiment is schematically shown in Fig. 1. Nondegenerate entangled photon pairs are generated through the spontaneous parametric down-conversion (SPDC) process in node A, which is located on the east campus of the University of Science and Technology of China. The signal photon at 580 nm is stored in a local quantum memory, while the idler photon at 1537 nm is sent along field-deployed fibers to node B, which is located on the foot of the mountain DaShuShan with a spatial separation of 7.0 km from node A. Here, we employ multiple degree of freedoms (DOFs) to encode four qubits with two photons to implement the teleportation-based nonlocal two-qubit gates14. After performing local two-qubit gates at each node and successive LOCC, a nonlocal two-qubit gate is successfully implemented between the distant network nodes. Our protocol involves multiplexed operations in the time domain29,30 and the gate teleportation rate is proportional to the number of stored modes in the quantum memory.

Fig. 1: Nonlocal quantum gates based on fiber network in the Hefei city.
figure 1

a Node A is located on the east campus of the University of Science and Technology of China, and node B is located on the foot of the mountain DaShuShan which is 7.0 km away from node A. Pulsed nondegenerate entangled photon pairs are generated through a spontaneous parametric down-conversion (SPDC) process in a periodically-poled lithium niobate (PPLN) waveguide pumped by a 421-nm laser gated with an acousto-optic modulator (AOM). The 580-nm and 1537-nm photons are separated by a dichroic mirror (DM) and spectrally filtered using cascaded etalons. The 580-nm photon is stored in the quantum memory which is implemented using 153Eu3+: Y2SiO5 crystal cooled by a vibration-isolated cryostat and prepared with modulated laser at 580 nm, while the 1537-nm photon is sent to node B over fiber channel (QC). The control qubit and target qubit (A1 and B4) are encoded in the polarization degree of freedom (DOF) while the local two-qubit gates (gate C21 and C43) are implemented between the polarization DOF (A1 and B4) and the path DOF (A2 and B3). The results of polarization analysis (PA) in node B are sent back to node A through another fiber channel (CC) and determine the operations on A1 which is realized using an electro-optic modulator (EOM). FC: fiber collimator, BS: beam splitter, PBS: polarizing beam splitter, HWP: half-wave plate, QWP: quarter-wave plate, TSS: time synchronization system, SNSPD: superconducting nanowire single-photon detector, and TDC: time-to-digital converter. The satellite map is from Google Earth (map data from Airbus and Maxar Technologies). b The quantum circuit of nonlocal two-qubit gates between node A and node B. The circuit includes the entanglement between A2 and B3, quantum memories, local two-qubit operations C21 and C43, measurements of A2 in the X basis and B3 in the Z basis, and classical communication and feedforward operations. c The coincidence counting histograms for the quantum storage of entanglement. The red line and the black line represent the transmission of the 580-nm photons, as measured with a 24-MHz transparency window and a 24-MHz AFC memory, respectively. The blue line is the coincidence counts after the 80.315-μs AFC storage. The data to the left of the black dotted line is multiplied by 10−2. The retrieved echo peak duration is 72 ns, which is marked as a pair of orange dashed lines.

The nondegenerate entangled photon source is based on SPDC in a periodically-poled lithium niobate (PPLN) waveguide pumped by a laser at 421 nm, which is obtained by sum-frequency generation from stabilized and amplified lasers at 580 nm and 1537 nm. Both photons are spectrally filtered with two cascaded etalons to match the bandwidth of the quantum memory (see Section 4 in the Supplementary materials). Energy conservation guarantees that two photons are generated simultaneously, while the precise generation time of the photon pair remains uncertain within the coherence time of the pump laser, resulting in time-energy entanglement31,32. After postselection through an unbalanced interferometer of 30 m, the entangled state \(\frac{1}{\sqrt{2}}\left(\left\vert {S}_{{{{\rm{s}}}}}{S}_{{{{\rm{i}}}}}\right\rangle+\left\vert {L}_{{{{\rm{s}}}}}{L}_{{{{\rm{i}}}}}\right\rangle \right)\) is obtained, where the subscripts s and i represent the signal and idler photons, respectively. If we encode the short \(\left\vert {S}_{{{{\rm{s}}}},{{{\rm{i}}}}}\right\rangle\) and long \(\left\vert {L}_{{{{\rm{s}}}},{{{\rm{i}}}}}\right\rangle\) paths to \(\left\vert 0\right\rangle\), \(\left\vert 1\right\rangle\) path encoding, we can obtain the path-entangled state \(\frac{1}{\sqrt{2}}(\left\vert 00\right\rangle+\left\vert 11\right\rangle )\). Another unbalanced interferometer (encoding converter) is used to convert 1537 nm photons from the time-energy DOF to the polarization DOF before sending them into the field-deployed ultralow-loss optical fiber (see section 9 in the Supplementary materials). The fiber-optic cable is fixed in a protective underground duct system, maintaining low mechanical vibrations and temperature fluctuations, which enables the long-distance transmission of polarization-encoded photons.

Quantum memory and feedforward control

The quantum memory is implemented with the atomic frequency comb (AFC) protocol33 in a rare-earth-ion-doped crystal, i.e., 0.2% doped 153Eu3+: Y2SiO5 crystal. The isotope 153Eu3+ is chosen here to provide a larger storage bandwidth as compared to that of 151Eu3+34,35. The 153Eu3+: Y2SiO5 crystal is assembled on a close-cycle cryostat with a homemade vibration-isolated sample holder, which allows the preparation of high-resolution AFCs for long-lived and multiplexed photonic storage. The quantum memory should hold the 580-nm photons to wait for the transmission of 1537-nm photons from node A to node B (quantum communication, QC) and the feedback of successive measurement results from node B to node A (classical communication, CC). Both QC and CC are based on field-deployed optical fibers with a length of 7.9 km, which puts a lower bound for the storage time of 79 μs; therefore, we extend the storage time to 80.315 μs, which significantly outperforms previous results for photonic entanglement storage (47.7 μs in Ref. 36) in solid-state absorptive quantum memories29,30,32,36,37,38. Optical memories based on REICs have shown the capability to coherently store light for 1 hour35,39, making them competitive among various absorptive and emissive quantum memory systems40.

The prepared AFC has a total bandwidth of 24 MHz, and the storage efficiency for the bandwidth-matched SPDC source is (3.2 ± 0.1)% (Fig. 1c). Given a single mode duration of 72 ns which covers the retrieved echo peak and the input window length of 79 μs, the number of temporal modes stored in the memory is 79 μs / 72 ns = 1097, which results in a linear enhancement of the rate for quantum gate teleportation as compared to the case of employing a single-mode quantum memory (see Supplementary Fig. 10 in Supplementary materials).

The four qubits employed in the teleportation-based two-qubit gates are denoted as A1, A2 in node A and B3, B4 in node B, where qubits A2 and B3 are prepared in an entangled state in the path DOF of photons, denoted as \({\left\vert {{\Phi }}\right\rangle }_{23}=\frac{1}{\sqrt{2}}\left({\left\vert 00\right\rangle }_{23}+{\left\vert 11\right\rangle }_{23}\right)\), while the control qubit and target qubit (A1 and B4) are encoded in the polarization DOF of photons. At node A, we use path qubit A2 to perform CNOT operations on polarization qubit A1, followed by measurement of the path qubit A2 along the X basis. At node B, we use polarization qubit B4 to perform CNOT operations on path qubit B3, followed by a measurement of path qubit B3 along the Z basis. Then node B notifies node A of the measurement results through classical communication, and node A performs I or σx local operations on the polarization qubit A1 using an electro-optic modulator (EOM) to finalize the nonlocal CNOT gate between A1 and B4. In this protocol, without LOCC, the probability of success is 25%. The implementation of active feedforward has doubled the success probability of nonlocal two-qubit gates in our experiment. We note that a recent study has also implemented LOCC for multiplexed teleportation of quantum states between a photonic qubit and an atomic memory, linked by 1-km optical fiber, albeit within a single local node41. These two-node demonstrations only necessitate quantum memories with preprogrammed storage times. In principle, optical fiber delay loops could provide similar functions with reduced complexity. Nevertheless, quantum memories could provide extended storage times far surpassing those of fiber delay loops and offer versatile multifunctionalities40, rendering them indispensable components in future large-scale quantum networks.

Characterization of the nonlocal CNOT gate

We use H and V to denote the basis states for polarization qubits A1 and B4. The CNOT gate acts as \(\left\vert HH\right\rangle \to \left\vert HH\right\rangle\), \(\left\vert HV\right\rangle \to \left\vert HV\right\rangle\), and \(\left\vert VH\right\rangle \to \left\vert VV\right\rangle\), \(\left\vert VV\right\rangle \to \left\vert VH\right\rangle\). To characterize this gate, we use all combinations of \(\left\vert H\right\rangle /\left\vert V\right\rangle\) for the polarization qubits of node A and node B and then measure the resulting states. The truth table of the nonlocal CNOT gate is shown in Fig. 2a, and a fidelity of (88.7 ± 2.1)% compared to the ideal quantum CNOT gate is obtained.

Fig. 2: Characterization of the nonlocal CNOT gate.
figure 2

a Truth table of the CNOT gate. The diagram shows the probability P of measuring a certain output state for the four input states: \(\left\vert HH\right\rangle\), \(\left\vert HV\right\rangle\), \(\left\vert VH\right\rangle\), \(\left\vert VV\right\rangle\). The expected output states for an ideal CNOT gate are shown as light-shaded bars. be Density matrices of generated Bell states. The diagrams show the real parts of the density matrices of the generated states with inputs of \(\left\vert+\right\rangle \left\vert H\right\rangle\), \(\left\vert+\right\rangle \left\vert V\right\rangle\), \(\left\vert -\right\rangle \left\vert H\right\rangle\), \(\left\vert -\right\rangle \left\vert V\right\rangle\), respectively. The ideal Bell states are indicated as shaded bars in the plots. The error bars are one standard deviation.

To demonstrate the quantum properties of the nonlocal CNOT gate, we further use it to create entanglement between two qubits that are initially separable. We initialize qubits A1 and B4 into \(\left\vert+\right\rangle \left\vert H\right\rangle\), \(\left\vert+\right\rangle \left\vert V\right\rangle\), \(\left\vert -\right\rangle \left\vert H\right\rangle\), and \(\left\vert -\right\rangle \left\vert V\right\rangle\), respectively, where \(\left\vert+\right\rangle=\frac{1}{\sqrt{2}}(\left\vert H\right\rangle+\left\vert V\right\rangle )\), \(\left\vert -\right\rangle= \frac{1}{\sqrt{2}}(\left\vert H\right\rangle -\left\vert V\right\rangle )\). An ideal CNOT gate would generate four maximally entangled Bell states \(\left\vert {{{\Phi }}}^{+}\right\rangle\), \(\left\vert {{{\Phi }}}^{-}\right\rangle\), \(\left\vert {{{\Psi }}}^{+}\right\rangle\) and \(\left\vert {{{\Psi }}}^{-}\right\rangle\), where \(\left\vert {{{\Phi }}}^{\pm }\right\rangle=\left\vert HH\right\rangle \pm \left\vert VV\right\rangle\) and \(\left\vert {{{\Psi }}}^{\pm }\right\rangle=\left\vert HV\right\rangle \pm \left\vert VH\right\rangle\). The reconstructed density matrices (ρ) of the output states are provided in Fig. 2b–e, with fidelity to expected Bell states of \({{{\mathcal{F}}}}(\left\vert {{{\Phi }}}^{+}\right\rangle )=\left(81.1\pm 2.6\right)\%\), \({{{\mathcal{F}}}}(\left\vert {{{\Phi }}}^{-}\right\rangle )= \left(85.1\pm 2.5\right)\%\), \({{{\mathcal{F}}}}(\left\vert {{{\Psi }}}^{+}\right\rangle )=\left(81.3\pm 2.8\right)\%\) and \({{{\mathcal{F}}}}(\left\vert {{{\Psi }}}^{-}\right\rangle )=\left(80.2\pm 2.0\right)\%\), respectively. The average overlap fidelity to the ideal Bell states is (81.9 ± 2.5)%, indicating that high-quality entanglement is generated between node A and node B by the nonlocal CNOT gate. The final generation rates of effective nonlocal gates are 0.042 Hz, primarily limited by the efficiency of entangled light sources and quantum memories (see Section 6 in Supplementary materials).

Implementation of quantum algorithms

Universal quantum computing can be realized through the implementation of the demonstrated nonlocal CNOT gate in conjunction with additional local quantum gates14. Here, we execute a proof-of-principle for distributed quantum computing using two representative quantum algorithms that exploit quantum advantages: the Deutsch-Jozsa algorithm27 and the phase estimation algorithm28.

In the Deutsch-Jozsa problem, there are four possible functions f that map one input bit (a = 0, 1) to one output bit (f(a) = 0, 1). These functions can be divided into constant functions (f1(a) = 0, f2(a) = 1) and balanced functions (f3(a) = a, f4(a) = NOTa). Now, there is an N-bit input x, and the distinction between the constant and balanced functions f(x) can be achieved through an oracle. Classical algorithms would require querying this oracle 2N−1 + 1 times in the worst case for a deterministic answer. In contrast, the Deutsch-Jozsa quantum algorithm requires only a single query in all cases, leveraging inherent quantum parallelism that utilizes quantum interference for computation7,27, in which the output states might be engineered to be a coherent superposition of states corresponding to different answers.

As shown in Fig. 3a, in the two-qubit case42, the operation that needs to be loaded is \(\left\vert x\right\rangle \left\vert y\right\rangle \to \left\vert x\right\rangle \left\vert y\oplus f(x)\right\rangle\), where y is an auxiliary qubit and x is a single query qubit. Figure 3b–e presents the measured probability distributions of the x-register in the computational basis when the function is chosen as constant (Fig. 3b, c) and balanced (Fig. 3d, e). In all four cases, the experimental fidelity of identifying function classes with one measurement exceeds 91%.

Fig. 3: Implementations of the Deutsch-Jozsa algorithm and quantum phase estimation algorithm over two remote network nodes.
figure 3

a Quantum circuit for implementing the Deutsch-Jozsa algorithm. x is a single query bit, and y is an auxiliary bit, F is the Fourier transform, F−1 is the inverse Fourier transform. The box Uf represents a unitary operation specific to each of the functions f. b, c The results represent the case of identity (ID) and NOT operations, which belong to the constant function, so the register measurement result collapses to \(\left\vert H\right\rangle\). d, e The results represent the case of the CNOT and zero-CNOT (ZCNOT) operations, which belong to the balance function, so the register measurement result collapses to \(\left\vert V\right\rangle\). f Quantum circuit for the k-th iteration of the iterative phase estimation algorithm (IPEA). The algorithm is iterated m times to get an m-bit \(\tilde{\varphi }\), which is the approximation to the phase of the eigenstate φ. Zφ represents the phase correction as obtained from previous iterations. gj Quantum phase estimation results with m = 3. The corresponding eigenvalues are phase shifts that can be perfectly represented by three binary values with φ = 0, π/2, 5π/4, 3π/2. The blue part represents a phase estimation result of 0, while the green part represents a phase estimation result of 1. The error bars are one standard deviation.

The quantum phase estimation algorithm28 is used to estimate the phase of an operator acting on an eigenstate and is frequently used as a subroutine in other quantum algorithms, such as factorization43,44 and quantum chemistry45. In this algorithm, the quantum state register consists of a unitary operator U with an eigenstate \(\left\vert \psi \right\rangle\) (\(U\left\vert \psi \right\rangle={{{{\rm{e}}}}}^{{{{\rm{i}}}}2\pi \varphi }\left\vert \psi \right\rangle\)), and information about the unitary operator U is encoded on the measurement register through multiple controlled-\({U}^{{2}^{k}}\) operations with k an integer.

The accuracy of the phase estimation algorithm increases with the number of measurement registers. The estimated phase \(\tilde{\varphi }\) with m measurement register qubits in binary expansion is \(\tilde{\varphi }=0.{\tilde{\varphi }}_{1}{\tilde{\varphi }}_{2}\ldots {\tilde{\varphi }}_{m}\)28. The circuit with m measurement register qubits can be simplified to an m-round iterative phase estimation algorithm (IPEA)46 with a single measurement register qubit circuit (Fig. 3f). At the end of each iteration, the measurement register qubit is measured, which is an estimate of the k-th bit of φ in the binary expansion. In the IPEA scheme, the least significant bit is first evaluated (i.e., k iterates backward from m to 1), and then the obtained information is fed back to the phase estimation of subsequent iterations. The iterative information transmission is achieved by rotating Zφ of the state register, and its angle is determined by the phase measurement in the previous step.

The key challenge in implementing a distributed phase estimation algorithm is to achieve nonlocal controlled-U (C-U) gates. Here, we construct the nonlocal C-U gate based on quantum gate teleportation, where a local CNOT gate C21 is implemented in node A and C43 in node B is changed to a local C-U gate (see the Supplementary materials for details). As shown in Fig. 3g–j, we perform the quantum phase estimation algorithm for U = I, Z1/2, Z5/4, and Z3/2 with three iterations. These three unitary operations each act on the state \(\left\vert V\right\rangle\) with phase shifts φ = 0, π/2, 5π/4, and 3π/2 (corresponding to 0.000, 0.010, 0.101 and 0.110 in binary form, respectively, multiplied by 2π). We obtain the probabilities of each binary digit by polarization measurement of the register. The deviation between measured probabilities and theoretical results is mainly due to the imperfection of nonlocal C-U gates. To determine the phase, each binary digit (0 or 1) is chosen based on which measurement probability exceeds 1/2. Here, three rounds of iteration are sufficient to accurately determine the target phase chosen in this experiment. However, if the precision of the digital phase shift exceeds the number of measurement rounds (e.g., if a phase in binary form 0.1111 is determined but only three measurement rounds are conducted), a discrepancy will arise between the experimental measurements and the actual value.

DISCUSSION

To conclude, we have demonstrated nonlocal quantum gates across two nodes separated by 7.0 km and the long-distance active feedforward control of remote qubits enabled by long-lived quantum memories could serve as a fundamental tool in large-scale quantum networks. Several significant improvements are necessary prior to practical applications which include integrating essential functionalities into quantum memories, such as on-demand spin-wave storage33,47, enhancing the storage efficiency to outperform optical fiber loops, as well as establishing entangled photon sources and quantum memories at separate nodes to enable remote interconnection via quantum repeaters29,30. It is particularly noteworthy that the incorporation of multiplexed and long-lived quantum memories into quantum networks also opens the opportunity for the investigation of more efficient and high-performance quantum computing systems48,49. Due to the use of different DOFs of photons, the photons are measured and absorbed by detectors before feedforward control, and the highest success probability for nonlocal gate operations is 50%, posing a challenge to future scalability. The development of nondestructive photonic qubit detection50,51 may offer solutions to these limitations. An alternative approach would be introducing additional photons as communication qubits, allowing target and control qubits retrieved from quantum memories to be available for cascading with more qubits. The proof-of-principle demonstration is implemented with photonic qubits, but the principle of linking distant quantum computing nodes with field-deployed fibers can be extended to other platforms such as trapped ions24 and neutral atoms26, so that to achieve more qubits in a single node and enable deterministic operations. This approach could enable the construction of large-scale quantum computing networks, to make powerful quantum computers that harness the power of quantum communication.

After the submission of the current work, we note that similar experiments of teleported gates were performed with two silicon T center modules separated by approximately 40 m of fiber52 and two trapped ion modules separated by approximately 2 m53.

Methods

Quantum memory sample

We implement the AFC protocol in an isotope-enriched 153Eu3+: Y2SiO5 crystal that has a doping concentration of 0.2% and an isotope 153Eu3+ enrichment greater than 99.8%. The dimensions of the crystal are 17.5 mm  × 5 mm  × 4 mm along the b  ×  D1  ×  D2 axes. The optical storage utilizes the 7F0 → 5D0 transition for site-1 153Eu3+ ions in the Y2SiO5 crystal with the background of Earth’s magnetic field. The optical depth of this transition is 5.6, and the inhomogeneous linewidth of the crystal is (4.6 ± 0.1) GHz.

Witness of entangled states

The nonlocal CNOT gate can be used to generate entanglement with separable input states. The real part of the density matrix of the entangled state is measured by a witness54. The diagonal terms are given by measuring \({\sigma }_{z}^{ij}\), i.e., \(\langle ij\vert \rho \vert ij\rangle=\langle (\vert i\rangle \langle i\vert \otimes \vert j\rangle \langle j\vert )\rangle\), where ρ is the density matrix. The off-diagonal terms require a superposition of two subspaces to be measured, i.e., \(\Re e[\langle ii\vert \rho \vert jj\rangle ]=\frac{1}{4}(\langle {\sigma }_{x}^{ij}\otimes {\sigma }_{x}^{ij}\rangle -\langle {\sigma }_{y}^{ij}\otimes {\sigma }_{y}^{ij}\rangle )\) and \(\Re e[\langle ij\vert \rho \vert ji\rangle ]= \frac{1}{4}(\langle {\sigma }_{x}^{ij}\otimes {\sigma }_{x}^{ij}\rangle+\langle {\sigma }_{y}^{ij}\otimes {\sigma }_{y}^{ij}\rangle )\), where \({\sigma }_{x}^{ab}=\left\vert a\right\rangle \left\langle b\right\vert+\left\vert b\right\rangle \left\langle a\right\vert\) and \({\sigma }_{y}^{ab}=i\vert a\rangle \langle b\vert -i\vert b\rangle \langle a\vert\). In the experiment, four Bell states are obtained, and the real parts of some key elements of their density matrix are measured, as shown in Fig. 2b–e. The average fidelity of four Bell states four Bell states is (81.9 ± 2.5)%, slightly lower than that of the initial entangled states. The reduction in fidelity is mainly attributed to the low storage efficiency of the quantum memory. The transmission through external optical fibers and the feedforward operation of LOCC also cause a slight decrease in fidelity.