Introduction

Quantum sensing harnesses the coherence of well-controlled quantum systems to detect small signals with high sensitivity1,2,3. Typically, an external signal directly leads to a shift of the quantum sensor’s energy levels. Ancillary sensors, which do not interact with the signal directly, can assist the main sensor by, for example, acting as a long-lived quantum memory4,5,6,7,8 or providing error correction9,10,11,12,13,14. Solid state spins are promising platforms for quantum sensing techniques and applications, among which nitrogen-vacancy (NV) centers in diamond have received the most attention2,15,16,17. The electron spin associated with the negatively charged NV center has long coherence time even at room temperature and is capable of detecting a variety of signals with high sensitivity and nanoscale resolution. These include magnetic18,19,20 and electric fields21,22,23,24,25,26,27,28, temperature29,30,31,32, and pressure33,34,35.

For the NV to act as a magnetometer, a bias magnetic field along the NV axis is generally required to put the electron spin (S = 1) in the \(\left|{m}_{S}=0,\pm\! 1\right\rangle\) basis, such that the energy levels are first-order sensitive to magnetic field perturbations2. However, this method fails when the bias field turns toward the direction perpendicular to the NV axis, where the Zeeman interaction no longer induces energy shifts between the levels. To unlock the full potential under this unfavored condition, we introduce an entirely different sensing approach assisted by the ancillary 15N nuclear spin. The essential principle is based on the sensitivity of the hyperfine interaction (between the electron and nuclear spins) to small magnetic signals. By monitoring the entanglement between the two spins using spin-echo sequences, we detect small changes in the magnetic field angle. Furthermore, similar to the hyperfine interaction, we show that the coupling between the electron spin and magnetic noise also sensitively depends on the bias field angle, which can be further employed to distinguish and characterize anisotropic noise in the environment. Our exploration extends the capabilities of the versatile sensing toolkit of the NV center, and this sensing strategy based on the interaction between the main sensor and ancillary sensor can be implemented on other quantum sensing platforms as well.

Our experiments were done under ambient conditions, as schematically depicted in Fig. 1a, b. The single-crystal diamond chip contains individually resolvable 15NVs. A metal stripline fabricated on the diamond surface delivers microwave currents to manipulate the NV spin states. A cylindrical permanent magnet exerts a magnetic field at the NV and provides a coarse control of the field angle (θB), while a small DC current flowing in the stripline fine-tunes θB in the close vicinity of 90°. We define \(\hat{z}\) to be the NV axis and \(\hat{x}\) to be the bias magnetic field direction when it is exactly perpendicular (Fig. 1a).

Fig. 1: Schematic of the NV center and experimental setup.
figure 1

a 15NV in the presence of a bias magnetic field acting perpendicular to the NV symmetry axis. The coordinate system is depicted on the left. The bias magnetic field direction rotates in the XZ plane. θB is varied around 90° and ΔθB is the signal to be detected. b A permanent magnet and DC currents in the metal stripline together control the magnetic field at the NV. c NV electron energy eigenstates under parallel (Bz) and perpendicular (Bx) magnetic fields.

The paper is structured as follows. We begin by analyzing the NV electron energy eigenstates as the magnetic field angle θB varies around 90°. In particular, we study how the angle modulates the electron spin operator expectation values 〈S〉 at each state, and consequently affects its interaction with the 15N nuclear spin. Next, we demonstrate magnetic field angle sensing by using spin-echo interferometry to measure the angle-dependent hyperfine interaction. Lastly, we show that the NV coherence exhibits an asymmetric angle dependence, which originates from anisotropic noise in the environment.

Results

Electron spin eigenstate properties

The NV spin ground state Hamiltonian Hgs can be written as:

$$\begin{array}{l}{H}_{\rm{gs}}={H}_{\rm{e}}+{H}_{\rm{n}}\\ {H}_{\rm{e}}={D}_{\rm{gs}}{S}_{z}^{2}+{\gamma }_{B}({B}_{x}{S}_{x}+{B}_{z}{S}_{z})\\ {H}_{\rm{n}}={\bf{I}}\cdot {\bf{A}}\cdot {\bf{S}}+{\gamma }_{N}({B}_{x}{I}_{x}+{B}_{z}{I}_{z}),\end{array}$$

where He and Hn denote the Hamiltonians associated with the electron spin (S = 1) and 15N nuclear spin (\(I=\frac{1}{2}\)), respectively. Dgs ≈ 2.87 GHz is the zero-field splitting, γB ≈ 2.87 MHz/G is the electron spin gyromagnetic ratio, γN ≈ 0.4316 kHz/G is the 15N nuclear spin gyromagnetic ratio, and A is the hyperfine tensor with only diagonal elements: Axx = Ayy ≈ 3.65 MHz and Azz ≈ 3.03 MHz36,37,38. Sx,y,z and Ix,y,z are the spin-1 and spin-\(\frac{1}{2}\) Pauli matrices, respectively. We applied the bias field B > 60 G, such that He always dominates over Hn (at any θB). The electron eigenstates, denoted by \(\left|0,\pm\! \right\rangle\) throughout the paper, are thus mainly determined by He, and Hn splits each state into two nuclear spin sublevels (see Supplementary Note 2B).

Under a bias magnetic field along \(\hat{z}\) (θB = 0), i.e., the conventional magnetometry condition, the electron eigenstates are \(\left|{m}_{S}=0,\pm\! 1\right\rangle\) (Fig. 1c). As the bias field direction rotates (θB ≠ 0), the eigenbasis changes. At θB = 90° (Bz = 0, Bx > 0), the eigenstates are as follows: \(\left|0\right\rangle \approx \left|{m}_{S}=0\right\rangle ,\left|-\right\rangle =\frac{1}{\sqrt{2}}(\left|{m}_{S}=+1\right\rangle -\left|{m}_{S}=-1\right\rangle ),\left|+\right\rangle \approx \frac{1}{\sqrt{2}}(\left|{m}_{S}=+1\right\rangle +\left|{m}_{S}=-1\right\rangle )\), and the states \(\left|\pm \!\right\rangle\) split in energy by \(\approx \frac{{\gamma }_{B}^{2}{B}_{x}^{2}}{{D}_{\rm{gs}}}\) (Fig. 1c). Under large Bx, \(\left|{m}_{S}=0\right\rangle\) and \(\frac{1}{\sqrt{2}}(\left|{m}_{S}=+1\right\rangle +\left|{m}_{S}=-1\right\rangle )\) are slightly hybridized in composing \(\left|0\right\rangle\) and \(\left|+\right\rangle\), hence the approximate equality in the above expressions. This hybridization results in finite 〈Sx〉 values for \(\left|0\right\rangle\) and \(\left|+\right\rangle\): \({\langle {S}_{x}\rangle }_{0}\,<\,0,{\langle {S}_{x}\rangle }_{+}\,>\,0\) (see Supplementary Note 2A).

The states \(\left|\pm \!\right\rangle\) are equal superpositions of \(\left|{m}_{S}=\pm\! 1\right\rangle\) at θB = 90°, hence \({\langle {S}_{z}\rangle }_{\pm }=0.\) However, as θB deviates from 90°, the \(\left|{m}_{S}=\pm\! 1\right\rangle\) amplitudes are no longer equal. Due to the large zero-field splitting, the imbalance grows rapidly with the off-angle ΔθB ≡ θB − 90°, and consequently, \({\langle {S}_{z}\rangle }_{\pm }\) acquire finite values (Fig. 2a). On the other hand, 〈Sx〉 barely changes (Fig. 2b). The change in 〈Sz〉 dramatically affects the electron spin interaction with the nuclear spin, thus providing a way to sense ΔθB.

Fig. 2: NV electron spin eigenstate properties under a nearly perpendicular magnetic field.
figure 2

a, b Angle dependence of the electron spin operator expectation values 〈S〉 at each state \(\left|0,\pm\! \right\rangle\), calculated under B = 65 G. 〈Sy〉 = 0 for all states, thus is not plotted. c, d Angle dependence of the nuclear spin sublevel splittings ω at each electron state. c zooms in on the red shaded area around 90° in (d). ω, the orange curve in (d), sharply increases with the off-angle ΔθB, serving as the key to our angle sensing approach.

Angle-dependent hyperfine interaction

A given electron state exerts effective hyperfine fields at the nuclear spin, determined by its spin operator expectation values. Specifically, the nuclear spin Hamiltonian is \({H}_{\rm{n}}={A}_{| | }{I}_{x}{\langle {S}_{x}\rangle }_{\left|{\psi }_{e}\right\rangle }+{A}_{\perp }{I}_{z}{\langle {S}_{z}\rangle }_{\left|{\psi }_{e}\right\rangle }+{\gamma }_{N}\left({B}_{x}{I}_{x}+{B}_{z}{I}_{z}\right)\), where \(\left|{\psi }_{e}\right\rangle =\left|0,\pm\! \right\rangle\). Hn splits each electron state (\(\left|0,\pm\! \right\rangle\)) into two nuclear sublevels and the splitting energy (ћω) can be obtained by diagonalizing Hn. Figure 2c plots ω as a function of θB calculated under B = 65 G and Fig. 2d zooms in on a small angle range centered at 90°. The \(\left|-\right\rangle\) state splitting (ω) is especially interesting: it grows linearly with ΔθB. The slope \(\frac{d{\omega }_{-}}{d{\theta }_{B}}\), as we will see soon, directly determines the angle sensitivity.

Nuclear spin assisted angle sensing

We now demonstrate detection of small angle changes using the angle-sensitive hyperfine interaction. Either ω or ω+ can be used, as they both change with θB. We choose to use ω since its angle dependence is steeper. To measure this quantity, we performed electron spin-echo interferometry, where the spin-echo signal is dramatically affected by the hyperfine splitting due to the electron-spin-echo-envelope-modulation (ESEEM) effect39,40,41,42.

A typical spin-echo sequence is shown in Supplementary Fig. 3. The electron is first prepared in a superposition of \(\left|0\right\rangle\) and \(\left|-\right\rangle\), and then accumulates phase during the free evolution time τ between the two π/2 pulses. The π refocusing pulse decouples the fields at frequencies other than 1/τ.

The ESEEM effect occurs when the nuclear spin undergoes Larmor precession, with the frequency (ω0 or ω) conditioned on the electron state (\(\left|0\right\rangle\) or \(\left|-\right\rangle\)). Consequently, the electron and nuclear spins are periodically entangled and disentangled at a rate determined by ω0 and ω. The spin-echo amplitude measures the electron coherence, which is directly affected by its entanglement with the nuclear spin, hence exhibiting collapses and revivals. As ω is highly sensitive to θB, the spin-echo signal shows angle-dependent modulation patterns. A more detailed analysis is given in Supplementary Note 2C, where the spin-echo signal P obtains a simple expression: \(P=1-| {\hat{\omega }}_{0}\times {\hat{\omega }}_{-}{| }^{2}{\sin }^{2}\left(\frac{{\omega }_{0}\tau }{4}\right){\sin }^{2}\left(\frac{{\omega }_{-}\tau }{4}\right)\).

We performed spin-echo experiments between \(\left|0\right\rangle\) and \(\left|-\right\rangle\) under B ≈ 65 G, as θB varied between 89° and 91° (Fig. 3a). It shows good agreement with the above expression for P (Fig. 3b). At fixed τ = 2.2 μs, the spin-echo signal can sensitively detect small angle changes at the largest slope (red dashed line in Fig. 3c). The corresponding sensitivity is ~13\(\frac{mdeg}{\sqrt{Hz}}\), provided the single NV fluorescence ~100 kcps and optical contrast ~15% in the experiment (see Supplementary Note 2D). To get an overall picture, Fig. 3d expands on Fig. 3b, showing the spin-echo signal P in broader θB and τ ranges.

Fig. 3: Demonstration of nuclear spin assisted angle sensing using spin-echo interferometry.
figure 3

a Experimental and b theoretical spin-echo signal as a function of the free evolution time τ and θB under B ≈ 65 G. The colorbar represents the fluorescence contrast in (a) and the spin-echo amplitude in (b). c The experimental spin-echo signal at fixed τ = 2.2 μs (white dashed line in (a)). The red dashed line denotes the largest slope as θB varies. d Spin-echo calculation in broader θB and τ ranges, where the two white dashed lines mark the fixed τ times at which sensitivities are plotted in (e). e Comparison of angle sensitivities using the nuclear-assisted method (solid curves) in this work vs. conventional magnetometry (dashed curves) based on the electron Zeeman interaction. The nuclear-assisted sensitivities η oscillate with θB, as shown by the semi-transparent solid curves, while the thick curves sketch the envelopes η*. They are compared with conventional approaches assuming two different Bz sensitivities (\(300\frac{nT}{\sqrt{Hz}}\) and \(800\frac{nT}{\sqrt{Hz}}\)) under a parallel bias magnetic field. Inset: the conventional magnetometry sensitivity ηcon in the full angle range.

Taking the derivative of P with respect to θB, we obtain an analytical expression of the angle sensitivity η (see Supplementary Note 2D):

$$\eta =\frac{{\eta }^{* }}{| {\sin }^{2}\left(\frac{{\omega }_{0}\tau }{4}\right)\cdot \sin \left(\frac{{\omega }_{-}\tau }{2}\right)| }$$
(1)
$${\eta }^{* }\equiv \frac{4}{{\gamma }_{\theta }C}\sqrt{\frac{1}{F{T}_{r}\tau }\cdot \frac{{t}_{ini}+\tau }{\tau }},$$
(2)

where F represents the NV fluorescence, C the optical contrast of different spin states, tini the spin initialization time and Tr the spin state readout time. \({\gamma }_{\theta }\equiv \frac{d{\omega }_{-}}{d{\theta }_{B}}\) denotes the slope of the angle-dependent hyperfine interaction (Fig. 2d). Note that γθ is playing an analogous role as the gyromagnetic ratio in conventional magnetometry. The denominator in Eq. (1) causes modulation in τ, i.e. the angle sensitivity is periodically lost and regained at different τ times (Fig. 3d), and η* in Eq. (2) is the modulation envelope. To optimize the sensitivity, we need to pick τ that maximizes \(| {\sin }^{2}\left(\frac{{\omega }_{0}\tau }{4}\right)\cdot \sin \left(\frac{{\omega }_{-}\tau }{2}\right)|\). As examples, sensitivities were evaluated at τ = 2.2 μs and 11 μs and plotted in Fig. 3e, represented by the blue and orange solid curves, respectively.

On the other hand, conventional magnetometry also detects magnetic field angle changes via the electron Zeeman interaction. Its angle sensitivity is proportional to the static magnetic field sensitivity along \(\hat{z}\): \({\eta }_{con}=\frac{{\eta }_{Bz}}{| B| \sin {\theta }_{B}}\). With a parallel bias magnetic field, ηBz is typically between tens of \(\frac{nT}{\sqrt{Hz}}\) and a few \(\frac{\mu T}{\sqrt{Hz}}\) depending on experimental parameters15,16, and ηBz decreases as the bias field turns toward a perpendicular direction (see Supplementary Note 2E). Figure 3e plots ηcon as a function of θB assuming ηBz is originally 300 or \(800\frac{nT}{\sqrt{Hz}}\) under a parallel bias field.

As illustrated in Fig. 3e, our nuclear-assisted approach and conventional magnetometry work in complimentary regimes. The conventional method works well until θB approaches 90° (Fig. 3e inset), when \(\frac{{\gamma }_{B}^{2}{B}_{x}^{2}}{{D}_{gs}}\gtrsim 2{\gamma }_{B}{B}_{z}\) so the electron eigenbasis changes from \(\left|{m}_{S}=0,\pm\! 1\right\rangle\) to \(\left|0,\pm\! \right\rangle\), and after that the nuclear-assisted approach takes over. The sensitivities of both methods are limited by low-frequency noise, up to different effective coupling constants (see Supplementary Note 2E).

Detection of anisotropic noise

The NV couples to magnetic field noise through its electron spin operators. Similar to the hyperfine interaction, the noise coupling strength, and hence the spin coherence, also exhibits strong angle dependence. We show that this provides a useful way to distinguish and characterize anisotropic noise.

Magnetic field noise δB(t) induces transition energy fluctuations: δE±,0(t) = δB(t)  (〈S± − 〈S0), degrading the coherence between the states \(\left|0\right\rangle\) and \(\left|\pm\! \right\rangle\). It can be shown that the coherence is affected by the variance of the fluctuation 〈δE2〉 (see Supplementary Note 3A). Recalling 〈Sz〉 (〈Sx〉) in Fig. 2a, b, we get:

$$\langle \delta {E}_{-0}^{2}\rangle =\langle \delta {B}_{x}^{2}\rangle {\langle {S}_{x}\rangle }_{0}^{2}+\langle \delta {B}_{z}^{2}\rangle {\langle {S}_{z}\rangle }_{-}^{2}-2\langle \delta {B}_{x}\delta {B}_{z}\rangle {\langle {S}_{x}\rangle }_{0}{\langle {S}_{z}\rangle }_{-}$$
(3)
$$\langle \delta {E}_{+0}^{2}\rangle =4\langle \delta {B}_{x}^{2}\rangle {\langle {S}_{x}\rangle }_{0}^{2}+\langle \delta {B}_{z}^{2}\rangle {\langle {S}_{z}\rangle }_{+}^{2}-4\langle \delta {B}_{x}\delta {B}_{z}\rangle {\langle {S}_{x}\rangle }_{0}{\langle {S}_{z}\rangle }_{+}$$
(4)

The last terms in Eqs. (3) and (4) suggest the coherence is sensitive to the correlation between δBx and δBz, which is non-zero for anisotropic noise. Since \({\langle {S}_{z}\rangle }_{\pm }\) is an odd function of ΔθB, while \({\langle {S}_{x}\rangle }_{0}\) an even function, depending on the sign of 〈δBxδBz〉, the coherence is longer on one side than the other around θB = 90°, and the states \(\left|\pm\! \right\rangle\) show opposite asymmetry. If the noise is isotropic, i.e., 〈δBxδBz〉 = 0, the coherence is then symmetric around 90°. Therefore, by examining the angle dependence of the coherence time, we can distinguish the anisotropic noise and further characterize its direction based on the asymmetry. This directional information, on the other hand, cannot be obtained under a parallel bias magnetic field (θB ≈ 0°), where the NV only couples to the \(\hat{z}\) component of the noise.

The coherence asymmetry observed in our experiment (Fig. 4a, b) indicates that the noise coupled to the NV is anisotropic. We argue in Supplementary Note 3B that this is likely due to the dipolar interaction with a few nearby randomly-flipping spins (such as P1 centers or 13C nuclear spins). To further illustrate this effect, we performed spin-echo simulation under a fully anisotropic noise, where the noise only fluctuates along a straight line at −45°/+135° relative to \(+\hat{x}\) (Fig. 4e), such that δBx(t) + δBz(t) = 0. Under this condition, there exist optimal angles at which the noise coupling is maximally suppressed (white dashed lines in Fig. 4c, d).

Fig. 4: Asymmetric angle dependence of the NV coherence time.
figure 4

a, b Spin-echo experiments between \(\left|0\right\rangle\) and \(\left|\mp\! \right\rangle\) as θB varies under B ≈ 93 G. Colorbar represents the fluorescence contrast. The asymmetry between θB < 90° and θB > 90° originates from local anisotropic magnetic field noise in the sample. c, d Simulated spin-echo signals with a magnetic field noise acting along a direction at −45°/+135° from the \(+\hat{x}\) axis, as depicted in (e). The white dashed lines mark the optimal angles at which the noise coupling is maximally suppressed. Colorbar represents the spin-echo amplitude.

Discussion

While conventional NV magnetometry fails when the bias magnetic field orients perpendicular to the NV axis, here we demonstrated a method which uses the electron eigenbasis change for sensing. The achieved sensitivity (η ≈ 13\(\frac{mdeg}{\sqrt{Hz}}\)) can be further improved by using cleaner diamond samples with less noise (e.g., by using 12C enriched diamonds43 or chemical termination to reduce surface spins44), increasing photon collection efficiency (e.g. by fabricating microlens45,46,47,48,49 or pillars50,51,52,53,54) or using NV ensembles55,56,57. For example, as the sensitivity is improved by the square root of the number of NVs, a typical ensemble density of 1012/cm2 can achieve η < 0.3\(\frac{mdeg}{\sqrt{Hz}}\). Our work expands the already remarkable sensing versatility of the NV center. One example of the use of angle sensing is to allow precise tuning of a perpendicular magnetic field to the NV axis for electric field sensing21,22,23,24,27,28.

Our sensing strategy relies on measuring the interaction with an ancillary sensor. Implementing this idea to other quantum sensing platforms requires two key ingredients. First, the angle-dependent hyperfine interaction is due to the NV eigenbasis change, which occurs when \(\frac{{\gamma }_{B}^{2}{B}_{x}^{2}}{{D}_{gs}} \sim {\gamma }_{B}{B}_{z}\). At θB ≈ 90°, this condition becomes \(\frac{{\gamma }_{B}^{2}| B{| }^{2}}{{D}_{gs}} \sim {\gamma }_{B}| B| \sin {{\Delta }}{\theta }_{B}\), i.e. \({{\Delta }}{\theta }_{B} \sim \frac{{\gamma }_{B}| B| }{{D}_{gs}}\), indicating that the high angle sensitivity arises from the large zero-field splitting (Dgs). Second, the hyperfine interaction is the dominating term in the nuclear spin Hamiltonian, which directly affects its entanglement with the electron spin and therefore the spin-echo signal.

We also demonstrated a method to distinguish and characterize anisotropic noise in the XZ plane (i.e. δBx and δBz) based on the asymmetric angle dependence of coherence time. By further rotating the bias field in the XY plane (perpendicular to the NV axis), we could obtain information along all directions, which can help locate noise sources at the nanoscale. Moreover, we showed that the anisotropic component of the noise can be maximally decoupled by applying a bias field at the optimal angle, which may allow a great improvement of the NV spin coherence.

Methods

Diamond sample

The diamond sample was an electronic-grade CVD diamond (Element Six), with a natural abundance (1.1%) of 13C impurity spins. Negatively-charged NV centers were created by ion implantation (18 keV) followed by vacuum annealing at 800 °C for 2 h. NV experiments were performed on a home-built confocal laser scanning microscope. A 532 nm green laser was used to initialize the NV spin to the mS = 0 state and generate spin-dependent photoluminescence for optical readout.

Spin dynamics simulation

The simulation of NV spin-echo decay was done using the QuTip (Quantum Toolbox in Python) software58,59. To simulate the coupling with the anisotropic magnetic noise, collapse operators were defined, and the time evolution was governed by the Lindblad master equation. More details are provided in Supplementary Note 4.