Download presentation
Presentation is loading. Please wait.
1
Four approaches to Shor
A mixture of a few David Poulin LITQ Université de Montréal Supervisor Gilles Brassard (SAWUNEH may 2001)
2
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
3
A bit of number theory... Theorem If a b (mod N) but a2 b2 (mod N)
Then gcd(a+b,N) is a factor of N. Proof a2 - 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
4
Shor’s entire algorithm
N is to be factored: Choose random x: 2 x N-1. If gcd(x,N) 1, Bingo! Find smallest integer r : xr 1 (mod N) If r is odd, GOTO 1 If r is even, a = xr/2 (mod N) If a = N-1 GOTO 1 ELSE gcd(a+1,N) is a non trivial factor of N. Easy Easy Hard Easy
5
Success probability Theorem
If 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 ½. Easy
6
Order finding F F-1 EN,x Quantum Fourier transform = 2n n = 2lnN
Modular exponentiation EN,x HA dim= HB dim=
7
m m Order finding A B C D Hn F-1 EN,x For sake of analysis! |0 |0
Bit bucket r : xr 1 (mod N)
8
Step by step Hn A |0|0 EN,x B The second register is r-periodic since xnr+b modN = xb modN
9
m on the second register and obtain y a power of x.
Step by step m on the second register and obtain y a power of x. What is left in the first register is an equal superposition of everything consistent with y. y xs xs+r xs+jr modN m C
10
Step by step Quantum Fourier transform F-1 D
11
What’s that probability?
m “c” with probability |c|2 = Measure the first register: What we want is r : xr 1 (mod N) ! Consider a c : t integer with 0 rc-t r/2 t rc t +r/2 t j jrc / tj +rj/2 tj +1/2 0 jrc / 1/2 plus a integer!
12
What’s that probability?
Length of the arc: Length of the cord: |c|2
13
What’s that probability?
If 0 rc-t r/2 then |c|2 #{c : 0 c -1 and (t)[0 rc-t r/2 ]} r Pr( getting a good c ) What the heck is so special about those c ?
14
Continuous fractions The condition can be written
c/ is the best n bits estimation of t/r. Assume there is another t’/r’ satisfying this condition: Since Hence tr’ – t’r =0 t and r are unique. They can be found by continuous fraction algorithm!!!
15
That was Shor’s algorithm formally.
Now I’ll show what Shor’s algorithm really is. Do you need a break?
16
m Interference H H |0 |0 |1 ei |1 |0
|0 |0 |1 ei |1 m |0 H H |0 |0+|1 |0+ei |1 (1+ ei )|0+ (1- ei )|1 Pr(“0”)=cos2(/2) Pr(“1”)=sin2(/2)
17
Phase kick back H U The previous dynamics can be simulated by:
Same state as previous slide! |0 H |u U |u Apply U if top wire is 1 Bit bucket Where |u is an eigenstate of U: U|u = ei |u |0|u (|0+ |1)|u = |0|u+|1|u |0|u +ei |1|u (|0+ei |1)|u
18
Phase estimation Hn U2 U
In 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 Hn U2 2 3 4 |0+ei2 |1 |0+ei |1 |
19
Phase estimation F (binary extension of x/ - integer)
So applying F-1 to | will yield |x that is the best n bit estimation of /2.
20
Multiplication Consider UN,a : |x |ax mod N. Then, for k = 1,...,r
are eigenstates of UN,a with eigenvalues UN,a If we could prepare such a state, we could obtain an estimation of k/r hence of r. It requires the knoledge of r.
21
Multiplication Consider the sum Since
The state |1 is easy to prepare. In what follows, we show that it can be used to get an estimation of k/r for random k.
22
m m m Phase estimation Hn F-1 U2 U U2 U2 U2 |0 |1
This measurement is useless! This measurement commutes with the Us so we can perform it after. m Make measurement here to collapse the state to a random |k : get an estimation of k/r for random k. m U2 2 3 4 |1 U U2 U2 U2 N,a N,a N,a N,a N,a
23
QFT circuit F-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 Qubit n-1 depends on x0 with a phase 0 or -/2 and on x1 with a phase 0 or - |x0 H |x1 R1 H
24
QFT circuit H R1 R2 R3 H R1 R2 H R1 H Rk
We define the gate Rk as a -/2k phase gate. |x3 H R1 R2 R3 |x2 H R1 R2 |x1 H R1 |x0 H Note 1: H = R0 Note 2: Rk
25
Semi-classical QFT Measurements! H R1 H R2 R1 H R3 R2 R1 H |x3 |x2
All controlled phase gates are now classically controlled!
26
Single qubit phase estimation
… … |0+ |1 H … |0+ |1 H … |0+ |1 R1 H … |0+ |1 R2 R1 H … … |1 U2 n-1 … U2 2 U2 1 U2 Bit bucket
27
Single qubit phase estimation
|0+ |1 |0+ |1 |0+ |1 … |0+ |1 H Rn-2 H Rn-1 H Rn H … … |1 U2 n-1 … U2 2 U2 1 U2 Almost anything will do the job!!! 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.
28
Mixed state computing Maximally mixed state:
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: Where gd are solutions of gar-g 0 mod N and rd is the period of the period x gdax mod N.
29
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 of the eigenvalues of UN,a. 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 =
30
Mixed state computing Since I is independent of the basis, we can input anything in 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)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.