Atomic-scale nuclear spin imaging using quantum-assisted sensors in diamond

Nuclear spin imaging at the atomic level is essential for the understanding of fundamental biological phenomena and for applications such as drug discovery. The advent of novel nano-scale sensors has given hope of achieving the long-standing goal of single-protein, high spatial-resolution structure determination in their natural environment and ambient conditions. In particular, quantum sensors based on the spin-dependent photoluminescence of Nitrogen Vacancy (NV) centers in diamond have recently been used to detect nanoscale ensembles of external nuclear spins. While NV sensitivity is approaching single-spin levels, extracting relevant information from a very complex structure is a further challenge, since it requires not only the ability to sense the magnetic field of an isolated nuclear spin, but also to achieve atomic-scale spatial resolution. Here we propose a method that, by exploiting the coupling of the NV center to an intrinsic quantum memory associated with the Nitrogen nuclear spin, can reach a tenfold improvement in spatial resolution, down to atomic scales. The spatial resolution enhancement is achieved through coherent control of the sensor spin, which creates a dynamic frequency filter selecting only a few nuclear spins at a time. We propose and analyze a protocol that would allow not only sensing individual spins in a complex biomolecule, but also unraveling couplings among them, thus elucidating local characteristics of the molecule structure.

Proteins are the most important building blocks of life. The ability to obtain high-resolution protein structures is the keystone of drug discovery, since structure naturally reveals binding sites that can be targeted by drugs. Several methods exist for determining high resolution protein structure, primarily X-ray crystallography [1], transmission electron microscopy [2] and nuclear magnetic resonance (NMR) [3]. While each method has greatly contributed to our understanding of protein structure, none of them can sense individual molecules. Of particular interest would be imaging of small active sites of a protein in its natural environment and conditions.
Recently, novel quantum sensors associated with the nitrogen vacancy (NV) center in diamond [4] have shown the potential to provide few nT/ √ Hz sensing and nanoscale resolution at ambient conditions. NV-based magnetometers [5,6] can be transformative tools in quantum information, material science and bio-imaging [7][8][9], allowing for example high-resolution magnetic imaging of living cells [10]. NV centers in bulk diamond have mapped the location of single 13 C nuclear spins inside the diamond crystal [11][12][13], while shallow-implanted NVs have recently demonstrated the ability to sense a small number of nuclear spins in various organic materials [14][15][16][17], as well as single and small ensembles of electronic spins outside the diamond sensor [18][19][20][21].
Each nuclear spin in samples of interest creates a magnetic field that depends on its position relative to the NV center. For spins 2-5nm away from the NV spin, this magnetic field is within range of the sensitivity of the NV quantum probe [4] (see Fig. 1.A), can be made possible by the long coherence time achieved by careful material preparation [16,22,23] and by using pulsed [15] or continuous [24,25] dynamical decoupling (DD) sequences, which can extend the sensing time to hundreds of microseconds. The decoupling cancels lowfrequency dephasing noise, but by appropriately selecting the control timing to match the nuclear spin Larmor frequency, the NV spin can sense the magnetic field created by the nuclear spins, even in the absence of a net nuclear polarization (spin noise). For sparse nuclear spin ensembles, such as encountered in natural diamond, this effect is enough to distinguish individual spins and thus to reconstruct their position [11][12][13]. For dense samples, the frequency resolution is inadequate to distinguish individual spins. In addition, the intrinsic NMR linewidth in a dense molecule might exceed the NV sensing linewidth.
In the following we describe a method to improve the frequency, hence spatial, resolution of NV sensing. We evaluate the method performance with simulations on typical biomolecules and discuss the experimental resources needed to achieve atomic-scale reconstruction of nuclear spin positions.
Principles. We assume that the biomolecule to be probed is attached to the surface of a diamond at the location of a single NV center that is within 3 nm of the diamond surface ( Fig. 1). To achieve enhanced spatial resolution for NV sensing of the nuclear spins within the biomolecule, we use three critical ingredients: (i) an effective strong magnetic field gradient across the biomolecule due, e.g., to the rapid spatial variation of the magnetic dipolar field from the NV electronic spin; (ii) Hamiltonian engineering of the NV and multi-nuclear spin system [27] -which creates a very sharp dynamical frequency filter for NV sensing and controls the effect of NV spin polarization leakage through the coupled nuclear spin network; and (iii) a quantum memory -the nuclear 15 N spin associated with the NV center -which enables long acquisition times and hence an even sharper frequency filter.
The sensing protocol works by following the leakage of polarization from the NV center (which is optically polarized) toward on-resonance nuclear spins. The resonance condition is in principle different for each nuclear spin, as it is given by its position-dependent coupling to the NV center. However, simply implementing cross-polarization does not yield enough NV spin (purple) at 1-2nm from the diamond surface can sense single nuclear spins in a molecule (the chemokine receptor CXCR4 [26], ribbon diagram) anchored to the diamond. The magnetic field produced by individual 13 C (spheres with color scale given by B j ⊥ /γe) is in the range of nT, within reach of NV sensitivity. In the inset: the binding site of interest (atoms other than 13 C are blue (O) and red (N)). (b) A shallow NV center (2nm from the surface) creates a magnetic field gradient (A( r)/γn) above the [111] surface of the diamond. Note the azimuthal symmetry of the field, which causes degeneracy of the frequency shift at many spatial locations.
frequency resolution for single-spin sensing. By alternating periods of cross-polarization with evolution under a magnetic field gradient -while the NV spin state is preserved by mapping onto the quantum memory-the interaction Hamiltonian is modulated and only couplings of the NV to resonant nuclear spins are retained. Evolution under the gradient thus acts as a sharp frequency filter, thereby increasing the spatial selectivity. The gradient evolution time can be long, limited only by the quantum memory (the nuclear 15 N spin associated with the NV center) coherence time, which at a few milliseconds translates to a high frequency resolution, δA ∼ 100Hz.
Using the NV polarization leakage as a signature of the nuclear spin position provides two advantages over measurement of NV frequency shifts due to specific nuclear spins. First, it is easy to embed nuclear decoupling sequences within the sensing protocol; nuclear decoupling is essential to narrow the NMR spectrum intrinsic linewidth and thus detect signal arising from individual nuclear spins. Second, once the polarization is transferred to a nuclear spin, this spin itself becomes a sensitive probe of its local environment. In the following we propose a three-step protocol for nuclear spin imaging. In a first step, we observe polarization transfer from the NV center to one (or a few) nuclear spin(s), providing partial information about their positions. The nuclear spins can then evolve freely, and polarization diffuses in the nuclear spin network. The polarization is then transferred back to the NV center, revealing the nuclear spin connectivity. We can thus acquire multi-dimensional spectra that not only decrease frequency crowding, but can also resolve degeneracies related to the intrinsic symmetry of the dipolar coupling.
Next we describe in detail the proposed method and its application to biomolecule structure reconstruction.

Results
Nuclear Spin Detection via NV centers in diamond. The electronic spin S = 1 associated with the negatively charged Nitrogen Vacancy center in diamond is a sensitive probe of magnetic fields at the nano-scale [4]. The good sensitivity of NV spins is due to the long coherence time achieved under dynamical decoupling. Pulsed decoupling sequences -a train of π-pulses such as CPMG [28] -not only cancel low-frequency dephasing noise, but also act as sharp band-pass filters at selected frequencies set by the pulse timing [29,30].
Nuclear spins on the surface of the diamond couple to the NV electronic spin via the magnetic dipolar interaction µ, where the NV is at the origin and we aligned the coordinate system with the NV symmetry axis. Here γe,n are the gyromagnetic ratios of the electronic and nuclear spins respectively. For shallow NVs, this interaction exceeds the nuclear-nuclear dipolar coupling and is strong enough to allow coherent coupling to individual nuclear spins, via the Hamiltonian: where Sα and I j α are the NV electronic spin and external nuclear spin operators, respectively. Here A j = µz( r j ) and B j ⊥ = µ 2 x + µ 2 y are the longitudinal and transverse components of the dipolar coupling at the location of the j th spin.
The normalized signal due to the net phase shift imparted to the NV spin after a train of 2n π-pulses spaced by a time τ is given by S = 1 2 1 + j S j , where the pseudo-spin signal from the j th nuclear spin is Here the vectors Ω j i = Ω j i ω j i represent the nuclear spin Hamiltonian in the two subspaces of the NV electronic spin. In general we have Ω j 0 = ω j Lẑ , where ωL = γnB is the nuclear spin Larmor frequency. Then the signal shows "dips" around τ k = (2k + 1)π/ωL marking the presence of nuclear spins. However, the dip times are specific for each nuclear spin because of the differences in dipolar coupling, The dip minimum is achieved when α j = π; for ω j 0 · ω j 1 ≈ 1 (as is the case for large enough magnetic field); this is obtained at τ j k = 2π(2k + 1)/(Ω j 0 + Ω j 1 ) ≈ (2k + 1)π/(ωL + A j /2). At long times, the signal dips arising from different nuclear spins become discernible, as one can separate contributions from spins having dipolar couplings A j − A i = δA ωL/[(2k + 1)n]. The linewidth of this sensing scheme is thus limited by the coherence time, δA ∼ 4π/(T2) ≈ (2 − 50)2π kHz. While the signal contrast at the dips, S j ∼ cos 2B j n ω L +A j /2 , would be enough to measure protons 2-5nm from the NV center, the frequency resolution is not enough to distinguish individual spins separated by ∼ 0.1nm in a dense molecule. In addition, the intrinsic NMR linewidth of dense samples (tens of kHz) can exceed the NV sensing linewidth and it is challenging to embed homonuclear decoupling in the NV decoupling-based sensing scheme (SI Appendix).
An alternative approach to nuclear spin sensing is to observe the polarization leakage from the NV center to the nuclear spins [31,32]. We first rotate the NV spin to the transverse axis and then apply a continuous driving along that same axis (spin-locking). The driving decouples the NV from noise and the nuclear spin bath. Setting however the NV Rabi frequency Ω close to the target nuclear spin energy, Ω ≈ ±ωL, polarization is transferred to the nuclear spins [33,34], resulting in a  Polarization is transferred from the NV electronic spin to the target nuclear spins in the bio-molecule for a time t/F . To increase spatial resolution, the nuclear spins are let to evolve under a magnetic field gradient for a time tg = Tg/F , while the NV state is stored in the nuclear 15 N spin. The scheme is repeated F times to create a sharp filter. For reverse-sensing the two π/2 pulses are omitted. B: Filter created by the control scheme as a function of the normalized time 2πtg(ω L + A). The filter peaks are sharper for higher F (dark line, F = 30, red line, F = 6), yielding a smaller linewidth δA. While it is possible to achieve sharper peaks at longer times (dashed line, F = 6, t g = 5tg), this results in a smaller bandwidth ∆A . signal dip: The energy matching condition depends on the nuclear spin dipolar coupling A j , but the frequency resolution is limited by the hyperfine transverse component, δA ∼ B j . Even if homonuclear decoupling can be embedded within crosspolarization, it is not possible to distinguish spins in a dense sample. Also, cross polarization is often plagued by power fluctuation in the driving field, which leads to imperfect energy matching and broadens the effective frequency resolution.
Quantum-enhanced spatial resolution.To increase the frequency -and thus spatial-resolution, we exploit the presence of an ancillary qubit associated with the Nitrogen nuclear spin ( 15 N with I = 1 2 ). This long-lived ancillary spin can store information about the state of the NV electronic spin, while the external nuclear spins evolve under the action of a magnetic field gradient, which creates a further frequency filter, thereby increasing the spatial selectivity. The gradient evolution time can be as long as a few milliseconds, limited only by the nuclear 15 N spin coherence time, yielding a sharp frequency filter. The gradient field could be provided by a strong magnetic tip [18,35], micro-fabricated coils [36] or dark spins [37] on the diamond surface. Even more simply, the NV itself can create the gradient, when set to the |1 state (see Fig. 1.B). In the following, we will assume this strategy, as this does not require any additional experimental resource.
The method can proceed as follows. After a period of evolution under the spin-lock Hamiltonian, the NV state is mapped onto the nuclear ancillary spin -initially in the |1 state -by a SWAP gate [38] (see Fig. 2). High fidelity SWAP operations can be constructed by successive RF and microwave irradiation [39], by free evolution under a misaligned field or via the use of decoherence protected gates [40,41]. The electronic spin is thus left in the |1 state, thereby creating a magnetic field gradient. Inverting these operations after a time tg effectively implements an evolution of the external nuclear spins under the Hamiltonian Alternating evolution under the gradient and the spin-lock Hamiltonian (in the dressed-state basis), where I± = Ix ± iIy, we obtain the effective evolution: Here we define the filtered Hamiltonian (see Methods). This control scheme creates a time-domain Bragg grating [30] around the frequencies ω f = 2nπ/tg, with very sharp peaks for large F (see Fig. 2.B). Then, only for onresonance nuclear spins the dipolar coupling transverse component, B j ⊥ , is retained and polarization is transferred, yielding S j < 1 in Eq. (4). The filter linewidth, δA = 2π/(F tg), is determined by the gradient-evolution time, which can be made very long since it is only limited by the ancillary nuclear spin dephasing time, F tg T * 2n ∼ 8 − 10ms. The bandwidth ∆A over which it is possible to distinguish different spins is instead set by the condition (A ± ∆A + ωL)tg ≶ 2π(n ± 1). The scheme can thus achieve a frequency resolution of about δA ∼ 2π100Hz over a bandwidth ∆A = 2π/tg ∼ F ×2π100Hz, which can be 10-50 times larger than δA. The bandwidth can be further improved by over five times using a novel control strategy that effectively creates anti-aliasing filters [27] (SI Appendix). Since it is possible to embed homonuclear decoupling [42] during both the spin-lock and the gradient evolution, the linewidth is not limited by the spin-spin coupling (see Methods). We note that a similar filtering scheme could be embedded with the DD-based sensing strategy (Eq. 3), increasing its frequency resolution while also allowing homonuclear decoupling during the gradient evolution.
The ancillary 15 N nuclear spin, by acting as a memory, thus achieves two goals: it increases the coherence time and it enables using the NV center as a source of magnetic field gradient. The resulting dynamic Bragg grating reaches high spatial resolution (sub-angstrom for protons and a NV 2-3nm below the diamond surface). As shown in Fig. 4, the frequency resolution is much better than for DD-based sensing protocols.
A further advantage of the proposed filtered crosspolarization scheme is that it can be used not only to sense individual nuclear spins, but also to polarize them. The nuclear spins, as explained below, then become local probes of their environment, providing essential structural information.
Protocol for nuclear spin imaging. A protocol for nuclear spin imaging involving three steps is illustrated in Fig. 3. First, we acquire a 1D NMR spectrum using the filtered crosspolarization method described above ("sense/polarize" step), sweeping the filter time tg and the driving frequency Ω. For each time point, only one (or a few) nuclear spin(s) becomes polarized and thus contributes to the signal. In the second step, the nuclear spins are left to evolve freely for a time t d ("diffuse") prior to transferring polarization back to the NV electronic spin for detection in the third step ("reverse sense"). During the diffusion time t d , nuclear polarization migrates to neighboring spins under the action of the homonuclear dipolar Hamiltonian [43]. To sense the new location of the polarization the NV is again driven at the nuclear spin frequency (alternating with the gradient field for enhanced spatial resolution). By omitting the initial rotation to the transverse plane, the NV is now only sensitive to polarized nuclear spins. For a fixed diffusion time t d one thus obtain a 2D, correlated spectrum, similar to NMR 2D spectroscopy [44]. The spectrum ( Figure 4) encodes information about the couplings between nuclear spins and thus constrains their relative positions. Note that we could further obtain 3D spectra by sweep-

Sense/Polarize
Reverse sense Di use Fig. 3. Protocol for quantum-enhanced nuclear spin imaging. First the NV measures a 1D NMR spectrum (sense). During this step, polarization is selectively transferred from the NV to a particular nuclear spin in the protein (polarize). Polarization is then allowed to spread (diffusion), driven by the nuclear spin-spin dipolar coupling. The polarization now localized on a different nuclear spin is transferred back to the NV spin and measured optically (reverse-sense).
ing the diffusion time t d (SI Appendix). The spectra yield an over-constrained system for the spin positions, as for N nuclear spins we can obtain up to 2N +N (N −1)/2 equations (SI Appendix). By using the polarized nuclear spins as probes of their own environment, this protocol can thus break the symmetry of the dipolar coupling and overcome the phase problem that plagues other experimental techniques. Indeed, the 1D NMR spectrum acquired in the first step provides information on the dipolar couplings to the NV spin. Using a peak-picking procedure, we directly read out the longitudinal dipolar couplings from the frequency position ωp of the dips, A = 2(ωp−ωL). The dip height determines the transverse coupling, as S p = 1− 1 2 sin 2 (B ⊥ t/2) (Eq. 4). Given a pair of parameters Ap, Bp for each dip, the spin position is found by inverting Eq. (1). This yields a pair of solutions for rz and r ⊥ = r 2 x + r 2 y , with only one usually consistent with the NV depth. The nuclear spin positions lie in a region defined by the unknown angle φ = arctan (ry/rx) (analogous to the phase problem in x-ray crystallography.) While the NV depth often further constrains this region, the information obtained from the 2D spectrum correlations is essential to unambiguously determine the position. In addition, 2D correlations help in distinguishing spins that might have similar couplings to the NV (because of the phase symmetry) and thus create overlapping signals in the 1D spectrum, but give rise to distinct peaks in the 2D spectra since they couple to different spins.
For an isolated nuclear spin pair, the signal intensity at the diagonal peaks is where Dij is the dipolar coupling strength between the spins. The cross peaks (yielding a cleaner signal for non-isolated pairs) . For each spin pair, knowledge of their mutual dipolar coupling Dij determines the phase difference φi − φj, thus all relative phases can be determined (up to a global phase) if enough dipolar couplings can be measured. In general, a 2D spectrum might not be sufficient to fully determine the position of a complex structure since couplings between distant nuclear spins might not be visible and because of uncertainties in the estimated parameters. The information can however be supplemented by 3D spectra (varying the diffusion time) and by including prior information, such as the length of chemical bonds, into the reconstruction algorithm.

Discussion
The proposed method would enable NV centers in diamond to sense individual nuclear spins and their mutual couplings with atomic-scale resolution and thereby determine the atomic structure of pockets and local sites close to the surface of large bio-molecules. Experiments can be performed at ambient conditions, without the need to crystallize the molecules, and on single molecules, avoiding the need to synthesize large ensembles. Site-selective isotopic labeling [45] would allow focusing on a small number of 13 C or Nitrogen spins, or even protons in molecules in a deuterated solution. The molecules could be functionalized and attached to the diamond surface, for example by methods such as the EDC/NHS reaction, which forms a chemical bond stable over a few weeks [21]. Deterministic binding near an NV center may be obtained using co-localization techniques developed in [21].
Measuring the structure of local surface sites in biomolecules, relevant to many biological functions and drug discovery, is within reach of current NV sensitivity, although the mapping of whole bio-molecules is more challenging and requires further technical advances in quantum metrology [46] or nanodiamonds with enhanced material properties [47]. Our method could complement information acquired via existing techniques, in particular x-ray crystallography and NMR. While xray diffraction is able to image whole proteins with Angstrom resolution, the technique requires the ability to produce high quality single crystals of a few hundred of microns, thus restricting the number of proteins that can be studied (e.g., membrane proteins cannot be crystallized); in contrast, NVbased sensing can image single proteins in their natural state. In addition, the imaging protocol we propose can help solve reconstruction issues associated with the phase problem in xray diffraction and overcrowded spectra in NMR. While the NV-based scheme has similarities to NMR methods such as NOESY [3], which explore through-space spin-spin correlations, the ability of our NV technique to polarize only one spin at a time allows acquiring more information even in possibly crowded spectra.
We can estimate the resources needed for such tasks by considering the frequency resolution and signal-to-noise ratio (SNR) requirements to distinguish one or few nuclear spins in a dense molecule. For a nuclear spin on-resonance with the NV Rabi frequency, the signal in Eq. (4) simplifies to S j = 1 − 1 2 sin 2 (B ⊥ t/2), where the time t is limited by the coherence time in the rotating frame (T1ρ ≈ 2ms [25]). The SNR in M measurements is then SN R ∼ M/2CTρ, where C ≈ 0.01 − 0.3 [4,39] captures the finite contrast and photon collection efficiency. In order to distinguish spins with dipolar couplings differing by δA, the total gradient time should be Tg = F tg = 2π/δA in F steps. Thus the total time required to measure one spin is Ts = M (Tg + Tρ + F ta + tro), where tro is the read-out time and ta is the time needed for the ancillary spin protocol (polarization of the NV, ∼500ns, NV π-pulse, 20ns and SWAP gate, ∼ 4µs). For the 2D protocol, assuming division of the spectral range in b frequency steps and letting the nuclear spin diffuse for a time t d , the total measurement time becomes T2D = b(T1D + t d ) = b 2 Ts + bt d .
Consider for example the chemokine receptor CXCR4 [26]. Chemokine receptors are G protein-coupled receptors found predominantly on the surface of leukocytes and are critical regulators of cell migration for immune surveillance, inflammation, and development. In particular, the CXCR4 receptor ( Fig. 1.A) is implicated in cancer metastasis and HIV-1 infection. CXCR4 ligand-binding cavities are actively studied as mutations are reported to decrease HIV-1 infectivity. CXCR4 was recently crystallized and its structure determined by x-ray diffraction [26] (we use these data in our simulations). It would be desirable to acquire more information about conformational changes in these receptors, resulting in signal transduction and HIV-1 entry process, as well as to obtain information about similar membrane proteins that cannot be crystallized.
In order to estimate the resources required to determine the structure of CXCR4 binding sites, we simulated the dynamics of the NV electronic spin under the action of the proposed control sequences and the protein's nuclear spins. In the simulations we assumed that only the amino-acids ARG and ILE are 13 C-labeled, thus we can focus just on the 12 13 C nuclear spins of the 183 and 185 residues, as coupling to other spins (e.g., protons) is off-resonance or too weak. We further assumed application of both heteronuclear and homonuclear decoupling sequences to narrow the 13 C linewidth. For an NV 1.75nm below the diamond surface, the minimum dipolar coupling of interest is B ⊥ = 250Hz. Thus we need M ≈ 1000 acquisitions to see such a spin, assuming a collection efficiency of C ≈ 0.2 which can be obtained by 100 repeated readouts of the electronic spin, using the ancillary nuclear spin [39,48,49]. Choosing b = 15 bins to scan the frequency bandwidth of interest, W = 2.5kHz, the gradient time for the target linewidth is Tg = 6ms= 1/(166Hz). The experimental time to acquire a 1D spectrum is about T1D ≈ 2 minutes, while mapping the 2D correlations for the 10-12 frequencies of interest requires about T2D ≈ 30minutes. In Fig. 4 we show simulated 1D and 2D spectra for the CXR4 receptor active site; to illustrate the potential of our filtered scheme we increased the number of frequency bins to b = 64. The figure shows the high frequency resolution the method can achieve as well as the additional information provided by the local diffusion of polarization in the nuclear spin network, resulting in position estimates for each resolvable spins with good precision. Assuming an uncertainty of ∆A = ∆B = 300Hz for the dipolar couplings and an error [∆Dij = 0.5Dij] 2 + [50Hz] 2 , the typical volume uncertainty ranges from 1.2Å 3 to 10Å 3 for the various spins we considered (see SI Appendix for details), although it increases sharply with the distance from the NV.
We note that these estimates do not include atomic position fluctuations due for example to thermal motion. The assumption that the atoms are quasi-static during the duration of the experiment is nonetheless reasonable, especially for nano/micro-crystalline structures. In general, obtaining a precise estimate of atom fluctuations is difficult, since it depends on several factors, including molecule topology and torsion, binding mechanism to the diamond surface and surrounding molecular environment (liquid hydration layer or ice). However, we can obtain estimates for crystal structures from the Debye-Waller coefficients tabulated in the PDB -at 77K, the disorder in atom positions for most crystals is under 1.5Å, comparable to the sensing resolution of our protocol.

Conclusion
We proposed a practical method for atomic-scale nuclear spin imaging in bio-molecules using NV centers in diamond. Recent developments in materials fabrication [22,50], ion implantation [51,52] and coherent control techniques [53,54] have brought diamond magnetometers close to the threshold of single nuclear spin sensitivity. These quantum sensors have the potential to be an important tool in proteomics, as they overcome some of the challenges plaguing other experimental techniques, such as x-ray diffraction and conventional NMR. Most prominently, they would not require crystallization of the sample, a challenge for many classes of bio-molecules such as membrane proteins; nor large sample sizes.
Our novel strategy combines coherent control of the NV sensor with an intrinsic quantum memory to enhance the sensor spectral resolution. This control strategy not only creates a sharp dynamic filter by alternating periods of a spin-lock Hamiltonian with evolution under a gradient field, but provides other advantages. The sequence is compatible with homonuclear decoupling, thus allowing sensing beyond the natural bio-molecule NMR linewidth. In addition, our technique allows mapping the couplings among the spins themselves, using them as local probes of their environment. The resulting multi-dimensional NMR spectra highlight spatial correlations in the sample, lift spectral overlaps due to symmetries and aid the structure reconstruction algorithms. This would allow resolving the contributions in the NV signal arising from different nuclear spins in a dense sample and to use the acquired information to determine the nuclear spin positions. Reconstructing a protein local 3D structure in its natural conditions would allow researchers to work backwards and design compounds that interact with specific sites.
By combining the strength of NMR-inspired control techniques with the quantum properties of NV center spins, the proposed strategy for magnetic resonance detection at the nano-scale promises to make diamond-based quantum sensors an invaluable technology for bio-imaging.

Materials and Methods
The Qubit Sensor. The Nitrogen-Vacancy color center in diamond is a localized defect in the diamond lattice comprising a Nitrogen substitutional atom adjacent to a vacancy. The negatively charged NV that we consider here forms a spin 1 in its ground state, with a zero-field splitting of ∆ ≈ 2.87GHz, which determines the system's eigenstates. An additional magnetic field along the NV axis further splits the degeneracy between the |± states and only the transition between the 0 and −1 states is addressed with on-resonance microwave fields. The electronic spin can be optically polarized and read out and has good coherence properties at ambient condition. Phase acquired during the coupled evolution with the external nuclear spins is mapped into a population difference and read out via spin-dependent fluorescent intensity. NV centers can be engineered in isotopically purified [22] synthetic diamond by low-energy Nitrogen implantation [55] or delta doping [16,50]. These techniques provide good coherence properties and strong coupling to external spins. The ancillary nuclear spin is the intrinsic nuclear spin associated with the NV center, e.g., 15 N spin-1/2 with hyperfine coupling of 3MHz.
Hamiltonian Engineering by Dynamic Filter Generation. The creation of a dynamic Bragg grating (spectral filter), which yields high spatial resolution, is obtained from the concatenation of the NV spin-lock Hamiltonian with a gradient field. The resulting evolution can be understood from a first order approximation [56], similar to average Hamiltonian theory [57]. Expanding the product in Eq.( 7) of the main text, we obtain e −iH G tg For typical values of the nuclear spin Larmor frequency and the transverse dipolar coupling, ω L ∼ 100 − 1000B j ⊥ , and setting t ∼ 1/B j ⊥ , we need F = 10 − 30 for the approximation to hold. This can be easily reached and it is usually required anyway to achieve the desired frequency selectivity. Symmetrization of the sequence [57] achieves cancellation of all odd order terms making the filter insensitive to slow fluctuations in the microwave driving power at the cost of longer sequences (SI Appendix).
Decoupling. As the frequency selectivity of the NV sensing protocols increases, the spectral resolution is no longer limited by the filter itself but by the finite linewidth of the nuclear signal. A major source of line broadening are the couplings among nuclear spins, which can be as large as tens of kHz between neighboring spins in a protein. Simple steps to mitigate this problems include reducing the spin density by isotopic labeling [45] and decoupling the spins of interest from different spin species (heteronuclear decoupling), using well-established methods in the NMR community [57].Contrary to DD-based sensing techniques, homonuclear decoupling sequences can be embedded in the cross-polarization scheme. Consider, e.g., one of the simplest decoupling sequences, WAHUHA [42], which works by averaging to zero the secular homonuclear dipolar coupling over the cycle time. Assuming the sequence is applied during the NV driving, the effective Hamiltonian averaged over one cycle becomes and the operators Im are defined in a frame where the nuclear spin z axis is rotated to the [111] direction. In this frame, the dynamics is equivalent to what observed in the absence of homonuclear decoupling; thus polarization is transferred from the NV electronic spin to the nuclear spin under the resonant condition, Ω = ω L +A j m /(2 Volume Uncertainty Estimation. The explicit functional dependence of the spins' reconstructed positions is intractable for any, but the fewest number of spins. Furthermore, if more coupling constants (both spin-NV and intra-spin) than spatial degrees of freedom are accessible, the system is overspecified and a unique solution compatible with all measured coupling will generally not exist, if the latter contain an error. To treat this problem in the simplest way, we perform a linear regression analysis around the true spatial positions and subsequently determine the error propagation within this framework, as described in detail the SI Appendix. The obtained volume error bound of the individual spins sets the figure of merit for our proposed sensing scheme.