## Abstract

Quantum sensing protocols that exploit the dephasing of a probe qubit are powerful and ubiquitous methods for interrogating an unknown environment. They have a variety of applications, ranging from noise mitigation in quantum processors, to the study of correlated electron states. Here, we discuss a simple strategy for enhancing these methods, based on the fact that they often give rise to an inadvertent quench of the probed system: there is an effective sudden change in the environmental Hamiltonian at the start of the sensing protocol. These quenches are extremely sensitive to the initial environmental state, and lead to observable changes in the sensor qubit evolution. We show how these new features give access to environmental response properties. This enables methods for direct measurement of bath temperature, and for detecting non-thermal equilibrium states. We also discuss how to deliberately control and modulate this quench physics, which enables reconstruction of the bath spectral function. Extensions to non-Gaussian quantum baths are also discussed, as is the application of our ideas to a range of sensing platforms (e.g., nitrogen-vacancy (NV) centers in diamond, semiconductor quantum dots, and superconducting circuits).

## Introduction

A key technique in quantum sensing is to use a suitably driven sensor qubit to characterize a noisy, dissipative environment. Commonly referred to as quantum noise spectroscopy (QNS)^{1}, this modality allows one to understand and possibly mitigate sources of decoherence that degrade a quantum processor^{2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}. It also serves as a powerful means to probe a complicated many-body target system via its fluctuation properties (see, e.g.,^{20,21,22,23,24}). While many QNS protocols focus on the more specific problem of characterizing classical Gaussian noise^{4,5,6,7,8,9,10,11,12}, recent work has explored methods that go beyond these assumptions^{13,14,15,16,17,18,19,25,26,27,28,29,30}.

One crucial difference between a true quantum environment and a simple classical noise source is that the former is dynamical: its properties can change in response to an external perturbation. At a simple linear response level, this is encoded in the environment’s susceptibility functions, or equivalently, asymmetric-in-frequency quantum noise spectral densities^{31,32,33,34,35}. The most direct (and perhaps extreme) way to probe these properties is to induce a quantum quench, where the environment experiences a sudden change in its Hamiltonian. Studying the consequences of deliberate quenches has been an extremely useful tool for probing a variety of phenomena in correlated systems^{36}.

In this work, we show that the basic physics of a quantum quench is relevant to a wide variety of commonly employed QNS schemes and systems; crucially, this is the case even if the protocol does not involve a deliberate quenching of the environment. We show how these quenches (whether intrinsic or deliberate) can be harnessed as a powerful new sensing modality: they reveal environmental response properties in previously unexplored ways. By analyzing standard *T*_{2}-type qubit-based QNS protocols, we identify generic conditions under which an inadvertent quench of the environment influences the sensor qubit’s evolution. Surprisingly, the existence and properties of this quench effect are not simply a function of the initial environmental Hamiltonian, but instead depend on the initial environmental state. The dominant effect of the quench is an unexpected phase shift of the sensor-qubit coherence. For common cases where the environment is either a Gaussian quantum bath or the sensor–environment coupling is weak, we derive a simple, analytical expression connecting this quench phase shift (QPS) to a dissipative susceptibility of the environment (i.e., an effective density of states, DOS). We then use this to address a number of phenomena. In particular, using the extra information provided by the QPS, a standard *T*_{2}-based QNS protocol can be enhanced to independently characterize both fluctuation and response properties. As we discuss, such information lets us determine the temperature of a thermal equilibrium environment, making only mild assumptions encompassing a wide range of realistic scenarios (including sub-, super-, and Ohmic environments, environments generating 1/*f* noise, etc.). For the paradigmatic case of an environment with an Ohmic spectral density, we show that one can use the QPS (along with standard decoherence measurements) in a simple Hahn-echo protocol to directly extract the environmental temperature (something that cannot be done from decoherence measurements alone). We also show that the quench mechanism is relevant to generic initial bath states beyond equilibrium, and can be used to probe response properties in nonequilibrium systems. We further discuss extensions of this physics in regimes beyond the validity of linear response.

## Results

### Intrinsic quantum quenches in standard *T*
_{2}-type sensing protocols

While our ideas apply to a wide variety of settings, we focus throughout this paper on a standard QNS experiment where the sensor qubit is coupled to an environment via a pure-dephasing interaction. Transforming to the standard toggling frame set by the choice of qubit-control pulses (see e.g.,^{1}), as well as the rotating frame with respect to free qubit Hamiltonian \({{\Omega }}{\hat{\sigma }}_{z}/2=\left({{\Omega }}/2\right)\left(\left|\uparrow \right\rangle \left\langle \uparrow \right|-\left|\downarrow \right\rangle \left\langle \downarrow \right|\right)\), the qubit-bath Hamiltonian is given by

where \({\hat{H}}_{{{{{{{{\rm{b}}}}}}}},\uparrow }\) (\({\hat{H}}_{{{{{{{{\rm{b}}}}}}}},\downarrow }\)) describes the bath Hamiltonian conditioned on qubit being in the state \(\left|\uparrow \right\rangle\) \(\left(\left|\downarrow \right\rangle\right)\). We set *ℏ* = 1 throughout. As in standard *T*_{2}-type measurements, the probe qubit is initialized in \(\left|\downarrow \right\rangle\) and is initially unentangled with the bath. The quench physics we describe is crucially sensitive to the initial state of the bath. For illustrative purposes, we first focus on a simple but generic situation where the qubit \(\left|\downarrow \right\rangle\) state lifetime can be viewed as infinite, and the bath has relaxed to a thermal equilibrium state with respect to \({\hat{H}}_{{{{{{{{\rm{b}}}}}}}},\downarrow }\). The initial density matrix of the qubit-bath system is thus

where *Z*_{T} is a normalization factor and *T* is the initial bath temperature. We stress that the initial bath state \({\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}\) closely depends on the initial qubit state: again assuming the system has reached thermal equilibrium prior to start of the sensing protocol, and if instead the qubit is initialized in \(\left|\uparrow \right\rangle\), then \({\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}\) would be a thermal state with respect to \({\hat{H}}_{{{{{{{{\rm{b}}}}}}}},\uparrow }\).

We consider a standard *T*_{2}-based sensing protocol. At the start of the protocol (*t* = 0), an instantaneous *π*/2-pulse is applied to prepare the qubit in an equal superposition state \(\left|+\right\rangle \equiv \left(\left|\uparrow \right\rangle +\left|\downarrow \right\rangle \right)/\sqrt{2}\); the system then evolves under \({\hat{H}}_{{{{{{{{\rm{tot}}}}}}}}}\) for time *t*_{f}, while the qubit is subject to a sequence of instantaneous control *π*-pulses. At the end of the protocol, one measures qubit Pauli operator \({\hat{\sigma }}_{x}\) or \({\hat{\sigma }}_{y}\). By repeating the measurements and varying *t*_{f}, one can obtain the qubit coherence \(\langle {\hat{\sigma }}_{-}({t}_{f})\rangle\) as a function of *t*_{f}.

Surprisingly, in many cases an intrinsic effective bath quench occurs as part of this standard sensing protocol. To see this, we first rewrite \({\hat{H}}_{{{{{{{{\rm{tot}}}}}}}}}\) as

with \(\hat{\xi }\equiv {\hat{H}}_{{{{{{{{\rm{b}}}}}}}},\uparrow }-{\hat{H}}_{{{{{{{{\rm{b}}}}}}}},\downarrow }\), \({\hat{\sigma }}_{0}\equiv \left|\uparrow \right\rangle \left\langle \uparrow \right|+\left|\downarrow \right\rangle \left\langle \downarrow \right|\). This suggests a simple picture for understanding the qubit evolution during the protocol: the qubit dephases due to coupling to the bath noise operator \(\hat{\xi }\), while the bath evolves under an effective averaged bath Hamiltonian. Note that these two processes are not independent, as the effective bath Hamiltonian would affect \(\hat{\xi }\) during time evolution and hence influence qubit dynamics.

Notably, the averaged bath Hamiltonian in Eq. (4) may or may not commute with the initial bath state, which in our example is determined by \({\hat{H}}_{{{{{{{{\rm{b}}}}}}}},\downarrow }\). As shown in Fig. 1a, this motivates defining a time-dependent effective bath Hamiltonian \({\hat{H}}_{{{{{{{{\rm{b,eff}}}}}}}}}(t)\) whose form reflects the change of the qubit state \({\hat{\rho }}_{{{{{{{{\rm{qb}}}}}}}}}\) at *t* = 0:

We see that except for the trivial case \({\hat{H}}_{{{{{{{{\rm{b}}}}}}}},\uparrow }={\hat{H}}_{{{{{{{{\rm{b}}}}}}}},\downarrow }\), the bath Hamiltonian \({\hat{H}}_{{{{{{{{\rm{b,eff}}}}}}}}}(t)\) exhibits a sudden change (i.e., a quench) that is solely due to the sudden change in qubit state at *t* = 0. As we show below in Eqs. (11) and (12), this quench is physically meaningful: it directly determines the evolution of the qubit coherence \(\langle {\hat{\sigma }}_{-}({t}_{f})\rangle\), the very quantity that is measured in the protocol.

For our subsequent discussion, it is useful to rewrite \({\hat{H}}_{{{{{{{{\rm{b,eff}}}}}}}}}(t)\) to make the quench more explicit:

Here *η*(*t*) is an effective quench control function, which encodes the temporal profile of the quench. \(\hat{V}\) represents the quench operator, which is defined as

For the specific example considered here, we have \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}={\hat{H}}_{{{{{{{{\rm{b}}}}}}}},\downarrow }\) and

where Θ(*t*) is the Heaviside step function. If the total initial state is in thermal equilibrium with respect to \({\hat{H}}_{{{{{{{{\rm{tot}}}}}}}}}\) in Eq. (1), we can again define \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}\) using Eq. (5) as the bath Hamiltonian contingent on the initial qubit state. The quench operator \(\hat{V}\) in this case is sensitive to the initial qubit state: if the qubit was initialized in \(\left|\uparrow \right\rangle\), then we would have \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}={\hat{H}}_{{{{{{{{\rm{b}}}}}}}},\uparrow }\) and \(\hat{V}=-\hat{\xi }/2\). If the total system is initially out of equilibrium, the definitions in Eqs. (7) and (8) can describe quench physics corresponding to a much wider range of nonequilibrium initial bath states, even beyond the specific case in Eqs. (3) and (10). In the more general case, \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}\) in Eq. (7) is directly controlled by the initial bath state (see “Methods”).

We stress that in contrast to conventional quench experiments which require external temporal control of the bath, here the quench is intrinsic to the measurement protocol: it occurs unavoidably simply through the back-action of the qubit on the bath associated with the start of the QNS protocol. While we have discussed a simple example here, the same physics also applies to more general initial bath states and more general quench functions *η*(*t*). We show explicitly in “Methods” how in general, one can find the form of the effective quench operator \(\hat{V}\) from the initial bath state (even if it is a non-thermal state unrelated to \({\hat{H}}_{{{{\rm{b}}}},\uparrow /\downarrow}\)). Further, one can also generate more complicated quench functions *η*(*t*): as we will show, one approach to achieve this is to use a qubit embedded in a multilevel physical system, e.g., a nitrogen-vacancy (NV) center defect in diamond (see discussion following Eq. (33)).

As our approach is more general than the specific example of Eq. (3), in what follows, we will allow *η*(*t*) to have generic time dependence during the time evolution (0 < *t* < *t*_{f}), and we will assume a general \(\hat{V}\) (unless specified otherwise).

### General sensor qubit evolution including effective quench

We now rigorously show how the effective quench physics described in Eqs. (7) and (8) manifests itself in our standard *T*_{2}-based sensing protocol. We first transform to an appropriate interaction picture, determined by the initial (static) bath Hamiltonian \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}\), and we again assume the standard toggling frame defined by qubit-control pulses. We thus have time-dependent interaction-picture bath operators \(\hat{V}(t)\) and \(\hat{\xi }(t)\) whose time dependence is generated by \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}\). Note that as the initial bath state is stationary in our interaction picture (i.e., \([{\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}},{\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}]=0\)), \(\hat{\xi }(t)\) will describe stationary quantum noise: all its correlation functions will respect time-translational invariance.

Working in the above interaction picture, and letting *F*(*t*) denote the usual filter function (also known as the switching function in time domain) that encodes the timing of qubit-control *π*-pulses, the time-dependent qubit coherence is given by (see “Methods” for details)

We stress that Eqs. (11) and (12) are valid for a generic form of quench function *η*(*t*) and operator \(\hat{V}(t)\), and not limited to the specific case described by Eqs. (5) and (6). Note crucially that we do not include the quench operator \(\hat{V}\) in the definition of our interaction picture. While one could work in this alternate frame, it would obscure the fact that in general, \(\hat{V}\) does not commute with the initial bath state. It would also lead to a time-dependent bath noise operator \(\hat{\xi }^{\prime} (t)\) that is nonstationary.

To discuss the sensor qubit evolution, it is convenient to separately parametrize the magnitude and phase of the qubit coherence function in Eqs. (11) and (12):

The effects of the environment are now fully described by the (real, nonnegative) dephasing function *ζ*(*t*_{f}) (which controls the magnitude of the coherence) and the real bath-induced phase-shift function Φ(*t*_{f}). Standard QNS protocols use information in *ζ*(*t*_{f}) to probe properties of the environment^{1}. As we will now see, due to our effective quench physics, key new features of the environment will also reveal themselves through the unexpected phase shift.

### Quench-induced sensor-qubit phase shift

The general goal of our QNS protocol is to measure properties of the environment. *T*_{2}-based QNS protocols typically have a sole focus on the fluctuation properties of the bath, specifically fluctuations of the bath noise operator \(\hat{\xi }\). The simplest quantity characterizing these is the symmetrized noise spectral density (NSD) \(\bar{S}[\omega ]\), given by:

The average value here is with respect to the initial bath density matrix \({\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}\). As discussed in many places (see e.g.,^{32}), this quantity is symmetric in frequency, and plays the role of a classical NSD.

Another generic environmental property that is not typically probed in standard *T*_{2}-based QNS schemes is the dynamical response properties of the bath: how does it change in response to a time-dependent external perturbation? At the simplest linear-response level, this is described by conventional linear response susceptibilities (or equivalently, retarded Green’s functions). We will be interested in a particular susceptibility, describing how the average value of the noise operator \(\hat{\xi }\) changes in response to a perturbation coupling to the quench operator \(\hat{V}\). This is described by the Green-Kubo linear response function (see, e.g.,^{37} for a pedagogical introduction)

We stress that in general, this susceptibility is distinct from the NSD \(\bar{S}[\omega ]\). Hence, being able to measure it would provide new information on the properties of our environment.

We return now to the evolution of our sensor qubit during the QNS protocol. For a generic environment, Eqs. (11)–(13) (which describe the sensor-qubit coherence) can be analyzed perturbatively in both \(\hat{\xi }\) and \(\hat{V}\); for the simple example of Eqs. (5) and (6), this amounts to perturbation theory in the qubit-bath coupling. The leading-order contributions to the dephasing and phase-shift functions in Eq. (13) can be succinctly written as (see “Methods”)

Here we use the notation \(z[\omega ]\equiv \int\nolimits_{-\infty }^{+\infty }\ z(t){e}^{i\omega t}{{d}}t\) to denote the Fourier transform of a temporal function. We stress that these expressions are valid for a general quench, and not just the specific example described by Eqs. (5) and (6).

Eqs. (16) and (17) are generally valid for generic environments in the weak coupling limit; they also become exact for Gaussian quantum environments (i.e., linear coupling to a bath of independent bosonic modes). This covers many experimentally relevant situations (e.g., environments comprised of phononic or photonic modes^{38,39}, interacting disordered spin baths^{24}, 1/*f* charge and flux noise sources^{40}, etc.). Eq. (16) is a standard textbook expression: at the Gaussian level, the qubit dephasing is controlled by the environmental NSD, weighted by the filter function. In contrast, Eq. (17) is less appreciated: because of the effective quench physics described above, and the dynamical nature of the bath, there is a bath-induced phase shift of the qubit sensor. This phase shift Φ_{q}(*t*_{f}) depends both on the relevant bath susceptibility, the filter function *F*[*ω*] as well as the quench control function *η*[*ω*]. As we will see, this phase provides a new route to learning about the environment. Note that the consequences of the quench can also be discussed beyond linear response, as would apply to more general environments and sensor–environment couplings (see “Methods”).

We stress that the quench-induced sensor phase shift Φ_{q}(*t*_{f}) can be accessed in exactly the same type of experiments one would use to sense external DC or AC fields, making use of standard Ramsey, Hahn-echo or more complex dynamical-decoupling sequences^{1}.

A natural concern is whether this quench phase could be distinguished from more trivial phases resulting from external ambient magnetic fields. In the presence of such fields, the net qubit phase shift in Eq. (13) is now given by

where *B*_{ext}(*t*) is the external ambient magnetic field, and the QPS Φ_{q}(*t*_{f}) is again given by Eq. (17). There is a critical difference between Φ_{ext} and Φ_{q}: only the latter is sensitive to the initial state of the qubit (see discussion below Eq. (10)). One can thus easily exploit this feature to distinguish the QPS from other more trivial phase-shift mechanisms, e.g., as depicted in Fig. 1b. Further, we note that this feature lets one distinguish the QPS Φ_{q}(*t*_{f}) from nontrivial qubit phase shifts due to non-Gaussianity of the noise source (the latter has been studied in e.g., Refs. ^{14,17}).

We note that related phase shifts were discussed in previous works as an anomalous effect emerging in *T*_{2}-type QNS protocols in systems with an unusual biased qubit-environment coupling^{34,35}. In contrast, as we show the quench-induced phase shifts can in fact arise in a far wider set of systems, including ones with an unbiased coupling that according to previous works, would exhibit no extra phase shift. We again stress that it is the initial bath state (and not the qubit-bath coupling) that plays a key role in the quench physics. This realization will provide an important new control knob, as one can controllably change the properties of the quench via seemingly subtle changes in the initial bath state. As we discuss, this provides a powerful tool for reconstructing environmental spectral functions.

### Quench phase shift as a means to directly probe environmental density of states

While the above discussion applies to the most general quench scenario, we will often be interested in cases where the quench Hamiltonian is static in the lab frame once the sensing protocol starts. This corresponds to a quench control function *η*(*t*) = Θ(*t*)Θ(*t*_{f} − *t*). This is the case for the specific example situation in Eqs. (5) and (6). As we will show in Eqs. (40) and (43), this also encompasses the case of more general forms of quench operator \(\hat{V}\) beyond Eq. (10), corresponding to a wide number of *T*_{2}-based sensing protocols with generic initial bath states.

For the above cases, the QPS can be further recast in a form that only involves the imaginary part of response function \(\,{{\mbox{Im}}}\,{G}_{\xi V}^{{{{{{\mathrm{R}}}}}}}[\omega ]\). For spin-echo control pulses satisfying \(F[0]\equiv \int\nolimits_{0}^{{t}_{f}} F(t){{{{{\mathrm{d}}}}}}t=0\), the expression for the QPS further simplifies (see “Methods”)

For a general pulse sequences, *F*[*ω*] above should be replaced by *F*[*ω*] − *F*[0].

Eq. (20) becomes even more revealing in cases like our example of Eq. (5), where the quench operator \(\hat{V}\) is proportional to the noise operator \(\hat{\xi }\), \(\hat{V}=\beta \hat{\xi }\), where *β* is a real constant. We can thus write:

where we have introduced the environmental spectral function

which determines the dissipative response of the environment, and also plays the role of an effective DOS. \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\) also corresponds to the asymmetric part of the (unsymmetrized) quantum noise spectrum^{32}. Eq. (21) shows that the QPS provides a direct route to learning about properties of the environmental spectral function, a quantity that plays an important role both in quantum noise theory^{38} and in various areas of many-body physics. Note that a related expression was derived in Ref. ^{34} (though this work did not consider the more general situations analyzed here, see e.g., Eqs. (17) and (20)).

While the importance and utility of \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\) is clear in many contexts, it is useful to provide a simple but ubiquitous example. Consider an environment comprised of independent bosonic modes *b*_{k} with \({\hat{H}}_{{{{{{{{\rm{b}}}}}}}},\downarrow }={\sum }_{k}{{{\Omega }}}_{k}{\hat{b}}_{k}^{{{{\dagger}}} }{\hat{b}}_{k}\) and a noise operator \(\hat{\xi }(t)={\sum }_{k}{g}_{k}{e}^{i{{{\Omega }}}_{k}t}{\hat{b}}_{k}^{{{{\dagger}}} }+\,{{\mbox{H.c.}}}\,\). In this case, we have \({{{{{{{\mathcal{J}}}}}}}}[\omega ]={\sum }_{k}{g}_{k}^{2}\delta (\omega -{{{\Omega }}}_{k})\): it is indeed a weighted DOS, with each mode’s contribution weighted by its coupling constant. This bosonic bath model can be used to describe a variety of phononic or electromagnetic dephasing environments^{38,39}. In this simple bosonic case, \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\) is completely independent of the environmental state. However, we stress that our results in subsequent sections remain valid for interacting baths, and/or baths that are not purely bosonic.

The above example highlights a general fact: to understand whether a large bath NSD \(\bar{S}[\omega ]\) (as revealed by a standard QNS measurement) is due to a large bath DOS or a large mode-occupancy (i.e., temperature), one needs to also know the spectral function \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\). As such, the information provided by the QPS provides crucial additional information which complements information provided by the dephasing factor. To see this explicitly, consider the case where the initial bath state \({\hat{\rho }}_{b,i}\) is in thermal equilibrium at temperature *T*. In this case, the quantum fluctuation-dissipation theorem (FDT) yields^{41,42}

This relation suggests something we will investigate in detail further: if one knows both the noise spectrum and spectral function at a given frequency, one can extract (in a parameter-free manner) the environmental temperature. A standard dephasing-based QNS measurement does not provide sufficient information for such an extraction. Only the extra information provided by the QPS makes this possible. Note that our focus here is on dephasing-type couplings between a sensor qubit and the environment. If one instead had a transverse coupling, then an extended version of *T*_{1} relaxometry could also be used in principle to extract \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\), see Supplementary Note 1.

Finally, we point out that the above characterization is useful even in more general situations where the initial bath state is not in thermal equilibrium. In that case, the FDT relation in Eq. (23) can be used to define (at each frequency) an effective temperature *T*_{eff}[*ω*] (see, e.g.,^{32,43,44})

The fact that this quantity varies as a function of frequency would then be direct evidence of an initial nonequilibrium bath state. This is also the kind of nontrivial information that can be addressed in a standard *T*_{2}-style QNS protocol using the extra information provided by the QPS.

### Using the quench phase shift to probe low-frequency environmental properties and non-thermal states

As an example of its utility, we show here how the QPS can be used to extract low-frequency spectral properties of a generic environment (encompassing sub-, super-, and Ohmic cases), going beyond what could be done by studying the dephasing factor alone. This information directly allows one to determine if the bath is in thermal equilibrium, i.e., whether the FDT relation of Eq. (23) is violated. In the case where the bath is in equilibrium, it provides a direct means to extract the environmental temperature. While the estimation protocol we discuss here applies to general quench operators, for concreteness we focus on the specific quench configuration in Eq. (10), where \(\hat{V}(t)=\hat{\xi }(t)/2\). The protocol applies essentially the same way for more general situations as long as the lab-frame quench operator is static during the protocol (i.e., Eq. (20) must hold).

Our focus here is on a very generic scenario where both the environmental symmetrized noise spectrum and spectral function exhibit power-law behavior at low-frequency limit:

Note this includes the case where these quantities tend to a constant asymptotically as *ω* → 0^{+}. Note also that even if one or both of the exponents *p*, *s* are negative, Eqs. (25) and (26) can still describe a physical bath, as long as one also introduces a low-frequency IR cutoff. We thus have four parameters characterizing the low-frequency features of the environment. As shown in Eq. (24), a general, non-thermal environment can always be characterized by a frequency-dependent effective temperature *T*_{eff}[*ω*]. Using the asymptotic forms given above, we have in the low-frequency limit:

If the environment is in thermal equilibrium then *T*_{eff}[*ω*] will be frequency independent and equal to the bath temperature. We see this requires *p* = *s* − 1.

Our goal is thus to estimate the power-law exponents *p*, *s*, and overall coefficients *S*_{0}, *A*_{0} from the sensor qubit dynamics. As we now show, this can be achieved by looking at both the phase and magnitude of the qubit coherence in the long-time limit. As long as the asymptotic power-law dependence of bath NSD (response function) does not exhibit too strong a low-frequency divergence, the asymptotic long-time behavior of the dephasing function *ζ*(*t*_{f}) (QPS Φ_{q}(*t*_{f})) under any specific spin-echo or dynamical-decoupling pulse becomes independent of details about the cutoff, and is solely determined by the low-frequency asymptotic behavior of NSD (spectral function) in Eqs. (25) and (26). The needed conditions are satisfied by most physical environments (including, e.g., Ohmic baths and baths producing 1/*f* noise).

Using Eqs. (16) and (20) we can rigorously show (see Supplementary Note 2 for a detailed derivation)

where \({{{{{{{{\mathcal{C}}}}}}}}}_{\zeta }\) and \({{{{{{{{\mathcal{C}}}}}}}}}_{{{\Phi }}}\) are nonzero dimensionless coefficients determined by details of the qubit-control pulse. Eqs. (28) and (29) are valid for some of the most common types of physical environments, including Ohmic baths (*p* = 0, *s* = 1) and baths generating 1/*f* noise (*p* = − 1, *s* = 0). Comparing against Eq. (27), we see that the combined information in the dephasing function and QPS is exactly what is needed to characterize the effective temperature *T*_{eff}[*ω*]. If this quantity is frequency dependent, the bath is not in a thermal state. Note that for exponents *p* and *s* falling out of the range of validity given in Eqs. (28) and (29), the long-time regime of qubit dynamics would also be sensitive to details of the cutoff, but it would still be possible to extract information about the bath NSD (response function) from the dephasing function *ζ*(*t*_{f}) (QPS Φ_{q}(*t*_{f})) using parametric spectral estimation techniques.

The asymptotic result in Eq. (28) for dephasing is well established^{45,46,47} and has been utilized for QNS in various experimental platforms^{4,7,11}. The corresponding result for the QPS in Eq. (29) provides complementary information, on the properties of the spectral function. We stress that to assess whether the bath is in equilibrium, and if so what the temperature is, both these quantities are needed. In Fig. 2, we show the evolution of the QPS for a simple Hahn-echo pulse sequence; curves correspond to Gaussian Ohmic, sub-, and super-Ohmic baths with Gaussian cutoffs, where *s* = 1, \(\frac{1}{2}\), \(\frac{3}{2}\), respectively. As expected, the exact QPS is accurately described by the asymptotic power-law function in the long-time regime. For Hahn echo, the constants appearing in Eqs. (28) and (29) are given by \({{{{{{{{\mathcal{C}}}}}}}}}_{\zeta ,{{{{{{{\rm{H}}}}}}}}}=\frac{1-{2}^{p+1}}{\pi }{{\Gamma }}\left(p-1\right)\sin \frac{p\pi }{2}\) and \({{{{{{{{\mathcal{C}}}}}}}}}_{{{\Phi }},{{{{{{{\rm{H}}}}}}}}}=\frac{1-{2}^{s}}{\pi }{{\Gamma }}\;\left(s-1\right)\cos \frac{s\pi }{2}\), where Γ(⋅) is the gamma function.

We have shown that the long-time properties of the sensor-qubit coherence (both its magnitude and phase) reveal key features of our environment. This sensing modality of course has a natural tension: in the long-time limit, the loss of qubit coherence described by Eq. (16) will make it difficult to resolve the QPS (c.f. Eq. (17)). This is not a fundamental problem, but necessitates sufficient averaging, i.e., repeated evolutions and measurements of the sensor qubit under the chosen pulse protocol. In what follows, we characterize the amount of averaging needed for given environmental parameters.

For convenience, in what follows we express the coefficient *A*_{0} in Eq. (26) as \({A}_{0}=\alpha {\omega }_{{{{{{{{\rm{c}}}}}}}}}^{1-s}\), i.e., the product of a dimensionless parameter *α* quantifying the qubit-bath coupling strength, and powers of a UV-cutoff frequency scale *ω*_{c} characterizing the regime where Eq. (26) is valid. In the weak coupling limit *α* ≪ 1, we can calculate the number of repeated measurements required to achieve a unit signal-to-noise ratio (SNR) for the measurement of the QPS. Focusing only on fundamental projection noise, this is given (as is standard) by the squared inverse norm of the qubit coherence signal^{1}, \({N}_{{{{{{{{\rm{meas}}}}}}}}}({t}_{f})={|\langle {\hat{\sigma }}_{y}({t}_{f})\rangle |}^{-2}\). This figure-of-merit is plotted in Fig. 3 for weakly coupled baths with different spectral functions \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\). Note that in many experimentally relevant situations, the effective environment temperature scale is much lower than the UV energy scale, i.e., *k*_{B}*T*_{eff} ≪ *ω*_{c}. As a result, measuring the long-time QPS is within reach of state-of-the-art systems realizing QNS.

### Case study: thermometry for low-frequency 1/*f* noise sources

In this subsection, we focus on low-frequency 1/*f* noise, where the NSD \(\bar{S}[\omega ]\propto 1/{f}^{a}\) (*f* < *k*_{B}*T*, 0 < *a* < 2; often *a* is close to 1). The 1/*f* noise constitutes a dominating dephasing noise source in semiconductor and superconducting qubits^{40}. We first show the asymptotic long-time behavior of the QPS Φ_{q}(*t*_{f}) can now be recast into a simple form, in terms of a few experimentally relevant parameters. We also compute the Hahn-echo signal corresponding to two realistic charge noise models, which can be readily measured using superconducting qubits.

For low-frequency 1/*f*^{a} noise, the NSD \(\bar{S}[\omega ]\) satisfies Eq. (25) with a power-law exponent *p* = − *a*. Assuming the corresponding quantum bath is in thermal equilibrium, we can reformulate the asymptotic results in Eqs. (28) and (29) in terms of three parameters: Hahn-echo dephasing time *T*_{2e}, the noise exponent *a*, and temperature *T*. More specifically, the asymptotic qubit dephasing function *ζ*(*t*_{f}) in Eq. (28) now reads \(\zeta ({t}_{f}) \sim {({t}_{f}/{T}_{2{{{{{{{\rm{e}}}}}}}}})}^{1+a}\), so that we can rewrite the QPS in Eq. (29) as

Thus, to observe the QPS effect it is desirable to have qubits whose Hahn-echo coherence times are smaller than or comparable to the timescale set by temperature, i.e., \({T}_{2{{{{{{{\rm{e}}}}}}}}}\lesssim {({k}_{{{{{{\mathrm{B}}}}}}}T)}^{-1}\).

While the asymptotic result in Eq. (30) remains valid for low-frequency charge noise as well as 1/*f* flux noise, we now focus on the former case to estimate the QPS effects in realistic superconducting qubits. In this case we can approximate *T* ~ 10^{1} mK, corresponding to a timescale of 1 ns. Experimentally, one can deliberately build superconducting qubits sensitive to charge noise^{48} so that QPS effects become measurable.

To obtain a concrete estimate, we adopt two physically motivated microscopic model for charge noise, both consisting of two-level fluctuators (TLFs) coupled to a phonon bath (see^{49} for details). Making use of the bath spectral function generated by the models, we numerically compute qubit coherence signal \(\langle {\hat{\sigma }}_{y}({t}_{f})\rangle\) under Hahn echo at two different temperatures (*T* = 10 and 50 mK). The results are plotted against rescaled protocol time *t*_{f}/*T*_{2e} in Fig. 4, where we set qubit–bath coupling such that the qubit coherence time is *T*_{2e} = 1 μs at *T* = 10 mK. We note that the two different models lead to a marked difference in the QPS Φ_{q}(*t*_{f}), and hence the Hahn-echo signal as one increases temperature.

While the 1/*f*^{a} noise spectrum has been observed in numerous experiments (see e.g.,^{50,51}), we reiterate that the QPS Φ_{q}(*t*_{f}) offers a direct means to probe the low-frequency bath spectral function \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\), an independent spectral property from the standard NSD \(\bar{S}[\omega ]\). This is important for understanding decoherence mechanisms in recent designs of superconducting qubits with intrinsic noise protection^{52}. On the other hand, despite existing theoretical models that could successfully capture multiple aspects of the 1/*f*^{a} noise spectra^{40}, a consensus on the microscopic origin of such noise remains elusive. Having access to the noise temperature (as opposed to the ambient temperature) can also help resolve the open question of origin of 1/*f*^{a} noise.

### Case study: direct thermometry for an Ohmic bath

Baths with an Ohmic spectral density \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\) are both extremely well-studied theoretically, and are good descriptions of various dissipative environments^{53}. Perhaps the best known examples are the voltage and current fluctuations (i.e., Johnson-Nyquist noise^{54,55}) of an electromagnetic environment described by an impedance that is frequency independent at low frequencies. Such electromagnetic environments are relevant to many systems, including superconducting qubits^{56,57,58,59}. In this subsection, we specialize to the case of an environment that is approximately Ohmic at low frequencies, i.e., the low-frequency spectral function \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\) is proportional to frequency. As we now show, this sole assumption allows one to directly extract the environmental temperature via simple measurements that require no curve fitting.

When in thermal equilibrium, an Ohmic environment has a flat NSD at low frequencies, i.e., \(\bar{S}[\omega ] \sim 2{A}_{0}{k}_{{{{{{\mathrm{B}}}}}}}T\), c.f. Eqs. (25) and (26). A measurement of the low-frequency NSD alone only yields the product of *A*_{0} and *T*, and hence does not permit direct thermometry. Luckily, the missing information (i.e., the value of the coupling constant *A*_{0}) is directly provided by the long-time limit QPS. Defining \({{{\Phi }}}_{{{{{{{{\rm{q}}}}}}}}}(\infty )\equiv {\lim }_{{t}_{f}\to +\infty }{{{\Phi }}}_{{{{{{{{\rm{q}}}}}}}}}({t}_{f})\), we find from Eq. (29)

See Supplementary Note 3 for an alternative, intuitive derivation of this expression.

Given this simple result, one can now directly extract the environment temperature. Using the fact that for a Hahn-echo sequence, the *T*_{2} decoherence time is given by \({T}_{2}=2/\bar{S}[0]\)^{1}, we obtain

The upshot is that for a thermal, Ohmic environment, simply measuring the Hahn-echo *T*_{2} and the long-time QPS directly yields the environmental temperature. We stress that this does not require any curve fitting, nor further assumptions. Note that our protocol is also applicable if in addition to low-frequency Ohmic noise, we also have large quasistatic noise; see Supplementary Note 4 for details. This is a common scenario in many systems.

While Eq. (32) is exact, it is also useful to understand how long one must wait to achieve the asymptotic long-time limit of the QPS. The answer to this question depends on features in the spectral function away from *ω* = 0. For convenience, in following discussion we rewrite the spectral function as \({{{{{{{\mathcal{J}}}}}}}}[\omega ]=(\alpha /\pi )\omega \phi \left(\omega /{\omega }_{{{{{{{{\rm{c}}}}}}}}}\right)\), where \(\phi \ \left(\cdot \right)\) encodes high-frequency dependence of the spectral function. As illustrated in Fig. 5, there are two possible scenarios for the crossover dynamics of QPS. First, if the spectral function \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\) exhibits narrow peak(s) in the high-frequency regime, then the crossover timescale is given by \({{{\Gamma }}}_{\min }^{-1}\), where \({{{\Gamma }}}_{\min } < {\omega }_{{{{{{{{\rm{c}}}}}}}}}\) is the smallest linewidth of these peaked features. This is shown in Fig. 5b, where the corresponding spectral function exhibits a high-frequency narrow Lorentzian peak with linewidth \(2{{{\Gamma }}}_{\min }=2\epsilon {\omega }_{{{{{{{{\rm{c}}}}}}}}}=0.2{\omega }_{{{{{{{{\rm{c}}}}}}}}}\), as encoded by \(\phi \ \left(x\right)={(1+{\epsilon }^{2})}^{2}/[{(x-1)}^{2}+{\epsilon }^{2}][{(x+1)}^{2}+{\epsilon }^{2}]\). Such spectral function can describe e.g., low-frequency photon shot noise generated by a driven damped cavity^{29} (see also Supplementary Note 5 for details). The second generic case is where there are no such sharp features at high frequencies, and only a smooth cutoff in \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\) characterized by the UV cutoff frequency *ω*_{c}. In this case, the timescale for the QPS to saturate is 1/*ω*_{c} and independent of specific details of the form of the cutoff. This is confirmed in Fig. 5c, where QPS crossover dynamics is plotted for step-function cutoff \(\phi \ \left(x\right)={{\Theta }}(1-x)\) (dashed blue), Lorentzian cutoff \(\phi \ \left(x\right)=1/(1+{x}^{2})\) (dotted orange), exponential cutoff \(\phi \ \left(x\right)={e}^{-x}\) (dot-dashed green), and Gaussian cutoff \(\phi \ \left(x\right)={e}^{-{x}^{2}}\) (dashed purple curve), respectively.

### Generalized quenches for frequency-space reconstruction of response functions

In this subsection, we restrict attention to situations where the quench (whether intentional or accidental) yields a quench operator \(\hat{V}\) (c.f. Eq.(7)) which commutes with the noise operator \(\hat{\xi}\) (Eq. (4)). In the simple and standard case where the quench temporal function *η*(*t*) is a step function (c.f. Eq. (9)), we showed in Eqs. (25)–(29) that the QPS can be used to extract the low-frequency properties of the environment’s spectral function \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\) (i.e., response function). A natural question is to ask whether it is possible to perform a complete reconstruction of \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\) in some finite bandwidth window. This would be then analogous to spectral reconstruction techniques used in conventional QNS measurements to reconstruct \(\bar{S}[\omega ]\).

It is worth noting that for the specific QPS given by Eq. (21), Ref. ^{34} has proven a no-go theorem, which prevents systematical reconstructions of spectral function \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\) using the restricted form of quenches in Eqs. (5) and (6). Here we are interested in a more general question: can we utilize quenches with a more complex time-dependence, as encoded in quench function *η*(*t*), to overcome the limitation set by aforementioned no-go theorem? Indeed, as we show in Supplementary Note 6, the extra tunability in the quench function allows us to use the more general form of QPS in Eq. (17) and reconstruct \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\) in a generic target frequency range.

The protocol we introduce below makes use of a generic structure, where the sensor qubit is controllably embedded in a multilevel system. While this can be realized in many different experimental platforms (e.g., a superconducting transmon qubit, as implemented in Ref. ^{19}), we focus here on sensor based on a *S* = 1 NV defect in diamond^{22}. For this system, we discuss a specific protocol to reconstruct finite-frequency spectral function \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\) by engineering time-dependent quenches. We stress that our strategy can be used to implement generic forms of quench functions *η*(*t*).

We start by showing how to engineer time-dependent quenches using NV centers in diamond. NV-based qubits are an ideal candidate to implement *T*_{2}-style QNS: the spin relaxation timescale *T*_{1} of NV centers is typically much longer than the dephasing timescale, so that \({\hat{S}}_{z}\) is conserved to a great approximation during *T*_{2}-type protocols. The dominating dephasing typically comes from coupling to environmental magnetic noise (due to surrounding nuclear spins, etc.); alternatively, this makes them a powerful magnetic sensor. We can thus write NV-bath Hamiltonian as

We will consider the NV–bath coupling to correspond to an effective bath-induced magnetic field \(\hat{B}\), which then satisfies \(\hat{B}={\hat{H}}_{{{{{{{{\rm{b}}}}}}}},0}-{\hat{H}}_{{{{{{{{\rm{b}}}}}}}},-1}={\hat{H}}_{{{{{{{{\rm{b}}}}}}}},+1}-{\hat{H}}_{{{{{{{{\rm{b}}}}}}}},0}\).

The most common and straightforward way to experimentally initialize the NV center is via optical illumination, which prepares it in the \(\left|{m}_{z}=0\right\rangle\) state^{60}. Given this specific initial NV center state, the initial bath Hamiltonian \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}\) in Eq. (7) should be replaced by \({\hat{H}}_{{{{{{{{\rm{b}}}}}}}},0}\) (i.e., the bath Hamiltonian conditioned on qubit in \(\left|{m}_{z}=0\right\rangle\) state). Turning to the sensing protocol, it is relatively easy and straightforward to rapidly produce a superposition state using any two of the three \(\left|{m}_{z}\right\rangle\) states. This provides us then with three different choices for the specific form of the sensor qubit, each corresponding to different effective quench physics. This is summarized in Table 1: the form of the quench physics given by Eqs. (7) and (8) can be controlled or even turned off by choosing the sensor qubit subspace: {*m*_{z} = 0, *m*_{z} = 1}, {*m*_{z} = 0, *m*_{z} = − 1} or {*m*_{z} = + 1, *m*_{z} = − 1}. This extra knob in NV-based qubits can be used to distinguish the quench phase-shift effect from other spurious phases due to the environment^{35}.

We can now harness this freedom to generate a powerful new kind of quench protocol. The basic idea is to engineer a nontrivial time-dependence of the quench function *η*(*t*) (c.f. Eq. (7)) by deliberately switching the sensor spin between the different possible qubit subspaces at prescribed times during the protocol. As we show below, the time-dependent *η*(*t*) generated by this approach can be utilized to generate comb-based filter functions that enable spectral reconstruction of the response function. Figure 6 illustrates a concrete example of control pulses that realize such time-dependent quenches: by periodically switching between the {*m*_{z} = 0, *m*_{z} = − 1} and {*m*_{z} = 0, *m*_{z} = + 1} qubit subspaces (pulse period *T* = *t*_{f}/2*M*) in addition to applying standard qubit-control *π*-pulses at *ℓ**T*/2 (*ℓ* = 1, 3, …, 4*M* − 1), we effectively realize the more general quench in Eq. (7) with \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}={\hat{H}}_{{{{{{{{\rm{b}}}}}}}},0}\) and \(\hat{V}=-\hat{B}/2\), whereas the corresponding quench function \(\eta (t)=\mathop{\sum }\nolimits_{n = 0}^{2M-1}{(-)}^{n}{{\Theta }}(t-nT){{\Theta }}(nT+T-t)\) is shown in Fig. 6.

For the more general control sequence discussed above, the qubit dynamics is again given by Eqs. (11) and (12). The lab-frame noise operator is given by \(\hat{\xi }=\hat{B}\); as before, we transform to the toggling frame defined by the standard qubit-control *π*-pulses (the control pulses switching between qubit subspaces do not contribute here), with the resulting filter function shown in Fig. 6.

We thus obtain the filter function *F*[*ω*] and quench function *η*[*ω*] in frequency space as

By substituting the above equations into Eq. (17), together they generate a frequency-comb filter function in the large pulse number *M* ≫ 1 limit, which can be directly used to probe the spectral function \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\) (i.e., response function). More specifically, noting that \(\hat{V}=-\hat{B}/2=-\hat{\xi }/2\) we have

and \({{{{{{{{\mathcal{F}}}}}}}}}_{{{{{{{{\mathcal{J}}}}}}}}}[\omega ;{t}_{f}]\) forms a comb-like structure in frequency space if we fix pulse periodicity *T* = *t*_{f}/2*M* and take the asymptotic large pulse number limit, i.e.,

where \({{{{{{{{\mathcal{A}}}}}}}}}_{\ell }=(4/{\ell }^{2})\sin (\ell \pi /2)\) are constant coefficients that depend on the control sequence and can be derived using Eqs. (34) and (35).

Thus, by making use of all three levels of our spin-1 sensor, we can engineer a time-dependent quench function *η*(*t*) that enables the construction of a standard comb-based filter function. This in turn allows spectral reconstruction of the imaginary bath response function (i.e., the spectral function \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\)) over a large frequency range.

Note that Ref. ^{34} developed related techniques for reconstructing spatially correlated noise and response functions using multiple qubits; we stress that these are distinct from our multilevel protocols. More specifically, the multiqubit protocols crucially require 2-qubit SWAP gates in addition to standard dynamical-decoupling-type controls; further, the spectral function \({{{{{{{\mathcal{J}}}}}}}}[\omega ]\) is not directly accessible via those existing protocols. In contrast, the quench physics in Eq. (7) provides a tool for directly probing bath response properties (i.e., its DOS), and our quench-based protocols can be straightforwardly implemented using only local spin-echo-type, or dynamical-decoupling control sequences.

## Discussion

In this work, we have shown how intrinsic quenches arise in standard *T*_{2}-style noise spectroscopy experiments, and how quench-induced phase-shift effects to the sensor qubit can be utilized to estimate or reconstruct the spectral function, or more general response functions of the environment. These response properties provide an independent and complementary environmental characterization from the standard NSD, and encode useful information: in combination with standard NSD, we can use the estimated spectral function to extract effective temperature of a generic nonequilibrium bath. For environments in thermal equilibrium, the quench-enhanced QNS based on a single probe qubit also allows one to extract environmental temperature.

Our work highlights the critical role played by the initial state in controlling the effective quench physics associated with a generic *T*_{2}-style QNS experiment. As such, our quench formalism greatly expands previous works that considered related examples of environment-induced phase-shift effects: by analyzing quenches that arise in the most general settings of *T*_{2}-based QNS protocols, we show that one can engineer a generic quench operator, or a quench with complex time dependence. These generalizations allow us to further use the QPS to probe general response functions, or reconstruct the spectral function in a generic frequency range, respectively. Qubit magnetic noise spectroscopy has been used to probe electronic correlation functions in two-dimensional systems^{22,61,62}; it would be interesting to apply our technique to those systems to also probe low-frequency electronic spectral function.

Our discussion so far on effective quench physics in standard *T*_{2}-type QNS has focused on the common case where the environment is either a quantum Gaussian bath, or where the sensor is weakly coupled to a quantum environment. While these cases make it convenient to describe the result emergence of a quench-induced sensor qubit-phase shift, the physics we have discussed is far more general. In particular, the quench has nontrivial consequences on the sensor qubit even beyond the weak coupling or Gaussian regime. In “Methods”, we briefly discuss how these effect can be directly related to nonlinear response functions and noise susceptibilities of the environment. An interesting open question is how to design sensing protocols to extract those higher-order response functions. Alternatively, quantum quenches have conventionally been used to explore correlated phenomena in many-body systems^{36}; our quench approach to QNS also opens up possibilities to explore new physics in these systems. We leave these to future works.

## Methods

### Generalized quenches based on arbitrary initial bath states

Our discussion so far has focused on incidental environment quenches occurring during a generic QNS sensing protocol; for the most part, we considered a specific scenario where before the protocol starts, the environment is in the initial state described by Eq. (3). We now show that the basic quench physics we have described (and its impact on the sensor qubit) applied to a far wider set of circumstances, where the bath starts in an arbitrary initial state \({\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}\). This provides an entire new modality for sensing: one could deliberately prepare the environment in an interesting target state before the start of the sensing sequence, and then use the resulting quench physics (namely the influence on the sensor qubit’s phase) to probe the environment.

The simplest generalization is when the environment is initially in a thermal state corresponding to some arbitrary (bath-only) Hamiltonian \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}\):

In this case, we can directly use Eq. (7) to define our quench, and identify the quench operator \(\hat{V}\) via Eq. (8). We stress that in this more general case, the initial bath Hamiltonian \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}\) need not have any simple relation to the qubit-conditioned bath Hamiltonians \({\hat{H}}_{{{{{{{{\rm{b}}}}}}}},\uparrow (\downarrow )}\) appearing in Eq. (1). As a result, the quench operator \(\hat{V}\) will now be independent of the noise operator \(\hat{\xi }\equiv {\hat{H}}_{{{{{{{{\rm{b}}}}}}}},\uparrow }-{\hat{H}}_{{{{{{{{\rm{b}}}}}}}},\downarrow }\). For systems where it is possible to initialize the environment in different initial equilibrium states, this provides a powerful new way to probe the environment: different initial states yield different quenches, and hence different QPSs via Eq. (20).

An even more general scenario is when the bath starts in an arbitrary non-thermal equilibrium initial state \({\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}\) that has no simple relation to a static Hamiltonian. This could be achieved in numerous ways, e.g., by explicitly driving the bath^{63,64}. As we have stressed repeatedly, our general quench mechanism is ultimately controlled by the initial state \({\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}\) of the environment. A quench will occur as part of our *T*_{2}-style QNS protocol any time

In cases where this state was thermal, this \({\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}\) could easily be related to an initial bath Hamiltonian \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}\), which we then used to identify the quench operator \(\hat{V}\) in Eq. (8). In contrast, for our more general case, there is no unique way to identify \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}\). In general, we may choose any bath Hamiltonian compatible with the initial bath state, i.e., satisfying \([{\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}},{\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}]=0\). The choice of \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}\) would then determine \(\hat{V}\). We stress that this seeming ambiguity is only a choice of bookkeeping: the actual evolution of the sensor qubit (and the QPS) is of course only determined by \({\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}\) (see the following subsection).

Given these caveats, we now present a simple (though non-unique) method to usefully parametrize the quench in the most general case. We define the initial bath Hamiltonian \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}^{\prime}\) and quench operator \(\hat{V}^{\prime}\) as the longitudinal (maximally commuting) and transverse (minimally non-commuting) components of the effective bath Hamiltonian with respect to \({\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}\). We can make this prescription explicit by first diagonalizing the initial bath state as \({\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}=\mathop{\sum }\nolimits_{n = 0}^{N}{p}_{n}{\hat{P}}_{n}\). Here the eigenvalues *p*_{n} are distinct with *p*_{0} = 0, and \({\hat{P}}_{n}\) is the projector onto the eigenspace corresponding to *p*_{n}^{65}. The initial bath Hamiltonian \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}^{\prime}\) and the quench \(\hat{V}^{\prime}\) can now be defined as

For concreteness, we provide an example of this procedure for a bosonic bath that couples linearly to the sensor qubit

We also assume that the initial bath state is not a thermal state, but a squeezed thermal state. As a result, the initial state of the sensor and bath is given by

where \(\hat{S}({\mathop{r}\limits^{\to}})\equiv \exp ({\sum }_{k}{r}_{k}{\hat{b}}_{k}^{2}/2-\,{{\mbox{H.c.}}}\,)\) denotes the squeezing operator, with real constants *r*_{k} the corresponding mode squeezing parameters^{66}.

Using our above prescription, we find that initial bath Hamiltonian \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}^{\prime}\) and the quench operator \(\hat{V}^{\prime}\) in Eqs. (42) and (43) are given by

While the quench operator \(\hat{V}^{\prime}\) in Eq. (49) still contains an incidental contribution which depends on qubit–bath couplings *g*_{k}, it also includes deliberate quenches that can be tuned via the initial squeezing parameters *r*_{k}. We again note that it is not the only way to introduce a quench operator \(\hat{V}\) satisfying Eqs. (11) and (12). However, this convention is useful for understanding effects on qubit dynamics due to the quench.

### Qubit dynamics during a standard *T*
_{2}-type experiment

In this subsection, we provide a detailed derivation of Eqs. (11) and (12) in the main text, which describes qubit dynamics due to pure-dephasing baths in a general *T*_{2}-type (e.g., spin-echo, or general dynamical-decoupling) experiment. For concreteness, we first reiterate the general setup of the *T*_{2}-type experiment; more detail can be found in the main text. As standard, we assume that the qubit is initialized into a pure state with no qubit-bath entanglement, so that an instantaneous *π*/2-pulse at the beginning of the protocol (*t* = 0) prepares the system in a product state given by

The system then evolves under a pure-dephasing-type total Hamiltonian \({\hat{H}}_{{{{{{{{\rm{tot}}}}}}}}}\) for time *t*_{f}, while the qubit is subject to a sequence of instantaneous control *π*-pulses. At each instant *t* during the time evolution, the total qubit-bath system Hamiltonian can be rewritten as

where we introduce

To keep our discussion general, we will assume a generic initial bath state \({\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}\), and a corresponding initial bath Hamiltonian \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}\) satisfying \([{\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}},{\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}]=0\) (see also the preceding subsection). It is thus convenient to introduce a time-dependent effective bath Hamiltonian \({\hat{H}}_{{{{{{{{\rm{b,eff}}}}}}}}}(t)\) as

As shown in Eq. (41), a nontrivial quench \(\hat{V}\) generally arises in this standard *T*_{2}-type protocol, if the initial bath state \({\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}\) does not commute with the effective bath Hamiltonian governing subsequent bath dynamics, i.e., \([{\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}},{\hat{H}}_{{{{{{{{\rm{b,avg}}}}}}}}}]\ne 0\). We can rewrite \({\hat{H}}_{{{{{{{{\rm{b,eff}}}}}}}}}(t)\) in terms of the initial \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}\) and this quench operator \(\hat{V}\) as (see the preceding subsection and Eq. (7) in the main text)

where the quench function *η*(*t*) vanishes, i.e., *η*(*t*) = 0, unless 0 < *t* < *t*_{f}.

Transforming to the standard toggling frame with respect to qubit-control pulses, as well as the rotating frame defined by initial bath Hamiltonian \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}\), we obtain the rotating-frame Hamiltonian

where *F*(*t*) denotes the usual noise filter function that encodes the timing of qubit-control *π*-pulses, and \(\hat{V}(t)\) and \(\hat{\xi }(t)\) refer to the rotating-frame bath-only operators. Thus, we can compute the qubit coherence function \(\langle {\hat{\sigma }}_{-}({t}_{f})\rangle =\left\langle \uparrow \right|{{{{{{{{\rm{Tr}}}}}}}}}_{{{{{{{{\rm{bath}}}}}}}}}[{\hat{\rho }}_{{{{{{{{\rm{tot}}}}}}}}}({t}_{f})]\left|\downarrow \right\rangle\) in this toggle-rotating frame as

where \({{{{{{{\mathcal{T}}}}}}}}\) and \(\tilde{{{{{{{{\mathcal{T}}}}}}}}}\) denote time- and anti-time orderings, respectively. From Eqs. (50) and (51) we have \(\langle {\hat{\sigma }}_{-}({0}^{+})\rangle =1/2\), so that the qubit coherence function \(\langle {\hat{\sigma }}_{-}({t}_{f})\rangle\) can be rewritten as

i.e., we obtain Eqs. (11) and (12) in the main text. Note that we adopt the convention where the filter and quench functions vanish (i.e., *F*(*t*) = *η*(*t*) = 0) unless 0 ≤ *t* ≤ *t*_{f}.

From the above derivation, it is straightforward to see that the exact qubit dynamics only depends on initial bath state \({\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}\), and Eqs. (62) and (63) (i.e., Eqs. (11) and (12) in the main text) holds for a generic quench operator \(\hat{V}\) associated with any \({\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}\) satisfying \([{\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}},{\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}]=0\). For a generic bath initial state \({\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}\), as discussed in the preceding subsection), a useful way to resolve such ambiguity in \(\hat{V}\) is to choose the particular \(\hat{V}^{\prime} \equiv {\hat{H}}_{{{{{{{{\rm{b,}}}}{{{\rm{avg}}}}}}}}}(t={0}^{+})-{\hat{H}}_{{{{{{{{\rm{b,i}}}}}}}}}^{\prime}\) as the minimally non-commuting component of \(\hat{H}_{{{\rm{b,avg}}}}\) with respect to \({\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}\). While this is not the only workable choice, it highlights the fact that the quench is more directly controlled by the initial bath state rather than the physical bath Hamiltonian at the beginning of the protocol. Identifying the quench in this way also allows us to compute qubit dynamics using a systematic perturbative expansion of Eqs. (62) and (63) in terms of the quench operator \(\hat{V}\).

### Derivation of Eqs. (16) and (17) on leading-order dephasing and phase-shift effects to the sensor qubit due to a quenched environment

In Eqs. (16) and (17) in the main text, we present general formulae relating leading-order bath-induced dephasing (quench-induced phase shift) effects to the bath NSD (linear response susceptibility function). While there are multiple ways to derive this result, in this subsection we provide a detailed derivation based on the Keldysh field theory technique and cumulant expansion^{29}. Our approach is directly applicable to non-Gaussian baths, and elucidates the regime where Eqs. (16) and (17) become exact.

We start with Eq. (60) (of which Eqs. (11) and (12) constitute a special case), where the sensor-qubit coherence function by the end of a *T*_{2}-type experiment is given by

For convenience, we introduce the Keldysh-ordered cumulant generating function (CGF) *χ*[*F*(*t*), *η*(*t*); *t*_{f}] of the bath noise and quench operators as

See Ref. ^{29} for discussions on the physical implications of this function. In terms of qubit dynamics, the real and imaginary parts of *χ*[*F*(*t*), *η*(*t*); *t*_{f}] correspond to qubit dephasing and bath-induced phase-shift effects, respectively.

We can now compute qubit coherence \(\langle {\hat{\sigma }}_{-}({t}_{f})\rangle\) by perturbatively expanding the CGF *χ*[*F*(*t*), *η*(*t*); *t*_{f}] in terms of \(\hat{\xi }(t)\) and \(\hat{V}(t)\). The Keldysh technique offers a systematic way to perform this expansion^{29,67,68}. In the Keldysh approach, for each bath operator \(\hat{A}\) there are a corresponding classical field *A*_{cl}(*t*) and a quantum field *A*_{q}(*t*). Stochastic averages between these fields can be computed in a well-defined way, with respect to the so-called Keldysh action. The very construction of the Keldysh action (see, e.g., Ref. ^{29}) ensures that the quantum operator expectation value in Eq. (64) can be directly related to averages that only involve *ξ*_{cl} and *V*_{q}. Taking the logarithm of Eq. (64), the CGF *χ*[*F*(*t*), *η*(*t*); *t*_{f}] is in turn given by

where we define \({\mathop{t}\limits^{\to}}_{\!\!n}\equiv ({t}_{1},\ldots ,{t}_{n})\). Here \({C}^{(\ell ,m)}({\mathop{t}\limits^{\to}}_{\!\!\ell +m})\) denote Keldysh-ordered cumulants, which can be directly generated from Keldysh-ordered moments of the form \(\overline{{\xi }_{{{{{{{{\rm{cl}}}}}}}}}({t}_{1})\ldots {\xi }_{{{{{{{{\rm{cl}}}}}}}}}({t}_{\ell }){V}_{{{{{{{{\rm{q}}}}}}}}}({t}_{\ell +1})\ldots {V}_{{{{{{{{\rm{q}}}}}}}}}({t}_{\ell +m})}\) and lower-order averages. Note that the terms in Eq. (67) involving cumulants of the form \({C}^{(\ell ,0)}({\mathop{t}\limits^{\to}}_{\!\!\ell })\) correspond to contributions solely from noise fluctuations, which would determine qubit dynamics in the absence of quenches. In contrast, the cumulants \({C}^{(\ell ,m)}({\mathop{t}\limits^{\to}}_{\!\!\ell +m})\) for *m* > 0 encode bath (linear and nonlinear) response properties (*ℓ* = 1), as well as noise susceptibilities (*ℓ* > 1).

Without loss of generality, we assume zero-average noise operator, i.e., \(\langle \hat{\xi }\rangle =0\). The first-order contribution to the cumulant expansion in Eq. (67) thus vanishes, and the leading-order nontrivial Keldysh-ordered cumulants can be written explicitly as

where the bath operator average is defined with respect to \({\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}}\) as \(\langle \hat{A}\rangle \equiv {{{{{{{\rm{Tr}}}}}}}}(\hat{A}{\hat{\rho }}_{{{{{{{{\rm{b,i}}}}}}}}})\). These leading-order cumulants can be directly related to the bath NSD \(\bar{S}[\omega ]\) and response susceptibility function \({G}_{\xi V}^{{{{{{\mathrm{R}}}}}}}[\omega ]\), as

By substituting the above relations into Eqs. (66) and (67), we can rewrite the leading-order contributions in terms of bath NSD and linear response susceptibility, so that we obtain

The above equations reproduce Eqs. (16) and (17).

The cumulant expansion in Eq. (67) terminates at the second order if *ξ*_{cl}(*t*) and *V*_{q}(*t*) are Gaussian random variables, which is satisfied by linearly coupled harmonic oscillator bath models discussed in the main text. For this case, the dephasing and phase-shift expressions in Eqs. (74) and (75) become exact. Thus, we conclude that Eqs. (16) and (17), or equivalently Eqs. (74) and (75), hold exactly for Gaussian baths, where noise and quench operators can take arbitrarily strong coupling strengths. Alternatively for more general non-Gaussian baths, Eqs. (73)–(75) describe leading-order approximations for qubit dynamics in terms of bath noise and quench operators.

It is worth unpacking Eq. (17), or equivalently Eq. (75), to provide a physical understanding of the quench-induced phase. As shown in Eq. (7), the effective quench at the start of our protocol at *t* = 0 suddenly turns on a term \(\eta (t)\hat{V}\) in the effective bath Hamiltonian (c.f. Eq. (7)). At the linear response level, this perturbation causes a time-dependent shift in the average of the bath operator \(\hat{\xi }\) that couples to the qubit. This shift is given from linear response by \({\langle \delta \hat{\xi }(t)\rangle }_{V}=\int\nolimits_{-\infty }^{+\infty }{{d}}{t}_{2}\eta ({t}_{2}){G}_{\xi V}^{{{{{{\mathrm{R}}}}}}}(t-{t}_{2})\). Next, this induced average value of \(\hat{\xi }\) has a direct consequence on the qubit: it is equivalent to a time-dependent *z* magnetic field on the sensor qubit. This then leads to a net phase shift given by the integral of this effective field weighted by the filter function *F*(*t*): \({{{\Phi }}}_{{{{{{{{\rm{q}}}}}}}}}({t}_{f})=\int\nolimits_{-\infty }^{+\infty }{{d}}{t}_{1}F({t}_{1}){\langle \delta \hat{\xi }({t}_{1})\rangle }_{V}\). Connections between sensor phase shifts and linear response were also discussed in Ref. ^{35}. Note that our expression for the QPS can be written as \({{{\Phi }}}_{{{{{{{{\rm{q}}}}}}}}}({t}_{f})=\int\nolimits_{-\infty }^{+\infty }{{d}}{t}_{1}F\left({t}_{1}\right)\int\nolimits_{-\infty }^{+\infty }{{d}}{t}_{2}\eta \left({t}_{2}\right){G}_{\xi V}^{{{{{{\mathrm{R}}}}}}}\left({t}_{1}-{t}_{2}\right)\). This is similar but not identical to Eq. (15) in Ref. ^{35}, where the filter function *F*(*t*_{1}) erroneously occurs at a later time than the quench function *η*(*t*_{2}).

### Derivation of Eq. (20) relating the quench phase shift to the imaginary part of the spectral bath response function

In Eq. (17) of the main text, we provide a general formula to compute the quench-induced phase shift using the Green-Kubo linear response theory, which relates the phase shift to the bath susceptibility function \({G}_{\xi V}^{{{{{{\mathrm{R}}}}}}}[\omega ]\). We then claim that for the specific quench function *η*(*t*) = Θ(*t*)Θ(*t*_{f} − *t*) emerging in a typical *T*_{2}-type experiment, this phase shift can be rewritten as Eq. (20), which only involves the imaginary part of response function. In this subsection, we explicitly derive the latter equation using the general formula. Recall that for a generic Gaussian bath, the QPS is given by Eq. (17) as

where \({G}_{\xi V}^{{{{{{\mathrm{R}}}}}}}(t)\equiv -i{{\Theta }}(t)\langle [\hat{\xi }(t),\hat{V}(0)]\rangle\) is the standard Green-Kubo linear response susceptibility function. Noting that the real and imaginary parts of the spectral response function \({G}_{\xi V}^{{{{{{\mathrm{R}}}}}}}[\omega ]\) are related to each other via the Kramers-Kronig relation, we can rewrite the QPS in terms of only \(\,{{\mbox{Im}}}\,{G}_{\xi V}^{{{{{{\mathrm{R}}}}}}}[\omega ]\). More specifically, given that the retarded Green’s function \({G}_{\xi V}^{{{{{{\mathrm{R}}}}}}}(t)\) is real by definition, the imaginary part of the response function \(\,{{\mbox{Im}}}\,{G}_{\xi V}^{{{{{{\mathrm{R}}}}}}}[\omega ]\) can be written as

Thus, we can rewrite the QPS as

where we have made use of the fact that the susceptibility \({G}_{\xi V}^{{{{{{\mathrm{R}}}}}}}(t)=0\) for *t* < 0. The general weighting function \({{{{{{{{\mathcal{F}}}}}}}}}_{{{\Phi }}}[F(t),\eta (t);{t}_{f}]\) is now given by

By substituting the specific quench function *η*(*t*) = Θ(*t*)Θ(*t*_{f} − *t*) into the above equation, we can explicitly compute the integral involving *η*(*t*_{2}) in Eq. (80) to obtain

so that for spin-echo or dynamical-decoupling control pulses with \(F[0]\equiv \int\nolimits_{0}^{{t}_{f}} F(t){{d}}t=0\), we recover Eq. (20). For the specific form of the quench operator \(\hat{V}(t)=\hat{\xi }(t)/2\) as given by Eq. (10), we can rewrite the above expression for the QPS Φ_{q}(*t*_{f}) in terms of imaginary part of the response function \(\,{{\mbox{Im}}}\,{G}_{\xi \xi }^{{{{{{\mathrm{R}}}}}}}[\omega ]\) as

Alternatively, for general forms of quench function *η*(*t*), it is still possible to represent the QPS using a frequency-space integral of imaginary part of the response function, as weighted by the control functions *F*[*ω*] and *η*[*ω*]. However, in general the integral would be nonlocal in frequency space. From the general expression in Eq. (80), we can rewrite the general transfer function for the QPS \({{{{{{{{\mathcal{F}}}}}}}}}_{{{\Phi }}}[F(t),\eta (t);{t}_{f}]\) as

As shown in Eq. (81), the above function \({{{{{{{{\mathcal{F}}}}}}}}}_{{{\Phi }}}[F(t),\eta (t);{t}_{f}]\) greatly simplifies when using the specific quench function *η*(*t*) = Θ(*t*)Θ(*t*_{f} − *t*).

### Generalizations beyond Gaussian bath approximation

For the case of a general environment, the qubit dynamics is still generally described by Eqs. (11) and (12). For the general case, a powerful means of attack is provided by Keldysh field theory techniques^{29,67,68}. One finds that the quench does more that just induce a phase shift Φ_{q}(*t*_{f}) (c.f. Eq. (17)). The quench physics can also modify the noise properties of the bath, changing the dephasing function in Eq. (13).

A general way to describe these effects is to use nonlinear response theory, something that can be effectively calculated using the Keldysh approach. For weakly coupled (or Gaussian) environments, the quench only induces a nonzero average of the noise operator \(\hat{\xi}\)(*t*) that is linear in the quench operator \(\hat{V}\). In the more general cases, this shift in mean will have higher-order terms in \(\hat{V}\); in addition, the symmetrized noise correlator of \(\hat{\xi}\)(*t*) will also be modified. Keeping terms to leading orders in \(\hat{V}\), these effects can formally be written in terms of nonlinear response functions as

where the susceptibility functions \({G}_{\xi V}^{{{{{{\mathrm{R}}}}}}}(t)\), \({G}_{\xi ,VV}^{{{{{{\mathrm{R}}}}}}}({t}_{1},{t}_{2})\), and \({G}_{\xi \xi ,V}^{{{{{{\mathrm{R}}}}}}}({t}_{1},{t}_{2})\) can be systematically computed using Keldysh field theory techniques^{29,68}. Note the appearance of a new function here, \({G}_{\xi \xi ,V}^{{{{{{\mathrm{R}}}}}}}({t}_{1},{t}_{2})\). This is often referred to as a noise susceptibility, and describes how the environmental symmetrized NSD is modified by the quench. Noise susceptibilities often reveal subtle features of a physical system, and have been studied in a variety of contexts (e.g., to uncover subtle features of coherent quantum electronic transport^{69}).

The upshot is that the quench physics described here is not limited to weakly coupled or Gaussian environments. For the general case, it can be described using both linear and nonlinear response functions^{29,69,70}. This also highlights another utility of our quench approach to QNS: it provides in principle access to higher-order nonlinear response properties of an unknown environment using *T*_{2}-type measurements. More specifically, one can design general quench control protocol (e.g., making use of the multilevel probe qubit shown in Fig. 6) to generate comb-based filter functions and reconstruct these higher-order response spectral functions of a non-Gaussian quantum environment. We leave details to future work.

## Data availability

The numerical data generated in this work is available from the corresponding author upon reasonable request.

## References

- 1.
Degen, C. L., Reinhard, F. & Cappellaro, P. Quantum sensing.

*Rev. Mod. Phys.***89**, 035002 (2017). - 2.
Kofman, A. G. & Kurizki, G. Unified theory of dynamically suppressed qubit decoherence in thermal baths.

*Phys. Rev. Lett.***93**, 130406 (2004). - 3.
de Sousa, R. Electron spin as a spectrometer of nuclear-spin noise and other fluctuations. In

*Electron Spin Resonance and Related Phenomena in Low-Dimensional Structures*(ed. Fanciulli, M.) 183–220 (Springer Berlin Heidelberg, 2009). - 4.
de Lange, G., Wang, Z. H., Ristè, D., Dobrovitski, V. V. & Hanson, R. Universal dynamical decoupling of a single solid-state spin from a spin bath.

*Science***330**, 60 (2010). - 5.
Álvarez, G. A. & Suter, D. Measuring the spectrum of colored noise by dynamical decoupling.

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

*Nat. Phys.***7**, 565 (2011). - 7.
Dial, O. E. et al. Charge noise spectroscopy using coherent exchange oscillations in a singlet-triplet qubit.

*Phys. Rev. Lett.***110**, 146804 (2013). - 8.
Romach, Y. et al. Spectroscopy of surface-induced noise using shallow spins in diamond.

*Phys. Rev. Lett.***114**, 017601 (2015). - 9.
Frey, V. M. et al. Application of optimal band-limited control protocols to quantum noise sensing.

*Nat. Commun.***8**, 2189 (2017). - 10.
Norris, L. M. et al. Optimally band-limited spectroscopy of control noise using a qubit sensor.

*Phys. Rev. A***98**, 032315 (2018). - 11.
Chan, K. W. et al. Assessment of a silicon quantum dot spin qubit environment via noise spectroscopy.

*Phys. Rev. Applied***10**, 044017 (2018). - 12.
Ferrie, C., Granade, C., Paz-Silva, G. & Wiseman, H. M. Bayesian quantum noise spectroscopy.

*New J. Phys.***20**, 123005 (2018). - 13.
Sinitsyn, N. A. & Pershin, Y. V. The theory of spin noise spectroscopy: a review.

*Rep. Prog. Phys.***79**, 106501 (2016). - 14.
Norris, L. M., Paz-Silva, G. A. & Viola, L. Qubit noise spectroscopy for non-Gaussian dephasing environments.

*Phys. Rev. Lett.***116**, 150503 (2016). - 15.
Szańkowski, P., Ramon, G., Krzywda, J., Kwiatkowski, D. & Cywiński, Ł. Environmental noise spectroscopy with qubits subjected to dynamical decoupling.

*J. Phys.: Cond. Matter***29**, 333001 (2017). - 16.
Yan, F. et al. Distinguishing coherent and thermal photon noise in a circuit quantum electrodynamical system.

*Phys. Rev. Lett.***120**, 260504 (2018). - 17.
Sung, Y. et al. Non-Gaussian noise spectroscopy with a superconducting qubit sensor.

*Nat. Commun.***10**, 3715 (2019). - 18.
von Lüpke, U. et al. Two-qubit spectroscopy of spatiotemporally correlated quantum noise in superconducting qubits.

*PRX Quantum***1**, 010305 (2020). - 19.
Sung, Y. et al. Multi-level quantum noise spectroscopy.

*Nat. Commun.***12**, 967 (2021). - 20.
Bar-Gill, N. et al. Suppression of spin-bath dynamics for improved coherence of multi-spin-qubit systems.

*Nat. Commun.***3**, 858 (2012). - 21.
Peng, X. et al. Experimental observation of Lee-Yang zeros.

*Phys. Rev. Lett.***114**, 010601 (2015). - 22.
Casola, F., van der Sar, T. & Yacoby, A. Probing condensed matter physics with magnetometry based on nitrogen-vacancy centres in diamond.

*Nat. Rev. Mater.***3**, 17088 (2018). - 23.
Ye, B., Machado, F., White, C. D., Mong, R. S. K. & Yao, N. Y. Emergent hydrodynamics in nonequilibrium quantum systems.

*Phys. Rev. Lett.***125**, 030601 (2020). - 24.
Davis, E. J. et al. Probing many-body noise in a strongly interacting two-dimensional dipolar spin system. Preprint at https://arxiv.org/abs/2103.12742 (2021).

- 25.
Zhao, N., Wang, Z.-Y. & Liu, R.-B. Anomalous decoherence effect in a quantum bath.

*Phys. Rev. Lett.***106**, 217205 (2011). - 26.
Huang, P. et al. Observation of anomalous decoherence effect in a quantum bath at room temperature.

*Nat. Commun.***2**, 570 (2011). - 27.
Yang, W., Ma, W.-L. & Liu, R.-B. Quantum many-body theory for electron spin decoherence in nanoscale nuclear spin baths.

*Rep. Prog. Phys.***80**, 016001 (2017). - 28.
Wang, P., Chen, C., Peng, X., Wrachtrup, J. & Liu, R.-B. Characterization of arbitrary-order correlations in quantum baths by weak measurement.

*Phys. Rev. Lett.***123**, 050603 (2019). - 29.
Wang, Y.-X. & Clerk, A. A. Spectral characterization of non-Gaussian quantum noise: Keldysh approach and application to photon shot noise.

*Phys. Rev. Res.***2**, 033196 (2020). - 30.
Szańkowski, P. & Cywiński, Ł. Noise representations of open system dynamics.

*Sci. Rep.***10**, 22189 (2020). - 31.
Schoelkopf, R. J., Clerk, A. A., Girvin, S. M., Lehnert, K. W. & Devoret, M. H. Qubits as spectrometers of quantum noise. In

*Quantum Noise in Mesoscopic Physics*(ed. Nazarov, Y. V.) 175–203 (Springer Dordrecht, 2003). - 32.
Clerk, A. A., Devoret, M. H., Girvin, S. M., Marquardt, F. & Schoelkopf, R. J. Introduction to quantum noise, measurement, and amplification.

*Rev. Mod. Phys.***82**, 1155 (2010). - 33.
Paz-Silva, G. A., Lee, S.-W., Green, T. J. & Viola, L. Dynamical decoupling sequences for multi-qubit dephasing suppression and long-time quantum memory.

*New J. Phys.***18**, 073020 (2016). - 34.
Paz-Silva, G. A., Norris, L. M. & Viola, L. Multiqubit spectroscopy of Gaussian quantum noise.

*Phys. Rev. A***95**, 022121 (2017). - 35.
Kwiatkowski, D., Szańkowski, P. & Cywiński, L. Influence of nuclear spin polarization on the spin-echo signal of an NV-center qubit.

*Phys. Rev. B***101**, 155412 (2020). - 36.
Polkovnikov, A., Sengupta, K., Silva, A. & Vengalattore, M. Colloquium: nonequilibrium dynamics of closed interacting quantum systems.

*Rev. Mod. Phys.***83**, 863 (2011). - 37.
Bruus, H. & Flensberg, K.

*Many-Body Quantum Theory in Condensed Matter Physics: an Introduction*(Oxford University Press, 2004). - 38.
Weiss, U.

*Quantum Dissipative Systems*4th edn (World Scientific, 2012). - 39.
Leggett, A. J. et al. Dynamics of the dissipative two-state system.

*Rev. Mod. Phys.***59**, 1 (1987). - 40.
Paladino, E., Galperin, Y. M., Falci, G. & Altshuler, B. L. 1/

*f*Noise: implications for solid-state quantum information.*Rev. Mod. Phys.***86**, 361 (2014). - 41.
Callen, H. B. & Welton, T. A. Irreversibility and generalized noise.

*Phys. Rev.***83**, 34 (1951). - 42.
Kubo, R. The fluctuation-dissipation theorem.

*Rep. Prog. Phys.***29**, 255 (1966). - 43.
Zamponi, F., Bonetto, F., Cugliandolo, L. F. & Kurchan, J. A fluctuation theorem for non-equilibrium relaxational systems driven by external forces.

*J. Stat. Mech.***2005**, P09013 (2005). - 44.
Cugliandolo, L. F. The effective temperature.

*J. Phys. A: Math. Theor.***44**, 483001 (2011). - 45.
Shnirman, A., Makhlin, Y. & Schön, G. Noise and decoherence in quantum two-level systems.

*Phys. Scr.***T102**, 147 (2002). - 46.
Schriefl, J., Makhlin, Y., Shnirman, A. & Schön, G. Decoherence from ensembles of two-level fluctuators.

*New J. Phys.***8**, 1 (2006). - 47.
Cywiński, L., Lutchyn, R. M., Nave, C. P. & Das Sarma, S. How to enhance dephasing time in superconducting qubits.

*Phys. Rev. B***77**, 174509 (2008). - 48.
Wilen, C. D. et al. Correlated charge noise and relaxation errors in superconducting qubits.

*Nature***594**, 369 (2021). - 49.
You, X., Clerk, A. A. & Koch, J. Positive- and negative-frequency noise from an ensemble of two-level fluctuators.

*Phys. Rev. Res.***3**, 013045 (2021). - 50.
Yoneda, J. et al. A quantum-dot spin qubit with coherence limited by charge noise and fidelity higher than 99.9%.

*Nat. Nanotechnol.***13**, 102 (2018). - 51.
Braumüller, J. et al. Characterizing and optimizing qubit coherence based on squid geometry.

*Phys. Rev. Applied***13**, 054079 (2020). - 52.
Gyenis, A. et al. Moving beyond the transmon: noise-protected superconducting quantum circuits.

*PRX Quantum***2**, 030101 (2021). - 53.
Caldeira, A. O. & Leggett, A. J. Quantum tunnelling in a dissipative system.

*Ann. Phys.***149**, 374 (1983). - 54.
Johnson, J. B. Thermal agitation of electricity in conductors.

*Phys. Rev.***32**, 97 (1928). - 55.
Nyquist, H. Thermal agitation of electric charge in conductors.

*Phys. Rev.***32**, 110 (1928). - 56.
Devoret, M. H. Quantum fluctuations in electrical circuits. In

*Quantum Fluctuations: Les Houches Session LXIII*(eds Reynaud, S., Giacobino, E. & Zinn-Justin, J.) 351–386 (Elsevier, 1997). - 57.
Peropadre, B., Zueco, D., Porras, D. & García-Ripoll, J. J. Nonequilibrium and nonperturbative dynamics of ultrastrong coupling in open lines.

*Phys. Rev. Lett.***111**, 243602 (2013). - 58.
Yan, F. et al. The flux qubit revisited to enhance coherence and reproducibility.

*Nat. Commun.***7**, 12964 (2016). - 59.
Forn-Díaz, P. et al. Ultrastrong coupling of a single artificial atom to an electromagnetic continuum in the nonperturbative regime.

*Nat. Phys.***13**, 39 (2017). - 60.
Barry, J. F. et al. Sensitivity optimization for NV-diamond magnetometry.

*Rev. Mod. Phys.***92**, 015004 (2020). - 61.
Kolkowitz, S. et al. Probing johnson noise and ballistic transport in normal metals with a single-spin qubit.

*Science***347**, 1129 (2015). - 62.
Ariyaratne, A., Bluvstein, D., Myers, B. A. & Jayich, A. C. B. Nanoscale electrical conductivity imaging using a nitrogen-vacancy center in diamond.

*Nat. Commun.***9**, 2406 (2018). - 63.
Bauch, E. et al. Ultralong dephasing times in solid-state spin ensembles via quantum control.

*Phys. Rev. X***8**, 031025 (2018). - 64.
Bluvstein, D., Zhang, Z., McLellan, C. A., Williams, N. R. & Jayich, A. C. B. Extending the quantum coherence of a near-surface qubit by coherently driving the paramagnetic surface environment.

*Phys. Rev. Lett.***123**, 146804 (2019). - 65.
Sakurai, J. J. & Napolitano, J.

*Modern Quantum Mechanics*2nd edn (Cambridge University Press, 2017). - 66.
Gardiner, C. & Zoller, P.

*Quantum Noise: a Handbook of Markovian and Non-Markovian Quantum Stochastic Methods with Applications to Quantum Optics*.*Springer Series in Synergetics*(Springer, 2004). - 67.
Kubo, R. Generalized cumulant expansion method.

*J. Phys. Soc. Jpn.***17**, 1100 (1962). - 68.
Sieberer, L. M., Buchhold, M. & Diehl, S. Keldysh field theory for driven open quantum systems.

*Rep. Prog. Phys.***79**, 096001 (2016). - 69.
Gabelli, J. & Reulet, B. Dynamics of quantum noise in a tunnel junction under ac excitation.

*Phys. Rev. Lett.***100**, 026601 (2008). - 70.
Stratonovich, R. L.

*Nonlinear Nonequilibrium Thermodynamics I*(Springer-Verlag, 1992).

## Acknowledgements

We thank M. Onizhuk, G. Galli, B. D’Anjou, X. You, P. Jerger, J. Karsch, M. Fukami, N. Delegan, and F. J. Heremans for useful discussions. This work was supported as part of the Center for Novel Pathways to Quantum Coherence in Materials, an Energy Frontier Research Center funded by the U.S. Department of Energy, Office of Science, Basic Energy Sciences. A.A.C. acknowledges support from the Simons Foundation through a Simons Investigator award (Award No. 669487, AC).

## Author information

### Affiliations

### Contributions

Y.-X.W. and A.A.C. contributed equally in the development of idea, derivation of results, and writing of paper.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare no competing interests.

## Additional information

**Peer review information** *Nature Communications* thanks Félix Beaudoin and the other anonymous reviewer(s) for their contribution to the peer review this work. Peer reviewer reports are available.

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

## Supplementary information

## Rights and permissions

**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/.

## About this article

### Cite this article

Wang, YX., Clerk, A.A. Intrinsic and induced quantum quenches for enhancing qubit-based quantum noise spectroscopy.
*Nat Commun* **12, **6528 (2021). https://doi.org/10.1038/s41467-021-26868-7

Received:

Accepted:

Published:

## 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.