## Abstract

Essential to the functionality of qubit-based sensors are control protocols, which shape their response in frequency space. However, in common control routines out-of-band spectral leakage complicates interpretation of the sensor’s signal. In this work, we leverage discrete prolate spheroidal sequences (a.k.a. Slepian sequences) to synthesize provably optimal narrowband controls ideally suited to spectral estimation of a qubit’s noisy environment. Experiments with trapped ions demonstrate how spectral leakage may be reduced by orders of magnitude over conventional controls when a near resonant driving field is modulated by Slepians, and how the desired narrowband sensitivity may be tuned using concepts from RF engineering. We demonstrate that classical multitaper techniques for spectral analysis can be ported to the quantum domain and combined with Bayesian estimation tools to experimentally reconstruct complex noise spectra. We then deploy these techniques to identify previously immeasurable frequency-resolved amplitude noise in our qubit’s microwave synthesis chain.

## Introduction

Industrial, metrological, and medical applications provide a strong pull for advanced nanoscale sensing techniques^{1}, exploiting the exquisite sensitivity of quantum coherent systems to their environments^{2,3,4}. Qubits naturally exhibit broadband coupling to their environments, but the application of a temporally modulated driving field can alter their frequency response in a desired way. For instance, application of modulation which periodically flips the qubit’s state has allowed for a narrowband spectral response^{5}, which may be tuned by adjusting the interpulse spacing or extending the sequence duration. This general approach to “dynamical decoupling noise spectroscopy” has seen broad adoption in quantum information^{6,7,8,9,10,11}, as well as in nanoscale diamond sensors for biomedical and physics-based applications^{12,13,14,15}. However, control implemented in this form suffers from the significant complication of spectral leakage, where signals outside of a target sensing frequency band can contribute to the sensor’s response (Fig. 1b), and if not properly accounted for, can lead to bias when estimating the spectral density of a signal from experimental data^{16,17}.

In an ideal scenario, for frequency domain spectral estimation applications, the chosen control protocol would be sensitive only within a user-determined band. Pulsed dynamical decoupling is often employed because the leading component of the filter transfer function describing the modulated sensor’s performance is narrowly peaked^{5,7}. Examination of the control propagator describing the time–domain response of a qubit subject to this control, however, reveals that the effective square-waveform of the control propagator (Fig. 1c) leads to the appearance of an infinite chain of harmonics in the Fourier domain (Fig. 1e). These out-of-band harmonics can then contribute bias in noise spectroscopy protocols.

The problem of spectral leakage is well known in classical signal processing and has led to the development of time–bandwidth-optimized functions for use in spectral estimation. The discrete prolate spheroidal sequences (DPSS)^{18} are an orthogonal set of discrete time functions that maximize a signal’s energy within a predefined frequency band (Fig. 1d)^{19}. The DPSS form the basis of the multitaper method of spectral analysis^{20}, which is employed in estimation problems across a wide range of physical, computational, and biomedical disciplines^{21,22}. Additionally, DPSS have also been suggested in magnetic resonance imaging to avoid out-of-band excitation (so-called Gibbs artifact^{23}) and have recently enabled the design of optimal control algorithms for unitary quantum dynamics, that incorporate bandwidth constraints^{24}. This strong base of demonstrations motivates our use of DPSS-modulated pulses for quantum sensing.

In this work, we adapt DPSS functions to the problem of spectral leakage in quantum control for qubit-based sensors. We introduce the concept of continuously amplitude-modulated control waveforms defined by DPSS functions as effective window functions, and we demonstrate that such controls afford suppression of spectral leakage in the quantum setting. Experiments with trapped atomic ions are used to reconstruct the filter transfer functions and show orders of magnitude improvement in suppression of out-of-band signals relative to conventional square waveforms (e.g., pulsed dynamical decoupling or instantaneous phase-flips under driven rotary echo^{25,26}). We then present a series of RF engineering-inspired techniques to shift the band center of the control’s frequency response and combine this with tomographic measurements to allow disambiguation of sensor response in a cluttered background. Two techniques for spectral reconstruction are presented, both inspired by the original classical multitaper method, and we compare their performance for experimentally reconstructed spectra. Experimental results show that our new non-inverting quantum multitaper performs similarly to more computationally intensive Bayesian estimation routines, at the expense of frequency resolution in the reconstruction. Finally, we employ these techniques to characterize otherwise inaccessible properties of our qubit drive system and provide frequency-resolved characterization of system noise and non-linearities with calibrated sensitivity to 0.001 dB.

## Results

### The DPSS functions

For a time–domain sequence consisting of *N* elements, characterized by sampling interval Δ*t*, and half-bandwidth parameter *W* ∈ (0, 1/2), the DPSS may be defined as real solutions to the eigenvalue problem

where ${v}_{m}^{\left(k\right)}\left(N,W\right)$ is the *n*th element of the *k*th order DPSS for *k*, *n* ∈ {0, 1, …, *N* − 1}. The discrete Fourier transform of ${v}_{m}^{\left(k\right)}\left(N,W\right)$ into the (angular) frequency domain [*−π*/Δ*t*, *π*/Δ*t*] is the discrete prolate spheroidal wavefunction, *U*
^{(k)}(*N*, *W*;*ω*), which is spectrally concentrated in [*−ω*
_{
B
}, *ω*
_{
B
}] ≡ [−2*πW*/Δ*t*, 2*πW*/Δ*t*].

The eigenvalue *λ*
_{
k
}(*N*, *W*) directly quantifies the spectral concentration of *U*
^{(k)}(*N*, *W*;*ω*), i.e., the fraction of spectral power within the target band compared to the total spectral power, as ${\lambda}_{k}\left(N,W\right)=\frac{{\int}_{-{\omega}_{B}}^{{\omega}_{B}}\mathrm{d}\omega {U}^{\left(k\right)}{\left(N,W;\omega \right)}^{2}}{{\int}_{-\pi \u2215\mathrm{\Delta}t}^{\pi \u2215\mathrm{\Delta}t}\mathrm{d}\omega {U}^{\left(k\right)}{\left(N,W;\omega \right)}^{2}}.$ DPSS are optimal in the sense that, among all sequences with fixed *N* and *W*, they are the ones that maximize the above ratio. Spectral concentration is highest for *k* = 0, and decreases with increasing *k*; the DPSS of order $k<2\u230aNW\u230b-1$ have ≥70% of their spectral weight within the target band (Fig. 1e; Supplementary Table 1). Physically, the time–bandwidth product *NW* controls the fraction of the desired pulse energy within the pulse time *τ* = *N*Δ*t*. Increasing *NW* enables concentration to be maintained for higher *k*, but this has the disadvantage of extending the target band in the frequency domain. In practice, setting *NW* = *k* + 1 is usually a satisfactory compromise between these factors.

### DPSS filter transfer function reconstruction

To characterize the frequency response of a qubit-based sensor undergoing an arbitrary control protocol in the presence of multi-axis classical noise, we rely on the filter transfer function formalism^{5,27,28,29,30,31}, which we also outline in the Supplementary Note 4. The qubit sensor’s response to its environment under the application of control is given approximately by the average measured fidelity of the operation, denoted here as ${\mathcal{F}}_{\mathrm{av}}$. This is captured, in the weak-noise limit (Methods), by the spectral overlap of the noise power spectral density in multiple quadratures, *S*
_{
i
}(*ω*), with a transfer function describing the control, *F*
_{
i
}(*ω*), as ${\mathcal{F}}_{\mathrm{av}}\approx 1-\mathrm{exp}\left[-{\pi}^{-1}{\sum}_{i=\Omega ,z}\int \mathrm{d}\omega {F}_{i}\left(\omega \right){S}_{i}\left(\omega \right)\right].$ Here, the sum is taken over noise contributions in the amplitude quadrature, proportional to the applied control, i.e., the qubit Rabi frequency ∝Ω*σ*
_{
x
}, and in the dephasing quadrature, ∝*σ*
_{
z
}. The presence of a signal in the sensor’s target band, defined by the applied control modulation, will be manifested as a reduction in the fidelity of the operation implemented. The latter may be the identity, for odd *k*, or, in general, another non-trivial quantum state transformation (Fig. 1a).

Analytic calculation of *F*
_{Ω}(*ω*) both for flat-top modulation (commonly associated with dynamical decoupling protocols and here a rotary spin echo, Fig. 1c) and for piecewise-constant modulation defined by the DPSS-modulated pulses, reveals the superior spectral concentration of the latter (Fig. 1e). While the main lobe of *F*
_{Ω}(*ω*) is broader inside the target band (blue shading) for DPSS modulation as compared to the rotary spin echo, leakage outside the target band is significantly suppressed. For the rotary spin echo, spectral leakage increases out-of-band sensitivity by 30–80 dB relative to the DPSS, quantified by the value *L*
_{
k
} (Fig. 1e).

We perform experiments to directly test the spectral response of a driven qubit-based sensor using trapped ^{171}Yb^{+} ions, where the qubit is realized through the hyperfine splitting of the ^{1}S_{1/2} ground state with a transition frequency ~12.6 GHz. We can modulate the amplitude and phase of the driving microwave field arbitrarily using a vector signal generator, providing full control of the qubit state on the Bloch sphere. We employ projective measurements of the qubit state in the *z*-basis and average over experiments to identify deviations from ideal control operations, which constitute our signal of interest, *P*(↑_{
z
}). Details of the experimental system appear in refs. ^{32,33} and in the Supplementary Note 1.

We verify the spectral properties of DPSS-modulated qubit sensors by performing frequency-selective system identification to map out the effective spectral response of the driven qubit (Fig. 2a). A small single-frequency perturbation *β*
_{Ω}(*t*) = *α* cos(*ω*
_{sid}
*t* + *φ*) is added to the applied control envelope of the driving field, producing $\mathrm{\Omega}\left(t\right)\mapsto \mathrm{\Omega}\left(t\right)\left(1+{\beta}_{\mathrm{\Omega}}\left(t\right)\right)$. Since this results in *S*
_{Ω}(*ω*) ∝ *δ*(*ω* − *ω*
_{sid}), by scanning the tunable modulation frequency *ω*
_{sid} and averaging over phase *φ* for fixed modulation depth *α*, we effectively reconstruct the filter transfer function of the control, *F*
_{Ω}(*ω*), through measurements of the average fidelity metric ${\mathcal{F}}_{\mathrm{av}}$. In this setting, we obtain ${\mathcal{F}}_{\mathrm{av}}$ directly from the projective measurements via $P\left({\uparrow}_{z}\right)=1-{\mathcal{F}}_{\mathrm{av}}\approx 1-\mathrm{exp}\left[-{\pi}^{-1}\int \mathrm{d}\omega {F}_{\mathrm{\Omega}}\left(\omega \right){S}_{\mathrm{\Omega}}\left(\omega \right)\right]$, where we assume negligible dephasing. Experimental reconstruction of the qubits’ spectral response under DPSS-modulated pulses for *k* = 1 shows good agreement with the analytically calculated fidelity, in addition to the expected broadening as *NW* is increased (Fig. 2b).

Using the same technique, we can experimentally compare the frequency response of qubits driven by DPSS-modulated pulses to their flat-top counterparts, as shown in Fig. 2c–e. These experiments demonstrate the superior spectral concentration in the target band (shaded region); measurements on qubits subject to DPSS-modulated pulses show no detectable sensitivity to perturbations (given by *β*
_{Ω}(*t*)) outside of the target band, whereas flat-top pulses exhibit significant out-of-band harmonics (marked by arrows). Such sensor responses outside of the target band constitute a source of spectral leakage in sensing applications.

### Extending DPSS control capabilities

In order to implement DPSS-modulated pulses for spectral reconstruction applications, we apply additional analog modulation techniques designed to shift the band center from zero to a user-defined frequency *ω*
_{
s
}
^{34} (Methods). We employ two modulation protocols: cosinusoidal (COS) modulation shifts both positive and negative frequency components by *ω*
_{
s
}, while single-sideband (SSB) modulation shifts the band center by *ω*
_{
s
} and suppresses either the positive or negative frequencies, thereby reducing the bandwidth by one half. Experiments using both techniques demonstrate maintenance of the critical spectral concentration of the DPSS-modulated pulses within the shifted bands (Fig. 3a, b). Further details are included in Supplementary Note 6.

Quantum sensing applications also require the ability to disambiguate changes in the measured operational fidelity due to target signals within a single quadrature, e.g., Ω*σ*
_{
x
}, from alternate “interfering” sources, which may be manifested similarly in projective measurements. For instance, the presence of a Hamiltonian term ∝*σ*
_{
z
} during a driven operation ∝*σ*
_{
x
} will reduce the measured fidelity of the driven operation in a manner similar to the presence of noise only proportional to the control^{30}. Consequently, a single measurement is insufficient to determine which process is at play. To detect and compensate for such effects, we use tomographic reconstruction^{35}, by preparing the qubit state along the three Cartesian directions, applying DPSS control, and performing independent sequential measurements in the corresponding bases (Fig. 3c). In our experiments, we simultaneously apply a target signal ∝*σ*
_{
x
} as above, and an additional white dephasing term ∝*σ*
_{
z
}, which contributes to the sensor’s overall response in a way that obfuscates the measurement of the target. We then isolate the target signal’s contribution by combining three projective measurements as $\mathcal{S}$ ≡ (1 + *P*(↑_{
x
}) − *P*(↑_{
y
}) − *P*(↑_{
z
}))/2, as derived in the Supplementary Note 3. Reconstructed values of $\mathcal{S}$ (red markers, Fig. 3c) reproduce the results expected without any *σ*
_{
z
}-terms well (red line), successfully correcting for a vertical offset that would otherwise bias a spectral estimate.

### Multitaper spectral reconstruction with DPSS controls

With demonstrations of the relevant band-limited properties of qubits subject to DPSS-modulated pulses as well as essential band-shifting techniques complete, we move on to demonstrate our spectral reconstruction capabilities. As a sample application, we reconstruct an engineered amplitude noise spectrum (Fig. 3d). We employ four different DPSS-modulated pulses with *k* = 1, 3, 5, 7, and *NW* = 7, band-shifted by SSB at nine different shift frequencies, *ω*
_{
s
}, each resulting in an individual estimate or “data taper”. The spacing of the modulation frequencies was chosen to be about 1/2 of the bandwidth of the filter functions, which yields measurements with sensitivity in overlapping bands. The various estimates are combined to produce a reconstruction of the target noise spectrum, which we accomplish this using two distinct techniques. While both are inspired by Thomson’s multitaper approach^{20}, they also differ in important ways.

In its original form, the multitaper method aims to estimate the spectrum of a stationary Gaussian process from a finite set of discrete time samples. In this technique, DPSS waveforms are used to window the time–domain data in post-processing, producing a set of estimates of the spectrum in the target band. While each “single-taper” estimate is, in itself, an estimate of the spectrum *χ*
^{2}-distributed about the true value, the key idea of multitaper estimation is to combine different estimates into a weighted-sum estimator with superior statistical properties. Thanks to the orthogonality of the DPSS, this procedure results in a *χ*
^{2}-distribution with a greater number of degrees of freedom, ensuring consistency and increasing variance efficiency^{20,21}. In order to offset the introduction of out-of-band bias from higher-order DPSS, the final estimate is determined through an adaptive weighting procedure, designed to favor the lowest-order estimates with the best spectral concentration in the band.

The first reconstruction technique we employ is closest in spirit to the original multitaper, with one crucial distinction; by applying DPSS amplitude modulation to the quantum sensor we are, in effect, windowing the noise process before any measurements are made. This stands in contrast to the manner in which classical multitaper estimates are determined by post-processing a set of discrete time samples. Measured fidelities determine preliminary spectral estimates at the center of each band, which are then weighted according to Thomson’s adaptive procedure to obtain a final set of estimates. In our second approach, we combine the use of multiple DPSS tapers with Bayesian estimation techniques. Each band, corresponding to a shift frequency, *ω*
_{
s
}, is sub-divided into a set of smaller segments. For each band, solving a linear inversion determines the Bayesian maximum a posteriori estimate of the spectrum in each segment, which serves as a preliminary estimate. As each segment is contained in multiple bands, the preliminary estimates are weighted by their Fisher information to determine a final estimate of the spectrum in each segment. Additional details on both reconstruction methods are given in the Supplementary Notes 8 and 9.

In our experiments, the Bayesian reconstruction in Fig. 3d uses the multitaper as a prior, and offers slightly improved resolution of the high-frequency cutoff. Both procedures produce spectral estimates which quantitatively match the applied spectrum (within resolution limits), and accurately identify the presence of a high-frequency cutoff in the noise. While the Bayesian approach relies on linear inversion and is thus computationally less efficient and stable than the adaptive multitaper, the flexibility in the choice of the model spectrum to be used as a prior, as well as the in-band segmentation, allow for improved resolution and the possibility to handle complex (e.g., “mixed”, consisting of both smooth and line components) spectra, in principle. Advantages of Bayesian spectral estimation are further highlighted in^{36}.

### Characterization of native system noise

We conclude by using DPSS-modulated pulses to obtain frequency-resolved information about native noise and non-linearities in our control system at the end of the synthesis chain (which includes the vector signal generator, an amplifier, cabling, and a waveguide-to-coax converter). For this experiment, we use a single ion and perform DPSS-modulated pulses with *k* = 0, producing a net rotation equivalent to ~400*π* rotations, ideally enacting $\mathbb{I}$. We calibrate sensitivity to noise by first applying a single-frequency modulation at the shifted band center frequency, *ω*
_{sid} = *ω*
_{
s
}, and averaging over phase (“x” markers, Fig. 4a). We compare this value against interleaved measurements conducted without applied noise to determine the minimum sensitivity achieving SNR ~1. These measurements demonstrate our ability to detect band-limited amplitude noise with modulation depth as low as ~0.001 dB. In measurements taken at different values of *ω*
_{
s
}, we observe a reproducible deviation from the ideal operation over much of the scan range, with a distinct feature around 20 kHz. We confirm that the measured signals are a manifestation of a frequency-dependent response in the synthesis chain rather than, e.g., extrinsic decoherence, by adding an initial small amplitude-offset pulse to a band-shifted DPSS-modulated pulse and scanning over the magnitude of that offset. Investigations into the source of this behavior are ongoing at the time this manuscript is prepared. Ultimately, this approach provides information that we believe is otherwise inaccessible via independent characterization of hardware components in our system.

## Discussion

The demonstrations presented here indicate that appropriately crafted quantum control protocols for qubit-based sensors have the ability to overcome significant technical limitations in contemporary quantum sensing experiments. These protocols can be applied to any qubit-based sensor in which arbitrary phase and amplitude modulation of the driving field is possible and spectral concentration is desired. It is noteworthy that by reducing the need to account for high-frequency harmonics in the Fourier response of the modulation pattern, the relatively simple and computationally efficient adaptive multitaper approach to spectrum reconstruction performs similarly to the more complex Bayesian estimation procedure under the conditions we tested. While a full comparative study of both single- and multitaper spectral reconstruction techniques using flat-top vs. DPSS-modulated pulses is beyond our current scope, preliminary simulations reinforce the utility of Slepian filters in mitigating leakage-induced artifacts in reconstruction. A detailed analysis will be the subject of an upcoming manuscript, along with developing mathematical bounds for spectral leakage and performing a quantitative assessment of the impact of leakage as a function of the target spectrum. Future experiments will also involve the extension of DPSS-modulated control to sensing of additive dephasing noise and multi-qubit settings, in order to provide an expanded toolkit of band-limited controls for quantum sensors.

## Methods

### Analog modulation techniques

Carrier waves are commonly modulated in radio-engineering to multiplex signals within a certain frequency band. We use the same approach to shift the sensitivity of our control pulses in the frequency domain. We employ two of these techniques, COS modulation (also commonly known as amplitude modulation), and single-sideband modulation. By multiplying the time–domain control pulses with a cosine function, so that ${\mathrm{\Omega}}_{\mathrm{mod},n}^{\mathrm{COS}}\equiv {v}_{n}^{\left(k\right)}\left(N,W\right)\mathrm{cos}\left(n{\omega}_{s}\mathrm{\Delta}t\right)$, we convolve the original transfer function with two delta function at ±*ω*
_{
s
}. In a standard Fourier transform, the positive frequency component is reflected about the *y* axis. The negative frequency component becomes visible when *ω*
_{
s
} is greater than the bandwidth of the pulse such that one copy of the positive and negative sidebands appear in the positive frequency domain. To recover the original appearance of the DPSS filter functions, we may alternatively use single-sideband modulation. In this case, the filter will either be at a higher or lower frequency than *ω*
_{
s
}, depending on the sign in ${\mathrm{\Omega}}_{\mathrm{mod},n}^{\mathrm{SSB}}\equiv {v}_{n}^{\left(k\right)}\left(N,W\right)\mathrm{cos}\left(n{\omega}_{s}\mathrm{\Delta}t\right)$ ± $\mathcal{H}\left[{v}_{n}^{\left(k\right)}\left(N,W\right)\right]\mathrm{sin}\left(n{\omega}_{s}\mathrm{\Delta}t\right)$. We pre-calculate the waveform numerically using the Hilbert transform, $\mathcal{H}\left[{v}_{n}^{\left(k\right)}\left(N,W\right)\right]$, and apply it directly from our microwave source.

### Weak-noise limit

The regime in which the first-order fidelity approximation we employ is valid is the weak-noise limit. This requires that the smallness parameter, as defined in refs. ^{28,30}, $\xi ={\left[{\int}_{0}^{\tau}\mathrm{d}t\u2225\beta \left(t\right)\u2225\right]}^{1\u22152}<1$. For the case of system identification, where *β*
_{Ω}(*t*) = *α* cos(*ω*
_{sid}
*t*), as well as for pure amplitude noise, *β*(*t*) = *β*
_{Ω}(*t*)Ω(*t*), we calculate $\xi =\alpha A\mathrm{\u2215}2\sqrt{2}$, where *A* is the pulse area. For pulses where *A* = *π*, the upper bound for the weak-noise limit is at *α* ≈ 0.9.

### Data availability

Data used in figures and computer scripts used to produce DPSS-modulated pulses and perform the spectral reconstruction are available at https://github.com/qcl-sydney/research-supplements.

## Additional information

**Publisher's note:** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## References

- 1.
Schulte, J.

*Nanotechnology: Global Strategies, Industry Trends and Applications*(John Wiley & Sons, The Atrium, Southern Gate, Chichester, West Sussex, England, 2005). - 2.
McGuinness, L. P. et al. Ambient nanoscale sensing with single spins using quantum decoherence.

*New. J. Phys.***15**, 073042 (2013). - 3.
Ajoy, A. et al. Quantum interpolation for high-resolution sensing.

*Proc. Natl Acad. Sci. USA***114**, 2149–2153 (2017). - 4.
Maze, J. R. et al. Nanoscale magnetic sensing with an individual electronic spin in diamond.

*Nature***455**, 644–647 (2008). - 5.
Biercuk, M. J., Doherty, A. C. & Uys, H. Dynamical decoupling sequence construction as a filter-design problem.

*J. Phys. B***44**, 154002 (2011). - 6.
Álvarez, G. A. & Suter, D. Measuring the spectrum of colored noise by dynamical decoupling.

*Phys. Rev. Lett.***107**, 230501 (2011). - 7.
Bylander, J. et al. Noise spectroscopy through dynamical decoupling with a superconducting flux qubit.

*Nat. Phys.***7**, 565–570 (2011). - 8.
Kotler, S., Akerman, N., Glickman, Y. & Ozeri, R. Nonlinear single-spin spectrum analyzer.

*Phys. Rev. Lett.***110**, 110503 (2013). - 9.
Muhonen, J. T. et al. Storing quantum information for 30 seconds in a nanoelectronic device.

*Nat. Nanotechnol.***9**, 986–991 (2014). - 10.
Norris, L. M., Paz-Silva, G. A. & Viola, L. Qubit noise spectroscopy for non-Gaussian dephasing environments.

*Phys. Rev. Lett.***116**, 150503 (2016). - 11.
Paz-Silva, G. A., Norris, L. M. & Viola, L. Multiqubit spectroscopy of Gaussian quantum noise.

*Phys. Rev. A***95**, 022121 (2017). - 12.
Ajoy, A., Bissbort, U., Lukin, M. D., Walsworth, R. L. & Cappellaro, P. Atomic-scale nuclear spin imaging using quantum-assisted sensors in diamond.

*Phys. Rev. X***5**, 011001 (2015). - 13.
Le Sage, D. et al. Optical magnetic imaging of living cells.

*Nature***496**, 486–489 (2013). - 14.
Say, J. M. et al. Luminescent nanodiamonds for biomedical applications.

*Biophys. Rev.***3**, 171–184 (2011). - 15.
Hirose, M., Aiello, C. D. & Cappellaro, P. Continuous dynamical decoupling magnetometry.

*Phys. Rev. A***86**, 062320 (2012). - 16.
Loretz, M. et al. Retraction: Single-proton spin detection by diamond magnetometry.

*Science***347**, 139 (2014). - 17.
Loretz, M. et al. Spurious harmonic response of multipulse quantum sensing sequences.

*Phys. Rev. X***5**, 021009 (2015). - 18.
Slepian, D. Prolate spheroidal wave functions, fourier analysis, and uncertainty-V: the discrete case.

*Bell Syst. Tech. J.***57**, 1371–1430 (1978). - 19.
Slepian, D. Some comments on fourier analysis, uncertainty and modeling.

*Soc. Ind. Appl. Math.***25**, 379–393 (1983). - 20.
Thomson, D. J. Spectrum estimation and harmonic analysis.

*Proc. IEEE***70**, 1055–1096 (1982). - 21.
Percival, D. B. & Walden, A. T.

*Spectral Analysis for Physical Applications*(Cambridge University Press, 1993). - 22.
Press, W. H. et al.

*Numerical Recipes 3rd Edn: The Art of Scientific Computing*(Cambridge University Press, New York, 2007). - 23.
Hasenfeld, A. Sharp NMR biomedical spatial localization.

*Magn. Reson. Med.***2**, 505–511 (1985). - 24.
Lucarelli, D. Quantum optimal control via gradient ascent in function space and the time-bandwidth quantum speed limit. Preprint at https://arxiv.org/abs/1611.00188 (2016).

- 25.
Gustavsson, S. et al. Driven dynamics and rotary echo of a qubit tunably coupled to a harmonic oscillator.

*Phys. Rev. Lett.***108**, 170503 (2012). - 26.
Ball, H. & Biercuk, M. J. Walsh-synthesized noise filters for quantum logic.

*EPJ Quant. Technol.*https://doi.org/10.1140/epjqt/s40507-015-0022-4 (2015). - 27.
Kofman, A. G. & Kurizki, G. Universal dynamical control of quantum mechanical decay: modulation of the coupling to the continuum.

*Phys. Rev. Lett.***87**, 270405 (2001). - 28.
Soare, A. et al. Experimental noise filtering by quantum control.

*Nat. Phys.***10**, 825–829 (2014). - 29.
Green, T. J., Uys, H. & Biercuk, M. J. High-order noise filtering in nontrivial quantum logic gates.

*Phys. Rev. Lett.***109**, 020501 (2012). - 30.
Green, T. J., Sastrawan, J., Uys, H. & Biercuk, M. J. Arbitrary quantum control of qubits in the presence of universal noise.

*New J. Phys.***15**, 095004 (2013). - 31.
Paz-Silva, G. A. & Viola, L. General transfer-function approach to noise filtering in open-loop quantum control.

*Phys. Rev. Lett.***113**, 250501 (2014). - 32.
Soare, A. et al. Experimental bath engineering for quantitative studies of quantum control.

*Phys. Rev. A***89**, 042329 (2014). - 33.
Mavadia, S., Frey, V., Sastrawan, J., Dona, S. & Biercuk, M. J. Prediction and real-time compensation of qubit decoherence via machine learning.

*Nat. Commun.***8**, 14106 (2017). - 34.
Pozar, D. M.

*Microwave Engineering*4th edn (John Wiley & Sons, Hoboken, NJ, USA, 2014). - 35.
Nielsen, M. A. & Chuang, I. L.

*Quantum Computation and Quantum Information*(Cambridge University Press, Cambridge, 2002). - 36.
Ferrie, C., Granade, C., Paz-Silva, G. A. & Wiseman, H. M. Bayesian quantum noise spectroscopy. Preprint at https://arxiv.org/abs/1707.05088 (2017).

## Acknowledgements

We acknowledge K. Shi, C. Edmunds, and A. Milne for contributions to the experimental system and C. Granade and C. Ferrie for useful discussions on Bayesian estimation. This work was partially supported by the ARC Centre of Excellence for Engineered Quantum Systems CE110001013, the US Army Research Office under Contract W911NF-12-R-0012, IARPA via Department of Interior National Business Center contract number 2012-12050800010, and a private grant from H. & A. Harley.

## Author information

### Affiliations

#### ARC Centre for Engineered Quantum Systems, School of Physics, The University of Sydney, Sydney, NSW, 2006, Australia

- V. M. Frey
- , S. Mavadia
- , W. de Ferranti
- & M. J. Biercuk

#### National Measurement Institute, West Lindfield, NSW, 2070, Australia

- V. M. Frey
- , S. Mavadia
- , W. de Ferranti
- & M. J. Biercuk

#### Department of Physics and Astronomy, Dartmouth College, 6127 Wilder Laboratory, Hanover, NH, 03755, USA

- L. M. Norris
- & L. Viola

#### Johns Hopkins University, Applied Physics Laboratory, 11100 Johns Hopkins Road, Laurel, MD, 20723, USA

- D. Lucarelli

### Authors

### Search for V. M. Frey in:

### Search for S. Mavadia in:

### Search for L. M. Norris in:

### Search for W. de Ferranti in:

### Search for D. Lucarelli in:

### Search for L. Viola in:

### Search for M. J. Biercuk in:

### Contributions

V.M.F. and S.M. developed experimental hardware, built the experimental control system, and obtained the presented data with theoretical techniques developed by L.M.N., D.L., and L.V. Numerical simulations and data analysis were performed by V.M.F., S.M., L.M.N., and L.V. M.J.B. conceived the experiment and led development of the experimental system. W.de.F. provided initial numerical simulations. V.M.F., S.M., L.M.N., L.V., and M.J.B. wrote the manuscript.

### Competing interests

The authors declare no competing financial interests.

### Corresponding author

Correspondence to M. J. Biercuk.

## Electronic supplementary material

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.