Introduction

The large Hilbert space of a quantum system and the quantum superposition principle offer the potential advantages of quantum physics in many applications and laid the foundation of quantum information science1. Recently, supported by the established quantum state engineering and control techniques, quantum sensing emerges as one of the most promising near-term applications to achieve quantum advantage and has attracted tremendous attentions2,3,4,5,6. For a sensor interrogation Hamiltonian Hint, the intriguing Greenberger–Horne–Zeilinger entanglement states of a collection of spins7 or the Schrödinger-cat-like states in a large Hilbert space8,9,10,11 could enhance the sensitivity of a quantum probe, because they provide a large variance of energy \(\left\langle {H}_{{{{{{{{\rm{int}}}}}}}}}^{2}\right\rangle -{\left\langle {H}_{{{{{{{{\rm{int}}}}}}}}}\right\rangle }^{2}\propto {N}^{2}\) with N being the number of excitations. However, these exotic quantum states are also more prone to environmental noises, and thus the coherence times are reduced and the ultimate sensing sensitivity is hard to be enhanced12,13,14.

Fortunately, the large Hilbert space also offers the redundancy for realizing quantum error correction (QEC) that protects quantum states from decoherences and imperfections. It has been expected that the Heisenberg limit, i.e., the sensitivity of the sensing scales with the measurement time (T) and excitation number as \(\propto {\left(NT\right)}^{-1}\), could be achieved by protecting the exotic quantum states via QEC15,16,17,18,19,20,21, in sharp contrast to the standard quantum limit \(\propto {\left(NT\right)}^{-1/2}\). However, these QEC-based quantum sensing schemes demand stringent conditions in experiments. On one hand, the non-local QEC operations are challenging for multi-qubit systems22,23,24. Although a pioneering experiment proves the principle of QEC-enhanced sensing by prolonging the coherence time of a single electron spin25, the extension to a larger Hilbert space is absent. On the other hand, the theoretical assumptions of perfect ancilla or error-free quantum operations are impractical, and the noises of experimental systems could not meet the orthogonality requirement in general21. The unraveled fact that the Heisenberg limit could not be practically attainable26,27 discourages further experimental exploration of quantum-enhanced sensing via QEC.

In this work, we demonstrate the enhancement of the sensing sensitivity by approximate QEC with a bosonic probe. Instead of pursuing the Heisenberg limit, our quantum sensing is implemented with optimized experimental strategies in a hardware-efficient superconducting architecture. By using non-exact QEC codes based on two-component Fock states for carrying the coherence, the sensing information could be protected by QEC, and the imperfection due to decoherence could even be further suppressed by mitigating the ambiguity of the quantum evolution trajectories. Benefiting from both the enhanced sensing-information-gain rate and prolonged coherence time of the exotic quantum states, the bosonic probe is applied for practical radiometry and achieves a detection limit of the receiver excitation population of 9.1 × 10−4 Hz−1/2, which shows a 5.3 dB enhancement of the sensitivity by QEC compared to the encoding with the two lowest Fock states. Our work develops practical quantum sensing technologies, proves the quantum enhancement, and could also stimulate further experimental efforts in this direction.

Results

Theory of approximate bosonic QEC for sensing

Figure 1 illustrates the principle of quantum-enhanced sensing. When a single two-level system (TLS) is used to probe an external field through coherent coupling, the quantum state in the two-dimensional Hilbert space would acquire a phase proportional to the sensing duration tint. By contrast, when extending the probe to a higher dimension, it is possible to find a subspace in which the phase accumulation rate is higher, while the rotation angle can be preserved even though the states are mapped to disjoint error subspaces by noises. Therefore, the sensitivity could be enhanced by both the larger rate and the QEC protection. A single bosonic mode provides an excellent probe for realizing such an idea in practice because of its large Hilbert space dimension and hardware-efficient quantum control capability10,11,28. In general, a bosonic probe could sense a physical quantity ω through the interrogation Hamiltonian

$${H}_{{{{{{{{\rm{int}}}}}}}}}/\hslash =\omega {a}^{{{{\dagger}}} }a,$$
(1)

where a denotes the annihilation operator of the probe and is the Planck constant.

Fig. 1: Schematic of practical quantum-enhanced sensing.
figure 1

a The principle of quantum sensing with approximate quantum error correction (QEC). The errors \(\left\{{E}_{1},{E}_{2},...\right\}\) map the quantum states in the code space to disjoint subspaces and the recovery operations \(\left\{{R}_{1},{R}_{2},...\right\}\) covert the states back to the code space with the acquired phase being preserved. However, the recovered state in the code space is deformed due to the nature of the approximate QEC, as illustrated by the dashed arrows. b One example of practical quantum sensing protocol with a bosonic probe. The Wigner functions illustrate the evolution of the probe quantum state: When the probe state is initialized to \((\left|1\right\rangle +i\left|3\right\rangle )/\sqrt{2}\), the phase can be preserved even if there is a single-photon-loss error (a), which could be tracked and corrected via the recovery operation (R1). c Schematic of the experimental setup for the quantum radiometry implemented with a superconducting architecture. The device is constructed with a bosonic probe that couples to a receiver mode.

However, exact QEC codes for sensing with such a model are excluded, since the photon loss errors due to dam** are not orthogonal to Hint [see Supplementary Note 1]. Because of the same reason, the Heisenberg limit could not be achievable in principle with such a sensing scheme. Nevertheless, the protection of the probe from noise by an approximate QEC can still be advantageous in practical metrology applications as demonstrated below. For the convenience of experiments, we propose the two-component Fock state subspace \({{{{{{{\rm{span}}}}}}}}\left\{\left|m\right\rangle ,\left|n\right\rangle \right\}\) (m < n) as the QEC code space for sensing. The evolution of the probe state after an interrogation time tint becomes

$$|{\psi }_{m,n}\rangle ={\alpha }_{m,n}\left|m\right\rangle +{\beta }_{m,n}{e}^{-i(n-m)\omega {t}_{{{{{{{{\rm{int}}}}}}}}}+i{\varphi }_{0}}\left|n\right\rangle ,$$
(2)

where \({\alpha }_{m,n},{\beta }_{m,n}\in {\mathsf{R}}\) are the amplitudes and φ0 is the initial phase. It is easy to verify that for loss errors up to m photons, the acquired phase \(\varphi =\left(n-m\right)\omega {t}_{{{{{{{{\rm{int}}}}}}}}}\) is preserved with the phase accumulation rate \(\left(n-m\right)\omega\) being fixed irrespective of the time when the photon jump occurs. By repetitively implementing the recovery operations \({R}_{j}=\left|m\right\rangle \left\langle m-j\right|+\left|n\right\rangle \left\langle n-j\right|+{\widetilde{R}}_{j}\) for the j-photon-loss error, with \({\widetilde{R}}_{j}\) being a complementary operator to make Rj unitary, the phase coherence could be protected in the code space. Therefore, such a code in a high-dimensional Fock space could simultaneously enhance the phase accumulation rate by n − m times when compared to the encoding with the lowest two levels and prolong the coherence time via QEC. However, the coherence time could only be enhanced by a limited factor, since the code is an approximate QEC code, and the amplitudes of the probe state αn,m and βn,m change after each photon loss, as illustrated by the deformation of the error subspaces and the recovered state in the code space in Fig. 1a. This deformation will be one limitation of the approximate QEC and could be mitigated by tracking the photon loss errors as discussed below.

An example of this proposal is schematically shown in Fig. 1b with a probe state \(|{\psi }_{1,3}\rangle =\frac{1}{\sqrt{2}}\left(\left|1\right\rangle +{e}^{i\pi /2}\left|3\right\rangle \right)\), i.e., m = 1 and n = 3. The single-photon-loss error maps the state to \(\frac{1}{2}\left(\left|0\right\rangle +\sqrt{3}{e}^{i\pi /2}\left|2\right\rangle \right)\) and recovery R1 converts the state back to the code space, while the Wigner functions of both states have the same rotation angle and symmetry. However, the phase information is completely corrupted for a two-photon-loss error since m < 2.

Experimental architecture and scheme

To demonstrate the efficacy of the approximate bosonic QEC scheme for sensing, we first experimentally characterize the performance of the scheme by measuring a virtual phase (φ0) introduced in the initial probe state instead of an acquired phase (φ). Our experimental device schematically shown in Fig. 1c consists of a superconducting transmon qubit as an ancilla dispersively coupled to two three-dimensional cavities29,30,31. The cavity (blue) with a long coherence time (T1 = 143 μs) serves as the probe, while the ancilla and the other short-lived cavity (green) assist in the manipulation and readout of the probe, respectively [see Methods for more details]. In the radiometry experiments studied later, the readout cavity serves as a receiver to collect microwave signals from outside, while the probe can sense the excitation in the receiver through the cross-Kerr interaction.

As shown by the experimental circuits in Fig. 2a, b, the ancilla assists the encoding and decoding of the probe by map** the ground and the excited states \(\{|g\rangle ,|e\rangle \}\) to the two Fock states \(\left\{\left|m\right\rangle ,\left|n\right\rangle \right\}\). The sensing procedure is reminiscent of the Ramsey interferometer32 with the output probability of \(|g\rangle\) as \({P}_{g}=A+B\cos (\varphi +{\varphi }_{0})\) manifesting the interference fringe, where A and B are the fitting parameters. Since the decay rate of Fock state \(\left|m\right\rangle\) is proportional to the photon number m, we fix m = 1 and select n = 3, 5, 7 for a relatively small decay rate. The corresponding error set of the probe is \(\{{E}_{0}={e}^{-{t}_{{{{{{{{\rm{int}}}}}}}}}{a}^{{{{\dagger}}} }a/2{T}_{1}},{E}_{1}=\sqrt{1-{e}^{-{t}_{{{{{{{{\rm{int}}}}}}}}}/{T}_{1}}}{e}^{-{t}_{{{{{{{{\rm{int}}}}}}}}}{a}^{{{{\dagger}}} }a/2{T}_{1}}a\}\) for zero- and single-photon-loss errors with an interrogation time tint, and we only tackle the dominant error E1 by R1. The QEC of the probe state is implemented through an autonomous manner33,34, i.e., by implementing a unitary operation on the joint state of the probe and the ancilla, regardless of whether E1 has occurred or not, to transfer the error entropy associated with the encoded probe state to the ancilla, followed by a reset of the ancilla [see Methods]. This autonomous QEC, therefore, does not require an error detection. Note that αm,n, βm,n, and τint are optimized in order to maximize the visibility of the output fringes for each \(|{\psi }_{m,n}\rangle\) in the following experiments; therefore, the best detection sensitivity can be achieved experimentally [see Supplementary Note 2].

Figure 2c, d compares the measured probability Pg against the virtual phase φ0 and the sensing duration tint for the cases without and with the protection by QEC. The results with QEC indeed show a much slower decaying of the fringe visibility. To evaluate the potentially achievable improvement of the sensing performance, we extract the Ramsey visibility against φ0 and derive the normalized quantum Fisher information (QFI) \({{{{{{{\mathcal{Q}}}}}}}}\) with respect to ttot, which is the total experimental time for a single-shot measurement including the initialization, encoding, interrogation, decoding, and readout, as well as the time needed for the QEC process and feedback when QEC is performed [see Methods]. \({{{{{{{\mathcal{Q}}}}}}}}\) determines the best achievable sensitivity of ω in a unit time, i.e.,

$${\sigma }_{\omega }\ge 1/\sqrt{{{{{{{{\mathcal{Q}}}}}}}}},$$
(3)

which is in the unit of \({{{{{{{\rm{Hz}}}}}}}}/\sqrt{{{{{{{{\rm{Hz}}}}}}}}}\) and corresponds to the noise floor of our sensor.

Fig. 2: The sensing scheme with QEC.
figure 2

a Quantum circuit of the sensing scheme without QEC. After the encoding process, the probe evolves freely for an interrogation time tint, and is read out through detection of the ancilla following a decoding process. b Scheme for the QEC-enhanced sensing with the interrogation interleaved with QEC operations. The QEC operation consists of a QEC pulse and detection and a conditional reset of the ancilla. The interrogation time is tint in a and tint = Mτint in b, with M from 1 to 10 being the repetition number of QEC. c Measurement results of Pg without QEC for the probe state \(|{\psi }_{1,3}\rangle =(\left|1\right\rangle +{e}^{i{\varphi }_{0}}\left|3\right\rangle )/\sqrt{2}\) against the initial phase φ0 and with tint ranging from 0.1T1 to T1. d Performance of the QEC-enhanced sensing for the same probe state with an optimized interval τint = 0.1T1. The shift of fringes with the increasing M is mainly caused by the QEC-induced phase.

The results of \({{{{{{{\mathcal{Q}}}}}}}}\) with and without QEC are summarized in Fig. 3b–d, and \({{{{{{{\mathcal{Q}}}}}}}}\) of the simple TLS case with the probe being encoded in the lowest two levels is also provided as a reference. All curves of \({{{{{{{\mathcal{Q}}}}}}}}\) first grow up with tint, since a longer interrogation time gives a larger phase acquisition. However, due to more accumulated decoherence, \({{{{{{{\mathcal{Q}}}}}}}}\) saturates at an optimal tint and decreases for even longer tint. Benefiting from the larger Hilbert space dimension, the best achievable \({{{{{{{\mathcal{Q}}}}}}}}\) without QEC increases with n, while the optimal tint decreases with n due to the shorter Fock state lifetime. When performing QEC, \({{{{{{{\mathcal{Q}}}}}}}}\) is clearly improved than that without QEC especially when tint exceeds the optimal value, confirming the enhanced coherence time by QEC. Comparing the results for different n, the improvement induced by QEC reduces with increasing n, due to the stronger uncorrectable noise effects for larger n and also higher operation errors when performing QEC. We note that the signal-induced dephasing error, however, could be negligible for current experimental parameters [see Supplementary Note 1].

Quantum jump tracking (QJT) approach

As mentioned earlier, one main limitation on the performance of the approximate QEC would be the code state deformation, which causes decoherence even when the QEC is successfully implemented. For example, after one round of QEC, the amplitudes of \(|{\psi }_{m,n}\rangle\) evolve as \(\{{\alpha }_{m,n},{\beta }_{m,n}{e}^{-\left(n-m\right){\tau }_{{{{{{{{\rm{int}}}}}}}}}/2{T}_{1}+i{\varphi }_{0}}\}\) and \(\{{\alpha }_{m,n},\sqrt{\frac{n}{m}}{\beta }_{m,n}{e}^{-\left(n-m\right){\tau }_{{{{{{{{\rm{int}}}}}}}}}/2{T}_{1}+i{\varphi }_{0}}\}\) (normalization factors are neglected) for E0 and E1 occurring, respectively, with the relative amplitude of the two Fock components being either amplified or suppressed. As illustrated in Fig. 3a, the final probe state \({\rho }_{m,n}^{{{{{{{{\rm{(tot)}}}}}}}}}\) becomes a mixed state composing of different possible quantum evolution trajectories (\(|{\psi }_{m,n}^{(0)}\rangle\), \(|{\psi }_{m,n}^{(1)}\rangle\), ...), although the phase is preserved irrespective of the total number of photon jumps during τint. If we can distinguish the number of photon jumps that have occurred, the ambiguity of the possible trajectories could be mitigated, and thus \({{{{{{{\mathcal{Q}}}}}}}}\) could be improved.

Fig. 3: Normalized quantum Fisher information \({{{{{{{\mathcal{Q}}}}}}}}\).
figure 3

a The Bloch-sphere illustration of the quantum jump tracking (QJT). For a two-component Fock state \(|{\psi }_{m,n}\rangle\), although it could be confined in the code space \({{{{{{{\rm{span}}}}}}}}\left\{|m\rangle ,|n\rangle \right\}\) via QEC, the amplitudes vary depending on the number (j) of the single-photon-loss errors occurring, i.e., \(|{\psi }_{m,n}\rangle \mapsto |{\psi }_{m,n}^{(j)}\rangle\). The output would be a mixed state \({\rho }_{m,n}^{{{{{{{{\rm{(tot)}}}}}}}}}\), if different evolution trajectories could not be distinguished. bd Quantitative performance of different quantum sensing strategies characterized by \({{{{{{{\mathcal{Q}}}}}}}}\) for the probe states \(|{\psi }_{1,3}\rangle\), \(|{\psi }_{1,5}\rangle\), and \(|{\psi }_{1,7}\rangle\), respectively. TLS: the two-level system encoding with the two lowest Fock states. QEC and No QEC: results with and without QEC, respectively. QEC+QJT: the strategy that combines QEC and QJT. The error bars are obtained through error propagation of the fit parameter uncertainties. Inset: Wigner functions of the corresponding probe states, with the same axes and color scale bar as in Fig. 1b.

Therefore, we propose and demonstrate a QJT approach to analyze the sensed information for a better sensitivity: record the output of each autonomous QEC, count the number of single-photon jumps (\(j\in \left\{0,1,...,M\right\}\)), and process the data according to j [see Methods]. By doing so, \({{{{{{{\mathcal{Q}}}}}}}}\) is further improved in all cases and even the optimal tint is extended, as shown in Fig. 3b–d. These experimental results demonstrate the protection and recovery of \({{{{{{{\mathcal{Q}}}}}}}}\) from decoherence by QEC and QJT, and indicate the benefits of approximate QEC in sensing.

A radiometer enhanced by approximate QEC

Finally, the scheme is applied in a practical sensing scenario as a quantum radiometer. Based on the device shown in Fig. 1c and using the readout cavity as a receiver to the microwave field under detection, the excitation population of the readout cavity p = ω/χ could be derived by the quantum sensor with a calibrated cross-Kerr coefficient χ between the probe and the receiver. Following the sequence shown in Fig. 4a, the resulting oscillations shift due to the acquired phase φ from the receiver population p = 0.037 induced by a continuous weak coherent signal [Fig 4b]. It is observed that φ increases linearly with the acquisition time Mτint as expected, but the contrast of the signal fades due to decoherence and errors that cannot be completely corrected. With an appropriate φ0, the sensitivity of the output Pg could be maximized by optimizing the slope ∂Pg/∂p for p ≈ 0. The results in Fig. 4c for different \(|{\psi }_{m,n}\rangle\) show the maximum slopes around p ≈ 0 proportional to n − m. From these results, the achieved experimental sensitivity for measuring p is derived as

$${\sigma }_{p}={{\Delta }}{P}_{g}\sqrt{{t}_{{{{{{{{\rm{tot}}}}}}}}}}/| \partial {P}_{g}/\partial p| ,$$
(4)

with \({{\Delta }}{P}_{g}=\sqrt{{P}_{g}(1-{P}_{g})}\approx \frac{1}{2}\) being the standard deviation of Pg that follows the binomial statistics. When QJT is applied, σp could be derived with Pg and its slope conditional on j [see Methods]. Figure 4d–f summarizes the achieved sensitivities of the quantum radiometry for different strategies, as well as the potentially achievable \({\sigma }_{p}=1/\chi \sqrt{{{{{{{{\mathcal{Q}}}}}}}}}\) based on the virtual phase measurement results in Fig. 3. It is confirmed that the best strategy is to combine QEC and QJT and shows great advantage over others, with the sensitivity \({\sigma }_{{\psi }_{1,3}}=11.2\), \({\sigma }_{{\psi }_{1,5}}=9.1\), and \({\sigma }_{{\psi }_{1,7}}=9.1\) (in the unit of 10−4 Hz−1/2) achieved for \(|{\psi }_{1,3}\rangle\), \(|{\psi }_{1,5}\rangle\), and \(|{\psi }_{1,7}\rangle\), respectively. The general trends of the achieved σp agree well with the results deduced from Fig. 3, but with a slight sensitivity loss due to the j-independent decoding in the current experiment instead of the most optimal adaptive decoding. Compared with the TLS case (σTLS = 16.7 × 10−4 Hz−1/2), we realize a sensitivity enhancement of \(20{\log }_{10}{\sigma }_{{{{{{{{\rm{TLS}}}}}}}}}/{\sigma }_{{\psi }_{1,7}}=5.3\,{{{{{{{\rm{dB}}}}}}}},\) approaching the optimal enhancement of 6.2 dB implied by the results from Fig. 3.

Fig. 4: The quantum radiometry.
figure 4

a Experimental sequence for the quantum-enhanced radiometry that senses the excitation population p in the receiver cavity (Fig. 1c) via QEC. b The measured Pg as a function of the initial phase φ0. The purple dots and green triangles correspond to experiments with p = 0 and 0.037, respectively. The experiment is performed with the probe state \(|{\psi }_{1,3}\rangle =(|1\rangle +|3\rangle )/\sqrt{2}\) and τint = 0.1T1 for the QEC repetition number M = 1, 5, 10 (from left to right). c The measured Pg as a function of ptint/T1 for the probe states \(|{\psi }_{1,3}\rangle\), \(|{\psi }_{1,5}\rangle\), and \(|{\psi }_{1,7}\rangle\) with a single round of QEC (M = 1 and tint = Mτint = τint). The fitted oscillation periods are proportional to n − m. df Sensitivity of measuring p (σp) of the radiometry for the probe states \(|{\psi }_{1,3}\rangle\), \(|{\psi }_{1,5}\rangle\), and \(|{\psi }_{1,7}\rangle\), respectively. A sensitivity enhancement of 5.3 dB over TLS (the encoding with the two lowest Fock states) is obtained. QEC+QJT (Fig. 3): the deduced sensitivity from the results with the QEC+QJT strategy in Fig. 3. The error bars are obtained through error propagation of the fit parameter uncertainties.

The current sensitivity is mainly limited by the ancilla relaxation and dephasing errors, which are the dominant error source for achieving high-fidelity approximate QEC. The ancilla errors can be modeled as a depolarization channel for the QEC and their influence on the sensitivity can be numerically analyzed, which shows that the sensitivity can have another 3 dB improvement when the ancilla-induced depolarization probability decreases to 1/3 of the current value [see Supplementary Note 1]. It is worth noting that even provided with perfect quantum operations and an ideal ancilla, the optimal normalized QFI \({{{{{{{\mathcal{Q}}}}}}}}\propto n\), when n ≫ m (the Heisenberg limit ∝ n2 could not be achieved as pointed out earlier), and the signal-induced dephasing of the probe would further reduce \({{{{{{{\mathcal{Q}}}}}}}}\) for large n ~ 100 [see Supplementary Note 1].

Discussion

In summary, utilizing the large Hilbert space of the bosonic mode, we realize a radiometry with a sensitivity of 9.1 × 10−4 Hz−1/2 in a superconducting circuit that shows a quantum enhancement of 5.3 dB and opens the door to practical quantum sensing. Our radiometry has a comparable sensitivity to the recently demonstrated thermometry for detecting propagating microwaves35 and the radiometry for sensing microwave radiation based on the photon-induced dephasing process of a superconducting qubit36. The gain of QFI by approximate QEC and QJT reveals the significant difference between the quantum sensing and other quantum information processing applications: the goal is to acquire the sensing information as much as possible instead of pursuing the perfect protection of an unknown quantum state. The extensions of the scheme to tens of photons by develo** sophisticated quantum control methods and optimal approximate QEC codes, as well as to multiple bosonic modes, are appealing and worth further investigation. The bosonic radiometry demonstrated here will also excite immediate interest for other quantum sensing applications, such as the force sensing37, because the scheme is applicable to all physical quantities that could induce a change of ω. The bosonic probe having the advantages of hardware efficiency and avoiding the non-local interactions is extensible to other bosonic degrees of freedom including phonons coupled with trapped ions10,38 and superconducting qubits39, and also extensible to the collective excitations in spin and atom ensembles to promote the atomic and optical quantum metrology technologies2,3,4,5,6.

Methods

Experimental implementation

As described in the main text, our experiments are implemented with a superconducting quantum circuit and the device consists of a superconducting transmon qubit as an ancilla dispersively coupled to two superconducting rectangular microwave cavities, the probe, and the receiver. The input and output couplings of the receiver cavity are designed to be asymmetric, κr,out ≫ κr,in, offering a decay rate of κr = 1/44 ns, which is three orders of magnitude higher than that of the probe cavity. As a consequence, a static coherent state with a mean excitation number p in the receiver cavity can be created within a negligible period of time. Such a design of coupling is fit for the high-fidelity readout of the ancilla. However, for practical applications, the receiver mode could be over-coupled to the external fields that are to be detected and an extra readout resonator could be employed to perform the readout. Crucially, the cross-Kerr interaction induced by the nonlinearity of the transmon allows the detection of the excitation in the receiver by utilizing the bosonic quantum states in the probe cavity. The calibrated cross-Kerr coefficient is χ/2π = 15.3 kHz.

Quantum Fisher information (QFI)

To characterize the sensitivity that can be achieved in the experiment, the measured data are fitted with sinusoidal curves. For the simplest case with binary outputs \(\{|g\rangle ,|e\rangle \}\), the results obey \({P}_{g}(\omega )=A+B\cos [\omega (n-m){t}_{{{{{{{{\rm{int}}}}}}}}}+{\varphi }_{0}]\) and Pe = 1 − Pg. The final readout outputs follow the binomial distribution, giving a variance of \({({{\Delta }}{P}_{g})}^{2}={P}_{g}(\omega )-{P}_{g}^{2}(\omega )\). Therefore, the attainable resolution (uncertainty Δω) for measuring φ by one round of the sensing experiment, including the initialization, encoding, interrogation, decoding, and readout, reads

$${{\Delta }}\omega \ge {\min }_{{\varphi }_{0}}\frac{{{\Delta }}{P}_{g}}{\partial {P}_{g}\left(\omega \right)/\partial \omega }=\frac{\sqrt{A(1-A)}}{(n-m){t}_{{{{{{{{\rm{int}}}}}}}}}B}.$$
(5)

Alternatively, the precision could be studied in a more general frame of quantum metrology, where the QFI gain \({{{{{{{\mathcal{F}}}}}}}}\) could be deduced as

$$\hskip3.5pc{{{{{{{\mathcal{F}}}}}}}}={\max }_{{\varphi }_{0}}\left\{\frac{1}{{P}_{g}(\omega )}{\left[\frac{\partial {P}_{g}\left(\omega \right)}{\partial \omega }\right]}^{2}+\frac{1}{{P}_{e}(\omega )}{\left[\frac{\partial {P}_{e}\left(\omega \right)}{\partial \omega }\right]}^{2}\right\}$$
(6)
$$ =\frac{{(n-m)}^{2}{t}_{{{{{{{{\rm{int}}}}}}}}}^{2}{B}^{2}}{A\left(1-A\right)}.$$
(7)

The corresponding achievable measurement uncertainty is

$${{\Delta }}\omega \ge 1/\sqrt{{{{{{{{\mathcal{F}}}}}}}}}.$$
(8)

Introducing the normalized QFI per unit time \({{{{{{{\mathcal{Q}}}}}}}}={{{{{{{\mathcal{F}}}}}}}}/T\), with T being the experimental time, we then could derive the practical sensitivity of the experiment \(1/\sqrt{{{{{{{{\mathcal{Q}}}}}}}}}\) that is associated with the measurement bandwidth and corresponds to the noise floor of the sensing. For example, if the duration for a single-shot sensing experiment is ttot, the QFI gain rate could be obtained as

$${{{{{{{{\mathcal{Q}}}}}}}}}_{\omega }=\frac{{B}^{2}{\left(n-m\right)}^{2}{t}_{{{{{{{{\rm{int}}}}}}}}}^{2}}{A(1-A){t}_{{{{{{{{\rm{tot}}}}}}}}}},$$
(9)

corresponding to the achievable measurement sensitivity

$${\sigma }_{\omega }\ge \frac{1}{\sqrt{{{{{{{{{\mathcal{Q}}}}}}}}}_{\omega }}}.$$
(10)

Parameter optimization

For the probe quantum states, the dam** channel could be represented by the Kraus operators as \({{{{{{{\mathcal{E}}}}}}}}\left(\rho \right)=\mathop{\sum }\nolimits_{k = 0}^{\infty }{E}_{k}\rho {E}_{k}^{{{{\dagger}}} }\), where ρ is the density matrix of the probe and

$${E}_{k}=\frac{{(1-{e}^{-\frac{{t}_{{{{{{{{\rm{int}}}}}}}}}}{{T}_{1}}})}^{k/2}}{\sqrt{k!}}{e}^{-\frac{{t}_{{{{{{{{\rm{int}}}}}}}}}}{2{T}_{1}}{a}^{{{{\dagger}}} }a}{a}^{k}$$
(11)

is the operator for the k-photon-loss error during a sensing interrogation time of tint. In the experiments, we only consider the two dominant errors \(\left\{{E}_{0},\,{E}_{1}\right\}\). Due to the Fock state dam** \({e}^{-\frac{{t}_{{{{{{{{\rm{int}}}}}}}}}}{2{T}_{1}}{a}^{{{{\dagger}}} }a}\) and the photon-number-dependent photon jump rate, the amplitudes of the two-component Fock states experience unbalanced amplitude change. Therefore, we numerically optimize the coefficients αm,n and βm,n of the initial probe quantum states, τint, and the repetition number M to maximize \({{{{{{{\mathcal{Q}}}}}}}}\) by considering the full dam** channel and the imperfections of QEC and other operations. We further optimize the interrogation time τint experimentally in order to acquire the maximum \({{{{{{{\mathcal{Q}}}}}}}}\). For the purpose of achieving the maximum sensitivity of the radiometry, we also optimize the initial phase φ0 in the encoding step to maximize the slope ∂Pg/∂p.

Autonomous implementation of QEC

The probe quantum states studied in this work are the approximate QEC codes, and thus the recovery \({R}_{j}=\left|m\right\rangle \left\langle m-j\right|+\left|n\right\rangle \left\langle n-j\right|+{\widetilde{R}}_{j}\) for the j-photon-loss error are derived according to the transpose channel, which provides a universal approach for constructing the recovery operation with reasonable performance. Such recovery operations are implemented autonomously and repetitively during the sensing. Specifically, a unitary operation U is implemented on the joint state of the probe and the ancilla qubit to transfer the error entropy associated with the encoded probe state to the ancilla: once a single-photon-loss error (E1) occurs, the probe state is recovered and the ancilla is flipped to the excited state \(\left|e\right\rangle\). However, when there is no error, both the probe and the ancilla remain unaltered during the QEC operation. Explicitly, we have:

$$U\left|{\psi }_{{{{{{{{\rm{E}}}}}}}}}\right\rangle \left|g\right\rangle =\left|{\psi }_{{{{{{{{\rm{C}}}}}}}}}^{\prime}\right\rangle \left|e\right\rangle ,$$
(12)
$$U\left|{\psi }_{{{{{{{{\rm{C}}}}}}}}}\right\rangle \left|g\right\rangle =\left|{\psi }_{{{{{{{{\rm{C}}}}}}}}}\right\rangle \left|g\right\rangle ,$$
(13)

where \(|{\psi }_{{{{{{{{\rm{E}}}}}}}}}\rangle\) is the erroneous state in the error space, \(|{\psi }_{{{{{{{{\rm{C}}}}}}}}}\rangle\) is the uncorrupted state in the code space, and \(|{\psi }_{{{{{{{{\rm{C}}}}}}}}}^{\prime}\rangle\) presents the recovered state with deformation (dashed arrows in Fig. 1a). Such a unitary operation is realized by sending numerically optimized microwave pulses simultaneously to both the probe cavity and the ancilla qubit, which are obtained through the so-called gradient ascent pulse engineering method based on the calibrated system parameters40,41.

After the autonomous implementation of QEC, the ancilla is then reset to the ground state to dump the error entropy for the next round of autonomous QEC. The reset of the ancilla could be performed in two ways. (1) The measurement-feedback method: the ancilla is first measured; the ancilla is left as it is if the measured outcome is the ground state, otherwise, it is flipped to the ground state by a feedback pulse. (2) The engineered-dissipation method: the ancilla is engineered to couple to a lossy channel, e.g., a cavity with a short lifetime, which allows a fast decay of the ancilla excitation regardless of the ancilla state, i.e., the ancilla state is not recorded. In our experiment, we use the measurement-feedback method to reset the ancilla, the ancilla state is recorded in each round of the QEC, and the outcome is used in the QJT protocol for extracting the sensitivity of our radiometry. The whole correction process is repeated for M times followed by a decoding for the final readout to end the sensing experiment.

Note that in contrast to the conventional QEC that consists of both error detection (a measurement of the ancilla) and measurement outcome-dependent error correction, the implementation of the autonomous QEC does not require error detection and fast real-time adaptive control. Therefore, such a protocol can avoid fast feedback electronics and also circumvent the delay in the electronics, and thus saves the hardware and suppresses potential decoherence due to the delay. For more information about the autonomous QEC, see Refs. 33,34.

Quantum jump tracking (QJT)

We first note that here QJT refers to the specific approach to analyze the quantum sensing scheme by taking into account the number of jumps in each trajectory based on the implementation of autonomous QEC. The ancilla output of \(\left|e\right\rangle\) after the QEC pulse indicates a single-photon-loss error occurs during the interrogation time. In the QJT experiments, the number of \(\left|e\right\rangle\) at the output of the QEC pulse is counted and recorded, which allows us to improve the sensitivity. In general, the decoding operation should be adaptively selected according to the number of the quantum jumps (j). The optimal decoding scheme is to map the Fock states \(\left|m\right\rangle\) and \(\left|n\right\rangle\) to the ancilla state \(|\pm \rangle =|g\rangle \pm {e}^{\pm i{\varphi }_{1}}\left|e\right\rangle\) for all cases, with φ1 ≈ 0 being the readout phase, therefore we only selectively process the data after the experiments. We divide the final measurement outputs into groups by j. The joint probability of output \(\left|g\right\rangle\), Pg,jM(ω), for j jumps, corresponding to the case with the single-photon-loss error occurring j times among M repetitions of sensing, can be fitted with \({P}_{g,j| M}(\omega )={A}_{g,j}+{B}_{g,j}\cos [\omega (n-m){t}_{{{{{{{{\rm{int}}}}}}}}}+{\varphi }_{g,j}]\). Similarly, for output \(\left|e\right\rangle\), Pe,jM(ω) can be fitted with \({P}_{e,j| M}(\omega )={A}_{e,j}+{B}_{e,j}\cos [\omega (n-m){t}_{{{{{{{{\rm{int}}}}}}}}}+{\varphi }_{e,j}]\). Here, φg(e),j includes the initial and the readout phases. The resulting normalized QFI \({{{{{{{\mathcal{Q}}}}}}}}\) with QJT can be calculated as

$${{{{{{{{\mathcal{Q}}}}}}}}}_{\omega } = \frac{1}{{t}_{{{{{{{{\rm{tot}}}}}}}}}}{\max }_{{\varphi }_{0}}\left\{\mathop{\sum }\limits_{j=0}^{M}\mathop{\sum}\limits_{l\in \left\{g,e\right\}}\frac{1}{{P}_{l,j| M}(\omega )}{\left[\frac{\partial {P}_{l,j| M}(\omega )}{\partial \omega }\right]}^{2}\right\}\\ = \frac{1}{{t}_{{{{{{{{\rm{tot}}}}}}}}}}\mathop{\sum }\limits_{j=0}^{M}\mathop{\sum}\limits_{l\in \left\{g,e\right\}}\frac{{B}_{l,j}^{2}{(n-m)}^{2}{t}_{{{{{{{{\rm{int}}}}}}}}}^{2}}{{A}_{l,j}}.$$
(14)

The experimental \({{{{{{{{\mathcal{Q}}}}}}}}}_{\omega }\) is calculated by the coefficients Aj and Bj, which are obtained in the experiments of measuring the virtual phase by varying φ0. The results indicate a sensitivity of measuring p as

$${\sigma }_{p}=\frac{1}{\sqrt{{{{{{{{{\mathcal{Q}}}}}}}}}_{\omega }}}/\frac{\partial \omega }{\partial p}=\frac{1}{\sqrt{{{{{{{{{\mathcal{Q}}}}}}}}}_{\omega }}}\frac{1}{\chi }.$$
(15)

For the direct implementation of the radiometry, the sensitivity of measuring p is provided as

$${\sigma }_{p}=\frac{1}{\sqrt{{{{{{{{{\mathcal{Q}}}}}}}}}_{p}}},$$
(16)

with

$${{{{{{{{\mathcal{Q}}}}}}}}}_{p}=\frac{1}{{t}_{{{{{{{{\rm{tot}}}}}}}}}}\mathop{\sum }\limits_{j = 0}^{M}\mathop{\sum }\limits_{l\in \left\{g,e\right\}}\frac{1}{{P}_{l,j| M}}{\left[\frac{\partial {P}_{l,j| M}}{\partial p}\right]}^{2},$$
(17)

where the probabilities Pl,jM and their slopes \(\frac{\partial {P}_{l,j| M}}{\partial p}\) are obtained directly from experiments with an optimized φ0.