Reductive Quantum Phase Estimation

Estimating a quantum phase is a necessary task in a wide range of fields of quantum science. To accomplish this task, two well-known methods have been developed in distinct contexts, namely, Ramsey interferometry (RI) in atomic and molecular physics and quantum phase estimation (QPE) in quantum computing. We demonstrate that these canonical examples are instances of a larger class of phase estimation protocols, which we call reductive quantum phase estimation (RQPE) circuits. Here we present an explicit algorithm that allows one to create an RQPE circuit. This circuit distinguishes an arbitrary set of phases with a fewer number of qubits and unitary applications, thereby solving a general class of quantum hypothesis testing to which RI and QPE belong. We further demonstrate a trade-off between measurement precision and phase distinguishability, which allows one to tune the circuit to be optimal for a specific application.


I. INTRODUCTION
For over a century, physics has benefited greatly from exploiting interference effects between waves [1,2].In particular, the accurate estimation of a relative phase between parts of a wavefunction is a pivotal task in numerous fields of quantum physics and quantum computing.For example, the central goal of quantum metrology is to construct experimental platforms capable of making high-precision measurements of the quantum phase that correspond to a physical parameter [3][4][5].Progress in this area has led to the development of quantum sensors that have then been used in a wide range of groundbreaking technologies, from atomic clocks [6,7] to medical devices [8,9].In quantum information science, there exist important algorithms that seek to calculate the quantum phase as precisely as possible in a single measurement.This can be used to find the eigenvalues of a unitary operator, thereby allowing one to perform computations such as matrix inversion and modular multiplication with a quantum advantage [10][11][12].For example, it is a crucial step in the Harrow-Hassidim-Lloyd linear system of equations algorithm [13,14] as well as the crux of Shor's algorithm for prime factorization [10,15].
Due to the far-reaching impact of estimating a quantum phase, various techniques have been developed to accomplish this task.For example, in quantum metrology the standard method is Ramsey interferometry (RI) [16].In RI, with a direct correspondence to optical interferometers, a single qubit is split into a coherent superposition, undergoes unitary encoding of a phase, and is then recombined (see Fig. 3(a)).The alternate approach used in quantum computation is founded on Kitaev's quantum phase estimation (QPE) algorithm [10,17,18], which aims to determine the correct phase from a discrete set of possibilities in a single run of a multi-qubit quantum circuit.The QPE algorithm consists of conditional rota-tions to estimate the quantum phase over small intervals of the Bloch sphere's equator, and the intervals become exponentially smaller as the number of qubits increases.
Many quantum algorithms have a phase estimation subroutine that ideally estimates an encoded phase θ after a single run of the circuit.This can be accomplished for phases where every qubit in the circuit has unit probability of being in one of the computational basis states (i.e., the bare eigenstates).The canonical QPE algorithm consisting of n qubits can discriminate between a set of 2 n phases evenly distributed throughout the interval [0, 2π).However, there are important problems in quantum hypothesis testing [19][20][21][22][23], a central pillar of modern quantum information science research, where one wants to discriminate between a certain discrete set of phases starting with a flat prior probability distribution.In these situations, the QPE circuit is excessive with potentially many unneeded qubits performing unnecessary rotations, increasing the chance of errors to occur during the algorithm through both quantum and classical noise.Furthermore, there are simple situations in which QPE would actually require an infinite number of qubits to distinguish between two phases with certainty after a single run of the circuit, such is the case with θ = 0 and θ = π/3.
In this paper, we present an algorithm that generates a phase estimation circuit capable of perfectly discriminating between any set of phases with certainty after a single run, given the phases are rational multiples of π.This allows one to design a phase estimation circuit with fewer qubits and unitary gates than QPE in many cases.This algorithm therefore develops a more general class of phase estimation circuits that we call reductive quantum phase estimation (RQPE), of which RI and QPE are special cases.We demonstrate that RQPE circuits have a trade-off between phase measurement precision for higher distinguishability of phases, which we show is an interpolation between the canonical RI and QPE circuit.This allows one to tune a phase estimation circuit to be optimized for a specific task.
The article is organized as follows.In Sec.II, we in-troduce an algorithm that produces RQPE circuits and demonstrate its use for two illustrative examples.Then in Sec.III, we analyze how to compare different RQPE circuits with a cost-benefit analysis.We show relevant calculations for our analysis of RQPE circuits in Appendix F.

II. RQPE GENERATION ALGORITHM
We begin by presenting an algorithm that generates RQPE circuits.We consider circuits consisting of a set of n qubits, each prepared in the state |0⟩.We label the qubit states |q j ⟩ with index j, and we assume that one can perfectly perform instantaneous, noiseless gates and measurements.The gates used in the RQPE algorithm are the Z gate Z j = |0⟩⟨0| j − |1⟩⟨1| j , powers of the Z gate Z p j = |0⟩⟨0| j + e iπp |1⟩⟨1| j , the Hadamard gate The objective of quantum phase estimation is to accurately estimate an unknown quantum phase θ using minimal resources.In this work, we assume the phase is encoded by Z rotations, such that U j = e −iθZj /2 .Note that we consider circuits that apply the phase shift directly onto the control qubits through U j , but our results extend to methods that apply the phase shift using any controlled unitary acting on an ancillary register, as is typically done in QPE [10].
We now present an algorithm that generates a circuit that, given some set of phases, Θ with |Θ| = T , which is some subset of {πf i = πxi d : 0 ≤ x i < 2d, x i ∈ Z} where Z is the set of integers, allows one to determine the encoded phase θ ∈ Θ with certainty after a single run.Here, all f i are rational and can therefore be rewritten with a common integer denominator d and a set of numerators S 0 = {x i }.Starting with i = 0, the circuit generating algorithm consists of the sequence enumerated in Algorithm 1.
(S1) Set Gi as the greatest common divisor (GCD) of the numerators Si.
If there are no even integers, Qi ∩ 2Z = ∅, Ai is the minimum of Qi.
Algorithm 1. Steps of the circuit generating algorithm.Note that the set theory notation ignores repeated elements.
To construct the circuit that distinguishes phases in Θ with certainty after a single run, the gate sequence (see Appendix A) is applied on each |q j ⟩.Here, the application of the H and CZ gates across all qubits after the unitary applications is reminiscent of the QF T † gate (see Appendix H), QF T standing for the quantum Fourier transform, which can be found in Ref. [10].Performing a measurement on |q j ⟩ produces a measurement outcome m j ∈ {0, 1}, and the measurement of all n qubits produces a binary string m 0 . . .m n−1 .This binary string gives an estimation of θ (see Appendix B): We note that RQPE circuits can be run sequentially on a single qubit that is reset to |0⟩ after performing each line of the circuit, and each measurement effectively modifies the encoded phase in subsequent unitary applications.The sequential approach is explored in more depth in Refs.[24,25] and is effectively equivalent to the multiqubit, parallel circuits presented here.In Appendix C we analyze the time and space complexity of the generated circuits from Eq. ( 1) as well as Algorithm 1.Here, we find that the circuit generating algorithm runs in polynomial time with respect to T and log 2 h, where h = max[S 0 ], and the number of qubits needed is upper bounded by

O(min[T, log 2 h]).
A common situation in which the RQPE circuits of Eq. ( 1) can be very useful for hypothesis testing is systems where an external perturbation splits degenerate energy levels.As an example, we consider a system in which |1⟩ is physically a F = 1 hyperfine state while |0⟩ is F ′ = 0. Therefore, a magnetic field will cause a Zeeman energy shift of the |F = 1, m F = ±1⟩ states by ±ℏδ B .Each qubit thus undergoes an additional rotation exp[im F δ B Z i t/2] for a run time t, such that θ = θ ′ + m F δ B t.We therefore may wish to distinguish between three locations on the Bloch sphere's equator to determine which transition is being driven, as shown in Fig. 1(a).We thus use Algorithm 1 to create a circuit that can distinguish the set Θ = { πxi 64 : x i ∈ {21, 22, 64, 65, 107, 108}} with certainty after a single run.In Fig. 1(b), we show the outcome of the iterations of Algorithm 1 for this particular set of phases.
In the first iteration, i = 0, Algorithm 1 Steps (S1) and (S2) ensures some odd numerators, enabling |q 0 ⟩ to distinguish between all θ 0,e from all θ 0,o within the set { πG0x 64 : 0 ≤ x < 128 G0 , x ∈ Z}.Here, j in θ i,j indicates whether x is even or odd so that all θ i,e measure 0 with certainty while all θ i,o measure 1 with certainty on |q i ⟩.This is accomplished by the unitary rotation S3) is to pick an addition A 0 such that it reduces the size of the set of integers as much as possible, i.e., it converts the maximum amount of odd integers to even integers in the set.This addition dictates the controlled rotation on subsequent qubits.Step (S4) then returns a new set of integers S 1 from which one finds a new GCD, G 1 , in the next iteration.This allows one to distinguish between all θ 1,e from all θ 1,o within the set Step (S5) iterates this process such that each iteration corresponds to a qubit in the generated circuit.
Using this reduction process in conjunction with Eq. (1), we produce the circuit displayed in Fig. 1(c) to distinguish the phases in Θ, where the final symbol stands for an individual qubit measurement in the Zbasis.Note that only four qubits are used to distinguish the desired phases in RQPE with certainty after a single run.This can be compared to seven qubits needed in QPE, since 2d = 2 7 , demonstrating the utility of our circuit generation algorithm.Furthermore, while running it once can determine which θ ∈ Θ is encoded, running it many times and using some statistical analysis such as Bayes theorem [16,26] reliably estimates any continuous θ within the desired ranges.
Another interesting feature of Algorithm 1 can be demonstrated with the example shown in Fig. 2. Here, we use the circuit generation algorithm to distinguish the phases Θ ∈ { πxi 70 : x i ∈ {66, 93, 108, 123, 138}} with certainty after a single run.As shown in Fig. 2(b), we find a set of only odd numerators in the line for |q 2 ⟩.This ensures that, for all phases in Θ, the qubit |q 2 ⟩ will always be in the |1⟩ state when the measurement is performed.Therefore, this qubit can be removed from the circuit while CZ p j,2 gates can be replaced with uncontrolled Z p j gates.When estimating the original theta, consider this qubit as if it had existed and measured 1, i.e. m 2 = 1.We label |q 2 ⟩ as a "phantom" qubit and display the reduced circuit where we have removed the phantom qubit |q 2 ⟩ in Fig. 2(c).One can see that the last qubit in Fig. 1 is a phantom qubit as well.
Removing a phantom qubit from a circuit does not decrease distinguishability of the discrete phases in Θ and does not necessarily decrease distinguishability of continuous phase estimation.We see, for example, that it does not affect distinguishability within the desired ranges in Fig. 1.Precision, on the other hand, will be affected due to Eq. ( 4).

III. TRADE-OFF BETWEEN PRECISION AND DISTINGUISHABILITY
RQPE circuits can be compared by three key properties: the number of unitary applications, distinguishability, and precision.Interestingly, the extremes of this circuit generation algorithm create circuits for both RI and QPE, and these serve as perfect examples to showcase these comparable properties.RI will be automatically generated from Algorithm 1 when |Θ| = 2, the smallest possible size, while QPE will be automatically generated when |Θ| = 2d, the largest possible size.We display the circuit diagrams for these procedures in Figs.3(a) and 3(c).
In order to compare circuits in general, we use the total number of unitary applications, r, during a single run as the constrained resource.This can be written as a sum over all qubits, r = n−1 j=0 u j , where u j represents the number of applications of U j to |q j ⟩.In this way, QPE has r QPE = 2 n − 1, and RI has r RI = u 0 .One way to compare an RI circuit to QPE would then be to set r RI = r QPE , thereby applying (U 0 ) rQPE on the qubit in RI, and compare the resulting precision and distinguishability.We consider an optimal circuit to be one that minimizes the number of unitary applications while achieving some desired precision and distinguishability, as discussed in more detail in Appendix F.
Let M k be the measured binary string corresponding In general, every phase estimation circuit has a unique set of phases which it can perfectly distinguish.In RI, one can perfectly distinguish exactly T = 2 phases, Θ = {0, π rRI }, as these are the points where the Ramsey fringes reach their extremum values (see Fig. 4(a)).
For the example circuits we consider, this corresponds to θ ∈ {0, π 7 } on the equator of the Bloch sphere as shown in Fig. 3(b).Conversely, the QPE algorithm can perfectly distinguish the phases Θ = { πx 2 n−1 : x ∈ Z, 0 ≤ x < 2 n }, such that T = 2 n .This feature of QPE can be seen in Fig. 4(b), where one has T = 8 perfectly distinguishable phases corresponding to the eight possible measurement outcomes for n = 3 qubits.These perfectly distinguishable phases are shown on the equator of the Bloch sphere in Fig. 3(d).
Using quantum state geometry (adapted from Eq. (1.57) in [27]), one can define the distance between two phases, θ a and θ b , using the l 2 -distance between conditional probabilities in a measurement basis M: When D M (θ a , θ b ) = 1, this is the maximum distance corresponding to two perfectly distinguishable phases, whereas D M (θ a , θ b ) = 0 corresponds to two phases which cannot be distinguished.In Figs.4(c) and 4(d), we compare RI and QPE using the distance metric in Eq. ( 3) and measurements in the Z-basis.
While QPE has a larger range of distinguishable phases than RI, this is not the only figure of merit that one wishes to optimize when performing phase estimation.In the context of quantum metrology, one performs many runs of the circuit to measure θ from a continuous set of phases, Θ c = {x ∈ R, 0 ≤ x < 2π}, with greater and greater accuracy.Therefore, another important metric of phase estimation circuits is the precision.This is nicely encapsulated by the classical Fisher information (CFI) [28] with a given measurement basis I(θ|M), as the maximal achievable precision over R runs of the circuit is given by the Cramér-Rao bound [29] For the circuits we consider, the CFI for the Z-basis is given by (see Appendix E) One can see that the CFI is dominated by the qubit that has the largest number of unitary applications.This max[u j ] in QPE is only on the order of half of max[u j ] in RI when r RI = r QPE because RI has all of its unitary applications acting on a single qubit.Therefore, QPE will have on the order of half as much precision given the same number of unitary applications.This can be seen in Figs.4(a) and 4(b) by the width of the fringes.
In a general RQPE circuit with n qubits, one can perfectly distinguish T ≤ 2 n phases.However, the phases need not be evenly distributed around the equator of the Bloch sphere, as is the case with QPE, since the exponential on the unitary gate applications over subsequent qubits are not restricted to powers of two.Therefore, there is a trade-off between distinguishability and precision that can be tuned for a given parameter estimation objective by employing different RQPE circuits.As with the canonical examples, RQPE circuits can either be run once for perfect distinguishability between the phases in Θ or can be run multiple times to estimate a continuous phase.
We consider an example circuit in Fig. 5, which is a two-qubit circuit with |q 0 ⟩ and |q 1 ⟩.We use the unitaries U 6 0 and U 1 to match the number of unitary applications used in the canonical circuits studied in Fig. 3.The probability distribution for different phases is displayed in Fig. 5(a).Since the CFI is dominated by max[u j ], we expect this RQPE circuit, having max[u j ] = 6, to have a higher precision than QPE with max[u j ] = 4, but lower than RI with max[u j ] = 7.This is confirmed in Fig. 5(a) where we compare the width of the first fringe to that of the canonical circuits.
Meanwhile, the opposite relationship is true when comparing the circuit's distinguishablility.We show this in Fig. 5(b) where we calculate Eq. ( 3) for our RQPE circuit.We say that a circuit is more distinguishable if it has a greater number of θ i having a distance of 0 to only itself rather than additionally having a distance of 0 to some other θ j .Then, this RQPE circuit can be com-pared to Figs. 4(a) and 4(b) for the canonical examples to see that it is more distinguishable than RI but less distinguishable than QPE.
There are two notable features of distinguishability in RQPE circuits, further analyzed in Appendix G.One is the repetition of probability distributions.This is determined by the qubit with the lowest number of unitary applications causing the probability distributions over the range 0, 2π min[uj ] to repeat over the full 2π range, being truncated after 2π.The second distinguishability feature is the distinguishability within this repeated range, which is determined by the distribution of unitary applications over the qubits.The generation algorithm that we have presented in this paper utilizes these two features with the goal of optimizing the distribution of unitary applications for any given Θ.

IV. CONCLUSION AND OUTLOOK
In this article, we have demonstrated that a general class of quantum phase estimation algorithms, which we labeled as RQPE, exist that encompass the canonical examples of RI and QPE.Furthermore, by casting these canonical examples into the language of RQPE we are able to compare these distinct algorithms on equal footing.The figures of merit that we considered were precision, determined by the CFI in Eq. ( 4), and the distinguishablility, determined by the distance in Eq. ( 3).The figures of cost that we considered were the number of unitary applications and the number of qubits.We found that RI is more sensitive than QPE when constrained to the same number of unitary applications, but QPE is more distinguishable than RI.We demonstrated that these are two extremes of RQPE circuits, and so one can find a middle ground between these examples by tuning a trade-off between these two figures of merit.
While the presented circuit generation algorithm can be used to improve current phase estimation standards, it is not necessarily optimal in all cases.Future work may therefore be directed towards either reducing complexity in the generation algorithm or increasing optimality in the generated circuits.
Define θ as πxa d .The goal is to perform some operations to change θ so that the j-th qubit measures e −iπxj Z , where x j is the numerator from the set A j = { x Gj : x ∈ S j } to which x a transforms.For x 0 , the algorithm only needs to divide by G 0 , resulting in the following gate Now, doing the same process for x 1 , the previous reduction applies as well as A 0 and G 1 , adding A 0 only if the numerator at A 0 is odd, which happens when q 0 = 1.
One can see that this pattern results in the gates for qubit q j as gates(q j ) = H j (Z circuit to calculate the full Fisher information with

Appendix F: Examples of Comparing Optimality
We define a phase estimation problem as desiring some precision, defined by the Cramer-Rao bound, while being able to distinguish some range of thetas, 0 ≤ θ ≤ h in e −iθZ where h is the largest phase, after many runs.This is because if there were separate ranges, RI would still need to distinguish one large range that covers all the separate ranges.A more optimal circuit achieves both of these things while using fewer unitary application and qubits.Define precision as 1 p where p ≥ 1 and h = a d .The precision is defined by the Cramer-Rao bound, so tI , where t is the total number number of runs and I is the classical Fisher information.
First, we see what Ramsey Interferometry (RI) requires.RI optimally satisfies these requirements with r = 1 h = d a unitary applications per run.Increasing this shrinks the dynamic range to be less than the required theta range, and distinguishability is lost, while decreasing this exponentially increases the total number of runs to achieve the same precision, resulting in more unitary applications overall.Since the classical Fisher information is ( d a ) 2 according to Eq. ( 4), we have taking the ceiling because t is an integer, meaning RI requires pa d 2 runs to satisfy the requirements.Since each RI run uses exactly one qubit, it requires the same number of qubits.The total number of unitary applications it needs across all runs is therefore Quantum phase estimation (QPE) always has full distinguishability and achieves at least the desired precision when it's most precise qubit reaches it, which happens after 1 run when where u max is the number of unitary applications on the most precise qubit.Since the unitary applications for each qubit in QPE follow powers of two, the most precise qubit having 2 ⌈log 2 p⌉ ≤ 2 log 2 (p)+1 unitary applications satisfies the precision requirement.This, in turn, results in less than 4p total unitary applications across all qubits and ⌈log 2 p⌉ + 1 total qubits.We now have circuits for both RI and QPE that satisfy the distinguishability requirement, so, in order for QPE to outperform RI, we find a precision where the total number of unitary applications for QPE is less than that of RI.
This means that QPE is guaranteed to use fewer unitary applications whenever the highest theta is at least four times the desired precision, i.e. when you would like to estimate theta using at least 4 bins of equal spacing.
We do a similar analysis for RQPE.If one wanted to split the range into between some positive integer k and k + 1 bins, we have where c k+1 < b < c k .One could, for example, run the CDA with Θ = { baxi cd : x i ∈ Z, 0 ≤ x i ≤ k + 1}, which satisfies the precision and distinguishability requirements after a single run.We will compare the optimality of this circuit, which uses runs to reach the desired precision, RI is more optimal than this RQPE circuit when When k = 0, the given RQPE circuit simply returns RI, so they are equally optimal.For k = 1, we see that RI is more optimal when b < 3c 4 , i.e. one wants a precision of 3  4 h.For k = 2, b < 3c 10 , which violates b > c 3 .This violation persists for all k > 1.Therefore, this RQPE circuit is always more optimal than RI except for in the very specific case when one wants 3  4 h < 1 p ≤ h.

Appendix G: Features of Indistinguishability
For all reductive quantum phase estimation circuits, a single qubit can distinguish between a phase of 0 and π ui with certainty.However, it also creates a range 0, where each θ within it results in an identical Bloch sphere positions as θ +j 2π max [1,min[uj ]] : j ∈ N, j < max[1, u i ], where N are the natural numbers.That is, on the full 2π range of possible thetas, there will be max[1, u i ] sets of physically indistinguishable thetas after the unitary applications.We call this range the repeated range, S, and we call this principle of indistinguishable sets "indistinguishability due to repitition".This can be extended to a multi-qubit RQPE circuit, where as min[u j ] has the largest repeated range, and no repetition occurs until repetition over this largest repeated range occurs.Another type of indistinguishability, which this paper refers to as "indistinguishability due to measurement basis", is due to identical measurement probability distributions for thetas within the repeated range itself.This means that thetas may lie on different points in the Bloch sphere after the unitary applications but have identical probability distributions given the measurement basis.This is the type of distinguishability that can be increased by distributing unitary applications across multiple qubits in certain ways.This is also the type that is plotted in our distance graphs, since this distinguishability is simply repeated as the repeated range repeats.

Appendix H: RQPE as a Gate
In the same way that the H and CZ gates after the unitary applications of a QPE circuit can be viewed as a QF T † gate, one can view the H and CZ gates after the unitary applications of an RQPE circuit as a (RQP E G,A ) † gate.In the following definitions, we include SWAP gates to reverse the order of qubits as the final step in the (RQP E G,A ) † gate, while keeping the definition of b i unchanged, in order to more closely match the traditional definition of the QF T gate.However, to match the circuit given in the paper, i.e. without final SWAP gates, b (defined below) should be exchanged with b in the following equations.
The RQP E G,A gate, given some GCDs G and additions A, maps a quantum state |x⟩ = where the • operation of two operands r and s is r • s = n−1 i=0 r i s i , ri = r n−1−i , s i is the i-th bit of the binary representation of s, b i is the i-th bit value of the RQPE procedure, and u i is the number of unitary applications on the i-th qubit, given by When |x⟩ is a basis state, the RQP E G,A gate can be expressed as the map The unitary matrix of the RQP E G,A gate acting on quantum state vectors is then e ib1u0 e i(b0+b1)ũ0 . . .e icũ0 1 e ib0 ũ1 e ib1 ũ1 e i(b0+b1)ũ1 . . .e icũ1 1 e ib0(ũ0+ũ1) e ib1(ũ0+ũ1) e i(b0+b1)(ũ0+ũ1) . . .e ic(ũ0+ũ1) . . .

FIG. 3 .
FIG. 3. Canonical phase estimation procedures.(a) RI circuit with the corresponding Bloch sphere rotations.(b) The perfectly distinguishable phases of RI with 7 unitary applications.(c) QPE circuit.(d) The perfectly distinguishable phases of QPE with 3 qubits.

FIG. 4 .
FIG. 4. The conditional probability of (a) RI with 7 unitary applications and (b) QPE with 3 qubits.The distance between phases θa and θ b calculated by Eq. (3) for (c) RI with 7 unitary applications and (d) QPE with 3 qubits.

FIG. 5 .
FIG. 5. Using an RQPE circuit with 1 and 6 unitary applications on two qubits, shown are (a) the conditional probability and (b) the distance calculated by Eq. (3) between two phases.

2 n − 1 k=0
x k |k⟩ to a state 2 n −1 k=0 y k |k⟩ according to the formula: and powers of the controlled Z-gate with target |q j ⟩ controlled by |q k