## Abstract

Methods to selectively detect and manipulate nuclear spins by single electrons of solid-state defects play a central role for quantum information processing and nanoscale nuclear magnetic resonance (NMR). However, with standard techniques, no more than eight nuclear spins have been resolved by a single defect centre. Here we develop a method that improves significantly the ability to detect, address and manipulate nuclear spins unambiguously and individually in a broad frequency band by using a nitrogen-vacancy (NV) centre as model system. On the basis of delayed entanglement control, a technique combining microwave and radio frequency fields, our method allows to selectively perform robust high-fidelity entangling gates between hardly resolved nuclear spins and the NV electron. Long-lived qubit memories can be naturally incorporated to our method for improved performance. The application of our ideas will increase the number of useful register qubits accessible to a defect centre and improve the signal of nanoscale NMR.

## Introduction

Nuclear spins are natural quantum bits with long coherence times for quantum information tasks^{1} and they encode information about the structure of molecules and materials in a form that is accessible to nuclear magnetic resonance (NMR) techniques^{2} or electron-nuclear double resonance (ENDOR)^{3}. However, because of the weak magnetic moments of nuclear spins and their similar precession frequencies, it is challenging to detect and control nuclear spins individually. The nitrogen-vacancy (NV) centre in diamond represents a promising nanoscale platform for detection and coherent control of such nuclear spins^{4,5,6}. In type IIa diamonds, the decoherence of the NV electron spin is dominated by the presence of ^{13}C nuclei. However, when properly controlled, the ^{13}C nuclei in the vicinity of an NV centre become useful resources^{7,8,9} for quantum computing purposes. Furthermore, shallow implanted NV centres can be used to detect the signal of nuclear spins on the surface^{10,11}, which opens opportunities for both quantum simulation^{12} and single molecule NMR^{11}.

Using magnetic resonance techniques originally developed in NMR, nuclear spins have successfully been detected by single NV centres^{6,10,11,13,14,15,16,17,18,19}. Among them, dynamical decoupling (DD) techniques^{2,20} provide remarkable advantages, including significant extension of qubit coherence times and, more importantly, the ability of addressing single nuclear spins^{13,14,15,21,22}. Nevertheless, standard DD techniques can only be used to address a few nuclear spins because of a number of drawbacks such as low spectral resolution^{23}, resonance ambiguities^{24,25} and perturbations from the electron-nuclear coupling^{21}. In this respect ENDOR techniques are applied to improve the spectral resolution by measuring the NV signal over long evolution times^{23,26,27}, but without the abilities of individual spin addressing and control. The main reason of the lack of selective addressing comes from the unfiltered coupling to undesired nuclear spins such as those in the spin bath. Moreover, in spin detection the presence of undesired coupling unavoidably produces noise on the sensor electron and reduces the sensitivity. For example, the signals from the target nuclear spins which has weaker coupling can be damaged by those with stronger coupling, regardless of the potential high spectral resolution. As a consequence reported results using the ENDOR techniques^{18,23,26,27} provide high spectral resolution but do not demonstrate any increase in the number of detectable nuclear spins by sensor electrons comparing with the achieved numbers by standard DD techniques^{6,14}. Note that individual addressing of nuclear spins and the implementation of quantum gates on them are more demanding than nuclear-spin detection, but essential in quantum information processing and thorough characterization of nuclear spins.

Our method overcomes these difficulties to selectively address specific nuclear spins by applying radio frequency (RF) fields in a delay window, while the entanglement with the electron spin sensor is preserved by a subsequent Hahn echo operation^{2}. In this manner highly selective entangling gates between the electron spin and different target nuclear spins can be achieved via selective double resonance. We demonstrate that with our method one can address, control, and identify nuclear spins and spin clusters that are not detectable by standard DD techniques. Additionally, our protocol provides the ability to identify the number of nuclear spins sharing an unresolvable signal dip in the resonance spectrum. Furthermore, we show how one can individually address nuclear spins to perform high-fidelity two-qubit quantum gates between the NV electron qubit and the addressed nuclear qubit in a robust way, even when they are hardly resolved in spectrum. We also show how the efficiency of our method can be enhanced by using a nuclear memory, which has coherence times much larger than the life time of the electron spin of the sensor.

## Results

### Working principle

Now we describe the details of our method. A magnetic field parallel to the NV symmetry axis splits the spin triplet of the orbital ground electronic state of the NV centre. We use two of the three levels *m*_{s}=0, ±1 to define an NV electron spin qubit^{4}. Under a strong magnetic field such that the nuclear Zeeman energies exceed the perpendicular components, , of the hyperfine field **A**_{j} at the locations of nuclear spins, see Fig. 1a, the interaction between the NV electron spin and its surrounding nuclear spins is described by (Supplementary Note 1)

with . Here we use as one of the qubit states while the second qubit state may be , when *η*=1/2, or with *η*=1. For each nuclear spin, denotes the component of **A**_{j} parallel to the nuclear spin quantization axes (see Fig. 1a,b). The nuclear precession frequencies are shifted by , which can be used to address individually nuclear spins of the same species (homonuclear spins).

An initial superposition state of the electron spin loses its coherence because of the electron-nuclear coupling *H*_{int}. This effect can be removed by a Hahn echo. In our case, a microwave *π* pulse exchanges the states and effectively reverses *H*_{int}→−*H*_{int}. When the evolutions before and after the *π* pulse have the same duration *τ*, entanglement from all the nuclear spins is erased, preserving the electron spin coherence. In this manner, the nuclei are effectively decoupled from the electron. However, no nuclear spins can be addressed in this way.

To preserve the coupling with a target spin while eliminating the influence of the rest on our sensor, we apply RF driving at the precession frequency of the target spin during the delay window. By flipping the target spin *j* by an angle *θ*_{rf}=*π*, we selectively rephase its interaction with the electron spin and realize a quantum gate

with and , up to single-spin rotations. Note that, by choosing a proper rotating frame, this is equivalent to write *U*_{+}=*I* and . Hence, we can generate entanglement between the NV centre and selected nuclear spins which forms a key ingredient of our method (see Fig. 1c,d). Note that it is not essential that *θ*_{rf}=*π* as almost any choice of *θ*_{rf} ≠2*mπ* (*m* being an integer number) will create entanglement with the target and lead to a coherence dip in the electron spin spectrum. In addition, more than one nuclear spin can be addressed in the same delay window by using RF driving with different frequencies. Now, we describe two strategies to achieve selective nuclear spin control in the delay window.

### Spin addressing and high-fidelity quantum gate

The first procedure corresponds to use DD techniques to suppress electron-nuclear interactions and to protect the NV coherence during the delay window, while the RF driving is applied to achieve selective rotations on the target nuclei (Fig. 1e). In nuclear spin sensing protocols, the electron qubit is initialized in an equally weighted superposition state and its population signal at the end of the protocol *P*=(1+*L*)/2 is directly related to the observable of NV electron coherence^{15} with *ρ*_{e} being the reduced density matrix of electron qubit. Figure 2a,b shows the obtained spectrum when scanning the frequency of the RF driving applied at the delay window, for a diamond sample of natural abundance (1.1%) with 736 ^{13}C spins. The NV coherence at the delay window is protected by the Carr–Purcell (CP) sequence^{2}. Note that we can also use modified versions^{21,28,29} of CP sequence by changing the phases of pulses to provide improved robustness at the present of control errors. When the RF frequency *ω*_{rf} matches one of the nuclear precession frequencies that, under strong magnetic fields, read (with denoting the bare Larmor frequency of ^{13}C) we observe the coherence contributed by the corresponding spin under on-resonant RF driving (see Methods)

which lies in the range . For the case of *θ*_{rf}=*π* we have a maximum signal . When there are a number *p* of nuclear spins with indistinguishable precession frequencies *ω*_{j}≈*ω*_{rf} the coherence signal becomes . The one-to-one correspondence between *L* and *ω*_{j} (see the brown dashed lines on Fig. 2 for *p*=1 and the cyan dashed lines for *p*=2, and compare the brown dashed lines with the signals of C1 and C3, as well as the cyan dashed lines with the dip of C2) and the coherence patterns in Fig. 2c,d easily identify the number of nuclear spins in a dip, even when they are not resolved in the spectrum. Because of the relation between the interaction strength and the spectral position of a signal dip, we know the electron-nuclear interactions when we set the RF driving at the frequency of the signal dip. In this manner, we can selectively control the nuclear spins creating the signal dip.

Our method works well even when the perpendicular components of hyperfine field =0 (see Fig. 1a,b). Note that standard methods^{13,14,15,21,22,30,31} on spin detection based on DD techniques require both and to be different from zero. In this respect, Fig. 2a shows the signal obtained with standard DD^{13,14,15} by scanning the pulse interval of the CP sequences. The coherence signal is determined by the strength of for a sequence duration *t*_{s}, when the *k*_{DD}-th harmonic branch matches the precession frequency *ω*_{j} (that is, *k*_{DD}*ω*_{DD}=*ω*_{j})^{22}. Therefore, nuclear spins with =0 (for example, C2 and C3 in Fig. 2a) are not detected by standard DD techniques. Furthermore, in Fig. 2a the signal obtained by DD is weak when compared with our method for the same number of 100 *π* pulses. See Supplementary Note 2 for a discussion of standard DD methods, a more detailed comparison with our technique, and other shortcomings of standard DD techniques.

In addition, our protocol allows to enhance the interaction and, therefore, the obtained signal by transferring the electronic state to for the interaction windows (*t*_{1}, *t*_{2}) and (*t*_{5}, *t*_{6}) in Fig. 1, with the results shown in Fig. 2b. In contrast, homonuclear spins can not be distinguished by the standard DD methods^{13,14,15} when the qubit states *m*_{s}=±1 are used, because the averaged nuclear precession frequencies are not shifted by the hyperfine field (Supplementary Note 2) and are not resolvable in spectrum.

Figure 2b also shows that a change in the rotation angle *θ*_{rf} due to, for example, intensity fluctuations in the RF driving field does not affect the locations of signal dips, demonstrating an intrinsic robustness of our method for nuclear spin detection. The fringes that appear around *θ*_{rf}=2*π* are caused by the side excitation of the rectangular RF driving with a finite length *t*_{rf}. The RF driving with a frequency detuning Δ_{rf,j}≡*ω*_{rf}−*ω*_{j} turns the nuclear spin around an axis out of the plane with a tilting angle *α*_{j}≡arctan(Δ_{rf,j}*t*_{rf}/*θ*_{rf}) and an effective rotation angle . For example, for *θ*_{rf}=2*π* there is a spin flip around the tilting axis if the detuning is , giving the side fringe signal shown in Fig. 2b.

This single-spin contribution can be completely eliminated when is an integer multiple of 2*π*, even *ω*_{j} is not far detuned from the RF frequency. For example, for *θ*_{rf}=*π* a spin with a frequency detuning is rotated by the rectangular RF driving by an angle 2*π*. Hence, the NV centre and the nuclear spin remain disentangled and a coherence dip is not produced (for example, see the red arrow near the main C1 coherence dip in Fig. 2a).

To investigate the effect of control errors from DD pulses used in our method, in Fig. 3 we consider a sample with two spectrally close ^{13}C spins (G1 and G2). Figure 3a shows the population signals obtained by our method; during the delay window we apply ideal instantaneous decoupling control on the NV centre in the form of CP sequences (red solid lines), while the blue circles correspond to the signal when errors in the external control are present. In the latter case we modify the phases of corresponding CP pulses to the ones of adaptive XY-8 (AXY-8) sequences^{21} because AXY-8 sequences have good robustness against control errors. As shown in Fig. 3a, the case with errors fits well with the ideal signal even when we introduce a 10% of amplitude error on the DD pulses, and a microwave detuning error of ∼2.2 MHz caused by uncertain spin states of the strongly coupled ^{14}N spin. As discussed above when we tune the RF-driving length to , the spin G2 does not perturb the dynamics of the NV electron and G1 spins. This is a situation that can be confirmed by changing the time *τ* of the interaction window and observing that the population change of the spin G1 follows the one of a single spin (see the pattens in Fig. 2c and compare the panels of Fig. 3a). With this value of *t*_{rf}, we can perform high-fidelity quantum gate on only one of the spins, even through the two spins G1 and G2 are not well separated in spectrum (see Fig. 3a). In Fig. 3b, we address the spin G1 by using the RF control *ω*_{rf}=*ω*_{G1} and *θ*_{rf}=*π*. The RF driving implements a *π* rotation gate around the direction, unconditional on the NV electron qubit state. If *τ*>0, the entanglement echo subsequently implement an entangling gate (see equation (2)) on G1. Figure 3b shows the fidelity (see Supplementary Note 5 for the definition) of the implemented maximally entangling gate *U*_{ent}(*π*)*R*_{G1}, achieving a combined gate fidelity of 0.992 even for a 10% amplitude and ∼2*π* × 2.2 MHz detuning errors on the *π* pulses in the delay window.

### Enhanced performance via a quantum memory

An alternative strategy to achieve selective nuclear spin control in the delay window is to store the electron spin state in a long-lived nuclear spin (see Fig. 1f). In Fig. 4a, we show the NV electron spin population signal when it addresses an isolated ^{13}C spin, by using an initially polarized nuclear memory qubit. The memory qubit can be initialized by swapping a polarized NV electron state to the memory spin or by using dynamical nuclear polarization^{16}. Because after a swap operation (Supplementary Note 3) between the NV electron and memory qubits the electron spin gets polarized to the *m*_{s}=+1 state during the delay window, it is not necessary to protect electron coherence. In addition, the shifts of the nuclear spin precession frequencies (now under strong magnetic fields) are larger than those achieved by the method using DD or by standard DD techniques^{13,14,15,21,22}.

The electron spin relaxation creates magnetic noise on the nuclear spins and can reduce the signal contrast^{32}. However, at low temperatures, the relaxation time *T*_{1} of NV electron spin can reach minutes^{33}. When the effects of electron spin relaxation can be neglected. In addition, we can protect the memory qubit against the electron-relaxation noise for example by strong driving^{32}. The coherence times of memory qubits (for example, a ^{13}C or a ^{14}N in Fig. 4a) are determined by the electron-relaxation time *T*_{1} when their hyperfine fields are sufficiently larger than 1/*T*_{1} (Supplementary Note 3)^{32}. Therefore, the signal contrasts in Fig. 4a are similar for both memory qubits and we may use a more strongly coupled ^{13}C spin as a quantum memory. Note that the use of unpolarized memory qubit still gives large signal contrast, showing that in the application of spin detection our method is insensitive to initialization error of the qubit memory (see Fig. 4a).

Structural information of coupled spin clusters can also be observed by our method. The dynamics of two coupled homonuclear spins under a strong magnetic field is characterized by the dipolar coupling strength *d*_{j,k} (see Methods) and the difference between the hyperfine components^{34}. A spin pair close to the NV centre with *δ*_{j,k} and *d*_{j,k} the same order of strengths can modulate the NV coherence^{34,35}, in the absence of RF control as shown in Fig. 4b. Spin pairs with (we call this as type-h) or (called type-d) could be useful quantum resources. But these two types of spin pair were regarded as unobservable, because they form stable pseudo-spins which have negligible effects on electron coherence^{34}. However by using our method, we can detect, identify and control these spin pairs close to the NV centre. After the delayed entanglement echo with on-resonant RF driving, the population signal (see Methods) of a type-h or a type-d spin pair is different from the case of single spin, as shown in Fig. 5. The type-h and type-d spin pairs can be distinguished. For type-h pair the on-resonant RF field flips a ^{13}C spin by *θ*_{rf}=*π*, while for type-d pair the on-resonant RF field drive the triplet state with a Rabi frequency times as the one for single nuclear spins (compare Fig. 5a,b and see Methods).

To address and control nuclear spins individually in a coupled cluster the internuclear dipolar coupling needs to be suppressed. Internuclear interactions also reduce the Hahn-echo electron coherence times and, hence, the achievable interaction times *τ* (available values^{36,37} ms for natural abundance of ^{13}C and can be increased using lower abundance, see Supplementary Fig. 7). To solve the problem of spin interactions, we use the Lee–Goldburg (LG) off-resonance decoupling^{2,12,22}. The LG decoupling field can remain turned on for the entire duration of our protocol, including NV electron spin initialization and readout, because the frequency of RF decoupling field is far off-resonance to the transition frequencies of the NV electron spin. This allows for the RF decoupling field to be applied by external coils and resonators to avoid possible heating on the diamond sample. When the LG decoupling field is tuned such that , the dipole-dipole interactions between nuclear spins are suppressed^{12,22}, giving rise to the effective Hamiltonian with the nuclear spin operators projected along effective rotating axes (see Supplementary Note 1). Figure 4b demonstrates the effect of LG decoupling with Δ_{LG}=2*π* × 20 kHz, which can be achieved by a RF field with the amplitude much smaller than the values of ∼0.1 T in the control fields reported in refs 38, 39. The suppression of the internuclear interactions allows us to achieve longer interaction times *τ* and RF-driving lengths *t*_{rf} for single-spin addressing. The improved spectral resolution leads to an increase of the number of individually addressable spins (see Fig. 4e).

In the case that there are other significant decoherence sources that are acting on the NV electron spin, our method can be combined with DD to further protect the NV coherence. Applying a CP sequence (or its modified versions^{21,28,29} for better control robustness) with an inter *π*-pulse interval *π*/*ω*_{DD} and the sequence duration *τ* at each of the interaction windows, noise with frequencies slower than *ω*_{DD} is suppressed, and at the same time the electron spin couples to nuclear spins through the interactions when the *k*_{DD}-th harmonic branch matches the precession frequency *ω*_{j} up to a frequency uncertainty of (refs 14, 21, 22). The nuclear spin operators depend on the azimuthal angles of nuclear spins relative to the magnetic field direction. Nuclear spins unresolvable by the CP sequences may nevertheless have different precession rates. To ensure the same effective Hamiltonian at the two interaction windows, we apply a two-pulse CP sequence on the nuclear spins during the delay window to remove this inhomogeneity. Then adding a weak RF drive during the delay window allows us to address the target spins with high spectral resolutions.

In addition, our scheme allows to measure the spin directions , as detailed in the following. The azimuthal directional angle *φ*_{rf} of RF control fields is controlled by the RF phase in the rotating frame of nuclear spin precession. When the RF driven rotation does not commute with the effective interaction Hamiltonian, it breaks the erasing process of delayed entanglement echo on the target spins, and thereby, we address the nuclear spins in a highly selective way. On the other hand, when the RF rotation axis is parallel to the azimuthal angle of a target nuclear spin (*φ*_{rf}= or +*π*), the RF driving commutes with the interaction window and the electron-nuclear entanglement is removed after the echo, giving vanishing signal dips. By measuring the RF phases *φ*_{rf} which cause vanishing signal dips, we obtain the relative locational directions of nuclear spins (see Fig. 4c). Note that we can combine LG decoupling with DD using recently proposed protocols^{22,40}.

Our method allows to improve the spectral resolution beyond the limit set by the room-temperature electron *T*_{1} when we decouple the nuclear memory from the electron spin at the delay window. The decoupling technique that uses optical illumination has been demonstrated to prolong the room-temperature coherence time of nuclear spin memory over one second (∼267 times of *T*_{1})^{32}, because the optically induced NV ionization decouples the nuclear spins from the NV centre by a mechanism related to the motional averaging effect in NMR^{32,41}. In Fig. 4d, we simulate the application of optical illumination and RF driving during the delay window to detect a proton spin placed 4 nm away from the NV centre with the interaction time *τ*=100 μs (Supplementary Note 5). A delay time *t*_{rf}≈80 ms already provide enough frequency resolution to detect a chemical shift of ∼1 p.p.m. for the applied magnetic field *B*_{z}≈0.467 T. Using a higher magnetic field can further improve the chemical shift detection. We can apply LG decoupling when there are more target spins and internuclear interactions. In addition, we can use DD to protect the interaction windows from noise for extending the interaction time *τ*. Electron spin coherence time of shallow NV centre has reported values of ∼1 ms using continuous DD (spin lock)^{11}.

## Discussion

In summary, we have proposed a method to address and control nuclear spins which were regarded as undetectable or unresolvable. High-fidelity quantum gates on these nuclear spins can be achieved by our method even when the external control has relative large errors and the nuclear spins present a dense resonance spectrum. Therefore, by our method more nuclear spins become useful and robust quantum resources. For example, with more reliable nuclear spins it is expected an improvement in quantum metrology assisted by quantum error correction^{42}. The ability to address and control nuclear spins individually is also vital in the development of a solid-state quantum information processor that uses host electron spins and surrounding nuclear spins^{40} as well as for large-scale quantum simulators in diamond^{12}. Our method provides a substantial advancement over the ENDOR techniques^{3,18,23,26,27} which do not individually address nuclear spins because of inefficient elimination of the noise from other bath spins (see Supplementary Note 4 for a discussion on the ENDOR sequences utilizing both microwave and RF control fields). As a consequence, our work is expected to find applications as well in traditional fields of NMR and ENDOR, for example, in analysis of chemical shifts. Finally, the method has a general character being equally applicable to other electron-nuclear spin systems^{43,44}.

## Methods

### Signals of delayed entanglement echo

During the sensing protocol, the NV dynamics can be calculated by the methods in refs 37, 45. Given the initial electron spin state , the population left in the original equal superposition state is *P*=(1+*L*)/2 and the NV coherence can be expressed by the contributions *L*_{c} of spin clusters *c* when the interactions between different spin clusters can be neglected^{37,45}. Because *k*_{B}/*ħ*≈2*π* × 21 GHz K^{−1}, the thermal energies are much larger than the Zeeman energies of nuclear spins at relevant temperatures. Therefore the thermal state of nuclear spins is approximately described by the identity operator up to a normalization factor. The quantity *L*_{c} reads

where , 〉, the dimension of the spin cluster *c*, and *U*_{c} the NV-cluster evolution^{37,45}.

### Single spins

Single-spin dynamics dominate the effect on the NV electron spin^{37}. The signal from single nuclear spins (a spin cluster *c*=*j* with one spin *j*) is calculated as follows. The evolution of a single nuclear spin after an interaction window with time *τ* is , where *η* is determined by the qubit manifold used in the interaction window. During the delay window, we apply a RF driving field that rotates the nuclear spins with the evolution *R*_{j}. For resonant RF driving (that is, the RF frequency *ω*_{rf}=*ω*_{j} matching the nuclear precession frequency *ω*_{j}), the nuclear spin is rotated by an angle *θ*_{rf} and (assuming rotation around the direction). For the rectangular RF-driving with a duration *t*_{rf} and a frequency detuning Δ_{rf,j}=*ω*_{rf}−*ω*_{j}, we obtain the spin rotation at the delay window . Following by another interaction window with time *τ* between two *π* pulses on the electron spin (the last *π* pulse is optional, but we keep it for simplicity), we have the coupled evolution between the NV electron spin and a single nuclear spin , which gives the coherence signal by using equation (4). The contribution of a single spin- after the delayed entanglement echo with on-resonant RF driving is given by equation (3).

### Coupled spin pairs

Strongly coupled nuclear spin pair (a spin cluster *c*={*j*, *k*} with two spins *j* and *k*) can modulate the NV electron spin dynamics. Under a strong magnetic field the dipolar coupling reads , where **r**_{j,k} is the relative position of the coupled *j* and *k* spins and *γ*_{j(k)} the gyromagnetic ratios. The coupled dynamics between the NV electron spin and the spin pairs of type-h and type-d under a strong magnetic field is shown as follows.

For type-h pairs, homonuclear spin flip processes are suppressed and therefore the precession frequency of each nuclear spin is split by *d*_{j,k} by the internuclear interaction . The nuclear spin flip by the RF driving at the delay window is conditional to the state of the other spin in the nuclear spin pair. Similar to the calculation of single spin, the evolution after the delayed entanglement echo is , after an on-resonant RF driving *θ*_{rf}=*π* to flip the nuclear spin *j* conditioned on the state of spin *k*. Different from the case of single spins, the dimension of the spin pair is *N*_{j}*N*_{k}, and the corresponding population signal for two ^{13}C is when applying *θ*_{rf}=*π* on resonant to the spin *j*.

For type-d pair of homonuclear spins, the interaction takes the form under a strong magnetic field. For the nuclear spins with spin *I*=1/2, the composited spin cluster has a singlet state with a composited spin *J*=0, . The triplet states with *J*=1 are , , and . A radio frequency control can be written as . Scanning the RF frequency *ω*_{rf} to the splitting between and , the nuclear spins are rotated. The nuclear state has an energy of −*d*_{j,k}/2 (because ), while the energies for are ±*ω*_{n}+*d*_{j,k}/4, where *ω*_{n} is the nuclear precession frequency shifted by the hyperfine field. Therefore, the transition frequencies between and are *ω*_{n}±3*d*_{j,k}/4, shifted by the dipolar coupling. Different from the case of single spins that a spin flip requires a RF driving time 2*π*/(*γ*_{n}*B*_{x}), here the Rabi frequency is increased and transitions between and can be finished in a time of *π*/(*γ*_{n}*B*_{x}). This time difference is a signature to distinguish the signals from that of single spins and of a type-h spin pair. Before a spin flip of the nuclear spin pair, the interaction Hamiltonian with the NV electronic spin reads , that is, . After a time *τ*, we flip the electron spin and the nuclear triplet state, for example, with a transition in a delay window, giving an effective interaction after the delay window for a time *τ*. The join evolution up to single qubit operations reads and the corresponding population signal .

### Data availability

The data files used to prepare the figures shown in the manuscript are available from the first corresponding author upon request.

## Additional information

**How to cite this article:** Wang, Z.-Y. *et al*. Delayed entanglement echo for individual control of a large number of nuclear spins. *Nat. Commun.* **8,** 14660 doi: 10.1038/ncomms14660 (2017).

**Publisher’s note**: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## References

- 1.
Zhong, M.

*et al.*Optically addressable nuclear spins in a solid with a six-hour coherence time.*Nature***517**, 177–180 (2015). - 2.
Mehring, M.

*Principle of High Resolution NMR in Solids*Springer (1983). - 3.
Schweiger, A. & Jeschke, G.

*Principles of Pulse Electron Paramagnetic Resonance*Oxford (2001). - 4.
Doherty, M. W.

*et al.*The nitrogen-vacancy colour centre in diamond.*Phys. Rep.***528**, 1–45 (2013). - 5.
Dobrovitski, V. V., Fuchs, G. D., Falk, A. L., Santori, C. & Awschalom, D. D. Quantum control over single spins in diamond.

*Annu. Rev. Condens. Matter Phys.***4**, 23–50 (2013). - 6.
Schirhagl, R., Chang, K., Loretz, M. & Degen, C. L. Nitrogen-vacancy centres in diamond: nanoscale sensors for physics and biology.

*Annu. Rev. Phys. Chem.***65**, 83–105 (2014). - 7.
Liu, G.-Q., Po, H. C., Du, J., Liu, R.-B. & Pan, X.-Y. Noise-resilient quantum evolution steered by dynamical decoupling.

*Nat. Commun.***4**, 2254 (2013). - 8.
Taminiau, T. H., Cramer, J., van der Sar, T., Dobrovitski, V. V. & Hanson, R. Universal control and error correction in multi-qubit spin registers in diamond.

*Nat. Nanotechnol.***9**, 171–176 (2014). - 9.
Waldherr, G.

*et al.*Quantum error correction in a solid-state hybrid spin register.*Nature***506**, 204–207 (2014). - 10.
Müller, C.

*et al.*Nuclear magnetic resonance spectroscopy with single spin sensitivity.*Nat. Commun.***5**, 4703 (2014). - 11.
Lovchinsky, I.

*et al.*Nuclear magnetic resonance detection and spectroscopy of single proteins using quantum logic.*Science***351**, 836–841 (2016). - 12.
Cai, J., Retzker, A., Jelezko, F. & Plenio, M. B. A large-scale quantum simulator on a diamond surface at room temperature.

*Nat. Phys.***9**, 168–173 (2013). - 13.
Kolkowitz, S., Unterreithmeier, Q. P., Bennett, S. D. & Lukin, M. D. Sensing distant nuclear spins with a single electron spin.

*Phys. Rev. Lett.***109**, 137601 (2012). - 14.
Taminiau, T. H.

*et al.*Detection and control of individual nuclear spins using a weakly coupled electron spin.*Phys. Rev. Lett.***109**, 137602 (2012). - 15.
Zhao, N.

*et al.*Sensing single remote nuclear spins.*Nat. Nanotechnol.***7**, 657–662 (2012). - 16.
London, P.

*et al.*Detecting and polarizing nuclear spins with nuclear double resonance on a single electron spin.*Phys. Rev. Lett.***111**, 067601 (2013). - 17.
Sushkov, A. O.

*et al.*Magnetic resonance detection of individual proton spins using quantum reporters.*Phys. Rev. Lett.***113**, 197601 (2014). - 18.
Mamin, H. J.

*et al.*Nanoscale nuclear magnetic resonance with a nitrogen-vacancy spin sensor.*Science***339**, 557–560 (2013). - 19.
Staudacher, T.

*et al.*Nuclear magnetic resonance spectroscopy on a (5-nanometer)^{3}sample volume.*Science***339**, 561–563 (2013). - 20.
Yang, W., Wang, Z.-Y. & Liu, R.-B. Preserving qubit coherence by dynamical decoupling.

*Front. Phys.***6**, 2–14 (2011). - 21.
Casanova, J., Wang, Z.-Y., Haase, J. F. & Plenio, M. B. Robust dynamical decoupling sequences for individual-nuclear-spin addressing.

*Phys. Rev. A***92**, 042304 (2015). - 22.
Wang, Z.-Y., Haase, J. F., Casanova, J. & Plenio, M. B. Positioning nuclear spins in interacting clusters for quantum technologies and bioimaging.

*Phys. Rev. B***93**, 174104 (2016). - 23.
Laraoui, A.

*et al.*High-resolution correlation spectroscopy of^{13}C spins near a nitrogen-vacancy centre in diamond.*Nat. Commun.***4**, 1651 (2013). - 24.
Loretz, M.

*et al.*Spurious harmonic response of multipulse quantum sensing sequences.*Phys. Rev. X***5**, 021009 (2015). - 25.
Haase, J. F., Wang, Z.-Y., Casanova, J. & Plenio, M. B. Pulse-phase control for spectral disambiguation in quantum sensing protocols.

*Phys. Rev. A***94**, 032322 (2016). - 26.
Staudacher, T.

*et al.*Probing molecular dynamics at the nanoscale via an individual paramagnetic centre.*Nat. Commun.***6**, 8527 (2015). - 27.
Kong, X.

*et al.*Towards chemical structure resolution with nanoscale nuclear magnetic resonance spectroscopy.*Phys. Rev. Appl.***4**, 024004 (2015). - 28.
Souza, A. M., Álvarez, G. A. & Suter, D. Robust dynamical coupling.

*Phil. Trans. R. Soc. A***370**, 4748–4769 (2012). - 29.
Farfurnik, D.

*et al.*Optimizing a dynamical decoupling protocol for solid-state electronic spin ensembles in diamond.*Phys. Rev. B***92**, 060301 (R) (2015). - 30.
Cai, J.-M., Jelezko, F., Plenio, M. B. & Retzker, A. Diamond based single molecule magnetic resonance spectroscopy.

*New J. Phys.***15**, 013020 (2013). - 31.
Ma, W.-L. & Liu, R.-B. Angstrom-resolution magnetic resonance imaging of single molecules via wave-function fingerprints of nuclear spins.

*Phys. Rev. Appl.***6**, 024019 (2016). - 32.
Maurer, P. C.

*et al.*Room-temperature quantum bit memory exceeding one second.*Science***336**, 1283–1286 (2012). - 33.
Yang, S.

*et al.*High-fidelity transfer and storage of photon states in a single nuclear spin.*Nat. Photon.***10**, 507–511 (2016). - 34.
Zhao, N., Hu, J.-L., Ho, S.-W., Wan, J. T. K. & Liu, R.-B. Atomic-scale magnetometry of distant nuclear spin clusters via nitrogen-vacancy spin in diamond.

*Nat. Nanotechnol.***6**, 242–246 (2011). - 35.
Shi, F. Z.

*et al.*Sensing and atomic-scale structure analysis of single nuclear-spin clusters in diamond.*Nat. Phys.***10**, 21–25 (2014). - 36.
Cramer, J.

*et al.*Repeated quantum error correction on a continuously encoded qubit by real-time feedback.*Nat. Commun.***7**, 11526 (2016). - 37.
Zhao, N., Ho, S.-W. & Liu, R.-B. Decoherence and dynamical decoupling control of nitrogen vacancy centre electron spins in nuclear spin baths.

*Phys. Rev. B***85**, 115303 (2012). - 38.
Michal, C. A., Hastings, S. P. & Lee, L. H. Two-photon Lee-Goldburg nuclear magnetic resonance: simultaneous homonuclear decoupling and signal acquisition.

*J. Chem. Phys.***128**, 052301 (2008). - 39.
Fuchs, G. D., Dobrovitski, V. V., Toyli, D. M., Heremans, F. J. & Awschalom, D. D. Gigahertz dynamics of a strongly driven single quantum spin.

*Science***326**, 1520–1522 (2009). - 40.
Casanova, J., Wang, Z.-Y. & Plenio, M. B. Noise-resilient quantum computing with a nitrogen-vacancy center and nuclear spins.

*Phys. Rev. Lett.***117**, 130502 (2016). - 41.
Jiang, L.

*et al.*Coherence of an optically illuminated single nuclear spin qubit.*Phys. Rev. Lett.***100**, 073001 (2008). - 42.
Unden, T.

*et al.*Quantum metrology enhanced by repetitive quantum error correction.*Phys. Rev. Lett.***116**, 230502 (2016). - 43.
Widmann, M.

*et al.*Coherent control of single spins in silicon carbide at room temperature.*Nat. Mater.***14**, 164–168 (2015). - 44.
Dehollain, J. P.

*et al.*Bell’s inequality violation with spins in silicon.*Nat. Nanotechnol.***11**, 242–246 (2016). - 45.
Maze, J. R., Taylor, J. M. & Lukin, M. D. Electron spin decoherence of single nitrogen-vacancy defects in diamond.

*Phys. Rev. B***78**, 094303 (2008).

## Acknowledgements

This work was supported by the Alexander von Humboldt Foundation, the ERC Synergy grant BioQ, the EU projects DIADEMS, and EQUAM as well as the DFG via the SFB TRR/21. We thank Thomas Unden and Fedor Jelezko for discussions. Simulations were performed on the computational resource bwUniCluster funded by the Ministry of Science, Research and the Arts Baden-Württemberg and the Universities of the State of Baden-Württemberg, Germany, within the framework program bwHPC.

## Author information

## Affiliations

### Institut für Theoretische Physik and IQST, Universität Ulm, Albert-Einstein-Allee 11, D-89069 Ulm, Germany

- Zhen-Yu Wang
- , Jorge Casanova
- & Martin B. Plenio

## Authors

### Search for Zhen-Yu Wang in:

### Search for Jorge Casanova in:

### Search for Martin B. Plenio in:

### Contributions

Z.-Y.W., J.C. and M.B.P. conceived the idea. Z.-Y.W. carried out the simulations and analytical work with input from J.C. and M.B.P. All authors discussed extensively on the results and contributed to the manuscript.

### Competing interests

The authors declare no competing financial interests.

## Corresponding authors

Correspondence to Zhen-Yu Wang or Jorge Casanova or Martin B. Plenio.

## Supplementary information

## PDF files

- 1.
### Supplementary Information

Supplementary Figures, Supplementary Notes and Supplementary References.

- 2.
### Peer Review File

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.

This work is licensed under a Creative Commons Attribution 4.0 International License. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in the credit line; if the material is not included under the Creative Commons license, users will need to obtain permission from the license holder to reproduce the material. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/