Abstract
High spatial resolution quantum sensing of near-surface nitrogen vacancy (NV) centers in diamond has enabled detection of magnetic, electrical, and thermal signals at the nanoscale. At depths of just a few nanometers, NV centers serve as localized quantum probes for external spins or low-dimensional materials, but their proximity to the surface also enhances decoherence caused by fluctuating nuclear spins. While advances in surface engineering have stabilized the charge state of NV centers at depths of tens of nanometers, achieving both ultra-shallow implantation (0.5-2 nm) and long-term spin coherence remains a central challenge. In this work, we show using first-principles modeling that, by exploiting the interaction of surface-induced strain and weak dc magnetic fields, the spin coherence times of 1-nm-deep NV centers can be greatly improved near the spin-phonon-confined regime at room temperature in 12C-rich diamonds. We also demonstrate that this protocol benefits ~ 10-nm-deep NV centers in natural diamond, enabling vector magnetometry at the nanoscale.
Introduction
Quantum sensors utilizing NV− centers in diamond have the potential to revolutionize nuclear magnetic resonance (NMR) spectroscopy and quantum magnetometry1,2,3,4,5,6,7,8,9,10. However, their effectiveness hinges on optimizing the distance of NV− centers from surfaces while maintaining qubit state control, both crucial for enhancing the signal-to-noise ratio. The strength of NV-NMR signal diminishes with the cube of the distance to the target spins (d)3, necessitating the placement of NV− centers close to surfaces. However, shallow NV− centers (5-15 nm from the surface) often exhibit reduced Hahn-echo coherence times (T2), which critically impacts spectral resolution11. This arises from electrical and magnetic interactions with the surrounding charges and spins. Controlled interfacial band bending can mitigate electric noise and stabilize the negative charge state of NV− centers12,13,14; critical for very shallow NV− centers susceptible to converting to the neutral NV0 state15. The challenge of residual magnetic noise remains.
A promising approach to address magnetic noise involves operating in specific magnetic fields, where the qubit levels are protected from magnetic fluctuations, also known as clock transitions16. Achieving this requires a finite transverse zero-field splitting, which is difficult for NV− centers due to their inherent symmetry. Previous attempts to harness this technique for shallow NV− centers have yielded only limited success. Specifically, an enhancement of the free-induction decay time (\({T}_{2}^{ * }\)) for NV− centers located deeper within high-quality diamond (~15 nm) was reported, yet the effect vanished at nanoscale17. Similarly, only a modest increase in \({T}_{2}^{ * }\) time associated with a hyperfine level anti-crossing in nanopillars was observed18. They further demonstrated that a bias field created by adjacent 13C nuclear spins could shift the avoided crossing to higher fields, offering a potential avenue for AC magnetometry. Concurrently, the use of spin dyads—which involve the coupled electronic spins of NV− and P1 centers—has shown promise in enhancing coherence times through analogous mechanisms19,20. However, no strategy has convincingly demonstrated a clear advantage for ultra-shallow NV− centers.
In parallel, a distinct challenge in quantum magnetometry is the need to ascertain the complete vector of the target magnetic field, rather than merely its projection onto the NV− quantization axis. To address this issue, various strategies have been proposed, primarily involving multiple NV− centers or the coupling of electronic spins of NV− centers to surrounding nuclear spins21,22. While these approaches have demonstrated success, they often require specific configurations of nuclear and electronic spins within the sample, which can be difficult to control experimentally. Alternative schemes have also been explored, including those leveraging optical vortex technique23, and this area of research is currently under active development.
In this study, we investigate the coherence times of ultra-shallow NV− centers, focusing on their manipulation through applied magnetic fields. Our theoretical analysis reveals that surface strain is crucial for optimizing conditions that protect qubit states from magnetic noise, allowing high coherence times even at distances as close as 1 nm from the surface. Experimentally, we observe that surface strain enhances coherence in shallow NV− centers, linked to a hyperfine level anti-crossing. These findings have important implications for quantum sensing, suggesting that minor adjustments to the external magnetic field can substantially improve the signal-to-noise ratio. Moreover, we found that the measured \({T}_{2}^{ * }\) coherence times exhibit asymmetry due to directional residual fields, which holds promise for advancing vector magnetometry techniques.
Results
Suppression of magnetic noise close to the diamond surface
We begin our investigation with a theoretical analysis of how the surface affects electronic and magnetic properties of the NV− center. To this end, we performed DFT calculations on a large (001) slab of diamond featuring a 2 × 1 surface reconstruction pattern, see Fig. 1. Two surface terminations were considered: a fluorinated surface and a mixed fluorine-hydrogen termination with a ratio of 70–30%. This selection is based on recent advances in the modification of the diamond surface by wet chemistry24 and previous work on plasma treatment of the diamond surface25. Our previous (theoretical) study indicated that both terminations stabilize the negative charge state due to positive electron affinity24. In our calculations, we varied the distance of the NV− center from the surface and closely monitored changes in the electronic structure and transverse zero-field splitting (ZFS) parameters, E.
a Schematic representation of (001) diamond slab of ~2.1 × 2.1 × 4.5 nm3 used in DFT simulations. The bottom panel shows the 2 × 1 surface reconstruction. b Electronic structure of the NV− center in bulk (left) and close to the surface (right). c E-splitting as a function of NV− depth.
For NV− centers situated near the surface, we observed the lifting of e-orbital degeneracy, yielding an energy splitting of up to 20 meV. As depicted in Fig. 1c, this symmetry-breaking resulted in a calculated E-value that attained a local maximum of ~30 MHz at ~9 Å (see Supplementary Note 1 for details). Importantly, this effect was consistent between both surface types, leading to substantially larger E-values compared to those reported for the (N, H)-terminated (111) surface26. It should be noted that the fluorine-terminated diamond exhibits a shallow acceptor surface state at ~0.1 eV below the conduction band minimum, which is absent in the F/H-termination case. As the NV− center approaches this surface state, no further increase in E-value was observed. In contrast, for the mixed termination case, the absence of surface states facilitates an even greater maximum E-value of ~40 MHz.
To illustrate the formation of avoided crossings in the presence of finite E-splitting, we further consider a typical scenario of a (001) diamond with shallowly implanted 15NV centers. The hyperfine energy level structure of the NV− center interacting with 15N and one or three 13C nuclear spins is shown in Fig. 2. Due to the hyperfine interaction with the nitrogen spin, at zero magnetic field, a gap opens between the pairs of states \(\left\vert {m}_{{{\rm{S}}}},{m}_{{{\rm{N}}}}\right\rangle \in \left\{\left\vert+1,\uparrow \right\rangle,\left\vert -1,\downarrow \right\rangle \right\}\) and \(\left\{\left\vert+1,\downarrow \right\rangle,\left\vert -1,\uparrow \right\rangle \right\}\), where former is the higher while latter is the lower in energy. Applying a small magnetic field along an axis splits the electron spin eigenstates according to the parallel component \({g}_{e}{\mu }_{B}{B}_{z}={g}_{e}{\mu }_{B}\cos {\theta }_{0}{B}_{0}\) of the applied magnetic field where θ0 is the polar angle between B0 and the NV symmetry axis. Similarly, the coupling between the nuclear spin of a nearby carbon and the electron spin of the NV− splits the following state pairs, from higher to lower energies: \(\left\{\left\vert+1,\uparrow,\uparrow \right\rangle,\left\vert -1,\downarrow,\downarrow \right\rangle \right\}\), \(\left\{\left\vert+1,\uparrow,\downarrow \right\rangle,\left\vert -1,\downarrow,\uparrow \right\rangle \right\}\), \(\left\{\left\vert+1,\downarrow,\uparrow \right\rangle,\left\vert -1,\uparrow,\downarrow \right\rangle \right\}\), \(\left\{\left\vert+1,\downarrow,\downarrow \right\rangle,\right.\left.\left\vert -1,\uparrow,\uparrow \right\rangle \right\}\). The nonzero transverse zero-field splitting mixes the \(\left\vert+1\right\rangle \) and \(\left\vert -1\right\rangle \) states of the electron spin, leading to multiple avoided crossings (clock transitions) at magnetic field values determined by the energy-level splittings described above, more precisely by the Azz components of the hyperfine matrices, scaled by \({A}_{zz}/\cos {\theta }_{0}\). These clock transitions give rise to coherence-protected subspaces, where the system is immune to first-order magnetic field fluctuations. As additional weakly coupled 13C spins are introduced, several closely spaced splits and clock transitions appear, resulting in an energy level structure that incorporates the unique signatures of each nuclear spin interacting with the NV− center.
a–c Coupling of the electron spin to the 15N and a nearby 13C nuclear spin close to zero magnetic fields with a polar angle θ0 = 60∘. The abscissa of all figures shows the total magnitude of the applied magnetic field. A transverse zero-field splitting of E = 1.25 MHz is applied to mimic the effect of the surface. a, b Depict the case when there is 0 and 1 13C nuclear spin coupled to the NV− center. Shift of position of the level avoided crossings induced by the E splitting is proportional to the Azz hyperfine coupling term. c Shows multiple closely positioned splits due to two additional weakly coupled 13C nuclear spins. d Calculated free induction decay time curves of the NV− center as a function of applied magnetic fields for different values of the E-splitting. e Calculated T2 time as a function of distance from the surface for a shallow NV center at selected magnetic fields. f Comparison between the T2 curves computed for the NV centers in fluorinated and mixed terminations.
To understand the potential impact of E-splitting on the coherence properties of NV− centers and DC magnetic sensing, we conducted spin-dynamics simulations using 13C hyperfine and ZFS parameters from our bulk DFT calculations. The dependence of \({T}_{2}^{ * }\) coherence time on the magnitude of transverse zero-field splitting and applied axial magnetic field can be seen in Fig. 2d. When the E-splitting reaches a value larger than the Azz value of the strongest coupled nuclear spin, the coherence time increases by orders of magnitude at the magnetic field values of the clock transitions, see Fig. 2a–c. In this regime, the larger the E-splitting, the longer the coherence time. Supplementary Note 2 contains additional results and an in-depth analysis of the parameter dependence of the free induction decay time.
To further comprehend the impact of E-splitting on the coherence properties of NV− centers, we study the evolution of spin-echo T2 time as a function of the applied magnetic field (B0) with and without transverse zero-field splitting. In bulk diamond (where E is zero), T2 time shows a smooth increase, plateauing at high magnetic fields27 (c.f. Supplementary Fig. 1a). At low magnetic fields, the dominant source of magnetic noise is the precession of the 13C nuclear spins induced by the electron spin27,28. This noise is suppressed by the Zeeman splitting of the nuclear spins within the Bz ∈ [3, 100] Gauss transition interval. At higher magnetic fields, Hahn-echo decoherence is instead dominated by a different mechanism, i.e. the flip-flop interactions between nuclear spins. The E-splitting introduces a sharp peak at the level anti-crossing close to B = 0 G, where higher E-values increase T2 and extend the range of magnetic fields over which this effect persists (see Supplementary Fig. 1b).
Figure 2e shows the calculated T2 times for the NV centers in fluorinated 12C enriched diamonds as a function of depth in various magnetic fields. As NV centers approach the surface, their interaction with surface (nuclear) spins substantially reduces T2 times compared to bulk values for B = 100 Gauss and B = 1000 Gauss. However, the T2 values remain stable at the clock transition (c.f. Fig. 2e, f). We observe a drop in the T2 values due to the decreasing value of the E splitting calculated. Our simulations suggest that an optimal balance between high coherence time and implantation depth occurs when the NV− center is about 12 Å from the surface, predicting a six-fold increase in T2 time compared to high magnetic fields. Notably, mixed termination yields even longer coherence times at the clock transition, with the maximum T2 time of ~1 ms, which closely approaches the value for the bulk NV− center. This enhancement is due to the differing gyromagnetic ratios of the hydrogen and fluorine nuclear spins, which decouple the two spin baths. Similar phenomena have been reported in the diatomic silicon carbide (SiC)29 and hexagonal boron nitride hosts28.
Near surface NV− centers in diamond nanopillars
After discussing our first theoretical findings, we now present experimental results demonstrating how specific magnetic fields enhance coherence time in Ramsey interferometry for the currently available near-surface NV centers with natural abundance of carbon isotopes in diamond. We identified two shallow NV− centers, NV1 and NV2, within a diamond nanopillar, confirmed by the antibunching observed in the g(2)-function measurements (c.f. Fig. 3a) that are located at around 8 nm deep from the surface (see also Methods). The continuous-wave optically detected magnetic resonance (cw ODMR) spectrum shows doublet peaks for these centers, with a peak splitting of 3.1 MHz attributed to hyperfine interaction with the nuclear spin of 15N30. Comparing simulations with experimental ODMR spectra revealed an E-splitting of 0.65 MHz and an angle of θ0 = 61.3 degrees between the external magnetic field (10 G) and the symmetry axis of NV1. We measured the π-pulse width to be 1 μs using a Rabi pulse sequence (c.f. Fig. 3c), and the typical Ramsey spectrum for NV1 together with the pulse scheme are shown in Fig. 3d.
a g (2)-function. b cw ODMR spectrum where the angle θ0 = 61.3 degrees between B0 and the symmetry axis of the NV center. The red line shows the simulation performed using the EasySpin package. c The measured Rabi oscillation simulated by a cosine function with an exponential decay with time \({T}_{2}^{Rabi}\) (red curve). d The measured Ramsey oscillations at B0 = −1.8 G simulated by a cosine function with exponential decay with time \({T}_{2}^{*}\) (red curve). The inset in b–d shows the measurement protocol.
Given the theoretical results in Fig. 2 and taking into account the inclination of the NV− center in (100) diamond relative to the applied magnetic field B0, the avoided crossing should be expected at ~1.1 G (\({B}_{0}^{z} \sim 0.55\) G), which corresponds to half of the 15N hyperfine constant. The ODMR spectra (Fig. 3b) show no visible splitting due to nearby 13C nuclear spins. Therefore, we expect avoided crossings to appear as multiple closely positioned splits (c.f. Fig. 2d). Additionally, a magnetic environment including Earth’s field acts as a bias field of ~0.45 G (Br), further shifting clock transition positions relative to B0 = 0 G. Note that our theoretical \({T}_{2}^{ * }\) curves set a new upper limit that surpasses all previously reported experimental values (e.g. 5–12 μs31)—provided that (i) the transverse splitting E is driven to ~32 MHz (e.g., via surface proximity or engineered strain), (ii) the sample exhibits near-perfect isotopic purity and minimal electric-field noise, and (iii) only nuclear-spin bath decoherence is operative. In practice, electric-field fluctuations and surface spins in standard CVD diamonds may reduce the experimental \({T}_{2}^{ * }\) well below these idealized curves.
We proceed by exploring the coherence properties of the NV− centers in nanopillars in the vicinity of the avoided crossing regions. The time evolution of the qubit state shows the oscillations that are driven by a single frequency, corresponding to a detuning of 1 MHz from the nearest hyperfine line. For NV1, the measured magnetic field dependence of \({T}_{2}^{ * }\) coherence time displays a complex behavior, particularly within the ±1 G range (see Fig. 4a). The expected features at the avoided crossings are not pronounced for this NV− center, which we attribute to the small E-value of 0.65 MHz (see Fig. 4a). However, several peaks and dips are discernible against a noisy constant background.
Measured \({T}_{2}^{*}\) times as a function of the applied magnetic field a for NV1 and c for NV2. The energy level structures (F) for b NV1 and d NV2, derived from the positions of the maxima in the cw ODMR spectra. The solid lines represent simulations based on the indicated zero-field splitting parameters, while splits due to distant spins are omitted for clarity. B0 is the applied magnetic field generated by the coil. The curves are shifted from the zero magnetic field by 0.4 G for NV1 and by 0.5 G for NV2 due to the projection of the biasing magnetic field onto the NV-axis.
To theoretically support our measurements, we perform CCE-1 free induction decay simulations by taking into account the conditions of the measurements, including (i) the angle of the applied magnetic field and the symmetry axis of the center; (ii) the presence of the residual magnetic field of Earth; and (iii) the presence of a small transverse zero-field splitting. To account for the hyperfine shift and splitting of the clock transitions, we consider two strongly coupled nuclear spins, the 15N of the NV− center with resolvable hyperfine splitting (see Fig. 3b) and a 13C, which is adjacent to the nitrogen. To accurately model relevant dynamics, we go beyond the standard CCE-1 method by including three spins, the electron spin and the 15N and 13C nuclear spins in the central core of the system, and four spins in each subsystem of the first-order expansion of the weakly coupled bath of farther 13C nuclear spins. Bath spin lattice positions are selected randomly, with the constraint that their \({A}_{zz}^{({{\rm{bath}}})}\) hyperfine coupling terms are smaller than the \({A}_{zz}^{(C)}\) coupling term of the 13C nuclear spin in the central spin system. This ensures that the 13C nucleus included in the central system is the most strongly coupled carbon spin and that the bath does not cause resolvable hyperfine splittings in the energy spectrum, similarly to our experimental observations.
Similarly to our experiments, we observe a complex structure with multiple sharp peaks and dips standing out from an overall constant magnetic field dependence of the \({T}_{2}^{ * }\) curve, see Supplementary Fig. 2. We note that the features are connected to the zero-magnetic field region and they are absent at higher fields. The peaks and dips are centered around the clock transitions and B0 = 0 G. Details of the curve, such as the baseline of the \({T}_{2}^{ * }\) plot as well as heights and depths in the curve act as unique fingerprints of the arrangement of the surrounding 13C bath (beyond the hyperfine resolved close 13C), which we selected randomly in our simulations. Considering the baseline, we observe that the distribution of the \({T}_{2}^{ * }\) values extends in the interval of ~1 μs and ~4 μs with a maximum around ~2 μs. Our findings thus suggest that the nuclear spin bath and the induced quasi-static magnetic field fluctuation are the dominant sources of decoherence in our experiments. However, a large enhancement of the \({T}_{2}^{ * }\) values at clock transitions for the NV1 center is neither observed in the experiment nor in the simulations, due to the comparable value of the E-splitting (0.65 MHz) and the hyperfine splitting of a close 13C nuclear spin, see Supplementary Notes 2 and 3.
To further comprehend the decoherence of NV− centers in nanopillars, we study yet another center named NV2. The magnetic field dependence of the ODMR spectrum for the NV2 center is illustrated in Fig. 4c. Compared to NV1, this center exhibits a substantially larger E value of 1.25 MHz. Furthermore, Fig. 4 shows that the \({T}_{2}^{ * }\) time reduces to 1 μs on average across all fields, except at (one of the) clock transitions, which corroborates our theoretical predictions. The combination of these two factors leads us to conclude that NV2 is located closer to the surface than NV1. Consequently, the peaks at the level anti-crossing become more pronounced for NV2. The observed peak splitting near B0 ~1.5 G can be attributed to the presence of another closely coupled 13C spin, with a hyperfine coupling constant of ~0.6 MHz, which falls below the resolution of ODMR measurements. Importantly, the \({T}_{2}^{ * }\) time at the avoided crossing, reaching 1.8 μs, is the longest observed across all studied magnetic fields within the range of ±100 G.
As shown in Supplementary Fig. 4, our calculations for the NV2 center also confirm the maximum of the \({T}_{2}^{ * }\) time at the avoided crossing. Furthermore, we highlight the detrimental role of 13C nuclear spins with coupling strength comparable to the transverse zero-field splitting, which are responsible for a two-fold decrease of the coherence time at the clock transition. Indeed, in the absence of 13C nuclear spins, the nitrogen nuclear spin is always present, but does not hinder coherence time enhancements. We attribute the distinct effect of nuclear spins on the \({T}_{2}^{ * }\) time to two factors: the off-diagonal pseudo-secular Hamiltonian coupling terms arising from nonzero Axz and Ayz hyperfine terms, and the increased system dimensionality, giving rise to multiple clock transitions of decreasing relevance. For completeness, we also explored various combinations of E-values and hyperfine constants in the Hamiltonian, as well as the impact of different hyperfine coupling terms, with the results summarized in Supplementary Notes 2 and 3.
Most strikingly, the pronounced asymmetry in the \({T}_{2}^{ * }\) time as a function of the magnetic field B is consistently observed across all our calculations for E > 1 MHz, irrespective of the spin-bath composition, see Supplementary Figs. 5 and 6. The primary origin of this effect lies in the difference between the magnitudes of transverse magnetic field components (\(\left\vert {B}_{\perp }\right\vert \)) at the different clock transition regions. Combined with the \({A}_{xx}{\hat{S}}_{x}{\hat{I}}_{x}\) and \({A}_{yy}{\hat{S}}_{y}{\hat{I}}_{y}\) hyperfine spin-flipping terms between the electron and nitrogen spin, these components induce mixing between eigenstates \(\left\vert 1\downarrow \right\rangle \leftrightarrow \left\vert 0\uparrow \right\rangle \) and \(\left\vert -1\uparrow \right\rangle \leftrightarrow \left\vert 0\downarrow \right\rangle \) of the NV center, see Supplementary Note 3. This effect diffuses the coherence-protected regions of clock transitions by transforming the coherent spin state corresponding to the avoided crossing into a state much more sensitive to magnetic field fluctuations along the NV-axis. The frequency of this transition depends linearly on \(\left\vert {B}_{\perp }\right\vert \); thus, when the relative azimuthal angle of the applied magnetic field and the biased magnetic field (φ in Fig. 5a) is 180°, the field vectors are collinear and \(\left\vert {B}_{\perp }\right\vert \) is the same for both clock transition regions. Therefore, the curve is symmetric under this condition. In turn, the difference in \(\left\vert {B}_{\perp }\right\vert \) and consequently the asymmetry is maximal for the case when φ = 0°. Numerically, the strength of this effect is amplified at higher E-values, indicating that \({T}_{2}^{ * }\) times can be optimized by carefully controlling the orientation of both fields.
a Illustration of magnetic field orientations relative to the NV− center and its neighboring carbon atoms. The z-axis corresponds to the symmetry axis of the NV center, B0 and Br denote the applied and Earth’s residual magnetic field, respectively. The dashed lines lay in the plane perpendicular to the z-axis. For our simulations θ0 = 60∘ and θr = 120∘. The latter is calculated from the shift of the experimental energy level spectra from B0 = 0 G. b Calculated curves of free induction decay time as a function of small applied magnetic fields for the case E = 15 MHz. φ denotes the relative azimuthal angle between the applied and Earth’s residual magnetic field.
Surprisingly, the maximum coherence time for a given NV− center is achieved when B0 is antiparallel with the target field rather than it is aligned with the NV− axis, see Fig. 5b. This finding opens interesting possibilities for vector magnetometry. Specifically, following an increase in \({T}_{2}^{ * }\) at the avoided crossing upon rotating the applied magnetic field, the maximum \({T}_{2}^{ * }\) value would indicate the configuration when both fields are aligned, corresponding to \({B}_{0}\parallel ({B}_{r}^{x},{B}_{r}^{y},{B}_{r}^{z})\). The accurate magnitude of \({B}_{r}^{z}\) can be determined from the shift of positions of avoided crossings, see Figs. 2 and 4b, d. We anticipate that this straightforward approach might facilitate the determination of complete vectors of target fields, and is applicable to most of single shallow NV− centers without the need for special techniques.
Discussion
High spatial resolution quantum sensing with near-surface NV centers represents a rapidly advancing class of applications, where the NV-to-sample distance plays a critical role. Unlike quantum networking or bulk material sensing, which typically employ NV centers tens of nanometers below the surface32,33, nanoscale sensing requires NVs positioned within just a few nanometers of the diamond surface34,35. At these shallow depths, NV centers function as highly localized quantum probes for detecting magnetic, electric, or thermal signals from nearby targets such as two-dimensional materials, biological molecules, or ions in solution. Magnetic dipole detection depends strongly on dipolar coupling, which decays rapidly with distance, making shallow implantation essential for detecting weak external signals from single electronic or even nuclear spins36,37,38.
In this paper, we theoretically investigated ultra-shallow NV centers and worked out coherence protection mechanisms relying on strain induced by the surface. We identified specific magnetic fields at certain strain levels that protect the qubit states of NV− centers from magnetic noise. The precise values of these fields depend on the implantation depth, which defines the strain, and the magnetic environment, which induces a shift of the clock transitions. Minor adjustments to the external magnetic field, typically around 0.5 G, can substantially enhance coherence for shallow NV− centers. Our experimental demonstrations on single NV− centers in a diamond nanopillar validate these predictions, showing a 2.4-fold enhancement in coherence time for the NV− center. Furthermore, our calculations indicate that using mixed fluorine/hydrogen surface terminations can further enhance coherence by reducing surface states and magnetic interaction among similar atoms, especially when the applied and bias fields are aligned.
These findings provide the design rules for quantum sensors with potentially improved signal-to-noise ratios and applications in vector magnetometry. Furthermore, combining the optimization of photo-excitation for reducing spectral diffusion39 and external magnetic fields for elongating the coherence times may lead to superior NV-based spin-photon interfaces, engineered into diamond nanopillars.
Methods
Theory
The density functional theory calculations were performed by the VASP code40,41 using a plane wave basis. Projector augmented wave (PAW) potentials42,43 were used with a cutoff energy of 400 eV. A 2447-atom supercell model of 21.4020 × 21.4020 × 45.4020 Å3 diamond slab was constructed to avoid the interactions of defect with its periodic images and to apply the Γ-point sampling scheme. The geometry optimization and calculation of electronic properties were performed with the PBE functional. The convergence threshold for the forces was set to 0.01 eV/Å.
In the calculations, we computed both \({T}_{2}^{ * }\) and T2 times as a function of applied field and surface proximity. Note that \({T}_{2}^{ * }\) is the dephasing time, measuring how long an unrefocused qubit (or ensemble) maintains phase coherence in the presence of quasi-static field offsets, whereas T2 is the coherence time, representing the ultimate limit once those offsets are refocused by echo pulses. Simulations of free induction decay of NV− centers were performed using the first-order generalized cluster correlation expansion (gCCE-1) method with an extended zero-order subsystem of three spins. The spin bath contains 13C nuclear spins of natural abundance within a cutoff radius of rbath = 30 Å. To uncover unique features in coherence dynamics, we do not average over randomized bath configurations and instead study the dependence on specific spin distributions, see Supplementary Note 4.
The Hamiltonian used to model the system, consisting of a central electron spin and the surrounding nuclear spin bath, takes the following form:
where \({\hat{H}}_{e-b}\) is the interaction Hamiltonian describing hyperfine couplings between the NV− and its environment. \({\hat{H}}_{e}\) and \({\hat{H}}_{b}\) are the separated electron spin and bath Hamiltonians, encoding the zero-field splitting of the NV− center, the Zeeman-interaction, and the magnetic dipolar interaction of nuclear spins, respectively. Note that accurate hyperfine tensors for the 13C nuclear spins were derived from first-principles calculations, avoiding finite-size effects44.
In order to numerically study the Hahn-echo coherence time of bulk and near-surface NV centers in diamond, we implemented the second order generalized cluster correlation expansion method (gCCE-2)45,46,47. Coherence time calculations in bulk models were carried out by considering a 13C nuclear spin bath with natural abundance. The simulations included ~1000 first order subsystems and ~2000 second-order subsystems, i.e., the convergent cut-off radii were set to rbath = 50 Å and rdip = 8 Å (see ref. 47).
In our calculations for slab models, we took into account only the spin bath of the termination due to 19F and 1H nuclear spins. We used rbath = 30 Å and rdip = 6 Å cut-off radii that defined 300–400 first-order subsystems and 3000–4000 second-order subsystems depending on the distance of the NV center from the surface. In all cases, we carried out averaging by taking 25 random initial state for the spin bath. The nitrogen nuclear spin of the NV center was neglected in our simulations. As a consequence, the level avoided crossing due to the transverse zero field interaction appears a zero magnetic field. In physical samples, the position of the avoided crossing is shifted as demonstrated by our measurements. Accurate hyperfine tensors for the 13C nuclear spins were obtained from finite-size effect free first principles calculation using the method developed in ref. 44.
Experiment
To locate a shallow single NV− center in diamond with a natural abundance of carbon isotopes, we used a specialized enhanced single NV array with a pillar structure containing 15N isotopically substituted NV− centers. According to the provider (QZabre), the nitrogen implantation energy used for the creation shallow NV centers was 7 keV, which corresponds to an average NV depth of approximately 8–10 nm based on stopping and range of ions in matter (SRIM) simulations48. ODMR measurements were performed using a home-built confocal setup with a 520 nm laser (10 mW). Emission up to 700 kCs/s/center was collected through a 0.9 NA Carl Zeiss objective, filtered with a 650-nm long-pass filter, and focused into a 50:50 fiber optic coupler (Thorlabs TW670R5F1) serving as both a pinhole and beam splitter for two APD detectors (Excelitas SPCM-AQRH-44), which generated 10 ns TTL pulses for data acquisition via a Time Tagger Ultra (Swabian Instruments) module. The detectors were employed for g (2)-function measurements (Hanbury-Brown-Twiss interferometry). The microwave field was generated by a microwave source (WindFreak SynthNV) together with a high-power amplifier (Mini-Circuits ZHL-16W-43+), a Mini-Circuits ZASWA-2-50DRA+ switch, and a microwave stripped antenna located under the sample. The resulting microwave power was 40 dBm. The scheme of the setup can be found in Supplementary Note 5.
The relaxation time \({T}_{2}^{ * }\) was measured using the Ramsey pulse sequence. NV− centers were initially polarized to the ms = 0 state with a 4 μs optical pulse. A microwave pulse train π/2 ⟶ τ ⟶ π/2 was applied, followed by a second optical pulse with variable duration τ to readout the spin state. A 3 μs pulse gated the timer tagger input at the start of the second optical pulse, and an identical pulse normalized the first. A similar protocol was used for Rabi measurements, replacing the microwave sequence with a single τ-pulse while scanning the pulse duration value τ. Pulse sequences were managed by Pulse Streamer 8/2 (Swabian Instruments), with all ODMR signals recorded at room temperature (297 K). An external magnetic field was applied perpendicularly to the diamond surface using a Helmholtz coil, producing a homogeneous magnetic field of ±100 G, controlled by a high-precision power supply (Keithley 2280S-32-6).
Data availability
The main data supporting the findings of this study are available within the article and its Supplementary Figs. The source data underlying Figs. 1–5 are provided as a Source Data file. Additional details on datasets and protocols that support the findings of this study will be made available by the corresponding author upon reasonable request. Source data are provided with this paper.
Code availability
The codes that were used in this study are available upon request to the corresponding author.
References
Doherty, M. W. et al. The nitrogen-vacancy colour centre in diamond. Phys. Rep. 528, 1–45 (2013).
Balasubramanian, G. et al. Nanoscale imaging magnetometry with diamond spins under ambient conditions. Nature 455, 648–651 (2008).
Schirhagl, R., Chang, K., Loretz, M. & Degen, C. L. Nitrogen-vacancy centers in diamond: nanoscale sensors for physics and biology. Annu. Rev. Phys. Chem. 65, 83–105 (2014).
Schmitt, S. et al. Submillihertz magnetic spectroscopy performed with a nanoscale quantum sensor. Science 356, 832–837 (2017).
Boss, J. M., Cujia, K. S., Zopes, J. & Degen, C. L. Quantum sensing with arbitrary frequency resolution. Science 356, 837–840 (2017).
Smits, J. et al. Two-dimensional nuclear magnetic resonance spectroscopy with a microfluidic diamond quantum sensor. Sci. Adv. 5, eaaw7895 (2019).
Zhang, T. et al. Toward quantitative bio-sensing with nitrogen-vacancy center in diamond. ACS Sens. 6, 2077–2107 (2021).
Allert, R. D., Briegel, K. D. & Bucher, D. B. Advances in nano- and microscale NMR spectroscopy using diamond quantum sensors. Chem. Commun. 58, 8165–8181 (2022).
Scheidegger, P. J., Diesch, S., Palm, M. L. & Degen, C. L. Scanning nitrogen-vacancy magnetometry down to 350 mK. Appl. Phys. Lett. 120, 224001 (2022).
Aslam, N. et al. Quantum sensors for biomedical applications. Nat. Rev. Phys. 5, 157–169 (2023).
Rosskopf, T. et al. Investigation of surface magnetic noise by shallow spins in diamond. Phys. Rev. Lett. 112, 147602 (2014).
Kim, M. et al. Decoherence of near-surface nitrogen-vacancy centers due to electric field noise. Phys. Rev. Lett. 115, 087602 (2015).
Neethirajan, J. N. et al. Controlled surface modification to revive shallow NV− centers. Nano Lett. 23, 2563–2569 (2023).
Freire-Moschovitis, F. A. et al. The role of electrolytes in the relaxation of near-surface spin defects in diamond. ACS nano 17, 10474–10485 (2023).
Yuan, Z. et al. Charge state dynamics and optically detected electron spin resonance contrast of shallow nitrogen-vacancy centers in diamond. Phys. Rev. Res. 2, 033263 (2020).
Miao, K. C. et al. Universal coherence protection in a solid-state spin qubit. Science 369, 1493–1497 (2020).
Jamonneau, P. et al. Competition between electric field and magnetic field noise in the decoherence of a single spin in diamond. Phys. Rev. B 93, 024305 (2016).
Wang, N. et al. Zero-field magnetometry using hyperfine-biased nitrogen-vacancy centers near diamond surfaces. Phys. Rev. Res. 4, 013098 (2022).
Kong, F. et al. Kilohertz electron paramagnetic resonance spectroscopy of single nitrogen centers at zero magnetic field. Sci. Adv. 6, eaaz8244 (2020).
Meriles, C. A., Zangara, P. R. & Pagliero, D. Quantum sensing via magnetic-noise-protected states in an electronic spin dyad. Adv. Quantum Technol. 2300098 https://doi.org/10.1002/qute.202300098 (2023).
Maertz, B., Wijnheijmer, A., Fuchs, G., Nowakowski, M. & Awschalom, D. Vector magnetic field microscopy using nitrogen vacancy centers in diamond. Appl. Phys. Lett. 96 https://doi.org/10.1063/1.3337096 (2010).
Nizovtsev, A. et al. Vector magnetometry using a single NV–13C complex in diamond. J. Appl. Spectrosc. 89, 1064–1071 (2023).
Chen, B. et al. Calibration-free vector magnetometry using nitrogen-vacancy center in diamond integrated with optical vortex beam. Nano Lett. 20, 8267–8272 (2020).
Rodgers, L. V. et al. Diamond surface functionalization via visible light–driven C–H activation for nanoscale quantum sensing. Proc. Natl. Acad. Sci. USA 121, e2316032121 (2024).
Cui, S. & Hu, E. L. Increased negatively charged nitrogen-vacancy centers in fluorinated diamond. Appl. Phys. Lett. 103 https://doi.org/10.1063/1.4817651 (2013).
Körner, W., Ghassemizadeh, R., Urban, D. F. & Elsässer, C. Influence of (N, H)-terminated surfaces on stability, hyperfine structure, and zero-field splitting of nv centers in diamond. Phys. Rev. B 105, 085305 (2022).
Seo, H. et al. Quantum decoherence dynamics of divacancy spins in silicon carbide. Nat. Commun. 7, 12935 (2016).
Tárkányi, A. & Ivády, V. Understanding decoherence of the boron vacancy center in hexagonal boron nitride. http://arxiv.org/abs/2505.03292. (2025).
Yang, L.-P. et al. Electron spin decoherence in silicon carbide nuclear spin bath. Phys. Rev. B 90, 241203 (2014).
Rabeau, J. et al. Implantation of labelled single nitrogen vacancy centers in diamond using 15N. Appl. Phys. Lett. 88 https://doi.org/10.1063/1.2158700 (2006).
Bauch, E. et al. Ultralong dephasing times in solid-state spin ensembles via quantum control. Phys. Rev. X 8, 031025 (2018).
Du, C. et al. Control and local measurement of the spin chemical potential in a magnetic insulator. Science 357, 195–198 (2017).
Knaut, C. M. et al. Entanglement of nanophotonic quantum memory nodes in a telecom network. Nature 629, 573–578 (2024).
Loretz, M., Pezzagna, S., Meijer, J. & Degen, C. L. Nanoscale nuclear magnetic resonance with a 1.9-nm-deep nitrogen-vacancy sensor. Appl. Phys. Lett. 104, 033102 (2014).
Xu, Z. et al. Minimizing sensor-sample distances in scanning nitrogen-vacancy magnetometry. ACS Nano 19, 8255–8265 (2025).
Staudacher, T. et al. Nuclear magnetic resonance spectroscopy on a (5-nanometer)3 sample volume. Science 339, 561–563 (2013).
DeVience, S. J. et al. Nanoscale NMR spectroscopy and imaging of multiple nuclear species. Nat. Nanotechnol. 10, 129–134 (2015).
Lovchinsky, I. et al. Nuclear magnetic resonance detection and spectroscopy of single proteins using quantum logic. Science 351, 836–841 (2016).
Orphal-Kobin, L. et al. Optically coherent nitrogen-vacancy defect centers in diamond nanostructures. Phys. Rev. X 13, 011042 (2023).
Kresse, G. & Furthmüller, J. Efficiency of ab-initio total energy calculations for metals and semiconductors using a plane-wave basis set. Comput. Mater. Sci. 6, 15–50 (1996).
Kresse, G. & Furthmüller, J. Efficient iterative schemes for ab initio total-energy calculations using a plane-wave basis set. Phys. Rev. B 54, 11169 (1996).
Blöchl, P. E. Projector augmented-wave method. Phys. Rev. B 50, 17953 (1994).
Kresse, G. & Joubert, D. From ultrasoft pseudopotentials to the projector augmented-wave method. Phys. Rev. B 59, 1758 (1999).
Takács, I. & Ivády, V. Accurate hyperfine tensors for solid state quantum applications: case of the NV center in diamond. Commun. Phys. 7, 178 (2024).
Yang, W. & Liu, R.-B. Quantum many-body theory of qubit decoherence in a finite-size spin bath. Phys. Rev. B 78, 085315 (2008).
Onizhuk, M. et al. Probing the coherence of solid-state qubits at avoided crossings. PRX Quantum 2, 010311 (2021).
Haykal, A. et al. Decoherence of \({V}_{{{\rm{B}}}}^{-}\) spin defects in monoisotopic hexagonal boron nitride. Nat. Commun. 13, 4347 (2022).
Pillar Arrays — qzabre.com. https://qzabre.com/en/products/pillar-arrays. (2025).
Acknowledgements
A.G. and V.I. acknowledge the support from the National Research, Development and Innovation Office of Hungary (NKFIH) within the Quantum Information National Laboratory of Hungary (Grant No. 2022-2.1.1-NL-2022-00004). A.G. acknowledges the support from the European Commission within Horizon Europe projects QuMicro, SPINUS, and QuSPARC (Grant Nos. 101046911, 101135699, 101186889) and the QuantERA II project MAESTRO (NKFIH Grant No. 2019-2.1.7-ERA-NET-2022-00045). V.I. acknowledges NKFIH Grant No. FK145395. This project is funded by the European Commission within Horizon Europe projects (Grant Nos. 101156088 and 101129663). The spin dynamics computations were enabled by resources provided by the National Academic Infrastructure for Supercomputing in Sweden (NAISS) at the Swedish National Infrastructure for Computing (SNIC) at Tetralith, partially funded by the Swedish Research Council through grant agreement No. 2022-06725. First-principles calculations were also performed using the KIFÜ high-performance computation units. A.P. acknowledges the financial support of János Bolyai Research Fellowship of the Hungarian Academy of Sciences. Open access funding provided by HUN-REN Wigner Research Centre for Physics.
Author information
Authors and Affiliations
Contributions
A.P. carried out the DFT calculations under the supervision of A.G. A.T. carried out the spin dynamics simulations under the supervision of V.I. V.V. carried out the experiments. All authors discussed the results. A.P. wrote the manuscript with the contribution of all authors. A.G. conceived and led the entire scientific project.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Nature Communications thanks Kejun Li and Hanfeng Wang for their contribution to the peer review of this work. A peer review file is available.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Source data
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Pershin, A., Tárkányi, A., Verkhovlyuk, V. et al. A coherence-protection scheme for quantum sensors based on ultra-shallow single nitrogen-vacancy centers in diamond. Nat Commun 16, 9797 (2025). https://doi.org/10.1038/s41467-025-64771-7
Received:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1038/s41467-025-64771-7




