Upload
uri
View
55
Download
1
Embed Size (px)
DESCRIPTION
Four approaches to Shor. A mixture of a few. David Poulin LITQ Université de Montréal Supervisor Gilles Brassard ( SAWUNEH ma y 2001). Summary. Shor’s entire algorithm formally Probability analysis Phase estimation Shor as phase estimation Quantum circuit for QFT - PowerPoint PPT Presentation
Citation preview
Four approaches to Shor
David Poulin
LITQ
Université de MontréalSupervisor Gilles Brassard
(SAWUNEH may 2001)
A m
ixtu
re o
f a fe
w
Summary
•Shor’s entire algorithm formally•Probability analysis•Phase estimation•Shor as phase estimation•Quantum circuit for QFT•Semi-classical circuit for QFT•Single qubit phase estimation•Mixed state quantum computing
A bit of number theory...
TheoremIf a b (mod N) but a2 b2 (mod N)Then gcd(a+b,N) is a factor of N.
Proofa2 - b2 0 (mod N) (a - b)(a+b) 0 (mod N) ( t) [ (a - b) (a+b) = tN ]
gcd(a+b, N) is a non trivial factor of N.
uN vN
Shor’s entire algorithm
N is to be factored:
1. Choose random x: 2 x N-1.2. If gcd(x,N) 1, Bingo!3. Find smallest integer r : xr 1 (mod N)4. If r is odd, GOTO 15. If r is even, a = xr/2 (mod N)6. If a = N-1 GOTO 17. ELSE gcd(a+1,N) is a non trivial factor of N.
Easy
Easy
Easy
Easy
Easy
Easy
Hard
Success probability
TheoremIf N has k different prime factors, probability of success for random x is 1- 1/2k-1.
Add this step to Shor’s algorithm:
0. -Test if N=N’2l and apply Shor to N’ -Compute for 2 j ln2N. If one of these root is integer, apply Shor to this root.
Probability of success ½.
j N
Easy
Order finding
Quantum Fourier transform
1
0
/2 1 c
ixc cex F = 2n
n = 2lnN
Modular exponentiation
Nxbaba a mod , , EN,x
HA dim= HB dim=
1
0
/2 1 c
ixc cex F-1
Order finding
Hn
EN,x
F-1 m
Bit bucket
mFor sake ofanalysis!
|0
|0
A B C D
r : xr 1 (mod N)
|0|0
1
00 , 1
aa
Hn
A
Step by step
EN,x
1
0mod , 1
a
a Nxa B
The second register is r-periodic since xnr+b modN = xb modN
m
m on the second register and obtain y a power of x.What is left in the first register is an equal superpositionof everything consistent with y.
Step by step
y xs xs+r xs+jr modN
1
0
/1 r
jjrs
r C
Step by step
F-1
1
0
1
0
/)(2 1 /
1 r
j c
cjrsi cer
1
0
cc c
1
0
/2/2 r
j
ijrciscc eer
D
Quantum Fourier transform
What’s that probability?
What we want is r : xr 1 (mod N) !
Consider a c : t integer with 0 rc-t r/2t rc t +r/2 t j jrc / tj +rj/2 tj +1/2
0 jrc / 1/2 plus a integer!
m “c” with probability |c|2 =
Measure the first register:21
0
/22
r
j
ijrcer
What’s that probability?
Length of the arc: r
Length of the cord:
r 2 arc 2
|c|2 rrr
4 4 22
2
2
What’s that probability?
If 0 rc-t r/2 then |c|2
r4
#{c : 0 c -1 and (t)[0 rc-t r/2 ]} r
Pr( getting a good c ) 40% 4
What the heck is so special about those c ?
Continuous fractions
The condition can be written nrtc
221 2
1
c/ is the best n bits estimation of t/r.
Assume there is another t’/r’ satisfying this condition:
1 ' ' - '
1 '' rr
rttrrt
rt
Since ' ' and 2NrrNrr
Hence tr’ – t’r =0 t and r are unique.They can be found by continuous fraction algorithm!!!
That was Shor’s algorithm formally.
Now I’ll show what Shor’s algorithm really is.
Do you need a break?
Interference
H H
|0 |0|1 ei |1
|0 |0+|1 |0+ei |1 (1+ ei )|0+ (1- ei )|1
Pr(“0”)=cos2(/2) Pr(“1”)=sin2(/2)
|0 m
Phase kick back
The previous dynamics can be simulated by:
H|0
|u UBit
bucket
|0|u (|0+ |1)|u = |0|u+|1|u |0|u +ei |1|u (|0+ei |1)|u
Where |u is an eigenstate of U: U|u = ei |u
Apply U if topwire is 1
Same state as previous slide!
|u
Phase estimationIn Deutsch’s problem, we were able to determine whether was 0 or .Q: Can me determine any ?
A: We can get the best n bit estimation of /2.
|0
|u U |u
Hn
U2 U22U23
U24
|0+ei2 |14
|0+ei |1
|
1
0
/2 1 c
ixc cex F
1 0 ... 1 0 1 0 )....0(2).0(2).0(2 11 nnnn xxixxixi eee
Phase estimation
So applying F-1 to | will yield |x that is the best n bitestimation of /2.
1 mod 22 2
0 kn
k
kx
1 0 re whe 2
1
ij
n
jepp
njnjnj xxx ... .0 1 (binary extension of x/ - integer)
Multiplication
1
0
/2 mod r
j
jrikjk Nae
Consider UN,a : |x |ax mod N. Then,
are eigenstates of UN,a with eigenvalues
for k = 1,...,r
rike /2
r
j
jrjikr
j
jrikjk NaeNae
1
/)1(21
0
1/2 mod mod UN,a
mod 1
0
/2/2
r
j
jrikjrik Naee
If we could prepare such a state, we could obtain anestimation of k/r hence of r. It requires the knoledge of r.
Multiplication
Nae jrikjr
k
r-
j
r
kk mod /2
1
1
01
Consider the sum
01
/2 j
r
k
rikje
Since
The state |1 is easy to prepare. In what follows, weshow that it can be used to get an estimation of k/rfor random k.
1
|0
|1 U
Hn
U2 U22U23
U24
Phase estimation
N,a N,a N,a N,a N,a
Make measurement here to collapse the state to arandom |k : get an estimation of k/r for random k.
m
This measurement commutes with the Us so we canperform it after.
m
This measurement is useless!
F-1 m
QFT circuit
1
0
/2 1 c
ixc cex F-1njnjnj xxx ... .0 1
Qubit n is |0+ |1 if x0 is |0 and |0- |1 if x0 is |1. (x0 with a phase 0 or -)
H|x0 np
Qubit n-1 depends on x0 with a phase 0 or -/2 and onx1 with a phase 0 or -
|x0 np
H|x1 1npR1
H
1 0 re whe 2
1
ij
n
jepp
QFT circuitWe define the gate Rk as a -/2k phase gate.
H|x3 0pR1 R2 R3
|x2 1p
|x1 2p
H|x0 3p
H R1 R2
H R1
Note 1: H = R0
Note 2:Rk
Rk
Semi-classical QFT
H|x3 0p
R3
|x2 1p
|x1 2p
H|x0 3p
H
R1
R2
H
R1
R1
R2
All controlled phase gates are now classically controlled!
Measurements!
Single qubit phase estimation
|0+ |1
|0+ |1
|0+ |1
|0+ |1 HR1
H
R2
R1
H
H
…
…
…
…
………U2n-1 2U2 1U2 0U2|1
Bit bucket
…
……U2n-1 2U2|1…
|0+ |1 H …
|0+ |1
Rn-2 H
1U2
Rn-1 H
|0+ |1
0U2
Rn H
|0+ |1
The are measurements.
The Rk are phase gates with an angle 0.b1b2...bk-1
where bj is the classical outcome of the jth measurement.
Single qubit phase estimation
Almost anything will do the job!!!
Mixed state computing
Maximally mixed state:
1
0 1
kkkI
Independent of the basis |k.
The |k k=1,2,...,r are orthogonal, but do not form a complete basis since r < .
The other eigenvectors of UN,a are of the form:
1
0
/2 mod d
ddd
r
k
kd
rkijdj Nage
Where gd are solutions of gar-g 0 mod N and rd is theperiod of the period x gdax mod N.
Mixed state computing
Theorem: Given q and p : N = pq, then gar-g 0 mod N for at most p+q-1 values of g.
We express the maximally mixed state as a mixture ofthe eigenvalues of UN,a.
1
0 1
d
d
dd
r
j
dj
dj
d
I
The output of the algorithm will then be the best n bit estimation of jd/rd for d and jd chosen at random.
The result is useful if gd=1: Prob = .1 )1)(1( pq
qp
Mixed state computing
Since I is independent of the basis, we can input anythingin the bottom register and it will work pretty well.
In particular, this is useful for NMR computing.(it’s impossible to prepare a pure state)