Optimal adaptive control for quantum metrology with time-dependent Hamiltonians

Shengshi Pang1,2∗ and Andrew N. Jordan1,2,3 1Department of Physics and Astronomy, University of Rochester, Rochester, New York 14627, USA 2Center for and , University of Rochester, Rochester, New York 14627, USA and 3Institute for Quantum Studies, Chapman University, 1 University Drive, Orange, CA 92866, USA

Quantum metrology has been studied for a wide range of systems with time-independent Hamilto- nians. For systems with time-dependent Hamiltonians, however, due to the complexity of dynamics, little has been known about quantum metrology. Here we investigate quantum metrology with time- dependent Hamiltonians to bridge this gap. We obtain the optimal quantum Fisher information for parameters in time-dependent Hamiltonians, and show proper Hamiltonian control is necessary to optimize the Fisher information. We derive the optimal Hamiltonian control, which is generally adaptive, and the measurement scheme to attain the optimal Fisher information. In a minimal ex- ample of a qubit in a rotating magnetic field, we find a surprising result that the fundamental limit of T 2 time scaling of quantum Fisher information can be broken with time-dependent Hamiltonians, which reaches T 4 in estimating the rotation frequency of the field. We conclude by considering level crossings in the derivatives of the Hamiltonians, and point out additional control is necessary for that case.

Precision measurement has been long pursued due to particularly in the time scaling of the Fisher information its vital importance in physics and other sciences. Quan- [46], and often requires quantum control to gain the high- tum mechanics supplies this task with two new elements. est sensitivity [52]. On one hand, imposes a fundamen- While there has been tremendous research devoted to tal limitation on the precision of measurements, apart quantum metrology, most of those works were focused from any external noise, the [1], which on time-independent Hamiltonians, and little has been is rooted in the stochastic nature of quantum measure- known when the Hamiltonians are varying with time. ment and manifested by the Heisenberg uncertainty prin- (The most relevant work so far to our knowledge in- ciple. On the other hand, quantum mechanics also opens cludes Ref. [53] which uses basis splines to approxi- new possibilities for improving measurement sensitivities mate a time-dependent Hamiltonian of a qubit, and Ref. by utilizing non-classical resources, such as quantum en- [54] which studies the quantum Cramér-Rao bound for a tanglement and squeezing [2]. These have given rise to time-varying signal, etc.) Nevertheless, in reality, many the wide interest in quantum parameter estimation [3,4] factors that influence the systems are changing with and quantum metrology [5,6]. Since its birth, quan- time, e.g., periodic driving fields or fluctuating external tum metrology has been applied in many areas, ranging noise. In the state-of-the-art field of quantum engineer- from detection [7–9], quantum clocks ing, fast varying quantum controls are often involved to [10, 11], [12–14], to optomechanics [15], improve operation fidelity and efficiency. Therefore, the [16], etc. Various quantum correlations current knowledge about quantum metrology with static have been shown useful for enhancing measurement sen- Hamiltonians significantly limits application of quantum sitivities, including squeezed states [17–22], N00N metrology in broader areas, and the capability of treat- states [23–27], etc. Nonlinear interactions have been ex- ing time-dependent Hamiltonians is intrinsically neces- ploited to break the Heisenberg limit even without en- sary for allowing the applicability of quantum metrology tanglement [28–35]. For practical applications where dis- in more complex situations. turbance from the environment is inevitable, quantum In this article, we study quantum metrology with metrology in open systems has been studied [36–40], and time-dependent Hamiltonians to bridge this gap. We

arXiv:1606.02166v3 [quant-ph] 8 Mar 2017 schemes for protecting quan- obtain the maximum quantum Fisher information for tum metrology against noise have been proposed [41–45]. parameters in time-dependent Hamiltonians in general, While most previous research on quantum metrology and show that it is attainable only with proper con- was focused on multiplicative parameters of Hamiltoni- trol on the Hamiltonians generally. The optimal Hamil- ans, growing attention has recently been drawn to more tonian control and the measurement scheme to achieve general parameters of Hamiltonians [46] or physical dy- the maximum Fisher information are derived. Based on namics [47, 48], such as those of magnetic fields [46, 49– the general results obtained, we surprisingly find that 51]. Interestingly, in contrast to estimation of multiplica- some fundamental limits in quantum metrology with tive parameters, estimation of general Hamiltonian pa- time-independent Hamiltonians can be broken with time- rameters exhibits distinct characteristics in some aspects, dependent Hamiltonians. In a minimal example of a qubit in a rotating magnetic field, we show that the time-scaling of Fisher information for the rotation fre- ∗ Correspondence and requests for materials should be addressed quency of the field can reach T 4 in the presence of the to Shengshi Pang (email: [email protected]). optimal Hamiltonian control, significantly exceeding the 2 traditional limit T 2 with time-independent Hamiltoni- ans. This suggests substantial differences between quan- �� tum metrology with time-varying Hamiltonians and with static Hamiltonians. Finally, we consider level crossings �� in the derivatives of Hamiltonians with respect to the es- �� ො�

timated parameters, and show that additional Hamilto- Measurement Data Processing Data nian control is generally necessary to maximize the Fisher Preparation State information in that case. �� Figure 1. General procedures of quantum metrology. RESULTS Quantum metrology can generally be decomposed to four steps: preparation of the initial states of the quantum sys- Quantum parameter estimation. Parameter es- tems, parameter-dependent evolution (Ug in the figure) of the timation is an important task in vast areas of sciences, systems, measurements on the final states of the systems, and which is to extract the parameter of interest from a dis- post-processing of the measurement data to extract the pa- tribution of data. The core goal of parameter estimation rameter. Each node at the left side of the figure represents one quantum system (which can be very general and con- is to increase the estimation precision. The estimation sist of subsystems). Usually multiple systems are exploited precision is determined by how well the parameter can to undergo such a process, and they can be entangled at the be distinguished from a value in the vicinity, which can preparation step to increase the estimation precision beyond usually be characterized by the statistical distance be- the standard quantum limit, which is the advantage of quan- tween the distributions with neighboring parameters [55]. tum metrology. The well-known Cramér-Rao bound [56] shows the uni- versal limit of precision for arbitrary estimation strate- gies, which indicates that for a parameter g in a prob- in that state controls the probability distribution of the ability distribution pg(X) of some random variable X, measurement results, and the information about the pa- h 2i the mean squared deviation hδ2gˆi ≡ E gˆ − g is rameter can be extracted from the measurement results. |∂g E[ˆg]| As there are many different possible measurements on the bounded by same , the Fisher information needs to be 1 maximized over all possible measurements so as to prop- hδ2gˆi ≥ + hδgˆi2, (1) erly quantify the distinguishability of the quantum state νIg with the parameter of interest. It is shown by [59, 60] that the maximum Fisher information for a parameter where ν is the amount of data, Ig is the Fisher informa- tion [57], g in a quantum state |ψgi over all possible generalized quantum measurements is Z 2 (Q) 2 Ig = pg(X)(∂g ln pg(X)) dX, (2) Ig = 4 h∂gψg|∂gψgi − |hψg|∂gψgi| . (3) and hδgˆi is the mean systematic error. For an unbiased This is called quantum Fisher information, and is closely 2 estimation strategy, hδgˆi = 0. The Cramér-Rao bound related to the Bures distance ds = 2(1 − |hψg|ψg+dgi|) 2 1 (Q) 2 can generally be achieved with the maximum likelihood [61] through ds = 4 Ig dg between two adjacent states estimation strategy when the number of trials is suffi- |ψgi and |ψg+dgi, which characterizes the distinguishabil- ciently large [57]. In practice, however, due to the finite- ity between |ψgi and |ψg+dgi. ness of resource, only a limited number of trials are avail- In quantum metrology, the parameters to estimate are able usually. For such situations, the Cramér-Rao bound usually in Hamiltonians, or more generally, in physical may become loose, and new families of error measures dynamics. The parameters are encoded into quantum have been proposed to give tighter bounds, for example states by letting some quantum systems evolve under Ref. [58]. In this paper, we pursue the ultimate precision the Hamiltonians or physical dynamics of interest. The limit of quantum metrology with time-dependent Hamil- states of the systems acquire the information about the tonians allowed by quantum mechanics, regardless of any parameters from the evolution. The parameters can then practical imperfections like the finiteness of resources or be learned from measurements on the final states of the external noise, so the Cramér-Rao bound is the proper systems with appropriate processing of the measurement measure for the estimation precision. data. A general process of quantum metrology is depicted In the quantum regime of parameter estimation, we are in Fig.1. interested in estimating parameters in quantum states. A simple and widely-studied example of quantum The essence of estimating a parameter in a quantum state metrology is to estimate a multiplicative parameter in is distinguishing the quantum state with the parameter of a Hamiltonian, say, to estimate g in Hg = gH0 [62], interest from that state with a slightly deviated parame- where H0 is time-independent. In this case, if a quan- ter. When the quantum state is measured, the parameter tum systems undergoes the unitary evolution Ug = 3 exp(−igH0T ) for some time T , the quantum Fisher in- is different from the one in [46, 60] and can no longer be formation (3) that determines the estimation precision interpreted as the local generator of parametric transla- 2 of g is Ig = 4T Var[H0]|ψg i, where Var[·] represents vari- tion of Ug(0 → T ) with respect to g. But the maximum (Q) ance and |ψgi is the final state of the system. A more of the Fisher information Ig is still the squared gap be- general case concerns a general parameter in a Hamilto- tween the maximum and minimum eigenvalues of hg(T ), nian [46]. The quantum Fisher information for a general as in the case of static Hamiltonians [62]. Therefore, the parameter g in a Hamiltonian Hg is 4Var[hg(T )]|ψg i, and key to determining the optimal estimation precision for † hg = i(∂gUg)Ug is the local generator of the parametric the parameter g is finding hg(T ) and its maximum and translation of Ug = exp(−iHgT ) with respect to g [60]. minimum eigenvalues. Compared to classical precision measurements, the ad- Usually the evolution under a time-dependent Hamil- vantage of quantum metrology is that non-classical cor- tonian Hg(t) is represented by the time-ordered expo- relations can significantly enhance measurement sensi- nential of Hg(t), but it is complex and not convenient for tivities. Various kinds of non-classical correlations have our problem. Here we take an alternative approach that been found useful for improving measurement precision, breaks the unitary evolution Ug(0 → T ) into products as reviewed in the introduction. With N properly corre- of small time intervals ∆t and takes the limit ∆t → 0. lated systems, the quantum Fisher information can beat Interestingly, it turns out that with this approach, the the standard quantum limit and attain the Heisenberg maximum Fisher information (and the optimal quantum scaling N 2 by appropriate metrological schemes [5]. control) can be obtained without knowing the exact so- Time-dependent quantum metrology. We now lution to Ug(0 → T )! We show in Supplementary Note1 turn to the main topic of this work, quantum metrology that such an approach leads to with time-dependent Hamiltonians. Our goal is to find Z T the maximum Fisher information for parameters in time- † hg(T ) = Ug (0 → t)∂gHg(t)Ug(0 → t)dt. (6) dependent Hamiltonians. 0 The starting point of quantum metrology with a time-dependent Hamiltonian is similar as with a time- Obviously, it still includes the unitary evolution Ug(0 → independent Hamiltonian above. A system is initialized t) which is unknown. However, it has the advantage that in some state |ψ0i and evolves under the time-dependent it is an integral over the time t, which makes it possi- Hamiltonian Hg(t) with g as the parameter to estimate, ble to decompose the global optimization of the eigenval- then after an evolution for some time T , one measures ues of hg(T ) into local optimizations at each time point the final state of the system t. The idea is that, as is known, the maximum eigen- value of an Hermitian operator must be its largest ex- |ψg(T )i = Ug(0 → T )|ψ0i, (4) pectation value over all normalized states, so the max- imum eigenvalue of h (T ) is the maximum time inte- where Ug(0 → T ) is the unitary evolution under the g gral of hψ |U †(0 → t)∂ H (t)U (0 → t)|ψ i from 0 to Hamiltonian Hg(t) for time T , and estimates g from the 0 g g g g 0 measurement results, which is just the standard recipe for T over all |ψ0i. Considering Ug(0 → T ) is unitary, a general quantum metrology. And the quantum Fisher Ug(0 → t)|ψ0i is also a normalized state, so the upper bound of hψ |U †(0 → t)∂ H (t)U (0 → t)|ψ i must be information of estimating g from measuring |ψg(T )i is 0 g g g g 0 still determined by Eq. (3), which can be written as the maximum eigenvalue of ∂gHg(t) at time t, which can (Q) be denoted as µ (t). From this, it can be immediately I = 4Var[h (T )] , where h (T ) = i[∂ U (0 → max g g |ψg (T )i g g g inferred that the maximum eigenvalue of h (T ) is up- T )]U †(0 → T ). g g per bounded by R T µ (t)dt. Similarly, the minimum Everything is similar as before so far, but we can imme- 0 max R T diately see two major obstacles to deriving the maximum eigenvalue of hg(T ) is lower bounded by 0 µmin(t)dt. Fisher information. One is that due to the complexity With these two bounds for the maximum and minimum of evolution under a time-dependent Hamiltonian, the eigenvalues of hg(T ) respectively, we finally arrive at the (Q) unitary evolution Ug(0 → T ) is generally difficult to ob- upper bound of the quantum Fisher information Ig , tain. The other is that even if we can find a solution Z T 2 to Ug(0 → T ), it is hard to maximize the Fisher infor- (Q) h i mation, since h (T ) can be quite complex and the opti- Ig ≤ (µmax(t) − µmin(t))dt . (7) g 0 mization is global involving the whole evolution history of the system for time T . In order to derive the maximum It shows that the upper bound of the quantum Fisher (Q) Fisher information for time-dependent Hamiltonians, we information Ig is determined by the integral of the need to overcome these obstacles. gap between the maximum and minimum eigenvalues For the purpose of convenience, we first reformulate of ∂gHg(t) from time 0 to T . It can straightforwardly the quantum Fisher information as recover the quantum Fisher information for a time- (Q) independent Hamiltonian Hg by identifying µmax(t) at Ig = 4Var[hg(T )]|ψ0i, (5) all times t and identifying µmin(t) at all times t, respec- which is dependent on the initial state |ψ0i of the system tively. And when Hg = gH0, the maximum Fisher in- † 2 2 now, and hg(T ) becomes iUg (0 → T )∂gUg(0 → T ), which formation is just T ∆ , where ∆ is the gap between the 4 maximum and minimum eigenvalues of H0, the same as Htot(t) can be generalized to include an additional term the result in [62]. P ˙ ˙ k θk(t)|ψk(t)ihψk(t)|. θk(t) can be replaced by arbi- R t 0 0 Optimal Hamiltonian control. A question that trary real functions fk(t), and θk(t) = 0 fk(t )dt . Thus, naturally arises from the above result is whether the the optimal control Hamiltonian Hc(t) finally turns out (Q) upper bound of quantum Fisher information Ig (7) to be is achievable. From the above derivation of the upper (Q) bound of Ig , it is obvious that the upper bound cannot X H (t) = f (t)|ψ (t)ihψ (t)| − H (t) be saturated generally, unless there exists initial states c k k k g |ψ i and |ψ i of the system such that U (0 → t)|ψ i k 0 1 g 0 X (8) and Ug(0 → t)|ψ1i are the instantaneous eigenstates of + i |∂tψk(t)ihψk(t)|. ∂gHg(t) with the maximum and minimum eigenvalues, k respectively, at any time t. This imposes two condi- tions: (i) there exist |ψ0i and |ψ1i which are the eigen- It will be seen in the examples below that proper choices states of ∂gHg(t) with the maximum and minimum eigen- of the functions fk(t) can significantly simplify the con- values at the initial time t = 0; (ii) Ug(0 → t)|ψ0i trol Hamiltonian Hc(t) in some cases. and Ug(0 → t)|ψ1i should remain as the eigenstates of ∂gHg(t) with the maximum and minimum eigenvalues The role of this control Hamiltonian is to steer the for all t under the evolution of Hg(t). The first condition eigenstates of ∂gHg(t) evolving along the “tracks” of is easy to satisfy, but the second one is difficult, since the the eigenstates of ∂gHg(t) under the total Hamiltonian, time change of an instantaneous eigenstate of ∂gHg(t) is which is the path to gain the most information about g, generally different from the evolution under the Hamilto- instead of being deviated off the “tracks” by the origi- nian Hg(t) when Hg(t) does not commute with ∂gHg(t) nal Hamiltonian Hg(t). This is critical to the saturation or Hg(t) does not commute between different time points. of the upper bound of Fisher information. A schematic This condition is the main obstacle to the saturation of sketch for the role of the optimal control Hamiltonian the upper bound of Fisher information (7). Hc(t) is plotted in Fig.2. It is worth mentioning that However, it inspires us to think that if we can add some similar ideas have been pursued in other works [63–66] to control Hamiltonian, which is independent of the param- steer the states of quantum systems along certain paths, eter g, to the original Hamiltonian, so that the state evo- such as the instantaneous eigenstates of Hamiltonians, lution under the total Hamiltonian is the same as the with proper control fields. time change of the instantaneous eigenstates of ∂gHg(t), It can be straightforwardly verified that with the above then a state starting from the eigenstate of ∂gHg(0) with control Hamiltonian, the eigenstates |ψ (0)i of ∂ H (t) the maximum or minimum eigenvalue will always stay in k g g at t = 0 are the eigenstates of hg(t) for any time t, and the that eigenstate of ∂gHg(t) at any time t. And the upper R T (Q) corresponding eigenvalues are 0 µk(t)dt, where µk(t) is bound of quantum Fisher information Ig can then be the k-th eigenvalue of ∂gHg(t) at time t. Therefore, Hc(t) achieved by preparing the system in an equal superpo- indeed gives the demanded control on the Hamiltonian to sition of the eigenstates of ∂gHg(t) with the maximum reach the upper and lower bounds of the eigenvalues of and minimum eigenvalues at the initial time t = 0. So hg(T ), and the upper bound of the quantum Fisher infor- the key is finding such a control Hamiltonian. (Q) mation Ig (7) can then be achieved by simply preparing A convenient way to realize the above target is to let the system in an equal superposition of the eigenstates of each eigenstate of ∂ H (t) stay in the same eigenstate g g ∂gHg(t) with the maximum and minimum eigenvalues at of ∂gHg(t) at all times t when evolving under the to- the initial time t = 0 and making proper measurements tal Hamiltonian. (Actually ∂gHg(t) should be replaced on the system after an evolution of time T . The optimal by the derivative of total Hamiltonian now, but they measurement that gains the maximum Fisher informa- are the same because the control Hamiltonian must be tion is generally a projective measurement along the ba- independent of g.) It implies that the k-th eigenstate 1 −iθmax(T ) −iθmin(T ) sis |±i = √ (e |ψmax(T )i ± e |ψmin(T )i), |ψ (t)i of ∂ H (t) should satisfy the Schrödinger equa- 2 k g g where |ψ (T )i and |ψ (T )i are the eigenstates of tion H (t)|ψ (t)i = i∂ |ψ (t)i, where H (t) denotes max min tot k t k tot ∂ H (t) with the maximum and minimum eigenvalues the total Hamiltonian. Unlike the usual situations where g g at time t = T , and θ (T ) and θ (T ) are the addi- we know the Hamiltonian and want to find the solution to max min tional phases of |ψ (T )i and |ψ (T )i depending on the state, here we know the solution to the state, |ψ (t)i, max min k the choice of f (t) in the optimal control Hamiltonian (8). and need to find the appropriate Hamiltonian H (t) k tot The details of the measurement scheme are discussed in that directs the evolution instead. A simple solution to P Supplementary Note2. this equation is Htot(t) = i |∂tψk(t)ihψk(t)|. (Note k P this solution is Hermitian because k |∂tψk(t)ihψk(t)| is It is worth noting that the optimal control Hamiltonian skew-Hermitian.) Considering every eigenstate |ψk(t)i (8) involves the estimated parameter g. However, g is satisfies the U(1) symmetry, i.e., multiplying |ψk(t)i by unknown, so it should be replaced with a known estimate −iθ (t) an arbitrary phase e k does not change that state, of g, say gc, in practice, and the control Hamiltonian 5

R T sentially to distinguish between T exp[−i 0 Hg(t)dt]|ψ0i R T and T exp[−i 0 Hg+δg(t)dt]|ψ0i, where |ψ0i is the ini- tial state of the system. When a control Hamiltonian Hc(t, gc) is applied (where gc is explicitly denoted), the R T two states become T exp[−i 0 (Hg(t) + Hc(t, gc))dt]|ψ0i R T and T exp[−i 0 (Hg+δg(t) + Hc(t, gc))dt]|ψ0i. One can see that when g has a virtual shift δg in the original Hamiltonian, gc is unchanged in the control Hamiltonian. The parameter gc in the control Hamiltonian is always a constant (even when it is equal to the real value of g), while the parameter g in the original Hamiltonian is a variable. This is how the control Hamiltonian is inde- �� � �� � + Δ� pendent of g. The appearance of g in the optimal control Hamiltonian (8) just indicates what gc maximizes the Fisher information, and it turns out to be the real value of g. As a simple verification of the above results, we show Figure 2. Optimal Hamiltonian control scheme. To how the current results can recover the known ones in achieve the maximum Fisher information, the optimal control quantum metrology with time-independent Hamiltoni- Hamiltonian needs to keep the eigenstates of ∂ H (t) evolv- g g ans. Consider estimating a multiplicative parameter g ing along the tracks of the eigenstates of ∂gHg(t) under the total Hamiltonian. The evolution under the total Hamilto- in a time-independent Hamiltonian Hg = gH0, which is nian Hg(t) + Hc(t) for a short time ∆t can be approximated the simplest case that has been widely studied. In this as exp(−iHc(t)∆t) exp(−iHg(t)∆t). When exp(−iHg(t)∆t) case, ∂gHg(t) = H0 and |∂tψk(t)i = 0. To obtain a sim- is applied on an eigenstate |ψk(t)i of ∂gHg(t), the resulted ple control Hamiltonian, we can choose fk(t) to be the state (represented by the dashed ray in the figure) is not nec- k-th eigenvalue Ek of H0, i.e., multiply |ψk(t)i with a −iE t essarily still the instantaneous eigenstate |ψk(t + ∆t)i at time phase e k , in the optimal control Hamiltonian Hc(t) t+∆t, and the role of the control Hamiltonian Hc(t) is to pull (8); then Hc(t) = 0. This implies no Hamiltonian control the state back to the instantaneous eigenstate |ψk(t + ∆t)i at is necessary for this case, in accordance with the result time t + ∆t. In this way, with the assistance of the control in [62]. Hamiltonian Hc(t), each eigenstate |ψk(t)i of ∂gHg(t) will al- ways evolve along the track of that eigenstate at any time A more general case is that the Hamiltonian is still t. independent of time but the parameter to estimate is not necessarily multiplicative. This has attracted a lot of attention recently [46–48, 50–52, 67]. The Hamilto- becomes nian in this case can be represented as Hg(t) = Hg in X general. Since the Hamiltonian is still time independent, Hc(t) = fk(t)|ψfk(t)ihψfk(t)| − Hgc (t) we have |∂tψk(t)i = 0. So, the optimal control Hamilto- P k nian is Hc(t) = fk(t)|ψk(t)ihψk(t)| − Hg. But in this X (9) k + i |∂ ψ (t)ihψ (t)|. case, |ψk(t)i are not necessarily the eigenstates of Hg, t fk fk P k and k fk(t)|ψk(t)ihψk(t)| cannot cancel Hg generally. To simplify Hc(t), we can simply choose fk(t) = 0, then H (t) = −H . It implies a reverse of the original Hamil- where g has been replaced by gc and |ψfk(t)i denotes the c g k-th eigenstate of ∂gHg(t) with g = gc. tonian can lead to the maximum Fisher information in this case. This recovers the result in [52], which showed The estimate gc can be first obtained by some estima- tion scheme without the Hamiltonian control, then ap- that the optimal control to maximize the quantum Fisher plied in the control Hamiltonian to have a more precise information for this case is just to apply a reverse of the estimate of g. The new estimate of g can be fed back to original unitary evolution at each time point. Of course, the control Hamiltonian to further update the estimate this is not the unique solution to Hc(t), and a large fam- of g. Thus, the above Hamiltonian control scheme is es- ily of solutions exist corresponding to different choices of sentially adaptive, requiring feedback from each round of fk(t), all leading to the maximum Fisher information. estimation to refine the control Hamiltonian and optimize Estimation of field amplitude. To exemplify the estimation precision. the features of quantum metrology with time-dependent We stress that the control Hamiltonian (9) is inde- Hamiltonians and the power of the above Hamiltonian pendent of the parameter g, although the optimal con- control scheme, we consider a simple physical example trol Hamiltonian (8) involves g, otherwise the control below. This example will show some important char- Hamiltonian would carry additional information about acteristics of time-dependent quantum metrology and g, which is not physical. From a quantum state dis- how the optimized Hamiltonian control can dramatically crimination point of view, the estimation of g is es- boost the estimation precision. 6

104 Let us consider a qubit in a uniformly rotating mag- 14 netic field, B(t) = B(cos ωtex + sin ωtez), where ex and ez are the unit vectors in the xˆ and zˆ directions, respec- 12 tively, and we want to estimate the amplitude B or the rotation frequency ω of the field. To acquire the informa- 10 tion about the magnetic field, we let the qubit evolve in the field for some time T , then measure the final state of 8 the qubit to learn B or ω. The interaction Hamiltonian −B(t) · σ between the qubit and the field is 6

H(t) = −B(cos ωtσX + sin ωtσZ ), (10) 4 where we assumed the magnetic moment of the qubit to be 1. 2 We first consider estimating the amplitude B of the magnetic field. It is easy to verify that the derivative 0 of H(t) with respect to B has eigenvalues ±1 for any t, 0 20 40 60 80 100 120 140 160 180 therefore, the maximum quantum Fisher information (7) of estimating B at time T is Figure 3. Quantum Fisher information for the field (Q) 2 (Q) I = 4T . (11) amplitude. Quantum Fisher information IB for the ampli- B tude B of the rotating magnetic field B(t) versus the evolution As shown previously, it requires some control on the time t is plotted for different choices of rotation frequency ω Hamiltonian to reach this maximum quantum Fisher in- without the Hamiltonian control, and compared to that with formation. It can be straightforwardly obtained that the optimized Hamiltonian control. The true value of B in ωt the figure is 1. It can be observed that when ω is large com- the eigenstates of ∂BH(t) are |ψ+(t)i = cos 2 |+i + ωt ωt ωt pared to the amplitude of the magnetic field B, the Fisher sin 2 |−i and |ψ−(t)i = sin 2 |+i − cos 2 |−i, where information becomes small. The Fisher information with the |±i = √1 (|0i ± |1i), corresponding to oscillations in the 2 optimal Hamiltonian control is the highest, whatever ω is, −1 which verifies the advantage of Hamiltonian control for this Z − X plane. Since ∂BH(t) = B H(t), we can choose the first term in Eq. (8) to cancel H(t). Then, the opti- case. mal control Hamiltonian Hc(t) (8) is ω for optimizing the Fisher information can be automat- H (t) = − σ . (12) c 2 Y ically satisfied, and the maximum Fisher information is achieved as a result. This is also verified by Eq. (12) that What about if we do not apply the control Hamiltonian when ω  1, the optimal control Hamiltonian is close to H (t)? We obtain the evolution of the qubit and the c zero, which means almost no Hamiltonian control is nec- quantum Fisher information for the amplitude B without essary for this case. any Hamiltonian control in Supplementary Note3. The quantum Fisher information for this case is The quantum Fisher information of B is plotted for dif- ferent rotation frequencies ω without the control Hamil- √ 2 2 2 2 tonian and compared to that with the optimal control (Q) 16B T 2 1 − cos T 4B + ω I = + 8ω . (13) Hamiltonian (12) in Fig.3. B,0 4B2 + ω2 (4B2 + ω2)2 Estimation of field rotation frequency. Now, we It implies that when T  1, turn to the estimation of the rotation frequency ω of the magnetic field. Frequency measurement is important in I(Q) ω2 many areas of physics, and has been widely studied in B ≈ 1 + , (14) (Q) 2 different contexts, e.g., a single-spin spectrum analyzer I 4B B,0 [68]. High precision phase estimation has been realized indicating that the increase of Fisher information by the in many experiments in recent years, for example, on a Hamiltonian control is determined by the ratio between single nuclear spin in diamond with a precision of order −0.85 ω and B. T by Waldherr et al. [69]. It is interesting to note that if the field rotation fre- To study the estimation precision of the frequency ω, quency ω is small, the increase in Fisher information by note ∂ωH(t) is tB(sin ωtσX −cos ωtσZ ). The eigenvalues the Hamiltonian control would be small as well, as shown of ∂ωH(t) are µ(t) = ±tB then, so the maximum and R T 1 2 by Eq. (14). This is because when ω  1, the magnetic minimum eigenvalues of hω(T ) are 0 µ(t)dt = ± 2 BT . field is changing so slowly that the evolution of the qubit Therefore, the maximum Fisher information of estimat- state is approximately adiabatic, and an eigenstate of ing ω is ∂BH(t) would always stay in that eigenstate consider- (Q) 2 4 ing ∂BH(t) commutes with H(t). Thus, the condition Iω = B T . (15) 7

ωt 10 The eigenstates of ∂ωH(t) are |ψ+(t)i = sin 2 |0i + ωt ωt ωt cos 2 |1i and |ψ−(t)i = cos 2 |0i − sin 2 |1i. If we choose fk(t) = 0 for Eq. (8), then the optimal control 8 Hamiltonian is

ω 6 H (t) = B(cos ωtσ + sin ωtσ ) − σ . (16) c X Z 2 Y

4 The first term in Hc(t) (16) cancels the original Hamil- tonian H(t), so that the eigenstates of ∂ωH(t) would not be deviated by H(t), and the second term in Hc(t) guides 2 the eigenstates of ∂ωH(t) along the tracks of those eigen- states during the whole evolution under the total Hamil- 0 tonian with the control Hc(t). (Q) The above result of Iω has an important implica- tion: it is known that the time scaling of Fisher informa- -2 0 20 40 60 80 100 120 140 160 180 tion for a parameter of a time-independent Hamiltonian is at most T 2, even with some control on the Hamil- tonian, a fundamental limit in time-independent quan- Figure 4. Quantum Fisher information for the field tum metrology [52]; however, in this example, the time frequency. The logarithm (base 10) of the quantum Fisher (Q) scaling of Fisher information for the frequency ω reaches information Iω for the rotation frequency ω of the magnetic T 4, an order T 2 higher than the time-independent limit! field B(t) versus the evolution time t is plotted for different This indicates that some fundamental limits in the time- trial values ωc of the rotation frequency, and compared to the independent quantum metrology no longer hold when the Fisher information in the absence of the control Hamiltonian Hamiltonian becomes varying with time, and they can Hc(t). The real value of B and the real value of ω are both 1. be dramatically violated in the presence of appropriate It can be observed that, even with some sub-optimal choices quantum control on the system, showing a significant of ωc which is not equal to the real value of ω, the scaling of the Fisher information can still be much higher than that discrepancy between the time-dependent and the time- without any Hamiltonian control, and when ωc approaches the independent quantum metrology. real rotation frequency ω of the magnetic field, higher Fisher An interesting question that naturally arises is if there information can be gained with the assistance of Hamiltonian is no control Hamiltonian Hc(t), can the maximum Fisher control. When ωc = ω, the Fisher information reaches the (Q) 4 information Iω still scale as T ? In Supplementary maximum, which confirms the theoretical results. Note3, we derive the maximum Fisher information for the rotation frequency ω in the absence of Hamiltonian t control by an exact computation of the qubit evolution exponentially with time (e.g., Hg = ge σZ ), the Fisher in the rotating magnetic field, and the result turns out information can have an exponential time scaling. The to be nontriviality of the current result lies in that the Hamil- √ tonian (10) has a fixed gap 2B between its highest and 4B2T 2 8B2T sin T 4B2 + ω2 lowest levels, which does not scale up with time, and thus I(Q) = − ω,0 2 2 3/2 the increase in Fisher information does not result from 4B + ω (4B2 + ω2) √ (17) any time growth of the Hamiltonian. 8B2 1 − cos T 4B2 + ω2 4 + . One may be wondering about the origin of the T scal- (4B2 + ω2)2 ing. It is not from the control Hamiltonian, since the con- trol Hamiltonian is independent of the estimated parame- Therefore, without any Hamiltonian control on the sys- ter, which is ω in this example. The T 4 scaling originates tem, the Fisher information would still scale as T 2 as from the dynamics of the original Hamiltonian. Consider in time-independent quantum metrology, which is sub- two original Hamiltonians with slightly deviated param- stantially lower than the T 4 scaling with the optimized eters ω and ω + δω. The discrepancy between them is Hamiltonian control. This exhibits the advantage of amplified by a time factor t as they evolve, and corre- Hamiltonian control in enhancing time-dependent quan- spondingly the distance between the states evolving un- tum metrology. der these two Hamiltonians is amplified by a time factor Fig.4 plots the Fisher information of ω in the presence t as well. Since the squared distance between two states of the control Hamiltonian with various ωc, and compares with neighboring parameters is approximately propor- it to that without the control Hamiltonian. tional to the quantum Fisher information as manifested It should be noted that when the Hamiltonian is al- by the Bures metric [61], the quantum Fisher informa- lowed to vary with time, the time scaling of Fisher infor- tion of ω can therefore be increased by an order T 2 after mation may be raised in a trivial way: the strength or the an evolution of time T . The control Hamiltonian helps level gap of the Hamiltonian may itself increase rapidly keep the qubit on the optimal route that gains the most with time. For example, if the Hamiltonian is growing Fisher information. 8

Adaptive control for frequency estimation. A It is also worth mentioning that there is a minimum notable point in the above Hamiltonian control scheme precision requirement of the initial estimation of ω with- for frequency estimation is that the optimal control out the Hamiltonian control so that the Fisher informa- Hamiltonian Hc(t) (16) involves the rotation frequency tion increases after each round of feedback control: ω. However, ω is the parameter to estimate, so, in prac- 1 tice, we can only use an estimate of ω, say ω , instead of I > , (21) c 0 2 1 the real value of ω in implementing the control Hamil- B (1 − 18N ) tonian (16), and the control Hamiltonian would actually where N is the number of measurements in each round of be feedback control, otherwise the Fisher information would ωc decrease as the feedback control proceeds. Hc(t) = B(cos ωctσX + sin ωctσZ ) − σY . (18) 2 Discussion. The final problem we want to discuss When the measurement runs for multiple rounds, the es- about the above optimal Hamiltonian control scheme for time-dependent quantum metrology is the case that the timate ωc will approach the real value of ω, and the op- timal Fisher information (15) can be saturated by adap- eigenstate of ∂gHg(t) with the maximum or minimum tively updating the estimate of ω in the control Hamil- eigenvalue does not always stay in the same eigenstate tonian. This implies that a feedback of the information during the evolution. In deriving the optimal control about ω from each round of measurement into the next Hamiltonian (8), we let each eigenstate of ∂gHg(t) stay round is necessary to implement the optimal Hamiltonian in the same eigenstate during the evolution for simplicity. control scheme and maximize the estimation precision for This implicitly assumes that the eigenstate of ∂gHg(t) ω. with the maximum or minimum eigenvalue also stays in The details of the adaptive Hamiltonian control scheme the same eigenstate during the evolution. However, if the are presented in Supplementary Note5. Generally one highest or lowest level crosses other levels of ∂gHg(t), the needs to first obtain an initial estimate of ω by some corresponding eigenstate will change from one eigenstate estimation scheme without the Hamiltonian control, then of ∂gHg(t) to another at the crossing. apply it to the control Hamiltonian and update it by In the presence of such a level crossing, the upper estimation in the presence of the control Hamiltonian. bound of the maximum eigenvalue of hg(T ) or the lower The updated estimate of ω can again be applied in the bound of the minimum eigenvalue of hg(T ) cannot be control Hamiltonian to produce a better estimate of ω, attained, and as a result the upper bound (7) on the and so forth. quantum Fisher information cannot be saturated. In par- An important point shown in Supplementary Note4 ticular, if the highest and lowest levels of ∂gHg(t) cross each other, the Fisher information will even drop after is that with an estimate of ω, ωc, which deviates from the crossing, because the gap between the maximum and the exact value of ω by δω, δω = ωc − ω, the Fisher information in the presence of the Hamiltonian control is minimum eigenvalues of hg(T ) will shrink. Thus, it is approximately necessary to cancel or suppress the effect of level crossing in ∂gHg(t) in order to maximize the Fisher information. 1 In order to keep the highest or lowest level of ∂ H (t) I(Q) = B2T 4(1 − T 2δω2). (19) g g ω 18 still in the the highest or lowest level after a crossing 4 in ∂gHg(t), we need to change the dynamics of the sys- So, to approach the T scaling of Fisher information for tem near the crossing so that the highest or lowest level a given evolution time T , the necessary precision δω of of ∂gHg(t) before the level crossing transits to the new the estimate ωc in the control Hamiltonian is only of the −1 one after the level crossing. We propose an additional order T , so the feedback of a low precision estimate Hamiltonian control scheme in the Methods to realize of ω in the Hamiltonian control can lead to a high pre- such a transition. cision estimate of ω. This lays the foundation for the In Fig.5, the role of the additional Hamiltonian con- adaptive Hamiltonian control scheme. In particular, it trol is plotted. When there are multiple crossings be- implies that the precision of the initial estimate of ω also −1 tween the highest/lowest level and other levels of ∂gHg(t) just needs to be of the order T , attainable in the ab- during the whole evolution process, there must be an ad- sence of Hamiltonian control, which is exactly what we ditional Hamiltonian control applied at each level cross- need. ing. In fact, such an iterative feedback control scheme can approach the T 4 scaling of Fisher information very ef- ficiently. It is shown in Supplementary Note5 that the METHODS number of necessary rounds of feedback control to realize the T 4 scaling for a large T is only Additional quantum control at level crossings of ∂gHg(t). Suppose a crossing occurs between the high- n ∼ dlog2 ln T e , (20) est or lowest level and another level of ∂gHg(t) at time a double logarithm of T , so very few rounds of feedback τ. µn(t) is the highest or lowest level of ∂gHg(t) before 4 control are necessary to approach the T scaling. τ while µm(t) becomes the highest or lowest level after 9

1 1 if we break the time interval τ − 2 δt ≤ t ≤ τ + 2 δt into many small pieces at properly sampled time points � t1, t2, ··· , tn, the total evolution of the system from τ − 1 δt to τ + 1 δt can be approximated as the time- �� 2 2 ordered product of Ug(tj → tj+1) ≈ exp[−i(Hg(tj) + H (t ))∆t ] exp[−iH (t )∆t ], where ∆t = t − t , ��� c j j a j j j j+1 j implying that at each short time piece ∆tj, the state −iθn(tj ) −iθm(tj ) e |ψn(tj)i is slightly shifted to e |ψm(tj)i −iθn(tj ) by Ha(tj), following which e |ψn(tj)i is shifted to −iθn(tj+1) −iθm(tj ) e |ψn(tj+1)i and e |ψm(tj)i is shifted to −iθm(tj+1) e |ψm(tj+1)i by Hg(tj)+Hc(tj). Thus, the total effect of the additional control Hamiltonian Ha(t), along � � with the original Hamiltonian Hg(t) and the control Hamiltonian Hc(t), is continuously driving the system −iθn(t) −iθm(t) from e |ψn(t)i to e |ψm(t)i, where |ψn(t)i and Figure 5. Additional Hamiltonian� control scheme at� |ψm(t)i are also changing at the same time. level crossings of ∂gHg(t). Additional Hamiltonian con- A rigorous analysis for the additional Hamiltonian trol is necessary to eliminate the effect of a crossing between Ha(t) is given in Supplementary Note6. It turns out that −iθ (t) the highest/lowest level and another level of ∂gHg(t). The in a rotating frame where all e k |ψk(t)i are static, the 0 role of the additional control Hamiltonian Ha(t) is to trans- total Hamiltonian is transformed to H (t) = h(t)σmn, form the original instantaneous highest/lowest level to the where σmn is a σX -like transition operator between two new instantaneous highest/lowest level of ∂gHg(t). Suppose static basis states |ni and |mi in the new frame which the red curve in the figure is the highest level of ∂gHg(t). −iθn(t) −iθm(t) correspond to e |ψn(t)i and e |ψm(t)i in the Before τ, µn(t) is the highest level of ∂gHg(t). At time τ, µ (t) crosses the level µ (t), which becomes the highest level original frame. This indicates that in the presence of n m the additional control Hamiltonian H (t), |ψ (t)i can be after the crossing. The additional control Hamiltonian Ha(t) a n is to transit the highest level from µn(t) to µm(t) at time τ. transited to |ψm(t)i continuously around the level cross- The argument is similar if the blue curve is the lowest level ing between µn(t) and µm(t). l+1 of ∂gHg(t). It should be noted that an additional phase (−1) i will be introduced to the eigenstates |ψm(t)i and |ψn(t)i of ∂gHg(t) by the additional Hamiltonian control. This τ, and |ψn(t)i and |ψm(t)i are the corresponding eigen- may change the relative phase of the system when it is in states. Intuitively, the following σX -like control Hamil- a superposed state involving |ψm(t)i or |ψn(t)i and needs tonian to be taken into account in that case. The detail about i(θm(t)−θn(t)) the additional phase is given in Supplementary Note6. Ha(t) =h(t)[e |ψn(t)ihψm(t)| (22) i(θn(t)−θm(t)) + e |ψm(t)ihψn(t)|], DATA AVAILABILITY should rotate |ψn(t)i to |ψm(t)i, with h(t) to be some time-dependent control parameters and e−iθm(t), e−iθn(t) to be the additional phases of |ψm(t)i, |ψn(t)i deter- The code and data used in this work are available upon mined by the choices of fm(t), fn(t) in the optimal con- request to the corresponding author. trol Hamiltonian (8). In order not to affect the additional Hamiltonian controls at other level crossings, Ha(t) must be completed within a sufficiently short time δt. As ACKNOWLEDGMENTS shown in Supplementary Note6, the control parameter h(t) must satisfy The authors acknowledge the support from the US τ+ 1 δt Army Research Office under Grant No. W911NF-15- Z 2 1 h(t)dt = (l + )π, (23) 1-0496, W911NF-13-1-0402 and the support from the 1 2 τ− 2 δt National Science Foundation under Grant No. DMR- where l is an arbitrary integer, so that the system can be 1506081. exactly transferred to the new eigenstate |ψm(t)i from |ψn(t)i by the additional control Hamiltonian. An intuitive idea why the above additional control AUTHOR CONTRIBUTIONS Hamiltonian Ha(t) can drive |ψn(t)i to |ψm(t)i can be understood as follows. Note that the total Hamiltonian is S.P. initiated this work, and carried out the main calcu- the sum of Hg(t), Hc(t) and the additional control Hamil- lations. A.N.J. participated in scientific discussions, and tonian Ha(t) now. According to the time-dependent gen- assisted with the calculations. Both authors contributed eralization of the Suzuki-Trotter product formula [70], to the writing of the manuscript. 10

COMPETING FINANCIAL INTERESTS

The authors declare no competing financial interests.

[1] Haus, H. A. & Mullen, J. A. Quantum Noise in Linear States for Detecting and Characterizing Quantum Pro- Amplifiers. Phys. Rev. 128, 2407–2413 (1962). cesses. Phys. Rev. X 4, 041025 (2014). [2] Caves, C. M. Quantum-mechanical noise in an interfer- [22] Yukawa, E., Milburn, G. J., Holmes, C. A., Ueda, M. & ometer. Phys. Rev. D 23, 1693–1708 (1981). Nemoto, K. Precision measurements using squeezed spin [3] Helstrom, C. W. Quantum Detection and Estimation states via two-axis countertwisting interactions. Phys. Theory (Academic Press, New York, 1976). Rev. A 90, 062132 (2014). [4] Holevo, A. S. Probabilistic and Statistical Aspects of [23] Lee, H., Kok, P. & Dowling, J. P. A quantum Rosetta Quantum Theory (North-Holland Publishing Company, stone for interferometry. Journal of Modern Optics 49, Amsterdam, 1982). 2325–2338 (2002). [5] Giovannetti, V., Lloyd, S. & Maccone, L. Quantum- [24] Resch, K. J. et al. Time-Reversal and Super-Resolving Enhanced Measurements: Beating the Standard Quan- Phase Measurements. Phys. Rev. Lett. 98, 223601 (2007). tum Limit. Science 306, 1330–1336 (2004). [25] Nagata, T., Okamoto, R., O’Brien, J. L., Sasaki, K. & [6] Giovannetti, V., Lloyd, S. & Maccone, L. Advances in Takeuchi, S. Beating the Standard Quantum Limit with quantum metrology. Nat. Photon. 5, 222–229 (2011). Four-Entangled Photons. Science 316, 726–729 (2007). [7] Schnabel, R., Mavalvala, N., McClelland, D. E. & Lam, [26] Jones, J. A. et al. Magnetic Field Sensing Beyond the P. K. Quantum metrology for gravitational wave astron- Standard Quantum Limit Using 10-Spin NOON States. omy. Nat. Commun. 1, 121 (2010). Science 324, 1166–1168 (2009). [8] Danilishin, S. L. & Khalili, F. Y. Quantum Measure- [27] Israel, Y., Rosen, S. & Silberberg, Y. Supersensitive ment Theory in Gravitational-Wave Detectors. Living Polarization Microscopy Using NOON States of Light. Rev. Relativity 15, 5 (2012). Phys. Rev. Lett. 112, 103604 (2014). [9] Adhikari, R. X. Gravitational radiation detection with [28] Luis, A. Nonlinear transformations and the Heisenberg laser interferometry. Rev. Mod. Phys. 86, 121–151 (2014). limit. Physics Letters A 329, 8–13 (2004). [10] Derevianko, A. & Katori, H. Colloquium: Physics of op- [29] Boixo, S., Flammia, S. T., Caves, C. M. & Geremia, J. tical lattice clocks. Rev. Mod. Phys. 83, 331–347 (2011). Generalized Limits for Single-Parameter Quantum Esti- [11] Ludlow, A. D., Boyd, M. M., Ye, J., Peik, E. & Schmidt, mation. Phys. Rev. Lett. 98, 090401 (2007). P. O. Optical atomic clocks. Rev. Mod. Phys. 87, 637–701 [30] Roy, S. M. & Braunstein, S. L. Exponentially Enhanced (2015). Quantum Metrology. Phys. Rev. Lett. 100, 220501 [12] Kolobov, M. I. The spatial behavior of nonclassical light. (2008). Rev. Mod. Phys. 71, 1539–1589 (1999). [31] Boixo, S. et al. Quantum Metrology: Dynamics versus [13] Lugiato, L. A., Gatti, A. & Brambilla, E. Quantum imag- Entanglement. Phys. Rev. Lett. 101, 040403 (2008). ing. J. Opt. B: Quantum Semiclass. Opt. 4, S176 (2002). [32] Pezzé, L. & Smerzi, A. Entanglement, Nonlinear Dy- [14] Dowling, J. P. & Seshadreesan, K. P. Quantum optical namics, and the Heisenberg Limit. Phys. Rev. Lett. 102, technologies for metrology, sensing, and imaging. Journal 100401 (2009). of Lightwave Technology 33, 2359–2370 (2015). [33] Napolitano, M. et al. Interaction-based quantum metrol- [15] Aspelmeyer, M., Kippenberg, T. J. & Marquardt, F. ogy showing scaling beyond the Heisenberg limit. Nature Cavity optomechanics. Rev. Mod. Phys. 86, 1391–1452 471, 486–489 (2011). (2014). [34] Hall, M. J. W. & Wiseman, H. M. Does Nonlinear [16] Taylor, M. A. & Bowen, W. P. Quantum metrology and Metrology Offer Improved Resolution? Answers from its application in biology. Physics Reports 615, 1–59 Theory. Phys. Rev. X 2, 041006 (2016). (2012). [17] Wineland, D. J., Bollinger, J. J., Itano, W. M., Moore, [35] Zwierz, M. & Wiseman, H. M. Precision bounds for noisy F. L. & Heinzen, D. J. Spin squeezing and reduced quan- nonlinear quantum metrology. Phys. Rev. A 89, 022107 tum noise in spectroscopy. Phys. Rev. A 46, R6797– (2014). R6800 (1992). [36] Escher, B. M., de Matos Filho, R. L. & Davidovich, L. [18] Ma, J. & Wang, X. Fisher information and spin squeezing General framework for estimating the ultimate precision in the Lipkin-Meshkov-Glick model. Phys. Rev. A 80, limit in noisy quantum-enhanced metrology. Nat. Phys. 012318 (2009). 7, 406–411 (2011). [19] Hyllus, P., Pezzé, L. & Smerzi, A. Entanglement and [37] Demkowicz-Dobrzański, R., Kołodyński, J. & Guţă, Sensitivity in Precision Measurements with States of a M. The elusive Heisenberg limit in quantum-enhanced Fluctuating Number of Particles. Phys. Rev. Lett. 105, metrology. Nat. Commun. 3, 1063 (2012). 120501 (2010). [38] Chin, A. W., Huelga, S. F. & Plenio, M. B. Quantum [20] Gross, C. Spin squeezing, entanglement and quantum Metrology in Non-Markovian Environments. Phys. Rev. metrology with bose-einstein condensates. J. Phys. B: Lett. 109, 233601 (2012). At. Mol. Opt. Phys. 45, 103001 (2012). [39] Tsang, M. Quantum metrology with open dynamical sys- [21] Rozema, L. A., Mahler, D. H., Blume-Kohout, R. & tems. New J. Phys. 15, 073005 (2013). Steinberg, A. M. Optimizing the Choice of Spin-Squeezed 11

[40] Alipour, S., Mehboudi, M. & Rezakhani, A. T. Quan- [62] Giovannetti, V., Lloyd, S. & Maccone, L. Quantum tum Metrology in Open Systems: Dissipative Cramér- Metrology. Phys. Rev. Lett. 96, 010401 (2006). Rao Bound. Phys. Rev. Lett. 112, 120405 (2014). [63] Garanin, D. A. & Schilling, R. Inverse problem for the [41] Tan, Q.-S., Huang, Y., Yin, X., Kuang, L.-M. & Wang, Landau-Zener effect. Europhys. Lett. 59, 7–13 (2002). X. Enhancement of parameter-estimation precision in [64] Berry, M. V. Transitionless quantum driving. J. Phys. noisy systems by dynamical decoupling pulses. Phys. A: Math. Theor. 42, 365303 (2009). Rev. A 87, 032102 (2013). [65] Ruschhaupt, A., Chen, X., Alonso, D. & Muga, J. G. Op- [42] Arrad, G., Vinkler, Y., Aharonov, D. & Retzker, A. In- timally robust shortcuts to population inversion in two- creasing Sensing Resolution with Error Correction. Phys. level quantum systems. New J. Phys. 14, 093040 (2012). Rev. Lett. 112, 150801 (2014). [66] Barnes, E. Analytically solvable two-level quantum sys- [43] Dür, W., Skotiniotis, M., Fröwis, F. & Kraus, B. Im- tems and Landau-Zener interferometry. Phys. Rev. A 88, proved Quantum Metrology Using Quantum Error Cor- 013818 (2013). rection. Phys. Rev. Lett. 112, 080801 (2014). [67] Liu, J., Lu, X.-M., Sun, Z. & Wang, X. Quantum multi- [44] Kessler, E. M., Lovchinsky, I., Sushkov, A. O. & Lukin, parameter metrology with generalized entangled coherent M. D. Quantum Error Correction for Metrology. Phys. state. J. Phys. A: Math. Theor. 49, 115302 (2016). Rev. Lett. 112, 150802 (2014). [68] Kotler, S., Akerman, N., Glickman, Y. & Ozeri, R. Non- [45] Lu, X.-M., Yu, S. & Oh, C. H. Robust quantum metro- linear Single-Spin Spectrum Analyzer. Phys. Rev. Lett. logical schemes based on protection of quantum Fisher 110, 110503 (2013). information. Nat. Commun. 6, 7282 (2015). [69] Waldherr, G. et al. High-dynamic-range magnetometry [46] Pang, S. & Brun, T. A. Quantum metrology for a general with a single nuclear spin in diamond. Nat. Nano. 7, Hamiltonian parameter. Phys. Rev. A 90, 022117 (2014). 105–108 (2012). [47] Liu, J., Jing, X.-X. & Wang, X. Quantum metrology [70] Poulin, D., Qarry, A., Somma, R. & Verstraete, F. Quan- with unitary parametrization processes. Sci. Rep. 5, 8565 tum Simulation of Time-Dependent Hamiltonians and (2015). the Convenient Illusion of Hilbert Space. Phys. Rev. Lett. [48] Jing, X.-X., Liu, J., Xiong, H.-N. & Wang, X. Max- 106, 170501 (2011). imal quantum Fisher information for general su(2) parametrization processes. Phys. Rev. A 92, 012312 (2015). [49] Skotiniotis, M., Sekatski, P. & Dür, W. Quantum metrol- ogy for the Ising Hamiltonian with transverse magnetic field. New J. Phys. 17, 073032 (2015). [50] Baumgratz, T. & Datta, A. Quantum Enhanced Estima- tion of a Multidimensional Field. Phys. Rev. Lett. 116, 030801 (2016). [51] Yuan, H. Sequential Feedback Scheme Outperforms the Parallel Scheme for Hamiltonian Parameter Estimation. Phys. Rev. Lett. 117, 160801 (2016). [52] Yuan, H. & Fung, C.-H. F. Optimal Feedback Scheme and Universal Time Scaling for Hamiltonian Parameter Estimation. Phys. Rev. Lett. 115, 110401 (2015). [53] de Clercq, L. E. et al. Time-dependent Hamiltonian esti- mation for Doppler velocimetry of trapped ions. Preprint at http://arxiv.org/abs/1509.07083 (2015). [54] Tsang, M., Wiseman, H. M. & Caves, C. M. Fundamental Quantum Limit to Waveform Estimation. Phys. Rev. Lett. 106, 090401 (2011). [55] Wootters, W. K. Statistical distance and Hilbert space. Phys. Rev. D 23, 357–362 (1981). [56] Cramér, H. Mathematical Methods of Statistics (Prince- ton University Press, Princeton, 1946). [57] Fisher, R. A. Theory of Statistical Estimation. Mathe- matical Proceedings of the Cambridge Philosophical Soci- ety 22, 700–725 (1925). [58] Tsang, M. Ziv-Zakai Error Bounds for Quantum Param- eter Estimation. Phys. Rev. Lett. 108, 230401 (2012). [59] Braunstein, S. L. & Caves, C. M. Statistical distance and the geometry of quantum states. Phys. Rev. Lett. 72, 3439–3443 (1994). [60] Braunstein, S. L., Caves, C. M. & Milburn, G. J. Gen- eralized Uncertainty Relations: Theory, Examples, and Lorentz Invariance. Ann. Phys. 247, 135–173 (1996). [61] Bures, D. An extension of Kakutani’s theorem on infinite product measures to the tensor product of semifinite w*- algebras. Trans. Amer. Math. Soc. 135, 199–212 (1969). 12

SUPPLEMENTARY NOTE 1. DERIVATION OF hg(T )

In this Supplementary Note, we derive hg(T ) for a time-dependent Hamiltonian Hg(t), defined as

† hg(T ) = iUg (0 → T )∂gUg(0 → T ), (S1) where Ug(0 → T ) is the unitary evolution under the time-dependent Hamiltonian Hg(t), and it determines the quantum Fisher information of estimating g in the following way,

(Q) Ig = 4hψ0|Var[hg(T )]|ψ0i, (S2) where |ψ0i is the initial state of the system. The maximum quantum Fisher information is the square of the gap between the maximum and minimum eigenvalues of hg(T ). In order to obtain hg(T ), we break the unitary evolution Ug(0 → T ) for a time duration T into small time intervals ∆t,

Ug(0 → T ) = Ug(T − ∆t → T )Ug(T − 2∆t → T − ∆t) ··· Ug(∆t → 2∆t)Ug(0 → ∆t). (S3)

Then,

T/∆t−1 X n ∂gUg(0 → T ) = Ug(T − ∆t → T ) ··· Ug((k + 1)∆t → (k + 2)∆t) k=0 (S4) o [∂gUg(k∆t → (k + 1)∆t)]Ug((k − 1)∆t → k∆t) ··· Ug(0 → ∆t) .

When the time interval ∆t is sufficiently small, the Hamiltonian Hg(t) is approximately time-independent during each time interval k∆t ≤ t ≤ (k + 1)∆t, i.e.,

Ug(k∆t → (k + 1)∆t) ≈ exp(−iHg(k∆t)∆t), (S5) and by expanding exp(−iHg(k∆t)∆t) to the first order of ∆t, we have

2 exp(−iHg(k∆t)∆t) = I − i∆tHg(k∆t) + O(∆t ), (S6) so,

2 ∂gUg(k∆t → (k + 1)∆t) ≈ −i∆t∂gHg(k∆t) + O(∆t ). (S7)

In the limit ∆t → 0, ∂gUg(0 → T ) can be written in the following integral form,

Z T ∂gUg(0 → T ) = −i Ug(t → T )∂gHg(t)Ug(0 → t)dt, (S8) 0 which is the exact solution to ∂gUg(0 → T ). † When Ug (0 → T ) is multiplied to ∂gUg(0 → T ) from the left, since

† † Ug (0 → T )Ug(t → T ) = Ug (0 → t), (S9) hg(T ) in Eq. (S1) turns out to be

Z T † hg(T ) = Ug (0 → t)∂gHg(t)Ug(0 → t)dt. (S10) 0

This gives the integral form of hg(T ) in the main text for a time-dependent Hamiltonian Hg(t) at time t = T . When Hg(t) is independent of time, Eq. (S10) degenerates to the relevant formula in [46]. 13

SUPPLEMENTARY NOTE 2. MEASUREMENT SCHEME FOR ESTIMATION WITH OPTIMAL HAMILTONIAN CONTROL

In this Supplementary Note, we derive the estimator and the measurement scheme that can gain the upper bound of Fisher information given by Eq. (7) in the main manuscript with the assistance of the optimal Hamiltonian control. Suppose the parameter that we want to estimate is g. According to Eq. (8) of the main manuscript, the optimal control Hamiltonian is X X Hc(t) = fk(t)|ψk(t)ihψk(t)| − Hg(t) + i |∂tψk(t)ihψk(t)|, (S11) k k where Hg(t) is the original Hamiltonian with the parameter g, |ψk(t)i are the eigenstates of ∂gHg(t) and fk(t) are arbitrary real functions. Since we do not know the exact value of g, the parameter g in the optimal control Hamiltonian (S11) should be replaced by some known estimate of g, gc, in practice, and the control Hamiltonian is actually X X Hc(t) = fk(t)|ψfk(t)ihψfk(t)| − Hgc (t) + i |∂tψfk(t)ihψfk(t)|, (S12) k k

where |ψfk(t)i are also dependent on gc instead of g, i.e., |ψfk(t)i are eigenstates of ∂gHg(t)|g=gc . It should be noted that the parameter gc in the control Hamiltonian (S12) is always a constant, even when it is equal to the real value of g, while the parameter g in the original Hamiltonian Hg(t) is a variable. This should be kept in mind in computing the Fisher information for g. The appearance of g in the optimal control Hamiltonian (S11) just indicates what value of gc maximizes the Fisher information, and it turns out to be the real value of g. When gc is close to g, the total Hamiltonian can be written as

Htot(t) =Hg(t) + Hc(t) X X (S13) = fk(t)|ψfk(t)ihψfk(t)| + ∂gHg(t)|g=gc δg + i |∂tψfk(t)ihψfk(t)|, k k up to the first order of δg, where δg = g − gc. The evolution under Htot(t) can be decomposed as

U(0 → T ) = lim exp(−iHtot(T )∆t) exp(−iHtot(T − ∆t)∆t) ··· exp(−iHtot(0)∆t), (S14) ∆t→0 and at time t, X X exp(−iHtot(t)∆t) ≈ exp(−i |∂tψfk(t)ihψfk(t)|∆t) exp(−i fk(t)|ψfk(t)ihψfk(t)|∆t) exp(−i∂gHg(t)|g=gc δg∆t). k k (S15) Note that generally different orderings of the three terms at the right side of Eq. (S15) will give different results when ∆t is finite, but when ∆t → 0, they will give the same result. The ordering chosen in (S15) is for convenience of computation below.

If a system is initially in an eigenstate of ∂gHg(t)|g=gc at t = 0, say |ψfk(0)i, then according to Eq. (S14) and (S15), the state after an evolution of time T is h  Z T i U(0 → T )|ψfk(0)i = exp − i θk(T ) + δg µk(t)dt |ψfk(T )i, (S16) 0 where Z T θk(T ) = fk(t)dt. (S17) 0

Now, suppose the maximum and minimum eigenvalues of ∂gHg(t)|g=gc at time t are µmax(t) and µmin(t), and the corresponding eigenstates are |ψ]max(t)i and |ψ]min(t)i, respectively. To achieve the maximum Fisher information given by Eq. (7) in the main manuscript, we can prepare the system in an equal superposition of |ψ]max(0)i and |ψ]min(0)i at the initial time t = 0, 1 |Ψ(0)i = √ (|ψ]max(0)i + |ψ]min(0)i). (S18) 2 14

Then after evolving for time T , the state of the system is

1 n h  Z T i |Ψ(T )i =√ exp − i θmax(T ) + δg µmax(t)dt |ψ]max(T )i 2 0 (S19) h  Z T i o + exp − i θmin(T ) + δg µmin(t)dt |ψ]min(T )i . 0

Note that θmax / min(t) denotes the value of θk(t) associated with the maximum or minimum eigenvalue of ∂gHg(t)|g=gc , but not the maximum or minimum over θk(t). Since ∂g = ∂δg, the quantum Fisher information of estimating of g by measuring |Ψ(T )i is

(Q)  2 Ig =4 h∂δgΨ(T )|∂δgΨ(T )i − |hΨ(T )|∂δgΨ(T )i|

Z T 2 (S20) h  i = µmax(t) − µmin(t) dt , 0 which is exactly the upper bound of quantum Fisher information given by Eq. (7) in the main manuscript. To attain this quantum Fisher information, we can measure the following O = |+ih+| − |−ih−|, (S21) where 1 −iθmax(T ) −iθmin(T ) |±i = √ (e |ψ]max(T )i ± e |ψ]min(T )i), (S22) 2 which are varying with time T . It is important to note that |±i are also dependent on gc, instead of g, which makes it possible to implement the measurement of O without knowing the exact value of g. It can be obtained that the expectation value and variance of O under the state |Ψ(t)i are

h Z T i hOi = cos (µmax(t) − µmin(t))δgdt , 0 (S23) Z T 2 2 h i h∆O i = sin (µmax(t) − µmin(t))δgdt . 0 hOi can be considered as an estimator of g (with some local unit difference characterized by ∂δghOi and potential systematic errors which can be eliminated by calibration) since it is dependent on g. The parameter g can be obtained from hOi, and the variance of the estimate [59, 62] is

2 2 h∆O i 1 δg = 2 = T , (S24) |∂δghOi| h Z i2 (µmax(t) − µmin(t))dt 0 which exactly saturates the upper√ bound of Fisher information in Eq. (7) of the main manuscript. If there are N trials, the precision would be 1/ N of δg then.

SUPPLEMENTARY NOTE 3. FISHER INFORMATION FOR B AND ω IN THE ABSENCE OF HAMILTONIAN CONTROL

In this Supplementary Note, we derive the evolution of a qubit in a rotating magnetic field and the optimal quantum Fisher information for the amplitude B and the rotation frequency ω of the magnetic field in the absence of control Hamiltonian. Suppose the rotating magnetic field is B(t),

B(t) = B(cos ωtex + sin ωtez), (S25) where the amplitude of the field B is assumed to be constant for simplicity. The interaction Hamiltonian between a qubit and the field is

H(t) = −B(t) · σ = −B(cos ωtσX + sin ωtσZ ). (S26) 15

When there is no control on the Hamiltonian, the evolution of the qubit is determined by the Schrödinger equation

i∂t|Ψ(t)i = H(t)|Ψ(t)i. (S27) To derive the evolution of the qubit in this case, note that ω ω exp(i σ t)σ exp(−i σ t) = cos ωtσ + sin ωtσ . (S28) 2 Y X 2 Y X Z

We know that if a state under a general Hamiltonian H(t) is transformed by exp(iH0t), the effective Hamiltonian for the evolution of the new state is

0 H (t) = exp(iH0t)H(t) exp(−iH0t) − H0. (S29) Therefore, the rotating Hamiltonian (S26) can be perceived as the effective Hamiltonian of an original Hamiltonian ω ω −BσX + 2 σY in a frame rotating as exp(i 2 σY t). ω ω The evolution of a qubit under the Hamiltonian −BσX + 2 σY is exp[i(BσX − 2 σY )t], so the evolution under the rotating Hamiltonian (S26) is ω ω U(0 → t) = exp(i σ t) exp[i(Bσ − σ )t]. (S30) 2 Y X 2 Y Having obtained the evolution of the qubit, we can compute the Fisher information for B and ω. To obtain the optimal quantum Fisher information for the field amplitude B, we calculate

∂BH(t) = −(cos ωtσX + sin ωtσZ ). (S31) The optimal quantum Fisher information is determined by the squared gap between the maximum and the minimum eigenvalues of

Z T † hB(T ) = U (0 → t)∂BH(t)U(0 → t)dt 0 √ ! √ ! 4B2T ω2 sin T 4B2 + ω2 T sin T 4B2 + ω2 = − + σX + 2Bω − σY (S32) 4B2 + ω2 (4B2 + ω2)3/2 4B2 + ω2 (4B2 + ω2)3/2 √ ω 1 − cos T 4B2 + ω2 − σ . 4B2 + ω2 Z From Eq. (S2), it can be obtained that the optimal quantum Fisher information for B is √ 16B2T 2 1 − cos T 4B2 + ω2 I(Q) = + 8ω2 . (S33) B 4B2 + ω2 (4B2 + ω2)2 Similarly, to obtain the optimal quantum Fisher information for the field rotation frequency ω, we calculate

∂ωH(t) = tB(sin ωtσX − cos ωtσZ ). (S34) And the h matrix for ω is Z T † hω(T ) = U (0 → t)∂ωH(t)U(0 → t)dt 0 √ √ ! sin T 4B2 + ω2 T cos T 4B2 + ω2 =B − (ωσX + 2BσY ) (S35) (4B2 + ω2)3/2 4B2 + ω2 √ √ ! T sin T 4B2 + ω2 1 − cos T 4B2 + ω2 + B − √ + σZ . 4B2 + ω2 4B2 + ω2

And the optimal quantum Fisher information for ω is √ √ 2 2 2 2 2 2 2 2 (Q) 4B T 8B T sin T 4B + ω 8B 1 − cos T 4B + ω Iω,0 = − + . (S36) 4B2 + ω2 (4B2 + ω2)3/2 (4B2 + ω2)2 16

SUPPLEMENTARY NOTE 4. FISHER INFORMATION FOR ω IN THE PRESENCE OF HAMILTONIAN CONTROL WITH ωc NEAR ω

This Supplementary Note is to obtain the Fisher information for the rotation frequency ω of the magnetic field in the presence of the control Hamiltonian with the control parameter ωc close to ω. It has been obtained in the main manuscript that the maximum Fisher information of estimating ω with the optimal Hamiltonian control is

(Q) 2 4 Iω = B T , (S37) and the optimal control Hamiltonian is ω H (t) = B(cos ωtσ + sin ωtσ ) − σ . (S38) c X Z 2 Y However, one generally does not know the exact value of ω, so the real control that can be applied on the qubit is ω H (t) = B(cos ω tσ + sin ω tσ ) − c σ , (S39) c c X c Z 2 Y where ωc is a control parameter that is close to ω, and the maximum Fisher information is saturated when ωc = ω. In this case, the total Hamiltonian is ω H (t) = −B(cos ωtσ + sin ωtσ ) + B(cos ω tσ + sin ω tσ ) − c σ . (S40) tot X Z c X c Z 2 Y

A natural question is how the deviation of ωc from ω influences the Fisher information. Will a slight deviation of ωc from ω cause a large drop in Fisher information? This is important to the design and realization of the Hamiltonian control scheme in practice. In this Supplementary Note, we derive the Fisher information of estimating ω when ωc is deviated from the true value of ω. We will show how to use this result to design an adaptive control scheme to approach the T 4 scaling of the Fisher information in the next Supplementary Note. Since the maximum quantum Fisher information of estimating ω is determined by the gap between the highest and lowest levels of hω(T ), we need to obtain hω(T ) first. As ωc is close to ω, we can expand hω(T ) with ωc near ω. First, according to Eq. (S10), we have

Z T 2 h † i BT hω(T ) = U (0 → t)∂ωHtot(t)U(0 → t) dt = − σZ , (S41) ωc=ω 0 ωc=ω 2 ω where U(0 → t) is the unitary evolution operator under Htot(t), U(0 → t)|ωc=ω = exp(i 2 tσY ). Also from (S10), we can see that Z T h † † i ∂ωc hω(T ) = ∂ωc U (0 → t)∂ωHtot(t)U(0 → t) + U (0 → t)∂ωHtot(t)∂ωc U(0 → t) dt, (S42) ωc=ω 0 ωc=ω where we used ∂ωc ∂ωHtot(t) = 0. From Eq. (S8), it can be obtained that Z t h 0 0 0 i 0 ∂ω U(0 → t) = − i U(t → t)∂ω Htot(t )U(0 → t ) dt c ωc=ω c 0 ωc=ω (S43) t ωt t ωt = sin (−I + iBtσ ) + i cos (σ − Btσ ), 2 2 X 2 2 Y Z so,

3 BT ∂ωc hω(T ) = − σX . (S44) ωc=ω 3 Similarly, according to Eq. (S10),

Z T h ∂2 h (T ) = ∂2 U †(0 → t)∂ H (t)U(0 → t) + 2∂ U †(0 → t)∂ H (t)∂ U(0 → t) ωc ω ω =ω ωc ω tot ωc ω tot ωc c 0 (S45) i + U †(0 → t)∂ H (t)∂2 U(0 → t) dt, ω tot ωc ωc=ω 17

where we again used ∂ωc ∂ωHtot(t) = 0. From Eq. (S8), it can be seen that

Z t h ∂2 U(0 → t) = − i ∂ U(t0 → t)∂ H (t0)U(0 → t0) + U(t0 → t)∂2 H (t0)U(0 → t0) ωc ω =ω ωc ωc tot ωc tot c 0 (S46) 0 0 0 i 0 + U(t → t)∂ωc Htot(t )∂ωc U(0 → t ) dt , ωc=ω and Z t 0 h 00 00 0 00 i 00 ∂ω U(t → t) = −i U(t → t)∂ω Htot(t )U(t → t ) dt , (S47) c ωc=ω c t0 ωc=ω so it can be obtained that

2 1 2 2 2 ωT ωT i 3 ωT ωT ∂ω U(0 → t) = − T (1 + B T )(cos I + i sin σY ) + BT (cos σX + sin σZ ), (S48) c ωc=ω 4 2 2 6 2 2 thus,

2 5 4 2 4B T BT ∂ω hω(T ) = σY + σZ . (S49) c ωc=ω 15 4

Therefore, hω(T ) can be expanded in the vicinity of ωc = ω as

BT 2 BT 3 4B2T 5 BT 4  δω2 h (T ) = − σ − σ δω + σ + σ + O(δω3), (S50) ω 2 Z 3 X 15 Y 4 Z 2 where δω = ωc − ω. The eigenvalues of hω(T ) in Eq. (S50) are

BT 2 1 λ = ± ∓ BT 4δω2 + O(δω4), (S51) ± 2 72 so, finally, the Fisher information for ω with ωc near ω is 1 I(Q) = B2T 4(1 − T 2δω2), (S52) ω 18 where higher order terms of δω have been neglected. This shows that when ωc is deviated a little from the true value of ω, the drop in Fisher information is only of the order δω2, and the T 4 scaling is unaffected, implying the reliability of the above Hamiltonian control scheme. It lays the foundation for the feedback control scheme to approach the T 4 scaling which will be introduced in the next Supplementary Note.

SUPPLEMENTARY NOTE 5. ADAPTIVE HAMILTONIAN CONTROL FOR ESTIMATING ω

Basing on the result in Supplementary Note 4, we can design schemes to approach the T 4 scaling of the Fisher information for estimating ω when the exact value of ω is unknown and an estimate of ω is used in the control Hamiltonian. We first give an overall analysis about why the Hamiltonian control may increase the Fisher information. In order to apply the Hamiltonian control scheme, we need an estimate of ω to be used as the control parameter ωc in the control Hamiltonian. But if the precision of the estimate of ω needed is comparable to the precision that can be gained, the Hamiltonian control scheme would be senseless. Fortunately, Eq. (S52) shows that an approximate ω with a precision δω of order 1/T is sufficient to produce an estimate of ω with a precision of order T −2 (i.e., the Fisher information is of order T 4). This guarantees that the Fisher information can be increased by the Hamiltonian control scheme. The simplest feedback control scheme is just to first obtain an initial estimate of ω without any Hamiltonian control, then use it in the Hamiltonian control (S39) to produce a high precision estimate of ω, without any iteration of the scheme. If the initial estimate of ω without Hamiltonian control is sufficiently good, Eq. (S52) guarantees that the final estimate of ω with the Hamiltonian control can attain the Fisher information of order T 4. 18

For the initial estimation of ω, suppose the qubit evolves for time T without any Hamiltonian control and then it is measured to estimate ω, and this procedure is repeated for N times. According to Eq. (S36), the variance of the estimate is 4B2 + ω2 hδω2i = , (S53) 4NB2T 2 √ where we assumed T  1/ 4B2 + ω2 to neglect the lower order terms of T for simplicity. Then if we apply the control Hamiltonian with this estimate of ω and let the qubit evolve for the same time T , the Fisher information of the final estimation will be  4B2 + ω2  I(Q) = B2T 4 1 − . (S54) ω 72NB2

1 ω2 Obviously, if N  18 (1 + 4B2 ), then

(Q) 2 4 Iω ≈ B T , (S55) which reaches the T 4 scaling. The price for this scheme is that we need additional time NT to obtain an initial estimate of ω in the absence of the Hamiltonian control. But as the additional time NT is linear with T , the T 4 scaling with the Hamiltonian control can still significantly outperform the usual T 2 scaling without the Hamiltonian control. However, we can also feed the new estimate of ω from the estimation with the Hamiltonian control back into the control Hamiltonian so that a better estimate of ω can be produced, and this step can be iterated to further refine the estimate of ω. This will make the feedback control scheme more efficient. In the following, we give a detailed analysis about such an adaptive feedback control scheme, and show a minimum requirement for the precision of the initial estimation of ω without Hamiltonian control to make the feedback control scheme work. For the sake of generality, we assume the Fisher information of each measurement in the initial estimation without Hamiltonian control is I0, and the measurement is repeated N times, then the variance of the initial estimate of ω is 1 hδω2i = . (S56) NI0 √ Now, we apply the Hamiltonian control with this estimate of ω and choose the evolution time as T1 = I0, then the Fisher information will be 1 I = B2I2(1 − ). (S57) 1 0 18N

We repeat the√ measurement N times, and use the new estimate of ω in the control Hamiltonian. Let the qubit evolve for time T2 = I1, then the Fisher information becomes 1 1 I = B2I2(1 − ) = B6I4(1 − )3. (S58) 2 1 18N 0 18N p If we iterate this process for n rounds and choose the evolution time in the n-th round to be Tn = In−1, the Fisher information is 1 I = B2I2 (1 − ). (S59) n n−1 18N It can be derived from this iterative relation that

2n−2 2 1 2n−2− 1 T = I [B (1 − )] 2 , (S60) n 0 18N and

n 1 n I = I2 [B2(1 − )]2 −1. (S61) n 0 18N

In terms of Tn, In can be rewritten as 1 I = B2T 4(1 − ). (S62) n n 18N 19

2 4 4 If N is large, In ≈ B Tn then. This recovers the T scaling of the Fisher information in the presence of Hamiltonian control. A question is how many rounds of feedback control it takes to reach Tn = T for a desired time T . From Eq. (S60), it can be obtained that   q   ln BT 1 − 1  18N  n = log2   + 2. (S63)  ln B2I (1 − 1 )   0 18N 

It can be seen that when T is large,

n ∼ dlog2 ln T e , (S64) which is a double logarithm of T , implying n increases extremely slowly with T and very few rounds of feedback control is sufficient to reach a large T . So this iterative feedback control scheme converges to the T 4 scaling very fast. We also want to remark that there is a lower bound that I0 must satisfy in order to increase the Fisher information by this method. For Eq. (S57), I1 is not always larger than I0, and if we want to increase the Fisher information, we need I1 > I0, so it requires 1 I > . (S65) 0 2 1 B (1 − 18N )

1 When I0 is above this threshold, I1 will also be larger than 2 1 as the Fisher information increases. This B (1− 18N ) again makes I2 > I1. Repeating this step, we will find that the Fisher information is always increasing, and thus 4 the allowed T for the T scaling is also increasing. On the contrary, if I0 does not satisfy the lower bound in Eq. (S65), I1 would be smaller than I0, I2 would be smaller than I1, and so forth. Therefore, Eq. (S65) is the minimum requirement for the precision of the initial estimation of ω without Hamiltonian control in order to make the iterative feedback control scheme work. If T is so small that Eq. (S63) becomes negative, we just need to set n = 1 and the T 4 scaling can be attained. 4 Note that the Tn given in Eq. (S60) is just the upper bound of T that the T scaling can be achieved (up to a relative loss of 1/N) in the n-th round, it does not mean that T must be chosen as Tn in that round. We summarize this iterative feedback control scheme as follows. First, a rough estimation of ω should be made in the absence of the Hamiltonian control with the Fisher information satisfying the threshold (S65), then the estimate of ω is used to apply the Hamiltonian control and get a new estimate of ω. The new estimate of ω can be fed back to the control Hamiltonian to further update the estimate of ω. This procedure is repeated for n rounds until the desired evolution time T is reached, and the number of rounds is given by Eq. (S63). The relative loss of Fisher 1 information due to the finite number of measurements is 18N , where N is the number of measurements in each round of the feedback control scheme, which does not affect the T 4 scaling.

SUPPLEMENTARY NOTE 6. ADDITIONAL CONTROL AT LEVEL CROSSINGS OF ∂gHg(t)

In this Supplementary Note, we analyze the effect of the additional control Ha(t) proposed in the Methods of the main manuscript. We first prove that under an arbitrary unitary transformation V (t) on the states, a Hamiltonian H(t) is transformed to

0 † † H (t) = i(∂tV (t))V (t) + V (t)H(t)V (t). (S66)

Consider an arbitrary state |φ(t)i evolving under H(t). It satisfies the Schrödinger equation

i∂t|φ(t)i = H(t)|φ(t)i. (S67)

Now, if we transform the state |φ(t)i to |ϕ(t)i = V (t)|φ(t)i, then |ϕ(t)i satisfies

i∂t|ϕ(t)i =i∂t(V (t)|φ(t)i)

=i(∂tV (t))|φ(t)i + iV (t)|∂tφ(t)i (S68) † † =i(∂tV (t))V (t)|ϕ(t)i + V (t)H(t)V (t)|ϕ(t)i. 20

Therefore, the Hamiltonian for |ϕ(t)i is the H0(t) in Eq. (S66). Now we return to our problem. In the presence of the optimal control Hamiltonian, the total Hamiltonian is

Htot(t) = Hg(t) + Hc(t) + Ha(t), (S69) where X X Hc(t) = fk(t)|ψk(t)ihψk(t)| + i |ψk(t)ih∂tψk(t)| − Hg(t), k k (S70)

i(θm(t)−θn(t)) i(θn(t)−θm(t)) Ha(t) = h(t)[e |ψn(t)ihψm(t)| + e |ψm(t)ihψn(t)|], and Z t 0 0 θk(t) = fk(t )dt . (S71) 0

−iθ (t) To see the effect of the total Hamiltonian clearly, let us transform the time-dependent eigenbasis {e k |ψk(t)i} of ∂gHg(t) to an arbitrary time-independent basis {|ki}. The transformation can be written as

X iθk(t) V (t) = e |kihψk(t)|. (S72) k Then the Hamiltonian in the new basis can be obtained from (S66). It is straightforward to verify that

† X i(θk(t)−θj (t)) X i(∂tV (t))V (t) = i e h∂tψk(t)|ψj(t)i|kihj| − fk(t)|kihk|. (S73) kj k and

† X X i(θk(t)−θj (t)) V (t)(Hg(t) + Hc(t))V (t) = fk(t)|kihk| + i e hψk(t)|∂tψj(t)i|kihj|, k kj (S74) † V (t)Ha(t)V (t) =h(t)σmn, where σmn is the σX -like transition operator between |mi and |ni,

σmn = |nihm| + |mihn|. (S75)

So, by the transformation V (t) (S72), the total Hamiltonian Htot(t) becomes

0 Htot(t) = h(t)σmn, (S76) where we have used

h∂tψk(t)|ψj(t)i + hψk(t)|∂tψj(t)i = ∂thψk(t)|ψj(t)i = ∂tδkj = 0. (S77)

Eq. (S76) indicates that the state |ni will be transformed to |mi in the new basis {|ki} by the total Hamiltonian with the additional control, so in the original basis, |ψn(t)i will be transformed to |ψm(t)i correspondingly, which is exactly what we want. 0 0 Note that Htot(t) commutes between different t, so the evolution in the new basis {|ki} under Htot(t) for a short 1 1 time interval τ − 2 δt ≤ t ≤ τ + 2 δt is

1 1 1 Z τ+ 2 δt Z τ+ 2 δt Z τ+ 2 δt 0 h 0 0 i 0 0 0 0 U (t) = exp − i h(t )dt σmn = I cos h(t )dt − iσmn sin h(t )dt , (S78) 1 1 1 τ− 2 δt τ− 2 δt τ− 2 δt where τ is the moment that the level crossing occurs. To drive the system exactly from |ψn(t)i to |ψm(t)i, which corresponds to driving |ni to |mi in the new basis {|ki}, we need

1 Z τ+ 2 δt cos h(t0)dt0 = 0, (S79) 1 τ− 2 δt 21 thus h(t) must satisfy

1 Z τ+ 2 δt 0 0  1 h(t )dt = l + π, l ∈ Z. (S80) 1 2 τ− 2 δt This proves Eq. (23) in the main text. 1 l 0 l+1 A notable point in Eq. (S78) is that since sin(l + 2 )π = (−1) , U (t) will introduce an additional phase (−1) i to |ψm(t)i and |ψn(t)i. This will affect the relative phase and needs to be taken into account, when the system is in a superposed state involving |ψm(t)i or |ψn(t)i. When there are multiple crossings between the maximum/minimum eigenvalue and other eigenvalues of ∂gHg(t) during the whole evolution process 0 ≤ t ≤ T , an additional Hamiltonian control Ha(t) is needed at each level crossing.