## Introduction

Quantum networks have the potential to enable a wealth of applications that go beyond classical technologies, including secure communication, quantum sensor networks, and distributed quantum computation1,2,3,4. Such a network might consist of nodes with stationary ‘communication’ qubits that are connected together by entanglement through photonic channels (Fig. 1a). Each node ideally contains multiple additional ‘data’ qubits that can be used to store and process quantum states. Universal operations over the network can then be performed by repeatedly distributing entangled states and subsequently consuming them2,3.

Large-scale networks and universal quantum computation become possible if imperfections can be overcome through entanglement distillation and quantum error correction3,4. Besides high-fidelity operations, this requires the faithful storage of quantum states while new entangled states are repeatedly distributed over the network2,3,4,5. This capability is captured by the (active) ‘link efficiency’, $${\eta }_{{{{\rm{link}}}}}^{* }\,=\,{r}_{{{{\rm{ent}}}}}/{r}_{{{{\rm{dec}}}}}$$, given by the ratio of the inter-node entanglement generation rate rent and the decoherence rate rdec of the data qubits during network operation (see Supplementary Note 1 for further discussion). Without error correction, $${\eta }_{{{{\rm{link}}}}}^{* }$$ sets the available number of cycles of entanglement distribution, and thereby the depth of protocols and computations that can be performed effectively. While quantum error correction can ultimately increase achievable circuit depths, this will require $${\eta }_{{{{\rm{link}}}}}^{* }\,\gg\,$$ 12,3,4,6.

Various systems have demonstrated basic building blocks for optical quantum networks7,8,9,10,11,12,13,14,15,16,17. The nitrogen-vacancy (NV) centre in diamond is a promising platform because it combines a spin–photon interface for heralded remote entanglement18,19,20, with access to multiple 13C nuclear-spin data qubits that can store quantum states for long times21,22,23,24,25,26,27. Entanglement generation rates rent larger than the idle qubit decoherence rate have been shown, enabling a single cycle of entanglement delivery deterministically on a clock cycle7. As a first step towards exploiting additional computational power in the nodes, experiments with up to two qubits per node demonstrated two-cycle network protocols such as entanglement distillation28 and entanglement swapping in a three-node network29,30. However, in all these experiments $${\eta }_{{{{\rm{link}}}}}^{* } \,<\,$$ 1. The resulting network operation is inherently probabilistic—if entanglement generation cycles do not succeed early enough, all previously established quantum states stored in the network memory are lost—hindering the scaling to larger systems operating over many cycles. Realising large $${\eta }_{{{{\rm{link}}}}}^{* }$$ will require higher entanglement rates rent through efficient spin-photon interfaces31,32,33,34 and/or reduced dephasing of the nuclear spin qubits during the network operation (rdec)22,35.

In this work, we focus on the latter challenge. We demonstrate that 13C spin qubits in isotopically engineered diamond with a reduced 13C concentration provide robust data qubits for quantum networks. We develop control and single-shot readout of an individual 13C spin that is weakly coupled to a single NV centre. We then show that an arbitrary quantum state can be stored in this data qubit for over 105 repetitions of a remote-entanglement sequence. For current entanglement link success rates, this would imply $${\eta }_{{{{\rm{link}}}}}^{* }\,\approx\, 10$$. We show through numerical network simulations that such a high $${\eta }_{{{{\rm{link}}}}}^{* }$$ value can enable a next generation of network protocols, including deterministic remote two-qubit gates and the distillation of entangled states over a four-node network, which provides a primitive for surface-code quantum error correction (Fig. 1a)3,4,6. Finally, we identify ionisation of the NV centre to the neutral charge state as a limiting mechanism and show that the data qubit can be protected through fast controlled resetting of the NV charge state. When combined with recent progress with optical cavities towards enhanced entanglement rates32,34 and high-fidelity quantum gates23,27,36, these results indicate that nuclear spins in isotopically engineered samples provide a promising test-bed for quantum networks.

## Results

### System overview

We consider quantum-network nodes consisting of a single NV centre coupled to multiple 13C nuclear spins (Fig. 1a). The optically active NV electron spin acts as a communication qubit and the 13C nuclear spins are additional data qubits that also function as quantum memory to store states while new entanglement links between NV centres are established. A key feature of this system is that the 13C-spin dynamics depend on the NV electron-spin state (Fig. 1b). This is captured by the Hamiltonian for a single 13C spin:

$$H\,=\,{\omega }_{L}{I}_{z}\,+\,{A}_{\parallel }{m}_{s}{I}_{z}\,+\,{A}_{\perp }{m}_{s}{I}_{x}.$$
(1)

Here, we have made the secular approximation. ωL = γCBz is the nuclear-spin Larmor frequency, where γC is the 13C gyromagnetic ratio and Bz is the external magnetic field along the NV axis (here Bz = 47 G). Iα are the nuclear spin-1/2 operators, while ms is the spin-z projection of the electron spin. In the NV charge state that is used for network operation, ms {−1, 0, 1}, from which we define a qubit in the {−1, 0} basis ($$:= \{\left|1\right\rangle ,\left|0\right\rangle \}$$). Additionally, however, stochastic ionisation events can convert NV to the NV0 state with ms {−1/2, 1/2}. Note that fast orbital relaxation in the NV0 ground state rapidly dephases the spin state, making it unsuitable as a qubit37.

As seen from Eq. 1, the 13C spin undergoes different precession dependent on the NV charge- and spin-state. This conditional precession enables complete control over the 13C spins by controlled inversions of the NV electron spin23. Uncontrolled electron-spin dynamics, however, induce additional dephasing of the 13C spin, which sets a limit on the achievable link efficiency $${\eta }_{{{{\rm{link}}}}}^{* }$$22,35,38,39. Our approach to creating robust memory is to reduce the coupling between the NV electron spin and the 13C data qubits by reducing the 13C concentration21,40,41. While this approach results in slower gate speeds, these are not the rate-limiting step in current network experiments29. Note that, in the case of 13C-spin-bath-limited decoherence, the coherence times increase proportionally with the reduction in coupling strength, such that no intrinsic reduction in gate fidelity is expected40,42.

Our experiments are performed on a single NV centre in a type-IIa isotopically-purified diamond (targeted 13C concentration of 0.01%) at a temperature of 4 K. The hardware setup and NV centre properties are described in the Methods section.

Dynamical decoupling (DD) spectroscopy with the NV centre43 reveals coupling to an isolated 13C spin, along with the wider spin bath (Fig. 1c). We characterise the electron-nuclear hyperfine components parallel (perpendicular) to the NV axis to be A = 2π 80(1) Hz (A = 2π 271(4) Hz)43,44. In comparison to previous studies in natural 13C abundance samples22,35, the electron-nuclear coupling strength is reduced by approximately two orders of magnitude, as expected from the isotopic concentration.

We realise universal control over the electron-13C two-qubit system by microwave (MW) and radio-frequency (RF) single-qubit gates, and a DD-based electron-nuclear two-qubit gate23,45. Furthermore, we develop repetitive readout of the nuclear spin to improve the single-shot readout fidelity (see Supplementary Note 2)21,46,47,48,49,50, giving a maximum state preparation and measurement (SPAM) fidelity of 91(1)%. For the measurements reported here we focus on the system dynamics rather than maximising the fidelities, and thus use a faster initialisation procedure to optimise the signal-to-noise ratio, with lower SPAM fidelity of 79.4(9)%. The fidelities are predominantly limited by electron-spin decoherence during two-qubit gates, likely arising from the high concentration of P1 centre impurities in this specific device (~75 ppb51). Multi-qubit registers with comparable two-qubit gate fidelities to those achieved in natural-abundance 13C devices (~99%23) are expected to be feasible with reduced impurity concentration in future diamond growth.

### Memory robustness while idling

We first investigate the intrinsic decoherence processes of the 13C nuclear spin, i.e. when the electron spin is idle. The electron spin-state affects spin-bath dynamics, as flip–flop interactions between nuclear spins are suppressed when the hyperfine interaction is present (the ‘frozen core’ effect)23,52,53. Therefore, we separately characterise the decoherence timescales for the NV electron in the $$\left|1\right\rangle$$ or $$\left|0\right\rangle$$ states.

Figure 1d summarises the measured timescales. The observation of vastly longer $${T}_{1,e \,=\, \left|1\right\rangle }$$ (5 s) than $${T}_{1,e \,=\, \left|0\right\rangle }$$ (=2.8(2) s) indicates that the spin relaxes primarily through flip–flop interactions with other 13C spins. The measured $${T}_{1,e \,=\, \left|0\right\rangle }$$ is ~30–100 times longer than typical values for natural-abundance samples, consistent with the expectation of a linear dependence on isotopic concentration40,42.

The measured dephasing times are $${T}_{2,e \,=\, \left|1\right\rangle }^{* }$$ = 0.38(1) s and $${T}_{2,e \,=\, \left|0\right\rangle }^{* }$$ = 0.42(2) s. We first isolate the timescale associated with couplings to the nuclear-spin bath by performing a spin-echo experiment on all 13C spins, decoupling the 13C bath from other processes but leaving their mutual interactions unperturbed. We find a characteristic timescale, $${T}_{2{,}^{13}{{{\rm{C-bath}}}}}^{* }$$ = 0.66(3) s (see Supplementary Note 3). The contribution from P1 impurities can similarly be estimated using the NV electron dephasing time during double electron-electron resonance measurements with the P1 impurities, $${T}_{2,{{{\rm{P1-bath}}}}}^{* ,e}$$ = 230 μs51. From the respective gyromagnetic ratios, γC, γe, we infer $${T}_{2,{{{\rm{P1-bath}}}}}^{* }$$ = 0.61 s. Combining these processes gives an estimate for $${T}_{2}^{* } \,\sim\,$$ 0.45 s, close to the measured values.

We finally consider the application of spin echoes which mitigate quasi-static noise. The single-echo $${T}_{2,e \,=\, \left|0\right\rangle }^{N \,=\, 1}$$ (=1.11(8) s) and eight-echo $${T}_{2,e \,=\, \left|0\right\rangle }^{N \,=\, 8}$$ (=1.62(9) s) are likely limited by the ms = 0 nuclear T1. The observation of some underlying structure in these measurements is likely due to the dynamics of other proximal 13C spins20. In contrast, for the electron $$\left|1\right\rangle$$ state, the nuclear-spin frozen core has previously been shown to significantly enhance 13C spin-echo times23. While $${T}_{2,e \,=\, \left|1\right\rangle }^{N \,=\, 1}$$ (=1.82(6) s) and $${T}_{2,e \,=\, \left|1\right\rangle }^{N \,=\, 8}$$ (=2.91(8) s) do exceed $${T}_{2,e \,=\, \left|0\right\rangle }^{N \,=\, 1,8}$$ respectively, they are shorter than would be predicted from the 13C concentration alone (~1 min). We ascribe this to the presence of the P1 bath, which exhibits faster dynamics which are not well mitigated by echo pulses. This decoherence might be further mitigated by strong driving of the P1 bath51,54 or by using higher purity diamonds.

### Memory robustness during the remote-entanglement sequence

Armed with a characterisation of the intrinsic decoherence processes, we now turn to the remote-entanglement sequence shown in Fig. 2a, b. This entangling primitive is compatible with single-photon schemes used in recent NV network experiments7,29,55. In this work, we implement the protocol on a single network node to investigate its effect on the 13C data qubit.

As discussed in the previous sections, imperfect knowledge of the electron-spin state leads to spurious phases acquired by the nuclear spin. Within each entangling attempt, there are a number of processes which can lead to such dephasing: the stochastic nature of the electronic spin-reset time, infidelities in the initialised electron-spin state, excited state spin-flips after the optical π-pulse, and MW pulse errors. Reducing the electron-nuclear coupling strength enhances the robustness to such events.

We implement the entangling protocol experimentally. For simplicity, we omit the optical π-pulses, but note that the small associated electron spin-flip probability is expected to play a negligible effect on the 13C decoherence22,35. As a trade-off between the optical reset rate and stochastic ionisation to NV056,57, spin reset is performed using 30 nW of optical power for 5 μs, resulting in an initialisation fidelity ≥98% (Supplementary Note 4). For the MW pulse used to create the electron superposition state, we implement a weak multi-tone driving pulse (ΩRabi ~ 93 KHz), see Supplementary Note 5. This comes at the expense of a time overhead, but mitigates heating. We set the MW rotation angle to π/2, for which dephasing due to the entangling primitive is expected to be maximal for the given sequence (Supplementary Note 7). Finally, we focus on networks for distributed quantum computation, rather than long-distance communication, and assume that the distance between network nodes is small (<100 m). Thus, any decision logic can be completed within 1 μs. With these choices, the total duration of each primitive is 9 μs.

We prepare the nuclear spin in each of the six cardinal states (Ψi {$$\left|{{{\rm{x}}}}\right\rangle$$,$$\left|{{{\rm{-x}}}}\right\rangle$$,$$\left|{{{\rm{y}}}}\right\rangle$$,$$\left|{{{\rm{-y}}}}\right\rangle$$,$$\left|\uparrow \right\rangle$$,$$\left|\downarrow \right\rangle$$}), apply N repetitions of the primitive, and measure the expectation value in the associated eigenbasis, $$\langle {\hat{\sigma }}_{j}\rangle$$ = Tr($$\rho \,{\hat{\sigma }}_{j}$$), where $${\hat{\sigma }}_{j}$$ are nuclear-spin Pauli operators, j  {x, y, z} (Fig. 2c). We interleave one cycle of XY8 decoupling pulses on the nuclear spin to mitigate dephasing. Without any post-selection of the data we find that the data qubit can preserve an arbitrary quantum state for N1/e = 1.33(4)  105 entangling primitives (1.20(4) s of continuous entanglement attempts).

We now consider the effects of ionisation and spectral diffusion on the data. After each experimental run, we perform two-laser probe measurements (E′, Ey transitions), denoted charge-resonance (CR) checks (see Supplementary Note 8)19. The number of photons detected in this check is used to verify that the NV remained in NV and on resonance throughout the experiment. By varying the post-selection threshold for the CR check, we can reject measurements in which the NV ionised or underwent spectral diffusion with increasing confidence. We find a further improvement in the data qubit lifetime when omitting these cases, showing that they are currently a significant limitation (Fig. 2c). After accounting for ionisation and spectral diffusion, we fit a decay time N1/e = 2.07(8)  105. Considering spin superposition- and eigen-states separately, we find N1/e,xy = 1.90(8)  105 [1.71(7) s] and N1/e,z = 2.6(2)  105 attempts [2.4(2) s].

In Supplementary Note 6, we additionally present results for the decay of a superposition state when using strong microwave pulses (ΩRabi ~ 27 MHz), so that the sequence is shorter (primitive duration 6.3 μs). We find a further improved corrected decay constant of N1/e,x = 4(1)  105 attempts [2.6(6) s]. However, in this case, we cannot rule out that heating due to the strong pulses changes the spin-reset dynamics, although the observation of similar ionisation statistics suggests that this is not the case. Such heating can be addressed by improved device engineering in future work.

For both primitive durations (6.3 and 9 μs), the measured decoherence timescales are comparable to those arising from intrinsic spin-bath dynamics. This suggests that the entanglement sequence only weakly increases the dephasing of the 13C spin.

We use Monte Carlo simulations to model the nuclear-spin dephasing induced by the entanglement attempts, taking into account all known control errors (see Supplementary Note 7) but neglecting the intrinsic decoherence rates22. We find that even using pessimistic parameters, an A = 2π 80 Hz coupled nuclear spin is predicted to retain a fidelity of 77.6(4)% with respect to an initial superposition state after 106 entangling attempts. This finding is consistent with the interpretation of spin-bath limited decoherence in the present experiment.

Our simulations also show that the dephasing infidelity after 106 entangling attempts can be reduced below 1% by using optimised primitives incorporating an additional electron-spin echo. Further improvement of the performance can be realised by reducing the entangling primitive duration, such that more attempts can be performed within the intrinsic decoherence timescales. These intrinsic timescales may themselves be extended by optimised decoupling schemes58 as well as using samples with lower nitrogen defect concentrations. It is clear, however, that ionisation currently is a limiting factor. We next probe the nuclear-spin dynamics after such ionisation events to understand if they can be mitigated.

### Mitigating ionisation

The previous section indicates that ionisation of the NV centre limits achievable memory performance. In the above experiments, and in previous work22,29,35, an ionisation event (NV → NV0) at some point in the remote-entanglement sequence causes complete dephasing of the 13C spins. This is because such events occur stochastically, the subsequent electron-spin dynamics are unknown, and, as discussed above (see Eq. 1 and Fig. 1b), each electron-spin state causes different 13C-spin evolution.

While ionisation rates can be reduced by decreasing optical powers for the spin-reset process, this results in longer sequence times. Additionally, the optical π-pulses cannot be removed, and therefore it is challenging to completely prevent ionisation. An alternative approach is to instead develop techniques which make the data qubit robust to this process.

In order to study the effect of charge-state switching, we implement resonant (zero-phonon line, ZPL) optical pulses that efficiently induce ionisation (NV → NV0, 1 ms, 500 nW) and recharging (NV0 → NV, 1 ms, 500 nW) with minimal disturbance to the local charge environment. Combining these pulses with CR checks, we can use heralding and post-selection to perform verified charge-state switching from NV → NV0 → NV (see Supplementary Note 8).

We first combine the verified charge-state switching protocol with nuclear-spin control to investigate the properties of the 13C spin for the NV0 state. After preparing NV and initialising the nuclear spin in the state $$\left|\uparrow \right\rangle$$, we apply the ionisation pulse, and proceed with the experiment if a subsequent CR check heralds preparation in NV0. We then apply a nuclear-spin RF π-pulse with a Rabi frequency of 5.4(2) Hz, for which we sweep the carrier frequency f. After applying the recharge pulse, we read-out the nuclear spin in the Z-basis and post-select the data on finding the NV in NV. As shown in Fig. 3a, we observe a single nuclear-spin resonance at a frequency of 50229.8(1) Hz, which matches the 13C Larmor frequency. The observation of a single transition, rather than two transitions at f = ωL ± A/2, suggest a fast averaging over the two NV0 electron-spin states, akin to motional narrowing21,41.

To characterise the nuclear-spin dephasing, we prepare the nuclear spin in a superposition state, and let it evolve freely while switching to NV0 for a variable time. The inset of Fig. 3b reveals coherent oscillations, corresponding to precession of the nuclear spin at a frequency of 50231(1) Hz. The nuclear-spin coherence $${({\langle X\rangle }^{2}\,+\,{\langle Y\rangle }^{2})}^{1/2}$$ decays as $${T}_{2,{{{\rm{NV0}}}}}^{* }\,=\,57(3)$$ ms. This dephasing time is significantly shorter than for NV ($${T}_{2,{{{\rm{NV}^{-}}}}}^{* } \,\sim\, 0.4$$ s, Fig. 1d), indicating that the NV0 state introduces an additional dephasing mechanism. The fitted decay exponent of n = 1.2(1) (see Methods) matches the value of n = 1 expected for the motional-narrowing-like regime21.

The observation of a single nuclear-spin frequency and a decreased $${T}_{2}^{* }$$ are consistent with a rapidly fluctuating NV0 electron-spin state. In this regime, the dephasing time scales as $${T}_{2}^{* }\,=\,8/({A}_{\parallel }^{2}\,\cdot\, {T}_{1}^{{{{\rm{NV0}}}}})$$21,41. Thus, we can extract $${T}_{1}^{{{{\rm{NV0}}}}}$$ = 570(30) μs. This value deviates from another recent cryogenic measurement ($${T}_{1}^{{{{\rm{NV0}}}}}\,=\,1.51(1)$$s)37. It is likely that this discrepancy is either due to the much higher magnetic field (Bz = 1850 G) or absence of a P1 bath in that work.

The observed nuclear-spin dephasing time in NV0 is much longer than the time needed to recharge to NV. We now show that this enables the protection of the data qubit from ionisation events. We prepare the 13C in each of the six cardinal states, and compare the expectation values obtained when applying the heralded ionisation and recharging process prior to measurement, or when measuring immediately after state preparation (Fig. 3c). Here, to minimise dephasing during the ionisation and recharging processes, we shorten the ionisation pulse length to 0.3 ms, and use a higher-power 0.5 ms recharging pulse.

Without post-selecting cases in which the NV returned to the bright state, we find a reduction of the spin expectation values of 8(1)% (averaged over the cardinal states) when applying the charge-state cycle. Upon post-selection, we find a negligible difference between the cases (the charge-cycle scenario outperforms immediate measurement by 1(1)%), see Fig. 3c. We thus attribute the majority of the observed infidelity to the finite recharging probability, which is likely limited by spectral diffusion arising from the high impurity concentration in the present sample (see Supplementary Note 8). We estimate that the NV is in the NV0 state for an average of ~500 μs, for which the 13C dephasing from the measured $${T}_{2,{{{\rm{NV0}}}}}^{* }$$ is ~ 0.5%, within the uncertainty of the present measurements.

Incorporating such ionisation protection within a network protocol requires a few further considerations. First, the average nuclear-spin precession frequency during the entangling primitives should match the precession for NV0, else additional dephasing will occur at the difference frequency until recharging occurs. This can be realised by alternating the choice of NV qubit-basis ms = {0, −1}, {0, +1} between (or during) entangling attempts. Second, recharging within the entangling sequence can be realised by adding auxiliary 575 nm excitation during all NV spin-reset pulses, which prevents extended periods in which the NV resides in the neutral charge-state7. A drawback of this approach is that extensive application of yellow light may induce spectral diffusion due to ionisation of the P1 bath or other impurities59. A less intrusive approach is to check the charge- and resonance status of the NV centre during the entangling attempts. This could be done passively by monitoring the emitted light either during spin initialisation (in the ZPL, and/or the phonon sideband, PSB), or after the optical π-pulses (in the PSB only, which would not perturb useful quantum information). Alternatively, explicit CR checks could be periodically performed. Efficiently scheduling such checks into a full remote entangling protocol is non-trivial, but the timescales associated with ionisation, data qubit dephasing in NV0, CR-checking and recharging suggest that such an approach is feasible.

We note that the NV0 spin-T1 may increase with reduction of impurities, or under different magnetic fields, which would result in faster nuclear-spin dephasing. This challenge might be overcome by either inducing fast NV0 spin-flips using microwave driving, or by performing feedback correction using recently demonstrated NV0 optical spin-readout at high magnetic fields37.

### Numerical analysis of quantum-network protocols

Finally, we investigate the projected performance of a number of quantum-network protocols when combining the improved memory lifetime demonstrated in this work with previously demonstrated entanglement links and gate operations (in other devices). We focus on non-local two-qubit operations and the creation of distributed four-qubit GHZ states, a key building block for the distributed surface code3,4 (Fig. 1a).

These investigations are based upon density-matrix simulations of noisy quantum circuits. We use the following set of parameters to model the dominant error sources, which are either the measured state-of-the-art (on a variety of devices) or near-term predictions (denoted by *): two-qubit gates (1% infidelity23), NV optical measurement (1% infidelity*10), and networked (NV–NV) Bell-pair creation (10% infidelity*29). We account for the finite duration associated with each operation, including probabilistic NV–NV remote-entanglement (duration 6 μs, success probability 0.01%*29), and for decoherence of electron and nuclear-spin qubits across all operations20,23. We do not take NV ionisation into account, as the results of Fig. 3 indicate that its effects can be mitigated: sequences to realise this will be developed in future work. A detailed summary of the models and parameters used can be found in Supplementary Note 9, and the code implementation is given in a linked repository60.

In Fig. 4a, b, c, we show the quantum circuit and simulated average fidelity Fav61 for a deterministic CNOT operation between nuclear spins in separate network nodes. For N1/e = 2 × 103 (see e.g. previous work29), the projected average fidelity is Fav ≈ 0.33, close to that of a completely random operation (Fav = 0.25); the nuclear-spin decoheres on a timescale shorter than the average time taken to create an entangled resource state ($${\eta }_{{{{\rm{link}}}}}^{* } \,<\, 1$$). In contrast, for N1/e = 2 × 105 as obtained here, we find a projected gate fidelity of Fav ≈ 0.86, which approaches the limit of Fav ≈ 0.89 set by the quality of the NV–NV Bell-pair resource state, local two-qubit gate operations, and measurement errors. These results indicate that deterministic two-qubit gate operations across optical quantum networks are within reach.

We next turn to protocols for GHZ state synthesis between four network nodes. We compare three protocols, which are schematically depicted in Fig. 4d. First, we have the ‘Plain’ protocol, the simplest known approach which fuses three distributed Bell pairs into a GHZ state. Second, we have the ‘Modicum’ protocol4,6, which extends the Plain protocol by one additional Bell-pair creation step between two otherwise idling nodes to realise a single step of entanglement distillation. Finally, we have the ‘Expedient’ protocol introduced by Nickerson et al.3 which uses a minimum of 22 Bell pairs to perform additional rounds of distillation, and, in principle, can lead to high-quality GHZ states even in the presence of errors. Note, however, that previous work did not take into account the decoherence of the data qubits during entangling sequences or idling3.

In Fig. 4d, we plot the simulated GHZ state fidelities (Fstate = 〈ΨGHZρΨGHZ〉) for each protocol, alongside the average duration to prepare the state. For each scheme, there are two data points, which show the fidelities obtained when considering data qubit lifetimes of N1/e = 2 × 103 and N1/e = 2 × 105 respectively. The first observation is that, for all the tested schemes, the improved lifetimes lead to significantly higher fidelities. With the lifetime achieved in this work, the simulated GHZ fidelities for the Plain and Modicum protocols exceed F = 0.5, witnessing genuine multipartite entanglement of four qubits.

The differences in performance between the schemes with N1/e = 2 × 105 give insights into the usefulness of entanglement distillation for the considered parameter regime. First, between the Plain and Modicum protocols, we see that the additional distillation step does improve the fidelity, from F = 0.62 to F = 0.75. However, this fidelity improvement is limited due to the need for an additional SWAP operation (three two-qubit gates). Furthermore, there is a slight increase in the average duration of the protocol, predominantly due to the probabilistic nature of the distillation step. For the Expedient protocol, we see that it takes significantly longer to successfully generate one GHZ state, and achieves lower fidelities. Additional rounds of entanglement distillation are only beneficial if the fidelity improvements (from distiling imperfect states) exceed the fidelity losses from decoherence of idle qubits. A further increase in $${\eta }_{{{{\rm{link}}}}}^{* }$$ is required to make use of such protocols.

Together, these results show that the lifetime of the robust quantum-network memory demonstrated in this work is sufficient to demonstrate key distributed quantum computation protocols, such as deterministic two-qubit gates and basic distillation schemes, across optical quantum networks.

## Discussion

We have demonstrated a robust quantum-network memory based upon a single 13C-spin qubit in isotopically engineered diamond. Compared with previous work22,29, the data qubit lifetime during network operation is improved by two orders-of-magnitude. Critically, the data qubit now decoheres more slowly than state-of-the-art entanglement rates between NV centre network nodes7,29. Using numerical simulations, we show that the corresponding parameter regime—with a projected $${\eta }_{{{{\rm{link}}}}}^{* } \,\sim\,$$ 10—enables a range of protocols for optical quantum networks, including deterministic two-qubit logic and creation of genuinely-entangled four-qubit GHZ states. Additionally, such robust memories would greatly speed up recently demonstrated protocols such as entanglement distillation and entanglement swapping28,29.

On the path towards reaching the fault-tolerance threshold for large-scale distributed quantum information processing, our simulations show that further improvements in $${\eta }_{{{{\rm{link}}}}}^{* }$$ are needed. The 13C decoherence rate rdec is currently limited by spurious ionisation of the NV centre to NV0. Our results show that arbitrary states can be protected while cycling the charge-state back and forth with minimal loss of fidelity, suggesting that such events can be mitigated. Further improvements in rdec are possible by further improving the intrinsic coherence times, and reducing the time needed for the entanglement sequence. Additionally, an improvement of the optical entanglement success probability by a factor ~100 is feasible using Fabry-Pérot micro-cavities32,34, which would also greatly improve the overall operation speed, as is required for advancing beyond prototype networks and towards technological applications. Together such improvements would yield $${\eta }_{{{{\rm{link}}}}}^{* } \,>\, 1000$$, which is anticipated to be sufficient to realise large-scale error corrected quantum networks3.

## Methods

### Sample and hardware setup

Our experiments are performed on a type-IIa 〈100〉 diamond substrate, grown via chemical vapour deposition using isotopically-purified methane gas to reduce the 13C nuclear-spin concentration (targeted 0.01% 13C, Element Six). We address a single NV centre using a cryogenic (4 K) confocal microscope. A solid immersion lens and anti-reflection coating are fabricated to increase optical collection efficiency18,62,63. An external magnetic field is applied along the NV symmetry axis using three orthogonal permanent neodymium magnets mounted on linear actuators (Newport UTS100PP). We measure the field vector to be (Bx, By, Bz) = (0.3(1), 0.06(8), 46.801(1)) G by spectroscopy of the P1 bath transition frequencies51.

Resonant optical excitation of NV at 637 nm (red, Toptica DLPro and New Focus TLB-6704-P) realises high-fidelity spin initialisation (E1,2 transitions,  E′) and single-shot readout (Ey transition)18. We measure readout fidelities of 68.5(2)% for the bright state $$({m}_{s}\,=\,0,:= \left|0\right\rangle )$$ and 99.3(3)% for the dark state ($${m}_{s}\,=\,-1,:= \left|1\right\rangle$$), giving FSSRO = 0.839(3). We employ 515 nm (green, Cobolt MLD) excitation to prepare the NV in NV and on resonance with the 637 nm lasers (see Supplementary Note 8)19. Finally, for experiments involving the neutral charge state, NV0, we use resonant 575 nm (yellow, Toptica DL-SHG Pro) light to realise fast recharging to NV. Through direct current modulation or cascaded acousto-optical modulators, we achieve on/off ratios > 100 dB for all lasers.

Microwave (MW) driving via a lithographically defined gold stripline enables coherent control between $$\left|0\right\rangle \,\leftrightarrow\, \left|1\right\rangle$$. Pulses are applied using Hermite envelopes with maximum ΩRabi ~ 27 MHz, aside from within the entangling primitive, where a multi-tone driving scheme is employed to mitigate heating (Supplementary Note 5). Using a fast microwave switch (TriQuint TGS2355-SM, 40 dB) to suppress electronic noise, we measure long electron-spin relaxation (T1 30 s), dephasing ($${T}_{2}^{* }$$ = 94(2) μs) and coherence (T2 = 0.992(4) ms) times, the latter of which is limited by the electron-spin bath formed by the P1 centres (75 ppb51) which can be reduced in future diamond growth.

### Magnetic field stabilisation

The presence of a number of 6–9 T magnetic field systems in adjacent laboratories leads to slow magnetic field drifts (measured to be ~200 mG peak-to-peak across all presented measurements). These drifts are first mitigated using a feedback-loop. We measure the electron-spin resonance frequency approximately every 10 min, and compensate any deviation to within 3 kHz (~1 mG) of the set-point by moving the magnets. This comes at the cost of slight magnetic field misalignment. If this misalignment becomes too large, or nearby magnetic field systems are being swept too quickly, we observe degradation of the nuclear-spin operations. To remove such effects from our results, during 13C-related data-taking we interleave separate reference measurements of the nuclear-spin expectation value after simple state-preparation and measurement. These reference measurements do not contribute to the presented data-sets, but are used to discard measurement runs in the case that the reference measurement falls below 75% of the calibrated value.

### Data analysis

Throughout this text, we do not correct the nuclear-spin data for SPAM errors.

The intrinsic decoherence timescales of the 13C data qubit, as presented in Fig. 1d, are fitted as described in Table 1.

The decoherence timescale for the data qubit during network operation (upper panel of Fig. 2c) is fit as described in Table 2.

The corresponding fraction of rejected data (lower panel) is fit as described in Table 3.

The 13C nuclear magnetic resonance spectrum for the NV0 state (Fig. 3a) is modelled by numerically evaluating the optical Bloch equations for the system, using the measured Rabi frequency, Ω = 5.4(2) Hz, measured dephasing time, $${T}_{2}^{* }$$ = 57(3) ms, and the chosen pulse duration, t = 92 ms, as fixed parameters. The resonance frequency of 50229.8(1) Hz is obtained by an independent fit to the generalised Rabi formula. We subsequently re-scale the output of the numerical evaluation to account for state preparation and measurement errors using the fit function given in Table 4.

For the 13C free induction decay in the NV0 state (Fig. 3b), we use the fit function given in Table 5.

Finally, for the free evolution of 〈X〉 (inset of Fig. 3b), we use the fit function given in Table 6, where $${T}_{2}^{* }$$ = 57 ms and n = 1.2 are fixed to the values found in the previous fit.