Scanning gradiometry with a single spin quantum magnetometer

Quantum sensors based on spin defects in diamond have recently enabled detailed imaging of nanoscale magnetic patterns, such as chiral spin textures, two-dimensional ferromagnets, or superconducting vortices, based on a measurement of the static magnetic stray field. Here, we demonstrate a gradiometry technique that significantly enhances the measurement sensitivity of such static fields, leading to new opportunities in the imaging of weakly magnetic systems. Our method relies on the mechanical oscillation of a single nitrogen-vacancy center at the tip of a scanning diamond probe, which up-converts the local spatial gradients into ac magnetic fields enabling the use of sensitive ac quantum protocols. We show that gradiometry provides important advantages over static field imaging: (i) an order-of-magnitude better sensitivity, (ii) a more localized and sharper image, and (iii) a strong suppression of field drifts. We demonstrate the capabilities of gradiometry by imaging the nanotesla fields appearing above topographic defects and atomic steps in an antiferromagnet, direct currents in a graphene device, and para- and diamagnetic metals.

Nanoscale magnetic stray fields appearing at surfaces and interfaces of magnetically-ordered materials provide important insight into the local spin structure.Such stray fields are present, for example, above magnetic domains and domain walls [1], magnetic vortices [2], spin spirals [3], skyrmions [4], or topographic steps and defects [5], and often accompany other types of ordering, like ferroelectricity [6].Similar stray fields also appear near flowing currents [7,8] or materials with a magnetic susceptibility [9].Therefore, stray field measurements are a general and versatile tool to study local material or device properties.
While the magnetic imaging of ferromagnetic and ferrimagnetic textures is well-established [10][11][12], detection of the much weaker stray fields of, for example, antiferromagnets, multiferroics or nanoscale current distribution is a relatively new development.Quantum magnetometers based on single nitrogen-vacancy (NV) centers have recently led to exciting advances in this direction [13][14][15][16][17][18][19].In their standard configuration, NV magnetometers image stray fields by scanning a sharp diamond probe over the sample surface and monitoring the static shift of the NV spin resonance frequency [20,21].State-ofthe-art scanning NV magnetometers reach a sensitivity to static fields of a few µT/ √ Hz [16,22].This sensitivity is sufficient for imaging the domain structure of monolayer ferromagnets [22][23][24] and uncompensated antiferromagnets [14][15][16][17], however, it remains challenging to detect the even weaker stray fields of isolated magnetic defects, spin chains or ideally compensated antiferromagnets.While higher sensitivities, on the order of 50 nT/ √ Hz, have been demonstrated using dynamic (ac) detection of fields [25,26], this approach is limited to the few systems whose magnetization can be modulated, like isolated spins [27,28].
Here, we demonstrate a gradiometry technique for highly sensitive imaging of static magnetization patterns.
Our method relies on up-conversion of the local spatial gradient into a time-varying magnetic field using mechanical oscillation of the sensor combined with sensitive ac quantum detection.This operating principle is well known from dynamic force microscopy [29,30] and has been explored with NV centers [21,[31][32][33][34][35] and other magnetic sensors [36,37] in various forms, however, it has not been realized for imaging general two-dimensional magnetic samples.As a demonstration, we show that scanning gradiometry is able to resolve the nanotesla magnetic stray fields appearing above single atomic terraces in antiferromagnetic Cr 2 O 3 .Imaging of nanoscale current patterns, magnetic susceptibility in metals, and reconstruction of field maps from gradiometry data are also demonstrated.
Gradiometry technique -The operating principle of our gradiometry technique is shown in Fig. 1a.Our scanning magnetometer set-up consists of a sample plate that is scanned underneath a diamond probe containing a single NV center at the tip apex formed by ion implantation [38].The diamond tip is attached to the prong of a quartz tuning fork (Fig. 1) providing atomic force microscopy (AFM) position feedback [39].The microscope apparatus additionally includes an objective to optically polarize and read-out the NV center spin state and a bond wire acting as a microwave antenna for spin manipulation (see Methods for details).In the conventional mode of operation, we record a spin resonance spectrum at each pixel location to build up a map of the sample's static stray field [16].
To implement the gradiometer, we mechanically oscillate the NV in a plane parallel to the sample (shearmode) by electrically driving the tuning fork at a fixed amplitude x osc ∼ 10 − 70 nm.The NV center now expe- riences a time-dependent field given by where B is the vector component of the sample's stray field along the NV anisotropy axis (Methods), and where x(t) = x 0 + x osc sin(2πf TF t) describes the mechanical oscillation around the center location x 0 with frequency f TF .The amplitudes of the 0f TF , 1f TF and 2f TF har- resulting magnetic field at the sensor location (black), microwave pulse sequences for first and second harmonic (blue and orange), laser pulses (green) and photodetector collection window (gray).Pulse indicators such as (π)x denote (angle)axis of the spin rotation.T = 1/fTF is the oscillation period, τ < T is the sensor interaction time, and t0 the trigger delay.We use a tuning fork with fTF ∼ 32 kHz.Durations of pulses are ∼ 2 µs (laser) and ∼ 100 ns (microwave π-rotation).b, Scheme for detecting the first harmonic signal over n oscillation periods in the regime τ T .Here, τ = nT and the number of π-pulses is 2n.
monics in leading orders of x osc are given by and are therefore proportional to the static field, gradient, and second derivative, respectively.The series expansion in Eq. ( 2) is accurate for oscillation amplitudes x osc smaller than the scan height, typically d ∼ 100 nm.
To detect the harmonics of B(t), we synchronize the mechanical oscillation with a suitable ac quantum sensing sequence [40,41], shown in Fig. 2a.Quantum sensing sequences measure the quantum phase accumulated by the coherent precession of a superposition of spin states during an interaction time τ [42].To measure the nf TF harmonic, we invert the spin precession n times during one mechanical oscillation period using microwave πpulses (Carr-Purcell-Meiboom-Gill (CPMG-n) sequence [42,43]).The pulse protocols for the first (CPMG-1) and second (CPMG-2) signal harmonic are shown in Fig. 2a.The quantum phase accumulated for the first harmonic is given by where γ e = 2π × 28 GHz/T is the gyromagnetic ratio of the NV electronic spin and t 0 = T /2 (see Fig. 2a).The derivation of Eq. (3) and general expressions for higher harmonics and for sequences that are off-centered with respect to the tuning fork oscillation (t 0 = T /2) are given in Supplementary Note 1.To determine φ experimentally, we measure the photo-luminescence (PL) intensity C Φ as a function of the phase Φ = x, y, −x, −y of the last microwave π/2 pulse (Fig. 2a).From the four PL signals C Φ we then extract the phase using the two-argument arc tangent (see Methods), This four-phase readout technique has the advantage that the phase can be retrieved over the full 2π range with uniform sensitivity [19,26].From φ (measured) and Eq.(3) we then compute the gradient field B 1 .Since we can only measure φ modulo 2π, a phase unwrapping step is necessary for large signals that exceed the range [−π; π) [26].
For NV centers with long coherence times (T 2 T ), the sensitivity can be improved further by accumulating phase over multiple oscillation periods using CPMG-2n sequences (Fig. 2b).The simplest way to meet the T 2 T condition is to use a mechanical oscillator with higher resonance frequency.Alternatively, as demonstrated in this work, a higher mechanical mode of the tuning fork can be employed [44].High frequency detection has the added advantage that the interval between π-pulses (given by 1/(2f TF )) becomes very short, which makes dynamical decoupling more efficient and in turn leads to improved sensitivity [41,45].We demonstrate single and multi-period detection schemes with sensitivities of ∼ 120 nT/ √ Hz and ∼ 100 nT/ √ Hz, respectively, in Supplementary Notes 2 and 3.
Demonstration of scanning gradiometry -We begin measurements by calibrating the oscillation amplitude x osc and verifying Eqs.(2,3).We characterize the gradiometry phase detection by parking the tip over a fixed position on a magnetic test sample and measuring the B 1 and B 2 signals as a function of the oscillation amplitude x osc (see Methods and Supplementary Note 4 for characterization and calibration details).Fig. 3a confirms that the signals grow as B 1 ∝ x osc and B 2 ∝ x 2 osc , as expected from the Taylor expansion (Eq.2).Further, to avoid mixing of mechanical and field harmonic signals through surface interactions, we retract the tip by approx.20 nm from the contact point while measuring (Supplementary Note 5).
We establish two-dimensional imaging by detecting the stray field from a direct current flowing in a bilayer graphene device (Fig. 3b).This device provides an ideal test geometry because the magnetic stray field and gradient can be directly compared to the analytical model.Fig. 3c presents gradiometry maps B 1 and B 2 and, for comparison, a static field map B 0 recorded using a standard dc technique [46] with no tuning fork oscillation.Note that all images are recorded with the same imaging time and pixel size.The figure immediately highlights several advantages of gradiometry versus static field imaging: First, the signal-to-noise ratio (SNR) is strongly enhanced due to the more sensitive ac detection, despite of a lower absolute signal.Second, magnetic drift throughout the imaging time (several hours) is present in the static image but suppressed in the gradiometry images.Third, because gradient fields decay quickly with distance (B 1 ∝ x −2 and B 2 ∝ x −3 compared to B 0 ∝ x −1 , see Fig. 3d and Supplementary Note 6), they offer a higher apparent image resolution and are thus easier to interpret.
Imaging of antiferromagnetic surface texture -We now turn our attention to the imaging of stray fields above antiferromagnetic materials, focusing on the archetypical model system Cr 2 O 3 .Antiferromagnets represent a general class of weakly magnetic materials that are both challenging to image by existing techniques [49][50][51] and of key importance for understanding multiferroicity and topological magnetism in the context of antiferromagnetic spintronics [52].Although antiferromagnets are nominally non-magnetic, weak stray fields can appear due to uncompensated moments at domain walls [14][15][16], spin spirals [13], topographic steps [17], or surface roughness and defects.The latter are particularly difficult to detect, yet play an important role in the pinning of domain walls [17] and establishing an exchange bias at material interfaces [53].Careful study of these weaker fields is therefore an important avenue for quantifying the interplay between surface roughness, stray field structure, local magnetization and domain wall behavior.In Fig. 4a we show a gradiometry image of a polished Cr 2 O 3 single-crystal [16].Cr 2 O 3 has a layered structure of out-of-plane Cr 3+ moments at the (0001) surface [47,48] that lead to stray fields at topographic steps [16,17].These stray fields are proportional to the step height.Indeed, Fig. 4a reveals a rich variety of magnetic anomalies on this surface, including two ∼ 5 nm deep and ∼ 200 nm wide topographic trenches introduced by polishing, a number of point defects, and general texture of the ∼2 nm-rms surface roughness (see Fig. S11 for topographic characterization).A quantitative calculation of the expected stray field maxima shows that the magnetic anomalies are well explained by the surface topography (Supplementary Note 7).Except for the trenches, these surface defects are not visible in the static field image (Fig. 4b).Note that it is possible to convert the gradiometry map into an improved static field map through integration and weighted averaging in k-space (Fig. 4c and Methods).
Next, we show that gradiometry is sufficiently sensitive to detect single atomic surface steps of the layered Cr 2 O 3 (0001) surface.Fig. 4d displays a gradiometry image from a second Cr 2 O 3 single crystal with an as-grown (unpolished) surface [47].We observe a striking pattern of regular stripes separated by a few hundred nanometers and an approximate amplitude of B 1 ∼ 250 nT.The pattern extends over the entire crystal surface with different stripe separations and directions in different regions of the sample (Fig. S12).By converting B 1 measurements into local gradients we deduce height changes < 1 nm (Supplementary Note 7), suggesting that the repeating striped patterns are caused by single (h = 0.227 nm), or multiple atomic step edges.To corroborate, we correlate the magnetic features to the AFM topography of the sample (Fig. S12).Figs.4e and 4f show line cuts perpendicular to the stripe direction in two regions of the sample surface, and reveal the presence of both mono-and diatomic step edges.The gradiometry data (Fig. 4g,h), are well fitted by a simple model (see Methods), producing a fitted surface magnetization of σ z = 2.1 ± 0.5 µ B /nm 2 , in good agreement with earlier data [14,16].Together, our findings unambiguously confirm the stepped growth of the Cr 2 O 3 (0001) surface [48].To our knowledge, our work reports the first magnetic stray field imaging of atomic steps on an antiferromagnet.It opens a complementary path to existing atomic-scale techniques, such as spin-polarized scanning tunneling microscopy and magnetic exchange force microscopy [54], without sharing the needs for an ultra-high vacuum, a conducting surface, or cryogenic operation.Imaging of magnetic susceptibility -We conclude our study by demonstrating nanoscale imaging of magnetic susceptibility.Susceptometry measurements are important for investigating, for example, the magnetic response of patterned metals and materials [9,55], superconductors [56] as well as para-and superparamagnetic nanoparticles [57,58].Fig. 5a shows a gradiometry map of a 50nm-thick disc made from paramagnetic Pd placed in a bias field of B ext = 35 mT.Under the bias field, the disc develops a magnetization of M = χB ext /µ 0 , where χ Pd is the magnetic susceptibility of the Pd film.A fit to the data (see Methods), shown in Fig. 5b, produces a susceptibility of χ Pd = (6.6 ± 0.2) • 10 −4 .This is slightly smaller than the value of pure Pd (χ Pd = 7.66•10 −4 [59]).The decreased susceptibility may be attributed to either a finitesize effect [60] or hydrogen adsorption [61].Repeating the same experiment with Bi, a diamagnetic sample, produces an experimental value of χ Bi = −(1.7 ± 0.1) • 10 −4 , which matches the accepted room temperature value of χ Bi = −1.67 • 10 −4 [59].Despite the ∼ 4× weaker susceptibility, the magnetic pattern is clearly visible and its sign inverted compared to the paramagnetic Pd disc.Ad- ditionally, local structure is apparent at the center of the disc that is explained by a variation in the film thickness (Fig. S13).Together, Fig. 4a-d demonstrate the feasibility of extending sensitive dc susceptometry to the nanometer scale.
Conclusions -In conclusion, our work demonstrates a simple yet powerful method for the imaging of static magnetization patterns with high sensitivity and spatial resolution.While we demonstrate scanning gradiometry on a layered antiferromagnet, extension to more challenging systems including perfectly compensated collinear antiferromagnets, screw and step dislocations [5], or isolated magnetic defects is natural.In particular, the magnetic signal from an atomic step edge is equivalent to that of a one-dimensional spin chain with a linear magnetization density of σ z h ≈ 0.5 µ B /nm (Methods), demonstrating the feasibility of imaging generic 1D spin systems.Gradiometry is also well-positioned for imaging the internal structure of domain walls and skyrmions, and in particular, for quantifying their size and chirality [16,[62][63][64] (Supplementary Fig. S14).Finally, although we demonstrate gradiometry on magnetic fields, the technique can be extended to electric fields by orienting the external bias magnetic field perpendicular to the NV axis [65][66][67].
In particular, the dynamic mode of operation may alleviate charge screening that has previously limited scanning NV electrometry of dc electric field sources [68].With the ability to image both magnetic and electric fields, one could imagine correlating antiferromagnetic and ferroelectric order in multiferroics [52], providing a unique angle to investigate the magneto-electric coupling in these fascinating and technologically important materials.

Experimental set-up
All experiments were carried out at room temperature with two home-built scanning microscopes.Micropositioning was carried out by closed-loop three-axis piezo stages (Physik Instrumente) and AFM feedback control was carried out by a lock-in amplifier (HF2LI, Zurich Instruments) and standard PID controls.PL of the NV centers was measured with avalanche photodiodes (APDs) (Excelitas) and data were collected by standard data acquisition cards (PCIe-6353, National Instruments).Direct currents sent through the bilayer graphene were created with an arbitrary waveform generator (DN2.663-04,Spectrum Instrumentation) and the current was measured with a transimpedance amplifier (HF2TA, Zurich Instruments).Microwave pulses and sequences were created with a signal generator (Quicksyn FSW-0020, National Instruments) and modulated with an IQ mixer (Marki) and an arbitrary waveform generator (DN2.663-04,Spectrum Instrumentation and HDAWG, Zurich Instruments).NV centers were illuminated at < 100 µW by a custom-designed 520 nm pulsed diode laser.Scanning NV tips were purchased from QZabre AG [38].Three different NV tips were used throughout this study with stand-off distances d between 70 − 130 nm (excluding the 20 nm retract distance).
Magnetic samples Bilayer graphene device: Standard microfabrication processes were used, including mechanical exfoliation and a dry transfer process for generating the hBN-bilayergraphene-hBN stack, electron beam lithography and plasma etching for creating the device geometry and physical vapor deposition for creating the metallic device contacts.Full details can be found in Ref. 26.Cr 2 O 3 crystals: The mechanically polished and nonpolished Cr 2 O 3 bulk single crystals were provided by Prof. Manfred Fiebig.Both crystals have a (0001) surface orientation.Crystal growth and processing details can be found in Refs.16 and 47.Pd and Bi discs: Metallic micro-discs were created using standard microfabrication processes.Discs were defined through electron beam lithography on spin-coated Si wafers.Chemical development of the spin-coated resist, followed by metal deposition of either 50 nm of Pd or Bi and a lift-off process finished the fabrication.
Initialization and readout of NV spin state A laser pulse of ∼ 2 µs duration was used to polarize the NV center into the m S = 0 state.Then, the dc or ac quantum sensing measurement occurred on the m S = 0 to m S = −1 transition (see below).The readout of the NV's spin state was performed by another ∼ 2 µs long laser pulse, during which the photons emitted from the NV center were collected with the APD, binned as a function of time, and summed over a window (∼ 300 ns) that optimized spin-state-dependent PL contrast [69].
DC sensing protocol DC magnetic images were acquired with the pulsed ODMR method [46].Obtained magnetic resonance spectra were fitted for the center frequency f c of a Lorentzian function, is the spin contrast (in percent) and ω L is the width of the Lorentzian dip.In a 2D scan the magnetic field projected along the axis of the NV could be determined at each pixel using B(x, y) = 2π[f c (x, y) − f 0 ]/γ e where f 0 is the resonance frequency far from the surface.For our diamond probes, the NV anisotropy axis was at an θ ∼ 55 • angle with respect to the out-of-plane direction (z-axis in Fig. 1).Therefore, B(x, y) corresponded to the vector field projection along this tilted direction.
AC sensing protocol AC sensing used either a spin echo and or dynamical decoupling sequence [40,41].The NV spin state was initialized optically into the m S = 0 state followed by a microwave π/2-pulse to create a coherence between the m S = 0 and m S = −1 states.The quantum phase φ accumulated between the two states during the coherent precession can be expressed as φ = τ 0 γ e g(t)B(t)dt where g(t) is the modulation function [42], B(t) is the magnetic field, τ is the interaction time (the time in between the first and last π/2-pulse), and where we use the rotating frame approximation.The modulation function alternates between ±1 with each microwave π-pulse during the pulse sequence.While imaging with the gradiometry pulse sequences, 3π/2-pulses were sometimes used instead of the final π/2-pulses for the projective spin readout to reduce pulse imperfections caused by (ca.±100 kHz) drifts in the NV resonance frequency.

Calibration of tuning fork oscillation
We estimated the oscillation amplitude x osc and oscillation angle in the xy-plane, denoted by α, of the tuning forks with two different in-situ measurement techniques.The first method involved processing a static field map and a gradient field map acquired over the same region with a least-squares minimization scheme.By minimizing a cost function proportional to the pixel differences between the B 1 and numerically differentiated B 0 images, estimates for x osc and α were determined.The second method involved a stroboscopic imaging of the static field (B 0 ) synchronized to the tuning fork oscillation.By measuring the time-tagged displacements of magnetic features recorded at different positions during the tuning fork oscillation, x osc and α could be estimated by fitting to the path taken by the NV.We found that x osc scaled linearly with the applied drive voltage for the voltages we used while imaging.Examples of these calibration methods are given in Supplementary Note 4.

Calibration of the trigger delay
In order to optimize the ac sensing sequences, and to distinguish between signals from the first and second derivatives (see Supplementary Note 1), a trigger delay (t 0 ) calibration measurement must be made.The calibration measurement consisted of measuring the phase φ at a stationary point on the sample, while varying t 0 , thus producing a phase that oscillated as a function of t 0 .The chosen value of t 0 was the value which maximized the measured phase.Examples of this calibration measurement, as well as the characterization of PL oscillation caused by the tuning fork motion, are shown in the Supplementary Note 4.
Reconstruction of the static field map from the gradient map A gradient map B 1 can be used to reduce the noise and improve the image of a (less sensitive) static field map B 0 .Letting B T denote the true static magnetic field value, the experimentally measured B 0 and B 1 field maps are where ∂ ∂r = cos(α) ∂ ∂x +sin(α) ∂ ∂y is the directional derivative and w 0 ∼ N (0, σ 2 B0 ) and w 1 ∼ N (0, σ 2 B1 ) are white noise added to each pixel (reflecting the Poissonian shot noise of the photo-detection).In k-space these equations can be transformed into where X denotes the Fourier transform of X, k r = k x cos α + k y sin α is the dot product between the oscillation direction and the k-vector [k x , k y ].Integration in k-space introduces a k-dependent noise term in the gradient field map.In particular, the integrated gradient map has noise amplification near the line k y = − cot(α)k x but has noise suppression far away from that line.Directional sensitivity could be avoided by oscillating the tuning fork in the z-direction (tapping mode), or by using an oscillator that supports orthogonal lateral modes.To circumvent this problem we average two k-space maps (Eq.6) with k-vector dependent weights that reflect the noise added by the integration process.The use of inverse variance weights additionally results in an image with the lowest possible variance.Thus, the optimal reconstructed static field map can be computed by taking the inverse Fourier transform of where k 2 0 = σ 2 B1 /(x 2 osc σ 2 B0 ) defines a cut-off wave vector determined by the oscillation amplitude and the noise variances σ 2 B0 and σ 2 B1 .The corresponding cut-off wavelength λ = 2π/k 0 reflects the spatial wavelength above (below) which the B 0 (B 1 ) field map is less noisy.It should also be noted that the k-space averaging process can be modified to include the B 2 map, however the B 1 map provides the most significant improvement.Specifically, in Fig. 4c, x osc = 23 nm and α = 180 • were used as reconstruction parameters (determined by the calibration in Supplementary Note 4).Note, since the gradient and k-space averaging are directional, the noise reduction is also directional (approximately 22× in the x-direction and 5.6× in the y-direction).
Stray fields from atomic step edges For an atomic step edge propagating along the ydirection the stray field is modeled by two out-of-plane magnetic samples with different heights.Taking the analytical form (see Ref. 62) for the stray fields above an edge at x = 0 as B x (x, z) = −µ0σz 2π z x 2 +z 2 , B y = 0, and , where σ z is the surface magnetization, we define the stray field produced by a small change in the height h as with B step y = 0.The expressions are simplified in the limit of h d since the sub-nanometer atomic step edges are much smaller than typical standoff distances of d ∼ 50 − 100 nm.We measure the gradient of the stray field along the oscillation direction, taken as the x-direction for simplicity.This leads to field gradients of The fits in Fig. 4g and 4h are produced by projecting the field gradients onto the NV axis defined by e = [sin θ cos ϕ, sin θ sin ϕ, cos θ] and summing over multiple steps.The line cuts are produced by rotating and plane averaging a 2D image (Fig. S12).We account for the rotation angle in the xy-plane by introducing an additional image rotation angle ϕ .The experimentally measured B 1 field is then fitted by We set h = 0.227 nm and ϕ = 40 • for the fit in Fig. 4g, h = 0.454 nm and ϕ = 23 • for the fit in Fig. 4h and fixed x osc = 46 nm (determined by the tip calibration) in both fits.The standoff distance d, the surface magnetization σ z , angles θ and ϕ and step edge locations are free parameters in the fit.Collectively, the fitted line scans give d = 89±12 nm (including the 20 nm retract distance) and σ z = 2.1 ± 0.5 µ B /nm 2 , which is consistent with previous measurements on this sample [16].Note, Eq. 8 is functionally equivalent to the magnetic field from a one-dimensional ferromagnetic spin chain with a linear magnetization density of M 1D = σ z h.To demonstrate this, we calculate the stray field produced by a infinite line of magnetic dipoles along the line x = 0 and pointing in the x-direction as: where r 2 = x 2 + y 2 + d 2 .
Susceptibility fitting for Pd and Bi discs Susceptibility fits followed the assumption that the stray field produced by a para-or diamagnetic sample is identical to that of a homogeneously magnetized body with a magnetization magnitude of M = χ Pd/Bi B ext /µ 0 and a magnetization vector that is parallel to the external polarizing field.The stray field produced by this magnetization is B( r) = −µ 0 ∇φ mag ( r) where φ mag ( r) is the magnetic potential.We computed the stray field using the k-space method of Ref. [70] and fitted the gradient image to the numerically computed gradient fields.In the fitting procedure we fixed x osc = 69 nm, α = 180 • (determined by the tip calibration) and sample thickness t = 50 nm while the standoff distance d, magnetization magnitude M , angles θ and ϕ, circle radius and position are free parameters in the fit.The susceptibilities are computed as χ Pd/Bi = µ 0 M/B ext and the fitted magnetizations were M Pd = 18.6 ± 0.6 A/m and M Bi = −4.4± 0.4 A/m.

Figure 1 .
Figure 1.Experimental set-up.a, Schematic of the scanning gradiometer.A single NV center located at the apex of a diamond tip is oscillated in shear-mode using a quartz tuning fork.The microwave pulse generation is synchronized, via a lock-in controller, with the electrical drive of the tuning fork.An objective located above the NV (not shown) is used to apply laser pulses and collect the NV photo-luminescence.A three-axis piezo stage (not shown) is used to position and scan the sample surface under the sensor.b, Detail showing the orientations of sample, tip and direction of oscillation.c, Scanning electron micrograph of a quartz tuning fork and diamond tip (inset).Scale bars, 200 µm and 1 µm (inset).

Figure 3 .
Figure 3. Two-dimensional scanning gradiometry of current flow in a graphene test geometry.a, Measured and unwrapped quantum phase φ (measured) plotted as a function of tip oscillation amplitude xosc for the first (blue) and second (orange) harmonic.Solid lines are ∝ xosc and ∝ x 2 osc , respectively.Dashed line indicates maximum oscillation amplitude before the Taylor approximation breaks down due to the onset of spatial averaging.b, Schematic of the bilayer graphene device.A direct current of I dc ≈ 5.3 µA (white arrow) is applied between the indicated contacts (width ∼ 400 nm).c, Static field map B0, gradient map B1, second derivative map B2 from the area indicated in b.Contours reflect the device layout.Dwell time is 30 s per pixel.Scale bar, 1 µm.d, Analytical spatial profiles for the z component of the magnetic field, gradient and second derivative generated across the two contacts (dotted lines in c).The far-field decay with x is also indicated.

Figure 4 .
Figure 4. Topographic fields from antiferromagnetic Cr2O3.a, Gradiometry map B1 of topographic defects from a polished Cr2O3 single crystal.Dwell time is 10 s per pixel and xosc = 23 nm.b, Corresponding static field map B0.Dwell time is 1 s per pixel.c, Improved static field map B0 obtained from a weighted average of a and b (see Methods).The noise standard deviation is reduced from 1.8 µT (b) to 90 nT in the oscillation direction (x-direction) and 340 nT in the y-direction (c).The directional sensitivity could be avoided using tapping mode oscillation (see Methods).When normalized by measurement time, B1 is more sensitive than B0 by a factor larger than 8. d, B1 image of the stray field generated by atomic steps on an as-grown Cr2O3(0001) surface.Two magnetic defects which produce much larger gradient signals are also visible.Inset is a detail of defects and atomic steps recorded with higher pixel resolution.Distance between steps is ca.400 nm (arrow).Scale bars in a-d, 1 µm.e-f, AFM line scans revealing mono-and diatomic steps with different terrace sizes.h is the distance between neighboring O-planes along the Cr2O3 c-axis[47,48].Insets show sketches of atomic steps and up-down ordering of Cr 3+ moments (red, blue).Curved arrows are field lines.g-h, Gradiometry line scans acquired over different areas on the as-grown Cr2O3 surface.The profiles are fitted to a stray field model involving atomic steps (solid lines).xosc = 46 nm in d, g, and h.

Figure 5 .
Figure 5. Nanoscale susceptometry.a, Measured B1 image of a 2-µm-diameter paramagnetic Pd disc in a 35 mT bias field.b, Calculated B1 image (best fit) of the Pd disc.c,d, Corresponding measurement and calculation for diamagnetic Bi in a bias field of 33 mT.Offsets of 51 nT and 38 nT due to the gradient of the external bias magnet are subtracted from a and c respectively.See Methods for calculation and fit details.Scale bars, 1 µm.