Linear Ascending Metrological Algorithm

The ubiquitous presence of shot noise sets a fundamental limit to the measurement precision in classical metrology. Recent advances in quantum devices and novel quantum algorithms utilizing interference effects are opening new routes for overcoming the detrimental noise tyranny. However, further progress is limited by the restricted capability of existing algorithms to account for the decoherence pervading experimental implementations. Here, adopting a systematic approach to the evaluation of effectiveness of metrological procedures, we devise the Linear Ascending Metrological Algorithm (LAMA), which offers a remarkable increase in precision in the demanding situation where a decohering quantum system is used to measure a continuously distributed variable. We introduce our protocol in the context of magnetic field measurements, assuming superconducting transmon devices as sensors operated in a qudit mode. Our findings demonstrate a quantum-metrological procedure capable of mitigating detrimental dephasing and relaxation effects.


I. INTRODUCTION
The shot noise sets a fundamental limit to the measurement precision, which is often referred to as "noise tyranny."Quantum algorithms utilizing interference effects offer new opportunities to overcome it [1][2][3][4][5][6][7].However, existing algorithms cannot account for the decoherence controlled experimental conditions [8].Our work develops a systematic approach in evaluation of the effectiveness of metrological procedures and seeking an efficient solutions.To that end, we devise the Linear Ascending Metrological Algorithm (LAMA) applicable and guaranteeing an enhanced precision in the case where a decoherent quantum system is used to measure a continuously distributed variable.We introduce our protocol in the context of magnetic field measurements, assuming superconducting transmon devices as sensors operated in a qudit mode [9].
Phase estimation protocols first appeared in abstract quantum algorithms, where they served in estimating the phases of a unitary operator's eigenvectors, and soon found practical applications in quantum metrology [10][11][12][13][14][15][16].Among many implementations, the Kitaev- [17,18] and Fourier-transform- [19] algorithms, in combination with superconducting transmon circuits [20] utilized as sensors, proved most efficient in magnetometry.The basic concept of a magnetic-field sensor based on a spin interacting with the field has evolved into experimentally realizable devices based on charge-and flux-qudits [8,[21][22][23].However, the standard quantummetrological protocols concede their optimal precision in the most relevant situation where the field is continuously distributed and the quantum sensor suffers from decoherence.Information gain for different initial states.Expected information gain during the first measurement step assuming a continuously distributed magnetic field: blue and red lines correspond to the situations where the qutrit is initially prepared in the balanced state (as in the standard Fourier procedure) and in the state (1, √ 2, 1) T /2 ∈ H 3 XY , respectively.The initial field distribution is P 0 ω | ø = N(0, σ 2 ) with σ = 2π/(90 ns).The saturation time is defined by the initial distribution of the magnetic field, T s ∼ 1/σ; the plateau-levels of the blue and red curves are, respectively, (5/3−ln 3)/ ln 2≈0.82 bit and 2((ln 2) −1 −1)≈0.88bit.
during a time t i : |ψ 0 (i) →|ψ t i (i) .The field changes the phases inside the state vector such that the basis state |k (k = {0, 1, . . ., d − 1}) transforms into e ikωt i |k , where ω = µH/ is the reduced magnetic field; we omit a common phase factor, see Appendix A for details on the transmon phase accumulation dynamics.R The qudit is subjected to a readout operation (unitary evolution) Ûr (i) generated by another rf-pulse [9].The information about the field value is subsequently extracted through the final state's single-shot projective measurement in the computational basis.
The probability of finding the qudit in the state |ξ i (ξ i = {0, 1, . . ., d − 1}) at the end of the ith step is where s i is the array of parameters determining the initial state and the readout operation, see Appendix B. Throughout the metrological procedure, or 'learning' process, our knowledge about the field is reflected in the probability distribution P n ω | {ξ i , t i , s i } n i=1 , where n indicates the number of conducted PER steps.This distribution is updated in accord with Bayes theorem via the recurrence ) where N n is a normalization factor; for ease of presentation (see Appendix F), we will assume that the initial field distribution is Gaussian with zero mean, P 0 ω | ø = N(0, σ 2 ).As shown below, the initial field uncertainty δω 0 = σ determines the difficulty of the further refinement: the smaller δω 0 is, the harder it is to achieve better precision.

III. EFFICIENT PROCEDURE
In an efficient metrological procedure, a measurement step strongly reduces the uncertainty with regard to the possible field values.This uncertainty is reflected in the Shannon entropy associated with P n , The decrease ∆I n = S n−1 − S n in entropy then provides us with the information gain in the nth measurement step.The optimal procedure yielding the maximum information gain in the (n+1)st step requires the best choice of the parameters t n+1 and s n+1 .Since the values of parameters are required before the step is executed, the optimization has to be done by maximizing an estimate of the prospective information gain.This estimate is taken as the information gain after the (n+1)st step averaged over all possible outcomes ξn+1 of this step. where The optimal choice of parameters {t, s} = {t n+1 , s n+1 } is dictated by the condition of maximizing the average gain ∆I n+1 {ξ i , t i , s i } n i=1 , { ξn+1 , t, s} .In other words, the analytical expression for the average information gain serves as a prognosis for the upcoming information gain, and its maximization yields the most beneficial choice of parameters.
In order to find the optimal choice for s 1 defining the preparation and readout gates in the first step, we maximize the expected information gain ∆I 1 ξ1 , t, s for every possible value of the Ramsey delay time t.Focusing on the case of a continuously distributed field (i.e., ω can take any value from a certain interval [ω min , ω max ]) measured with a qutrit sensor, a numerical analysis (see Appendix B) shows that, intriguingly, for any t the optimal initial state preparation requires a maximum modulus of the spin projection into the XY-plane, perpendicular to the field vector, J XY = ĴX 2 + ĴY 2 (here ĴX and ĴY are, respectively, X-and Y-component spin operators): let H d XY be the subspace of such vectors for the qudit (base-d) system.For a qutrit, any vector |φ ∈ H 3  XY can be written in the form |φ = e iα 2 (e iβ , √ 2, e −iβ ) T , where α and β are real numbers.A convenient choice is the initial state |ψ 0 (1) = (1, √ 2, 1) T /2 ∈ H 3 XY , which is the eigenstate of the spin operator ĴX .For comparison, in the standard Fourier-based procedure (see Ref. [9] and Appendix D) as optimized for the measurement of a discretely distributed field (i.e., ω can only take M values {ω min , ω min + ∆ω, ω min + 2∆ω, . . ., ω max } with ∆ω = (ω max − ω min )/M) the qutrit is initially prepared in the balanced state [3] (1, 1, 1) T / √ 3 H 3 XY .Physically, the larger spin component perpendicular to the field ( J XY = 1 in the optimal case versus 2 √ 2/3 ≈ 0.94 in the case of the balanced state) ensures a better sensitivity; note, that in the qubit case, the balanced initial state (1, 1) T / √ 2 has already the largest perpendicular component and thus cannot be further optimised.Turning to the readout gate, our analysis shows that, for any t, the optimum is always achieved with the Fourier transform gate we remind that for the discretely distributed field the Fourier transform readout operation is also optimal [3].
The difference between the standard Fourier-based procedure and the described new optimal procedure (with the initial qutrit state |ψ 0 = (1, √ 2, 1) T /2 ∈ H 3 XY ) in the continuous situation is illustrated in Fig. 1, where we plot the expected information gain ∆I 1 ξ1 , t, s in the first step as a function of the Ramsey delay time t with s corresponding to different initial states and the standard Fourier transform readout operation.In both cases the information gain saturates at the time T s ∼ 1/δω 0 which is defined by the initial field uncertainty δω 0 = σ; a small δω 0 increases T s , what makes it increasingly harder to further improve the precision, particularly in the presence of decoherence.For the described optimal procedure, the curve reaches a plateau that is higher by 8%, with an information gain of 2((ln 2) −1 −1)≈0.88bit against (5/3−ln 3)/ ln 2≈0.82 bit for the balanced state.Hence, when changing from a discrete to a continuous field distribution, the metrological algorithm profits from a refinement in the choice of initial states.We note that any initial state from H 3 XY yields the same (high) plateau level but with the information gain for t < T s depending on the specific choice of |ψ 0 (1) ∈ H 3 XY ; as these differences are small, we do not pursue them further here.In the second and further subsequent steps, both scenarios maintain the feature of saturation in the information gain per step, although some interesting new features appear, see Appendix G for a detailed analysis of further optimization steps.
Ordinarily, it is the quantum Fisher information (QFI) estimate which is used as a performance metric.Here, we rather use the information gain as a performance metric which due to the postselection nature of our sensing protocol appears more appropriate.As described above, the probability distribution of a magnetic field is updated according to the measurement conducted over different quantum states on each step of the algorithm.While commonly used Cramér-Rao bound, which is based on QFI, gives the asymptotic potential accuracy that can be achieved with a fixed quantum state, our protocol exploits a different approach and, therefore, can not be analyzed in the context of Fisher information in an evident way.
1 and t L 2 are the selected delay times on the first and second steps, respectively.The gain in the second step depends on the outcome of the first step, see dashed red line when 0 is measured and solid red line for outcomes 1 or 2.

IV. LINEAR ASCENDING METROLOGICAL ALGORITHM
Expanding further on the above findings, we develop a novel quantum metrological procedure exploiting phase coherence which ensures a near-Heisenberg limit scaling even in the presence of dephasing processes when the Kitaev-and standard Fourier protocols (see the descriptions in Appendixes E and D) become ineffective.
The precision of a metrological algorithm is bounded by the maximum possible number of iterations.In the case of the standard Fourier-and Kitaev procedures, the limitations are imposed by the coherence time T c and the characteristic duration of the control pulse T p (as described above, the evolution of the transmon qudit is determined by the applied rfpulses, which cannot be made arbitrarily short and are defined by the hardware) -these times bound the Ramsey delay on the longest and shortest time steps of the procedure, respectively.Since in both procedures the delay time of each consequent step changes exponentially (meaning that at each consequent step the delay time is either increased or decreased by factor d), the number of steps which can be realized in practice is small [8].One could then think of performing multiple PER steps with the same delay time, as the recent state-of-art techniques enable rather rapid transmon measurement-and reinitialization procedures [26,27].However, such a routine is essentially classical -hereinafter, this routine will be referred to as the classical procedure -and its precision is therefore restricted by the shot noise limit [6].To overcome these problems, we propose a novel Linear Ascending Metrological Algorithm or LAMA for qudit sensors that combines both classical productivity and quantum scalability and, furthermore, surpasses the efficiency of the Fourier-and Kitaev algorithms in common realistic scenarios.The ith step of the LAMA includes the following PER sequence: P The qudit is prepared in an initial state |ψ 0 within H d XY (the same in every step).In the qutrit case, ), where α and β are real numbers.
E The qudit is exposed to the magnetic field during the predefined (rather than optimized) time interval t L i = t L 1 + (i − 1) ∆t, with ∆t chosen of order ∼ 1/δω 0 , where δω 0 is the initial field-uncertainty and t L 1 = max (T p , T s ).
R The qudit is subjected to the Fourier transform Fd , and a subsequent single-shot projective measurement of its state in the computational basis.The probability distribution of the magnetic field is updated in accordance with Bayes formula.
A great simplification of the LAMA is the use of a fixed parameter set s i = s for preparation and readout that does no longer require further optimization after each step.The following discussion of the algorithm concerns again the case of a continuously field and refers to the example of a qutrit with the optimized initial state different from the balanced one.While the qubit implementation of the new algorithm cannot make use of a further optimisation of the initial state, the linear increase in the delay time t i characteristic of the LAMA is still advantageous.
To see how the algorithm works, we first examine the case of an ideal hardware in the absence of decoherence, T c → ∞.Fig. 2 compares the information gain in the second step (red; solid and dashed lines correspond to different outcomes of the first step) with the result obtained in the first step (blue) of the algorithm as function of the delay time t.In order to obtain the maximal information in the first step within the shortest time interval, we choose the delay time at the onset of the saturation plateau, t L 1 = T s .The saturation time T s ∼ 1/σ is determined by the expected search range of magnetic fields [ω min , ω max ] that represents the dynamic range of the sensing device.In Fig. 2, as well as in the following numerical analysis, we set σ = 2π/(90 ns) that ensures the maximum achievable dynamic range at reasonable saturation time of the expected information gain.This choice of σ gives T s ≈ 15 ns which corresponds to the fastest possible manipulations of transmons -it becomes unfeasible to control superconducting devices using T p < 10 −8 s rf-pulses, thus, dynamics at shorter times is not meaningful for metrological purposes.In the second step, the expected information gain again saturates at large delay t L 2 , but is reduced at small times ∼ t L 1 .This reduction expresses the fact that we have already obtained some information associated with the previous delay time t L  1 ; nevertheless, due to the probabilistic nature of the quantum procedure, the prospective information gain remains non-zero.Depending on the outcome of the first step, the gain in the second step may or may not exhibit an additional peak at a delay time below t L 1 , see dashed line.The appearance of such a new peak in the information gain in step 2 depends on the relation between the previous outcome ξ 1 and the chosen initial state for step 2 within the XY-plane.The nature of such dependence is the following: we update the field probability distribution based on the measurement outcome, reducing the distribution's variance at each step.The mean of the distribution indicates the most probable magnetic field value and it drifts to the true value during the sensing procedure.For the qutrit case, while ξ 1 = 0 outcome does not change the mean of the distribution, ξ 1 = 1 and 2 outcomes shift the mean on the right and on the left respectively.Besides this feature, with a proper choice of s 2 the additional peak in the information gain appears at 3t L 1 (dt L 1 for a qudit), where the next step of the Kitaev procedure should be conducted; the correspondence of the appearing peak with the standard Fourier-based procedure is discussed in the G. Instead of attempting to extract this peak information gain by choosing the new initial state parameters s 2 in accordance with the previous outcome, we prepare the qutrit in the same initial state (with parameters s 1 ), and adopt a time step t L 2 = t L 1 + ∆t with ∆t = C/δω 0 , δω 0 = σ.Evaluation of the optimal prefactor C for each step requires substantial computational time, therefore we will not concentrate on this optimisation.Instead, we numerically find the optimal C ≈ π and fix it for the whole metrological procedure.As we will show further, this choice of a constant time step already ensures the performance which, in the presence of decoherence, beats both classical and Fourier/Kitaev quantum procedures.This choice of ∆t and t L 2 again enables us to exploit the information gain near the plateau of step 2 and learn nearly 0.88 bit of information.The subsequent steps follow the same route: regardless of the previous outcomes, the qutrit is always prepared in the same state parametrized by s 1 , while the linear increase of the delay time allows to operate away from the emerging drops in the information gain, ensuring the advantage of the LAMA over the classical procedure.This straightforward algorithm then provides a great simplification as compared to the other algorithms involving Bayesian learning.
Shown in Fig. 3(a) are the numerically simulated probability distributions for the magnetic field for a six-step procedure; in turn, Fig. 3(b) displays a series of expected information gains, see Eq. ( 4), before the next measurement.As the algorithm proceeds, the extracted information per step decreases below the saturation limit of 0.88 bit with the plateau level first shifting further out to longer delay times and then decreasing over the entire time interval.Nevertheless, as shown below, the practical realization of the LAMA can be quite beneficial in terms of the total information accumulation and scalability.More 3D plots such as Fig. 3 for different sets of outcomes are presented in Appendix H.
Next, we compare the LAMA with the existing metrological procedures for the experimental situation where the initial field distribution is continuous and the qutrit is subject to decoherence, i.e., T c is finite; details on how our model accounts for dephasing and relaxation are given in Appendix C. For simplicity, we assume that the minimal pulse duration T p is much smaller than the saturation time T s in the  in the classical (black), Kitaev (green), and standard Fourier (blue) procedures as functions of the total phase accumulation time; the red curve provides the result for the new LAMA.The symbols mark the individual steps of the four procedures.All curves are averaged over a series of 10 3 numerical experiments (for details of the simulation see the main text).We have chosen T s = 15 ns, P 0 ω | ø = N(0, σ 2 ) with σ = 2π/(90 ns) and T p < T s .The initial delay time in the classical, t C 1 , and Kitaev, t K 1 , procedures and in the LAMA, t L 1 , is 15 ns; in the case of the LAMA, the time increase per step is ∆t = 40 ns.In (a) the standard Fourier procedure is represented by three curves corresponding to different initial delay times: t F 1 = 0.5 µs, 2.4 µs, and 5 µs.In the case of the Fourier procedure, a larger t F 1 allows to perform more steps of the algorithm since on each step we are decreasing time from t F 1 to T s .However, due to the decoherence, it also results in an insufficient information gain in the first steps, t F 1 approaches T c .In the case of the Kitaev procedure, decoherence affects last steps since they are performed at larger delay times.The final gain in the Fourier case corresponds to the gain obtained with the Kitaev procedure at the same total phase accumulation time.Note that the highest points of blue curves collapse onto the green curve.This is not a surprise since the Fourier and Kitaev procedures are expected to provide the same performance; for that reason we do not plot curves for the Fourier procedure in (b).All curves in (a) are obtained for the same coherence time T c = 5 µs, whereas in (b), we show three green curves corresponding to the Kitaev procedure for three different values of T c , 5 µs (circles), 10 µs (squares), and 30 µs (triangles); the red and black curves referring to the LAMA and to the classical procedure are obtained for T c = 5 µs.The yellow straight line marks the Heisenberg quantum limit with scaling parameter α = 1.
first step, what limits the delay time t L 1 = max (T p , T s ).We base our comparison on a numerical simulation constituting a series of 10 3 separate computational experiments.In each experiment, we numerically perform 50 sequential steps of the LAMA in accordance with the above scheme, keeping the parameters T c , T s , t L 1 , and ∆t the same for every ex-periment.The outcomes of the simulated experiments are generated randomly: in the nth step, the computer samples the outcome ξ n from the probability distribution To determine the efficiency of the procedure, we compose the results of all computational experiments, i.e., we plot the information gain av-eraged over the series of individual experiments as a function of the total phase accumulation time.We compare the LAMA with other algorithms through simulating the operations of the latter in an analogous manner, although the number of steps in the individual experiments may change as required by the different algorithms.
The results of the simulations are summarized in Fig. 4(a), where we show the total information gain as a function of the phase accumulation time t φ = i t i (the sequence t i denotes all Ramsey delay times).The plot demonstrates that for a typical device and almost any total phase accumulation time t φ , the LAMA allows for a larger information gain, thus providing a higher precision, as compared with the more intricate standard Fourier-and Kitaev protocols.This is particularly evident for large accumulation times t φ T c when the LAMA surpasses other algorithms by 30%, whereas the standard Fourier-and Kitaev procedures provide no significant advantage over the trivial classical procedure.
Finally, we analyse the scaling behaviour of the new LAMA.The efficiency of a metrological procedure is reflected in the dependence of the field-uncertainty upon the total phase accumulation time [8], δω(t φ ) ∝ t −α φ .A proper quantum algorithm should exceed the shot noise limit of α = 0.5, ideally reaching the Heisenberg limit α = 1.Since for any accumulation time t φ the total information gain is given by I − ln [δω(t φ )] + ln [δω(0)], see Eq. ( 3), the scaling can be analyzed in a plot of I as function of ln t φ .The lin-log plot in Fig. 4(b) displays the scaling behaviour of the classical (in black, same curve for any (classical) delay time t C T c ; if t C T c , the procedure operates below the shot noise limit) and standard Fourier/Kitaev procedures (in green, three curves for T c = {5, 10, 30} µs), as well as the new LAMA (in red, T c = 5 µs) for the continuous field with decoherence included.The curves corresponding to the standard Fourier-and Kitaev procedures (green) are indistinguishable.The scaling parameter α can be obtained from the slope of a tangent to a curve at any particular point.As one expects, for any T c larger than the delay time of a step, the classical procedure complies with the shot noise limit, α = 0.5.We also see that, although for t φ T c the standard Fourier and Kitaev procedures approach the Heisenberg limit, for t φ ∼ T c , the value of α drops almost to zero.In turn, the new LAMA, though behaving classically for small t φ , becomes much more efficient than the Fourier/Kitaev procedures for t φ ∼ T c , with α reaching its maximum 1 in an intermediate region at t φ 1.1 T c , at which point the delay time per step t L i T c /7.One can see that a finite coherence time T c does not posit any notable limitation on the LAMA's efficiency until the delay time t L i becomes comparable with T c ; at large accumulation t φ ∼ 10 T c the algorithm still operates close to the shot noise limit with α 0.5.Importantly, we see that even when implemented on a mediocre transmon qutrit device with T c = 5 µs, the new LAMA is capable to outperform other algorithms realized with a cutting edge device with T c = 30 µs [28].

V. CONCLUSION
In summary, we have proposed a simple and robust sequential quantum metrological algorithm for magnetometry, the LAMA, which is characterised by two important features, (i) each measurement step involves a linear increase of the Ramsey delay time, and (ii) the qudit is always initialized in the same state of maximal spin perpendicular to the field.The prescription of these measurement parameters drastically reduces the complexity of the algorithm as compared to algorithms requiring learning.The linear increase in the Ramsey delay time guarantees an improved performance as compared to the classical algorithm, where the repeated measurement at the same Ramsey time produces a steadily reduced information gain with each additional step.We have compared our algorithm with quantum Fourier and Kitaev algorithms and demonstrated that the LAMA provides a markedly better performance in the realistic situation where the qudit is subject to decoherence and the measured field is distributed continuously.As the decoherence limits the delay time range, the LAMA should enable us to utilize the resource of quantum coherence more effectively: by comparison with other algorithms, the LAMA better spans the full available range of times and thus allows for more iterations and better scaling.The presented results have far reaching implications going beyond the context in which they were derived.We anticipate our findings to accelerate the progress towards reliable quantum magnetic sensors and find use in other applications.
Appendix A: Transmon phase accumulation dynamics Here, we discuss the working principles of the transmon device in the context of magnetic field sensing; an extended discussion on the subject can be found in [9].Let us examine the evolution of the transmon device operating in a qudit mode (having effectively d energy levels) in the presence of the magnetic field.The transmon's transition energies can be described to leading order by the expression where E n is the energy of the nth level, E J (ω) is the Josephson energy sensitive to the field ω, and E c is the charging energy.Note, that the dependence of the different transition energies on the magnetic field is identical, as it is determined solely by E J (ω).As a result, the first-order correction to the energy separation E 0,n = E n − E 0 in the presence of the magnetic field is given by for any n ∈ {0, . . ., d − 1}.Thus, the phase accumulation due to the field is linear in n and we obtain the following expression for the effective evolution operator in the rotating frame approximation, For simplicity, in what follows we put ∂ ω E 0,1 = 1.The above linear phase-accumulation dynamics is crucial for the implementation of all algorithms discussed in the paper.At the same time, the LAMA can be realized on any other multilevel system beyond the transmon, provided that the level separations scale equally in the magnetic field.

Appendix B: Optimization method
Here, we elaborate on the general qutrit realization of the PER protocol in the ith step [9] (all matrices are represented in the computational basis |k , k = {0, 1, 2}): P The qutrit is initialized through the application of a twotone rectangular rf-pulse [9] to the ground state |0 .The unitary evolution induced by the pulse has the form and results in the state |ψ 0 (i) = Û p (i) |0 .Here, ∆ p 1,2(i) are effective transition amplitudes between qubit states and p (i) is related to the pulse frequencies; their optimal values can be found by numerical optimization [9].
E The qutrit interacts with the external magnetic field H during time t i : |ψ 0 (i) → |ψ t i (i) .The field changes the phases inside the state vector: |k → e ikωt i |k (k = {0, 1, 2}), where we omitted a common phase factor.In the absence of decoherence, the evolution operator is given by R The qutrit undergoes a readout operation generated again by the pulse Finally, the information about the field value is extracted through the single-shot projective measurement of |ψ f (i) = Ûr (i) |ψ t i (i) in the computational basis.
The above PER-sequence yields a fairly cumbersome expression for the final state (before the measurement) |ψ f Û p (i) |0 and we refrain from providing it here.The optimization of the (n+1)st step for a given delay time t attempts to find the preparation and readout parameters , ∆ r 1(n+1) , ∆ r 2(n+1) ) that produce the maximum expected information gain on that step, where the averaging is done in accordance with Eqs. ( 4) and (5).
To implement and optimize numerically the above procedure, we model the continuous field by an evenly spaced grid with the large number of points M=10 5 ; the initial field values are Gaussian weighted, P 0 ω | ø =N(0, σ 2 ) with σ=2π/(90 ns).We choose σ in a way that the saturation time of the expected information gain is T s ≈ 15 ns -it becomes impracticable to apply gates faster than 10 −8 s to transmon devices.In the first step, the optimal choice of s 1 for a given t corresponds to the maximum of the averaged information gain ∆I 1 ξ1 , t, s .Since for the numerical calculations the continuous distribution is modelled by a discrete one, the integral with respect to ω has to be replaced by a sum Here P( ξ1 | ω m , t, s) is given by Eq. (1); the expression for S 1 ξ1 , t, s can be obtained from Eqs. ( 2) and ( 3), . (B6) Appendix C: Relaxation and dephasing processes We extent our model to account for the decoherence processes appearing in the transmons.When the Ramsey delay time t i becomes comparable to the coherence time T c , the state analysis requires solving a kinetic equation, which we choose of the Lindblad form [29], with Ĥint the interaction Hamiltonian Γ i j are the energy relaxation rates, and the superoperator D describes the process of energy relaxation, with the Lindblad operators σi j = |i j| (i, j = {0, 1, 2}).
In addition, we consider fluctuations δH of the field due to fluctuating electric currents or magnetic impurities, assuming Gaussian noise parametrized by the dephasing rate Γ ϕ , The above extensions are incorporated in our PERprocedure in the following manner: P In the ith step, the qutrit is put in the initial state defined by the density matrix ρ0 E The qutrit interacts with the external magnetic field H with corresponding changes of the phases in the density matrix, which is furthermore affected by the decoherence processes, ρ0 (i) → ρ(i) (t i ).The elements ρ pq (i) (t i ) (p, q ∈ {0, 1, 2}) of the resulting density matrix can be expressed through the elements of π(i) (t i ) describing the qutrit state after the interaction in the absence of deco-herence, R The qutrit undergoes the readout operation Ûr (i) and the final state is subjected to the single-shot projective measurement.
As an example, we consider the first step of the standard Fourier procedure in the presence of dephasing.Using the above formulas and Eq. ( 1), we can write the probability of finding qutrit in state |ξ 1 in the form In our simulations, we assume Γ 01 = Γ 12 / √ 2 = Γ ϕ = Γ and describe the decoherence rate by the coherence time T c = 1/Γ.

Appendix D: Fourier-based metrological algorithm
The standard Fourier-based algorithm is a sequence of PER steps performed with different delay times.Including learning, the algorithm involves a conditional initial preparation at each step that depends on the previous outcome.The ith step of the base-3 procedure can be described by the following scheme: and ξ j is the outcome of the jth step (and α 1 = 0), E the system is exposed to the magnetic field during time E the system is exposed to the magnetic field during the time t K i = t K 1 • 3 i−1 , R the qutrit undergoes a Fourier transform F3 given by Eq. ( 6).The information about the field value is extracted through the single-shot projective measurement of the final state in the computational basis and the probability distribution is updated in accordance with the Bayes formula.
As distinct from the standard Fourier procedure, with each step the delay time increases, ensuring that the field distribution is always represented by a single peak.

Appendix F: Oscillatory features in the information gain
In this section*, we discuss the oscillatory features intrinsic to the expected information gain as function of the delay time.The plots describing the information gain and presented in the text (e.g., Fig. 3(b)) have been obtained under the assumption that initially, the field is distributed continuously and the distribution function is Gaussian centered at ω = 0.Under these conditions, no oscillatory features show up; the latter are not central for the main discussion, but we shall address them now as they may show up in other circumstances.Given the complexity of the underlying mathematical expressions, our numerical analysis has a rather qualitative character.The analysis concerns the base-3 standard Fourier procedure (with no dephasing in the system), but the results are also relevant to the other metrological algorithms proposed in the main text.
In general, there are three types of oscillations showing up FIG.1.Information gain for different initial states.Expected information gain during the first measurement step assuming a continuously distributed magnetic field: blue and red lines correspond to the situations where the qutrit is initially prepared in the balanced state (as in the standard Fourier procedure) and in the state(1,

FIG. 4 .
FIG.4.Comparison of the algorithms for a transmon qutrit.(a) Linear and (b) Linear-log plots of the information gain defined in Eq. 4 in the classical (black), Kitaev (green), and standard Fourier (blue) procedures as functions of the total phase accumulation time; the red curve provides the result for the new LAMA.The symbols mark the individual steps of the four procedures.All curves are averaged over a series of 10 3 numerical experiments (for details of the simulation see the main text).We have chosen T s = 15 ns, P 0 ω | ø = N(0, σ 2 ) with σ = 2π/(90 ns) and T p < T s .The initial delay time in the classical, t C 1 , and Kitaev, t K 1 , procedures and in the LAMA, t L 1 , is 15 ns; in the case of the LAMA, the time increase per step is ∆t = 40 ns.In (a) the standard Fourier procedure is represented by three curves corresponding to different initial delay times: t F 1 = 0.5 µs, 2.4 µs, and 5 µs.In the case of the Fourier procedure, a larger t F 1 allows to perform more steps of the algorithm since on each step we are decreasing time from t F 1 to T s .However, due to the decoherence, it also results in an insufficient information gain in the first steps, t F 1 approaches T c .In the case of the Kitaev procedure, decoherence affects last steps since they are performed at larger delay times.The final gain in the Fourier case corresponds to the gain obtained with the Kitaev procedure at the same total phase accumulation time.Note that the highest points of blue curves collapse onto the green curve.This is not a surprise since the Fourier and Kitaev procedures are expected to provide the same performance; for that reason we do not plot curves for the Fourier procedure in (b).All curves in (a) are obtained for the same coherence time T c = 5 µs, whereas in (b), we show three green curves corresponding to the Kitaev procedure for three different values of T c , 5 µs (circles), 10 µs (squares), and 30 µs (triangles); the red and black curves referring to the LAMA and to the classical procedure are obtained for T c = 5 µs.The yellow straight line marks the Heisenberg quantum limit with scaling parameter α = 1.

FIG. 5 .
FIG. 5. Oscillations in the information gain.Expected information gain during the first step of the standard Fourier procedure as a function of the delay time evaluated under different conditions.The detailed behaviour of the information gain function is determined by the initial field distribution.(a) Information gain for a continuous uniformly distributed initial field with zero mean and continuous sampling for three different sharp intervals of width Ω. Oscillations with period T edge ∝ Ω appear due to the sharp edges of the uniform distribution.(b) Information gain for a continuous Gaussian initial distribution with σ = 2π/(90 ns) and continuous sampling for three different mean values ω center .The period of the observed oscillations is given by T center ∝ 1/|ω center |.(c) Information gain for a Gaussian initial distribution with σ = 2π/(90 ns) and zero mean and different sampling rates.The oscillatory pattern has a period T ∆ ∝ 1/∆ω.

FIG. 6 .
FIG.6.Standard Fourier algorithm.(a) Field distributions and (b) expected information gains at six different steps of the standard Fourier procedure as obtained through numerical modelling.In (b), the delay times at each step are marked by the vertical lines.The initial distribution function is normal with P 0 ω | ø = N(0, σ 2 ) and a width σ = 2π/(90 ns); dephasing is absent.(c) The expected information gain per step (expressed in trits) in the standard Fourier procedure at each of the steps in the continuous case with no dephasing.The dashed red line indicates the maximum possible information gain of 1 trit.The information gain on the 7th step is 0.99 trits.(d) Expected information gain in the second step of the standard (blue) and modified (with alternative preparation step, in red) Fourier procedures for a continuously distributed field with no dephasing processes.