A Mathematical Introduction to Shor's Quantum Factoring Algorithm


Published on

1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

A Mathematical Introduction to Shor's Quantum Factoring Algorithm

  1. 1. A Mathematical Introduction to Shor’s Quantum Factoring Algorithm<br />J. Caleb Wherry<br />Departments of Computer Science & Mathematics<br />Austin Peay State University<br />
  2. 2. Outline<br />Introduction to Quantum Computing<br />Classical vs. Quantum Computing<br />Qubits & Quantum Logic Gates<br />Classical Factoring<br />Classical Methods for Factoring<br />NP vs. BQP Complexity Classes<br />Quantum Factoring<br />Mathematical Method<br />Quantum Fourier Transform<br />Conclusion<br />Future of Classical Cryptography<br />Future of Quantum Computing<br />2<br />
  3. 3. Introduction To Quantum Computing<br />3<br />Bits<br />On/Off Voltage<br />0 or 1<br />n bits = n bits of info<br />Classical Logic Gates<br />Universal And, Or, & Not<br />Copy – non-universal<br />{One,Two}-ary Operations on the Boolean Algebra<br />Quantum Bits (Qubits)<br />Elementary Particle Spin<br />Photon, Electron, Ion, etc.<br />0, 1, or Superposition of 0 &1<br />n qubits = 2n bits of info<br />Quantum Logic Gates<br />Universal And, Or, & Not<br />Copy – non-universal<br />No-copy Theorem<br />Linear Transformations<br />Classical Computing <br />Quantum Computing<br />
  4. 4. Introduction To Quantum Computing<br />4<br />Orthonormal Basis Set<br />Superposition of 0 & 1<br />|0 + |1<br />|0<br />|1<br />|0<br /><br />|<br />|1<br />
  5. 5. Introduction To Quantum Computing<br />5<br />Pauli Matrices<br />Hadamard Gate<br />Pauli-X <br />Pauli-Y <br />Hadamard<br />Pauli-Z <br />Pauli-X : Not gate<br />Pauli-Y: Not gate with i multiple<br />Pauli-Z: Flips sign of second entangled state<br />
  6. 6. Introduction To Quantum Computing<br />Experimental Problems<br />Decoherence<br />Quantum Noise<br />Collapse of Quantum States<br />Uncertainty Principle<br />NMR Measurement<br />No-cloning Theorem<br />Quantum Weirdness<br />Superposition<br />Entanglement<br />Teleportation<br />Superdense Coding<br />6<br />
  7. 7. Classical Factoring<br />Exponentially Hard<br />Thought to be in NP Complexity Class<br />Best Known Classical Method:<br />General Number Field Sieve<br />~O(e(log N)1/3(log log N)2/3)<br />Other Methods<br />GCD<br />Brute Force<br />RSA<br />7<br />
  8. 8. Classical & Quantum Complexity<br />8<br />Image Source: http://en.wikipedia.org/wiki/Quantum_computer<br />
  9. 9. Quantum Factoring<br />Exponentially Faster<br />BQP<br />~O(log(N)3)<br />2 Main Parts<br />1) Classical<br />Reduction to Order-Finding Problem<br />Done on a Classical Computer<br />2) Quantum<br />Solve the Order-Finding Problem<br />Done on a Quantum Computer<br />9<br />
  10. 10. Quantum Factoring<br />Classical Part<br />Start with an odd composite number N<br />Pick a random q < N<br />Note that this is random which will come up later…<br />GCD(q,N) == 1 ? continue : halt<br />Halt because there is a non-trivial factor. Cannot use for period finding.<br />We now use our quantum computer to compute r, the period of:<br /> f(x) = qx mod N<br />We restrict r to be even (if odd, repick q). r satisfies:<br />ar 1 mod N<br />ar – 1 0 mod N<br />10<br />
  11. 11. Quantum Factoring<br />Classical Part cont…<br />ar -1 = (ar/2 -1)(ar/2 + 1) 0 mod N<br />Thus, N divides (ar/2 -1)(ar/2 + 1)<br />If both terms are prime (which is what we want), then these are the only two solutions.<br />If not, then return and repick q.<br />This seems pretty straight forward except for the quantum part. Finding r is not an easy problem. <br />We will employ the use of the quantum Fourier transform and make use of quantum superposition to solve this problem…<br />11<br />
  12. 12. Quantum Factoring<br />Quantum Part<br />N is still our composite number<br />We start off by finding a Q such that:<br /> Q = 2q , N2 ≤ Q ≤ 2N2<br />When we find such a Q, we can see that:<br /> Q/r > N<br />We then initialize our input and output registers to hold Q qubits and apply the Hadamard gate to entangle all the states.<br />We now have an entangled state <br />Apply the Quantum Fourier Transform to this state<br />Destructive interference will occur and cancel out certain states (Double-slit experiment)<br />12<br />|<br />
  13. 13. Quantum Factoring<br />Quantum Part cont…<br />Perform a measurement and retrieve an approximation of r<br />We then check with a classical computer if r is correct. If not then we redo the calculation<br />Probabilistic Algorithm<br />If answer is incorrect, then the q we picked at the beginning is not correct so we start over<br />This causes this algorithm to be in BQP<br />Exponentially Faster<br />13<br />
  14. 14. Conclusion<br />Future of Classical Cryptography<br />A Look Into The Future: Moore’s Law<br />10-20 Years Until Quantum Scale is Reached<br />Other Classical Cryptography Methods<br />Immune to Quantum Parallel Attacks<br />Lattice-based Cryptography<br />Future of Quantum Computing<br />Extreme Conditions<br />4 - 20 Kelvin<br />Applications Are Minimal Currently<br />No Connection To Solving NP(-complete) Problems<br />Although This is Commonly Thought True!<br />14<br />
  15. 15. References<br />Bernstein, E., Vazirani, U., “Quantum Complexity Theory.”<br />Chuang, I., “Quantum Algorithms and Their Implementations: QuISU – An Introduction for Undergraduates.”<br />Lloyd, S., “Quantum Information Science.”<br />Nielson, M., Chuang, I., “Quantum Computation and Quantum Information.” <br />15<br />
  16. 16. Questions?<br />Comments?<br />16<br />