## Main

Engineering entangled quantum states is a decisive step in quantum technology. Although entanglement among weakly interacting systems such as photons has been demonstrated already in the early stages of quantum optics, deterministic generation of entanglement in more complex systems such atoms or ions, not to mention solids, is a relatively recent achievement11. Usually in solid-state systems rapid dephasing ceases any useful degree of quantum correlations. Either decoupling must be used to protect quantum states or careful materials engineering is required to prolong coherence. Most often however, and this is especially important for solid-state systems, one needs to resort to low (milliKelvin) temperatures to achieve sufficiently robust and long-lasting quantum coherence. Spins are sufficiently weakly coupled to their environment to allow for the observation of coherence at room temperatures.

Diamond defect spins are particularly interesting solid-state spin qubit systems. A number of hallmark demonstrations such as single-, two- and three-qubit operations, high-fidelity single-shot readout12, one- and two-qubit algorithms13, and entanglement between nuclear and electron and nuclear spin qubits have been achieved6,14. Different schemes to scale the system to a larger number of entangled electron spins have been proposed15,16,17. A path towards room-temperature entanglement is strong coupling among the ground-state spin magnetic dipole moment of adjacent defects centres. This mutual dipolar interaction scales as distance d−3 and should be larger than the interaction of each electron spin with the residual paramagnetic impurities or nuclear spin moments in the lattice (Fig. 1d). Typical cutoff distances for strong interaction are thus limited by the electron spin dephasing time (milliseconds) to be around 30 nm. Here we demonstrate entanglement between two electron and nuclear spins at a distance of approximately 25 nm. At these distances magnetic dipole coupling is strong enough to attain high-fidelity entanglement while being able to address the spins individually by super-resolution optical microscopy18.

The optical as well as spin physics of nitrogen vacancy (NV) defects in diamond has been subject to numerous investigations11,19. The fluorescence intensity of the strongly allowed optical transition between ground and excited spin triplet states depends on the magnetic quantum number of the ground state and it is larger for mS = 0 and smaller for mS = ±1, allowing optical read-out of the electron spin20. The coherence time T2 of the NV electron spin depends on the concentration of 13C spins and reaches up to 3 ms for 12C enriched diamond11.

To generate strongly coupled defect pairs with high probability and at the same time optimum decoherence properties, we have implanted nitrogen ions (15N+) with kinetic energies of 1 MeV, corresponding to an implantation depth of 730 nm using a 10-μm-thick mica nano-aperture mask (hole diameter 20 nm). This process creates NV pairs at distances less than 20 nm with a success rate of 2% (see Supplementary Information)21.

Figure 1b shows the spin energy levels of the NV pair together with the optically detected electron spin resonance spectrum of two coupled electron spins. The spectrum in secular approximation is described by

where D is the zero field splitting or fine structure, B is the magnetic field, γe is the gyromagnetic ratio and SA(B) is the spin operator of NV A(B). Electron spin flip-flop terms such as (Sx ASx B,Sy ASy B) can be neglected as long as the energetic detuning between two spins is larger than their dipolar coupling vdip (see Supplementary Information). The two defects are oriented along two different directions of the diamond lattice and hence the orientation dependence of the fine structure term allows for individual addressing by different microwave frequencies. To investigate the magnetic dipolar coupling between the two defects we induce spin transitions (ΔmS = ±1) on both defects and use NV A as a sensitive magnetometer22 to measure spinflip-induced changes of the magnetic dipole field of NV B yielding a dipolar coupling constant of vdip = 4.93±0.05 kHz (Fig. 1e). The effective coupling strength can be enlarged up to four times by exploiting the qutrit nature of the triplet spin in each NV centre. Namely, the quantum phase of a superposition state with ΔmS = ±2 evolves twice as fast in a given magnetic fields as the ΔmS = ±1 superposition. Furthermore, a spinflip by ΔmS = ±2 induces a twice as strong magnetic field change compared with the case of ΔmS = ±1. Hence, using ΔmS = ±2 (double quantum transitions, DQ) on both NVs yields vdip DQ = 19.72±0.2 kHz. It is worth mentioning that these double quantum coherences have half the dephasing time of a single quantum transition under the influence of Markovian magnetic field noise. To create high-fidelity entanglement, strong coupling has to apply (that is, vdip>1/T, where T is the relevant coherence time). The present moderate coupling is masked by spectral diffusion of the two individual electron spins(T2A DQ* = 27.8±0.6 μs and T2B DQ* = 22.6±2.3 μs); that is, vdip<1/T2*. This limitation can be overcome by eliminating low-frequency environmental noise components through further refocusing steps in the entanglement process resulting in a new lower limit for strong coupling vdip>1/T2. The electron spin relaxation and coherence times of the two NVs are T1 = 1.12±0.26 ms, T2A DQ = 150±18 μs and T2B DQ = 514±50 μs. The measured values for dipolar interaction and T2DQ allow a maximum distance of 29.6±1.4 nm between the two defects. The actual distance obtained by involving microwave-assisted super-resolution microscopy yields 25±2 nm. Note that the coupling did not change over months, indicating the room-temperature stability of the defect pair.

After optically initializing the system in |mSA,mSB〉 = |00〉 a double quantum π/2 rotation on both NVs leads to 1/2(|−1−1〉−|1−1〉−|−11〉+|11〉). Under the influence of mutual dipolar coupling the system is evolving freely for a time τ resulting in a state-dependent phase acquisition 1/2(eiϕ|−1−1〉−|1−1〉−|−11〉+eiϕ|11〉), where ϕ = 2πvdip DQ and τ is the correlated phase due to dipolar interaction. After a double quantum π rotation and a further free evolution period τ, a second phase is accumulated 1/2(ei2ϕ|−1−1〉+|1−1〉+|−11〉+ei2ϕ|11〉). With a final double quantum π/2 rotation the accumulated phase is mapped onto 1/2((ei2ϕ−1)|−1−1〉+(ei2ϕ+1)|11〉). For 2τ = 1/2vdip DQ = 25 μs this is , a maximally entangled Bell state (for details see Supplementary Information). Using local operations this state can be transformed into a set of different entangled states, for example two π pulses transform to ΦDQ+ to . Figure 2b shows the state evolution on application of the entanglement gate as a function of interaction time τ. The blue line is a simulation of the entangling gate using Hamiltonian (1) with coherence times taken from experimental data. For τ = 12.5 μs the state has evolved to ΦDQ+. As the evolution into ΦDQ+ would not be visible in the fluorescence signal it was transformed into Φ using local gates. We have performed a density matrix tomography of the final entangled state (for details see Supplementary Information). The fidelity of the reconstructed density matrix with respect to the target state ΦDQ+ is 0.67±0.04, which is below the simulated fidelity of 0.89. (Fidelity is defined as the proximity of two states given by F = tr(ρ σ), where σ is the measured quantum state and ρ is the target state.) The main reason for this discrepancy is due to errors resulting from the finite duration of microwave pulses. In addition, we quantify the entanglement according to ref. 23 by using the von Neumann relative entropy as $E\left({\sigma }_{{\Phi }_{\text{DQ}}^{+}}\parallel \rho \right)$ = minρdisentangledtr(σln(σ/ρ))≈0.16 (0 for no entanglement, for a maximal entangled state).

Entanglement between spins is also inferred from fluorescence emission properties of the entangled defect pair. The steady-state fluorescence emission of , as well as a correspondingly separable spin state of both NV centres (for example (1/2)(|00〉+|10〉+|01〉+|11〉)) is identical. However, two-photon correlations reveal a difference between spin-entangled and mixed states. A Φ state has a higher probability of simultaneously emitting two photons than an uncorrelated superposition state whereas a Ψ state has a lower probability. In Fig. 3, two-photon correlation measurements and the corresponding classical correlations are shown.

The lifetime of the entangled states is limited by electron spin dephasing measured to be T2A DQ* = 27.8±0.6 μs and T2B DQ* = 22.6±2.3 μs. The measured entanglement lifetime is T(ΦDQ+) = 28.2±2.2 μs and T(ΨDQ+) = 23.7±1.7 μs (Fig. 4c and Supplementary Information). It is interesting to note that the lifetimes for states Φ+ and Ψ+ are identical although Ψ+ is known to constitute a decoherence-free subspace for dephasing processes that are dominated by magnetic field noise24. However, cancellation of decoherence effects in Ψ+ occurs only if the magnetic field noise is identical for both NV A and NV B (that is non-local). Apparently this is not the case for the pair. One reason is the different orientation of the pair of NVs with respect to B0, which would result in non-ideal decoherence-free subspaces. In addition, from a previous analysis of spin dephasing in diamond defect centres it became clear that electron spin dephasing is dominated by nuclear spins in the nanometre vicinity of the defect.

To store entanglement for a longer period, we designed an experimental scheme (Fig. 4a) to transfer electron spin entanglement to 15N nuclear spins of the NV. Instead of swapping entanglement by driving nuclear spins directly6, we used a combination of a non-aligned static magnetic field previously introduced for state storage25 and selective gates on the electron spins to generate electron nuclear SWAP gates on both NVs. The entanglement swapping protocol used can potentially reach a transfer efficiency of 1; that is, all electron spin entanglement is converted into nuclear spin entanglement (see Supplementary Information). Limited pulse (that is, gate) accuracy however results in an efficiency of around 41% for storage and retrieval in our experiments such that measures based on, for example, the von Neumann relative entropy E indicate nuclear spin entanglement (see Supplementary Information). As shown in Fig. 4c the lifetime of the entangled state with nuclear storage is markedly longer than that of the electron spin state with an effective storage time of over 1 ms. A comparison with the electron spin relaxation time (shown in Fig. 4c) demonstrates that it is the electron T1 that limits the entanglement in the nuclear spin quantum register. We stress that during this time there is no nuclear spin interaction; that is, the timescale on which the nuclear spins are entangled is much faster than their direct coupling (few millihertz) and coupling is slow compared with their decay rate (approximately kilohertz). Decoherence of the stored entangled state could be further suppressed by repolarizing the electron spin (that is, lengthening the effective electron spin T1) allowing nitrogen nuclear coherence times beyond T2* = 7.25 ms (ref. 26). By continuous strong optical excitation of both NV centres further improvement of entanglement storage into the range of seconds seems feasible27.

The experiments presented here mark a first step towards scaling room-temperature diamond quantum registers by demonstrating deterministic entanglement of electron spins over some 10 nm distance. With the advent of diamond defect centre nanotechnology, more efficient generation of defect pairs and larger defect arrays seems to be tractable. For example, decreasing the implantation energy to about 10 keV and using the present mask technology should allow for a pair creation efficiency of almost 100%. Recently, techniques such as nano-implantation with positioning accuracies of 20 nm (ref. 28) and shallow-implanted defects showing dephasing times not degenerated by surface proximity29,30 have improved considerably. With the aid of those techniques, controlled generation of large-scale arrays seems to be within reach, paving the way towards room-temperature quantum devices.

Note added in proof: After submission of the present work a related publication on photon-mediated defect center entanglement was published31.

## Methods

NV defects are formed either by nitrogen incorporation during growth or by implantation of nitrogen into high-purity diamond material with a subsequent annealing step. Here we have chosen the latter method to generate proximal diamond defect pairs. The pair was produced by ion implantation in isotope-enriched 12C diamond (99.99%) using a specially designed mica mask with high-aspect-ratio apertures (1:100). Ground-state depletion imaging was performed to identify suitable candidates, which were investigated with double electron–electron resonance. The sample was investigated in a home-built confocal microscope. For coherent control, microwave radiation was synthesized (Rhode-Schwarz SMIQ 03B) and modulated by an IQ (in-phase and quadrature) mixer with an arbitrary waveform generator (Tektronix AWG 520). The microwaves were applied by means of a microstructure forming a split ring resonator lithographically fabricated on the diamond surface.