The present invention relates generally to quantum computing technology. More particularly, this invention pertains to devices, systems, and associated methods for achieving computational speed increases in quantum algorithms.
Grover's algorithm is a quantum search algorithm for finding the unique input xgood that satisfies Equation (1), as follows:
ƒbool(xgood)=1, (1)
for a given boolean function ƒbool: {0, 1, . . . , N−1} →{0,1}. Such an input xgood satisfying this boolean function is referred to as the “winning” input of ƒbool. Grover's algorithm has also been adapted to work with boolean functions with multiple winning inputs, where the goal is to find any one of the winning inputs.
An important generalization of Grover's algorithm is the amplitude amplification algorithm in which the function ƒbool is accessed through a boolean quantum oracle Ûƒ
In this way, the oracle marks the winning states by flipping their phase (that is, shifting the phase by π). Given a superposition state |ψ0, the goal of the amplitude amplification algorithm is to amplify the amplitudes (in the superposition state) of the winning states. The algorithm accomplishes this iteratively by initializing a quantum system in the state |ψ0 and performing the operation Sψ
S
ψ
≡2|ψ0ψ0|−I. (3)
As shown in Equation (3), I is the identity operator. Performing a measurement on the system after the iterative amplification process results in one of winning states with high probability. Grover's original algorithm is a special case of the amplitude amplification algorithm, where a) the uniform superposition state |s given by Equation (4):
is used as the initial state |ψ0 of the system, and b) the number of winning inputs is exactly one.
Closely related to the amplitude amplification algorithm is the amplitude estimation algorithm, which combines features from the amplitude amplification algorithm and a quantum phase estimation (QPE) algorithm to estimate the probability that making a measurement on the initial state |ψ0 will yield a winning input. If the uniform superposition state |s is used as |ψ0, the amplitude estimation algorithm can help estimate the number of winning inputs of ƒbool (Note: This special case is also referred to as the quantum counting algorithm).
The amplitude amplification algorithm and the amplitude estimation algorithm have a wide range of applications and are important primitives that feature as subroutines employed by other quantum algorithms. The amplitude amplification algorithm can be used to find a winning input to ƒbool with (√{square root over (N)}) queries of the quantum oracle, regardless of whether the number of winning states is a priori known or unknown (Note: The (√{square root over (N)}) and (N) scalings for the quantum and classical algorithms, respectively, hold assuming that the number of winning states does not scale with N). This represents a quadratic speedup over classical algorithms, which typically require (N) evaluations of the function ƒbool. Similarly, the amplitude estimation algorithm also offers a quadratic speedup over the corresponding classical approaches. The quadratic speedup due to the amplitude amplification algorithm has been shown to be optimal for oracular quantum search algorithms.
A limitation of known amplitude amplification and estimation algorithms is that they work only with boolean oracles, which classify the basis states as good and bad. In situations where one is interested in using these algorithms in the context of a non-boolean function of the input x, a typical approach is to create a boolean oracle from the non-boolean function by using a threshold value of the function as a decision boundary. That is, the winning states are the ones for which the value of the function is, say, less than the chosen threshold value. In this way, the problem at hand may be adapted to work with the standard amplitude amplification and estimation algorithms.
Accordingly, a need exists for a solution to at least one of the aforementioned challenges in increasing the computation speed of widely applicable quantum algorithms. For instance, an established need exists for adaptation of certain primitive quantum algorithms to work directly with non-boolean functions.
This background information is provided to reveal information believed by the applicant to be of possible relevance to the present invention. No admission is necessarily intended, nor should be construed, that any of the preceding information constitutes prior art against the present invention.
With the above in mind, embodiments of the present invention are related to quantum amplitude amplification and amplitude estimation algorithms to work with non-boolean oracles. By way of definition, the action of a non-boolean oracle Uφ on an eigenstate |x is apply a state-dependent, real-valued phase-shift φ(x). Unlike boolean oracles, the eigenvalues exp(iφ(x)) of a non-boolean oracle are not restricted to be ±1.
In one embodiment of the present invention, a non-boolean amplitude amplification algorithm, starting from an initial superposition state |ψ0, preferentially amplifies the amplitudes of the basis states based on the value of cos(φ). An objective of the algorithm is to preferentially amplify the states with lower values of cos(φ(x)). The algorithm is iterative in nature such that, after K iterations, the probability for a measurement of the system to yield x (namely pK(x)) differs from the original probability p0(x) by a factor that is linear in cos(φ(x)). The coefficient −λK of this linear dependence controls the degree (and direction) of the preferential amplification.
More specifically, embodiments of the present invention (in one or more of method, system, and/or device form) may include the following steps:
(1) Initialize a two-register system in the |Ψ0 state:
(2) Perform K iterations: During odd iterations, act on an input basis state using a selective phase-flip unitary operator circuit SΨ
(3) After the K iterations, measure the ancilla in the 0/1 basis.
Up to a certain number of iterations, the iterative steps may be designed to amplify the amplitude of the basis states |0,x and |1,x with lower values of cos(φ(x)). The measurement of the ancilla at the end of the iterations may be performed simply to ensure that the two registers are not entangled in the final state.
In another embodiment of the present invention, a quantum mean estimation algorithm uses QPE as a subroutine in order to estimate the expectation of Uφ under |ψ0 (i.e., ψ0|ψφ|ψ0). The algorithm offers a quadratic speedup over the classical approach of estimating the expectation, as a sample mean over randomly sampled inputs.
More specifically, embodiments of the present invention (in one or more of method, system, and/or device form) may include the following steps:
(1) Perform the QPE algorithm with a) the two-register unitary operator under consideration, and b) the superposition state |Ψ0 in place of the eigenstate required by the QPE algorithm as input. Let the output of this step, appropriately scaled to be an estimate of the phase angle in the range [0,2π), be {circumflex over (ω)}.
(2) Return cos({circumflex over (ω)}) as the estimate for cos(θ) (i.e., the real part of Eψ
These and other objects, features, and advantages of the present invention will become more readily apparent from the attached drawings and the detailed description of the preferred embodiments, which follow.
The preferred embodiments of the invention will hereinafter be described in conjunction with the appended drawings provided to illustrate and not to limit the invention, where like designations denote like elements, and in which:
Like reference numerals refer to like parts throughout the several views of the drawings.
The present invention will now be described more fully hereinafter with reference to the accompanying drawings, in which preferred embodiments of the invention are shown. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Although the following detailed description contains many specifics for the purposes of illustration, anyone of ordinary skill in the art will appreciate that many variations and alterations to the following details are within the scope of the invention. Accordingly, the following embodiments of the invention are set forth without any loss of generality to, and without imposing limitations upon, the claimed invention.
As used herein, the word “exemplary” or “illustrative” means “serving as an example, instance, or illustration.” Any implementation described herein as “exemplary” or “illustrative” is not necessarily to be construed as preferred or advantageous over other implementations. All of the implementations described below are exemplary implementations provided to enable persons skilled in the art to make or use the embodiments of the disclosure and are not intended to limit the scope of the disclosure, which is defined by the claims.
Furthermore, in this detailed description, a person skilled in the art should note that quantitative qualifying terms such as “generally,” “substantially,” “mostly,” and other terms are used, in general, to mean that the referred to object, characteristic, or quality constitutes a majority of the subject of the reference. The meaning of any of these terms is dependent upon the context within which it is used, and the meaning may be expressly modified.
Referring initially to
Generally speaking, the present invention is a generalization of amplitude amplification and estimation algorithms to work with quantum oracles for non-boolean functions. Hereinafter, the qualifiers “boolean” and “non-boolean” will be used to distinguish embodiments of the present invention from known boolean versions of the amplitude amplification algorithm and their related applications.
Oracle for a Non-Boolean Function:
The behavior of the boolean quantum oracle Ûƒ
The actions of the oracle Uφ and its inverse Uφ† on the basis states |0, . . . , |N−1 may be given by Equations (6) and (7), as follows:
U
φ
|x)=e+iφ(x)|x=[cos(φ(x))+i sin(φ(x))]|x, (6)
U
φ
†
|x)=e−iφ(x)|x=[cos(φ(x))−i sin(φ(x))]|x. (7)
Goal of the Non-Boolean Amplitude Amplification Algorithm:
Given an oracle Uφ and an initial state |ψ0, a goal of the non-boolean amplitude amplification algorithm of the present invention may be to preferentially amplify the amplitudes of the basis states |x with lower values of cos(φ(x)), at the expense of the amplitude of states with higher values of cos(φ(x)). Depending on the context in which the algorithm is to be used, a different function of interest ƒ (which is intended to guide the amplification) may be appropriately mapped onto the function cp. For example, and without limitation, if the range of ƒ is [0,1] and one intends to amplify the states with higher values of ƒ, then options for formulating the problem in terms of co include the following:
φ(x)=πƒ(x) or φ(x)=arccos(1−2ƒ(x)). (8)
In both cases of Equations (8), cos(φ) is monotonically decreasing in ƒ.
The connection between the boolean and non-boolean amplitude amplification algorithms may be seen as follows: If either of the two options in Equations (8) is used to map a boolean function ƒbool onto φbool, then
In the case of Equation (9), the oracle Uφ and its inverse Uφ† both reduce to a boolean oracle as follows (Equation 10):
U
φ
=U
φ
†
=Û
ƒ
. (10)
Congruently, the task of amplifying (the amplitude of) the states with lower values of cos(φ) may align with the task of amplifying the winning states |x with ƒbool(x)=1.
Goal of the Quantum Mean Estimation Algorithm:
Given a generic unitary operator U and a state |ψ0, a goal of the quantum mean estimation algorithm may be to estimate the quantity of Equation (11):
ψ0|U|ψ0. (11)
The task of estimating the quantity of Equation (11) may be phrased in terms of the oracle Uφ, as estimating the expectation of the eigenvalue eiφ(x) for a state |x chosen randomly by making a measurement on the superposition state |ψ0. The connection between the two tasks may be seen in Equation (12), as follows:
wherein |x|ψ0|2 is the probability for a measurement on |ψ0 to yield x.
The only difference between (a) estimating ψ0|Uφ|ψ0 for an oracle Uφ, and (b) estimating ψ0|U|ψ0 for a generic unitary operator U is that {|ψ0|Uφ|ψ0, . . . , |N−1)} is known beforehand to be an eigenbasis of Uφ. On the other hand, the eigenstates of a generic unitary operator U may be a priori unknown. However, as described in detail hereinbelow, the mean estimation algorithm does not use the knowledge of the eigenstates and, therefore, may be applicable for generic unitary operators U as well.
As described hereinabove, the mean estimation algorithm of the present invention is a generalization of known boolean amplitude estimation algorithm(s). Regarding the connection between the respective tasks of these algorithms, note that the eigenvalues of a boolean oracle may be either +1 or −1, and the expectation of the eigenvalue under |ψ0 is directly related to the probability of a measurement yielding a winning state with eigenvalue −1. This probability is precisely the quantity estimated by the non-boolean amplitude estimation algorithm of the present invention.
Non-Boolean Amplitude Amplification Algorithm:
Setup and Notation: Various embodiments of a non-boolean amplitude amplification algorithm as described herein may include not only a quantum system, or qubit(s), as input to a quantum oracle, but also may employ one extra ancilla qubit. For example, and without limitation, let a quantum system used in certain embodiments of the present algorithm comprise two quantum registers. The first register may contain the lone ancilla qubit, and the second register (input qubit) may be acted upon by the quantum oracle.
The notations |a⊗|b and |a,b may both refer to a state where the two registers are unentangled, with the first register in state |a and the second register in state |b. The tensor product notation ⊗ may also be used to combine operators that act on the individual registers into operators that simultaneously act on both registers. Such two-register operators may be represented by boldface symbols (e.g., SΨ
Unless otherwise specified herein, {|0, |1, . . . , |N−1} may be used as the basis for (that is, as the state space of) the second register. Any measurement of the second register may refer to measurement in this basis. Likewise, unless otherwise specified,
{|0,0,|0,1, . . . ,|0,N−1}∪{|1,0,|1,1, . . . ,|1,N−1} (13)
may be used as the basis for the two-register system.
In Equation (14) below, let |ψ0 be the initial state of the second register from which the amplification process is to begin, and let A0 be the unitary operator that changes the state of the second register from |0 to |ψ0 (Note: Assumed here, only for notational convenience, is that there exists a state |0| which is simultaneously an eigenstate of Uφ, as well as a special, easy-to-prepare state of the second register; a person of skill in the art will immediately recognize the algorithms described herein may be modified to work even without this assumption):
where a0(x) is the initial amplitude of the basis state |x.
The algorithm introduced hereinbelow may initialize the ancilla (i.e., first register) in the |+ state given by Equation (15), as follows:
Anticipating this initialization, let the two-register state |Ψ0 be defined as in Equation (16), as follows:
Required Unitary Operations: The following unitary operations may be used in certain embodiments of a generalized amplitude amplification algorithm of the present invention:
Selective Phase-Flip Operator. Let the two-register unitary operator SΨ
where I is the two-register identity operator. SΨ
|Ψ0=[H⊗A0]|0,0, (18)
where H is the Hadamard transform. Thus, SΨ
S
Ψ
=[H⊗A0][2|0,00,0|−I][H⊗A0†]. (19)
Referring initially to
Conditional Oracle Calls: Let the two-register unitary operator U be defined as in Equation (20):
U
φ≡|0|⊗Uφ+|11|⊗Uφ†. (20)
This operator's action on the basis states of the two-register system is given by Equations (21) and (22):
U
φ|0,x)=e+iφ(x)|0,x, (21)
U
φ|1,x)=e−iφ(x)|1,x. (22)
If the ancilla is in state |0, Uφ acts Uφ on the second register. On the other hand, if the ancilla is in state |1, Uφ acts Uφ† on the second register. The inverse of Uφ is given by Equation (23):
U
φ
†=|00|⊗Uφ†+|11|⊗Uφ, (23)
and the action of Uφ† on the basis states is given by Equations (24) and (25):
U
φ
†|0,x=e−iφ(x)|0,x, (24)
U
φ
†|1,x=e+iφ(x)|1,x. (25)
The amplitude amplification algorithm for non-boolean functions may involve calls to both Uφ and Uφ†.
Referring now to
Algorithm Description:
Referring now to
(1) Initialize a two-register system in the |Ψ0 state;
(2) Perform K iterations: During odd iterations 402, apply operations 430, 432 denoted SΨ
(3) After the K iterations, measure 440 the ancilla (first register 410) in the 0/1 basis.
Up to a certain number of iterations, the iterative steps 402, 404 may be designed to amplify the amplitude of the basis states |0,x and |1,x with lower values of cos(φ(x)). The measurement 440 of the ancilla 410 at the end of the algorithm may be performed simply to ensure that the two registers 410, 420 are not entangled in the final state 450 of the system. The specification of K (i.e., the number of iterations to perform) is included in an analysis of the present algorithm described hereinbelow.
Connection to Known Boolean Amplitude Amplification Algorithm:
From Equations (20) and (23), a person of skill in the art will immediately recognize that for the boolean oracle case given by φ(x)=πƒbool(x), Uφ and Uφ† both reduce to I⊗Ûƒ
S
Ψ
[|+⊗|ψ]=|+⊗[Sψ
Note that the first register is unaffected here. Thus, for the boolean oracle case, the algorithm 400, 500 of
The two key differences of the generalized algorithm from the boolean algorithm, apart from the usage of a non-boolean oracle, may be as follows:
(1) The addition of the ancilla 410, which doubles the dimension of the state space of the system, and
(2) Alternating between using Uφ and Uφ† (operations 432 and 434, respectively) during the odd iterations 402 and even iterations 404.
Analysis of the Non-Boolean Amplitude Amplification Algorithm:
Still referring to
Let ãk (0,x) and ãk(1,x) be the normalized amplitudes of the basis states |0,x and |1,x, respectively, in the superposition |Ψk.
In the initial state |Ψ0, the amplitudes ã0(0,x) and ã0(1,x) are both given, from Equation (16), by the following (Equation (29)):
Let the parameter θ∈[0,π] be implicitly defined by Equation (30):
cos(θ) is the expected value of cos(φ(x)) over bitstrings x sampled by measuring the state |ψ0.
Let the two-register states |αand |β be defined as follows (Equations (31) and (32)):
|α≡Uφ|Ψ0, (31)
|β≡Uφ†|Ψ0. (32)
These register states may be used to track the evolution of the system through the iterative steps 402, 404 of algorithm 400, 500. Using Equations (16), (20), and (23), |α and |0 may be written as follows (Equations (33) and (34)):
Note that θ, |α, and |β are all implicitly dependent on the function φ and the initial state |ψ0. For notational convenience, these dependencies are not explicitly indicated.
The First Iteration:
After one iterative step, the system may be in state |Ψ1 given by Equation (35):
|Ψ1=SΨ
Using Equations (17) and (31), this state may be written as follows (Equation (36)):
|Ψ1=SΨ
From Equations (16), (30), and (33), it follows that
Note from Equation (37) that Ψ0|α is real-valued. Key to the functioning of the algorithm 400, 500, the motivation behind adding an ancilla qubit 410 (effectively doubling the number of basis states) is precisely to make Ψ0|α real-valued.
From Equations (36) and (37), |Ψ1 may be written as follows (Equation (38)):
|Ψ1=2 cos(θ)|Ψ0−|α. (38)
From Equations (16) and (33), the amplitude ã1(0,x) of the basis state |0,x in the superposition |Ψ1 may be written as follows (Equation (39)):
Likewise, the amplitude ã1(1,x) of the basis state |1,x may be written as follows (Equation (40)):
Equations (39) and (40) show that, after one iterative step, the amplitudes of |0,x and |1,x have acquired factors of [2 cos(θ)−eiφ(x)] and [2 cos(θ)−e−iφ(x)], respectively. Now, Equation (41) shows that, if cos(θ) is positive, the magnitude of the “amplitude amplification factor” after one iteration is monotonically decreasing in cos(φ):
Such preferential amplification of states with lower values of cos(φ) is precisely what the algorithm 400, 500 set out to do.
Note that this monotonicity property relies on Ψ0|α being real valued in Equation (36). If Ψ0|α is complex, with a phase δ∉{0,π}, then the amplification will be monotonic in cos(φ−δ), which does not meet the present goal of the algorithm 400, 500. The case where Ψ0|α is not real-valued is explored further hereinbelow.
Identities to Track the Subsequent Iterations:
Equations (16), (17), (20), (23), (31), and (32) may be used to derive the identities of Equations (42), which capture the actions of the operators SΨ
A person of skill in the art will immediately recognize that the subspace spanned by the states |Ψ0, |α, and |β is almost stable under the action of SΨ
From the identities above, the expressions of Equations (43) may be written capturing the relevant actions of the odd iteration operator 430, 432 denoted SΨ
S
Ψ
U
φ|Ψ0)=2 cos(θ)|Ψ0−|α,
S
Ψ
U
φ|β)=|Ψ0,
S
Ψ
U
φ
†|Ψ0)=2 cos(θ)|Ψ0−|β,
S
Ψ
U
φ
†|α)=|Ψ0. (43)
Referring now to
State After k Iterations:
Using Equations (27) and (43), the state |Ψk of the two-register system after k≥0 iterations may be written, in matrix multiplication notation, as shown in Equation (44):
To simplify Equation (44), let the matrix Mθ be defined as follows (Equation (45)):
Substituting Equation (45) into Equation (44) yields Equation (46), as follows:
where the superscript T denotes transposition. Mθ may be diagonalized as
and where the matrix Sθ and its inverse Sθ1 may be given by
Now, Mθk may be written as follows (Equation (49)):
From Equation (48) and Equation (49), it follows that
Plugging (50) back into (46) leads to the following (Equation (51)):
Basis State Amplitudes after k Iterations:
From Equations (16), (33), (34), and (51), the amplitudes ãk(0,x) of the basis states |0,x after k≥0 iterations may be written as follows (Equation (52)):
Similarly, the amplitudes ãk(1,x) of the basis states |1,x may be written as follows (Equation (53)):
These expressions may be summarized, for b∈{0,1}, as follows (Equation (54)):
Amplitudes After Ancilla Measurement. Note that the magnitudes of the amplitudes of the states |0,x and |1,x are equal; that is,
|ã1(0,x)|=|ãk(1,x)|, (55)
for all k≥0 and x∈{0, 1, . . . , N−1}. Therefore, a measurement 440 of the ancilla qubit in the first register 410 after K iterations may yield a value of either 0 or 1 with equal probability. Let |ψK,b be the normalized state of the second register 420 after performing K iterations, followed by a measurement 440 of the ancilla qubit 410, which may yield a value b∈{0,1}. |ψK,b may be written as follows (Equation (56)):
where aK,b(x) are the normalized amplitudes of the basis states of the second register 420 (after performing K iterations and the measurement 440 of the ancilla 410). aK,b(x) may simply be given by Equation (57):
a
K,b(x)=√{square root over (2)}/ãK(b,x). (57)
Much of the definition hereinbelow holds a) regardless of whether a measurement 440 is performed on the ancilla qubit 410 after the K iterations, and b) regardless of the value yielded by the ancilla measurement 440 (if performed). The primary goal of measuring 440 the ancilla 410 is to make the two registers 410, 420 unentangled from each other.
Basis State Probabilities After K Iterations:
Continuing to refer to
p
K(x)=[|ãK(0,x)|2+|ãK(1,x)|2]=|aK,0(x)|2=|aK,1(x)|2. (58)
This expression shows that the probability pK(x) depends neither on whether the ancilla was measured, nor on the result of the ancilla measurement (if performed). From Equation (54), pK(x) may be written as follows (Equation (59)):
A person of skill in the art will immediately recognize that the probability amplification factor pK(x)/p0(x) is monotonic in cos(φ(x)) for all K≥0. The following trigonometric identities (Equation (60)) help elucidate the K dependence of this amplification factor:
sin2(C)+sin2(C+D)=sin2(D)+2 sin(C)sin(C+D)cos(D),
2 sin(C)sin(C+D)=cos(D)−cos(2C+D). (60)
Setting C=Kθ and D=θ, these identities may be used to rewrite Equation (59) as follows (Equation (61)):
p
K(x)=p0(x){1−λK[cos(φ(x))−cos(θ)]}, (61)
where the K-dependent factor λK is given by Equation (62):
For notational convenience, the fact that λK depends on θ is not explicitly indicated. The result in Equation (61) may be summarized as follows:
(1) Applying K iterations of the non-boolean amplitude amplification algorithm changes the probability of measuring x by a factor that is a linear function of cos(φ(x)). If the second register is initially in an equiprobable state (i.e., if p0(x)=constant), then the probability pK(x) after K iterations is itself a linear function of cos(φ(x)).
(2) If cos(φ(x))=cos(θ) for some x, the probability of a measurement of the second register yielding that x is unaffected by the algorithm.
(3) The slope of the linear dependence is −λK. If λK is positive, the states with cos(φ)<cos(θ) are amplified. Conversely, if λK is negative, states with cos(φ)>cos(θ) are amplified. The magnitude of λK controls the degree to which the preferential amplification has been performed.
From Equation (62), λK is an oscillatory function of K, centered around cos(θ)/sin2(θ) with an amplitude of 1/sin2(θ) and a period of π/θ. Recalling from Equation (30) that
one can verify that for any K≥0, the probabilities pK(x) from Equation (61) add up to 1.
From the definition of λK in Equation (62), for all K, λK is bounded from above by λoptimal defined as follows (Equation (64)):
The λK=λoptimal case represents the maximal preferential amplification of lower values of cos(φ) achievable by the algorithm. Let poptimal(x) be the state probability function corresponding to λK=λoptimal. From Equation (61),
Note that poptimal(x)=0 for inputs x with the highest possible value of cos(φ(x)), namely 1. In other words, poptimal reaches the limit set by the non-negativity of probabilities, in the context of the non-boolean amplitude amplification algorithm 400, 500 described hereinabove.
Number of Iterations to Perform:
In the non-boolean amplitude amplification algorithm 400, 500 described hereinabove, the number of iterations K to perform is left unspecified. Armed with Equation (62), this aspect of the algorithm 400, 500 will now be described in detail. Higher values of λK are advantageous to preferentially amplify lower values of cos(φ). Equation (62) illustrates that λK may be monotonically increasing for K=0, 1, . . . as long as 0≤(2K+1)θ≤π+θ or, equivalently, for
where └v┘ denotes the floor of v. A good approach is to stop the algorithm 400, 500 just before the first iteration that, if performed, would cause value of λK to decrease (that is, from its value after the previous iteration). This approach leads to the choice K for the number of iterations to perform, given by
The corresponding value of λK for K={tilde over (K)} is given by Equation (68):
The choice {tilde over (K)} in Equation (67) for the number of iterations offers an amplification iff π>2θ>0 or, equivalently, iff 0<cos(θ)<1. At one of the extremes, namely θ=π/2, one has λ{tilde over (K)}=0. The other extreme, namely cos(θ)=1, corresponds to every state x with a non zero amplitude in the initial state |ψ0 having cos(φ(x))=1. There is no scope for preferential amplification in this case.
Equation (68) illustrates that λK exactly equals λoptimal defined in Equation (64) if π/(2θ) is a half-integer. In terms of θ, this condition may be written as follows (Equation (69)):
For generic values of θ, Equation (68) illustrates that AR satisfies the following (Equation 70)):
This equation may be rewritten as follows (Equation (71)):
λoptimal[1−tan2(θ/2)]≤λ{tilde over (K)}≤λoptimal, (71)
using the following identity:
Equation (71) illustrates that for small θ, λR is approximately equal to λoptimal, (θ2) relative error.
Mean and Higher Moments of Cos(φ) after K Iterations:
Let μK(n) be the n-th raw moment of cos(φ(x)) for a random value of x sampled by measuring the second register after K iterations.
Under the notation of Equation (73), μ0(1) is simply cos(θ). From Equation (61),μK(n) may be written in terms of the initial moments (K=0) as follows (Equation (74)):
In particular, let μK and σK2 represent the expected value and variance, respectively, of cos(φ(x)) after K iterations.
μK≡μK(1),
σK2≡μK(2)−[μK(1)]2. (75)
Now, the result in Equation (74) for n=1 may be written as follows (Equation (76)):
μK−μ0=−λKσ02. (76)
For λK>0, Equation (76) captures the reduction in the expected value of cos(φ(x)) resulting from K iterations of the algorithm 400, 500.
Cumulative Distribution Function of Cos(φ) after K Iterations:
Let FKcos(y) be the probability that cos(φ(x))≤y for an x sampled as per the probability distribution pK. FKcos is the cumulative distribution function of cos(φ) for a measurement after K iterations, and may be written as follows (Equations (77) and (78)):
where 1|0,∞) is the Heaviside step function, which equals 0 when its argument is negative and 1 when its argument is non-negative. Using the expression for pK in Equation (61), these equations may be written as follows (Equations (79) and (80)):
Every x that provides a non-zero contribution to the summation in Equation (79) satisfies cos(φ(x))≤y. This fact may be used to write Equation (81), as follows:
λK≥0⇒FKcos(y)≥F0cos(y)(1+λK(μ0−y)). (81)
Likewise, every x that provides a non-zero contribution to the summation in Equation (80) satisfies cos(φ(x))>y. This fact may be used to write Equation (82), as follows:
λK≥0⇒1−FKcos(y)≤(1−F0cos(y))(1+λK(μ0−y)). (82)
The inequalities in Equations (81) and (82) may be summarized as follows (Equation (83)):
λK≥0⇒Fkcos(y)≥F0cos(y)+λK max{F0cos(y)(μ0−y),(1−F0cos(y))(y−μ0)}, (83)
where the max function represents the maximum of its two arguments. This equation provides a lower bound on the probability that a measurement after K iterations yields a state whose cos(φ) value is no higher than y. Derivation of stronger bounds (or even the exact expression) for FKcos(y) may be possible if additional information is known about the initial distribution of cos(φ). For y≤μ0, the first argument of the max function in Equation (83) will be active, and for y≥μ0, the second argument will be active.
For the λK≤0 case, it can similarly be shown that
λK≤0⇒FKcos(y)≤F0cos(y)+λK min{F0cos(y)(μ0−y),(1−F0cos(y))(y−μ0)}, (84)
where the min function represents the minimum of its two arguments.
Boolean Oracle Case:
As described in the “Number of Iterations to Perform” section hereinabove, the heuristic choice for the number of iterations for the non-boolean amplitude amplification algorithm of the present invention (namely {tilde over (K)}=└π/(2θ)┘) is different from, but analogous to, the result for known boolean amplitude amplification algorithm of the prior art (namely └π/(4θa)┘). Consider the parameter θ in the boolean oracle case, say θbool. Let P0good be the probability for a measurement on the initial state |ψ0 to yield a winning state. From Equation (30),
Thus, in the boolean oracle case, sin2(θ/2) reduces to the initial probability of “success” (that is, measuring a winning state), which is captured by sin2(θa) in known boolean amplitude amplification algorithm(s). The parameter θ used herein reduces to the parameter 2θa used in known boolean amplitude amplification algorithm(s), and └π/(2θ)┘ reduces to └π/(4θa)┘.
In this way, the results of the “Analysis of the Non-Boolean Amplitude Amplification Algorithm” section hereinabove in general, and the “Number of Iterations to perform” section hereinabove in particular, may be seen as generalizations of the corresponding results in known boolean amplitude amplification algorithm(s) as described hereinabove.
Alternative Formulation of the Algorithm:
Referring again to
However, Equations (33) and (34) illustrate that the states |α=Uφ|Ψ0 and |β=Uφ†|Ψ0 are related by
|β=[X⊗I]|α,|α=[X⊗I]|β, (87)
where X is the bit-flip or the Pauli-X operator 340. This relation may be exploited to avoid having two separate cases—k being odd and even—in the final expression for |Ψk in Equation (51). The expression for both cases may be made the same by acting the Pauli-X gate 340 on the ancilla 410, once at the end, if the total number of iterations is even.
More interestingly, the relationship between |α and |β may be used to avoid having two different operations in the first place, for the odd and even iterations. This leads to the following alternative formulation of the non-boolean amplitude amplification algorithm: During each iteration, odd or even, act the same operator Qiter defined by
Q
iter
≡S
Ψ
U
φ[X⊗I]. (88)
This alternative formulation is depicted as a circuit 700 in
From Equations (43) and (87), the action of Qiter on and |α may be derived as follows (Equations (89) and (90)):
Let |Ψkalt be the state of the two-register system after k iterations under this alternative formulation 700, 800 (before any measurement of the ancilla 410), as follows (Equation (91)):
|Ψkalt)≡Qiterk|Ψ0. (91)
Using similar manipulations as those leading to Equation (51) hereinabove, |Ψkalt) may be expressed, for all k≥0, as follows (Equation (92)):
Note that this expression for |Ψkalt) is almost identical to the expression for |Ψk in Equation (51), but without two separate cases for the odd and even values of k. Much of the analysis of the original formulation of the non-boolean amplitude amplification algorithm 400, 500 described hereinabove holds for the alternative formulation 700, 800 described hereinabove as well, including the expressions for the state probabilities pK(x), mean μK, raw moments λK(n), and the cumulative distribution function FKcos.
In addition to simplifying the amplification algorithm (by using the same operation for every iteration), the Qiter operator used in algorithms 700, 800 allows for a clearer presentation of the quantum mean estimation algorithm, as described hereinbelow.
Quantum Mean Estimation Algorithm:
A quantum mean estimation algorithm according to certain embodiments of the present invention may operate to estimate the expected value of eiφ(x) for x sampled by measuring a given superposition state |ψ0. Let Eψ
This equation may be written as follows (Equation (94)):
E
ψ
[eiφ]=Re[Eψ
where the real and imaginary parts are given by Equations (95) and (96), respectively, as follows:
The mean estimation may therefore be performed in two parts: one for estimating the mean of cos(φ), and the other for estimating the mean of sin(φ). Note that the expectation of cos(φ) under the state |ψ0 is precisely cos(θ) defined in Equation (30).
Estimating the Mean of cos(φ):
The connection shown in the “Boolean Oracle Case” section hereinabove between the parameter θ and the parameter θa serves as the intuition behind the quantum mean estimation algorithm of the present invention. In the known boolean amplitude estimation algorithm described hereinabove, the parameter θa is estimated using QPE (Note: The estimation of θQ is only (needed to be) performed up to a two-fold ambiguity of {θa,π−θa}). The estimate for θa is then turned into an estimate for the initial winning probability. The non-boolean quantum mean estimation algorithm of the present invention may operate to estimate the parameter θ defined in Equation (30) using QPE (Note: The estimation of θ is only (needed to be) performed up to a two fold ambiguity of {θ,2π−θ}). The estimate for θ may then be translated into an estimate for the initial expected value of cos(φ(x)), namely cos(θ).
Toward the end of actualizing the abovementioned intuition into a working algorithm, a key observation is that |Ψ may be written as follows (Equation (97)):
where |η+ and |η− are given by Equation (98):
Note: The forms of the eigenstates |η+ and |η− in Equation (98) may be determined from the form of the matrix Sθ in Equation (48). These forms may also be determined from Equation (92) by rewriting the sin functions in terms of complex exponential functions.
The expressions for |η+ and |η− in Equation (98) may be used to verify Equation (97). Crucially, |η+ and |η− are unit normalized eigenstates of the unitary operator Qiter, with eigenvalues eiθ and e−iθ, respectively.
Q
iter|η±=e±iθ|η±, (99)
η±|η±=1. (100)
The properties of |η+ and |η− in Equation (99) and Equation (100) may be verified using Equation (89), Equation (90), and Equation (98). The observations in Equation (97) and Equation (99) lead to the following algorithm for estimating cos(θ):
(1) Perform the QPE algorithm with a) the two-register operator Qiter serving the role of the unitary operator under consideration, and b) the superposition state |Ψ0) in place of the eigenstate required by the QPE algorithm as input. Let the output of this step, appropriately scaled to be an estimate of the phase angle in the range [0,2π), be {circumflex over (ω)}.
(2) Return cos({circumflex over (ω)}) as the estimate for cos(θ) (i.e., the real part of Eψ
Proof of correctness of the algorithm: |Ψ0 is a superposition of the eigenstates |η+ and |η− of the unitary operator Qiter. This implies that {circumflex over (ω)} may either be an estimate for the phase angle of |η+, namely θ, or an estimate for the phase angle of |η−, namely 2π−θ. (Note: If θ=0, the phase angle being estimated is 0 for both |η+ and |η−. For θ≠0, {circumflex over (ω)} will be an estimate for either θ or 2π−θ with equal probability. Since θ lies in [0,π] and 2π−θ lies in [π,2π], the output {circumflex over (ω)} can be converted into an estimate for θ alone (although doing so is not necessary)). Since, cos(2π−θ)=cos(θ), it follows that cos({circumflex over (ω)}) is an estimate for cos(θ).
Estimating the Mean of eiφ:
The algorithm for estimating the expected value of cos(φ) in the section hereinabove may be re-purposed to estimate the expected value of sin(φ) by using the fact that
sin(φ)=cos(φ−π/2). (101)
In other words, the imaginary part of Eψ
For concreteness, Uφ−π2 may be explicitly written as
U
φ−π/2
=e
−iπ/2|00|⊗Uφ+eiπ/2|11|⊗Uφ†. (102)
Referring now to
Note that the algorithm does not use the knowledge that {|0, . . . , |N−1} is an eigenbasis of Uφ. Therefore, this algorithm may be used to estimate ψ0|U|ψ0 for any unitary operator U.
Quantum Speedup:
The speedup offered by the quantum mean estimation algorithm 900 over classical methods will now be discussed in detail, in the context of estimating the mean of cos(φ) alone. This discussion may be extended in a straightforward way to estimation of Eψ
Classical Approaches to Estimating the Mean: For an arbitrary function φ and a known sampling distribution p0(x) for the inputs x, one classical approach to finding the mean of cos(φ(x)) is to sequentially query the value of φ(x) for all the inputs and use the query results to compute the mean. Let the permutation (x0, x1, . . . , xN-1) of the inputs (0, 1, . . . , N−1) be the order in which the inputs are queried. The range of allowed values of cos(θ), based only on results for the first q inputs, is given by the following (Equation (103)):
These bounds are derived by setting the values of cos(φ) for all the unqueried inputs to their highest and lowest possible values, namely +1 and −1. The range of allowed values of cos(θ) shrinks as more and more inputs are queried. In particular, if p0(x) is equal for all the inputs x, the width of the allowed range (based on q queries) is given by 2(N−q)/N. This strategy may take (N) queries before the width of the allowed range reduces to even, say, 1. Thus, this strategy will not be feasible for large values of N.
An alternative classical approach is to probabilistically estimate the expected value as follows:
(1) Independently sample q random inputs (x1, . . . xq) as per the distribution p0.
(2) Return the sample mean of cos(φ) over the random inputs as an estimate for cos(θ).
Under this approach, the standard deviation of the estimate scales as ˜σ0/√{square root over (q)}, where σ0 is the standard deviation of cos(φ) under the distribution p0.
Precision Vs Number of Queries for the Quantum Algorithm: Note that one call to the operator Qiter corresponds to (1) calls to A0 and Uφ (and their inverses). Let q be the number of times the (controlled) Qiter operation is performed during the QPE subroutine. As q increases, the uncertainty on the estimate for the phase-angle θ (up to a two-fold ambiguity) falls at the rate of (1/q). Consequently, the uncertainty on cos(θ) also falls at the rate of (1/q). This represents a quadratic speedup over the classical, probabilistic approach, under which the error falls as (1/√{square root over (q)}).
Note that the variance of the estimate for cos(θ) is independent of a) the size of input space N, and b) the variance σ02 of cos(φ(x)) under the distribution p0(x). It only depends on the true value of cos(θ) and the number of queries q performed during the QPE subroutine.
Demonstrating the Algorithms Using a Toy Example
Referring again to
The largest phase-shift applied by the corresponding oracle 432 denoted Uφ on any basis state is π/4, for the state |255. Since, cos(φ(x)) is monotonically decreasing in x, the goal of the amplitude amplification algorithm 400, 500 is to amplify the probabilities of higher values of x.
Let the initial state, from which the amplification is performed, be the uniform superposition state |s.
Such simple forms for the oracle function and the initial state allow for a good demonstration of the algorithms of the present invention.
For this toy example, from Equation (30), cos(θ) and θ are given by
Referring now to
Amplitude Amplification:
Continuing with the toy example, and referring now to chart 1100 of
As can be seen from
Mean Estimation:
Continuing with the toy example, and referring now to graphs 1200, 1250 of
Let M be the number of qubits used in the QPE subroutine of the mean estimation algorithm 900, to contain the phase information. This corresponds to performing the (controlled) Qiter operation 2M−1 times during the QPE subroutine. Note that the estimated phase {circumflex over (ω)} may only take the following discrete values:
In this way, the value of M controls the precision of the estimated phase and, by extension, the precision of the estimate for cos(θ); the higher the value of M, the higher the precision.
For the demonstration, two different quantum circuits were implemented, again using a quantum computing framework, for the mean estimation algorithm 900; one with M=4 and the other with M=8. Each circuit was simulated (and measured) 106 times, to get a sample of {circumflex over (ω)} values all in the range [0,2π).
The observed frequencies 1210 (scaled by 1/bin-width) of the different values 1220 of {circumflex over (ω)} are shown as histograms on a linear scale in top graph 1200, and on a logarithmic scale in the bottom graph 1250. Here the bin-width of the histograms is given by 2π/2M, which is the difference between neighboring allowed values of {circumflex over (ω)}.
The dashed histogram 1230 and solid histogram 1240 correspond to the circuits with 4 and 8 phase measurement qubits, respectively. The exact values of θ and 2π−θ for the toy example are indicated with vertical dotted lines 1232, 1242, respectively. In both cases (M=4 and M=8), the observed frequencies peak near the exact values of θ and 2π−θ, demonstrating that {circumflex over (ω)} is a good estimate for them, up to a two-fold ambiguity. (Note: The upward trends near the left (−1) and right (+1) edges of the plots in are artifacts caused by the Jacobian determinant for the map from {circumflex over (ω)} to cos({circumflex over (ω)})). Furthermore, as expected, using more qubits for estimating the phase leads to a more precise estimate.
Ancilla-Free Versions of the Algorithms:
Both algorithms introduced this in this paper so far, namely (1) the amplitude algorithm of
Ancilla-Free Non-Boolean Amplitude Amplification:
The ancilla-free version of the amplitude amplification algorithm is almost identical to the algorithm introduced hereinabove at
(1) Initialize a system in the state |ψ0.
(2) Act the operation Sψ
Analogous to the two-register states |α and |β in Equations (31) and (32), let the single-register states |α′ and |β′ be defined as
Analogous to θ defined in Equation (30), let θ′∈[0,π/2] and δ∈[0,2π) be implicitly defined by
Variables cos(θ′) and δ are the magnitude and phase, respectively, of the initial (i.e., x sampled from |ψ0) expected value of eiφ. An important difference between θ′ and θ is that cos(θ′) is restricted to be non-negative, unlike cos(θ), which may be positive, negative, or zero.
Note that cos(θ′) may be written as
where φ′(x) is given by
φ′(x)≡φ(x)−δ. (111)
Acting the oracle Uφ for the function φ may be thought of as acting the oracle Uφ′ for the function φ′, followed by performing a global, state independent phase-shift of δ. Furthermore, from Equation (120), it can be seen that ψ0|Uφ′|ψ0 is real-valued. This observation may be used to re-purpose the analysis in the “Analysis of the Non-Boolean Amplitude Amplification Algorithm” section hereinabove for the ancilla-free version; the corresponding results are presented here without explicit proofs.
Let |ψk be the state of the system of the after k≥0 iterations of the ancilla-free algorithm. Analogous to Equation (51), |ψ′k may be written as
Let p′K(x) be the probability of measuring the system in state x after K iterations. Analogous to Equation (61), p′K(x) can be written as follows (Equation (113)):
p′
K(x)=p0(x){1−λ′K[cos(φ(x)−δ)−cos(θ′)]}, (113)
where the λ′K, the ancilla-free analogue of λK, is given by
In this case, the probability amplification factor p′K/p0 is linear in cos(φ−δ).
Ancilla-Free Mean Estimation:
The ancilla-free mean estimation algorithm described in this subsection may estimate the magnitude of ψ0|U|ψ0 for a given unitary operator U. Hereinbelow the algorithm is presented in terms of the oracle Uφ, and the goal of the algorithm is to estimate cos(θ′) from Equation (109) (i.e., the magnitude of Eψ
Let the unitary operator Qevenodd be defined as follows (Equation 115)):
Q
evenodd
≡S
ψ
U
φ
S
ψ
U
φ
†. (115)
Its action corresponds to performing the (ancilla-free) even-iteration operation once, followed by the odd-iteration operation. Analogous to Equations (97) and (98), the state |ψ0 can be written as
where |η′+ and |η″− are given by
|η′+ and |η′− are unit-normalized eigenstates of Qevenodd with eigenvalues e2iθ, and e−2iθ, respectively.
The observations in Equations (118) and (119) lead to the following algorithm for estimating cos(θ′):
(1) Perform the QPE algorithm with Qevenodd serving the role of the unitary operator under consideration, and the superposition state |ψ0 in place of the eigenstate required by the QPE algorithm as input. Let the output of this step, appropriately scaled to be an estimate of the phase angle in the range [0,2π), be {circumflex over (ω)}.
(2) Return |cos({circumflex over (ω)}/2)| as the estimate for cos(θ′).
In this version of the algorithm, {circumflex over (ω)} will be an estimate for either 2θ or 2π−2θ. (Note: If θ′=0, the phase angle being estimated is 0 for both |η′+ and |η′−.) So, {circumflex over (ω)}/2 will be an estimate for either θ′ or π−θ′. Since, a) cos(π−θ′)=−cos(θ′), and b) cos(θ′) is a non-negative number, it follows that |cos({circumflex over (ω)}/2)| is an estimate for cos(θ′).
Potential advantageous applications of the algorithms of the present invention may include the following:
Approximate Optimization:
A straightforward application of the non-boolean amplitude amplification algorithm of the present invention is in the optimization of objective functions defined over a discrete input space. The objective function to be optimized needs to be mapped onto the function φ of the oracle Uφ, with the basis states of the oracle corresponding to the different discrete inputs of the objective function. After performing an appropriate number of iterations of the algorithm, measuring the state of the system will yield “good” states with amplified probabilities. Multiple repetitions of the algorithm (multiple shots) may be performed to probabilistically improve the quality of the optimization.
Note that the technique is not guaranteed to yield the true optimal input, and the performance of the technique will depend crucially on factors like a) the map from the objective function to the oracle function φ, b) the number of iterations K, c) the initial superposition |ψ0, and, in particular, d) the initial distribution of φ under the superposition |ψ0. This approach joins known quantum optimization techniques.
Simulating Probability Distributions:
The amplitude amplification algorithm may be useful for simulating certain probability distributions. By choosing the initial state |ψ0, oracle Uφ, and the number of iterations K, one can control the final sampling probabilities pK(x) of the basis states; the exact expression for pK(x) in terms of these factors is given in Equation (61).
Estimating the Overlap Between Two States:
Let |ψ and |ϕ be two different states produced by acting the unitary operators A and B, respectively, on the state |0.
|ψ=A|0,|ϕ=B|0. (120)
Estimating the overlap |ψ|ϕ| between the two states is an important task with several applications, including in Quantum Machine Learning (QML). Several algorithms, including the Swap test, can be used for estimating this overlap. For the Swap test, the uncertainty in the estimated value of |ψ|ϕ| falls as (1/√{square root over (q)}) in the number of queries q to the unitaries A and B (used to the create the states |ψand |ϕ).
On the other hand, the mean estimation algorithm of the present invention also be used to estimate ψ|ϕby noting that
ψ|ϕ=0|A†B|0. (121)
So, by setting
U≡A
†
B, (122)
|ψ0≡|0, (123)
values ψ|ϕ may be estimated as ψ0|U|ψ0 using the mean estimation algorithm of
Meta-Oracles to Evaluate the Superposition |ψ and Unitary U:
Recall from Equations (97) and (98) that
where cos(θ) is the real part of ψ0|Uφ|ψ0. Note that the parameter θ depends on the superposition |ψ0 and the unitary Uφ. The action of Qiter on |Ψ0) is to apply a phase-shift of θ on the projection along |η+ and a phase-shift of −θ on the projection along |η−. This property may be used to create a meta-oracle which evaluates the superposition |Ψ0 and/or the unitary Uφ (or a generic unitary U) based on the corresponding value of θ. More specifically, if the circuit A0 for producing |Ψ0 and/or the circuit for U are additionally parameterized using “control” quantum registers (provided as inputs to the circuits), then a meta-oracle may be created using Equation (24) to evaluate the states of the control registers. Such meta-oracles may be used with quantum optimization algorithms, including the non-boolean amplitude amplification algorithm of the present invention, to find “good” values (or states) of the control registers.
Variational quantum circuits (i.e., quantum circuits parameterized by (classical) free parameters) have several applications, including in QML. Likewise, quantum circuits parameterized by quantum registers may also have applications (e.g., in QML and quantum statistical inference).
Some of the illustrative aspects of the present invention may be advantageous in solving the problems herein described and other problems not discussed which are discoverable by a skilled artisan.
While the above description contains much specificity, these should not be construed as limitations on the scope of any embodiment, but as exemplifications of the presented embodiments thereof. Many other ramifications and variations are possible within the teachings of the various embodiments. While the invention has been described with reference to exemplary embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the scope of the invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the invention without departing from the essential scope thereof. Therefore, it is intended that the invention not be limited to the particular embodiment disclosed as the best or only mode contemplated for carrying out this invention, but that the invention will include all embodiments falling within the scope of the appended claims. Also, in the drawings and the description, there have been disclosed exemplary embodiments of the invention and, although specific terms may have been employed, they are unless otherwise stated used in a generic and descriptive sense only and not for purposes of limitation, the scope of the invention therefore not being so limited. Moreover, the use of the terms first, second, etc. do not denote any order or importance, but rather the terms first, second, etc. are used to distinguish one element from another. Furthermore, the use of the terms a, an, etc. do not denote a limitation of quantity, but rather denote the presence of at least one of the referenced item.
Thus, the scope of the invention should be determined by the appended claims and their legal equivalents, and not by the examples given.
The invention described in this patent application was made with Government support under the Fermi Research Alliance, LLC, Contract Number DE-ACO2-07CH11359 awarded by the U.S. Department of Energy. The Government has certain rights in the invention.