A Complexity Analysis of Shor’s Quantum Factoring Algorithm
J. Caleb WherryAustin Peay State University
Department of Computer Science
Outline
I. Introduction
II. Classical Factoring
III. Quantum Computing
IV. Shor’s Quantum Factoring Algorithm
V. Conclusion
2
Introduction
3
DNA Computing
3
S. Aaronson and J. Watrous. Closed Timelike Curves Make Quantum and Classical Computing Equivalent, Proceedings of the Royal Society A 465:631-647, 2009. arXiv:0808.2669.
R CTC R CR
C
0 0 0
Answer
“Causality-Respecting Register”
“Closed Timelike
Curve Register”
Polynomial Size Circuit
Closed Timelike Curve Computation
Relativity Computer Quantum Computing
Classical Factoring
4
Composite Number
For RSA, p & q are prime.
Why is Factoring Hard?
Example 1: N being 16 bits long Example 2: N being 32 bits long
216 = 65,536 possible values 232 = 4,294,967,296 possible values
RSANormal RSA public key (above N) is around 1024-2048 bits.
Quantum Computing
5
|0 + |1|0 |1
Orthonormal Basis Set Superposition of 0 & 1
|0 |1 |
Bloch Sphere
0 12|
E.g.
=Qubits: Photons, Electrons, Ions, etc.*Spin of above particles.
Shor’s Quantum Factoring Algorithm
6
We have an integer N that we want to factor.
To factor, we have to find the period of this function:
Nxaf a mod)(
Where x < N and coprime to N.
Using rules of modular arithmetic to yield:
Nxx
Nx
Nx
Nx
rr
r
r
r
mod0)1)(1(
mod01)(
mod1)(
mod1
22
22
22
Quantum Register:
22 2NqN
1
0
0,|1 q
a
aq
Set up quantum side:
Shor’s Quantum Factoring Algorithm
7
Quantum Register:
1
0
0,|1 q
a
aq
Nx a mod|
1
0
mod,|1 q
a
a Nxaq
State After Transformation:
Measure Register 1:
'
,'||'|
1avec
kaa
Quantum Fourier Transform
New State:
What does this do?
“Peaks” values in Register 1 around multiples of:
Measure this register to get one of these values, then compute classically r with continued fractions.
rq
Shor’s Quantum Factoring Algorithm
8Fourier Transform
http://www.academictutorials.com/graphics/graphics-fourier-transform.asp
Shor’s Quantum Factoring Algorithm
),1(
),1(
mod0)1)(1(
2
2
22
NxGCD
NxGCD
Nxx
r
r
rr
Once we have r, computing above will yield a non-trivial factor of N. QFT takes no more than O(M3), where M is the number of bits N is.
*Caveat: Shor’s Algorithm resides in BQP, so the answer could be wrong. Re-run to get another answer or to verify first answer. Note though, running polynomial algorithm multiple times is much better than running 1 exponential algorithm.
Conclusion
10
We have seen how hard factoring is for even a small amount of bits.
Quantum computing is a computational paradigm that can potentially give exponential
speed up over classical computing.
Drawbacks Extremely hard to control quantum systems. Extreme engineering environments. Algorithms are counterintuitive.
References
11
Arora, Sanjeev; Barak, Boaz. “Computational Complexity: A Modern Approach.” New
York: Cambridge University Press. 2009. Print.
Hayward, Matthew. “Quantum Computing and Shor’s Algorithm.” Sydney: Macquarie
University Mathematics Department. 2008. Print.
Nielsen, Michael A.; Chuang, Isaac L. “Quantum Computation and Quantum Information.”
New York: Cambridge University Press. 2000. Print.
Shor, Peter W. “Algorithms for Quantum Computation: Discrete Logarithms and
Factoring.” Proc. 35th Annual Symposium on Foundations of Computer Science. Ed.
Shafi Goldwasser. IEEE Computer Society Press, 1994. 124-136. Print.
Questions &| Comments
12
Questions &| Comments?