0% found this document useful (0 votes)
14 views11 pages

Amplitude Amplification

Amplitude Amplification

Uploaded by

mauro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views11 pages

Amplitude Amplification

Amplitude Amplification

Uploaded by

mauro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Article

On the amplitude amplification of quantum states


corresponding to the solutions of the partition
problem
Mauro Mezzini 1 , Jose J. Paulet 2 , Fernando Cuartero 3 , Hernan I. Cruz4
and Fernando L. Pelayo 5
1 Roma Tre University, Italy; [email protected] 1 Corresponding author
4235 University of Castilla - La Mancha, Spain; [email protected],
{Jose.Paulet, Fernando.Cuartero, FernandoL.Pelayo}@uclm.es

Version July 27, 2021 submitted to Mathematics

1 Abstract: In this paper we investigate on the effects of a quantum algorithm which increases the
2 amplitude of the states corresponding to the solutions of the partition problem by a factor of almost
3 two. The study is limited to one iteration.

4 Keywords: Amplitude Amplification, Subset Sum Problem, Quantum Algorithms, Computational


5 Efficiency

6 1. Introduction and Preliminaries


7 Quantum computing promises to offer a different paradigm for solving long standing complex
8 problems. Shor’s algorithm [1] is a clear example of the success of the application of the quantum
9 computation to a difficult problem, the factoring of integers. Other algorithms like Deutsch-Josza’s [2]
10 or Grover’s one [3] give strong hints that the intrinsic parallelism of quantum computation could be
11 used in order to efficiently solve computationally complex problems. In particular, Grover’s algorithm
12 uses the concept of an oracle f ( x ) which, given a configuration x of the problem at hand, computes
13 whether or not x is a solution of the problem. In other words, if x is a configuration that solves an
14 instance of a combinatorial problem then the oracle returns f ( x ) = 1 otherwise the oracle outputs
15 f ( x ) = 0. By using such oracle, Grover’s algorithm is capable of speeding up the time to search a
16 solution of many, very complex, combinatorial problems. In Grover’s algorithm the Grover iteration
17 amplifies the amplitude of the configuration states corresponding√ to solutions of the problem (i.e.
18 those states x for which f ( x ) = 1) by a factor less than O(1/ N ) (in the worst case in which there
n
19 is only one configuration which is the solution of the problem), √ where N = 2 is the number of
20 possible configurations. In this way, after approximately O( N ) iterations, the amplitudes of the
21 states corresponding to the solutions of the problem approach 1.
22 We exploit the parallelism of quantum computation therefore devising a quantum algorithm that
23 is capable of doubling the amplitude of the states corresponding to solution of a problem. In this
24 paper, we will focus on the subset sum problem, a well known NP-complete problem. The subset sum
25 problem, is very important both at a theoretical level in complexity theory, and at a practical level in
26 applications such as cryptography. The problem can be stated in the following way in which we denote
27 by N+ , the set of non zero natural numbers. Let E be a finite set of elements, s : E → N+ a function
28 and W ∈ N+ a target number. The subset sum problem wonders whether exist a subset E0 ⊂ E such
29 that ∑e∈E0 s(e) = W. Usually this problem can also be reformulated as follows. There exists a subset
30 E0 ⊂ E such that ∑e∈E0 s(e) = ∑e∈E\ E0 s(e)? In this later formulation it is called the partition problem
31 (PP) [4]. From now on we do not loss any generality in considering the set E equals the set of the first

Submitted to Mathematics, pages 1 – 11 www.mdpi.com/journal/mathematics


Version July 27, 2021 submitted to Mathematics 2 of 11

32 | E| natural numbers, that is, we always consider E = {0, 1, . . . , n − 1}. Furthermore, we note that if PP
33 has a solution E0 then E − E0 is also a solution of the PP.
34 The literature is abundant in the study of this problem, for which the dynamic programming
35 solving strategy is the most commonly applied. More recently, it has also been approached from the
36 point of view of quantum computing, among these references we can mention [5], where an instance
37 of the subset-sum problem can be implemented by a quantum algorithm using nuclear magnetic
38 resonance (NMR) technique. In that paper, even at a very early stage and with a low number of qubits,
39 they limit themselves to showing that the problem can be approached from this new perspective.
40 In [6], the authors studied the problem through both an asymptotic heuristic and a new data
41 structure for using quantum gates. There, being possible to obtain an improvement over classical
42 algorithms is shown, specifically the Howgrave-Graham–Joux [7] which of course is fully coherent
43 with the NP ⊆ BQP conjecture, obtaining a bound time Õ(22/3n ).
44 More recently, in 2018, Helm and May [8] proposed a quantum algorithm that reduces the heuristic
45 time to Õ(20.226n ). A couple of years later, Li and Li [9] reduce this time beyond that, i.e. to Õ(20.209n ).
46 In this work we will get rid of the heuristics of these studies to better go for the modest approach
47 of [5]. In this sense, we propose a piece of quantum code using a quantum circuit to model the
48 problem, consequently we devise a transformation that will allow us to increase the amplitudes of
49 those corresponding to the solution by 50%, leaving the line of how and how many times this process
50 could be iterated, as the key issue to be dealt with. In fact, we think that we could find the same
51 limitations than those from Grover’s algorithm. Anyway, we believe that this line of research deserves
52 to be addressed.
53 Let x ∈ N, 0 ≤ x < 2n then we say that | x i is a computational state which binary representation is
54 | xn−1 xn−2 . . . x0 i being xn−1 the most significant bit of the binary representation of | x i.
55 The S gate for a single qubit is represented by the following matrix:
" #
1 0
S=
0 i

56 Another usual gates, are Pauli X gate, also known as NOT gate, and X gate.
" # " #
0 1 √ 1 1+i 1−i
X= X=
1 0 2 1−i 1+i

57 The Hadamard gate for a single qubit is


√ " #
2 1 1
H=
2 1 −1

58 While the same gate for n qubits is represented by the following matrix

n √
" #
n 2 1 1
H⊗ =
O

i =1
2 1 −1

59 As stated before, we are interested in amplifying amplitudes for the search problem. In order to
60 do this we make use of sequences of quantum gates in the way Hadamard - S - Hadamard. Let´s start
61 describing graphically the effect of such quantum gates so resorting to the positions of the state vector
62 represented in the Bloch sphere.
63 The effect of applying a H q-gate over a qubit represented on the Bloch Sphere can be seen as
64 “first rotating an angle of π radians around Z axis and then rotating an angle of π2 radians around the
65 Y axis" (fully equivalent to “first rotating an angle of π2 radians around the Y axis and then rotating an
66 angle of π radians around X axis" which are the movements made by H in figure 1). Hadamard q-gate
67 application changes a qubit from a computational basis to a Hadamard basis. For better understanding
Version July 27, 2021 submitted to Mathematics 3 of 11

68 the effects of the sequence H - S - H we start, as usual, from a qubit initialized to |0i, i.e. located at the
69 north pole of the Bloch s. which moved through a Hadamard gate gets located at the equator of the
70 Bloch s., specifically on the X axis, in the position usually known as a |+i, which corresponds to the
71 qubit
√ √
2 2
|+i = |0i + |1i
2 2
72 After this gate, we apply a S gate, the effect of which is a rotation of the state vector through an
73 angle of π2 radians around the Z axis. This places the qubit at position |i i.
√ √
2 2
|i i = |0i + i · |1i
2 2
74 Finally, the effect of the second application of gate H is reseting the computational base, and then,
75 the vector from position |i i moves to the opposite point on the Y axis, that is, to the position
√ √
2 2
| − ii = |0i − i · |1i
2 2
76 In general, we have the following result

HSH = X
π
77 That is, a HSH gate is equivalent to a 2 radiants clockwise rotation around X axis as figure 1
78 shows over a single qubit initialized to |0i.

Figure 1. H-S-H over |0i


n
79 Let us go for the general case of a qubit register initialized, as usual, to |0i⊗ .
n
80 2. The effect of applying Hadamard - S - Hadamard gates to |0i⊗
81 First of all we will introduce a notation which will be heavily used in the rest of the paper. Let
82 x ∈ N, 0 ≤ x < 2n and xn−1 . . . , x1 x0 its binary representation. The Hamming weight of x will be denoted
83 as w( x ) = ∑nj=−01 x j . Let z ∈ N, 0 ≤ z < 2n , |zi = |zn−1 zn−2 . . . z0 i. The term x · z denotes ∑nj=−01 x j z j .
84 Furthermore, ∀k ∈ N, 0 < k < n, we denote by z-k a natural number obtained from z by considering
85 only the least n − k significant bits, that is, the binary representation of z-k is zn−k−1 zn−k−2 . . . z0 . In
86 other words z-k is the bitwise AND between z and 2n−k − 1.
In this section we want to determine the effect of applying Hadamard first, then S and finally
n
Hadamard gates on quantum state |0i⊗ , that is, we want to determine a formula for |αi such that
n n n n
| α i = H ⊗ S ⊗ H ⊗ |0i ⊗ (1)
n
87 and we show that in the out-coming computational state |αi = ∑2z=−0 1 az |zi the amplitude az of a single
88 state |zi depends just on w(z).
Version July 27, 2021 submitted to Mathematics 4 of 11

It is well known, see [3], that given any computational state | x i where 0 ≤ x < 2n

2n −1
n 1
|ψi = H ⊗ | x i = √
2n
∑ (−1)x·z |zi (2)
z =0

89 Now we start with the following Lemma

Lemma 1. Let 0 ≤ x < 2n


n
S ⊗ | x i = i w ( x ) | x n −1 x n −2 . . . x 0 i

Proof. By induction on n being the base case with n = 1 straightforward. So suppose that the statement
holds for n − 1. Then
n n −1
S ⊗ | x i = S | x n −1 i ⊗ S | x n −2 i · · · ⊗ S | x 0 i = S ⊗ | x n −1 . . . x 1 i ⊗ S | x 0 i =
∑nj=−11 xj
=i | xn−1 . . . x1 i ⊗ S| x0 i = (by induction hypothesis)
∑nj=−11 xj
=i | x n −1 . . . x 1 i ⊗ i x0 | x 0 i =
= i w ( x ) | x n −1 x n −2 . . . x 0 i

90

Now by Lemma 1 and equation (2), we have that

2n −1 2n −1
n n n n 1 1
|ψ1 i = S⊗ H ⊗ |0i⊗ = S⊗ √
2n
∑ |xi = √
2n
∑ i w( x ) | x i
x =0 x =0

and applying the Hadamard to |ψ1 i, by (2), we have that

2n −1 2n −1
" #
⊗n 1 1
|ψ2 i = H |ψ1 i = √
2n
∑ i w( x )

2n
∑ (−1) x ·z
|zi
x =0 z =0

and reordering the term of the sum we have that

2n −1 2n −1 2n −1 2n −1
!
1 1
|ψ2 i = n
2 ∑ ∑ (−1) x ·z w( x )
i |zi = n
2 ∑ ∑ i w( x )
(−1) x ·z
|zi
z =0 x =0 z =0 x =0

So in order to compute the amplitudes of |ψ2 i we need to compute the sum

2n −1
∑ iw( x) (−1) x·z (3)
x =0

91 for every 0 ≤ z < 2n . We will do this in the following two theorems. First of all we need the next
92 Lemma which will be heavily used int the rest of the paper.

Lemma 2. Let 0 ≤ z < 22m+1 and 0 ≤ x < 22m+1 and let z2m z2m−1 . . . z0 and x2m x2m−1 . . . x0 be the binary
representation, respectively, of z and x. We have that

22m+1 −1 22m −1 −1
2m
∑2m
∑ iw( x) (−1)∑ j=0 j =0 z j · x j
zj ·xj
= i (−1)z2m ∑ iw( x) (−1) (4)
x =22m x =0
Version July 27, 2021 submitted to Mathematics 5 of 11

Proof. We note that, on the left hand of the equation (4), for every element of the sum, we have that
2m−1
x2m = 1. Therefore ∑2m
j=0 z j · x j = ∑ j=0 z j · x j + z2m . Based on this we have that

22m+1 −1 22m+1 −1 −1
2m
∑2m
∑ iw( x) (−1)∑ j=0 j =0 z j · x j
zj ·xj
= (−1)z2m ∑ iw( x) (−1)
x =22m x =22m

93 Furthermore for the same reason above, if 22m ≤ x < 22m+1 and if 0 ≤ x̄ < 22m then we have that
94 w( x ) = w( x̄ ) + 1 and this prove the equation (4).

Theorem 3. Let 0 ≤ z < 2n , z ∈ N. If n = 2m is even we have that

2n −1
∑ iw( x) (−1)z· x = (−1)w(z) im+w(z) 2m (5)
x =0

Proof. We prove the equation (5) on induction on m being the base case with m = 1 easily verifiable
for all z ∈ {0, 1, 2, 3}. So suppose the statement holds for all h ≤ m and for all 0 ≤ z < 22m . Then, for
any 0 ≤ z < 22m+2 we have

22m+2 −1 22m −1 −1
∑2m
j =0 z j · x j
∑ iw( x) (−1)z· x = ∑ iw( x) (−1) (6)
x =0 x =0
22m+1 −1 2m
∑ iw( x) (−1)∑ j=0
zj ·xj
+ + (7)
x =22m
22m+2 −1 +1
∑2m
j =0 z j · x j
+ ∑ iw( x) (−1) (8)
x =22m+1

Now, by equation (4) and by induction hypothesis, we have that (7) is equal to

22m+1 −1 22m −1 −1
2m
∑2m
∑ iw( x) (−1)∑ j=0 j =0 z j · x j
zj ·xj
= i (−1)z2m ∑ iw( x) (−1) =
x =22m x =0

= i (−1)z2m (−1)w(z-2 ) im+w(z-2 ) 2m (9)

Likewise, in the term (8), for each x is the sum, the bit x2m+1 is always set to 1, so we have that (8) is,
by equation (4), equal to

22m+2 −1 +1 22m+1 −1
∑2m 2m
∑ j =0 z j · x j
∑ iw( x) (−1)∑ j=0
w( x ) z2m+1 zj ·xj
i (−1) = i (−1) (10)
x =22m+1 x =0

Now by repeatedly applying equation (4) and the induction hypothesis we have that the sum in right
hand of equation (10) is

22m+1 −1 2m
∑ iw( x) (−1)∑ j=0
zj ·xj
= (11)
x =0
22m −1 −1 22m+1 −1
∑2m 2m
∑ j =0 z j · x j
∑ iw( x) (−1)∑ j=0
zj ·xj
= iw( x) (−1) + =
x =0 x =22m
22m −1 −1
∑2m
j =0 z j · x j
= (−1)w(z-2 ) im+w(z-2 ) 2m + i (−1)z2m ∑ iw( x) (−1) =
x =0
= (−1)w(z-2 ) im+w(z-2 ) 2m [1 + i (−1)z2m ] (12)
Version July 27, 2021 submitted to Mathematics 6 of 11

95 So if we replace (12) in (10) and if we sum together (6), (9) and (10) we obtain

h i
az =(−1)w(z-2 ) im+w(z-2 ) 2m 1 + i (−1)z2m + i (−1)z2m+1 + i2 (−1)z2m +z2m+1 =

=(−1)w(z-2 ) im+1+w(z-2 ) 2m −i + (−1)z2m + (−1)z2m+1 + i (−1)z2m +z2m+1


 
(13)

Now if we denote by P = (−1)w(z-2 ) im+1+w(z-2 ) 2m we have that (13) is




 2P if z2m = z2m+1 = 0
az = −2iP if z2m 6= z2m+1
 −2P

if z2m = z2m+1 = 1

and it is now easy to verify that


az = (−1)w(z) im+1+w(z) 2m+1

96 for every 0 ≤ z < 22m+2 , and this proves the induction step.

Theorem 4. Let n = 2m + 1 an odd natural, m ∈ N and let 0 ≤ z < 2n , z ∈ N. Then

2n −1
∑ iw( x) (−1)z· x = (−1)w(z) im+w(z) 2m (1 + i ) (14)
x =0

Proof. First of all we note that equation (14) holds if m = 0 and z ∈ {0, 1}. So in the following we
suppose that m > 1. We have that

22m+1 −1
az = ∑ iw( x) (−1)z· x =
x =0
22m −1 −1 22m+1 −1
∑2m 2m
∑ j =0 z j · x j
∑ iw( x) (−1)∑ j=0
zj ·xj
= iw( x) (−1) +
x =0 x =22m

and, by Theorem 3, and by equation (4), we have

22m −1 −1
∑2m
j =0 z j · x j
az = (−1) w(z-1 ) m+w(z-1 ) m
i 2 + i (−1) z2m
∑ iw( x) (−1) =
x =0
=(−1)w(z-1 ) im+w(z-1 ) 2m + i (−1)z2m (−1) w(z-1 ) m+w(z-1 ) m
i 2 =
=(−1)w(z-1 ) im+w(z-1 ) 2m [1 + i (−1)z2m ] (15)

Let z2m z2m−1 . . . z0 be the binary representation of z. Suppose first that z2m = 0. Then equation (15)
become
(−1)w(z) im+w(z) 2m + (−1)w(z) im+w(z)+1 2m (16)

and the Theorem is therefore proved. So suppose that z2m = 1. Then equation (15) become

(−1)w(z)−1 im+w(z)−1 2m + (−1)w(z) im+w(z) 2m (17)

but observing that


(−1)w(z) im+w(z)+1 = (−1)w(z)−1 im+w(z)−1 (18)

97 we have that also in this case the Theorem is satisfied.

98 As an example we have computed the amplitudes az (disregarding the normalization factor) for
99 n ∈ {3, 4} and we report them on Table 1.
Version July 27, 2021 submitted to Mathematics 7 of 11

|zi az
|0000i −4
|0001i 4i
|0010i 4i
|zi az |0011i 4
|000i −2 + 2i |0100i 4i
|001i 2 + 2i |0101i 4
|010i 2 + 2i |0110i 4
|011i 2 − 2i |0111i −4i
|100i 2 + 2i |1000i 4i
|101i 2 − 2i |1001i 4
|110i 2 − 2i |1010i 4
|111i −2 − 2i |1011i −4i
|1100i 4
|1101i −4i
|1110i −4i
|1111i −4

Table 1. Left the amplitudes of az for n = 3. Right the amplitudes of az for n = 4. In order to get the
final amplitudes one should multiply them by a suitable normalization factor.

100 3. Doubling the amplitudes of the solution states of the PP


101 In this section we consider a quantum circuit for doubling the amplitude of solution’s states of
102 the partition problem.
103 We describe an application of the gates described in the previous section in a quantum circuit to
104 deal with PP (see Figure 2). While the following results apply specifically to the PP they can be applied
105 to any other search problem.
106 Let us denote ∑e∈E s(e)/2 by S . Notice that S belonging to Z is a requirement for PP to have a
107 solution. We use the two’s complement representation of −S so requiring for it m = dlog2 Se + 1
108 qubits. Then for each e ∈ E, we use k e = dlog2 s(e)e + 1 qubits to encode s(e). These qubits will
109 remain constant in every phase of the circuit and therefore we will not consider them in the rest of
110 the discussion. As usual, we use n qubits to encode a subset E0 of E, i.e., if | xn−1 xn−2 . . . x0 i is the
111 state of those n qubits, then an element e, 0 ≤ e < n, is included in the set E0 if and only if xe = 1.
112 We will use m qubits, denoted in the following by |σ i, to store the sum σ = −S + ∑e∈E0 s(e) for the
m
113 elements selected in | x i. In this way |σi = |0i⊗ for a solution | x i of the PP. Qubit |ci is used for
114 control purposes.
115 For a top-down description we can distinguish four groups of bits: | x i, |σ i, |ci and the sets of
116 qubits used to represent the constants s(e) for each element of E. Note that the number of qubits of the
117 circuit, n + m + 1 + ∑e∈E k e , is polynomial in the size of a concise specification of the PP.
At the beginning of the circuit we have the superposition:
n
| ϕ0 i = |0i⊗ |σi|ci

where σ is set to the two’s complement of −S and |ci is set to |1i. Then, we apply the Hadamard
q-gate to the first n qubits so obtaining

2n −1
 n
 1
| ϕ 1 i = H ⊗ ⊗ I m +1 | ϕ 0 i = √
2n
∑ | x i|σi|ci
x =0

Next, we uses each qubit xe to conditionally sum the element s(e) to |σ i. If there exist a solution to the
m
PP then, in the final superposition of |σ i, the amplitude of the state | x i|0i⊗ |ci will not be 0. The states
| x i for which |σi is zero will be referred as the solutions states of the PP. The control qubit |ci will be set
Version July 27, 2021 submitted to Mathematics 8 of 11

m
to zero exactly for those states for which |σ i = |0i⊗ . At this point we apply an uncomputational step
in order to set |σ i = | − Si. Now if we apply the S gate to the first n qubits we obtain, by Lemma 1

2n −1
 n  1
| ϕ 2 i = S ⊗ ⊗ I m +1 | ϕ 1 i = √
2n
∑ iw( x) | x i|σ i|ci
x =0

Afterwards Hadamard gate is applied to the first n qubits controlled by the control qubit |ci such that
it only affects non solution states (see Figure 2). For the sake of simplicity we suppose that PP has only
two solutions whose numeric representation are y and its bitwise complement y. By equation (3), we
obtain
n
contr H ⊗ 1
| ϕ2 i −−−−−→ | ϕ3 i = √
2n
∑ iw(z) |zi|σ i|0i+
z∈{y,y}
2n −1
1
+
2n ∑ ∑ iw( x) (−1) x·z |zi|σ i|1i =
z =0 x ∈
/ {y,y}
 
2n −1
1 √ n
= n 2 ∑ iw(z) |zi|σ i|0i + ∑ ∑ iw( x) (−1) x·z |zi|σ i|1i (19)
2 z∈{y,y} z =0 x ∈
/ {y,y}

Now we want to quantify the amplitude of the state |yi|σ i|1i and |yi|σ i|1i of equation (19). We
consider only the state |yi|σ i|1i since the same arguments can be applied to state |yi|σi|1i. The
amplitude by of the state |yi|σ i|1i (in the following we disregard the normalization factor 1/2n ) is
given by the following formula

by = ∑ iw( x) (−1) x·y (20)


/ {y,y}
x∈

We may write the above sum as

2n −1
by = ∑ i w( x )
(−1) x ·y
= ∑ iw( x) (−1) x·y − ∑ iw( x) (−1) x·y (21)
x∈
/ {y,y} x =0 x ∈{y,y}

We have that

∑ iw( x) (−1) x·y = iw(y) (−1)y·y + in−w(y) (−1)y·y =


x ∈{y,y}

=iw(y) (−1)w(y) + in−w(y) = (22)

118 Then, recalling that i x = i− x when x is even and i− x = −i x when x is odd, we have two cases:

• w(y) is even

iw(y) (−1)w(y) + in−w(y) = iw(y) (−1)w(y) + in+w(y) =


= i w ( y ) (1 + i n ) (23)

• w(y) is odd

iw(y) (−1)w(y) + in−w(y) = iw(y) (−1)w(y) − in+w(y) =


= − i w ( y ) (1 + i n ) (24)
Version July 27, 2021 submitted to Mathematics 9 of 11

For simplicity of notation in the following we denote w(y) as simply w. We have that if n = 2m is even
then, by Theorem 3, by is

w m+w 2m − i w (1 + i2m )
 (−1) i
 if w is even
by = (25)
 (−1)w im+w 2m + iw (1 + i2m )

if w is odd

while if n = 2m + 1 is odd, by Theorem 4, by is



w m+w 2m (1 + i ) − i w (1 + i2m+1 )
 (−1) i
 if w is even
by = (26)
 (−1)w im+w 2m (1 + i ) + iw (1 + i2m+1 )

if w is odd

119 It is immediate to check that in the above equations (25) and (26) the term iw (1 + in ) become negligible,
120 with respect to the other term in the equation, as m becomes bigger. We conclude that the amplitude of
121 the state |yi|σ i|1i is almost the same of the amplitude of state |yi|σ i|0i, thus effectively duplicating
122 the chances of state |yi at the end of the circuit.
123 Figure 2 captures on Quirk simulator the instance of the PP where elements in E are s(0) =
124 2, s(1) = 1 and s(2) = 3 thus −S = −3 which in two’s complement is represented with four bits
125 σ = 1101 so depicted from row 4th to row 7th (top - down referring). Control qubit is located in 8th
126 row, and qubits 9th to 14th are used for the function s. Since n = 2m + 1 = 3 and |yi = |011i we have
1 h √ 2 i 26
127 that by = 3 − 3i, thus the probability of getting |yi is, by (19), |2 2| + |3 − 3i |2 = = 0.40625
64 64
128 which is exactly the output of Quirk simulator as it can be checked in [10].

Figure 2. An instance of PP in Quirk


Version July 27, 2021 submitted to Mathematics 10 of 11

129 4. Conclusion and future work


130 We have presented a quantum algorithm for doubling the amplitude of the state corresponding
131 to the solution of the partition problem. We further studied on detail the effects of applying first
n
132 Hadamard, then S and finally Hadamard gates to the state |0i⊗ .
133 Since the algorithm presented makes use of an oracle, and and the approach is similar to the black
134 box model as described in [11], the idea of iterating this algorithm will inevitably suffer of the same
135 limitation described there, and then the maximum speed-up should be limited to polynomial, as it
136 occurs with Grover algorithm. Therefore possible future works should focus on obtaining similar
137 results but without using an oracle.
Version July 27, 2021 submitted to Mathematics 11 of 11

138

139 1. Shor, P. Algorithms for quantum computation: discrete logarithms and factoring. Proceedings 35th Annual
140 Symposium on Foundations of Computer Science, 1994, pp. 124–134. doi:10.1109/SFCS.1994.365700.
141 2. Deutsch, D.; Jozsa, R. Rapid solution of problems by quantum computation. Proceedings
142 of the Royal Society of London. Series A: Mathematical and Physical Sciences 1992, 439, 553–558,
143 [https://royalsocietypublishing.org/doi/pdf/10.1098/rspa.1992.0167]. doi:10.1098/rspa.1992.0167.
144 3. Nielsen, M.A.; Chuang, I.L. Quantum Computation and Quantum Information: 10th Anniversary Edition, 10th
145 ed.; Cambridge University Press: USA, 2011.
146 4. Karp, R. Reducibility among combinatorial problems. In Complexity of Computer Computations; Miller, R.;
147 Thatcher, J., Eds.; Plenum Press, 1972; pp. 85–103.
148 5. Chang, W.L.; Ren, T.T.; Feng, M.; Lu, L.C.; Lin, K.W.; Guo, M. Quantum Algorithms of the Subset-Sum
149 Problem on a Quantum Computer. 2009 WASE International Conference on Information Engineering,
150 2009, Vol. 2, pp. 54–57. doi:10.1109/ICIE.2009.15.
151 6. Bernstein, D.J.; Jeffery, S.; Lange, T.; Meurer, A. Quantum Algorithms for the Subset-Sum Problem.
152 Post-Quantum Cryptography; Gaborit, P., Ed.; Springer Berlin Heidelberg: Berlin, Heidelberg, 2013; pp.
153 16–33.
154 7. Howgrave-Graham, N.; Joux, A. New generic algorithms for hard knapsacks. Cryptology ePrint Archive,
155 Report 2010/189, 2010. https://eprint.iacr.org/2010/189.
156 8. Helm, A.; May, A. Subset Sum Quantumly in 1.17n . 13th Conference on the Theory ofQuantum
157 Computation, Communication and Cryptography; , 2018; pp. 5:1–5:16.
158 9. Li, Y.; Li, H. Improved quantum algorithm for the random subset sum problem. CoRR 2019, abs/1912.09264,
159 [1912.09264].
160 10. Mezzini, M. Quirk’s url of an instance of the Partition Problem. https://tinyurl.com/kp38rajd, 2021.
161 11. Beals, R.; Buhrman, H.; Cleve, R.; Mosca, M.; de Wolf, R. Quantum Lower Bounds by Polynomials. J. ACM
162 2001, 48, 778–797. doi:10.1145/502090.502097.
163 Author Contributions: Individual contributions are as follows: Conceptualization Mauro Mezzini and Jose J.
164 Paulet; Formal analysis Mauro Mezzini, Fernando Cuartero and Fernando L Pelayo; Investigation Mauro Mezzini,
165 Jose J Paulet, Fernando Cuartero, Hernan Indibil and Fernando L Pelayo; Writing – original draft Mauro Mezzini,
166 Jose J. Paulet, Hernan Indibil and Fernando Cuartero; Writing – reviewing & editing Mauro Mezzini and Fernando
167 L Pelayo
168 Conflicts of Interest: “The authors declare no conflict of interest.”

169 © 2021 by the authors. Submitted to Mathematics for possible open access publication
170 under the terms and conditions of the Creative Commons Attribution (CC BY) license
171 (http://creativecommons.org/licenses/by/4.0/).

You might also like