introduction to quantum information processingjyard/qic710/qic710lec8-2017.pdfΒ Β· exercise: why are...
TRANSCRIPT
1
Introduction to
Quantum Information ProcessingQIC 710 / CS 768 / PH 767 / CO 681 / AM 871
Jon Yard
QNC 3126
http://math.uwaterloo.ca/~jyard/qic710
Lecture 8 (2017)
2
Recap of:
Eigenvalue estimation problem
(a.k.a. phase estimation)
3
Generalized controlled-U gates
U
I
0
0
U
π
π
π
ππ π
π1
U
:
ππ
π1:
ππ
π1:
ππππ1β―ππ π
12
2
000
000
000
000
m
U
U
U
I
Example: 11010101 β¦ 1101π130101
4
Eigenvalue estimation problem
π is a unitary operation on π qubits
|πβ© is an eigenvector of π, with eigenvalue π2πππ (0 β€ π < 1)
Output: π (π-bit approximation)
Input: black-box for
U n qubits
m qubitsand a copy of |πβ©
β’ one query to generalized controlled-π gate
β’ π π2 auxiliary gates
β’ Success probability 4/2 0.4
Algorithm:
Note: with 2m-qubit control gate, error probability is exponentially small
5
Order-finding via
eigenvalue estimation
6
Order-finding problemLet π be an π-bit integer
Def: β€πΓ = {π₯ β {1,2,β¦ ,π β1} βΆ gcd(π₯,π) = 1} a group (mult.)
Def: ordπ(π) is the minimum π > 0 such that ππ β‘ 1mod π
Order-finding problem: given π and π β β€πΓ find ordπ(π)
Example: β€21Γ = {1,2,4,5,8,10,11,13,16,17,19,20}
The powers of 5 are: 1, 5, 4, 20, 16, 17, 1, 5, 4, 20, 16, 17, 1, 5,β¦
Therefore, ord21(5) = 6
Note: no classical polynomial-time algorithm is known for
this problemβit turns out that this is as hard as factoring
7
Order-finding algorithm (1)Define: π (an operation on π qubits) as: π π¦ = ππ¦ mod π
Define:
Then
Therefore π1 is an eigenvector of π.
Knowing the eigenvalue is equivalent to knowing 1/π,
from which π can be determined.
π1 =1
π
π=0
πβ1
πβ2ππ 1/π π|ππ mod πβ©
π π1 =1
π
π=0
πβ1
πβ2ππ 1/π π|ππ+1 mod πβ©
=1
π
π=0
πβ1
π2ππ(1/π)πβ2ππ 1/π (π+1)|ππ+1 mod πβ©
= π2ππ(1/π) |π1β©
8
Order-finding algorithm (2)
U π qubits
2π qubits*Corresponds to the mapping
π₯ π¦ β¦ π₯ ππ₯π¦ mod π .
Moreover, this mapping can
be implemented with roughly
π(π2) gates.
The eigenvalue estimation algorithm yields a 2π-bit estimate
of 1/π (using the above mapping and the state |π1β©).
From this, a good estimate of π can be calculated by taking
the reciprocal, and rounding off to the nearest integer.
Big problem: how do we construct |π1β© to begin with?
Exercise: why are 2π bits necessary and sufficient for this?
* Weβre now using π for the modulus and setting the number of control qubits to 2π.
9
Bypassing the need for π1 (1)
Note: If we let
then any one of these could be used in the previous procedure,
giving an estimate of π/π. Then π = π π/π β1.
What if π is chosen randomly and kept secret?
π1 =1
π
π=0
πβ1
πβ2ππ 1/π π|ππ mod πβ©
π2 =1
π
π=0
πβ1
πβ2ππ 2/π π|ππ mod πβ©
ππ =1
π
π=0
πβ1
πβ2ππ π/π π|ππ mod πβ©
ππ =1
π
π=0
πβ1
πβ2ππ π/π π|ππ modπβ©
10
Bypassing the need for |π1β© (2)
Note: If π and π have a common factor, it is impossible
because, for example, 2/3 and 34/51 are indistinguishable
What if π is chosen randomly and kept secret?
Can still uniquely determine π and π from a 2π-bit estimate
of π/π, provided they have no common factors, using the
continued fractions algorithm*.
* For a discussion of the continued fractions algorithm, please see
Appendix A4.4 in [Nielsen & Chuang]
So this is fine as long as π and π are relatively prime β¦
11
Bypassing the need for |π1β© (3)
Recall that π is randomly chosen from {1,β¦ , π}.
What is the probability that π and π are relatively prime?
Therefore, the success probability is at least Ξ©(1/ log(π)).
The probability that this occurs is π(π)/π, where π is
Eulerβs totient function (defined as the cardinality of β€πΓ).
It is known that π π = Ξ©(π/ log log(π)), which implies that
this probability is at least Ξ©(1/ log log(π)) = Ξ©(1/ log(π)).
Is this good enough? Yes, because it means that the success
probability can be amplified to any constant < 1 by repeating
π(log π) times (so still polynomial in π).
But weβd still need to generate a random |ππβ© here β¦
12
Bypassing the need for |π1β© (4)
Returning to the phase estimation problem, suppose that |π1β©and |π2β© are orthogonal, with eigenvalues π2πππ1 and π2πππ2,
and that πΌ1 π1 + πΌ2|π2β© is used in place of an eigenvector:
U
H
H
H
000
πΉπβ
What will the outcome of the measurement be?
It can be shown* that the outcome will be an estimate ofπ1 with probability πΌ1
2
π2 with probability πΌ22
* Showing this is straightforward, but not entirely trivial.
πΌ1 π1 + πΌ2|π2β©
13
Bypassing the need for |π1β© (5)
Along these lines, the state
So now all we have to do is construct the state.
yields the same outcome as using a random |ππβ© (but not being
given π), where each π β {1,β¦ , π} occurs with probability 1/π.
This is a case that weβve already solved.
In fact, this is something that is easy, since
This is how the previous requirement for |π1β© is bypassed.
1
π
π=1
π
|ππβ©
1
π
π=1
π
|ππβ© =1
π
π=1
π
π=0
πβ1
πβ2ππ π/π π|ππ mod πβ© = |1β©
14
Quantum algorithm for order-finding
ππ,π
H
H
H
0
0
0
0
0
1
H
H 4
4 8H
measure these qubits and
apply continued fractions
algorithm to determine a
quotient, whose
denominator divides r
ππ,ππ¦ = π π¦ mod π
inverse QFT
For constant success probability, repeat π(log π) times and
take the smallest resulting π such that ππ β‘ 1mod π
Number of gates for Ξ©(1/ log π) success probability is:
π(π2 log π log log(π))
15
Reducing factoring to order finding
16
The integer factorization problem
Input: π (π-bit integer; we can assume it is composite)
Output: β, ββ² > 1 such that βββ² = π.
Note 2: given any efficient algorithm for the above, we can
recursively apply it to fully factor π into primes efficiently.
Note 1: no efficient (polynomial-time) classical algorithm is
known for this problem.
Note 3: β polynomial-time classical algorithms for primality testing:
β’ Miller-Rabin - randomized
β’ AgrawalβKayalβSaxena (AKS) - deterministic, but slower
β’ sage: is_prime(m) uses PARI implementation of ECPP
(Elliptic Curve Primality Proving) - randomized and faster
17
Factoring prime-powers
There is a straightforward efficient classical algorithm for
recognizing and factoring numbers of the form π = ππ, for
some (unknown) prime π.
What is this algorithm?
Therefore, the interesting remaining case is where π has
at least two distinct prime factors.
Hint: If in fact π = ππ, then π β€ log2π β€ π.
18
Proposed quantum algorithm (repeatedly do):
1. randomly choose π β {2, 3, β¦ ,πβ1}2. compute β = gcd(π,π)3. if β > 1 then
output β,π/βelse
compute π = ordπ(π) (quantum part)
if π is even then
compute π₯ = ππ/2 β 1mod πcompute β = gcd(π₯,π)if β > 1 then output β,π/β
Numbers other than prime-powers
So π | ππ/2 + 1 ππ/21 .
This means π | ππβ 1.
Thus, either π|ππ/2 + 1
or gcd ππ/2 β 1,π is
a nontrivial divisor of π.
At least half (actually a 1 β 2β#odd prime factors of π fraction) of the
π β {2, 3, β¦ ,πβ1} have ordπ(π) even and result in gcd ππ/2 β 1,π
being a nontrivial divisor of π (see Shorβs 1995 paper for details).
Analysis
Problem. Given odd composite π β ππ, compute nontrivial divisor β of π.
Assume we find an πwith π = ordπ π even.