1 / 17

Shor’s Factoring Algorithm

This paper discusses Shor's entire factoring algorithm, including quantum circuits, phase estimation, and the quantum Fourier transform. It also explores the use of phase estimation in factoring integers.

janedavis
Download Presentation

Shor’s Factoring Algorithm

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Shor’s Factoring Algorithm David Poulin Institute for Quantum Computing & Perimeter Institute for Theoretical Physics Guelph, September 2003

  2. Summary • Some number theory • Shor’s entire algorithm • Quantum circuits • Phase estimation • Quantum Fourier transform • Final circuit David Poulin, IQC & PI

  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 David Poulin, IQC & PI

  4. Shor’s entire algorithm Easy Easy Easy Easy Easy • 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. Hard Easy David Poulin, IQC & PI

  5. Success probability 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  ½. Theorem If N has k different prime factors, probability of success for random x is  1- 1/2k-1. Easy David Poulin, IQC & PI

  6. Classical computing Basic logical unit: the bit 0 or 1 Universal set: (Not-and, Swap, Copy) A Not-and(A B) B A B A Swap Copy A B A A David Poulin, IQC & PI

  7. Bits and Qubits 1 qubit  | +  |1||2 + ||2=1 n qubits (|4- |7) = (|0100- |0111) = |01(|00- |11) Measure  i with probability |ci|2 Classical Quantum 1 bit 0 or 1 n bits 000...0 (0) 000...1 (1) … 111...1 (2n-1) Measure b1b2b3...bn  b1b2b3...bn David Poulin, IQC & PI

  8. Quantum gates |a |a Controlled not: |b if a=0 |b |b if a=1 Universal set: (C-not, U(2) on single qubit) |0  (|0+|1) Ex. One qubit gate: H |1  (|0-|1) David Poulin, IQC & PI

  9. Composing Quantum gates Use linearity of quantum mechanics. |0 H (|0|0 +|1|1) |0 (|0+ |1)  |0 = (|0|0+ |1|0) Any classical computation can be made reversibly (one to one) with poly overhead. Any reversible classical computation can be performed on a quantum computer with poly overhead. David Poulin, IQC & PI

  10. Phase kick back |0 |x s.t. eig. = eix H H |± |± = |0+ eix |1 (|0| ±+ |1| ±) (|0| ±±|1| ±) = (|0±|1)  | ± What are the eigenstates of NOT? (|1+ |0) = |+ |+ = (|0+ |1) ±|± (|1- |0) = - |- |- = (|0- |1) David Poulin, IQC & PI

  11. Phase estimation 4 |0+ei2  |1 … Hn | |0 |0+ei |1 2 3 4 U2 |u |u U2 U2 U2 U In the previous slide, 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. David Poulin, IQC & PI

  12. Quantum Fourier Transform So applying F-1 to | will yield |x that is the best n bit estimation of /2. F (binary extension of x/2n mod1) David Poulin, IQC & PI

  13. QFT circuit |x0 H Qubit n-1 depends on x0 with a phase 0 or -/2 and on x1 with a phase 0 or - |x1 R1 H |x0 H F-1 Qubit n is |0+ |1 if x0 is |0 and |0- |1 if x0 is |1. (a phase 0 or - depending on x0) David Poulin, IQC & PI

  14. QFT circuit H R1 R2 H R1 H We define the gate Rk as a -/2k phase gate. |x3 R1 R2 R3 H |x2 |x1 |x0 Note: H = R0 David Poulin, IQC & PI

  15. Multiplication UN,a Consider UN,a : |x  |ax mod N. Then, for k = 1,...,r are eigenstates of UN,a with eigenvalues If we could prepare such a state, we could obtain an estimation of k/r hence of r. It requires the knowledge of r. David Poulin, IQC & PI

  16. 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. David Poulin, IQC & PI

  17. Phase estimation m F-1 m m Make measurement here to collapse the state to a random |k : get an estimation of k/r for random k. This measurement commutes with the Us so we can perform it after. This measurement is useless! No knowledge of r is needed! Hn |0 2 3 4 U2 |1 U2 U2 U2 U N,a N,a N,a N,a N,a David Poulin, IQC & PI

More Related