Main

Entanglement plays a crucial role in quantum information science. For multiqubit systems, many of the states considered, such as for entanglement purification, secret sharing, quantum error correction, as well as interferometric measurements, belong to the family of graph states9. Two prominent examples are GHZ and cluster states, which are central ingredients for various measurement-based quantum information protocols19,20,21. One-way quantum computing18, for instance, represents a conceptually appealing alternative to its circuit-based counterpart. Instead of carrying out unitary quantum logic gates, computation relies on adaptive single-qubit measurements. This operational easing comes at the price that a multiqubit entangled resource state, a cluster state, needs to be prepared in advance.

Although multiqubit entanglement has been demonstrated on various platforms3,22,23,24,25,26, only small-scale implementations of measurement-based quantum computing have been realized so far10,27,28. Among these platforms, optical photons stand out as qubit carriers, as these suffer negligible decoherence and benefit from crosstalk-free single-qubit addressability and measurement capabilities with off-the-shelf components. However, the most common sources for entangled photons are based on spontaneous parametric down-conversion (SPDC). This scheme is inherently probabilistic and thus makes scaling up to larger states an increasingly difficult challenge, even for a moderate number of qubits.

To address this issue, deterministic schemes have been proposed4,5,6. These use a single-spin memory qubit that mediates entanglement over a string of sequentially emitted photons. This approach is resource efficient as it permits the generation of in principle arbitrarily many entangled photons from a single device. First experiments along these lines have been performed with quantum dots11,12 demonstrating entanglement of up to three and four qubits, respectively, in a linear cluster state. Low photon generation and collection efficiencies, a noisy semiconductor environment or the need for a probabilistic entangling gate were among the biggest obstacles for reaching higher photon numbers. Recent experiments with Rydberg superatoms13,29 demonstrated GHZ states of up to six photons. Although the single-emitter strategy could in principle provide a stepping stone for photonic quantum computation, no implementation has demonstrated a performance that beats or even compares to the SPDC approach3.

Here we produce large and high-fidelity photonic graph states of the GHZ and cluster type. Inspired by the proposals of refs. 4,5,6, which we adapt to our physical system, we use a cavity quantum electrodynamics platform as an efficient photon source30,31,32,33,34 and, for the first time, surpass the state-of-the-art SPDC platform. Arbitrary single-qubit rotations between photon emissions allow for the flexible preparation of different types of states in a programmable fashion. We generate and detect GHZ states of up to 14 photons and linear cluster states of up to 12 photons with genuine multipartite entanglement. In principle, higher-dimensional cluster states can be created by coupling several sources17, for example, by means of optically mediated controlled NOT gates of the kind demonstrated recently16. By virtue of this feature, so far unique to the atomic cavity quantum electrodynamics platform, our technique supports modular extension towards scalable architectures for one-way quantum computation18,19, as depicted in Fig. 1a.

Fig. 1: Experimental setup and protocol.
figure 1

a, Proposed one-way quantum computing hardware architecture. Each source produces a one-dimensional photonic cluster state while at the same time entanglement is distributed across the emitters by ancillary photons being successively reflected off each atom–cavity system16. Thus a two-dimensional fabric of photonic cluster states is woven from the individual one-dimensional chains, readily serving as a resource for measurement-based quantum computing. b, Experimental setup. A single 87Rb atom coupled to a high-finesse cavity emits a stream of entangled photons. Various lasers directed onto the atom from the side allow to control the photon emission and manipulate the atomic state to realize the desired protocol. The chain of photons is detected by a polarization-resolving detection setup composed of a PBS and two detectors (Det1 and Det2). A fast polarization electro-optic modulator switches between two predefined settings such that each individual photon can be measured in either the Z or the X basis. A half-wave plate before the PBS rotates the detection basis from X to Y and arbitrary superpositions thereof. c, Protocol for cluster/GHZ state generation divided into three steps. Initialization of the atom and first photon emission, cycling process in which the atomic qubit is rotated by θ = 0 or π/2 and a new entangled photon is emitted, and closing of the protocol by emission of a last photon while disentangling the atom from the generated string of photons.

Experimental setup and protocol

Our apparatus is shown schematically in Fig. 1b. It consists of a single 87Rb atom at the centre of a high-finesse optical cavity. A magnetic bias field oriented parallel to the cavity direction defines the quantization axis and gives rise to a Zeeman splitting with Larmor frequency ωL = 2π × 100 kHz. Several laser beams propagating perpendicular to the cavity allow for various manipulations, such as state preparation by optical pumping and coherent driving of Raman transitions between the hyperfine ground-state manifolds with energy selectivity provided by the Zeeman splitting. The cavity serves as an efficient light–matter interface for atom–photon entanglement7 with an optical cooperativity of C ≈ 1.5 (Methods). A vacuum-stimulated Raman adiabatic passage (vSTIRAP) enables the generation of photons with high indistinguishability stemming from accurate control over their temporal wave function30. Photons that are outcoupled from the cavity are analysed with a polarization-resolving detection setup mainly consisting of a polarizing beam splitter (PBS) and a pair of superconducting nanowire single-photon detectors. Furthermore, an electro-optic modulator is used for fast selection of the measurement basis by switching between the Z basis (right and left circular polarization) and the X basis (horizontal and vertical polarization). When set to the X basis, a half-wave plate can optionally be placed to rotate the detection basis along the equator of the Bloch sphere.

The experimental protocol for generation of entangled photons in essence consists of a periodic sequence of photon generations interleaved with single-qubit rotations performed on the atom. The sequence is shown in Fig. 1c, including the corresponding processes in the atomic-level diagram. We first initialize the atom in the state \(\left|F=2,{m}_{F}=0\right\rangle \) by optical pumping. Here we write the atomic state as \(\left|F,{m}_{F}\right\rangle \), in which F denotes the total angular momentum and mF is its projection along the quantization axis. Then we apply a control pulse (1.5 μs), which induces the vSTIRAP process generating a photon (300 ns full width at half maximum) entangled in polarization with the atomic state. This process can be written as \(\left|2,0\right\rangle \to \left(\left|1,1\right\rangle \left|R\right\rangle -\left|1,-\,1\right\rangle \left|L\right\rangle \right)/\sqrt{2}\), in which \(\left|R/L\right\rangle \) denotes right/left circular polarization of the photon and \(\{\left|1,1\right\rangle ,\left|1,-\,1\right\rangle \}\) serves as our atomic qubit basis. We then perform a single qubit rotation Rθ of angle θ (step 1) on the atom. For cluster states θ = π/2, for GHZ states, no rotation is performed, that is, θ = 0. Afterwards we transfer the qubit from \(\left|1,\pm 1\right\rangle \) to \(\left|2,\pm 2\right\rangle \) (step 2). Both steps 1 and 2 are realized by means of a series of Raman pulses with a 790-nm laser (Methods). Finally, we induce the vSTIRAP process (step 3) by applying a control pulse, which produces a photon (step 4) and takes the atom back to the states \(\left|1,\pm \,1\right\rangle \). Steps 2–4 can be summarized by writing \(\left|1,\pm \,1\right\rangle \to \left|1,\pm \,1\right\rangle \left|R/L\right\rangle .\) One photon production cycle consisting of steps 1–4 takes 200 μs (50 μs) for the cluster (GHZ) state sequence. It is repeated N − 2 times, each iteration adding another qubit to a growing chain of entangled photons. For the final photon however (closing), the atomic qubit is transferred from \(\left|1,\pm 1\right\rangle \) to \(\left|2,\mp 1\right\rangle \) (instead of \(\left|2,\pm 2\right\rangle \)) such that, in the subsequent emission process, the atom ends up in \(\left|1,0\right\rangle \), which readily disentangles it from the photonic state. We note that in the case of cluster states, initializing as well as disentangling the atom are not strictly necessary, as the same can be achieved by appropriate Z basis measurements of the first and last photons6. In the case of GHZ states however, the protocol must be performed as described in Fig. 1c to obtain an N-photon state of the form \(\left|{{\rm{GHZ}}}_{N}\right\rangle =\left({\left|R\right\rangle }^{\otimes N}+{\left|L\right\rangle }^{\otimes N}\right)/\sqrt{2}\).

GHZ states

We start the experiment by producing GHZ states. In contrast to cluster states, GHZ states are more sensitive to noise and require a higher level of control in their preparation process. Regardless, because their density matrix contains only four non-zero entries, it is much easier to measure the fidelity \({{\mathcal{F}}}_{N}\) of an N-photon GHZ state35 than for a cluster state, despite the large Hilbert space of dimension 2N. Therefore, the quantitative analysis of a multiphoton GHZ state, besides representing an interesting result by itself, provides a useful tool for benchmarking and gives insights into the inner dynamics of our system.

For estimation of the fidelity, it is sufficient to measure the non-zero elements on the diagonal and off-diagonal of the density matrix separately. The diagonal elements represent the populations \({{\mathcal{P}}}_{N}\) of the \({\left|R\right\rangle }^{\otimes N}\) and \({\left|L\right\rangle }^{\otimes N}\) components of the state and can be obtained by measuring all photons in the Z basis. The corresponding experimental data, shown in Fig. 2b in blue, agree well with the ideal GHZ state, for which \({{\mathcal{P}}}_{N}=1\), with only a weak dependence on N. To demonstrate that the states \({\left|R\right\rangle }^{\otimes N}\) and \({\left|L\right\rangle }^{\otimes N}\) are in a coherent superposition, we set the measurement basis to \((\left|R\right\rangle \pm {{\rm{e}}}^{{\rm{i}}\varphi }\left|L\right\rangle )/\sqrt{2}\), in which \(\varphi \in \left[0,{\rm{\pi }}\right]\), thus spanning the full equator of the Bloch sphere. This allows us to measure the characteristic parity oscillations, which behave as cos() (Methods), see Fig. 2a. The coherences \({{\mathcal{C}}}_{N}\) of the density matrix are extracted from the visibility of the oscillations for all photon numbers up to N = 10. For 14 photons, the coincidence rate decreases notably owing to the finite photon production efficiency. To acquire enough data, we only measure the parity for ϕ = 0, which is indicated by the yellow diamond in Fig. 2b. Eventually, the fidelity is calculated using the formula \({{\mathcal{F}}}_{N}=({{\mathcal{P}}}_{N}+{{\mathcal{C}}}_{N})/2\) and is shown in Fig. 2b in red. As only a single measurement setting was used for \({{\mathcal{C}}}_{14}\), we also provide a lower bound for the fidelity on the basis of an entanglement witness (Methods). With this, we prove genuine 14-photon entanglement with a fidelity \({{\mathcal{F}}}_{14}\ge 76(6) \% \), surpassing the 50% threshold by more than 4 standard deviations. To the best of our knowledge, this is the largest entangled state of photons so far.

Fig. 2: GHZ states.
figure 2

a, Parity measured in the basis \((\left|R\right\rangle \pm {{\rm{e}}}^{{\rm{i}}\varphi }\left|L\right\rangle )/\sqrt{2}\) for photon numbers N = 2, 6 and 10 (see Extended Data Fig. 2 for the full dataset). The coherences \({{\mathcal{C}}}_{N}\) are derived from the visibility of the oscillations. b, Populations \({{\mathcal{P}}}_{N}\) (blue squares), coherences \({{\mathcal{C}}}_{N}\) (yellow circles) and extracted fidelities \({{\mathcal{F}}}_{N}\) (red triangles) with weighted linear fits as solid lines. The fidelity is calculated using the formula \({{\mathcal{F}}}_{N}=({{\mathcal{P}}}_{N}+{{\mathcal{C}}}_{N})/2\). For N = 14, the yellow diamond indicates that the coherence was derived from a single measurement setting with ϕ = 0. The dashed grey line marks the classical threshold of 0.5. Error bars represent 1 standard deviation.

Within the measured range, we observe that the decay of \({{\mathcal{P}}}_{N}\), \({{\mathcal{C}}}_{N}\) and \({{\mathcal{F}}}_{N}\) as a function of photon number is well captured by a linear model with a slope of 0.86(9)%, 1.3(2)% and 1.04(9)% per photon, respectively. By extrapolation of this trend, we estimate that the fidelity will cross the 50% threshold at around 44 qubits. The remarkably slow decay in fidelity is particularly astonishing as we observe very little decoherence even when the sequence is deliberately chosen to exceed the intrinsic coherence time of the atomic qubit (about 1 ms). This behaviour is explained by a dynamical decoupling effect built into the protocol, which arises from the opposite signs of the Zeeman splitting in the two hyperfine ground-state manifolds. Hence, the qubit precession is reversed every time the atom is transferred from \(\left|F=1\right\rangle \) to \(\left|F=2\right\rangle \) or vice versa, which can be seen as two spin-echo pulses for every photon production cycle. Although this mechanism contributes to the high-visibility fringes seen in Fig. 2a, no extra effort is needed to exploit it (Methods). At present, we attribute the main source of infidelity to the vSTIRAP. This can be explained by the finite cooperativity that allows for unwanted paths in the emission process (Methods).

Cluster states

The characterization of cluster states is more demanding, as the density matrix contains many non-zero elements. We therefore use the entanglement witness \({\mathcal{W}}\) proposed in ref. 36, which is based on the stabilizer formalism. A lower bound of the fidelity can be derived from \({\mathcal{W}}\), requiring only two local measurement settings XZXZ... and ZXZX... (Methods). Compared with quantum state tomography, this has the advantage of a tremendous reduction in experimental overhead but comes at the cost of a potentially substantial underestimation of the true state fidelity. Nonetheless, the experimental results shown in Fig. 3a exceed the 50% threshold for all measured points. Here, the data only includes events in which exactly N photons are detected for a sequence of N consecutive generation attempts. For the largest cluster state of 12 photons we find the fidelity to be lower bounded by 56(4)%. Comparing the results to the GHZ states in Fig. 2, we notice a much faster decay of the fidelity (3.6(2)% per photon). Besides the large number of Raman transfers in the protocol (five transfers per cycle, see Methods), we attribute this mainly to the lower bound, which—by construction—underestimates the fidelity. A tighter lower bound that was recently formulated37 could provide a more accurate estimate of the fidelity in future experiments.

Fig. 3: Cluster states.
figure 3

a, Lower bound of the fidelity as provided by ref. 36 obtained from two measurement settings. For the measured data, the lower bound exceeds the threshold of 50% indicated by the grey dashed line. b, Measured stabilizers Sk given by the expectation value 〈Zk−1XkZk+1〉 up to k = 15. All measured stabilizers are larger than 0.9, marked by the dashed line. Error bars represent 1 standard deviation.

In addition to providing a lower bound for the fidelity, we now present the measured stabilizer operators, defined as Sk = Zk−1XkZk+1 (Fig. 3b). Here k {1, 2, ..., N}, \({Z}_{0}={Z}_{N+1}={\mathbb{1}}\), and Xk and Zk denote the respective Pauli matrices acting on the kth qubit. In this scenario, events in which three consecutive photons, k − 1, k and k + 1, are detected in the appropriate basis contribute to the stabilizer Sk. In principle, arbitrarily many stabilizers could be measured by repeating the protocol for a corresponding number of cycles. Here, however, we terminate the sequence at k = 15. We find an average of 〈S1〉 = 96.13(9)% and 〈Sk〉 = 92(1)% for k ≥ 2, indicating a large overlap of the generated state with the target linear cluster state.

Coincidence rate

We emphasize that the ability of producing entanglement of up to 14 photons is based, on the one hand, on the excellent coherence properties of the atom and, on the other hand, on the large photon generation and detection efficiencies. The latter is crucial, as the success probability ps of detecting a coincidence of N consecutive photons scales exponentially with the photon number, ps = ηN. Here η denotes the probability to generate and detect a single photon for a given attempt. We can express η as the product of the source efficiency η0, that is, the probability of producing a photon at the output of the cavity, and the detection efficiency ηd. It is clear that a low efficiency η 1 poses a great obstacle to achieving large photonic states within reasonable measurement times.

Figure 4 shows the raw rate of multiphoton coincidences as a function of photon number N including post-selection and experimental duty cycle. The experimental sequence consists of 14 (12) consecutive photon generation attempts with all timing parameters identical to the GHZ (cluster) protocol and a new run starting every 1.1 ms (3.0 ms). The data shown (blue for GHZ and red for cluster states) are the coincidence count rates of events in which N consecutive photons were detected starting from the first attempt. For instance, for the largest state of 14 photons, we recorded 151 coincidences in 7 h of experimental runtime, equivalent to roughly one event every 3 min. From an exponential fit to the data, we extract the overall single-photon generation and detection efficiency η = 43.18(7)%. We estimate the intrinsic generation efficiency η0 to be 66%, mainly limited by the cooperativity and the escape efficiency (see ref. 30). Both can be optimized by higher-quality mirrors and a smaller cavity-mode volume. The detection efficiency of ηd = 0.7 captures all the remaining loss contributions, such as optical elements and detectors. These include free-space-to-fibre couplings (94% twice), propagation through optical fibre (97%), free-space optics (90%) and detector efficiency (90%). Correcting for the detection efficiency ηd, we infer an N-photon coincidence rate at the output of the cavity, as given by the light blue line in Fig. 4. This represents the limit of our system with the current parameters. As a comparison, we also show the rate of the best available SPDC system, as well as deterministic sources using single quantum dots or Rydberg-blockaded atomic ensembles. Although the repetition rate for these systems is typically many orders of magnitude higher than in our protocol, our system far outperforms previous implementations in terms of real-time coincidence count rate as well as efficiency scaling.

Fig. 4: Measured N-photon coincidence rate.
figure 4

The data (blue for GHZ and red for cluster states) represent the number of coincidences divided by the total measurement time. From an exponential fit to the data, we extract a single-photon generation and detection probability of η = 43.18(7)%. The light coloured lines represent the estimated coincidence rate assuming a loss-corrected efficiency of η = 0.66 (see also ref. 30). As a comparison to our atomic cavity quantum electrodynamics (CQED) experiment, we plot equivalent rates for state-of-the-art SPDC3, quantum dot (QD) in purple11 and orange12, and Rydberg-based13 (Ryd) systems. Error bars are smaller than the markers.

Summary and outlook

To conclude, we have presented a scalable and freely programmable source of entangled photons, demonstrating—to our knowledge—the largest entangled states of optical photons to this day. It is deterministic in the sense that no probabilistic entangling gates are required. This gives us a clear scaling advantage over previous schemes. Moreover, the ability to perform arbitrary single-qubit rotations on the emitter provides the flexibility to grow graph states of different types.

At this stage, our system faces mostly technical limitations, such as optical losses, finite cooperativity and imperfect Raman pulses. Even modest improvements in these respects would put us within reach of loss and fault tolerance thresholds for quantum error correction19,38,39,40. Hence, a clear path towards one-way quantum computing architectures would be the generation of two-dimensional cluster states by entangling several photon sources17. For example, in a next step, two of our systems could be coupled through remote quantum logic gates16 to produce 2 × N ‘ladder’ cluster states. Alternatively, entangling operations such as gates or Bell-state measurements could be performed on two (or more) individual atoms as single emitters in the same cavity14,15. Similar strategies apply for the generation of tree graph states and one-way quantum repeaters20,21. The present work thus opens up a new road for photonic quantum computation and communication.

Methods

Experimental setup

The central component of the setup used in this work is a high-finesse optical cavity with a 87Rb atom trapped at its centre. The cavity consists of two highly reflective mirrors oriented parallel to each other at a distance of 500 μm with an optical mode waist of w0 = 30 μm. The two mirrors have a transmitivity of T1 = 100 ppm and T2 = 4 ppm, giving rise to a finesse of F ≈ 60,000, such that photons populating the cavity mode are outcoupled predominantly through the low-reflective side. The cavity is tuned to the atomic D2 line with a detuning of Δc = −150 MHz with respect to the transition \(\left|F=1\right\rangle \leftrightarrow \left|{F}^{{\prime} }=1\right\rangle \). The combined system of the atom and cavity is best described in the framework of cavity quantum electrodynamics with parameters (g, κ, γ) = 2π × (cge × 10.8, 2.7, 3.0) MHz, g being the atom–cavity coupling strength for the relevant transition, κ the decay rate of the cavity field and γ the free-space atomic decay rate associated with the D2 transition of 87Rb. cge is the Clebsch–Gordan coefficient between the relevant excited state (\(\left|e\right\rangle \)) coupling to the vSTIRAP control pulse and the final state (\(\left|g\right\rangle \)) of the photon production process. The above parameters put our system in the intermediate to strong coupling regime with a cooperativity parameter defined as C = g2/(2κγ). Note that the specific value of C depends on the transition path associated to a certain excited state. For example, for the emission from \(\left|2,\pm 2\right\rangle \) as in the cycling step of the protocol, we have \(\left|g\right\rangle =\left|F=1,{m}_{F}=\pm 1\right\rangle \) and \(\left|e\right\rangle =\left|{F}^{{\prime} }=2,{m}_{F}^{{\prime} }=\pm 2\right\rangle \). Hence, we get \({c}_{{\rm{ge}}}=\sqrt{1/4}\), giving C = 1.8.

Atom loading

Atoms are transferred from a magneto-optical trap to the centre of the cavity, in which they are trapped by a two-dimensional optical lattice composed of two standing-wave potentials, one at 772 nm oriented along the cavity axis and one at 1,064 nm propagating perpendicular to the cavity axis. An electron-multiplying charge coupled device camera detects the atomic fluorescence, which is collected by means of a high-numerical-aperture objective. A single atom is prepared quasi-deterministically by removing any excess atom with a resonant laser beam steered onto the atom by means of an acousto-optic deflector. The position of the atom is monitored during the experiment and controlled through appropriate feedback to the optical trapping potential.

Experimental duty cycle and post-selection

Because the atoms have a finite lifetime in the dipole trap, they have to be reloaded regularly. The average trapping time depends markedly on the type of conducted experiment (that is, heating/cooling mechanisms). For our experiments, we achieved an average trapping time of roughly 20 s. The time required for loading and repositioning of the atom after occasional jumps to a different location reduces the experimental duty cycle. By counting the number of experimental runs carried out at a given repetition rate over a longer measurement interval, we evaluate the overall duty cycle to be close to 50%.

Once a camera image shows that the atom has moved away from the target position, the corresponding data to that image are discarded through post-selection processing. The same applies to images with more than one atom near the cavity centre.

Further post-selection is performed by processing the data collected by the single-photon detectors: an experimental run is considered successful when N photons were detected in a row, each within predefined time windows (1 μs width in this work). Note that Fig. 4 shows the coincidence rate after applying post-selection.

Protocol

The full experimental sequence including timings of the optical pulses is shown in Extended Data Fig. 1. As described in the main text, it mainly consists of a repeating sequence of single-qubit rotations and photon emissions (cycling), with further initialization and closing steps at the beginning and the end. The atom is initialized in the state \(\left|2,0\right\rangle \) by optical pumping (5 μs). A square-shaped control pulse (1.5 μs) produces the first photon, thus generating the atom–photon entangled state \(\left|1,1\right\rangle \left|{R}_{1}\right\rangle -\left|1,-\,1\right\rangle \left|{L}_{1}\right\rangle \) (up to normalization), in which the index ‘1’ refers to the first photon. If no photon was detected, we immediately go back to the state preparation step and another photon attempt. We choose a maximum of seven attempts for the first photon to avoid excessive heating of the atom. After a successful first photon detection, we start the cycling stage with the single-qubit gate, which—for cluster states—consists of a π/2 rotation contained in three Raman manipulations. First, the population in \(\left|1,1\right\rangle \) is transferred to \(\left|2,0\right\rangle \) with a π pulse, taking 53 μs. Then a π/2 pulse is applied to the transition \(\left|1,-\,1\right\rangle \leftrightarrow \left|2,0\right\rangle \), realizing the qubit rotation. Afterwards, the population in \(\left|2,0\right\rangle \) is transferred back to \(\left|1,1\right\rangle \) with another π pulse. The operation described transforms the basis states as follows: \(\left|1,1\right\rangle \to \left|1,1\right\rangle +\left|1,-\,1\right\rangle \) and \(\left|1,-\,1\right\rangle \to -\left|1,1\right\rangle +\left|1,-\,1\right\rangle \). The whole pulse sequence for the single-qubit gate takes 132.5 μs. For GHZ states, the required rotation angle is θ = 0, which means that the qubit rotation can be skipped entirely. To produce the next photon, we transfer the population from \(\left|1,\pm \,1\right\rangle \) to \(\left|2,\pm \,2\right\rangle \) by means of two sequential Raman π pulses (790 nm), each taking 21 μs. We then apply a vSTIRAP control pulse, leading to a photon emission. The atom–photon–photon state then reads \(\left(\left|1,1\right\rangle \left|{R}_{2}\right\rangle +\left|1,-\,1\right\rangle \left|{L}_{2}\right\rangle \right)\left|{R}_{1}\right\rangle -\left(-\left|1,+\,1\right\rangle \left|{R}_{2}\right\rangle +\left|1,-\,1\right\rangle \left|{L}_{2}\right\rangle \right)\left|{L}_{1}\right\rangle \) for cluster states, that is, θ = π/2. The index ‘2’ now refers to the second photon. The cycling step is repeated as many times as desired. In the very last cycle, the closing step is performed. Here, following the qubit rotation, the atomic population is transferred from \(\left|1,\pm \,1\right\rangle \) to \(\left|2,\mp \,1\right\rangle \) instead of \(\left|2,\pm \,2\right\rangle \), which takes 55 μs. Thus the atom is disentangled in the subsequent photon emission. This step can be seen as an atom-to-photon state transfer, as the atomic qubit is mapped to the polarization state. After the last photon, we run a calibration sequence for actively stabilizing the optical power of the laser pulses. Finally, the atom is laser-cooled for several hundred microseconds. The length of a full period of the experiment including calibration and cooling depends on the type of state produced and the number of photons N. It can be as short as 400 μs and as long as 3 ms.

Raman manipulations

The Raman transitions shown as orange and green arrows in Extended Data Fig. 1 are performed with a 790-nm laser. The duration of these transitions make up the most part of the experimental sequence. In principle, choosing a higher Rabi frequency could drastically increase the repetition rate of the protocol but would lead to more crosstalk between the transitions, as they would start to overlap in frequency space. As a consequence, a compromise between repetition rate and high-fidelity Raman manipulations has to be found. For our choice of experimental parameters, we estimate the infidelity per single-qubit rotation to be smaller than 1%.

The Raman transfer in the closing step from \(\left|F=1\right\rangle \) to \(\left|F=2\right\rangle \) is realized with a 795-nm Raman laser close to the D1 line of rubidium. For this specific Raman transition, we cannot choose a large detuning because this would lead to a destructive interference owing to the Clebsch–Gordan coefficients. As a consequence, we have a chance of about 5% of spontaneous scattering, which reduces the fidelity. As mentioned in the main text, alternatively, the atom can also be disentangled from the photonic state by measuring the most recently generated photon in the Z basis. Although this would slightly increase the fidelity, the rate would decrease, as the detection of an extra photon is required.

Estimation of errors

For GHZ states, we observe a total error rate of about 1% per photon. We attribute most of the infidelity to spontaneous scattering during the photon production process, as the vSTIRAP control pulse couples to the F′ = 3 excited state of the D2 line. This opens a decay channel, which competes with the coherent emission of the photon. By post-selecting on early photon arrival, one can partly filter out events in which scattering has occurred (Extended Data Fig. 4). In the future, this could be eliminated by generating the photons on the D1 line, in which no F′ = 3 state is present. This should greatly improve the error rate.

The same error mechanism applies in the case of cluster states. Furthermore, the single-qubit gate implemented with Raman lasers introduces errors, which we estimate to be smaller than 1%. These could be explained by finite frequency resolution, pulse intensity fluctuations, as well as drifts in optical alignment. For instance, increasing the Zeeman splitting would be a way to further optimize this process.

Minor sources of error include polarization alignment. For setting the polarization detection basis, we use a reference polarizer in front of the cavity and measure the polarization extinction to be on the order of 10,000:1. For switching the detection basis, we use a polarization electro-optic modulator (QUBIG PC3R-NIR) with a switching time of 5 ns. The extinction ratio is specified as >1,000:1, whereas we measured values of around 5,000:1.

The error rate for cluster states of 3.6% as given in the main text is presumably overestimated owing to the definition of the fidelity lower bound. Taking into account the error sources identified above, we estimate the true error rate to be smaller than 2%. With the suggested improvements, we expect a reduction well below 1% to be realistic.

Generation efficiency

The intrinsic source efficiency, that is, the probability of obtaining a photon at the output of the cavity, is given by

$${\eta }_{0}=\frac{2C}{2C+1}\times {\eta }_{{\rm{esc}}},$$
(1)

in which C ≈ 1.5 is the cooperativity and ηesc ≈ 0.88 denotes the escape efficiency, that is, the probability of a photon being outcoupled from the output port30. Note that the above formula is only valid in the case of a single excited state, whereas the efficiency becomes a function of the detuning, η0 (Δ), when several excited states are present.

The source efficiency could hence be improved by increasing both the cooperativity and the escape efficiency. As the two parameters are generally not independent, let us assume for simplicity that we reduce the waist of the cavity mode by a factor of 2. This increases the cooperativity by a factor of 4 without altering the escape efficiency. We would thereby improve the source efficiency from 66% to 81%.

Furthermore, the efficiency of the detection setup could be improved. For instance, by redesigning and optimization of the setup, one could replace a fibre-to-fibre coupling with a fibre splice, eliminate a free-space-to-fibre coupling and reduce the losses from optical surfaces. In this scenario, an improvement of the detection efficiency ηd from 0.7 to 0.85 seems feasible. Given these realistic improvements, the combined source-to-detection efficiency η would reach the mark of 2/3, an important threshold for linear optical quantum computation40.

GHZ state fidelity

In the mathematical formalism of spin 1/2 particles, a GHZ state looks like

$$\left|{{\rm{GHZ}}}_{N}\right\rangle =\frac{1}{\sqrt{2}}\left(\left|\uparrow \uparrow \uparrow ...\right\rangle +\left|\downarrow \downarrow \downarrow ...\right\rangle \right),$$
(2)

in which in the photonic case \(\left|\uparrow \right\rangle /\left|\downarrow \right\rangle \) corresponds to \(\left|R\right\rangle /\left|L\right\rangle \). For measuring the diagonal elements of the density matrix, that is, the populations \({{\mathcal{P}}}_{N}\) of the \({\left|\uparrow \right\rangle }^{\otimes N}\) and \({\left|\downarrow \right\rangle }^{\otimes N}\) components, it suffices to measure all particles in the Z basis to obtain

$${{\mathcal{P}}}_{N}=\langle {\left(\left|\uparrow \right\rangle \left\langle \uparrow \right|\right)}^{\otimes N}+{\left(\left|\downarrow \right\rangle \left\langle \downarrow \right|\right)}^{\otimes N}\rangle .$$
(3)

For the coherences, we introduce the parity operator3,35

$${{\mathcal{M}}}_{\varphi }={\left(\begin{array}{ll}0 & {{\rm{e}}}^{-{\rm{i}}\varphi }\\ {{\rm{e}}}^{{\rm{i}}\varphi } & 0\end{array}\right)}^{\otimes N}$$
(4)

describing a measurement of all N particles in the basis \(\left(\left|\uparrow \right\rangle \pm {{\rm{e}}}^{{\rm{i}}\varphi }\left|\downarrow \right\rangle \right)/\sqrt{2}\). Varying the parameter ϕ from 0 to π corresponds to a continuous rotation of the measurement basis along the equator of the Bloch sphere. In the experiment, this is achieved by scanning the angle of a half-wave plate in front of the PBS in the detection setup. It is straightforward to show that the expectation value of \({{\mathcal{M}}}_{\varphi }\) for the ideal GHZ state is

$$\left\langle {{\rm{GHZ}}}_{N}\right|{{\mathcal{M}}}_{\varphi }\left|{{\rm{GHZ}}}_{N}\right\rangle =\cos (N\varphi ).$$
(5)

These characteristic parity oscillations are what can be seen in Fig. 2a. The amplitudes of the oscillations as obtained from a cosine fit are a measure for the coherences of the density matrix. The fidelity is then obtained from the formula

$${{\mathcal{F}}}_{N}^{{\rm{(GHZ)}}}=\left({{\mathcal{P}}}_{N}+{{\mathcal{C}}}_{N}\right)/2$$
(6)

For the largest photon number of N = 14, we chose to measure an entanglement witness derived in ref. 36 to obtain a fidelity lower bound. The witness is based on the stabilizer formalism, the stabilizing operators for GHZ states being

$${S}_{1}^{({\rm{GHZ}})}={X}_{1}\cdot {X}_{2}\cdot \cdot \cdot {X}_{N}$$
(7)
$${S}_{k\ge 2}^{({\rm{GHZ}})}={Z}_{k-1}\cdot {Z}_{k},$$
(8)

in which k = 1, 2, ..., N and Zk and Xk are the Pauli matrices acting on the kth qubit. With this, the fidelity is lower bounded by

$${{\mathcal{F}}}_{N}^{({\rm{GHZ}})}\ge \frac{1+{S}_{1}^{({\rm{GHZ}})}}{2}+\prod _{k\ge 2}\frac{1+{S}_{k}^{({\rm{GHZ}})}}{2}-1.$$
(9)

Witnessing cluster states entanglement

A lower bound for the fidelity can be derived in a similar fashion for one-dimensional cluster states36. With the set of stabilizers Sk as defined in the main text, the bound is given by the inequality

$${{\mathcal{F}}}_{N}^{({\rm{C}})}\ge \prod _{k\,{\rm{even}}}\frac{1+{S}_{k}}{2}+\prod _{k\,{\rm{odd}}}\frac{1+{S}_{k}}{2}-1$$
(10)

It is easy to verify by direct calculation that the terms for even and odd k in equation (10) correspond to the local measurement settings ZXZX... and XZXZ..., respectively. As an example, for a four-qubit linear cluster state, we have

$$\begin{array}{ll}{{\mathcal{F}}}_{4}^{({\rm{C}})} & \ge \,\frac{1}{4}\left(1+{Z}_{1}{X}_{2}{Z}_{3}\right)\left(1+{Z}_{3}{X}_{4}\right)\\ & +\,\frac{1}{4}\left(1+{X}_{1}{Z}_{2}\right)\left(1+{Z}_{2}{X}_{3}{Z}_{4}\right)\\ & -1.\end{array}$$
(11)

Coherence and dynamical decoupling

In the main text, we already highlighted that our system benefits from a built-in dynamical decoupling mechanism owing to the level structure of the atomic hyperfine ground states. A measurement of the intrinsic coherence time of the atom can be seen in Extended Data Fig. 3a. Here we look at the overlap between two photons both emitted from the atom with a variable time delay. The first photon is measured in the linear basis (\(\left|H\right\rangle /\left|V\right\rangle \)), which projects the atom onto a superposition of the qubit states \(\left|1,+1\right\rangle \) and \(\left|1,-1\right\rangle \). The atomic state then precesses with twice the Larmor frequency. After a certain time t, the atomic qubit is read out by mapping it onto a photon, which is then measured in the same basis as the first photon. The fidelity, which we define as the projection of the second photon on the first, shows oscillations damped by noise, such as magnetic field fluctuations. After roughly 1.2 ms, the envelope of the oscillations crosses the classical threshold of 0.66, which defines the intrinsic coherence time of the atomic qubit. For the GHZ sequence however, we observe that the effect of decoherence is intrinsically reduced. We can show this by artificially extending the length of the sequence to 1.25 ms for a six-photon GHZ state. In this case, every photon production cycle takes 300 μs. The ratio of time that the qubit resides in \(\left|F=1\right\rangle \) and \(\left|F=2\right\rangle \) can then be varied by scanning the delay τ between the hyperfine transfer from \(\left|1,\pm \,1\right\rangle \) to \(\left|2,\pm \,2\right\rangle \) and the vSTIRAP control pulse, as illustrated in Extended Data Fig. 3b. For different values of τ, we record the parity oscillations similar to Fig. 2a and infer the visibility. From the measured data, we can see a clear dependence of the visibility as a function of τ, with a rephasing appearing at around 85 μs. The maximum value is roughly equal to the six-photon coherence shown in Fig. 2 (shown as a dashed line for reference), for which the sequence length was only 250 μs. This is strong evidence that a large part of the decoherence is mitigated as an inherent feature of the protocol.