text
stringlengths
0
8.13M
(n−1) (0)
and V = U ...U , as in (16).
1 1
3.4.1. Claim. (i) The real plane in H spanned by the uniform superposition ξ
n
of all classical states (15) and by x is invariant with respect to T := VJVI .
0 F
| i
(ii) T restricted to this plane is the rotation (from ξ to x ) by the angle ϕ
0 N
| i
where
2 √N 1
cosϕ = 1 , sinϕ = 2 − .
N N
− N N
The check is straightforward.
2
Now, ϕ is close to , and for the initial angle ϕ between ξ and x we have
N 0
√N | i
1
cosϕ = .
−√N
21
π√N
Hence in [ϕ/ϕ ] applications of T to ξ we will get the state very close to
N
≈ 4
x . Stopping the iteration of T after as many steps and measuring the outcome in
0
| i
the basis of classical states, we will obtain x with probability very close to one.
0
| i
One application of T replaces in the quantum search one evaluation of F. Thus,
thanks to quantum parallelism, we achieve a polynomial speed–up in comparison
with the classical search. The case when F takes value 1 at several points and we
only want to find one of them, can be treated by an extension of this method. If
there are n such points, the algorithm requires about N/n steps, and n need not
be known a priori: see [BoyBHT]. p
4. Shor’s factoring algorithm
4.1. Notation. Let M be a number to be factored. We will assume that it is
odd and is not a power of a prime number.
Denote by N the size of the basic memory register we will be using (not counting
scratchpad). Its bit size n will be about twice that of M. More precisely, choose
M2 < N = 2n < 2M2. Finally, let 1 < t < M be a random parameter with
gcd(t,M) = 1. This condition can be checked classically in time polynomial in n.
Below we will describe one run of Shor’s algorithm, in which t (and of course,
M, N) is fixed. Generally, polynomially many runs will be required, in which the
value of t can remain the same or be chosen anew. This is needed in order to gather
statistics. Shor’s algorithm is a probabilistic one, with two sources of randomness
that must be clearly distinguished. One is built into the classical probabilistic
reduction of factoring to the finding of the period of a function. Another stems
from the necessity of observing quantum memory, which, too, produces random
results.
More precise estimates than those given here show that a quantum computer
which can store about 3n qubits can find a factor of M in time of order n3 with
probability close to 1 : see [BCDP]. On the other hand, it is widely believed that
no recursive function of the type M a proper factor of M belongs to PF. This
7→
is why the most popular public key encryption schemes rely upon the difficulty of
the factoring problem.
4.2. Classical algorithm. Put
r := min ρ tρ 1modM
{ | ≡ }
which is the least period of F : a tamodM.
7→
4.2.1. Claim. If one can efficiently calculate r as a function of t, one can find
a proper divisor of M in polynomial in log M time with probability 1 M−m for
2 ≥ −
any fixed m.
22
Assume that for a given t the period r satisfies
r 0mod2, tr/2 = 1modM
≡ 6 −
Then gcd(tr/2 +1,M) is a proper divisor of M. Notice that gcd is computable in
polynomial time.
1
The probability that this condition holds is 1 where k is the number
≥ − 2k−1
1
of different odd prime divisors of M, hence in our case. Therefore we will find
≥ 2
a good t with probability 1 M−m in O(logM) tries. The longest calculation in
≥ −
one try is that of tr/2. The usual squaring method takes polynomial time as well.
4.3. Quantum algorithm calculating r. Here we describe one run of the
quantum algorithm which purports to compute r, given M,N,t. We will use the
working register that can keep a pair consisting of a variable 0 a N 1 and
≤ ≤ −
the respective value of the function tamodM. One more register will serve as the
scratchpad needed to compute a,tamodM reversibly. When this calculation is
| i
completed, the content of the scratchpad will be reversibly erased: cf. 3.2.1. In the
remaining part of the computation the scratchpad will not be used anymore, we
can decouple it, and forget about it.
The quantum computation consists of four steps, three of which were described
in sec. 3:
(i) Partial initialization produces from 0,0 the superposition