ArticlePDF Available

Grover Adaptive Search for Constrained Polynomial Binary Optimization

Authors:

Abstract and Figures

In this paper we discuss Grover Adaptive Search (GAS) for Constrained Polynomial Binary Optimization (CPBO) problems, and in particular, Quadratic Unconstrained Binary Optimization (QUBO) problems, as a special case. GAS can provide a quadratic speed-up for combinatorial optimization problems compared to brute force search. However, this requires the development of efficient oracles to represent problems and flag states that satisfy certain search criteria. In general, this can be achieved using quantum arithmetic, however, this is expensive in terms of Toffoli gates as well as required ancilla qubits, which can be prohibitive in the near-term. Within this work, we develop a way to construct efficient oracles to solve CPBO problems using GAS algorithms. We demonstrate this approach and the potential speed-up for the portfolio optimization problem, i.e. a QUBO, using simulation and experimental results obtained on real quantum hardware. However, our approach applies to higher-degree polynomial objective functions as well as constrained optimization problems.
Content may be subject to copyright.
Grover Adaptive Search for Constrained Polynomial Binary
Optimization
Austin Gilliam1, Stefan Woerner2, and Constantin Gonciulea1
1JPMorgan Chase
2IBM Quantum, IBM Research – Zurich
In this paper we discuss Grover Adaptive
Search (GAS) for Constrained Polynomial Bi-
nary Optimization (CPBO) problems, and in
particular, Quadratic Unconstrained Binary
Optimization (QUBO) problems, as a special
case. GAS can provide a quadratic speed-up
for combinatorial optimization problems com-
pared to brute force search. However, this re-
quires the development of efficient oracles to
represent problems and flag states that satisfy
certain search criteria. In general, this can
be achieved using quantum arithmetic, how-
ever, this is expensive in terms of Toffoli gates
as well as required ancilla qubits, which can
be prohibitive in the near-term. Within this
work, we develop a way to construct efficient
oracles to solve CPBO problems using GAS al-
gorithms. We demonstrate this approach and
the potential speed-up for the portfolio opti-
mization problem, i.e. a QUBO, using simula-
tion and experimental results obtained on real
quantum hardware. However, our approach
applies to higher-degree polynomial objective
functions as well as constrained optimization
problems.
1 Introduction
Using the laws of quantum mechanics, quantum
computers offer novel solutions for resource-intensive
problems. Quantum computers are theoretically
proven to solve certain problems faster than a classi-
cal device [13] and are well-equipped to handle tasks
such as factoring [2], linear systems of equations [4,5],
Monte-Carlo simulations [69], as well as combinato-
rial optimization problems [1014].
A commonly-studied class of combinatorial opti-
mization problems are Quantum Unconstrained Bi-
nary Optimization (QUBO) problems, with applica-
tions in resource allocation, finance, machine learn-
ing, and partitioning. There are multiple approaches
to solve QUBO problems on a quantum computer,
discussed in the following paragraphs.
First, quantum annealing [15,16] is a meta-
heuristic for adiabatic quantum computers. Similar
to simulate annealing, it can be used to approximate
optimal solutions of QUBO problems.
Further, there exist variational quantum optimiza-
tion heuristics, such as Variational Quantum Eigen-
solver (VQE) and Quantum Approximate Optimiza-
tion Algorithm (QAOA) [1013]. VQE and QAOA
are heuristics designed for near-term, noisy quantum
computers without performance guarantees. How-
ever, for QAOA, it is known that in the infinite depth
limit, the algorithm recovers adiabatic evolution and
would converge to the optimal solution.
Last, there are Grover-based [1] optimization algo-
rithms, such as Grover Adaptive Search (GAS) [17
19]. GAS iteratively applies Grover Search to find
the optimum value of an objective function, by us-
ing the best-known value as a threshold to flag all
values smaller than the threshold in order to find a
better solution. The algorithmic framework comes
with a quadratic speed-up, however it likely requires
an error-corrected fault-tolerant quantum computer
due to the depth of the resulting circuits. One of the
challenges inherent in GAS is the creation of efficient
oracles.
In this paper, we provide a framework for auto-
matically generating efficient oracles for solving Con-
strained Polynomial Binary Optimization (CPBO)—
a generalization of QUBO—with GAS. The objective
function and constraints need to be efficiently en-
coded, for which we use a Quantum Dictionary [20],
a pattern for representing key-value pairs as entan-
gled quantum registers, that turns out to be efficient
for polynomial functions – in particular for quadrat-
ics representing QUBO problems. The approach re-
lies on the addition of classical numbers to a quan-
tum register in superposition, conditioned on the state
of another quantum register. It is similar to the
method used in Quantum Fourier Transform (QFT)
adders [21]. Given a boolean polynomial, the coeffi-
cient of each monomial is added to the value register
conditioned on the qubits in the key register corre-
sponding to the variables present in the monomial.
We test our algorithm on the portfolio optimiza-
tion problem [22,23]. Multiple variants of this prob-
lem have been studied in the quantum optimization
literature, ranging from convex continuous formula-
tions [24] to QUBOs [13,25,26]. Here we investi-
gate a QUBO formulation as well as a formulation
with an inequality budget constraint, the latter not
Accepted in Quantum 2021-04-05, click title to verify. Published under CC-BY 4.0. 1
arXiv:1912.04088v3 [quant-ph] 6 Apr 2021
being compatible with other approaches like quan-
tum annealing, VQE, or QAOA—as those approaches
can only handle linear equality constraints through
quadratic penalty terms.
The remainder of this paper is organized as follows.
Sec. 2introduces GAS in general. Sec. 3introduces
QUBO problems, and shows how we can efficiently
generate oracles to solve them using GAS algorithms,
as well as how this approach extends to more gen-
eral CPBO problems. In Sec. 4, we apply the devel-
oped technique to a concrete test case – portfolio op-
timization – and demonstrate it via simulation using
Qiskit [27]. Sec. 5concludes this paper and discusses
possible directions of future research.
2 Grover Adaptive Search
Optimization problems are often solved by sequential
approximation methods. In many cases, such meth-
ods are the only choice, but they may be computation-
ally more efficient even when a solution to a problem
can be expressed in a closed form. GAS works in a
similar way, as it repeatedly uses Grover Search to
randomly sample from all solutions better than the
current one.
Grover Search is often described as a search algo-
rithm, because it was initially formulated in the con-
text of finding a single state of interest in a superpo-
sition of n-qubit quantum states. The algorithm has
been generalized to the case of multiple states of inter-
est, in which case it is better interpreted as a sampling
algorithm. It amplifies the amplitudes of the states of
interest within a larger search space, thus, increasing
the probability of measuring one of the target states.
Grover Search – the core element of GAS – needs
three ingredients:
1. A state preparation operator Ato construct a su-
perposition of all states in the search space. In
this manuscript, Ais implemented by Hadamard
gates Hn, i.e. it constructs the equal superpo-
sition state:
Hn|0in=1
2n
2n1
X
i=0 |iin.(1)
2. An oracle operator O, that recognizes the states
of interest and multiplies their amplitudes by -1.
For instance, suppose I⊂ {0,...,2n1}denotes
the set of target states and A=Hn, then
OA |0in=1
2nX
i /I|iin1
2nX
iI|iin.(2)
3. The Grover diffusion operator D, that multiplies
the amplitude of the |0instate (or, equivalently,
all states except |0in) by -1.
Algorithm 1: Grover Adaptive Search
Input: f:XR,λ > 1
1Uniformly sample x1Xand set y1=f(x1);
2Set k= 1 and i= 1;
3repeat
4Randomly select the rotation count rifrom
the set {0,1, ..., dk1e};
5Apply Grover Search with riiterations,
using oracles Ayiand Oyi. We denote the
outputs xand yrespectively;
6if y < yithen
7xi+1 =x,yi+1 =y, and k= 1
8else
9xi+1 =xi,yi+1 =yi, and k=λk
10 i=i+ 1;
11 until a termination condition is met;
The diffusion operator has the net effect of invert-
ing all amplitudes in the quantum state about their
mean. This causes all the amplitudes of the states of
interest to be magnified, while the amplitudes of all
other states are decreased. More precisely, applying
the Grover operator G=ADAOthe right number
of times to state A|0in– i.e. evaluating GrA|0infor
an integer r0– will maximally amplify the ampli-
tudes of the states of interest. The optimal number
of applications rdepends on the number N= 2nof
all states and the number sof states of interest, and
is equal to bπ
4qN
sc. This implies a probability of
sampling a target state of at least 1/2, which corre-
sponds to a quadratic speed-up compared to classical
search. Since sis in general unknown, we can either
use Quantum Counting algorithms [2831] to find s,
or apply a randomized strategy.
The latter is the essence of [32], where an algo-
rithm for applying Grover Search for unknown sis
presented. This was then used to create a minimum-
finding algorithm [17], which we refer to as GAS. In
the following we outline GAS, which is formally given
in Alg. 1.
Consider a function f:XRfor nbinary
variables, where for ease of presentation assume
X={0,1}n, for which we are interested in finding
minxXf(x). The main idea of GAS is to construct
Ayand Oyfor a given threshold ysuch that they
flag all states xXsatisfying f(x)< y, such that
we can use Grover Search to find a solution ˜xwith a
function value better than y. Then we set y=f(˜x)
and repeat until some formal termination criteria is
met, e.g. based on the number of iterations, time, or
progress in y.
While implementations of GAS vary around the
specific use case [19,33], the general framework still
loosely follows the steps described in [17]. In the fol-
lowing, we will show how operator Aand oracle Ocan
Accepted in Quantum 2021-04-05, click title to verify. Published under CC-BY 4.0. 2
be efficiently constructed for QUBO as well as CPBO
problems.
3 QUBO and CPBO Oracles
A QUBO problem with nbinary variables is specified
by a quadratic operator represented by a matrix Q
Rn×n, vector bRn, and constant cR, defined as
min
x∈{0,1}n
n
X
i,j=1
Qij xixj+
n
X
i=1
bixi+c
,(3)
or more compactly as minx∈{0,1}n(xTQx +bTx+c),
i.e. f(x) = xTQx +bTx+c.
In the following, we show how to efficiently con-
struct GAS oracles for QUBO problems. We will con-
struct Aysuch that it prepares a n-qubit input regis-
ter to represent the equal superposition of all |xinand
am-qubit output register to (approximately) repre-
sent the corresponding |f(x)yim. Then, the oracle
Oyshould flag the states with a negative value in the
output register. Note that in the implementation dis-
cussed, the oracle operator is actually independent of
y, but this is not a requirement. For clarity, we will
refer to the oracle as Owhen the oracle is indepen-
dent of y. More formally, we show how to construct
the oracles such that
Ay|0in|0im=1
2n
2n1
X
x=0 |xin|f(x)yim, and (4)
O|xin|zim=sign(z)|xin|zim(5)
where |xiis the binary encoding of the integer x. Fur-
thermore, we will show how the developed technique
can be used to extend GAS to higher-degree polyno-
mials of binary variables, as well as to constrained
optimization.
3.1 Construction of operator A
To construct A, we will use a Quantum Dictionary, as
introduced in [20], and summarize the construction in
the following subsections.
3.1.1 Encoding a Single Integer Value
Given an m-qubit register and an angle θ[π, π),
we wish to prepare a quantum state whose state vector
represents a "periodic signal" equivalent to a geomet-
ric sequence of length 2m. This can be implemented
using a unitary operator defined by Fig. 1.
The simplest implementation of UG(θ)uses the
phase gate R(θ)that, when applied to a qubit, rotates
the phase of the amplitudes of the states having 1 in
the position corresponding to that qubit. In Qiskit,
this gate is the U1(θ)operator [27]. The circuit for
UG(θ)is shown in Fig. 2, and consists of applying the
Hm|0imUG(θ)=1
2mP2m1
k=0 eikθ |kim
Figure 1: Definition of unitary operator UG(θ), where
θ[π, π), applied to an m-qubit register in equal superpo-
sition. The result is a quantum state vector that represents
a geometric sequence of length 2m.
gate R(2iθ)to the qubit m1iin the m-qubit
register prepared in the state of equal superposition
in equation (1).
0R(2m1θ)
.
.
.. . .
m1i R(2iθ)
.
.
.. . .
m1R(θ)
Figure 2: A circuit for unitary operator UG(θ), where θ
[π, π), applied to an m-qubit register. Rdenotes the phase
gate, which rotates the amplitudes of states having 1 in the
position corresponding to the qubit it was applied to.
In [20] an alternative way to implement UGwas in-
troduced by applying controlled Ryrotations to an
ancillary register containing the encoding of an eigen-
state of Ry, as explained in Appendix A.
Note that QFT applied to a register containing the
binary encoding of a non-negative integer also creates
a geometric sequence of amplitudes in that register.
UGcan be seen as a shortcut for the QFT when the
encoded numbers are known classically, as we avoid
multi-qubit interactions.
Given an integer 2m1k < 2m1, if we apply
UG(2π
2mk), followed by the inverse QFT to an m-qubit
register prepared in the state of equal superposition
in equation (1), we end up with k(mod 2m)being
encoded in the register, as shown in Fig. 3.
Hm|0imUG(2π
2mk)QF T =|k(mod 2m)im
Figure 3: The geometric sequence encoding of an integer
2m1k < 2m1, applied to a register of mqubits in
equal superposition.
This representation is called the binary Two’s Com-
plement of k, which just adds 2mto negative values
k, similar to the way we can represent negative an-
gles with their complement, e.g. equating π/4with
7π/4. The reason this representation occurs naturally
in this context is due to the fact that rotation com-
position behaves like modular arithmetic. The same
method can be used to encode non-integers, as dis-
cussed in Appendix B.
Accepted in Quantum 2021-04-05, click title to verify. Published under CC-BY 4.0. 3
|x0i
|x1i
|x2i
|x3i
|zimUG(2π
2ma13)
Figure 4: An example of C{1,3}(U)with n= 4 input qubits
and moutput qubits.
3.1.2 Encoding a Superposition of Polynomial Values
Next we will discuss the application of UG(θ)to a
register |zimrepresenting the values of a function,
controlled on a register |xinrepresenting the inputs
of the same function. In general, the application
of a unitary operator Uto |zimcontrolled by a set
J⊆ {0, . . . , n 1}of qubits of |xincan be expressed
as
CJ(U)|xi|zi=|xiUQ
jJ
xj
|zi,(6)
and an example is shown in Fig. 4.
The general form of a polynomial of nvariables is:
P(x) = X
J⊆{0,...,n1}
aJY
jJ
xj.(7)
Each subset J⊆ {0, . . . , n 1}has a corresponding
monomial Q
jJ
xj. The free term is represented by a.
3.1.3 Construction of Operator A
Now we are ready to define the operator A, as shown
in Fig. 5. It consists of applying a controlled ge-
ometric sequence transformation CJ(UG(2π
2maJ)) for
each subset J⊆ {0, . . . , n 1}with a non-zero coeffi-
cient aJ, followed by a single application of the inverse
QFT.
|xinH•••
|zimH. . . UG(2π
2maJ). . . QF T
Figure 5: The circuit for state preparation operator A, ap-
plied to input register |xinand output register |zim. Start-
ing in a state of equal superposition, the operator employs
several controlled applications of the unitary operator UG,
whose angle parameter corresponds to a non-zero coefficient
aJ, where Jis a subset of {0,...,n 1}. The single ap-
plication of the inverse Quantum Fourier Transform (QF T )
at the end of the circuit decodes the periodic signal encoded
by UG, resulting in a superposition of key-value pairs.
Note that QUBO polynomials have only monomials
of degree less than or equal to 2, i.e. |J| ≤ 2, so we
only need to control on single and pairs of qubits. An
example of encoding a single monomial is shown in
Fig. 6.
|x0i
|x1i• •
|x2i
|x3i• •
|z0iR(2π)
|z1iR(π)
|z2iR(π/2)
Figure 6: An example of encoding the monomial 2x1x3, with
input register |xi4and output register |zi3.Rdenotes the
phase gate, which rotates the amplitudes of states having 1
in the position corresponding to the qubit it was applied to.
Gate Count
H m
R m
1-controlled R m ·n
2-controlled R m ·n(n1)/2
Inverse QF T on mqubits 1
Table 1: Number of required gates to realize Ain terms of
number of input qubits nand output qubits massuming a
QUBO with dense Qand band non-zero offset c. The depth
scales as 1/m-times the number of gates since they can be
mostly applied in parallel. Note that a QF T on mqubits
can be implemented using O(mlog(m)) gates and thus will
not dominate the overall circuit complexity [34]
The operator Aprepares a state where the |xin
register holds all 2ninputs in equal superposition, en-
tangled with the corresponding values P(x)encoded
in the |zimregister:
A|0in|0im=1
2n
2n1
X
x=0 |xin|P(x)im,(8)
where we are assuming that an appropriate size mfor
the value register is known.
The desired Ayoperator is obtained by adding the
yconstant to the free term of the original polyno-
mial. This construction works for polynomials of ar-
bitrary degree.
A detailed summary of the number of gates required
to construct Afor a QUBO is given in Table 1. In
general, the number of gates scales as the number
of monomials in the polynomial to be loaded. This
matches the scaling of the description of the problem
under the assumption that the input weights and out-
put are represented using roughly the same number
of bits, thus, the asymptotic scaling of our approach
is optimal.
An alternative approach to construct Awould be to
use quantum arithmetic. However, even uncontrolled
in-place addition of a classically given m-bit number
to a m-bit quantum register requires 2mqubits and
2m1Toffoli gates [3537]. This then would have to
be done O(n2)times in a 2-controlled way, which leads
to significantly larger circuits and mmore qubits than
Accepted in Quantum 2021-04-05, click title to verify. Published under CC-BY 4.0. 4
|xin
f(x) + y < 0(f(x) + y < 0)C(x)<0(C(x)<0)
|0im1
|0i• •
|0i
|0i
|0i
Figure 7: A constrained optimization circuit, which encodes the functions corresponding to a given set of constraints into
an m-qubit register, and flips a related indicator qubit for each condition that is satisfied. In this example, given a function
f:XRof nbinary variables, the global indicator qubit (shown at the bottom of the circuit) is set to |1iif and only if
f(x) + y—where yis the threshold parameter from GAS—and the cost of the input (denoted C(x)) are both less than 0.
Note that the encoding method is the same as described in Sec. 3.1, meaning that the binary representation of the values is
in Two’s Complement, and thus we only need to control on a single qubit (the most significant bit) to determine if a value is
negative. There is a trade-off between reusing the mqubits and reversing the computation (shown here), or adding additional
value qubits for each constraint, allowing one to skip the uncompute. In either case, we can replace the oracle that flags "good
states" by a multi-controlled Zgate, with a number of controls equal to one more than the number of constraints. Here, we
add one qubit and use a Toffoli gate to get back to the setting introduced before.
required by our approach, and also requires explicit
encoding of negative integers.
3.2 Construction of oracle O
At each step of the algorithm, we are adding a con-
stant to the polynomial, and searching for remaining
negative values. This means the oracle just needs to
recognize negative integers. Since values are repre-
sented in Two’s Complement, where the most signifi-
cant (left-most) bit designates the sign of the number,
a single qubit in the value register can be used to rec-
ognize negative integers. The typical oracle that mul-
tiplies target amplitudes by 1can be applied. Note
that the oracle stays unchanged between iterations,
because we add a constant to the polynomial, which
may lead to overflow in the value register. In order
to avoid that, we may need to increase the number of
qubits in the value register by 1.
Alternatively, threshold-based oracles (which are
potentially more expensive) can be used, that will re-
duce the search space by filtering the numbers above
a given threshold.
3.3 Constrained Optimization
It is common for optimization problems to impose ad-
ditional constraints—e.g. the total number or cost of
assets in a portfolio may be subjected to an upper
bound. Such constraints translate into further reduc-
tions of the search space based on the key register.
For example, the number of assets in a portfolio cor-
responds to the number of 1s in the binary represen-
tation of the input of the objective function, called
the Hamming weight.
It is straightforward to use the GAS oracles intro-
duced in Sec. 3.1 and 3.2 to take into account poly-
nomial equality and inequality constraints on the key
register. Therefore, we can add additional registers
to evaluate other polynomials. Whether an inequal-
ity constraint is satisfied or not can again be mapped
to the sign qubit by applying an appropriate shift to
the polynomial. Equality constraints are a bit more
expensive, as they require the detection of a particu-
lar state, which essentially has the same complexity
as the Grover diffusion operator D.
This leads to a set of qubits flagging target states:
one qubit identifying the states that correspond to
objective values below the current threshold, and one
qubit for each constraint. Applying a logical AND-
operation to all of them essentially acts as an inter-
section of the individually flagged states and allows
to construct oracles for CPBO. An example is shown
in Fig. 7, which we demonstrate in Sec. 4.1.
4 Test Cases
In the remainder of this paper we demonstrate the
proposed technique on the portfolio optimization
problem, and then show a simple example on quan-
tum hardware.
4.1 Portfolio Optimization
Suppose an investment universe consisting of nassets,
denoted by i= 1, . . . , n, their corresponding expected
returns µRnand covariance matrix ΣRn×n.
Furthermore, we consider a given risk factor q0,
which determines the considered risk appetite. The
resulting objective function is
min
x∈{0,1}nqxTΣxµTx.(9)
In other words, we want to minimize the weighted
variance minus the expected portfolio return. Setting
Accepted in Quantum 2021-04-05, click title to verify. Published under CC-BY 4.0. 5
q= 0 implies a risk neutral investor, while increasing
qincreases its risk averseness.
In the presented form, portfolio optimization is a
QUBO problem. We can extend it by imposing a
budget constraint of the form
n
X
i=1
xi=B, (10)
where B∈ {0, . . . , n}denotes the number of assets to
be chosen.
In general, equality constraints can be recast as
penalty terms
λ n
X
i=1
xiB!2
,(11)
and added to the objective (since we minimize), where
λ > 0is a large number to enforce the constraint to
be satisfied. This results in a quadratic term that will
again lead to a QUBO problem.
However, with the methodology introduced in
Sec. 3.3, we can also model more complex constraints,
e.g. a budget inequality constraint of the form
n
X
i=1
cixiB, (12)
where ciRdenote the asset prices, which does usu-
ally make more sense in practice than (10). In the
following we consider two examples, one with an ob-
jection function that we want to minimize, and then
the same problem with added constraints.
4.1.1 Finding a Minimum Value
Consider a portfolio of n= 3 assets, risk factor q=
0.5, and returns described by:
µ= 1
2
3!and Σ = 2 0 4
0 4 2
42 10 !(13)
which leads to the formulation
min
x∈{0,1}3(2x1x3x2x31x1+ 2x23x3).(14)
The objective function with added constant y
(where yis the current threshold) has an associated
Ayoperator and the oracle Orecognizes negative val-
ues, as introduced in Sec. 3. To perform the experi-
ment we need 7qubits split into two registers, n= 3
input qubits and 4output qubits. While we only need
3qubits in the output register, we add 1extra to ac-
commodate for the threshold shift. We set the initial
threshold y1= 0, and stop searching if an improve-
ment has not been found in three consecutive itera-
tions of the algorithm.
For each iteration of GAS, we determine the num-
ber of applications of the Grover iterate as defined in
Alg. 1. We apply Ayfor the current threshold, and
Figure 8: The output probabilities of GAS for three iterations,
searching for a minimum value of a function (Eq. 14), each
with thresholds yand rapplications of the Grover operator.
then apply the Grover iterate Gy=AyDA
yOfor the
predetermined number of applications. If the mea-
sured value is less than y, we update the threshold.
This process repeats until we have seen no improve-
ment for three consecutive iterations.
Classically, we can determine the original minimum
value by keeping track of the total shift, or by calcu-
lating the value of the objective function for the min-
imum key. The results of this simulated experiment
are shown in Fig. 8.
4.1.2 Additional Constraints
We can impose a budget inequality constraint of the
form discussed in Eq. 12 to the previous problem,
where B < 2and the price of each asset is 1. As
shown in Sec. 3.3, we can implement this constraint
by adding an additional register to the existing quan-
tum circuit, and then encode the Hamming weight of
the binary representation of the keys in that register.
Note that we only need to control on the most signif-
icant qubit of the constraint register to determine if
B < 2. Otherwise, the procedure for applying GAS
is the same as in the original problem. The results of
this simulated experiment are shown in Fig. 9.
4.2 Trials on Real Hardware
The experiments discussed in this section were run
on the IBM ibmq_toronto device, with Quantum
Volume 32 [38]. The configuration details for
ibmq_toronto at the time of our experiments is given
in Appendix C. Readout error-mitigation techniques
were applied to the results of each circuit [27,39].
Accepted in Quantum 2021-04-05, click title to verify. Published under CC-BY 4.0. 6
Figure 9: The output probabilities of three iterations of GAS,
with respective thresholds yand rapplications of the Grover
operator. We want to find a minimum value of Eq. 14, with
the additional constraint that the binary representation of the
corresponding key has a Hamming weight less than 2.
Let us consider a simple example of a polynomial
minimization which can be run on current quantum
hardware:
min
x∈{0,1}2(2 + x1+x2).(15)
As in the previous subsection, we set the initial
threshold y1= 0, and stop searching after three it-
erations with no improvement. Note that due to the
probabilistic nature of the algorithm there is a non-
zero probability that an invalid key-value pair will
be measured. In addition, the noise inherent in the
present era of quantum hardware further impacts the
results and increases the probability of wrong results.
We repeat the computation several times, and take
the outcome with the maximum probability as the
measured result. As long as the noise is not too
strong, this still achieves a good key-value pair.
The results of the experiment are shown in Fig. 10.
Note that in this example, the valid measurement out-
comes are 0→ −2,1→ −1,2→ −1, and 30.
In the first iteration the four outcomes are shown in
an approximately-equal superposition, and sampled
randomly (we do not apply the Grover iterate). We
measure 1→ −1, and thus we update the threshold
to y2=1and the number of iterations to r= 1.
In the second iteration of Grover Adaptive Search the
results of the amplification are shown, where 0→ −2
(the minimum) has the highest probability.
Figure 10: The output probabilities of GAS for two itera-
tions run on real quantum hardware, with respective thresh-
olds yand rapplications of the Grover operator. The valid
measurement outcomes are shown in blue, while the invalid
measurement outcomes are shown in grey.
5 Conclusion
In this paper we introduced an efficient way to im-
plement the oracles required for solving Constrained
Polynomial Binary Optimization problems using
Grover Adaptive Search. This problem class is very
general and contains for instance QUBO problems.
Our approach significantly reduces the number of
gates required compared to standard quantum arith-
metic approaches, i.e. it lowers the requirements to
apply GAS on real quantum hardware for practically
relevant problems. We demonstrated our algorithm
on the portfolio optimization problem, i.e. a QUBO,
where we could reliably find the optimal solution, and
on real quantum hardware. Within this manuscript
we focused mainly on problems with integer coeffi-
cients. The handling of non-integers is discussed in
Appendix B.
Code Availability
All code associated with this publication can be
found in the IBM Qiskit Optimization module, cur-
rently hosted at https://github.com/Qiskit/qiskit-
optimization.
Acknowledgments
This material is for informational purposes only and
is not the product of JPMorgan Chase & Co.’s Re-
search Department. This material is not intended as
research, a recommendation, advice, offer or solicita-
tion for the purchase or sale of any financial product
or service, and is not a research report and is not in-
tended as such. This material is not intended to rep-
resent any position or opinion of JPMorgan Chase &
Accepted in Quantum 2021-04-05, click title to verify. Published under CC-BY 4.0. 7
Figure 11: An example of an integer encoding (left), accompanied by two examples of a non-integer encoding (middle and
right). Note that in the integer case only one outcome is possible, whereas the encoding of a non-integer leads to a superposition
of approximations.
Co. JPMorgan Chase & Co. disclaims any responsi-
bility or liability whatsoever for the quality, accuracy
or completeness of the information herein, and for any
reliance on, or use of this material in any way. ©2021
JPMorgan Chase & Co.
IBM, the IBM logo, and ibm.com are trademarks of
International Business Machines Corp., registered in
many jurisdictions worldwide. Other product and ser-
vice names might be trademarks of IBM or other com-
panies. The current list of IBM trademarks is avail-
able at https://www.ibm.com/legal/copytrade.
A Quantum Dictionary
The Quantum Dictionary was introduced in [20] as a
quantum computing pattern for encoding functions,
in particular polynomials, into a quantum state using
geometric sequences. The paper shows how quantum
algorithms like search and counting applied to a quan-
tum dictionary allow to solve combinatorial optimiza-
tion and QUBO problems more efficiently than using
classical methods.
|keyiH•••
|valiH•••QF T
|anciE(Ry). . . Ry(θ). . . E(Ry)
Figure 12: Quantum Dictionary circuit.
Encoding a geometric sequence can be done using
the phase gate as we explained earlier, but it is worth
mentioning an alternative method described in [20],
which uses the Ryfamily of gates.
|0iRx(π/2) Z X =E(Ry)
Figure 13: Eigenstate preparation for Ry.
The Rygate is applied to an ancillary register con-
taining one of its eigenstates prepared by an operator
E(Ry), conditioned on both the key and value reg-
isters. The rotation angle θis different for each ap-
plication, representing a number that contributes to
the values corresponding to keys that have the condi-
tioned key as a subset. In particular, when encoding
a polynomial, a rotation will be applied for each of its
coefficients.
In [20] we used the Ryoperator, with the eigenstate
1/2(i|0i+|1i), independent of the rotation angle.
This state can be prepared by the circuit in Fig. 13.
The corresponding eigenvalue of Ry(2θ)is e.
B Handling Non-Integers
When handling non-integers, we have two choices.
The first is to approximate them with fractions with
a common denominator and encode the numerator
into quantum registers before performing computa-
tions, cf. Appendix B.1. The second, cf. Appendix
B.2, is to phase-encode real numbers and let the in-
verse QFT convert the result of the computation into
a superposition of approximations.
B.1 Approximating Real Coefficients by Frac-
tions
If we relax the assumption that all coefficients are in-
tegers, we can approximate non-integers by dividing
all values in µand Σby the largest (scaling the range
of the coefficients to [1,1)), and approximating each
value kby a fraction k
2mwith 2m1k < 2m1,
where mis the number of value qubits. As an exam-
ple, suppose n= 3,m= 5,q= 0.5, and
µ=
3.77 ×103
1.09 ×103
2.41 ×103
.(16)
Scaling the coefficients of µleads to
µ=
1.0
0.29
0.64
,(17)
Accepted in Quantum 2021-04-05, click title to verify. Published under CC-BY 4.0. 8
and approximating them by fractions leads to
µ=
16/32
5/32
10/32
.(18)
As the approximated function coefficients have a com-
mon denominator, we can ignore the denominator and
treat the values as integers
µ=
16
5
10
,(19)
which results in the optimization problem
min
x∈{0,1}3(16x1+ 5x2+ 10x3).(20)
B.2 Encoding Real Coefficients as Fejér Distri-
butions
Recall the unitary operator UG(θ)from Fig. 1, where
θ[π, π). As discussed in Sec. 3.1, the process for
encoding an integer 2m1k < 2m1is to apply
UG(2π
2mk)to an m-qubit register in equal superposi-
tion, followed by a single application of the inverse
Quantum Fourier Transform.
Hm|0imUG(θ)QF T =UFejér(θ)|0im
Figure 14: UG(θ)followed by inverse QFT .
For the general case of a real number, shown in
Fig. 14, where angle θ[π, π). The application of
the same sequence of gates from the integer case re-
sults in a quantum state whose state vector consists of
the inner product between G(θ)and the Fourier bases
G(2π
2mj), representing a similarity measure between θ
and 2π
2mj, for 0j2m1, where G(θ)denotes
the geometric sequence vector (1, e, . . . , ei(2m1)θ).
We will call the operator preparing this state UFejér
because the outcome probability distribution is the
Fejér distribution [40]:
UFejér(θ)|0im=1
2m
2m1
X
j=0 hG(θ), G(2π
2mj)i|ji(21)
If θ=2π
2ma, for a real number 2m1a < 2m1,
then UFejér(θ)|0imprepares a state whose two most
likely measurement outcomes are the closest two inte-
gers to a. The probability of measuring one of them
is at least 81% [41]. Fig. 11 shows the probability
distribution of the outcomes for multiple values of a
where m= 4.
C Hardware Specifications
The error map for ibmq_toronto in Fig. 15 was gen-
erated on the day of experimentation using Qiskit’s
visualization library [27].
Figure 15: The error map for ibmq_toronto.
References
[1] Lov K. Grover. A fast quantum mechanical al-
gorithm for database search. In Proceedings of
the Twenty-eighth Annual ACM Symposium on
Theory of Computing, STOC ’96, pages 212–219,
New York, NY, USA, 1996. ACM. ISBN 0-89791-
785-5. DOI: 10.1145/237814.237866.
[2] Peter W. Shor. Polynomial-time algorithms for
prime factorization and discrete logarithms on a
quantum computer. SIAM Journal on Comput-
ing, 26(5):1484–1509, Oct 1997. ISSN 1095-7111.
DOI: 10.1137/s0097539795293172.
[3] B. P. Lanyon, J. D. Whitfield, G. G. Gillett,
M. E. Goggin, M. P. Almeida, I. Kassal, J. D.
Biamonte, M. Mohseni, B. J. Powell, M. Bar-
bieri, and et al. Towards quantum chemistry
on a quantum computer. Nature Chemistry, 2
(2):106–111, Jan 2010. ISSN 1755-4349. DOI:
10.1038/nchem.483.
[4] Aram W. Harrow, Avinatan Hassidim, and Seth
Lloyd. Quantum algorithm for linear systems
of equations. Physical Review Letters, 103(15),
Oct 2009. ISSN 1079-7114. DOI: 10.1103/phys-
revlett.103.150502.
[5] Carlos Bravo-Prieto, Ryan LaRose, M. Cerezo,
Yigit Subasi, Lukasz Cincio, and Patrick J. Coles.
Variational quantum linear solver, 2020. URL
https://arxiv.org/abs/1909.05820.
[6] Patrick Rebentrost, Brajesh Gupt, and
Thomas R. Bromley. Quantum computa-
tional finance: Monte carlo pricing of financial
derivatives. Phys. Rev. A, 98:022321, Aug 2018.
DOI: 10.1103/PhysRevA.98.022321.
[7] Stefan Woerner and Daniel J. Egger. Quantum
risk analysis. npj Quantum Information, 5:15,
2019. DOI: 10.1038/s41534-019-0130-6.
[8] D. J. Egger, R. Garcia Gutierrez, J. Cahue
Mestre, and S. Woerner. Credit risk analy-
Accepted in Quantum 2021-04-05, click title to verify. Published under CC-BY 4.0. 9
sis using quantum computers. IEEE Transac-
tions on Computers, pages 1–1, 2020. DOI:
10.1109/TC.2020.3038063.
[9] Nikitas Stamatopoulos, Daniel J. Egger, Yue
Sun, Christa Zoufal, Raban Iten, Ning Shen, and
Stefan Woerner. Option pricing using quantum
computers. Quantum, 4:291, Jul 2020. ISSN
2521-327X. DOI: 10.22331/q-2020-07-06-291.
[10] Edward Farhi, Jeffrey Goldstone, and Sam Gut-
mann. A Quantum Approximate Optimization
Algorithm, 2014. URL https://arxiv.org/
abs/1411.4028.
[11] Alberto Peruzzo, Jarrod McClean, Peter Shad-
bolt, Man Hong Yung, Xiao Qi Zhou, Pe-
ter J. Love, Alán Aspuru-Guzik, and Jeremy L.
O’Brien. A variational eigenvalue solver on a
photonic quantum processor. Nature Commu-
nications, 5:4213, 2014. ISSN 20411723. DOI:
10.1038/ncomms5213.
[12] Giacomo Nannicini. Performance of hybrid
quantum-classical variational heuristics for com-
binatorial optimization. Physical Review E,
99:013304, Jan 2019. DOI: 10.1103/Phys-
RevE.99.013304.
[13] Panagiotis Kl. Barkoutsos, Giacomo Nannicini,
Anton Robert, Ivano Tavernelli, and Stefan Wo-
erner. Improving variational quantum optimiza-
tion using cvar. Quantum, 4:256, Apr 2020. ISSN
2521-327X. DOI: 10.22331/q-2020-04-20-256.
[14] L. Braine, D. J. Egger, J. Glick, and S. Wo-
erner. Quantum algorithms for mixed binary
optimization applied to transaction settlement.
IEEE Transactions on Quantum Engineering, 2:
1–8, 2021. DOI: 10.1109/TQE.2021.3063635.
[15] Andrew M Childs, Edward Farhi, and John
Preskill. Robustness of adiabatic quantum com-
putation. Physical Review A, 65(1):012322, 2001.
DOI: 10.1103/PhysRevA.65.012322.
[16] Mark W Johnson, Mohammad HS Amin,
Suzanne Gildert, Trevor Lanting, Firas Hamze,
Neil Dickson, Richard Harris, Andrew J Berkley,
Jan Johansson, Paul Bunyk, et al. Quan-
tum annealing with manufactured spins. Na-
ture, 473(7346):194–198, 2011. DOI: 10.1038/na-
ture10012.
[17] Christoph Dürr and Peter Høyer. A quantum
algorithm for finding the minimum, 1996. URL
https://arxiv.org/abs/quant-ph/9607014.
[18] D. Bulger, W. P. Baritompa, and G. R.
Wood. Implementing pure adaptive search
with grover’s quantum algorithm. Journal of
Optimization Theory and Applications, 116(3):
517–529, Mar 2003. ISSN 1573-2878. DOI:
10.1023/A:1023061218864.
[19] W. P. Baritompa, D. W. Bulger, and G. R.
Wood. Grover’s quantum algorithm applied to
global optimization. SIAM J. on Optimization,
15(4):1170–1184, April 2005. ISSN 1052-6234.
DOI: 10.1137/040605072.
[20] Austin Gilliam, Charlene Venci, Sreraman Mu-
ralidharan, Vitaliy Dorum, Eric May, Rajesh
Narasimhan, and Constantin Gonciulea. Foun-
dational patterns for efficient quantum comput-
ing, 2019. URL https://arxiv.org/abs/1907.
11513.
[21] Thomas G. Draper. Addition on a quantum
computer, 2000. URL https://arxiv.org/abs/
quant-ph/0008033.
[22] Román Orús, Samuel Mugel, and Enrique
Lizaso. Quantum computing for finance:
Overview and prospects. Reviews in Physics,
4:100028, Nov 2019. ISSN 2405-4283. DOI:
10.1016/j.revip.2019.100028.
[23] Daniel J. Egger, Claudio Gambella, Jakub
Marecek, Scott McFaddin, Martin Mevissen,
Rudy Raymond, Andrea Simonetto, Stefan Wo-
erner, and Elena Yndurain. Quantum com-
puting for finance: State-of-the-art and future
prospects. IEEE Transactions on Quantum En-
gineering, 1:1–24, 2020. ISSN 2689-1808. DOI:
10.1109/tqe.2020.3030314.
[24] Patrick Rebentrost and Seth Lloyd. Quantum
computational finance: quantum algorithm for
portfolio optimization, 2018. URL https://
arxiv.org/abs/1811.03975.
[25] Davide Venturelli and Alexei Kondratyev. Re-
verse Quantum Annealing Approach to Portfo-
lio Optimization Problems. Quantum Machine
Intelligence, 1, 2019. DOI: 10.1007/s42484-019-
00001-w.
[26] Daniel J. Egger, Jakub Marecek, and Stefan
Woerner. Warm-starting quantum optimiza-
tion, 2020. URL https://arxiv.org/abs/
2009.10095.
[27] Héctor Abraham et. al. Qiskit: An open-source
framework for quantum computing. 2019. DOI:
10.5281/zenodo.2562110.
[28] Michele Mosca. Quantum searching, count-
ing and amplitude amplification by eigenvec-
tor analysis. In In Proceedings of Randomized
Algorithms, Workshop of Mathematical Foun-
dations of Computer Science, pages 90–100,
1998. URL http://141.89.225.3/resources/
pdf/moscafi.pdf.
[29] Gilles Brassard, Peter Hoyer, Michele Mosca,
and Alain Tapp. Quantum Amplitude Ampli-
fication and Estimation. Contemporary Mathe-
matics, 305, 2002. DOI: 10.1090/conm/305.
[30] Yohichi Suzuki, Shumpei Uno, Rudy Raymond,
Tomoki Tanaka, Tamiya Onodera, and Naoki Ya-
mamoto. Amplitude estimation without phase
estimation. Quantum Information Processing,
19(2), Jan 2020. ISSN 1573-1332. DOI:
10.1007/s11128-019-2565-2.
Accepted in Quantum 2021-04-05, click title to verify. Published under CC-BY 4.0. 10
[31] Scott Aaronson and Patrick Rall. Quantum ap-
proximate counting, simplified. Symposium on
Simplicity in Algorithms, page 24–32, Jan 2020.
DOI: 10.1137/1.9781611976014.5.
[32] Michel Boyer, Gilles Brassard, Peter
Høyer, and Alain Tapp. Tight bounds
on quantum searching. Fortschritte der
Physik, 46(4-5):493–505, Jun 1998. ISSN
1521-3978. DOI: 10.1002/(SICI)1521-
3978(199806)46:4/5<493::AID-
PROP493>3.0.CO;2-P.
[33] Benjamín Barán and Marcos Villagra. Multi-
objective Optimization Grover Adaptive Search,
pages 191–211. Springer International Publish-
ing, Cham, 2019. ISBN 978-3-319-99648-6. DOI:
10.1007/978-3-319-99648-6_11.
[34] Yunseong Nam, Yuan Su, and Dmitri Maslov.
Approximate quantum fourier transform with
o(n log(n)) t gates. npj Quantum Informa-
tion, 6(1), Mar 2020. ISSN 2056-6387. DOI:
10.1038/s41534-020-0257-5.
[35] Steven A. Cuccaro, Thomas G. Draper,
Samuel A. Kutin, and David Petrie Moul-
ton. A new quantum ripple-carry addition
circuit, 2004. URL https://arxiv.org/abs/
quant-ph/0410184.
[36] Thomas G. Draper, Samuel A. Kutin, Eric M.
Rains, and Krysta M. Svore. A logarithmic-depth
quantum carry-lookahead adder. Quantum Info.
Comput., 6(4):351–369, July 2006. ISSN 1533-
7146. DOI: 10.26421/QIC6.4-5-4.
[37] Craig Gidney. Halving the cost of quantum addi-
tion. Quantum, 2:74, Jun 2018. ISSN 2521-327X.
DOI: 10.22331/q-2018-06-18-74.
[38] Andrew W. Cross, Lev S. Bishop, Sarah Shel-
don, Paul D. Nation, and Jay M. Gambetta.
Validating quantum computers using random-
ized model circuits. Physical Review A, 100(3),
Sep 2019. ISSN 2469-9934. DOI: 10.1103/phys-
reva.100.032328.
[39] A. Dewes, F. R. Ong, V. Schmitt, R. Lauro,
N. Boulant, P. Bertet, D. Vion, and D. Es-
teve. Characterization of a two-transmon pro-
cessor with individual single-shot qubit readout.
Phys. Rev. Lett., 108:057002, Feb 2012. DOI:
10.1103/PhysRevLett.108.057002.
[40] Svante Janson. Moments of gamma type and
the brownian supremum process area. Probab.
Surveys, 7:1–52, 2010. DOI: 10.1214/10-PS160.
[41] Michael A. Nielsen and Isaac L. Chuang. Quan-
tum Computation and Quantum Information:
10th Anniversary Edition. Cambridge Univer-
sity Press, New York, NY, USA, 10th edition,
2011. ISBN 1107002176, 9781107002173. DOI:
10.1017/CBO9780511976667.
Accepted in Quantum 2021-04-05, click title to verify. Published under CC-BY 4.0. 11
... This framework has been extended to binary optimization problems while retaining the quadratic speedup. Recent studies have explored Grover adaptive search (GAS) [4], a variant of Grover's algorithm, to reduce complexity in solving NP-hard S. Fujiwara and N. Ishikawa are with the Faculty of Engineering, Yokohama National University, 240-8501 Kanagawa, Japan (e-mail: fujiwara-shintaro-by@ynu.jp). This research was partially supported by the Japan Society for the Promotion of Science (JSPS) KAKENHI (Grant Numbers 23K22755). ...
... GAS [4] is a quantum algorithm designed to solve combinatorial optimization problems involving N binary variables, extending Grover's algorithm. It offers a quadratic speedup in query complexity over classical exhaustive search: while the classical approach requires O(2 N ) complexity to find a solution among 2 N candidates, GAS reduces this to O( ...
... To evaluate the complexity of the GAS algorithm, two metrics defined in [12] have been commonly used: the total Algorithm 1 GAS designed for real-valued coefficients [4,6]. Sample a rotation count L i from {0, 1, · · · , ⌈k − 1⌉}. ...
Preprint
Full-text available
Conventional decoding algorithms for polar codes strive to balance achievable performance and computational complexity in classical computing. While maximum likelihood (ML) decoding guarantees optimal performance, its NP-hard nature makes it impractical for real-world systems. In this letter, we propose a novel ML decoding architecture for polar codes based on the Grover adaptive search, a quantum exhaustive search algorithm. Unlike conventional studies, our approach, enabled by a newly formulated objective function, uniquely supports Gray-coded multi-level modulation without expanding the search space size compared to the classical ML decoding. Simulation results demonstrate that our proposed quantum decoding achieves ML performance while providing a pure quadratic speedup in query complexity.
... Recently, classical-quantum hybrid methods have been proposed, where the parameters of the quantum algorithm are classically optimized. The two main types of such algorithms are of QAOA-type [7,11,16,23] and Grover-type [9,10,21]. Compared to QAOA, Grover-type algorithms have certain set advantages and drawbacks. The promise of QAOA is that, using an easily implementable, low-depth circuit, one can prepare a quantum state whose dominant components in the computational basis correspond to high value configurations of the QUBO problem. ...
... This paper explores a Grover-type method for QUBO problems. In [9], Gilliam et al. proposed a marker oracle design for QUBO problems: given an instance of an integer QUBO problem, say, by n-by-n upper-triangular integer matrix, Q, and a threshold y ∈ Z, their oracle marks states |x⟩ such that x T Qx > y. This is precisely the ingredient needed to run Grover-type search algorithms to find configurations with values above the threshold. ...
... Section IV defines and studies the adaptive version of the Fixed-point Grover Search. Finally, in Section V, we test and compare our method to the Grover Adaptic Search for QUBO of Gilliam et al. in [9]. ...
Article
Full-text available
We study a Grover-type method for Quadratic Unconstrained Binary Optimization (QUBO) problems. For an n -dimensional QUBO problem with m nonzero terms, we construct a marker oracle for such problems with a tuneable parameter ∧ ∊ [1, m] ∩︀ Z\mathbb{Z} . At d ∊ Z+{{\mathbb{Z}}_ + } precision, the oracle uses O ( n + Λ d ) qubits, has total depth of O(mΛlog2(n)+log2(d))O( {\frac{m}{\Lambda }{{{\log }}_2}(n) + {{{\log }}_2}(d)} ) and non-Clifford depth of O(mΛ)O( {\frac{m}{\Lambda }} ) Moreover, each qubit required to be connected to at most O(log2(Λ+d))O( {{{{\log }}_2}( {\Lambda + d} )} ) other qubits. In the case of a maximum graph cuts, as d=2[log2(n)]d = 2[{{\log }_2}(n)] always suffices, the depth of the marker oracle can be made as shallow as O(log2(n))O( {{{{\log }}_2}(n)} ) .For all values of Λ the non-Clifford gate count of these oracles is strictly lower (at least by a factor of ∼ 2 than previous constructions
... In contrast, quantum gate-based algorithms such as the quantum approximate optimization algorithm (QAOA) [11] and the Grover adaptive search (GAS) algorithm [12] can handle objective functions of third or higher orders without such issues. In fact, QAOA is particularly effective when approximate solutions are sufficient, while GAS can theoretically find exact solutions because it is equivalent to an exhaustive search algorithm. ...
... The technique has been extended to solve the minimum value search problem [25], and to cases where the number of solutions is unknown [26]. And although the oracle that flips only the phase of the desired state has been treated as a black box in earlier/traditional studies, this issue has been solved by Gilliam et al. [12], in which well-defined quantum circuit corresponding to the QUBO or HUBO formulation of problem is efficiently constructed. ...
... The quantum circuit constructed by the method in [12] is composed of n + m qubits, where n is the number of binary variables and m is the number of qubits representing the value of the objective function E(x) under which the search occurs, with the latter satisfying ...
Preprint
Full-text available
We demonstrate that the search space of the quadratic assignment problem (QAP), known as an NP-hard combinatorial optimization problem, can be reduced using Grover adaptive search (GAS) with Dicke state operators. To that end, we first revise the traditional quadratic formulation of the QAP into a higher-order formulation, introducing a binary encoding method ordered by a descending Hamming weight, such that the number of terms in the objective function is reduced. We also show that the phase gate in the GAS can be replaced by a rotation gate about the Z axis, simplifying the quantum circuit without any penalty. Algebraic analyses in terms of the number of qubits, quantum gates, and query complexity are performed, which indicate that our proposed approach significantly reduces the search space size, improving convergence performance to the optimal solution compared to the conventional one. Interestingly, it is suggested that the higher-order formulation is effective for problems whose size are powers of two, while the quadratic formulation is more effective for other sizes, indicating that switching between the two formulations can enhance the feasibility of the GAS-solved QAP.
... For instance, it has provided innovative solutions to the satisfiability problem 3 , as well as in the burgeoning field of quantum machine learning 4 . Further applications include tackling constrained polynomial binary optimization 5 and enhancing quantum amplitude estimation techniques 6 , showcasing a clear computational superiority over traditional methods. Recent explorations have extended the utility of the Grover algorithm 7 to the domain of adiabatic quantum computing [8][9][10] , underscoring its adaptability and relevance in the rapidly evolving landscape of quantum research. ...
Article
Full-text available
The Grover algorithm is a crucial solution for addressing unstructured search problems and has emerged as an essential quantum subroutine in various complex algorithms. By using a different approach with previous studies, this research extensively investigates Grover’s search methodology within non-uniformly distributed databases, a scenario frequently encountered in practical applications. Our analysis reveals that the behavior of the Grover evolution differs significantly when applied to non-uniform databases compared to uniform or ‘unstructured databases’. Based on the property of differential equation, it is observed that the search process facilitated by this evolution does not consistently result in a speed-up, and we have identified specific criteria for such situations. Furthermore, we have extended this investigation to databases characterized by coherent states, confirming the speed-up achieved through Grover evolution via rigorous numerical verification. In conclusion, our study provides an enhancement to the original Grover algorithm, offering insights to optimize implementation strategies and broaden its range of applications.
... It proposes constructing a quantum circuit that allows reading a superposition of the eigenstate of a QUBO problem. While this method can be identified as a QPE, the problem Hamiltonian was not decomposed with the usual Pauli strings [11,Fig. 4,5 & 6]. ...
Preprint
Full-text available
This article proposes a simple formalism which unifies Hamiltonian simulation techniques from different fields. This formalism leads to a competitive method to construct the Hamiltonian simulation with a comprehensible, simple-to-implement circuit generation technique. It leads to a gate decomposition and a scaling different from the usual strategy based on a Linear Combination of Unitaries (LCU) reformulation of the problem. It can significantly reduce the quantum circuit number of rotational gates, multi-qubit gates, and the circuit depth. This method leads to one exact Hamiltonian simulation for each summed term and Trotter step. Each of these Hamiltonian simulation unitary matrices also allows the construction of the non-exponential terms with a maximum of six unitary matrices to be Block-encoding (BE). The formalism is easy to apply to the widely studied High-order Unconstrained Binary Optimization (HUBO), fermionic transition Hamiltonian, and basic finite difference method instances. For the HUBO, our implementation exponentially reduces the number of gates for high-order cost functions with respect to the HUBO order. The individual electronic transitions are implemented without error for the second-quantization Fermionic Hamiltonian. Finite difference proposed matrix decompositions are straightforward, very versatile, and scale as the state-of-the-art proposals.
... Other techniques used in quantum optimization include the Variational Quantum Eigensolver (VQE) [46], which is particularly effective for quantum chemistry [47] and condensed matter physics problems [48]. Grover Adaptive Search (GAS) [23,49] is another powerful method that excels in tasks such as finding optimal solutions in large, unstructured spaces [50]. Additionally, Quantum ...
Preprint
Full-text available
Electric vehicles (EVs) play a significant role in enhancing the sustainability of transportation systems. However, their widespread adoption is hindered by inadequate public charging infrastructure, particularly to support long-distance travel. Identifying optimal charging station locations in large transportation networks presents a well-known NP-hard combinatorial optimization problem, as the search space grows exponentially with the number of potential charging station locations. This paper introduces a quantum search-based optimization algorithm designed to enhance the efficiency of solving this NP-hard problem for transportation networks. By leveraging quantum parallelism, amplitude amplification, and quantum phase estimation as a subroutine, the optimal solution is identified with a quadratic improvement in complexity compared to classical exact methods, such as branch and bound. The detailed design and complexity of a resource-efficient quantum circuit are discussed.
Article
Full-text available
A binary constant weight code is a type of error-correcting code with a wide range of applications. The problem of finding a binary constant weight code has long been studied as a combinatorial optimization problem in coding theory. In this paper, we propose a quantum search algorithm for binary constant weight codes. Specifically, the search problem is formulated as a polynomial binary optimization problem and Grover adaptive search is used for providing the quadratic speedup. Focusing on the inherent structure of the problem, we derive an upper bound on the minimum of the objective function value and a lower bound on the exact number of solutions. By exploiting these two bounds, we successfully reduced the constant overhead of the algorithm, although the overall query complexity remains exponential due to the NP-complete nature of the problem. In our algebraic analysis, it was found that this proposed algorithm is capable of reducing the number of required qubits, thus enhancing the feasibility. Additionally, our simulations demonstrated that it reduces the average number of classical iterations by 63% as well as the average number of total Grover rotations by 31%. The proposed approach may be useful for other quantum search algorithms and optimization problems.
Article
Full-text available
Previously proposed quantum algorithms for solving linear systems of equations cannot be implemented in the near term due to the required circuit depth. Here, we propose a hybrid quantum-classical algorithm, called Variational Quantum Linear Solver (VQLS), for solving linear systems on near-term quantum computers. VQLS seeks to variationally prepare | x ⟩ such that A | x ⟩ ∝ | b ⟩ . We derive an operationally meaningful termination condition for VQLS that allows one to guarantee that a desired solution precision ϵ is achieved. Specifically, we prove that C ⩾ ϵ 2 / κ 2 , where C is the VQLS cost function and κ is the condition number of A . We present efficient quantum circuits to estimate C , while providing evidence for the classical hardness of its estimation. Using Rigetti's quantum computer, we successfully implement VQLS up to a problem size of 1024 × 1024 . Finally, we numerically solve non-trivial problems of size up to 2 50 × 2 50 . For the specific examples that we consider, we heuristically find that the time complexity of VQLS scales efficiently in ϵ , κ , and the system size N .
Article
Full-text available
We extend variational quantum optimization algorithms for Quadratic Unconstrained Binary Optimization problems to the class of Mixed Binary Optimization problems. This allows us to combine binary decision variables with continuous decision variables, which, for instance, enables the modeling of inequality constraints via slack variables. We propose two heuristics and introduce the Transaction Settlement problem to demonstrate them. Transaction Settlement is defined as the exchange of securities and cash between parties and is crucial to financial market infrastructure. We test our algorithms using classical simulation as well as real quantum devices provided by IBM Quantum.
Article
Full-text available
This article outlines our point of view regarding the applicability, state-of-the-art, and potential of quantum computing for problems in finance. We provide an introduction to quantum computing as well as a survey on problem classes in finance that are computationally challenging classically and for which quantum computing algorithms are promising. In the main part, we describe in detail quantum algorithms for specific applications arising in financial services, such as those involving simulation, optimization, and machine learning problems. In addition, we include demonstrations of quantum algorithms on IBM Quantum back-ends and discuss the potential benefits of quantum algorithms for problems in financial services. We conclude with a summary of technical challenges and future prospects.
Article
Full-text available
We present a methodology to price options and portfolios of options on a gate-based quantum computer using amplitude estimation, an algorithm which provides a quadratic speedup compared to classical Monte Carlo methods. The options that we cover include vanilla options, multi-asset options and path-dependent options such as barrier options. We put an emphasis on the implementation of the quantum circuits required to build the input states and operators needed by amplitude estimation to price the different option types. Additionally, we show simulation results to highlight how the circuits that we implement price the different option contracts. Finally, we examine the performance of option pricing circuits on quantum hardware using the IBM Q Tokyo quantum device. We employ a simple, yet effective, error mitigation scheme that allows us to significantly reduce the errors arising from noisy two-qubit gates.
Article
Full-text available
Hybrid quantum/classical variational algorithms can be implemented on noisy intermediate-scale quantum computers and can be used to find solutions for combinatorial optimization problems. Approaches discussed in the literature minimize the expectation of the problem Hamiltonian for a parameterized trial quantum state. The expectation is estimated as the sample mean of a set of measurement outcomes, while the parameters of the trial state are optimized classically. This procedure is fully justified for quantum mechanical observables such as molecular energies. In the case of classical optimization problems, which yield diagonal Hamiltonians, we argue that aggregating the samples in a different way than the expected value is more natural. In this paper we propose the Conditional Value-at-Risk as an aggregation function. We empirically show -- using classical simulation as well as quantum hardware -- that this leads to faster convergence to better solutions for all combinatorial optimization problems tested in our study. We also provide analytical results to explain the observed difference in performance between different variational algorithms.
Article
Full-text available
This paper focuses on the quantum amplitude estimation algorithm, which is a core subroutine in quantum computation for various applications. The conventional approach for amplitude estimation is to use the phase estimation algorithm, which consists of many controlled amplification operations followed by a quantum Fourier transform. However, the whole procedure is hard to implement with current and near-term quantum computers. In this paper, we propose a quantum amplitude estimation algorithm without the use of expensive controlled operations; the key idea is to utilize the maximum likelihood estimation based on the combined measurement data produced from quantum circuits with different numbers of amplitude amplification operations. Numerical simulations we conducted demonstrate that our algorithm asymptotically achieves nearly the optimal quantum speedup with a reasonable circuit length.
Article
Full-text available
We investigate a hybrid quantum-classical solution method to the mean-variance portfolio optimization problems. Starting from real financial data statistics and following the principles of the Modern Portfolio Theory, we generate parametrized samples of portfolio optimization problems that can be related to quadratic binary optimization forms programmable in the analog D-Wave Quantum Annealer 2000QTM. The instances are also solvable by an industry-established genetic algorithm approach, which we use as a classical benchmark. We investigate several options to run the quantum computation optimally, ultimately discovering that the best results in terms of expected time-to-solution as a function of number of variables for the hardest instances set are obtained by seeding the quantum annealer with a solution candidate found by a greedy local search and then performing a reverse annealing protocol. The optimized reverse annealing protocol is found to be more than 100 times faster than the corresponding forward quantum annealing on average.
Article
We present and analyze a quantum algorithm to estimate credit risk more efficiently than Monte Carlo simulations can do on classical computers. More precisely, we estimate the economic capital requirement, i.e. the difference between the Value at Risk and the expected value of a given loss distribution. The economic capital requirement is an important risk metric because it summarizes the amount of capital required to remain solvent at a given confidence level. We implement this problem for a realistic loss distribution and analyze its scaling to a realistic problem size. In particular, we provide estimates of the total number of required qubits, the expected circuit depth, and how this translates into an expected runtime under reasonable assumptions on future fault-tolerant quantum hardware.
Article
We introduce a single-number metric, quantum volume, that can be measured using a concrete protocol on near-term quantum computers of modest size (n≲50), and measure it on several state-of-the-art transmon devices, finding values as high as 16. The quantum volume is linked to system error rates, and is empirically reduced by uncontrolled interactions within the system. It quantifies the largest random circuit of equal width and depth that the computer successfully implements. Quantum computing systems with high-fidelity operations, high connectivity, large calibrated gate sets, and circuit rewriting toolchains are expected to have higher quantum volumes. The quantum volume is a pragmatic way to measure and compare progress toward improved system-wide gate error rates for near-term quantum computation and error-correction experiments.