Digital noise spectroscopy with a quantum sensor

We introduce and experimentally demonstrate a quantum sensing protocol to sample and reconstruct the auto-correlation of a noise process using a single-qubit sensor under digital control modulation. This Walsh noise spectroscopy method exploits simple sequences of spin-flip pulses to generate a complete basis of digital filters that directly sample the power spectrum of the target noise in the sequency domain -- from which the auto-correlation function in the time domain, as well as the power spectrum in the frequency domain, can be reconstructed using linear transformations. Our method, which can also be seen as an implementation of frame-based noise spectroscopy, solves the fundamental difficulty in sampling continuous functions with digital filters by introducing a transformation that relates the arithmetic and logical time domains. In comparison to standard, frequency-based dynamical-decoupling noise spectroscopy protocols, the accuracy of our method is only limited by the sampling and discretization in the time space and can be easily improved, even under limited evolution time due to decoherence and hardware limitations. Finally, we experimentally reconstruct the auto-correlation function of the effective magnetic field produced by the nuclear-spin bath on the electronic spin of a single nitrogen-vacancy center in diamond, discuss practical limitations of the method, and avenues for further improving the reconstruction accuracy.

The protocols which have been most commonly employed to date, inspired by classical signal processing, perform spectral reconstruction in the frequency domain by measuring the decoherence of a qubit sensor subjected to sequences of spin-flip pulses [5,7,21], also known as a dynamical decoupling sequences because of their noise filtering capability.Whereas these protocols claim a simple intuitive formalism, the exact digital filters that they produce are a product of trigonometric functions -effectively converting the reconstruction problem into a non-linear inversion problem that necessitates numerical deconvolution algorithms [19].Although approximating such frequency-domain digital filter function (FF) with a delta-like function centered at some specific frequency can solve this problem in principle, such an approximation is not well controlled in general and fails to address the fundamental challenge of sampling functions of a continuous (frequency or time) variable with digital filters.In addition, it is practically difficult to mitigate the reconstruction error introduced by the delta-filter approximation when the sampling time is limited due to short coherence times and hardware limitations.
In this work, we propose and experimentally demonstrate the benefits of using digital (Walsh) QNS to sample and reconstruct stochastic fields using quantum sensors.The Walsh QNS method uses a sequence of coherent control pulses acting on a single-qubit sensor to generate a complete set of digital filters.Each filter encodes a specific coefficient of the logical power spectrum in the decoherence rate of the sensor.By measuring the decoherence exponent using a complete set of Walsh modulation sequences, an estimate of the logical power spectrum can be reconstructed, from which the auto-correlation function and power spectrum of the noise can be directly computed using a sequence of linear transformations.Notably, our method shares important points of contact with a general frame-based approach [22], which was recently shown to afford a resource-efficient characterization in the presence of finite control resources.Here, by analytically and numerically calculating the accuracy in arXiv:2212.09216v1[quant-ph] 19 Dec 2022 reconstructing the noise spectrum, we show that Walsh QNS provides a comparable or even better alternative to standard dynamical decoupling-based methods operating in the frequency domain, especially when reconstructing the auto-correlation function of the noise.We then experimentally demonstrate our method by characterizing the environmental noise of a single nitrogen-vacancy (NV) center in diamond, resulting from interactions with its 13 C nuclear spin bath.We finally discuss practical limitations of the method and outline strategies to further improve its performance.

II. THEORY A. Walsh spectroscopy method
Different quantum systems may be exposed to quite different noise sources, such as charge and flux fluctuations in superconducting circuits and magnetic spin baths in solid-state systems [7].Although the microscopic decoherence mechanism may be due to an environment that is quantum (non-commuting) in nature [1], the noise process can often be approximated by a classical Gaussian process [7].Here, we focus on reconstructing a stationary Gaussian noise that leads to pure dephasing of a singlequbit sensor.In a frame that rotates with the qubit frequency, we can assume that the qubit is coupled to a longitudinal noise field ω(t) by the Hamiltonian where, as usual, σ z denotes the z Pauli matrix.The noise-induced dephasing can be observed by performing Ramsey interferometry while modulating the state of the qubit with a sequence of m instantaneous spin-flip (π) pulses.The dynamical phase acquired by the sensor is where f m (t) = ±1 is the modulation induced by the π pulses.Assuming a stationary and zero-mean Gaussian distribution of the stochastic noise field ω(t), the decoherence exponent χ of the measured signal is given by The qubit decay is thus determined by the noise autocorrelation function, G(t 1 , t 2 ) ≡ ω(t 1 )ω(t 2 ) , which simplifies to an even function of the time lag, G(t 1 , t 2 ) ≡ G(t 1 − t 2 ) = G(t 2 − t 1 ) under the assumption of stationarity.Accordingly, reconstructing the auto-correlation suffices to fully characterize the noise process.
In order to achieve digital noise characterization, we choose modulating functions f m given by the complete set of Walsh functions {w m } N −1 m=0 of order N = 2 n [23].In addition to also providing a paradigmatic instance of a digital frame [22,24], the Walsh basis is convenient for its ease of practical implementation.The "sequency" m denotes the number of spin-flip pulses of the corresponding Walsh sequence, in analogy to the "frequency" of trigonometric functions in Fourier analysis of analog signals.As shown in Fig. 1(a), the Walsh modulation functions w m are piecewise-continuous functions defined over N contiguous intervals of length τ = T /N .Equivalently, the binary values of the m th Walsh modulation function are given by the m th row of the N ×N Walsh matrix W , such that w m (t/τ ) = W [m, j], where t ∈ [jτ, (j + 1)τ ).Walsh functions are intrinsically compatible with the available quantum control hardware, supporting microwave or optical pulses and time discretization [23], and have been used to design optimal dynamical decoupling for coherence protection in the presence of both dephasing [25] and general multi-axis noise [26].
When combined with a qubit sensor, we previously showed that Walsh functions can be used to reconstruct the temporal profile of deterministic time-varying magnetic fields [27,28], by measuring a finite set of coherent phases {ϕ m } (see Eq. ( 2)).The problem of sampling a stochastic field to reconstruct its auto-correlation G from a set of decay exponents {χ m } is a more challenging task.The core difficulty stems from the exponent χ m being given by the overlap between two functions naturally defined in two different domains: the auto-correlation function in the arithmetic domain, and the Walsh functions in the logical (dyadic) domain [23], where the floor symbol " • " means taking the closest smaller integer.Here we mathematically used the composition property of Walsh functions under multiplication, w m (h)w m (j) = w m (h ⊕ j), with (h ⊕ j) denoting the binary addition modulo N .While a general solution to the problem of representing dynamical overlap integrals, such as the one determining χ m (T ), in a way that is directly tied to the available control resources is provided by the frame-based formalism developed in [22], in the following we show that this difficulty can be elegantly overcome by using a sequence of simple, linear transformations.We further discuss the relationship to the frame approach in Appendix B. First, to connect the arithmetic domain to the logical domain, we apply the change of variables, u(t with an associated shuffling transformation T (u, v), in analogy to a Jacobian matrix.Then, the decay exponent in Eq. ( 4) becomes Carrying out the integration over the arithmetic domain (u), with L(v) ≡ G(u)T (u, v)du yields our key result, This shows that the decoherence exponent χ m (T ) under Walsh modulation with sequency m is equivalent to the finite-time logical power spectrum ST (m) in the logical domain.In analogy to the arithmetic power spectrum S(ω) being given by the continuous Fourier transform of the auto-correlation function G(t), here the logical power spectrum ST (m) is given by the Walsh transform of the logical auto-correlation function L(v), defined as The auto-correlation function can thus be obtained from the logical power spectrum by applying the inverse Walsh transform and the shuffling transformation.
To simplify the explicit calculations under finite values of τ and N , we introduce the discretized auto-correlation function in the arithmetic domain, as well as the dyadic time average of the logical autocorrelation, With these definitions, we may rewrite Eq. ( 6) and the relation between L and G as discrete sums: where T N [j, k] is the matrix representation of the shuffling transformation, which can be constructed recursively [23,29] or using convolution products of Walsh functions (see Appendix A for a detailed derivation).The logical auto-correlation function L N can thus be simply obtained by sampling the coefficients of the logical power spectrum ST .In turn, this entails measuring the decoherence exponents {χ m } with a set of N Walsh sequences {w m (t)} N −1 m=0 and computing the inverse Walsh transform (here the Walsh matrix W −1 ), The average auto-correlation is finally obtained by applying the inverse of the linear shuffling transformation in Eq. ( 12).This yields where H(k) is the Hamming weight of k and T −1 N is the (pseudo-)inverse of the shuffling matrix.
We stress that, while the logical power spectrum ST (m) can be equated with the decoherence exponent, its relationship with the usual frequency-domain power spectrum S(ω) is not trivial.The latter can be recovered by discretizing the continuous-time auto-correlation G(t j ) into its time-averaged representation G[j] at discrete sampling times (see Eq. ( 8)), and applying the Fourier transform to obtain estimates S(ω k ), with [30].

B. Comparison to comb-based noise spectroscopy methods
The most common QNS method, based on engineering a "comb" in frequency space through periodic sequence repetition [5,7], attempts to directly reconstruct the noise spectrum S(ω) at desired frequencies (Fig. 1b).Indeed, thanks to stationarity, we can rewrite Eq. ( 3) by replacing the noise auto-correlation with its Fourier transform, which corresponds to the noise spectrum (see Appendix A).The resulting decoherence exponent can then be described as the overlap in the frequency domain between the noise spectrum and a FF [7,31,32]: where the FF F m (ω, T ) is associated with the modulation function f m (t) through a finite-time Fourier transform, . When a base sequence of spin-flip π pulses of duration τ b , e.g., a two-pulse CPMG sequence with an inter-pulse delay τ [33,34], is periodically repeated in time, the FF can be approximated by a weighted sum over a series of Dirac delta functions [5,21,35], namely, Then the decoherence exponent is dominated by the noise components at the base frequency ω 0 ≡ 2π/τ b = π/τ and its odd harmonics: from which the noise spectrum S(ω) can be reconstructed by tuning the value of τ and truncating the  [29] for details on the sequences).(d) The CPMG sampling and reconstruction procedure results in an approximation of the power spectrum of S(ω) in the frequency domain, which can be converted to the auto-correlation in the time domain.
above series to a maximum finite number of harmonics, k max .As experimentally demonstrated in different platforms [5,12,21], this method is powerful for solving certain operational problems, especially sampling the spectrum at selected or high-frequencies, However, the "delta-filter" approximated method lacks in generality, as hinted by the fact that periodic sequences are a subset of the Walsh basis (in particular, m = 2 n for CPMG and m = 2 n − 1 for PDD [25]).In addition, for the approximation to be valid, the noise spectrum around the "resonance frequencies" (2k + 1)ω 0 should have small variations with respect to the filter peak width, which is set by the total sampling time, T .In other words, the sampling time T has to be much larger than the noise correlation time τ c .Suppressing this error requires either solving the non-trivial inversion problem using the exact FF or increasing the measurement time T , often beyond the system coherence time, leading to low-accuracy estimates of χ m (T ) [36].More practically, a long time T also degrades the sensitivity and efficiency of noise reconstruction.Besides, the experimental apparatus might limit the length of achievable pulse sequences.
In contrast, Walsh-based QNS -and frame-based QNS more generally [22] -enable a direct reconstruction of the noise auto-correlation, and the dominant sources of errors (sampling in the time domain and average autocorrelation approximation) are quite different.It is thus critical to quantitatively assess the performance of both methods and compare strengths and weaknesses for different noise properties.

III. OPERATIONAL PERFORMANCE
To demonstrate the power of Walsh QNS, we apply our method to reconstruct typical noise spectra and compare its performance -defined in terms of the reconstruction error -to conventional QNS protocols designed to use similar experimental resources.For concreteness, we numerically reconstruct the auto-correlation function of a fluctuating magnetic field sampled from an Ornstein-Unlenbeck (OU) noise model [37] (Fig. 2), which is described by   where b 2 , ω s , and τ c characterize the strength, frequency, and correlation time of the noise, respectively (Fig. 2(b)).
The associated frequency-domain power spectrum comprises two symmetric Lorentzian peaks: The OU model was originally used to describe the dynamics of Brownian motion [37][38][39] and then found great success in describing the decoherence of a spin qubit dipolarly-coupled to a noisy spin bath [2,3,40].We benchmark the operational performance of Walsh QNS against a typical comb-based QNS protocol employing CPMG sequences.To perform a fair comparison with the Walsh scheme with sampling time T and order N , we design a set of CPMG sequences with a total experimental time ∼ N T .In the CPMG scheme as shown in Fig. 1(b) [29], the zeroth sequence is a Ramsey sequence, whereas for each k ∈ {1, • • • , N/2} the 2k − 1, 2k sequences have 2k π-pulses with intervals τ 2k−1 = T /(2k−1), τ 2k = T /(2k), respectively.This protocol reconstructs the noise spectrum by sampling S(ω k ) at equidistant frequencies, The reconstruction is done using the inverse of Eq. ( 17), where higher harmonics effects are taken into account using methods in Refs.[5,21].Since for a classical process the noise spectrum is symmetric, S(ω) = S(−ω), we obtain the auto-correlation G(t j ) with a sampling t j = jT N (j = 0, • • • , N ) similar to the Walsh method, by applying the inverse DFT [29].Examples of the reconstruction of an OU noise at 0.3 MHz frequency are shown in Figs.2(a,b), which show that the Walsh reconstruction improves significantly at larger n (n = 7) and outperforms the CPMG method.
We quantify the operational performance of spectral reconstruction protocols with the normalized reconstruction error in both the time and frequency domains, where A 0 , A are the theoretical and estimated values of the reconstructed function A, which is either G or S.
Indeed for an OU noise, one can analytically calculate the reconstruction error.For the CPMG scheme limited by the error in the δ-function approximation, a precise analysis in Ref. [35] under showing that the error grows as τ c and can only be reduced by increasing T .The Walsh scheme is limited by the error in approximating G with the discretized G N .
We then analytically obtain the reconstruction error for an OU noise at zero frequency when τ τ c , showing that the error decreases not only as τ c increases, but also as the reconstruction order n increases, resulting in decreasing τ = T /2 n .This feature makes the Walsh scheme distinct from the CPMG scheme, which can only suppress the reconstruction error by increasing the time T (and not n alone, see Appendix C for more detail).We numerically compute the reconstruction error as a function of the reconstruction order n in Fig. 2(c).As n increases, the average error decreases initially for both the Walsh and the CPMG methods; however, the error for CPMG soon saturates at large n, while the error for Walsh keeps decreasing with an exponential behavior.This clearly shows that the reconstruction error for Walsh QNS can be suppressed to arbitrarily small values as long as the number of sequences is large enough, as indeed its error is only limited by the sampling time-window.Instead, sampling with larger n in CPMG only provides additional information in a higher-frequency range beyond the dominant feature of the target spectrum (concentrated at a low frequency), which does not improve the reconstruction of the overall spectrum.
To further validate that the Walsh method outperforms the CPMG method under a large correlation time τ c , we compute the τ c dependence of the average reconstruction error (Fig. 2(d)).We exclude potential errors introduced by the DFT by comparing the error for the CPMG spectrum to the error for the Walsh autocorrelation.The calculated CPMG error (S) matches the analytical prediction (black dashed curve) in Eq. ( 21), which increases with τ c .In contrast, the Walsh error (G) decreases with τ c as predicted by Eq. ( 22) (gray dashed curve).For the OU noise centered at non-zero frequencies, the error saturates at large τ c , which is due to the imperfect sampling of the oscillatory feature of the auto-correlation.Thus, under the same reconstruction sequences, a faster oscillation (larger ω s ) in the OU model has a larger saturation error, due to worse sampling -as shown in the comparison between ω s /(2π) = 0, 0.1, and 0.3 MHz in Fig. 2(d).
Despite providing an "exact" reconstruction of the noise in the time domain, limited only by the sampling order, it is still necessary to analyze the Walsh reconstruction error in the frequency domain, which might be additionally limited by the error in DFT.Such a limitation may come both from a finite time range, which does not capture the full decay of the noise auto-correlation, or from finite sampling points, which do not capture the high-frequency oscillatory feature.In Fig. 2(d), we exclude the effect of insufficient sampling for the highfrequency feature by setting a large N = 2 10 , such that the limitation is only given by the finite time range.We plot the DFT of the theoretical G(t j ) (red dashed curve), which dominates the error for the Walsh spectrum (S) at large τ c .Similarly, we plot the inverse DFT of the theoretical S(ω j ) (blue dashed curve), which dominates the error for the CPMG auto-correlation (G) at small τ c due to the imperfect capture of high frequency components with a finite frequency range.We note that with the knowledge of the functional form of the noise model, these limitations can be overcome by fitting and extrapolating the data to an infinite range before performing Fourier transform (dark red dashed curves).

IV. EXPERIMENTAL DEMONSTRATION
To demonstrate the applicability of our method in an operational setting, we performed optically-detected pulsed magnetic resonance experiments on the electronic spin of a single NV center in diamond at ambient temperature [41,42] (Fig. 3(a)).We aligned a static magnetic field of ∼460 G along the NV axis to lift the degeneracy between the |m S = ±1 electronic ground states and optically polarized the 14 N nuclear spin to the |m I = +1 nuclear spin state via an excited-state level anti-crossing (ESLAC) [43].The NV center was located at a depth of ≈ 30 µm, where the spin bath is mainly composed of the 13 C nuclear spins with a concentration ≤ 1.1 % and a nuclear Larmor frequency of ≈ 0.5 MHz.Although the nuclear spin bath is a quantum many-body system, its effective interaction with the electronic spin at such a large field over multiple experimental realizations can be accurately described by an effective longitudinal fluctuating classical field [44,45].
We coherently modulated the spin qubit encoded in the |m S = 0 and |m S = −1 states of the electronic spin using sequences of microwave pulses delivered through a straight copper wire.We sampled the logical power spectrum of the noise with up to N = 2 5 = 32 Walsh and CPMG sequences (Fig. 3(c)) of duration T = 8 µs, from which we reconstructed estimates of the logical auto-correlation function, auto-correlation function, and power spectrum (Figs.3(d-f)).The autocorrelation function reconstructed using both Walsh and CPMG methods shows an oscillation at around 0.5 MHz (Fig. 3(e)), which is observed as a peak in the power spectrum (Fig. 3(f)), matching the predicted Larmor frequency of the nuclear spin 13 C.These results demonstrate the applicability of Walsh reconstruction in characterizing the noisy environment of quantum devices.The operational performance of Walsh QNS, in particular in terms of reducing error bars or suppressing the amplitude increase in the auto-correlation function, could be further improved by addressing three sources of uncertainty, as we address next.
The first source of uncertainty is bias arising from a finite statistical sample.In Eqs. ( 3) and ( 7), the arithmetic and logical auto-correlations are well-defined for sufficient averaging over noise realizations, such that ω(t)ω(0) = G(t) + (t) ≈ G(t), where the approximation error induced by (t) becomes non-negligible if the statistical ensemble of noise trajectories is too small.For an OU noise with a correlation time τ c , the relative variance of the auto-correlation function increases almost exponentially with t due to the exponential decrease of its average value, which leads to larger relative error of the reconstructed auto-correlation at larger t.A reliable way to suppress the upper bound of this error is to increase the number of experimental averages, as we further discuss in the Supplemental Materials [29].
The second source of uncertainty is the finite contrast c of the interferometric signal S, from which the coherence factor χ = − log (2S − 1) is estimated with a relative error ∆χ = σ χ /χ = (2σ P /c)e χ /χ, where σ P is the uncertainty of the projective measurement, possibly due to photon shot-noise or spin-projection noise [46].When σ P is independent of χ, e.g., for a shot-noise limited measurement, then ∆χ is minimum at χ = 1 and diverges at both small and large values of χ.The sampling time should thus be chosen neither too long nor too short to achieve the optimal value of χ ∼ 1; however, at fixed sampling time, different sampling sequences have different ∆χ, and the large ∆χ from a few coefficients contaminate the reconstruction -resulting in larger error bars on the reconstructed spectrum, as well as larger error bars on G(t) at longer times (see Fig. 3(e)) [29].This error propagation issue can be solved by thresholding small coefficients with large ∆χ, performing a weighted reconstruction, or amplifiying the signal, e.g., by sampling the noise with M concatenated sampling sequences and fitting the data to an exponential function of M [7,35].
The third source of uncertainty stems from coherent modulation of the signal due to the fact that the actual noise environment the sensor experiences is more complex than the classical model used thus far accounts for.In particular, it includes strongly coupled proximal nuclear spins which act as a genuinely quantum noise source.In the presence of such a "quantum-classical noise environment," the measured signal is modified to , where M (j) (T ) accounts for the influence of coherent oscillations due to individual proximal spins [29,44,47,48].The collapse of the signal associated with spin-bath characteristic frequencies might thus prevent directly extracting χ(T ) from S(T ) for certain Walsh sequences.Following typical CPMG methods, which extract both the quantum and classical noise contributions by fitting the time sweep data to a well-developed analytical formula, this problem could be solved by using larger sampling time T and reconstruction order N to suppress the contribution of the quantum bath (see Appendix D and Supplemental Materials [29] for further discussion).

V. CONCLUSIONS AND OUTLOOK
To conclude, we have proposed a digital noise spectroscopy method based on Walsh sequences, which resolves the difficulty in implementing standard combbased reconstruction approaches that require non-linear deconvolution algorithms or delta-like filter-function approximations.By applying a sequence of linear transformations, our method achieves a direct reconstruction of the noise auto-correlation with an accuracy only limited by the sampling in the time domain.Thanks to the fact that Walsh spectroscopy may be understood within a more general frame-based approach [22], it follows that the information inferred about the noise is provably sufficient to accurately predict the evolution of the system under arbitrary digital dephasing-preserving control (i.e., arbitrary digital sequences of π pulses), beyond the Walsh sequences used in the spectroscopy protocol itself.Our experimental demonstration using a single NV center in diamond further shows the applicability of our method to characterize the noise environment of realistic quantum devices.Although the experimental deviation from a classical noise model can be eliminated by various strategies, the same deviation can also be used as a sensitive probe of the dynamics of the non-classical environment, as discussed below.
Extending the Walsh approach to characterize complex quantum-classical environments is of significant interest for future research.Indeed, the presence of quantum (and/or non-Gaussian) components in the noise has been shown to give rise to novel phenomena, such as anomalous or distinctive decoherence behavior [49][50][51].Our numerical results demonstrate how the sensitive response of the Walsh reconstruction technique to the quantum spin bath offers a potential advantage in reconstructing quantum-classical environments (see Appendix D).It would be then interesting to systematically study how Walsh sequences modulate the dynamics of a quantum system subjected to such noise sources.This could lead to further methods exploiting Walsh sequences to reconstruct the higher-order spectra ("polyspectra") of a stationary non-Gaussian noise process [13,52], or to perform noise cross-spectroscopy using multiple qubits [53][54][55] for instance, using coherent control on coupled systems of electron spins [56][57][58].The direct access to the noise auto-correlation provided by Walsh spectroscopy as well as its optimal performance under complementary conditions than comb-based frequency-domain spectroscopy methods would be highly beneficial to characterize a broad range of environmental noise sources.

ACKNOWLEDGMENTS
It is a pleasure to thank Won Kyu Calvin Sun and Han Chen for useful discussions.L.V. is also especially grateful to Gerardo Paz-Silva for valuable input and collaborations over the years.This work was partly supported by HRI-001835, NSF EECS1702716 and PHY1734011.Work at Dartmouth was supported in part by the U.S. Army Research Office through MURI Grant No. W911NF1810218.

Appendix A: Theory
In this section, we highlight the challenges of sampling and reconstructing continuous functions using digital filters, provide additional insights to better understand the connections between the logical and arithmetic domains, and formalize the construction of the shuffling transformation and its matrix representation.We present a complementary, albeit more formal, derivation of the results presented in the main text using concepts from the theory of integration.Detailed derivations using matrix representation are included in Supplemental Materials [29].
We consider a single spin qubit interacting with a fluctuating field oriented along its quantization axis described by a Hamiltonian H(t) = ω(t)σ z /2.We perform a sequence of Ramsey measurements while coherently modulating the state of the spin with a sequence of m π-pulses, effectively generating the digital filter f m (t) over the time interval [0, T ], which we choose among the complete set of Walsh functions {f m } N −1 m=0 of order N = 2 n .The Walsh functions are piecewise-continuous functions defined over N contiguous intervals of length τ = T /N , which can be represented as discrete functions, and W [m, j] is the [m, j] element of the Walsh matrix of size N .
The dynamical phase acquired by the quantum sensor (Eq.( 2)) is φ m (T ) = ωm (T ) • T , where the effective precession frequency ωm is exactly the m-th Walsh coefficient of the longitudinal field, Assuming the external time-varying field ω(t) to be the representative of a zero-mean ( ω(t) = 0), stationary, Gaussian stochastic process, which is fully described by its second cumulant (variance), the mean normalized signal obtained after averaging over a series of M sequential measurements is Performing a cumulant expansion, the decoherence exponent is given by the variance of the Walsh coefficient, χ m (T ) = ω2 m (T ) T 2 /2, which can be expressed in terms of the auto-correlation function of the stochastic process G(t 1 , t 2 ), see Eq. (3).We use the assumption of stationarity and the composition property of Walsh functions under multiplication, τ ) (where ⊕ denotes the binary addition), to obtain (A3) Applying the change of variables, u(t ), and letting dµ(u, v) denote the integration measure, Eq. (A3) can be rewritten as This equation clearly highlights the core difficulty in reconstructing G(u) from measurements of χ m (T ), e.g., via direct inversion: the decoherence exponent is equal to an overlap integral between two functions that are defined over different domains -the auto-correlation function over the arithmetic domain and the Walsh function over the logical domain.This apparent difficulty is elegantly lifted by introducing the shuffling transformation T (u, v), which admits an explicit matrix representation derived below, connecting the arithmetic domain to the logical domain.Choosing dµ(u, v) = T (u, v)dudv, we obtain which has two equivalent representations depending on whether the integration is carried over the arithmetic domain (u) or the logical domain (v).
On the one hand, carrying the integration over the logical domain (v) brings us back to the conventional representation in the frequency domain, where is the shuffled FF expressed in the arithmetic time domain, while is the frequency FF obtained by computing its (finite time) Fourier transform, F{•}.Accordingly, the decoherence exponent is proportional to the overlap integral between the frequency filter and the power spectrum, It is worth noting that the Walsh frequency FFs have exact analytical expressions given by the product of trigonometric functions [59].However, reconstructing S(ω) from measurements of χ m (T ) with a set of digital filters whose frequency-filter representation is given by some non-trivial trigonometric functions is a hard nonlinear inversion problem that can only be solved numerically, e.g., using deconvolution algorithms.
To avoid this non-trivial inversion problem, a common strategy is to use periodic [CPMG (m = 2 n ) or PDD (m = 2 n − 1)] sequences, a subset of the Walsh basis that allow a simple approximation when sampling the power spectrum with a large number of pulses at high-frequency.Their frequency FF can be then approximated by a δ-like filter function, e.g., wCPMG (ω) ≈ δ(ω− ω CPMG ), such that χ m (T ) ≈ 1 2 dωS(ω)δ(ω − ω CPMG ) = S(ω CP M G )/2.Although powerful for solving certain operational problems and providing a simple intuitive picture, this method lacks in precision and generality.
Returning to the shuffling transformation, we note that, given Eq.(A8), T (u, v) can be explicitly computed (up to order N ) by computing the inverse Walsh transform (of order N ) of the convolution product of w m (t) and its time-reversed self wm (t) = w m (T − t), that is, In turn, the pseudo-inverse of T (u, v), T −1 (v, u), can be retrieved from the normalization condition, T (u, v)T −1 (u, v)du dv/ du dv = 1.Back to Eq (A5), carrying the integration over the arithmetic domain (u)instead gives us where the decoherence exponent is shown to be exactly the (finite-time) logical power spectrum evaluated over the finite interval [0, T ).The key result of this paper is contained in Eq. (A9): the decoherence exponent is exactly the logical power spectrum evaluated in the sequency domain, which in turn is the Walsh transform of the logical auto-correlation function L(v).This equivalence between the decohence exponent and the logical power spectrum leads to a simple sampling and reconstruction protocol to estimate the auto-correlation function of a fluctuating field via coherent modulation of a single-qubit sensor.

Appendix B: Relation to frame formalism
Within classical signal processing, the formalism of frames plays an instrumental role in a variety of applications where flexibility in representing a signal of interest is desirable or necessary [24].Being a digital basis over the interval [0, T ], the Walsh functions form a Parseval, "self-dual" discrete frame.That is, . Within the general frame-based approach to noise characterization introduced in Ref. [22], Walsh-based reconstruction protocols were introduced and (numerically) shown to achieve QNS beyond the frequency domain -including possibly non-stationary noise processes of both classical and quantum (non-commuting) nature.
In order to establish contact with the present setting, note that several simplifications of the general formalism of [22] are possible.Specifically: • Since the relevant noise is purely dephasing and classical, and the control is instantaneous and dephasing-preserving (π pulses only), it suffices to consider the z-direction of the control matrix -that is, the switching function y z,z (t) ≡ y z (t).
• Since the applied control is limited to digital πpulse sequences, we have C = {w m } N −1 m=0 , where m is the sequency.Thus, the Walsh sequences are not only the relevant frame, F , but they also provide the exact control used to implement QNS.
• Since, as noted, the Walsh functions are a basis, for any finite N they satisfy exactly the "finite-size frame condition" [ε = 0 in Eq. ( 13) of Ref. [22]].
A natural starting point is provided by the overlap integral that determines the qubit decay in Eq. ( 3), namely, On the one hand, by expanding each of the above switching functions in the Walsh basis, and substituting in Eq. (B1), we may collect the remaining factors into an equivalent of the usual noise spectrum in the frame language: where in the last line we have introduced the frame-based control-adapted noise spectrum [22], As long as the control modulation is effected by a Walsh sequence, we have y z (t) = w m (t), and the relevant framebased fundamental FF takes an especially simple form: On the other hand, we could equally well expand each of the noise variables in the Walsh frame, By substituting again in Eq. (B1), rewriting the noise auto-correlation in terms of frames, and collecting the remaining factors into a FF, one now recovers a discrete, frame-based version of the usual frequency representation.Specifically, we have: where the frame-based standard-picture second-order FF is given by while the corresponding frame-based standard-picture power spectrum reads From the above expression, it immediately follows that Comparing with Eq. (A9), one thus sees that the logical power spectrum in the sequency domain, ST (m), may be related to the diagonal elements of both the standard and the control-adapted noise spectrum, in this setting.
In general, however, since the appropriate frame F is chosen in such a way that all possible switching functions {y z,v (t)} supported by C are represented efficiently (with small error ε), it is the finite set of control-adapted spectra that enables for a "model-reduced" description and efficient characterization of the open system dynamics [22].As detailed in Appendix A, the Walsh QNS protocol we have presented in this work infers the target auto-correlation function from the decoherence exponent by leveraging stationarity and transformations between different domains, using solely π-pulse control.In contrast, the Walsh QNS protocols introduced and numerically demonstrated in [22] are applicable to arbitrary digital control (not necessarily dephasing-preserving) as well as non-stationary noise environments, at the cost of requiring the use of additional control sequences, which include non-π rotation angles.In this way, switching functions y z,v (t), v ∈ {x, y, z}, corresponding to sums and differences of Walsh functions may also be realized, and non-diagonal elements S(m, m ) can be estimated from the dynamics as well.The digitized noise autocorrelation may then be obtained via the relationship

Appendix C: Reconstruction error
The main error source in Walsh reconstruction comes from approximating the discretized auto-correlation with the piece-wise average of the continuous one, By considering an OU noise model with ω s = 0, we can analytically compute the error in the reconstructed autocorrelation.We consider separately the following two cases: when j > k, and when j = k, In both cases, the reconstruction error can be suppressed provided τ /τ c 1, as evident when expressing the G N for both cases to its leading order in τ /τ c , Thus, the average reconstruction error of the autocorrelation is dominated by its first point, where as before T = k τ k and we have used the summation Although our theoretical analysis and experimental demonstration are based on the assumption that the noise enviroment coupling to the qubit sensor may be treated as a classical Gaussian process, in a more general case a model comprising both a few nearby quantum spins and a far-away classical bath is appropriate [44,45,47,48,60].Here, we briefly discuss and compare the error introduced by the quantum spin component when reconstructing the classical part for both Walsh and CPMG methods, still working under the assumptions of stationarity and Gaussianity, so that noise effects are fully accounted for by the two-point noise correlation function G(t).
We assume that the sensor couples to a few nearby nuclear spins through hyperfine interactions.The evolution of each nuclear spin (j) is dependent on the state of the sensor spin and the Hamiltonian can be further written as 1 , where the intrabath interaction of different nuclear spins are neglected, such that their evolutions are separable.The initial state of the sensor is prepared to |+ , while the nuclear spins may be taken to be fully mixed, thus the initial joint density matrix is To deal with such an operator, one can either seek a perturbative expansion through the Magnus expansion [44], or continue to analyze the spin-dependent evolution [47].Here we follow the latter method and separate the time from 0 to T into N + 1 segments with duration τ 1 , τ 2 , τ 3 , • • • , τ N +1 , corresponding to the application of N instantaneous spin-flip pulses.Then the evolution operator U (T ) can be expressed as where the conditional evolution operators acting on the nuclear spins are When also taking the classical noise bath into account, the final population in |+ at time T is measured as where corresponds to the contribution of the j-th quantum nuclear spin, and χ(T ) is due to the classical bath.
The error in the noise reconstruction assuming a pure classical model comes from still using the classical signal formula S = (1 + e −χ )/2, instead of the corrected one in Eq. (S12).To mimic the experimental results, we simulate the noise reconstruction under the same experimental condition in Fig. 3 in the main text.We use a noise model composed of a single quantum nuclear spin as well as a classical spin bath that includes a zero-frequency OU noise source and a shifted OU noise with the Larmor frequency of the 13 C nuclear spin.In Fig. S4, we compare the reconstruction with and without the existence of the quantum spin.The results show that, for the qubit sensor subjected to a quantum-classical noise bath, the Walsh reconstructions present a larger deviation when still assuming the noise is classical, while the CPMG reconstructions are comparatively less affected.We discuss the dephasing of a qubit initial state |+ = (|0 + |1 )/ √ 2 subject to a time-dependent noise field ω(t)σ z /2 and to a sequence of instantaneous π pulses, corresponding to a modulation function f (t).The accumulated phase is then The measured signal under sufficient statistical averaging is where we assume a stationary and zero-mean noise such that We define the auto-correlation of the noise as For stationary and zero-mean noise, the above correlation only depends on the difference between two times, such that The attenuation function χ can be naturally expressed as an integral in frequency space, where we have defined a filter function The attenuation factor can also be calculated in time space as in Ref. [35], such that where c m = 1 T T o e −imωpt f (t)dt is the Fourier component of filter function at frequency mω p , where ω p = 2π T and f (t) = m c m e imωpt (0 ≤ t ≤ T ).For large T in comparison to the noise correlation time τ c , the "off-diagonal" term (the second term) and t/T term in the "diagonal" term (the first term) in Eq. (S8) are neglected.

B. Noise spectroscopy with CPMG sequences
For CPMG sequences comprising N π pulses and pulse interval T /N (note that N is an even number), the filter function is calculated as The poles of |F (ω)| 2 are ω = (2k + 1)π/τ , where k is any integer.In the limit of large N , we can approximately use Dirac δ functions to express where we use the δ-function approximation and calculate the attenuation function χ as where we use the symmetry of the spectrum for classical noise, S(ω) = S(−ω).
As derived, the accuracy of the noise spectroscopy relies on the approximation to Dirac comb structure of the filter function, which corresponds to a large T or large N limit.The expression in Eq. (S8) further elucidates such a criterion in the time domain.For large T in comparison to the noise correlation time τ c , the "off-diagonal" term and t/T term in the "diagonal" term in Eq. (S8) are neglected.For CPMG sequence with large T , we have with where ω p = π/τ and m = (2k + 1) (k = 0, 1, 2, • • • ) are odd numbers due to the symmetry of CPMG sequences.In this way, we obtain the same χ as in Eq. (S15).
Similarly, for a Ramsey sequence, we can calculate the filter function and the attenuation exponent in the large T limit reads Both Eqs.(S15) and (S21) form the basis of standard comb-based noise spectroscopy.The noise spectrum components S(0) and S(π/τ ) can be directly reconstructed by measuring the attenuation function χ.

C. Noise spectroscopy with Walsh sequences
Rather than measuring the noise spectrum by sweeping the frequency filter of CPMG sequences, our approach employes a "direct" reconstruction of the correlation in the time domain with Walsh modulation, namely, a digital modulation scheme that affords intrinsic compatibility with hardware constraints and time discretization [25].
By applying Walsh modulation sequences, the attenuation function χ is mapped to the logical auto-correlation of the noise, which is derived based on the logical Wiener-Khintchine theorem [23].The arithmetic auto-correlation is then obtained through a linear transformation, before we apply a Fourier transform to obtain the Fourier power spectrum of the noise.
We denote the modulation function f (t) of Walsh sequence m as f (t) = W m ( t/τ ) where τ = T /N , and choose the "sequency" labeling convention such that the pulse number (denoting value switch of f (t)) for the m-th sequence is m.The attenuation χ under the m-th walsh sequence is then calculated as where the continuous time from 0 to T is discretized to N equal pieces and the arithmetic auto-correlation is approximated with We also define the local logical auto-correlation for the discretized noise ω(j) as [23] L where ⊕ denotes the bitwise modulo 2 addition of the two integers j and k.The reason why we use bit-by-bit binary modulo is that the walsh sequences are defined under the binary basis, which satisfies the dyadic composition equality which directly connects the logical auto-correlation with the attenuation function through a linear transformation W −1 (the inverse of the Walsh matrix).The arithmetic auto-correlation is then obtained from the logical auto-correlation with a linear transformation [23] L Walsh reconstruction protocol In summary, the protocol for the reconstruction of the noise spectrum is as follows: 4. Calculate the noise spectrum S(ω) with discrete Fourier transform of the arithmetic auto-correlation.
As derived, the accuracy of the auto-correlation reconstruction depends only upon the discretization of the time from 0 to T .For standard noise spectroscopy, the accuracy is also affected by the discretization (and truncation) of the Fourier transform.As discussed in the main text and Appendix B, the above digital reconstruction protocol may also be reinterpreted within the general formalism of frame-based noise characterization [22].

Generation of TN , DN matrices
Although Ref. [23] reports details on generating the transformation matrices such as T N and D N , here we briefly summarize the derivation, in order to make the presentation more self-contained.
The bi-linear transfer matrix T N can be recursively generated as follows: where S N is the N × N shuffling matrix with unit elements "off to the right of the SW-NE diagonal" such as S 1 = 0, Based on T 2 we get above, we can get T 4 as: Then the transfer matrices T 8 , T 16 , T 32 , etc. can be obtained recursively.
In turn, the diagonal matrix D N can be generated with D N (k, k) = 2 1−δ(k,0)−V k , where δ(k, 0) = 1 if and only if k=0, V k is the number of ones of k represented in the binary format.

S2. COMPARISON BETWEEN WALSH AND CPMG NOISE SPECTROSCOPY
A. Discrete Fourier transform and comparison scheme Since the reconstructed Walsh auto-correlation or CPMG spectrum are values of G(t) or S(ω) at specific time or frequency points (rather than average values in some time or frequency intervals), in this work we modify a bit the  discrete Fourier transform algorithm to make it compatible with our protocols and to give less errors than existing fast Fourier transform functions (such as "fft" functions in MATLAB).
For the noise reconstruction with the Walsh method using N = 2 n sequences with time T , we first obtain discrete values of the auto-correlation G(t j ) with t j = 0, T N , • • • , T (N −1)

N
. With the assumption of a symmetric auto-correlation such that G(−t) = G(t), we can actually extend the time range and obtain 2N −1 discrete G(t j ) points with t j = jT /N , j = −(N − 1), • • • , (N − 1).The corresponding discrete Fourier frequency components we can obtain is then S(ω k ), with ω k = πk T (N −1)/N (k = 0, • • • , N − 1), which can be calculated using where ∆t = T /N .To make a fair comparison, the first and last sequences for the CPMG method sample the same frequency as the Walsh method such that the ranges of reconstructed spectrum and auto-correlation are the same as (or similar to) the Walsh method.In addition, the total sequence time ∼ N T for both methods should also be similar to each other.More precisely, the first sequence of CPMG scheme is a Ramsey sequence with f (t) = 1, and the 2k, 2k + 1 sequences are both CPMG-k sequences with pulse interval τ 2k = T /(2k − 1), τ 2k+1 = T /(2k), respectively.Note that k takes values from 1 to N/2 (see an example of the comparison shown in Fig. S1).Such a set of CPMG sequences give a sampling in frequency space ω k = kπ/T with k = 0, • • • , N .As long as S(−ω) = S(ω), we can extend the frequency range and obtain S(ω k ) with 2N + 1 points The corresponding discrete auto-correlation we could obtain is then G(t j ) with t j = jT N (j = 0, • • • , N ), which can be calculated using • S(ω) is reconstructed through discrete Fourier transform of G(t).In addition to linearly propagated error of G(t), the discrete Fourier transform introduces error dominated by the relation between τ c and T , as well as the relation between τ c and T s .

CPMG spectroscopy:
• S(ω) is first reconstructed and the error is dominated by the relation between the frequency space sampling π/T and the characteristic spectrum properties including noise frequencies and linewidths.A significant error source comes from the δ-function approximation of the filter functions, which is eliminated when τ c /T 1.
• G(t) is reconstructed through discrete Fourier transform of S(ω).In addition to linearly propagated error of S(ω), the discrete Fourier transform introduces error dominated by the relation between π/T and the characteristic spectrum properties including noise frequencies ω s , linewidths 1/τ c , as well as the frequency sampling range.
Besides the overall performance of the noise reconstruction discussed in the main text, here we show an example where we look at the error of individual points in the reconstructed spectrum or auto-correlation, as defined above.Specifically, in Fig. S2 we show an example of the spectrum reconstruction error, where the Walsh method shows larger error at larger frequency due to the insufficient time space sampling.When n increases, the error for Walsh decreases for all frequencies, while the error for CPMG decreases only for larger frequency due to the effect of taking into account more higher harmonics for the high-frequency components.

S3. STATISTICAL ANALYSIS OF THE OU NOISE MODEL
We note that in the reconstruction comparison discussed in the main text, we simulate the attenuation functions by directly calculating the integral in Eq. (S3).However, those simulations are based on an assumption of infinite number of experimental averages or noise instances, which need not be satisfied in practical applications and does not give enough insight about the possible errors induced by the stochastic nature of the noise.Thus, we add a statistical analysis of the OU noise model and analyze the potential impact of insufficient experimental averages or noise instances.
To generate a static OU noise that satisfies a stationary Gaussian distribution, we can use an "updating" equation [38,39], namely, ω(t j )ω(t k ) for t j ∈ [jT /N, (j +1)T /N ], t k ∈ [kT /N, (k+1)T /N ] as the G N (j −k), which potentially achieves an average effect and partly decreases the influence of insufficient average.In addition, under the stationary noise assumption, the auto-correlation is only dependent on the time difference, thus its reconstruction is an effective "average" of many "time pairs" in the time trace with the same time difference, which potentially yields less reconstruction errors as well.We note that although these effects could potentially allow less average for a satisfying reconstruction, in Walsh experiments the minimal inter-pulse delay is usually set to be smaller than the noise correlation time (for satisfying sampling in time domain), and the improvement of both aforementioned "average" effects is minor due to the strong correlation within each inter-pulse delay.

S4. QUANTUM-CLASSICAL ENVIRONMENT
Although our theoretical analysis and experimental demonstration are based on the assumption of a classical noise model satisfying Gaussian distribution, in a more general case the noise source of a qubit comprises both a few nearby quantum spins and a far-away classical bath (which might be itself of quantum nature, but able to be reduced to a classical model in view of its large size).Then the task is in principle to both detect the quantum spins and the classical bath.The method to extract information about a quantum-classical environment has been well-developed using CPMG or XY sequences [44,47,48,60].However, a precise detection of the coupling constant due to the quantum spin requires sweeping the number of pulses to obtain the population oscillation of an initial state (say, |+ ).In contrast, both the Walsh and CPMG methods studied in this work, with a "single" point measurement atfixed sequence time T , are designed to reconstruct a classical noise and are thus unable to separate contributions from the quantum and classical noise sources easily.As mentioned above, the "single" point CPMG sequence can be easily modified to extract the environmental information (in particular, the quantum part), so here we briefly discuss and compare the error introduced by the quantum spin when reconstructing the classical part for both Walsh and CPMG methods.We note that a more in-depth study, while being of interest for future investigation, is beyond the scope of this work.

A. Derivation of the system dynamics under DD
We consider the NV electronic spin coupled to a 13 C nuclear spin bath.Under the secular approximation due to the large electronic energy scale, the Hamiltonian is written as  and a correlation time τ c1 = 16 µs.In Fig. S4, we compare the reconstruction with and without the existence of the quantum spin.We see that the quantum spin introduces additional errors in the auto-correlation reconstruction for both the Walsh and CPMG methods.In particular, while Walsh reconstruction for a pure classical model is almost perfect, the quantum contribution leads to a worse reconstruction than the CPMG method, which instead is closer to the theoretical predictions.Our simulation matches the experimental observation in the main text and clearly shows the effects of the quantum noise in a quantum-classical model.
In Fig. S5(a) we further use the same noise model to simulate a series of CPMG measurements, as a comparison to the experimental measurement shown in Fig. S5(b).Both simulation and experiment show coherent oscillations on the two sides of the Larmor frequency (∼ 0.5 MHz), and fast decay is seen at the Larmor frequency.The discrepancy between the simulation and experiment could be due to the imperfection in the control pulse and different size and strength of the actual qubit environment.
To overcome the distortion that a quantum environment introduces in the reconstructed noise spectrum, a simple strategy is to use periodic sequences to first determine the parameters of the quantum environment.Then, the correction to the signal can be easily calculated numerically for each Walsh sequence, which allows determining the decay χ due to the classical noise only, and thus correctly reconstructing the noise auto-correlation.Based on the error in χ, we then obtain the error of the reconstructed auto-correlation and noise spectrum for both the Walsh and the CPMG methods.We assume the transformation from χ to S or G are represented by a matrix M , the error of each point in the S or G can be calculated with In particular, the error propagation from experimental χ to the auto-correlation function in Walsh experiment is calculated with Auto-correlation reconstruction error for Walsh method.We assume the same measurement uncertainty σχ k = 1 for all χ k and calculate the propagated error σG using Eq.(S7).(d) Noise spectrum reconstruction error for CPMG method.We assume the same measurement uncertainty σχ k = 1 for all χ k and calculate the propagated error σS using Eq.(S5).
where T −1 N ,D −1 N , and W −1 N are defined in Eqs.(S28) and (S29).The noise spectrum for CPMG is reconstructed from χ i through an almost diagonal matrix transform even when the higher order harmonics are taken into account; however, the auto-correlation for Walsh is reconstructed from χ i through a complicated non-diagonal matrix as shown in Figs.S7(a-b).Thus, even a few points with large error would contaminate most points in the reconstructed curve, which become a potential limitation for practical applications.In Figs.S7(c-d), we evaluate such an effect by inputting the same error to measured σ χm ≡ 1 and calculating the error in auto-correlation (spectrum) for Walsh (CPMG) reconstruction.For Walsh method, the error in G(t) increases with t, while for the CPMG method the error in S(ω) almost does not depend on the value of frequency ω.

D. CPMG experiment with fixed τ
As mentioned in the discussion in Sec.S4, the typical way to reconstruct a quantum-classical noise is to measure the time evolution P |+ (T ) under CPMG sequences with different inter-pulse dalay τ and fitting to the analytical formula in Eq. (S12).Here we choose a series of the τ such that the measured noise frequencies taking values in 0.5 16 , 1 16 , . . ., 14.5  16 , 15  16 MHz and plot the experiment result in Fig. S5(b).When far away from the 13 C Larmor frequency (-0.496MHz), the evolution can be well fitted by an exponential decay function, P |+ (N ) = 1 2 (1+ce −( N τ T 2 ) α ), where c is a phenomenological fitting parameter to better capture the overall especially the long-time decay feature.When the resonance frequency is around the 13 C Larmor frequency, coherent oscillations are observed, the data are

2 FIG. 1 .
FIG. 1. Walsh noise spectroscopy protocol.(a) A complete set of N Walsh sequences {wm(t)} samples the coefficients of the logical power spectrum S(m) in the sequency domain up to order N = 2 n by measuring the decoherence exponents χm(T ) after a sampling time T .The logical power spectrum S[m] is converted into the logical auto-correlation function L[j] by performing the inverse Walsh transform; L[j] is then converted into the auto-correlation function G(t) by performing the (pseudo-)inverse shuffling transformation T −1 , which is finally converted into the power spectrum S(ω) by computing the discrete Fourier transform (DFT).(b) The Walsh sampling and reconstruction procedure results in an N -point approximation of the auto-correlation function of G(t) over [0, T ) in the time domain, which is converted in the power spectrum S(ω) in the frequency domain.(c) Standard comb-based protocol, where a set of N + 1 CPMG sequences directly samples the power spectrum S(ω k ) in the frequency domain by generating frequency FFs whose peak-frequency increases linearly with the sequence indexing number.The auto-correlation function is recovered by computing the inverse DFT (see Supplemental Materials[29] for details on the sequences).(d) The CPMG sampling and reconstruction procedure results in an approximation of the power spectrum of S(ω) in the frequency domain, which can be converted to the auto-correlation in the time domain.

FIG. 2 .
FIG. 2. Numerical results.(a) Reconstructed auto-correlation function for simulated Ornstein-Uhlenbeck noise over a sampling time of T = 32 µs using Walsh QNS with N = 2 5 = 32 (red disks) and N = 2 7 = 128 (red shaded disks) sampling sequences vs. CPMG QNS with N = 2 5 = 32 sampling sequences.Data are shown up 16 µs to highlight the differences between the Walsh and CPMG reconstructed signals.The noise parameters are τc = 4 µs, b 2 = 0.003125 µs, ωs = (2π) 0.3 MHz.(b) Reconstructed power spectrum in the frequency domain using Walsh and CPMG.The "Walsh fit" (dark red dashed curve) plots Eq. (19) with the fitting value of b 2 , τc, ωs from the corresponding auto-correlation data in (a), and such a rule applies to other plots.(c) Dependence of the average reconstruction error on the reconstruction order n.The OU noise parameters τc, b 2 , ωs and sampling time T are the same as (a).(d) Dependence of the average reconstruction error on the auto-correlation time τc.The parameters b 2 and T are the same as for (c), while n = 10 is fixed and Walsh cases with ωs = 0, (2π)0.1 MHz are also added as a comparison.Colors are the same as for (c), except for extra specifications.The analytical curves (black and gray dashed curves) plot theoretically predicted (S) and (G) in Eqs.(21) and(22).DFT-limited (S) (red) and (G) (blue) are the errors of the spectrum and auto-correlation obtained through DFT of theoretical G(tj) and S(ωj), respectively.

FIG. 3 .
FIG. 3. Experimental results.(a)-(b) A control sequence of five π-pulses (blue) modulates the electronic spin of a single nitrogen-vacancy center in diamond to sample the fifth coefficient of the logical power spectrum of the noise generated by a bath of 13 C nuclear spins.The control pulses are applied at the node of the fifth Walsh sequence to synthesize an effective digital filter (red).A green laser at 532 nm focused through a high-resolution microscope objective is used to optically polarize and readout the state of the electronic spin.(c) Measured logical power spectrum ST [m] in the sequency domain with N = 2 5 = 32 Walsh sequences of duration T = 8 µs.(d) Reconstructed logical auto-correlation function, LN [j].(e) Reconstructed auto-correlation function, G(t), using Walsh and CPMG QNS.The CPMG sequences have the same duration as the Walsh sequences.(f) Reconstructed power spectrum in the frequency domain, S(ω), using Walsh and CPMG QNS.The vertical bar indicates the expected precession frequency of 13 C nuclear spins.
Based on the initial values T 1 = 1, we obtain

FIG. S1 .
FIG.S1.An example of the comparison scheme between Walsh and CPMG sequences with N = 32 and T = 16 µs.
FIG. S3.Variance of ω(t)ω(0) in a simulated OU noise.(a) Variance of G(t) in a simulated static OU noise trace with b 2 = 1 µs, τc = 4 µs, ωs = 0. We use a time step 0.03125 µs and simulate the noise from 0 to 32 µs with 65536 = 216  repetitions.The simulated noise traces are then divided into 2 16−n groups with size N = 2 n such that the variance of the mean value of different group size can be calculated.The theory curve is plotted using function b4 (1 + e −2t/τc )/N (b) The mean value of variances (over all points in the time traces for each N ) in (a) plotted as a function of N .
FIG. S7.Error propagation.(a)Transform matrix from χ(j) to G(i) for Walsh reconstruction method.(b) Transform matrix from χ(j) to S(i) for CPMG reconstruction method.For both plots in (a) and (b), parameters N = 16, T = 32 are used.(c) Auto-correlation reconstruction error for Walsh method.We assume the same measurement uncertainty σχ k = 1 for all χ k and calculate the propagated error σG using Eq.(S7).(d) Noise spectrum reconstruction error for CPMG method.We assume the same measurement uncertainty σχ k = 1 for all χ k and calculate the propagated error σS using Eq.(S5).