Randomisation of Pulse Phases for Unambiguous and Robust Quantum Sensing
Zhen-Yu Wang, Jacob E. Lang, Simon Schmitt, Johannes Lang, Jorge Casanova, Liam McGuinness, Tania S. Monteiro, Fedor Jelezko, Martin B. Plenio
RRandomisation of Pulse Phases for Unambiguous and Robust Quantum Sensing
Zhen-Yu Wang , † , ∗ Jacob E. Lang , † Simon Schmitt , † Johannes Lang ,Jorge Casanova , , Liam McGuinness , Tania S. Monteiro , Fedor Jelezko , and Martin B. Plenio
1. Institut f¨ur Theoretische Physik und IQST, Albert-Einstein-Allee 11, Universit¨at Ulm, D-89069 Ulm, Germany2. Department of Physics and Astronomy, University College London, Gower Street, London WC1E 6BT, United Kingdom3. Institute of Quantum Optics, Albert-Einstein-Allee 11, Universit¨at Ulm, D-89069 Ulm, Germany4. Department of Physical Chemistry, University of the Basque Country UPV / EHU, Apartado 644, 48080 Bilbao, Spain and5. IKERBASQUE, Basque Foundation for Science, Maria Diaz de Haro 3, 48013, Bilbao, Spain
We develop theoretically and demonstrate experimentally a universal dynamical decoupling method for robustquantum sensing with unambiguous signal identification. Our method uses randomisation of control pulses tosuppress simultaneously two types of errors in the measured spectra that would otherwise lead to false signalidentification. These are spurious responses due to finite-width π pulses, as well as signal distortion caused by π pulse imperfections. For the cases of nanoscale nuclear spin sensing and AC magnetometry, we benchmarkthe performance of the protocol with a single nitrogen vacancy centre in diamond against widely used non-randomised pulse sequences. Our method is general and can be combined with existing multipulse quantumsensing sequences to enhance their performance. Introduction.–
The nitrogen-vacancy (NV) centre [1] in di-amond has demonstrated excellent sensitivity and nanoscaleresolution in a range of quantum sensing experiments [2–5]. In particular, under dynamical decoupling (DD) con-trol [6] the NV centre can be protected against environmen-tal noise [7–9] while at the same time being made sensitiveto an AC magnetic field of a particular frequency [10]. Thismakes the NV centre a highly promising probe for nanoscalenuclear magnetic resonance (NMR) and magnetic resonanceimaging (MRI) [11–19]. Moreover, NV centers under DDcontrol can be used to detect, identify, and control nearbysingle nuclear spins [20–28] and spin clusters [29–33], forapplications in quantum sensing [34], quantum informationprocessing [35, 36], quantum simulations [37], and quantumnetworks [38, 39].Errors in the DD control pulses are unavoidable in exper-iments and limit performance especially for larger numberof pulses. To compensate for detuning and amplitude er-rors in control pulses, robust DD sequences that include sev-eral pulse phases [7, 40–42] were developed. However, theserobust sequences still require good pulse-phase control and,more importantly, they introduce spurious harmonic response[43] due to the finite length of the control pulses. This spu-rious response leads to false signal identification, e.g. themisidentification of C nuclei for H nuclei, and hence im-pact negatively the reliability and reproducibility of quantumsensing experiments. Under special circumstances it is pos-sible to control some of these spurious peaks [44–46]. How-ever, it is highly desirable to design a systematic and reliablemethod to suppress any spurious response and to improve ro-bustness of all existing DD sequences, such as the routinelyused XY family of sequences [40], the universally robust (UR)sequences [42], and other DD sequences leading to enhancednuclear selectivity [41, 47].In this Letter, we demonstrate that phase randomisationupon repetition of a basic pulse unit of DD sequences is ageneric tool that improves their robustness and eliminates spu-rious response whilst maintaining the desired signal. This
XY8(b) ... C opp e r w i r e D i a m o n d NV m s =0m s =-1m s =+1 (a)(c)(d) ... ... ... ... RAND repeat M times Standard ... ... ... ...
FIG. 1. Randomisation protocol for quantum sensing. (a) Experi-mental set-up with an NV centre in diamond used as a quantum sen-sor. (b) A basic unit of pulse sequence for quantum sensing, which isdefined by the positions and phases of the π pulses. The lower panelis the example of an XY8 sequence with its associate F z ( t ) and F ⊥ ( t ).(c) The standard way to construct a longer sensing sequence is to re-peat the same basic pulse unit in (b) M times. (d) The randomisationprotocol shifts all the pulses within each unit by a common randomphase Φ r , m . The random phases Φ r , m at di ff erent blocks are indepen-dent. One may refresh all the random phases { Φ r , , Φ r , , . . . , Φ r , M } atdi ff erent runs of the sensing experiment. is achieved by, firstly, adding a global phase to the applied π pulses within one elemental unit and, secondly, randomlychanging this phase each time the unit is repeated. Ourmethod is universal, that is, it can be directly incorporatedto arbitrary DD sequences and is applicable for any physicalrealisation of a qubit sensor. DD-based quantum sensing.–
Whilst our method is appli-cable to any qubit sensor, we illustrate it here with single NV a r X i v : . [ qu a n t - ph ] M a r (a) Frequency (kHz) P opu l a ti on UR8RUR8idealYY8RYY8ideal with 5% errors with 5% errors with 5% errors (b)(c) (d)(e) (f)
XY8RXY8ideal
FIG. 2. Quantum spectroscopy with DD. (a) Simulated averagedpopulation signal as a function of the DD frequency [1 / (2 τ ) for pulsespacing τ ]. One H spin and one C spin are coupled to the NV cen-tre via the hyperfine-field components [41, 48] ( A ⊥ , A (cid:107) ) = π × (2 , π × (5 ,
50) kHz, respectively. The orange dashed line (bluesolid line) is the signal obtained by a standard XY8 (randomisedXY8) sequence using rectangular π pulses with a time duration of200 ns and M = C distorts the proton spinsignal centred at the proton spin frequency (see the vertical dashedlines indicating the target H and the spurious C resonance frequen-cies for a magnetic field 450 G). The randomised XY8 sequencesignificantly reduces the signal distortion due to non-instantaneouscontrol and reveals the real proton signal (see the green dash-dottedline for the signal obtained by a perfect XY8 sequence). (b) As (a)but adding 5% (in terms of the ideal Rabi frequency) of errors inboth driving amplitude and frequency detuning to the π pulses. (c)and (d) [(e) and (f)] are the same as (a) and (b) but for the YY8 [46][UR8 [42]] sequence. Despite the YY8 sequence - which uses single-axis control to mitigate the spurious peak in the C spectrum whenthere is no pulse error - the presence of the C still distorts the pro-ton spin signal centred at the proton spin frequency. In all cases,the randomised protocol reduces the signal distortion due to non-instantaneous control and control errors. centres. For all experiments in this work a bias magnetic fieldbetween 400 and 500 Gauss aligned with the NV-axis splitsthe degenerate m s = ± m s = ↔ m s = − | (cid:105) [see Fig. 1(a)and [48] for details of the experimental set-up]. The sensorqubit and its environmental interaction takes the general formˆ H (cid:48) ( t ) = ˆ σ z ˆ E ( t ). Here ˆ σ z = | (cid:105)(cid:104) | − | (cid:105)(cid:104) | is the Pauli oper-ator of the sensor qubit, and ˆ E ( t ) is an operator that includesthe target signal which oscillates at a particular frequency aswell as the presence of noisy environmental fluctuations. Inthe case of nuclear-spin sensing, ˆ E ( t ) contains target and bathnuclear spin operators oscillating at their Larmor frequen-cies. For AC magnetometry, ˆ E ( t ) describe classical oscillatingmagnetic fields. The aim of quantum sensing is to detect a tar- get such as a single nuclear spin via the control of the quantumsensor with a sequence of DD π pulses. The latter often corre-sponds to a periodic repetition of a basic pulse unit which hasa time duration T and a number N of pulses [see Fig. 1(b)].The propagator of a single π pulse unit in a general form readsˆ U unit ( { φ j } ) = ˆ f N + ˆ P ( φ N ) ˆ f N · · · ˆ P ( φ ) ˆ f ˆ P ( φ ) ˆ f , where ˆ f j arethe free evolutions separated by the control π pulses with thepropagator ˆ P ( φ j ). Errors in the control are included in ˆ P ( φ j ),while the di ff erent pulse phases φ j are used by robust DD se-quences to mitigate the e ff ect of detuning and amplitude er-rors of the π pulses. Using M repetitions of the basic DD unit[see Fig. 1(c) for the case of a standard construction] allowsfor M -fold increased signal accumulation time T total = MT which enhances the acquired contrast of the weak signal as ∝ M [29] and improves the fundamental frequency resolu-tion to ∼ / T total .To see how a target signal is sensed, we write the Hamilto-nian H (cid:48) ( t ) in the interaction picture of the DD control as [48]ˆ H ( t ) = F z ( t ) ˆ σ z ˆ E ( t ) +
12 [ F ⊥ ( t ) ˆ σ − + H . c . ] ˆ E ( t ) , (1)where ˆ σ − = | (cid:105)(cid:104) | . For ideal instantaneous π pulses, F ⊥ ( t ) = F ⊥ ( t ) vanishesbetween the π pulses] and the modulation function F z ( t ) is thestepped modulation function widely used in the literature, thatis, F z ( t ) = ( − m when m π -pulses have been applied up to themoment t . The role of a DD based quantum sensing sequenceis to tailor F z ( t ) such that it oscillates at the same frequency asthe target signal in ˆ E ( t ), allowing resonant coherent couplingbetween the sensor and the target.In realistic situations, where the π pulses are not instanta-neous due to limited control power, the function F ⊥ ( t ) has anon-zero value during π pulse execution and F z ( t ) deviatesfrom ± ff ect of devi-ation in F z ( t ) by pulse shaping technique [50], the presenceof non-zero F ⊥ ( t ) may still alter the expected signal or causespurious peaks to appear [43]. In general, an oscillating com-ponent with a frequency k / T total ( k being an integer) in ˆ E ( t ),not resonant with F z ( t ), will create spurious response whenthe Fourier amplitude [45, 48] f ⊥ k = T total (cid:90) T total F ⊥ ( t ) exp( − i π kt / T total ) dt (2)of F ⊥ ( t ) is non-zero. This spurious response can cause falsesignal identification, e.g., a wrong conclusion on the detectednuclear species [43], exemplified in Figs. 2 and 3. Suppressingthe spurious response from C nuclei is especially critical, asit allows reliable nanoscale NMR or MRI without the use ofhard to manufacture and consequently expensive, highly iso-topically C purified diamond. However, as shown in Fig. 2(c),(d), even for a YY8 sequence (designed to remove spuri-ous resonances [46]) the target proton signal is still perturbedby other nuclear species ( C in this case). In the presenceof amplitude and detuning errors, standard strategies performeven worse. I n t en s i t y ( a . u . ) XY8RXY8M=30 I n t en s i t y ( a . u . ) XY8RXY8(b) M=20XY8RXY8XY8RXY8(a) 0.4 0.6 2.0 2.21.0 M=1250.00.20.40.6 I n t en s i t y ( a . u . ) I n t en s i t y ( a . u . ) FIG. 3. Removing spurious response with the phase randomisationprotocol. (a) In the measured spectrum of an AC magnetic fieldsensed by a standard repetition of the XY8 sequence (see orange di-amonds), the non-instantaneous π pulses produce spurious peaks atthe frequencies 2 ν and 4 ν . Repeating the XY8 sequence with phaserandomisation (see blue bullets) preserves the desired signal centredat ν and e ffi ciently suppresses all the spurious peaks. The XY8 unitwas repeated M =
25 times in the upper panel and M =
125 inthe lower panel for a longer sensing time. (b) Detection of protonspins using the XY8 sequence. For the measured spectrum obtainedby the standard protocol, the C nuclear spins naturally in diamondproduce a strong and wide spurious peak that hinders proton spin de-tection. Using the randomisation protocol, the spurious C peak hasbeen suppressed, revealing the proton spin signal centred around afrequency of 1.9 MHz.
To remove all spurious peaks, one seeks to design a DDsequence that minimises the e ff ect of F ⊥ ( t ) in a robust man-ner. We observe that by introducing a global phase to all the π pulses, the form of F z ( t ) is unchanged but a phase factoris added to F ⊥ ( t ). This motivates the following method topreserve F z ( t ) and to suppress the e ff ect of F ⊥ ( t ) by phaserandomisation. Phase randomisation.–
In the randomisation protocol, arandom global phase Φ r , m (where the subscript r means a ran-dom value) is added to all the pulses within each unit m , asshown in Fig. 1(d). The propagator of M DD units with in-dependent global phases reads ˆ U r = (cid:81) Mm = ˆ U unit ( { φ j + Φ r , m } ).If one sets all the random phases Φ r , m to the same value (e.g.zero) the original DD sequence can be recovered [Fig. 1(c)].Since each of the global phases does not change the internalstructure (i.e., the relative phases among π pulses) of the ba-sic unit, the robustness of the basic DD sequence is preserved. On the other hand, as we will show in the following, theserandom global phases prevent control imperfections from ac-cumulating. Universal suppression of spurious response.–
The randomi-sation protocol provides a universal method to suppress spu-rious response. For the sequence with randomisation, one canfind that the Fourier amplitude reads f ⊥ k = Z r , M ˜ f ⊥ k / M , where˜ f ⊥ k / M = T (cid:82) T F ⊥ ( t ) exp( − i π ktMT ) dt is the Fourier component de-fined over a single period T [48]. For random phases { Φ r , m } ,the factor Z r , M = M M (cid:88) m = exp( i Φ r , m ) , (3)captures the e ff ect of the randomisation protocol. Due tothe random values of the phases Φ r , m , Z r , M becomes a (nor-malised) 2D random walk with (cid:104)| Z r , M | (cid:105) = / M thus suppress-ing the contrast of spurious response by a factor of 1 / (2 M )compared with the standard protocol [48]. Here, we note thatone can design a set of specific (i.e. not random) phases Φ r , m that minimise a certain f ⊥ k completely. However, this set ofphases would be specific to one k -value (i.e. it does not sup-press all spurious peaks simultaneously). In this respect, thepower of our method is that it is simple to implement andfully universal, suppressing all spurious peaks produced byany sequence whilst still retaining the ideal signal, as shownin Fig. 2.To experimentally benchmark the performance, we car-ried out nanoscale detection of a classical AC magnetic field[Fig. 3 (a)] and, separately, the nanoscale NMR detection ofan ensemble of proton spins with a natural C abundance(1 . π pulses is non-zero. In contrast, the randomisation protocolsuppresses all the spurious peaks in the spectrum e ffi ciently,and the spurious background noise from a C nuclear spinbath in diamond was removed while the desired proton sig-nal was una ff ected, demonstrating a clear and unambiguousproton spin detection without the use of C isotopically purediamonds.In the experiments, we have repeated the randomisationprotocol with K =
10 samples of the random phase se-quences { Φ r , m } and averaged out the measured signals. Thisreduces the fluctuations of the (suppressed) spurious peaks,introduced by the applied random phases, because the vari-ance of | Z r , M | (which is ( M − / M ) is further reduced by afactor of 1 / K [48].Removing the spurious response also improves the accu-racy, for example, in measuring the depth of individual NVcentres [19]. By falsely assuming that all the signal around1 . . ± .
52 nm, instead of 7 . ± .
29 nm obtained by therandomised XY8 - a deviation of about 30 % [see Fig. 3 (b)].
10 20 300
XY8 (simulation) -10-2001020
XY8 (experiment)
10 200-10-2001020
RXY8 (experiment) P h a s e e rr o r [ ° ]
60 600 1000200 (b) ----
10 20 300
RXY8 (simulation) -10-2001020 R a b i E rr o r [ % ] RXY8 (experiment)
10 200-10-2001020 (a) XY8 (experiment)
MW detuning [%] Pulse spacing [ns]
FIG. 4. Experimental enhancement of sequence robustness with thephase randomisation protocol. (a) The fidelity of XY8 sequences asa function of detuning and Rabi frequency errors for randomisation(upper panels) and standard (lower panels) protocols. The controlerrors are measured in terms of the ideal Rabi frequency Ω ideal = π × . M =
25 XY8 units. (b) The fidelity of XY8 sequences with respectto a static phase error between the X and Y pulses and the inter-pulsetime interval τ , for randomised (upper panels) and standard (lowerpanels) protocols with M =
12. Resonant microwave π pulses areused with a Rabi frequency Ω ideal = π × . Enhancement on control robustness.–
As indicated inFig. 2, the randomisation protocol also enhances the robust-ness of the whole DD sequence. For simplicity, in the fol-lowing discussion we neglect the e ff ect of the environmentand concentrate on static control imperfections. The lat-ter introduce errors in the form of non-zero matrix elements (cid:104) | ˆ U unit | (cid:105) = C (cid:15) + O ( (cid:15) ), where (cid:15) is a small parameter and C isa prefactor depending on the explicit form of control (see [48]for details). For the standard protocol where the same ˆ U unit block is repeated, the static errors accumulate coherently,yielding (cid:104) | ( ˆ U unit ) M | (cid:105) = MC (cid:15) + O ( (cid:15) ). The random phasesin the randomisation protocol avoids this coherent error ac-cumulation and one can find (cid:104) | ˆ U r | (cid:105) = Z r , M MC (cid:15) + O ( (cid:15) ),where the error is suppressed by the factor Z r , M which is givenby Eq. (3) for random phases [48]. Compared with the sup-pression of control imperfections by deterministic phases, therandomisation protocol is universal and achieves both sup-pression of spurious response and enhancement of robustness,without loss of sensitivity to target signals as shown in Figs. 2and 3.In Fig. 4 (a), we show the robustness of the widely usedXY8 sequence, with respect to amplitude bias and frequencydetuning of the microwave pulses, for the randomisation andstandard protocols. The simulation and experiment demon-strate robustness improvement after applying phase randomi-sation. As shown in Fig. 4 (b), the randomisation protocolalso suppresses errors in pulse phases. The latter is especiallyrelevant for digital pulsing devices where the signal from a mi-crowave source is split-up and the phase in one arm is shiftedby suitable equipments. On top of errors due to the workingaccuracy of these devices, di ff erent cable lengths in both arms can sum up to errors in the relative phase. Conclusion.–
We present a randomisation protocol for DDsequences that e ffi ciently and universally suppresses spuri-ous response whilst maintaining the expected signal. Thismethod is simple to implement, only requiring additional ran-dom control-pulse phases, and is valid for all DD sequencechoices. The protocol functions equally well for quantum andclassical signals, allowing clear and unambiguous AC fieldand nuclear spin detection, e.g., with the widely used XY fam-ily of sequences. Furthermore, the protocol also enhances therobustness of the whole pulse sequences. For sensing exper-iments with NV centres, the protocol reduces the reliance onhard to manufacture, expensive, highly isotopically purifieddiamond. The method has a general character being equallyapplicable to other quantum platforms and other DD appli-cations. For example, it could be used to improve correla-tion spectroscopy [18, 32, 51, 52] in quantum sensing and fastquantum gates in trapped ions [53, 54] where DD has beenused as an important ingredient. Acknowledgements.–
M. B. P. and Z.-Y. W. acknowledgesupport by the ERC Synergy grant BioQ (Grant No. 319130),the EU project HYPERDIAMOND and AsteriQs, the Quan-tERA project NanoSpin, the BMBF project DiaPol, the stateof Baden-W¨urttemberg through bwHPC, and the German Re-search Foundation (DFG) through Grant No. INST 40 / / ∗ E-mail: [email protected] † These authors contributed equally to this work[1] M. W. Doherty, N. B. Manson, P. Delaney, F. Jelezko, J.Wrachtrup, and L. C. L. Hollenberg, The nitrogen-vacancycolour centre in diamond,
Phys. Rep. , 1 (2013).[2] R. Schirhagl, K. Chang , M. Loretz and C. L. Degen, Nitrogen-Vacancy Centers in Diamond: Nanoscale Sensors for Physicsand Biology,
Annu. Rev. Phys. Chem. , 83 (2014).[3] L. Rondin, J. P. Tetienne, T. Hingant, J. F. Roch, P. Maletinskyand V. Jacques, Magnetometry with nitrogen-vacancy defects indiamond, Rep. Prog. Phys. , 056503 (2014).[4] D. Suter and F. Jelezko, Single-spin magnetic resonance in thenitrogen-vacancy center of diamond, Prog. Nucl. Magn. Reson.Spectrosc. , 50 (2017).[5] Y. Wu, F. Jelezko, M. B. Plenio and T. Weil, Diamond QuantumDevices in Biology,
Angew. Chem. Int. Ed. , 6586 (2016).[6] A. M. Souza, G. A. ´Alvarez, and D. Suter, Robust dynamicalcoupling. Phil. Trans. R. Soc. A , 4748 (2012).[7] C. A. Ryan, J. S. Hodges, and D. G. Cory, Robust DecouplingTechniques to Extend Quantum Coherence in Diamond,
Phys.Rev. Lett. , 200402 (2010).[8] G. de Lange, Z. Wang, D. Riste, V. Dobrovitski, and R. Hanson,Universal Dynamical Decoupling of a Single Solid-State Spin from a Spin Bath,
Science , 60 (2010).[9] B. Naydenov, F. Dolde, L. T. Hall, C. Shin, H. Fedder, L. C.L. Hollenberg, F. Jelezko, and J. Wrachtrup, Dynamical Decou-pling of a Single-Electron Spin at Room Temperature, Phys. Rev.B 83, 081201 (2011).[10] G. De Lange, D. Riste, V. V. Dobrovitski, and R. Hanson,Single-Spin Magnetometry with Multipulse Sensing Sequences,Phys. Rev. Lett. 106, 080802 (2011).[11] T. Staudacher, F. Shi, S. Pezzagna, J. Meijer, J. Du, C. A. Mer-iles, F. Reinhard, J. Wrachtrupp, Nuclear Magnetic ResonanceSpectroscopy on a (5-Nanometer) Sample Volume,
Science ,561 (2013).[12] D. Rugar, H. J. Mamin, M. H. Sherwood, M. Kim, C. T. Ret-tner, K. Ohno, and D. D. Awschalom, Proton magnetic resonanceimaging using a nitrogenvacancy spin sensor,
Nat. Nanotechnol. , 120 (2015).[13] S. J. DeVience, L. M. Pham, I. Lovchinsky, A. O. Sushkov,N. Bar-Gill, C. Belthangady, F. Casola, M. Corbett, H. Zhang,M. Lukin, H. Park, A. Yacoby, and R. L. Walsworth, NanoscaleNMR spectroscopy and imaging of multiple nuclear species, Nat.Nanotechnol. , 129 (2015).[14] F. Shi, Q. Zhang, P. Wang, H. Sun, J. Wang, X. Rong, M. Chen,C. Ju, F. Reinhard, H. Chen, J. Wrachtrup, J. Wang, and J. Du,Single-protein spin resonance spectroscopy under ambient con-ditions, Science , 1135 (2015).[15] S. Schmitt, T. Gefen, F. M. Strner, T. Unden, G. Wol ff , C. Mller,J. Scheuer, B. Naydenov, M. Markham, S. Pezzagna, J. Mei-jer, I. Schwarz, M. Plenio, A. Retzker, L. P. McGuinness, andF. Jelezko, Submillihertz magnetic spectroscopy performed witha nanoscale quantum sensor, Science , 832 (2017).[16] J. M. Boss, K. S. Cujia, J. Zopes, and C. L. Degen, Quantumsensing with arbitrary frequency resolution,
Science , 837(2017).[17] D. R. Glenn, D. B. Bucher, J. Lee, M. D. Lukin, H. Park, andR. L. Walsworth, High-Resolution Magnetic Resonance Spec-troscopy Using a Solid-State Spin Sensor,
Nature (London) ,351 (2018).[18] T.Rosskopf, J. Zopes, J. M. Boss, and C. L. Degen, A quan-tum spectrum analyzer enhanced by a nuclear spin memory, npjQuantum Inf. , 33 (2017).[19] L. M. Pham, S. J. DeVience, F. Casola, I. Lovchinsky, A. O.Sushkov, E. Bersin, J. Lee, E. Urbach, P. Cappellaro, H. Park,A. Yacoby, M. Lukin, and R. L. Walsworth, NMR technique fordetermining the depth of shallow nitrogen-vacancy centers in di-amond, Phys. Rev. B , 045425 (2016).[20] T. H. Taminiau, J. J. T. Wagenaar, T. Van der Sar, F. Jelezko, V.V. Dobrovitski and R. Hanson, Detection and Control of Individ-ual Nuclear Spins Using a Weakly Coupled Electron Spin, Phys.Rev. Lett. , 137602 (2012).[21] S. Kolkowitz, Q. P. Unterreithmeier, S. D. Bennett and M. D.Lukin, Sensing Distant Nuclear Spins with a Single ElectronSpin,
Phys. Rev. Lett. , 137601 (2012).[22] N. Zhao, J. Honert, B. Schmid, M. Klas, J. Isoya, M. Markham,D. Twitchen, F. Jelezko, R. B. Liu, H. Fedder and J. Wrachtrup,Sensing single remote nuclear spins,
Nat. Nanotechnol. , 657(2012).[23] C. M¨uller, X. Kong, J.-M. Cai, K. Melentijevic, A. Stacey, M.Markham, J. Isoya, S. Pezzagna, J. Meijer, J. Du, M.B. Plenio,B. Naydenov, L.P. McGuinness and F. Jelezko. Nuclear mag-netic resonance spectroscopy with single spin sensitivity.
NatureComm. , 4703 (2014).[24] J. E. Lang, R. B. Liu, and T. S. Monteiro, Dynamical-Decoupling-Based Quantum Sensing: Floquet Spectroscopy, Phys. Rev. X , 041016 (2015). [25] Kento Sasaki, Kohei M. Itoh, and Eisuke Abe, Determinationof the position of a single nuclear spin from free nuclear preces-sions detected by a solid-state quantum sensor, Phys. Rev. B ,121405(R) (2018).[26] J. Zopes, K. S. Cujia, K. Sasaki, J. M. Boss, K. M. Itoh, andC. L. Degen, Three-dimensional localization spectroscopy of in-dividual nuclear spins with sub-Angstrom resolution, Nat. Com-mun. , 4678 (2018).[27] J. Zopes, K. Herb, K. S. Cujia, and C. L. Degen, Three-Dimensional Nuclear Spin Positioning Using Coherent Radio-Frequency Control, Phys. Rev. Lett. , 170801 (2018).[28] M. Pfender, P. Wang, H. Sumiya, S. Onoda, W. Yang, D. B. R.Dasari, P. Neumann, X.-Y. Pan, J. Isoya, R.-B. Liu, J. Wrachtrup,High-resolution spectroscopy of single nuclear spins via sequen-tial weak measurements,
Nat. Commun. , 594 (2019).[29] N. Zhao, J-L. Hu, S-W. Ho, J. T. K. Wan and R. B. Liu RB, Atomic-scale magnetometry of distant nuclear spin clustersvia nitrogen-vacancy spin in diamond, Nat. Nanotechnol. , 242(2011).[30] F. Shi, X. Kong, P. Wang P, F. Kong, N. Zhao, R. B. Liuand J. Du, Sensing and atomic-scale structure analysis of singlenuclear-spin clusters in diamond, Nature Phys. , 21 (2014).[31] Z-Y. Wang, J. F. Haase, J. Casanova and M. B. Plenio, Position-ing nuclear spins in interacting clusters for quantum technologiesand bioimaging, Phys. Rev. B , 174104 (2016).[32] Z.-Y. Wang, J. Casanova, and M. B. Plenio, Delayed entangle-ment echo for individual control of a large number of nuclearspins. Nat. Commun. , 14660 (2017).[33] M. H. Abobeih, J. Cramer, M. A. Bakker, N. Kalb, M.Markham, D. J. Twitchen, and T. H. Taminiau, One-secondcoherence for a single electron spin coupled to a multi-qubitnuclear-spin environment, Nat. Commun. , 2552 (2018).[34] C. L. Degen, F. Reinhard, and P. Cappellaro, Quantum sensing, Rev. Mod. Phys. , 035002 (2017).[35] J. Casanova, Z.-Y. Wang, and M. B. Plenio, Noise-ResilientQuantum Computing with a Nitrogen-Vacancy Center and Nu-clear Spins, Phys. Rev. Lett. , 130502 (2016).[36] J. Casanova, Z.-Y. Wang, and M. B. Plenio, Arbitrary nuclear-spin gates in diamond mediated by a nitrogen-vacancy-centerelectron spin.
Phys. Rev. A , 032314 (2017).[37] J. M. Cai, A. Retzker, F. Jelezko, and M. B. Plenio, A large-scale quantum simulator on a diamond surface at room tempera-ture, Nat. Phys. , 168 (2013).[38] P. C. Humphreys, N. Kalb, J. P. J. Morits, R. N. Schouten, R.F. L. Vermeulen, D.l J. Twitchen, M. Markham, and R. Hanson,Deterministic delivery of remote entanglement on a quantum net-work, Nature (London) , 268 (2018).[39] M. A. Perlin, Z.-Y. Wang, J. Casanova, and M. B. Plenio, Noise-resilient architecture of a hybrid electron-nuclear quantum regis-ter in diamond,
Quantum Sci. Technol. , 015007 (2019).[40] T. Gullion, D. B. Barker and M. S. Conradi, New, compensatedCarr-Purcell sequences, J. Magn. Reson. , 479 (1990).[41] J. Casanova, Z-Y. Wang, J. F. Haase, and M. B. Plenio, Robustdynamical decoupling sequences for individual-nuclear-spin ad-dressing, Phys. Rev. A , 042304 (2015).[42] G. T. Genov, D. Schraft, N. V. Vitanov, and T. Halfmann, Arbi-trarily Accurate Pulse Sequences for Robust Dynamical Decou-pling, Phys. Rev. Lett. , 133202 (2017).[43] M. Loretz, J. M. Boss, T. Rosskopf, H. J. Mamin, D. Rugarand C. L. Degen, Spurious Harmonic Response of MultipulseQuantum Sensing Sequences,
Phys. Rev. X , 021009 (2015).[44] J. F. Haase, Z-Y. Wang, J. Casanova and M. B. Plenio, Pulse-phase control for spectral disambiguation in quantum sensingprotocols, Phys. Rev. A , 032322 (2016). [45] J. E. Lang, J. Casanova, Z.-Y. Wang, M. B. Plenio, T. S. Mon-teiro, Enhanced Resolution in Nanoscale NMR via QuantumSensing with Pulses of Finite Duration, Phys. Rev. Applied ,054009 (2017).[46] Z. Shu, Z. Zhang, Q. Cao, P. Yang, M. B. Plenio, C. M¨uller, J.Lang, N. Tomek, B. Naydenov, L. P. McGuinness, F. Jelezko, andJ. Cai, Unambiguous nuclear spin detection using an engineeredquantum sensing sequence, Phys. Rev. A , 051402(R) (2017).[47] J. F. Haase, Z.-Y. Wang, J. Casanova, M. B. Plenio, Soft Quan-tum Control for Highly Selective Interactions among Joint Quan-tum Systems, Phys. Rev. Lett. , 050402 (2018).[48] See Supplemental Material.[49] J. E. Lang, T. Madhavan, J.-P. Tetienne, D. A. Broadway, L.T. Hall, T. Teraji, T. S. Monteiro, A. Stacey, and L. C. L. Hol-lenberg, Nonvanishing e ff ect of detuning errors in dynamical-decoupling-based quantum sensing experiments, Phys. Rev. A , 012110 (2019).[50] J. Casanova, Z.-Y. Wang, I. Schwartz, M. B. Plenio, ShapedPulses for Energy-E ffi cient High-Field NMR at the Nanoscale, Phys. Rev. Applied , 044072 (2018).[51] A. Laraoui, F. Dolde, C. Burk, F. Reinhard, J. Wrachtrup, andC. A. Meriles, High-resolution correlation spectroscopy of Cspins near a nitrogen-vacancy centre in diamond,
Nat. Commun. , 1651 (2013).[52] W.-L. Ma and R.-B. Liu, Proposal for Quantum Sensing Basedon Two-Dimensional Dynamical Decoupling: NMR CorrelationSpectroscopy of Single Molecules, Phys. Rev. Applied , 054012(2016).[53] I. Arrazola, J. Casanova, J. S. Pedernales, Z.-Y. Wang, E.Solano, M. B. Plenio, Pulsed dynamical decoupling for fast androbust two-qubit gates on trapped ions. Phys. Rev. A , 052312(2018).[54] T. Manovitz, A. Rotem, R. Shaniv, I. Cohen, Y. Shapira, N.Akerman, A. Retzker, and R. Ozeri, Fast Dynamical Decouplingof the Mølmer-Sørensen Entangling Gate, Phys. Rev. Lett. ,220505 (2017).
Supplemental Material
EXPERIMENTAL METHODSDiamonds
All experiments were performed on single NV centres. Forthe nanoscale NMR experiments [Fig. 3(b) of the main text] a C natural abundance diamond was implanted with N ionsusing an energy of 1.5 keV and a dose of 2 × N + cm . Sub-sequent annealing in vacuum at 1000 ◦ C for 3 hours createdshallow single NV centres with depths around 5 ± ff erent diamond, which was polished into a solidimmersion lens. In order to create NV centres in this diamond,the flat surface was overgrown with an about 100 nm thicklayer of isotopically enriched C (99.999%) using the plasmaenhanced chemical vapor deposition method, with parametersas in [S1]. The same diamond was used for the experimentsshowing the improved robustness of the randomisation proto-col (Fig. 4). The experiments presented in were measuredwith an about 4 µ m deep NV in a flat diamond with 0.1% Ccontent. Before experiments, all diamonds were boiled in a1:1:1 tri-acid mixture (H SO :HNO :HClO ) for 4 hours at130 ◦ C. Setup
Using a home-built confocal setup, read-out and initialisa-tion (into the | (cid:105) spin state) of the NV center was performedusing a 532 nm laser. The laser beam was chopped using anacousto optical modulator into pulses of 3 µ s duration. Thespin-dependent fluorescence from the NV spin states was de-tected using an avalanche photodiode. The first 500 ns of theevery laser pulse yield the spin population while the fluores-cence between 1.5 µ s and 2.5 µ s was used to normalise thedata. Magnetic bias fields between 400 G and 500 G wereused to lift the degeneracy of the | − (cid:105) , | + (cid:105) spin states andcreate an e ff ective qubit.Microwave pulses resonant with the NV centre spin wereapplied using a 20 µ m diameter copper wire placed on the di-amond surface as an antenna. The pulses were generated withan Arbitrary Waveform Generator (Tektronix AWG70001A,sampling rate 50GSamples / s) and amplified to give Rabi fre-quencies between 5-70 MHz. The same wire was used to ap-ply classical radio-frequency fields generated by a Gigatronics2520B signal generators. For the classical AC field detection,background magnetic noise at the frequencies detected wasdetermined to be at least 100 fold weaker than the measuredsignals. Measurement protocol
All experiments were performed using the QuDi softwaresuite [S2]. For the randomised protocols the standard versionswere modified by adding a random global phase to all π pulsesin a basic unit, as described in the main text. These phaseswere generated using the Python package ’random’ with a uni-form distribution between 0 and 2 π . Before applying the dy-namical decoupling protocols, the spin of the NV centre is ini-tialized in a coherent superposition ( √ ( | (cid:105) + | (cid:105) )). Therefore,additionally to the laser pulse, a π / ff erence by an additional π / π pulses. Those errors were cal-ibrated in terms of the real Rabi frequency. Thereby, the two π / ff erent sets of phases, and the resulting datawas averaged. HAMILTONIAN UNDER DYNAMICAL DECOUPLINGCONTROL
As stated in the main text, the Hamiltonian without dynam-ical decoupling (DD) control has the general formˆ H (cid:48) ( t ) =
12 ˆ σ z ˆ E ( t ) , (S1)where ˆ σ z = | (cid:105)(cid:104) | − | (cid:105)(cid:104) | is the Pauli operator ofthe sensor. The environment operator ˆ E ( t ) includes boththe target signal to be sensed and environmental noise.For the relevant case of nuclear spin sensing, ˆ E ( t ) = (cid:80) n (cid:104)(cid:16) A ⊥ n ˆ I + n e − i ω n t + h . c . (cid:17) + A (cid:107) n ˆ I zn (cid:105) , where ˆ I α n ( α = x , y , z ) arespin operators for the n th nuclear spin. A ⊥ n and A (cid:107) n are compo-nents of hyperfine field at the position of the nuclear spin. Thenuclear spin precession frequency ω n is the Larmor frequencyof the nuclear spin shifted by the hyperfine field at the locationof the nuclear spin. For the case of a classical AC field, ˆ E ( t )takes the form (cid:80) n b n cos( ω n t + φ n ).A sequence of applied microwave pulses yields the controlHamiltonianˆ H ctrl ( t ) = Ω ( t ) (cid:104) ˆ σ x cos φ ( t ) + ˆ σ y cos φ ( t ) (cid:105) . (S2)In the rotating frame with respect to the control ˆ H ctrl ( t ), theHamiltonian ˆ H (cid:48) ( t ) becomesˆ H ( t ) =
12 ˆ σ ( t ) ˆ E ( t ) , (S3)where ˆ σ ( t ) is ˆ σ z in the Heisenberg picture with respect toˆ H ctrl ( t ). In the following, we derive ˆ σ ( t ) and hence Eq. (2)in the main text.If a π pulse is applied at time t j , the evolution drivenby ˆ H ctrl ( t ) reads ˆ P j ( θ ) = exp (cid:104) − i θ (cid:16) ˆ σ x cos φ j + ˆ σ y cos φ j (cid:17)(cid:105) ,where θ = θ ( t ) ∈ [0 , π ] is the angle of rotation and φ ( t j ) = φ j .Defining ˆ P j ( π ) ≡ ˆ P j as the propagator of a single π pulse, thepropagator for 2 n + j = , , . . . ) pulsesˆ U n + = ˆ P n + · · · ˆ P ˆ P (S4) = ( − n + e i π exp ( − i ϕ n + ) | (cid:105)(cid:104) | + h . c ., (S5)and for 2 n pulsesˆ U n = ˆ P j · · · ˆ P ˆ P (S6) = ( − n exp ( i ϕ n ) | (cid:105)(cid:104) | + ( − n exp ( − i ϕ n ) | (cid:105)(cid:104) | , (S7)where ϕ n + = − (cid:80) n + l = ( − l φ l and ϕ n = − (cid:80) jl = ( − l φ l . Us-ing ˆ U n + and ˆ U n , we find ˆ σ z in the rotating frame of thecontrol during the j th pulseˆ σ ( t ) = [ ˆ P j ( θ ) ˆ U j − ] † ˆ σ z [ ˆ P j ( θ ) ˆ U j − ] (S8) = F z ( t ) ˆ σ z + [ F ⊥ ( t ) | (cid:105)(cid:104) | + h . c . ] , (S9)where the modulation functions are F z ( t ) = ( − j − cos θ (S10) F ⊥ ( t ) = i ( − j − exp − i [2 j − (cid:88) l = ( − l φ l + ( − j φ j ] sin θ. (S11)Because θ = θ ( t ) in Eqs. (S10) and (S11) is the pulse area thatthe j th pulse has rotated at the moment t , for instantaneouspulses F ⊥ ( t ) has no e ff ect (because sin θ = t )and F ⊥ ( t ) ∈ {± } . For the realistic case that the pulses are notinstantaneous, F ⊥ ( t ) is non-zero during the π pulses. FOURIER AMPLITUDES OF THE MODULATIONFUNCTIONS
For DD sequences that are M periodic repetitions of a basicpulse unit with period T and F α ( t + T ) = F α ( t ) ( α = z , ⊥ ), the k th Fourier amplitude of the modulation functions (over thetotal sequence time T total = MT ) is f α k ≡ MT (cid:90) MT F α ( t ) exp (cid:32) − i π ktMT (cid:33) dt (S12) = MT M (cid:88) m = (cid:90) mT ( m − T F α ( t ) exp (cid:32) − i π ktMT (cid:33) dt (S13) = c k , M ˜ f α k / M (S14)where ˜ f α k / M ≡ T (cid:90) T F α ( t ) exp (cid:32) − i π ktMT (cid:33) dt , (S15)and c k , M = M (cid:80) Mm = exp (cid:16) − i π k ( m − M (cid:17) . When k / M is not an in-teger Mc k , M is a sum over roots of unity so it cancels to zero.When k / M is an integer however the sum gives c k , M =
1. Therefore for standard repetitions of a basic pulse unit, weobtain (for k = , , . . . ) f α k = ˜ f α k / M if k / M ∈ Z , . (S16)Under the randomisation protocol a random phase is addedto all pulses in the m -th repetition of the basic unit, so aset of M random phases is generated, { Φ r , m | m = , . . . , M } .This transformation does not a ff ect F z ( t ) but alters F ⊥ ( t ) → F ⊥ ( t ) e i Φ r , m for the m -th unit of the sequence. The Fourier am-plitudes f zk are thus una ff ected but we have f ⊥ k = MT (cid:90) MT F ⊥ ( t ) exp (cid:32) − i π ktMT (cid:33) dt (S17) = MT M (cid:88) m = (cid:90) mT ( m − T F ⊥ ( t ) e − i Φ r , m exp (cid:32) − i π ktMT (cid:33) dt (S18) = Z r , M ˜ f ⊥ k / M , (S19)where Z r , M = M (cid:80) Mm = e i [ Φ r , m − π k ( m − / M ] . Because Φ r , m is cho-sen randomly, Φ r , m − π k ( n − / M is also random and we canwrite Z r , M = M M (cid:88) m = exp( i Φ r , m ) , (S20)which is Eq. (5) in the main text. Here Z r , M is a sum of randomcomplex phases and represents a 2D random walk. It can beshown that | Z r , M | has the average (cid:104)| Z r , M | (cid:105) = / M and thevariance (cid:104) ( | Z r , M | − (cid:104)| Z r , M | (cid:105) ) (cid:105) = ( M − / M . For example,the average can be obtained as follows. By definition, | Z r , M | = M M (cid:88) m , n = exp[ i ( Φ r , m − Φ r , n )] (S21) = M M + M (cid:88) m (cid:44) n e i ( Φ r , m − Φ r , n ) . (S22)Therefore, (cid:104)| Z r , M | (cid:105) = / M because the average of indepen-dent random phases is zero. Similarly, one obtains the vari-ance of | Z r , M | .Consider the signal of a single nuclear spin. The pop-ulation signal of expected resonances is given by P = cos ( | f zk | A ⊥ MT ), where A ⊥ is the perpendicular couplingstrength to a single spin-half [S3]. When the signals are weakthis can be approximated by P = − ( | f zk | A ⊥ MT ) thus thesignal contrast is proportional to M . This is una ff ected bythe addition of the random phase as F z ( t ) is insensitive to thepulse phases.The spurious signal of a nuclear spin is given by P = − sin ( A ⊥ | f ⊥ k | MT ) cos ( φ ⊥ k ), where φ ⊥ k is the complex phaseof f ⊥ k [S3]. For the standard protocol, we have P = − sin ( A ⊥ | ˜ f ⊥ k / M | MT ) cos ( φ ⊥ k ). When the signal is weak thiscan be approximated by P ≈ − ( A ⊥ | ˜ f ⊥ k / M | MT ) cos ( φ ⊥ k )so when no random phase is added the spurious signal con-trast is proportional to M . When the random phase is addedthe expected value of the signal contrast is given by P ≈ − M ( T A ⊥ | ˜ f ⊥ k / M | ) (using (cid:104)| f ⊥ k | (cid:105) = (cid:104)| Z r , M ˜ f ⊥ k / M | (cid:105) = | ˜ f ⊥ k / M | / M and (cid:104) cos ( φ k ⊥ ) (cid:105) = / M / | Z r , M | (whichis ( M − / M ). When one repeats the randomisation proto-col with K realizations of the random phase sequences { Φ r , m } and average out the measure signals, the variance is furtherreduced by a factor of 1 / K according to the central limit the-orem. ENHANCING SEQUENCE ROBUSTNESS
For simplicity, in the following discussion we neglect thee ff ect of the environment and concentrate on static control im-perfections. Evolution operator of a basic pulse unit
The evolution driven by a single π pulse with control errorstakes the general formˆ U π ( φ ) = (cid:32) e − i α sin (cid:15) ie − i ( β + φ ) cos (cid:15) ie i ( β + φ ) cos (cid:15) e i α sin (cid:15) (cid:33) . (S23)We assume that each pulse has the same static errors, that is, α , β , (cid:15) are the same for all pulses. The pulse phase φ deter-mined by the initial phase of the driving field is a controllableparameter. When (cid:15) = β =
0, ˆ U π ( φ ) describes a perfect π pulse.Consider a basic unit with N π pulses applied at t j ( j = , . . . , N ) with phases φ j . For simplicity, we use the transfor-mation t j + − t j = τ j + τ j + with τ ≡
0. This transformationsplits t j + − t j into two parts where τ j ( τ j + ) is associate withthe j th (( j + τ N + = ( t N + − t N ) − τ N (S24) = ( − N N (cid:88) j = ( − j ( t j + − t j ) . (S25)by recursively using τ j + = ( t j + − t j ) − τ j . Because a a basicDD unit is designed to eliminate static dephasing noise, thetiming of the sequence satisfy (cid:80) Nj = ( − j ( t j + − t j ) =
0. Inother words, τ N + = τ = τ N + = ∆ of the controlfield introduces a control phase error ∆ ( t j + − t j ) = ∆ ( τ j + + τ j )during the times t j and t j + , the propagator of a basic pulse unitcan be written as ˆ U unit = ˆ U N ˆ U N − · · · ˆ U ˆ U , (S26) by combining the contribution of a π pulse and the free evolu-tion we obtainˆ U j = (cid:32) e − i [ α + ( τ j + τ j − ) ∆ ] sin (cid:15) ie − i [ β + φ j − ( τ j + τ j − ) ∆ ] cos (cid:15) ie i [ β + φ j − ( τ j + τ j − ) ∆ ] cos (cid:15) e i [ α + ( τ j + τ j − ) ∆ ] sin (cid:15) (cid:33) . = (cid:32) e − i [ α + ( τ j + τ j − ) ∆ ] (cid:15) ie − i [ β + φ j − ( τ j + τ j − ) ∆ ] ie i [ β + φ j − ( τ j + τ j − ) ∆ ] e i [ α + ( τ j + τ j − ) ∆ ] (cid:15) (cid:33) + O ( (cid:15) ) , (S27) XY8RXY8 I n t en s i t y ( a . u . ) singlesbath M=2 M=60 M=100(b) I n t en s i t y ( a . u . ) x-basis -x-basis M=4(a) bath singles
FIG. S1. Spectra of a single NV centre coupled to both individual C spins and the background C spin bath. a) The readout in xand -x-bases highlights the saturation feature typical for a bath. b)Comparison of standard XY8 and its randomisation version. Therandomisation of the π pulse phases suppresses the spurious signalse ffi ciently. For two pulses, we findˆ U j + ˆ U j = (cid:32) e i ϕ j ic j (cid:15) ic ∗ j (cid:15) − e − i ϕ j (cid:33) + O ( (cid:15) ) , (S28)where ϕ j = ∆ ( τ j + − τ j − ) − ( φ j + − φ j ) + π, (S29)and c j = e − i [ β + φ j + α +∆ ( τ j + − τ j − )] + e − i [ β + φ j + − α − ∆ ( τ j + + τ j + τ j − )] , (S30)is a sum of phase factors where each term has a φ j or φ j + .Timing the U j recursively and using τ = τ N + =
0, we obtainfor even N ˆ U unit = (cid:32) e i ϕ iC (cid:15) iC ∗ (cid:15) e − i ϕ (cid:33) + O ( (cid:15) ) , (S31)where ϕ = N / (cid:88) j = (cid:104) φ j − − φ j + π (cid:105) , (S32)and C is a sum of phase factors where each term has an in-dependent sum of the phases φ j . In deed, Eq. (S31) has thegeneral form of a pulse sequence with an even number of π pulses with respect to the leading order error (cid:15) [S4].Similarly, we have for odd N ,ˆ U unit = (cid:32) C (cid:48)∗ (cid:15) ie − i ( ϕ + β ) ie i ( ϕ + β ) C (cid:48) (cid:15) (cid:33) + O ( (cid:15) ) , (S33)where ϕ = ( N − / (cid:88) j = (cid:104) φ j − − φ j + π (cid:105) + φ N , (S34)and C (cid:48) is a sum of phase factors where each term has an inde-pendent sum of the phases φ j .For the case that the lower-order errors of single π pulseshave been compensated by a robust sequence, one can stillwrite the propagator in terms of the leading order error thathas not been compensated by the sequence. The evolutionoperator of a single pulse sequence unit still has a generalform given by Eq. (S31) or (S33), but may have another er-ror (cid:15) ϕ added to ϕ . For many sequences, such as the CP [S5],XY8 [S6], AXY8 [S7], YY8 [S8], and UR-(4 n +
2) ( n = , , . . . ) [S4] sequences, (cid:15) ϕ is a higher-order error comparedwith (cid:15) and therefore can be neglected in the leading order erroranalysis. Standard protocol
It is obvious that the control errors coherently accumulatein the standard protocol where the basic pulse unit is repeated M times as ˆ U = ( ˆ U unit ) M . For example, for even N and ϕ = U = (cid:32) iMC (cid:15) iMC ∗ (cid:15) (cid:33) + O ( (cid:15) ) , (S35)where the error MC (cid:15) scales linearly with M . Randomisation protocol
When one adds a random global phase Φ r , m on all the π pulses in a basic DD unit, each ˆ U unit becomesˆ U unit ( Φ r , m ) = (cid:32) e i ϕ iCe − i Φ r , m (cid:15) iC ∗ e i Φ r , m (cid:15) e − i ϕ (cid:33) + O ( (cid:15) ) . (S36)For two U unit , we haveˆ U unit ( Φ r , m + ) ˆ U unit ( Φ r , m ) = (cid:32) e i ϕ iZ m (cid:15) iZ ∗ m (cid:15) e − i ϕ (cid:33) + O ( (cid:15) ) , (S37) where Z m = e − i ϕ C ( e − i Φ r , m + + e − i ( Φ r , m − ϕ ) ) is a sum of two phasefactors and can be equally written as Z j = e − i ϕ C ( e − i Φ r , m + + e − i Φ r , m ) for random phases Φ r , m and Φ r , m + . By mathematicalinduction, the evolution operator of M DD units with randomphases { Φ r , m } isˆ U M = ˆ U unit ( Φ r , M ) · · · ˆ U unit ( Φ r , ) ˆ U unit ( Φ r , ) , (S38) = (cid:32) e iM ϕ iZ r , M MC (cid:15) iZ ∗ r , M MC ∗ (cid:15) e − iM ϕ (cid:33) + O ( (cid:15) ) , (S39)where the error MC (cid:15) is suppressed by the factor Z r , M = M (cid:80) Mm = exp( i Φ r , m ) for the random phases { Φ r , m } . This resultis valid for an odd number N of pulses as well. ADDITIONAL EXPERIMENTS
One of the most important advantages of quantum sensorsis the possibility to measure quantum signals, such as hyper-fine fields of single spins. This is highly relevant for the char-acterization of quantum systems. The randomisation protocole ffi ciently suppresses both spurious harmonics from a bath aswell as from single spins. In Fig. S1(a) we show the spec-trum of an NV center that couples to both individual C spinsand the background C spin bath. The signal of the bathis centered around the bare Larmor of C at this bias fieldand shows the typical saturation highlighted by measuring thespectra for both x-basis and -x-basis readout. The signal of atleast one strongly coupled spin is shifted to higher frequen-cies due to the hyperfine coupling and it overlaps for the dif-ferent readout bases. In Fig. S1(b) we compare the spectrameasured with standard XY8 and the randomisation version.The identical signal shape and amplitude of the non-spurioussignals verify that the randomized version does not alter thesignal accumulation. In order to amplify the spurious harmon-ics, we use larger number of π -pulses ( M =
60 and 100). Weobserve peaks at 2 ν and 4 ν for the standard XY8 method.For the same bias field the Larmor frequency of H is about1.81 MHz, what would make a di ff erentiation very di ffi cult.These spurious signals can be e ffi ciently suppressed with therandomisation protocol. ∗ E-mail: [email protected] † These authors contributed equally to this work[S1] C. Osterkamp et al ., Stabilizing shallow color centers in dia-mond created by nitrogen delta-doping using SF6 plasma treat-ment, Appl. Phys. Lett. , 113109 (2015).[S2] J. Binder et al ., Qudi: A modular python suite for experimentcontrol and data processing, Software X , 85-90, (2017)[S3] J. E. Lang, J. Casanova, Z.-Y. Wang, M. B. Plenio, T. S. Mon-teiro, Enhanced Resolution in Nanoscale NMR via QuantumSensing with Pulses of Finite Duration, Phys. Rev. Applied ,054009 (2017).[S4] G. T. Genov, D. Schraft, N. V. Vitanov, and T. Halfmann, Ar-bitrarily Accurate Pulse Sequences for Robust Dynamical De-coupling, Phys. Rev. Lett. , 133202 (2017). [S5] H. Y. Carr and E. M. Purcell, E ff ects of di ff usion on free pre-cession in nuclear magnetic resonance experiments, Phys. Rev. , 630 (1954).[S6] T. Gullion, D. B. Barker and M. S. Conradi, New, compensatedCarr-Purcell sequences, J. Magn. Reson. , 479 (1990). [S7] J. Casanova, Z-Y. Wang, J. F. Haase, and M. B. Plenio, Ro-bust dynamical decoupling sequences for individual-nuclear-spin addressing, Phys. Rev. A , 042304 (2015).[S8] Z. Shu, Z. Zhang, Q. Cao, P. Yang, M. B. Plenio, C. M¨uller, J.Lang, N. Tomek, B. Naydenov, L. P. McGuinness, F. Jelezko,and J. Cai, Unambiguous nuclear spin detection using an engi-neered quantum sensing sequence, Phys. Rev. A96