Hybrid quantum-classical approach to enhanced quantum metrology

Abstract

Quantum metrology plays a fundamental role in many scientific areas. However, the complexity of engineering entangled probes and the external noise raise technological barriers for realizing the expected precision of the to-be-estimated parameter with given resources. Here, we address this problem by introducing adjustable controls into the encoding process and then utilizing a hybrid quantum-classical approach to automatically optimize the controls online. Our scheme does not require any complex or intractable off-line design, and it can inherently correct certain unitary errors during the learning procedure. We also report the first experimental demonstration of this promising scheme for the task of finding optimal probes for frequency estimation on a nuclear magnetic resonance (NMR) processor. The proposed scheme paves the way to experimentally auto-search optimal protocol for improving the metrology precision.

Introduction

Measuring physical parameters of interest with highest precision remains the everlasting pursuit in science and technology1. The general measurement procedure reads: prepare a probe, interact it with the system, and measure the probe. During this process, errors will result in a statistical uncertainty on the interested parameter \(\phi \). These errors mainly come from intrinsic fluctuations, insufficient controls and external perturbations2,3,4. The central limit theorem tells us that repeated applications of this process N times can improve the estimation precision, inducing a bound of \(\Delta \phi \sim 1/\sqrt{N}\), which is called Standard Quantum Limit. Quantum metrology1,5,6,7 exploits available quantum resources to beat this limit and can approach a scaling called Heisenberg Limit, namely \(\Delta \phi \sim 1/N\). However, in practical applications, realizing the expected precision under many cases, including inevitable external noise8,9,10, complex probe states11,12,13,14,15,16 and complicated encoding dynamics17,18,19,20, are often very challenging.

Fortunately, additional controls were found to be useful and necessary for quantum metrology to address these issues21. Dynamical decoupling methods22,23,24 and quantum error corrections25,26 were used specifically to defend against certain external noise for maintaining the precision. For extended types of encoding dynamics, including time-dependent21, noncommuting27, or general form28, carefully designed controls were applied to alter the dynamics and enhance the estimation precision. The above mentioned control methods are for specific purposes and are often very complex to design. Recently, Yuan and Liu29 proposed a systematic controlled sequential scheme to search the required controls in noisy system for enhancing the quantum metrology abilities. It is based on an optimal control algorithm called Gradient Ascent Pulse Engineering (GRAPE), where the added controls could be iteratively refreshed until the performance function (e.g., quantum Fisher information1,7) reaches the optimum. This algorithm is very efficient and easily-implemented for small-scale systems. However, in actual applications, it often happens that an exact model of the noise is lacking so that it is difficult to evaluate the gradient of the performance function to a good precision, even for the single-qubit case. These problems are further harmed by the exponentially increased complexity of the system dynamics.

To tackle these issues, we utilize a hybrid quantum-classical approach30,31 assisted GRAPE (hqc-GRAPE for short) to practically learn the optimal controls experimentally. Under a completely different motivation, the previous works concern how to speedup quantum optimal control problems, while here we seek for its extension to quantum metrology area. Hybrid quantum-classical (HQC) algorithms, which combine the present-day accessible quantum resources with sophisticated classical computation routines, have witnessed tremendous successful applications, ranging from simulating quantum chemistry32,33,34,35 to solving optimization problems30,31,36,37. By applying this approach, we do not require any prior-knowledge of how the optimal controls are related to the encoding dynamics, as they are automatically learned in the experiments without any design. These searched controls and the encoding dynamics are then coupled together to deliver an optimal metrology procedure. The computationally resource-consuming and experimentally intractable parts of the GRAPE algorithm, namely the gradient of the performance function, are efficiently and conveniently measured by applying some single-qubit rotations to the system. Furthermore, as this HQC approach is combined with GRAPE to deliver a closed-loop learning38 procedure, it has inherent features of defending against certain kinds of unitary noise for improving the metrology precision.

We also presented a demonstrative experiment of finding optimal probes for estimating the frequency by hqc-GRAPE on a two-qubit NMR processor. The experimental results verify the success of hqc-GRAPE in learning optimal controls for improving the metrology precision. The outline of this study is described as follows. Firstly, we introduce the details of hqc-GRAPE for quantum metrology in “Framework” section. The experimental procedure is presented in “Experiment” section. Finally, we provide some conclusions and discussions in “Discussion” section.

Results

Framework

Consider a typical quantum metrology task of estimating an interested parameter \(\Omega \) which is encoded in a general form of Hamiltonian \({\mathcal {H}}_0(\Omega )\) (with couplings between system qubits). Conventional quantum metrology schemes then proceed to design optimal probe state and the corresponding optimal measurements to gain the best metrology precision. In particular, the metrology can be thought of as two distinct tasks: (1) Find a classical procedure that enables us to engineer the probe state whose quantum Fisher information is sufficiently optimal. (2) Application of the encoding process to an optimal probe (synthesized using the above procedure), then estimate the interested parameter with suitable measurements. Here, we mainly focus on the first task. In practice, inevitable noise and the complexity of synthesizing the probes will prevent us from realizing the best precision. As stated in the introduction part, additional controls can be applied to address these problems and improve the precision that can be reached.

Figure 1
figure1

Schematic diagram of hybrid quantum-classical approach assisted GRAPE (hqc-GRAPE) for quantum metrology. From easily prepared state \(\rho _0\), initial controls \(\mathbf {u}^0\) is imported into the encoding process, resulting in \(\varepsilon _{\Omega }(T)\) over an encoding time T. The resultant state \(\rho _{\Omega }(T)\) is then measured to obtain the quantum Fisher information \(F_Q^l(\mathbf {u}^l)\) and its gradient \( \nabla F_Q^l(\mathbf {u}^l)\) in l-th iteration. Afterwards, a suitable stepsize \(\lambda _l\) is determined to generate new controls by \({\mathbf{{u}}^{l + 1}} = {\mathbf{{u}}^l} + {\lambda ^l}\nabla F_Q^l({\mathbf {u}^l})\), which are imported into the encoding process for the next iteration \(l+1\). This procedure is looped until the stopping criterion is met. Here, the quantum sensor is combined with the classical computer to deliver a practical hybrid approach for quantum metrology.

Here, we implement adjustable controls to alter the encoding dynamics, thus the total Hamiltonian can be expressed as

$$\begin{aligned} {\mathcal {H}}={\mathcal {H}}_0(\Omega )+\sum _{k=1}^K u_k(t){\mathcal {H}}_k, \end{aligned}$$
(1)

where \(u_k(t) (t\in (0,T))\) represents the amplitude of the k-th control field. Note that \({\mathcal {H}}_0(\Omega )\) contains the interactions between qubits, thus the above total Hamiltonian captures a general form for the metrology application. Without loss of generality, we assume the k-th control Hamiltonian can be formulated as \({\mathcal {H}}_k=\sigma _{\alpha }^k\) with \(\sigma _{\alpha }^k~(\alpha =x,y,z)\) being the Pauli matrix, i.e., the controls are at most three directions for each qubit, which is a standard form in many quantum systems39,40,41. To optimize these controls by hqc-GRAPE, we divide the total evolution time T into M equal segments, and the controls in each segment of duration \(\Delta t=T/M\) are approximately treated as constants. Thus, in the m-th segment, the sliced evolution operator can be depicted by

$$\begin{aligned} \varepsilon _{\Omega }^m=\text {exp}\left\{ -i \Delta t \left[ {\mathcal {H}}_0(\Omega )+\sum _{k=1}^K u_k[m]{\mathcal {H}}_k \right] \right\} , \end{aligned}$$
(2)

this will lead to the total evolution operator \(\varepsilon _{\Omega }(T)=\prod _{m=1}^M \varepsilon _{\Omega }^m\).

The metrology process using hqc-GRAPE begins with some easily prepared pure probe state \(\rho _0\), which does not need to be optimal. This avoids the complex design and synthesis of the optimal probes, thus greatly easing the analytical efforts. The probe \(\rho _0\) is then engineered by the system evolution with some trial control fields \(\mathbf {{u}}=(u_k[m]),k=1,2,...,K;m=1,2,...,M\), leading to the final system state \(\rho _{\Omega }(T) =\varepsilon _{\Omega }(T) \rho _0 \varepsilon _{\Omega }(T)^{\dag }\). Performing the corresponding optimal measurements will induce the best metrology precision that can be reached in this situation. Here, to quantify the performance of estimating the interested parameter x, we can use the quantum Fisher information (\(F_Q\) for short) as a performance function42,43, namely

$$\begin{aligned} F_Q(\Omega ,\mathbf {u})=4T^2\left\{ \text {Tr}[\rho _{\Omega }(T) (\partial _{\Omega } {\mathcal {H}}_0)^2]-\text {Tr}[\rho _{\Omega }(T) \partial _{\Omega } {\mathcal {H}}_0]^2 \right\} . \end{aligned}$$
(3)

In order to achieve the possibly best precision with the given resources, we need to iteratively refresh the control fields to maximize the performance function \(F_Q\). In hqc-GRAPE, the control fields are updated by moving towards the gradient direction of the performance function with some appropriate distance. The explicit form of the gradient of \(F_Q\), i.e., \(\nabla F_Q=\mathbf {g} =(g_k[m])\) with \(g_k[m]={\partial F_Q}/{\partial {u_k[m]}}\), can be easily calculated as follows

$$\begin{aligned} g_k[m]= & {} 4T^2\left\{ \text {Tr} \left[ \frac{\partial \rho _{\Omega }(T)}{\partial {u_k[m]}} (\partial _{\Omega } {\mathcal {H}}_0)^2 \right] \right. \nonumber \\&\left. - 2 \text {Tr} \left[ \frac{\partial \rho _{\Omega }(T)}{\partial {u_k[m]}} \partial _{\Omega } {\mathcal {H}}_0 \right] \text {Tr} \left[ \rho _{\Omega }(T) \partial _{\Omega } {\mathcal {H}}_0 \right] \right\} , \end{aligned}$$
(4)

For brevity, we denote \(U_{m_1}^{m_2}=\varepsilon _{\Omega }^{m_2} \cdots \varepsilon _{\Omega }^{m_1+1} \varepsilon _{\Omega }^{m_1}\), then we get \({\partial \rho _{\Omega }(T)}/{\partial {u_k[m]}}=-i \Delta t U_{m+1}^M [\sigma _{\alpha }^k,U_1^m \rho _0 {U_1^{m}}\dag ] {U_{m+1}^{M}}^{\dag }\). The key idea of hqc-GRAPE is that we can compute this commutator by some local rotations30. It is achieved by using the relation which holds for any operator \(\rho \)

$$\begin{aligned} \left[ \sigma _{\alpha }^{k}, \rho \right] =i\left[ R_{\alpha }^{k} \left( \frac{\pi }{2}\right) \rho R_{\alpha }^{k}\left( \frac{\pi }{2}\right) ^{\dagger } -R_{\alpha }^{k}\left( -\frac{\pi }{2}\right) \rho R_{\alpha }^{k} \left( -\frac{\pi }{2}\right) ^{\dagger }\right] , \end{aligned}$$
(5)

where \(R_{\alpha }^k(\pm \pi /2)\) represents the \(\pm \pi /2\) rotations along \(\alpha \) axis. Thus, we can get

$$\begin{aligned} \frac{\partial \rho _{\Omega }(T)}{\partial {u_k[m]}} =\Delta t \left\{ U_{m+1}^{M} R_{\alpha }^{k}\left( \frac{\pi }{2}\right) U_{1}^{m} \rho _{0} \left[ U_{m+1}^{M} R_{\alpha }^{k}\left( \frac{\pi }{2}\right) U_{1}^{m} \right] ^{\dag } \right. \nonumber \\ \left. - U_{m+1}^{M} R_{\alpha }^{k}\left( -\frac{\pi }{2}\right) U_{1}^{m} \rho _{0} \left[ U_{m+1}^{M}R_{\alpha }^{k}\left( -\frac{\pi }{2}\right) U_{1}^{m}\right] ^{\dag } \right\} . \end{aligned}$$
(6)

In this way, by inserting local rotations, we can obtain the m-th gradient information similarly as presented in Eq. 3, i.e., directly measuring the \(F_Q\) of the final system state involving the inserted local rotations. Note that this transformation does not depend on how we measure the \(F_Q\). Thus, 2KM operations are needed to compute the gradient \(\mathbf {g}\) in each iteration.

Overall, one needs \(2KM+1\) measurements of the performance function in each iteration. In general, K scales polynomially with the increasing of qubits, as the control Hamiltonians \({\mathcal {H}}_k\) are single Pauli matrixes along at most three directions for each qubit. Typically, M increases polynomially with the growing of system size. Indeed, for most randomly selected Hamiltonian \({\mathcal {H}}\), the minimal number of the controls required to synthesize it will scale exponentially. However, near-term quantum metrology applications are likely concerned with what can be done with a polynomial number of gate operations. This corresponds to optimizing over the best possible probes that can be synthesized with a polynomial number of control slices – which is precisely the problem our protocol is ideally suited for. Thus, for the practicality of our protocol, the key issue becomes how to efficiently measure the performance function, i.e., \(F_Q\). Fortunately, there have emerged several scalable methods to estimate \(F_Q\) in experiment, where they have replaced \(F_Q\) with some easily accessible quantities, such as (1) purity loss44,45. \(F_Q\) is bounded by purity loss, which captures how fragile the purity of the resultant state with respect to stochastic noise on the encoding parameter and can be obtained by simulating a finite stochastic noise regardless of the system size. (2) multiple-quantum coherence (MQC)46. By appending reversion of the system dynamics, MQC can be efficiently accessed and used to calculate \(F_Q\) in an experiment. This procedure takes finite runs of experiments for Fourier transformation of the measured signal, thus does not need exponential resource. (3) Loschmidt echo47. This method is similar as method (2) but needs added controlled operations and an ancillary qubit. However, it carries a great advantage of readout from a single ancillary qubit. In real experiment, it is advisable to choose the suitable method in consideration of the experimental resource needed.

We proceed by briefly summarizing the algorithmic procedure of hqc-GRAPE (see schematic diagram in Fig. 1) for solving this metrology task:

Step 1: Randomly generate initial control field \(\mathbf {u}^0\), then apply it to some easily prepared probe state \(\rho _0\). The system state will evolve under this control together with the encoding dynamics governed by \({\mathcal {H}}_0\). Measure the performance function \(F_Q^0(\mathbf {u}^0)\) and the corresponding gradient \(\mathbf {g}^0=\nabla F_Q^0(\mathbf {u}^0)=(g_k^0[m]),k =1,2,...,K; m=1,2,...,M\).

Step 2: Set the iteration number as \(l=l+1\), calculate the updated controls by \(\mathbf {u}^{l+1}=\mathbf {u}^{l} +\lambda ^l \mathbf {g}^l\),where \(\lambda ^l\) is some appropriate stepsize along the gradient direction and \(\mathbf {g}^l=\nabla F_Q^l(\mathbf {u}^l)=(g_k^l[m])\). Measure the performance function \(F_Q^{l+1}\) and the gradient \(\mathbf {g}^{l+1}\) again.

Step 3: Check whether the measured performance function satisfies the stopping criterion, if not, go to Step 2.

In this closed-loop learning procedure, the resource-consuming parts, i.e., the computing of \(F_Q\) and its gradient \(\nabla F_Q\), are efficiently accomplished by the quantum system. The classical computer is used to determine the suitable stepsize for updating controls fields, to generate the pulses for single-qubit rotations, and to store the data in each iteration. The resources needed for the classical computer are then very moderate, even for very large quantum systems. Therefore, the cooperated scheme of quantum sensor and classical computer is very applicable for the near-term quantum metrology tasks with accessible resources.

Experiment

Setup and techniques

The proof-of-principle experiments were conducted using the \(^{13}\text {C}\)-labeled sample Chloroform on a Bruker Avance III 400 MHz spectrometer at room temperature. We mark the spins \(^{13}\text {C}\), \(^{1}\text {H}\) as 1 and 2, respectively. The internal Hamiltonian can be described as \({{\mathcal {H}}_{{\mathrm{int}} }} = \sum _{i = 1}^2 {\Omega ^i \sigma _z^i}/2 + \pi J\sigma _z^1 \sigma _z^2/2\), where \(\Omega ^i\) represents the offset of the i-th spin in the rotating frame and \(J=214.5~\)Hz is the scalar coupling strength between the two spins.

For brevity, we set \(\Omega ^1=\Omega ^2=\Omega \) and consider estimating the single parameter \(\Omega \) encoded in the following Hamiltonian \({\mathcal {H}}_0 (\Omega )=\Omega (\sigma _z^1 +\sigma _z^2)/2 + \pi J\sigma _z^1 \sigma _z^2/2\). Additional control fields are introduced along x and y directions of each spin, thus leading to \({\mathcal {H}}={\mathcal {H}}_0(\Omega ) +\sum ^{2}_{k=1}\left( u_{k,x}[m]\sigma _x^k+u_{k,y}[m] \sigma _y^k\right) \). For an encoding time T, the to-be-optimized control fields are sliced into M segments with \(\mathbf {u}=(u_{k,x}[m],u_{k,y}[m])\), where \(k=1,2;m=1,2,...,M\). In this simple case, we do not need to seek for advanced methods as mentioned above to estimate \(F_Q\). Specifically, the quantum Fisher information of the resultant state \(\rho _{\Omega }(T)\) corresponding to the controls \(\mathbf {u}\) can be explicitly written as \(F_Q(\mathbf {u})=T^2 \{\text {Tr}[\rho _{\Omega }(T)(\sigma _z^1 +\sigma _z^2)^2] - \text {Tr}[\rho _{\Omega }(T)(\sigma _z^1 +\sigma _z^2)]^2 \} \). Note that the trace operations only concern the diagonal elements, and the Pauli matrix \(\sigma _z^k\) is diagonal, thus only the diagonal elements of \(\rho _{\Omega }(T)\) matter. Direct derivation indicates that only two diagonal elements of \(\rho _{\Omega }(T)\) are needed to compute \(F_Q(\mathbf {u})\), which greatly reduces the experimental cost. Similarly, the gradient of \(F_Q(\mathbf {u})\) reduces to \(g_{k,\alpha }[m]=T^2 \{\text {Tr}[\rho ' (T)(\sigma _z^1+\sigma _z^2)^2] -2\text {Tr}[\rho '(T)(\sigma _z^1 +\sigma _z^2)] \text {Tr}[\rho _{\Omega }(T)(\sigma _z^1+\sigma _z^2)]\}\) with \(\rho '(T)={\partial \rho _{\Omega }(T)}/{\partial {u_{k, \alpha }[m]}}\) and \(\alpha =x,y\), where \(\rho '(T)\) is obtained by applying local rotations on the k-th spin during the m-th sliced controls.

Figure 2
figure2

Experimental results of GRAPE-exp and hqc-GRAPE, together with simulation results of GRAPE for quantum metrology. (a) shows the optimization process of GRAPE (green dashed line), GRAPE-exp (blue dash-dotted line) and hqc-GRAPE (red solid line). In each iteration, \(F_Q\) is measured five times to induce the statistical error bars. The subplot enlarges the detailed performance of these three approaches close to convergence (b) and (c) illustrate the amplitude of the density matrix of one typical optimal resultant state \(\rho _{\Omega }(T)\) obtained by GRAPE-exp and hqc-GRAPE, respectively. (d,e) plot the amplitude of the initial control fields (grey bars) and the final optimal control fields (pink bars) for GRAPE and hqc-GRAPE, respectively. The amplitude overlapping parts of the initial controls and the final controls are brown.

Experimental procedures and results

The detailed experimental procedure of hqc-GRAPE can be divided into the following five steps:

  1. (i)

    Preparation of initial state \(\rho _0\). We initialized the system at pseudo-pure (PPS) state by line-selective method48, i.e., \({\rho _{\mathrm{pps}}} =\frac{{1 - \varepsilon }}{{4}}{\mathbf {I}_{4}} + \varepsilon |00\rangle \langle 00|\), where \(\mathbf {I}_{4}\) represents the \(4 \times 4\) identity matrix and \(\varepsilon \approx {10^{ - 5}}\) is the thermal polarization of the two-qubit system. Notice that the identity matrix doesn’t produce observable effects, thus the initial PPS state effectively behaves like \(\rho _0^{th}=|00\rangle \langle 00|\). Full tomography49 verified that the prepared initial state \(\rho _0\) has a fidelity of 0.9986 compared with \(\rho _0^{th}\) by defining \(F(\rho _0^{th},\rho _0)=\text {Tr} (\rho _0^{th}\rho _0)/\sqrt{\text {Tr}[(\rho _0^{th})^2] \text {Tr}[(\rho _0)^2]}\).

  2. (ii)

    Generation of initial controls \(\mathbf {u^{0}}\). The initial control fields \(\mathbf {u}^0=(u_{k,x}^0[m],u_{k,y}^0[m])\) with \(k=1,2; m=1,2,...,M\) were randomly generated on classical computer and applied to the quantum simulator. During the optimization procedure, we set \(\Omega =2\pi \times 50~\)Hz, \(M=6\) and the encoding time \(T=9~\)ms.

  3. (iii)

    Measurement of \(F_Q^l(\mathbf {u}^l)\) and \(\mathbf {g}^l\). In the l-th iteration, we first measured the performance of the resultant state \(\rho _{\Omega }(T)\) corresponding to \(\mathbf {u}^l\), namely \(F_Q^l(\mathbf {u}^l)\). As stated above, only two diagonal elements of \(\rho _{\Omega }(T)\) are needed to compute its quantum Fisher information. In our NMR simulator, this was accomplished by applying two local \(\pi /2\) rotations along y axis on spin 1 and 2, respectively, and observing the corresponding spectra49. To obtain \(\mathbf {g}^l=(g_{k,x}^l[m],g_{k,y}^l[m])\), after the m-th sliced evolution operator, we inserted two groups of local rotations \(R_x^k(\pm \pi /2)\) and \(R_y^k(\pm \pi /2)\) sequentially and measured the resultant state \(\rho '(T)={\partial \rho _{\Omega }(T)}/{\partial {u_{k,\alpha }[m]}}, \alpha =x,y\) according to Eq. 4 and Eq. 6. Similarly, only diagonal elements of \(\rho '(T)\) are necessary to compute \(\mathbf {g}^l\).

  4. (iv)

    Generation of new controls \(\mathbf {u}^{l+1}\). The measured \(F_Q^l(\mathbf {u}^l)\) and \(\mathbf {g}^l\) were then fed back to the classical computer. A suitable stepsize \(\lambda ^l\) was decided to generate new controls by \(\mathbf {u}^{l+1}=\mathbf {u}^{l} +\lambda ^l \mathbf {g}^l\). Here, \(\lambda ^l\) was initially set as 5000 and gradually decreased by \(50\%\) if \(F_Q^l(\mathbf {u}^{l+1})\) was worse than \(F_Q^l(\mathbf {u}^{l})\).

  5. (v)

    Loop of the optimization procedure. The iteration number was set as \(l=l+1\) and the refreshed controls \(\mathbf {u}^{l+1}\) were applied to the NMR simulator again. We then jumped to step (iii) to loop the rest steps. This iterative procedure was stopped until the settled maximum iteration number 10 was hit.

Furthermore, in order to demonstrate the advantages of hqc-GRAPE in searching optimal protocol for quantum metrology in realistic experiments, we compared it with the conventional open-loop designs entirely running on classical computer, which we marked as GRAPE. This pure classical simulation iteratively calculates \(F_Q^l(\mathbf {u}^l)\) and \(\mathbf {g}^l\) according to the ideal Hamiltonian, which does not include the effects of the inevitable noises in real situation, thus deserves the above mentioned closed-loop optimization. We also directly applied the classically searched controls by GRAPE to the NMR quantum simulator to measure the corresponding \(F_Q\) in each iteration, which was denoted as GRAPE-exp. Specifically, we first prepare the system at its initial state \(\rho _0\) as described in the step (i). Next for each iteration l, we directly import the corresponding optimal controls searched by the open-loop GRAPE into the quantum simulator. Finally we measure its performance function as introduced in the step (iii).

The experimental results are shown in Fig. 2. Green dashed line in Fig. 2a shows the optimization process entirely running on classical computer by the GRAPE method. The searched optimal controls induce a final \(F_Q\) of 4.00, which saturates the theoretical bound7. Blue dash-dotted line demonstrates the measured \(F_Q\) through directly applying the controls searched by the open-loop GRAPE to the NMR simulator. The final optimal controls are tested 5 times to estimate the statistical error resulting in \(F_Q=3.8798 \pm 0.0006\) for GRAPE-exp. The deviation from the theoretical optimum attributes to various noise and errors existing in the control process. Red solid line then presents the optimization process of hqc-GRAPE, the final \(F_Q\) corresponding to the learned optimal controls is \(3.9102 \pm 0.0007\) over 5 tests. This indicates that in the metrology process, hqc-GRAPE method automatically corrected some forms of errors, thus reaching a higher \(F_Q\) than that of the open-loop designs. We also reconstructed the final optimal resultant state \(\rho _{\Omega }(T)\), as shown in Fig. 2b for GRAPE-exp, and Fig. 2c for hqc-GRAPE. Compared them with the theoretical optimal NOON state \(\rho _t=|\psi _t\rangle \langle \psi _t|\), \(|\psi _t \rangle =(|00\rangle +e^{i\phi }|11\rangle )/\sqrt{2}\)7, we obtained a fidelity of \(0.9954 \pm 0.0002\) for GRAPE-exp and \(0.9962 \pm 0.0001\) for hqc-GRAPE by defining \(F(\rho _t,\rho _{\Omega }(T)) =\text {Tr}(\rho _t\rho _{\Omega }(T))/\sqrt{\text {Tr}[(\rho _t)^2] \text {Tr}[(\rho _{\Omega }(T)^2]}\). This reveals that hqc-GRAPE can reach a state closer to the theoretical optimum than GRAPE-exp does. Moreover, we plot the initial controls (0-th iteration) and the final optimal controls (10-th iteration) searched by GRAPE and hqc-GRAPE in Fig. 2d,e, respectively. These two approaches started from the same initial controls, but terminated with slightly different control amplitudes, which leads to their distinct performances.

Figure 3
figure3

Error analysis for the optimal resultant state \(\rho _{\Omega }(T)\) and its \(F_Q\). (a) Amplitude of the density matrix \(\rho _{\Omega }(T)\) obtained by GRAPE. (b,c) Then illustrate the results when considering initial state imperfection and decoherence further, respectively. (d) Plots the final optimal \(F_Q\) of GRAPE-exp and hqc-GRAPE. Moreover, three main forms of errors in the control process are gradually accumulated to demonstrate the error compensation results of GRAPE-exp and hqc-GRAPE.

Analysis of the benefits of hqc-GRAPE

As demonstrated above, the final optimal controls searched by hqc-GRAPE induce a higher quantum Fisher information \(F_Q\) than GRAEP-exp did. The benefits come from the inherent features of closed-loop learning, which can automatically correct some specific unitary errors38. To explicitly understand how hqc-GRAPE improve the estimation precision, we now proceed to carefully analyze the existing errors in our experiments. In general, they can be divided into the following four types:

Initial state imperfection. It refers to the deviation of experimentally prepared initial state and the desired one. From the experimentally reconstructed initial state \(\rho _0\), we applied optimal controls searched by GRAPE, leading to the resultant state shown in Fig. 3b (the ideal resultant state is depicted in Fig. 3a). We then performed ideal measurements and got \(F_Q=3.9573\). This indicates that initial state imperfection yields an error of 0.0427 from the theoretical optimal value. Actually, as the prepared \(\rho _0\) is not a perfect pure state, the non-unitary parts under the controls and the encoding process will finally induce the errors on estimating \(F_Q\). In addition, the spectrum of the prepared initial state is directly treated as the reference signal for characterizing \(F_Q\). Thus, this kind of error will eventually cause non-unitary effects that can not be corrected in the closed-loop learning process.

Decoherence. Normally, the effects of decoherence in NMR simulator can be described by phase damping channel \(\varepsilon _{\mathrm{PD}}\) and generalized amplitude damping channel \(\varepsilon _{\mathrm{GAD}}\)50. In each sliced evolution process, phase damping error was involved by \(\rho \rightarrow \varepsilon _{\mathrm{PD}} ^2 \circ \varepsilon _{\mathrm{PD}}^1(\rho ) \), where \(\varepsilon _{\mathrm{PD}} ^i(\rho )=(1-p_i)\rho +p_i\sigma _z^i \rho \sigma _z^i\) with \(p_i=(1-e^{-\Delta t/T_2^i})/2, i=1,2\) being the qubit number, and \(T_2^1=0.3~\text {s}, T_2^2=3.3~\text {s}\). Similarly, generalized amplitude damping error was expressed as \(\rho \rightarrow \varepsilon _{\mathrm{GAD}} ^2 \circ \varepsilon _{\mathrm{GAD}}^1(\rho ) \) and calculated by \(\varepsilon _{\mathrm{GAD}}^i(\rho )=\sum _s E_s^i\rho E_s^{i\dag }\), where

$$\begin{aligned} E_0^i= & {} \sqrt{p}\left( \begin{array}{cc} 1 &{} 0 \\ 0 &{} \sqrt{1-\eta ^i} \end{array}\right) , E_1^i =\sqrt{1-p}\left( \begin{array}{cc} 0 &{} 0 \\ \sqrt{\eta ^i} &{} 0 \end{array}\right) , \\ E_2^i= & {} \sqrt{1-p}\left( \begin{array}{cc} \sqrt{1-\eta ^i} &{} 0 \\ 0 &{} 1 \end{array}\right) , E_3^i = \sqrt{p}\left( \begin{array}{cc} 0 &{} \sqrt{\eta ^i} \\ 0 &{} 0 \end{array}\right) , \end{aligned}$$

with \(\eta ^i=1-e^{-\Delta t/T_1^i}, p \approx 1/2\) and \(T_1^1=18.5~\text {s},T_1^2=9.9~\text {s}\). With perfect initial state, optimal pulses searched by GRAPE and ideal measurements, the decoherence then induces an error of 0.0370, as shown in Fig. 3c. It’s worth noting that the coherent controls may partially ease the decoherence24. However, the analysis above has taken the effects of the coherent controls into consideration, thus the remaining error can not be corrected.

Pulse error. To estimate the influence of pulse errors on \(F_Q\), we assume that the amplitude of the controls undergoes uniformly distributed stochastic fluctuation with at most 5% distortions. With perfect initial state and ideal measurements, we repeated the optimal controls with fluctuations 1000 times and got an error around 0.0038.

Measurement error. Measurement errors can be estimated from the stochastic fluctuations of NMR spectra. In our experiments, measurements are accomplished by observing the NMR spectra and fitting them with Lorentzian functions. A direct estimation of the measurement error of resultant state was at the level of \(10^{-4}\), which becomes \(10^{-6}\) when considering its \(F_Q\) using error propagation. Reasonably, this type of error can be ignored.

To conclude, initial state imperfection, decoherence and pulse error are three major errors in our experiments. However, as analyzed above, the initial state imperfection here will cause non-unitary effects and the error of decoherence here is the part that controls can not handle. That is to say, the employed coherent controls are not able to further deal with these two errors. Thus when we compensate the loss of these two errors on \(F_Q\), the performance of hqc-GRAPE is remarkably improved to 3.9899, which is near the optimal value, as shown in Fig. 3d. For the results of GRAPE-exp after error compensation, there is still a visible gap with respect to the optimal value, see Fig. 3d. These results indicate that hqc-GRAPE can intelligently correct pulse error and some other unknown unitary errors to improve the metrology precision.

Conclusion

For quantum metrology, additional controls are helpful for dealing with the challenges of external noise, complicated designs and manipulation of probes and encoding dynamics. Though this area has attracted much attention recently, practical schemes are still urgently in demand45. In this study, we proposed a hybrid quantum-classical approach assisted GRAPE to automatically engineer the encoding dynamics for searching optimal probes to improve the metrology precision. The quantum simulator, which can efficiently simulate the time-consuming part of the GRAPE algorithm, is combined with the classical computer to iteratively optimize the controls. In our scheme, there is no need to start from optimal probes, the controls can transform arbitrary pure initial probe to the best resultant state during the learning process without any prior designs. Furthermore, many specific unitary errors can be inherently corrected by this closed-loop learning procedure, which indeed improve the metrology precision. The accompanied experiments successfully verified the effectiveness and advantages of hqc-GRAPE.

The demonstrative experiments were implemented on a small-scale NMR quantum simulator, however, the proposed scheme is scalable and feasible for current NISQ51 systems. Cooperated with many efficient methods of estimating quantum Fisher information in experiments44,46,47, the proposed scheme is promising in realizing optimal quantum metrology with auto-design techniques for more complicated and large-sized applications.

Data availability

The datasets generated during and/or analysed during the current study are available from the corresponding author on reasonable request.

References

  1. 1.

    Giovannetti, V., Lloyd, S. & Maccone, L. Advances in quantum metrology. Nat. Photon. 5, 222–229 (2011).

    ADS  CAS  Article  Google Scholar 

  2. 2.

    Escher, B., de Matos Filho, R. & Davidovich, L. General framework for estimating the ultimate precision limit in noisy quantum-enhanced metrology. Nat. Phys. 7, 406 (2011).

    CAS  Article  Google Scholar 

  3. 3.

    Escher, B., de Matos Filho, R. & Davidovich, L. Quantum metrology for noisy systems. Braz. J. Phys. 41, 229–247 (2011).

    ADS  Article  Google Scholar 

  4. 4.

    Yuan, H. & Fung, C.-H.F. Quantum parameter estimation with general dynamics. NPJ Quantum Inf. 3, 14 (2017).

    ADS  Article  Google Scholar 

  5. 5.

    Giovannetti, V., Lloyd, S. & Maccone, L. Quantum metrology. Phys. Rev. Lett. 96, 010401 (2006).

    ADS  MathSciNet  PubMed  Article  CAS  PubMed Central  Google Scholar 

  6. 6.

    Tóth, G. & Apellaniz, I. Quantum metrology from a quantum information science perspective. J. Phys. A Math. Theor. 47, 424006 (2014).

    ADS  MathSciNet  MATH  Article  Google Scholar 

  7. 7.

    Pezzè, L., Smerzi, A., Oberthaler, M. K., Schmied, R. & Treutlein, P. Quantum metrology with nonclassical states of atomic ensembles. Rev. Mod. Phys. 90, 035005 (2018).

    ADS  MathSciNet  Article  Google Scholar 

  8. 8.

    Chin, A. W., Huelga, S. F. & Plenio, M. B. Quantum metrology in non-markovian environments. Phys. Rev. Lett. 109, 233601 (2012).

    ADS  PubMed  Article  CAS  PubMed Central  Google Scholar 

  9. 9.

    Demkowicz-Dobrzański, R., Kołodyński, J. & Guţă, M. The elusive heisenberg limit in quantum-enhanced metrology. Nat. Commun. 3, 1063 (2012).

    ADS  PubMed  PubMed Central  Article  CAS  Google Scholar 

  10. 10.

    Demkowicz-Dobrzański, R. & Maccone, L. Using entanglement against noise in quantum metrology. Phys. Rev. Lett. 113, 250801 (2014).

    ADS  PubMed  Article  CAS  PubMed Central  Google Scholar 

  11. 11.

    Pan, J.-W. et al. Multiphoton entanglement and interferometry. Rev. Mod. Phys. 84, 777 (2012).

    ADS  Article  Google Scholar 

  12. 12.

    Jones, J. A. et al. Magnetic field sensing beyond the standard quantum limit using 10-spin noon states. Science 324, 1166–1168 (2009).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  13. 13.

    Simmons, S., Jones, J. A., Karlen, S. D., Ardavan, A. & Morton, J. J. L. Magnetic field sensors using 13-spin cat states. Phys. Rev. A 82, 022330 (2010).

    ADS  Article  CAS  Google Scholar 

  14. 14.

    Mitchell, M. W., Lundeen, J. S. & Steinberg, A. M. Super-resolving phase measurements with a multiphoton entangled state. Nature 429, 161 (2004).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  15. 15.

    Resch, K. J. et al. Time-reversal and super-resolving phase measurements. Phys. Rev. Lett. 98, 223601 (2007).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  16. 16.

    Joo, J., Munro, W. J. & Spiller, T. P. Quantum metrology with entangled coherent states. Phys. Rev. Lett. 107, 083601 (2011).

    ADS  PubMed  Article  CAS  PubMed Central  Google Scholar 

  17. 17.

    Boixo, S., Flammia, S. T., Caves, C. M. & Geremia, J. Generalized limits for single-parameter quantum estimation. Phys. Rev. Lett. 98, 090401 (2007).

    ADS  PubMed  Article  CAS  PubMed Central  Google Scholar 

  18. 18.

    Roy, S. M. & Braunstein, S. L. Exponentially enhanced quantum metrology. Phys. Rev. Lett. 100, 220501 (2008).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  19. 19.

    Napolitano, M. et al. Interaction-based quantum metrology showing scaling beyond the heisenberg limit. Nature 471, 486 (2011).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  20. 20.

    Hall, M. J. W. & Wiseman, H. M. Does nonlinear metrology offer improved resolution? answers from quantum information theory. Phys. Rev. X 2, 041006 (2012).

    Google Scholar 

  21. 21.

    Pang, S. & Jordan, A. N. Optimal adaptive control for quantum metrology with time-dependent hamiltonians. Nat. Commun. 8, 14695 (2017).

    ADS  PubMed  PubMed Central  Article  Google Scholar 

  22. 22.

    Tan, Q.-S., Huang, Y., Yin, X., Kuang, L.-M. & Wang, X. Enhancement of parameter-estimation precision in noisy systems by dynamical decoupling pulses. Phys. Rev. A 87, 032102 (2013).

    ADS  Article  CAS  Google Scholar 

  23. 23.

    Lang, J. E., Liu, R. B. & Monteiro, T. S. Dynamical-decoupling-based quantum sensing: floquet spectroscopy. Phys. Rev. X 5, 041016 (2015).

    Google Scholar 

  24. 24.

    Sekatski, P., Skotiniotis, M. & Dür, W. Dynamical decoupling leads to improved scaling in noisy quantum metrology. New J. Phys. 18, 073034 (2016).

    ADS  Article  Google Scholar 

  25. 25.

    Dür, W., Skotiniotis, M., Fröwis, F. & Kraus, B. Improved quantum metrology using quantum error correction. Phys. Rev. Lett. 112, 080801 (2014).

    ADS  Article  CAS  Google Scholar 

  26. 26.

    Kessler, E. M., Lovchinsky, I., Sushkov, A. O. & Lukin, M. D. Quantum error correction for metrology. Phys. Rev. Lett. 112, 150802 (2014).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  27. 27.

    Hou, Z. et al. Control-enhanced sequential scheme for general quantum parameter estimation at the heisenberg limit. Phys. Rev. Lett. 123, 040501 (2019).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  28. 28.

    Yuan, H. & Fung, C.-H.F. Optimal feedback scheme and universal time scaling for hamiltonian parameter estimation. Phys. Rev. Lett. 115, 110401 (2015).

    ADS  PubMed  Article  CAS  PubMed Central  Google Scholar 

  29. 29.

    Liu, J. & Yuan, H. Quantum parameter estimation with optimal control. Phys. Rev. A 96, 012117 (2017).

    ADS  Article  Google Scholar 

  30. 30.

    Li, J., Yang, X., Peng, X. & Sun, C.-P. Hybrid quantum-classical approach to quantum optimal control. Phys. Rev. Lett. 118, 150503 (2017).

    ADS  PubMed  Article  PubMed Central  Google Scholar 

  31. 31.

    Lu, D. et al. Enhancing quantum control by bootstrapping a quantum processor of 12 qubits. NPJ Quantum Inf. 3, 45 (2017).

    ADS  Article  Google Scholar 

  32. 32.

    Peruzzo, A. et al. A variational eigenvalue solver on a photonic quantum processor. Nat. Commun. 5, 4213 (2014).

    ADS  CAS  PubMed  PubMed Central  Article  Google Scholar 

  33. 33.

    Grimsley, H. R., Economou, S. E., Barnes, E. & Mayhall, N. J. An adaptive variational algorithm for exact molecular simulations on a quantum computer. Nat. Commun. 10, 1–9 (2019).

    CAS  Article  Google Scholar 

  34. 34.

    Wecker, D., Hastings, M. B. & Troyer, M. Progress towards practical quantum variational algorithms. Phys. Rev. A 92, 042303 (2015).

    ADS  Article  CAS  Google Scholar 

  35. 35.

    O’Malley, P. J. J. et al. Scalable quantum simulation of molecular energies. Phys. Rev. X 6, 031007 (2016).

    Google Scholar 

  36. 36.

    Bauer, B., Wecker, D., Millis, A. J., Hastings, M. B. & Troyer, M. Hybrid quantum-classical approach to correlated materials. Phys. Rev. X 6, 031045 (2016).

    Google Scholar 

  37. 37.

    Shao, C. Fast variational quantum algorithms for training neural networks and solving convex optimizations. Phys. Rev. A 99, 042325 (2019).

    ADS  MathSciNet  CAS  Article  Google Scholar 

  38. 38.

    Brif, C., Chakrabarti, R. & Rabitz, H. Control of quantum phenomena: past, present and future. New J. Phys. 12, 075008 (2010).

    ADS  MATH  Article  Google Scholar 

  39. 39.

    Vandersypen, L. M. K. & Chuang, I. L. Nmr techniques for quantum control and computation. Rev. Mod. Phys. 76, 1037–1069 (2005).

    ADS  Article  Google Scholar 

  40. 40.

    Makhlin, Y., Schön, G. & Shnirman, A. Quantum-state engineering with josephson-junction devices. Rev. Mod. Phys. 73, 357–400 (2001).

    ADS  MATH  Article  Google Scholar 

  41. 41.

    Leibfried, D., Blatt, R., Monroe, C. & Wineland, D. Quantum dynamics of single trapped ions. Rev. Mod. Phys. 75, 281–324 (2003).

    ADS  CAS  Article  Google Scholar 

  42. 42.

    Tóth, G. & Petz, D. Extremal properties of the variance and the quantum fisher information. Phys. Rev. A 87, 032324 (2013).

    ADS  Article  CAS  Google Scholar 

  43. 43.

    Altenburg, S., Oszmaniec, M., Wölk, S. & Gühne, O. Estimation of gradients in quantum metrology. Phys. Rev. A 96, 042319 (2017).

    ADS  Article  Google Scholar 

  44. 44.

    Modi, K., Céleri, L. C., Thompson, J. & Gu, M. Fragile states are better for quantum metrology. arXiv:1608.01443 (2016).

  45. 45.

    Yang, X. et al. Probe optimization for quantum metrology via closed-loop learning control. NPJ Quantum Inf. 6, 1–7 (2020).

    CAS  Article  Google Scholar 

  46. 46.

    Gärttner, M., Hauke, P. & Rey, A. M. Relating out-of-time-order correlations to entanglement via multiple-quantum coherences. Phys. Rev. Lett. 120, 040402 (2018).

    ADS  MathSciNet  PubMed  Article  PubMed Central  Google Scholar 

  47. 47.

    Macrì, T., Smerzi, A. & Pezzè, L. Loschmidt echo for quantum metrology. Phys. Rev. A 94, 010102 (2016).

    ADS  Article  CAS  Google Scholar 

  48. 48.

    Peng, X. et al. Preparation of pseudo-pure states by line-selective pulses in nuclear magnetic resonance. Chem. Phys. Lett. 340, 509–516 (2001).

    ADS  CAS  Article  Google Scholar 

  49. 49.

    Lee, J.-S. The quantum state tomography on an nmr system. Phys. Lett. A 305, 349–353 (2002).

    ADS  CAS  MATH  Article  Google Scholar 

  50. 50.

    Vandersypen, L. M. et al. Experimental realization of shor’s quantum factoring algorithm using nuclear magnetic resonance. Nature 414, 883–887 (2001).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  51. 51.

    Preskill, J. Quantum computing in the nisq era and beyond. Quantum 2, 79 (2018).

    Article  Google Scholar 

Download references

Acknowledgements

J.L. is supported by the National Natural Science Foundation of China (Grant No. 11975117), and Guangdong Provincial Key Laboratory (Grant No. 2019B121203002). X.P. is supported by National Key Research and Development Program of China (Grant No. 2018YFA0306600), the National Science Fund for Distinguished Young Scholars (Grant No. 11425523), Projects of International Cooperation and Exchanges NSFC (Grant No. 11661161018), and Anhui Initiative in Quantum Information Technologies (Grant No. AHY050000).

Author information

Affiliations

Authors

Contributions

X.Y. proposed this project and wrote the manuscript; X.C. and X.Y. performed the experiments and analyzed the data; J.L. and R.L. helped with discussions and revised the manuscript; X.P. supervised the whole project.

Corresponding authors

Correspondence to Jun Li or Xinhua Peng.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Publisher's note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

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 licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence 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 licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Yang, X., Chen, X., Li, J. et al. Hybrid quantum-classical approach to enhanced quantum metrology. Sci Rep 11, 672 (2021). https://doi.org/10.1038/s41598-020-80070-1

Download citation

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.

Search

Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing