Shor s algorithmShor's algorithm is a quantum algorithm for factoring a number N in O((log N)3) time and O(log N) space, named after Peter Shor. Many public key cryptosystems, such as RSA, will become obsolete if Shor's algorithm is ever implemented in a practical quantum computer. A message encrypted with RSA can be deciphered by factoring the public key N, which is the product of two prime numbers. Known classical algorithms cannot do this in time O((log N)k) for any k, so they quickly become infeasible as N is increased. By contrast, Shor's algorithm can crack RSA in polynomial time. It has also been extended to attack many other public key cryptosystems. Like all quantum computer algorithms, Shor's algorithm is probabilistic: it gives the correct answer with high probability, and the probability of failure can be decreased by repeating the algorithm. Shor's algorithm was demonstrated in 2001 by a group at IBM, which factored 15 into 3 and 5, using a quantum computer with 7 qubits.
ProcedureThe problem we are trying to solve is that, given an integer N, we try to find another integer p between 1 and N that divides N. Shor's algorithm consists of two parts:
Classical part
Quantum part: Period-finding subroutine:
Explanation of the algorithmThe algorithm is composed of two parts. The first part of the algorithm turns the factoring problem into the problem of finding the period of a function, and may be implemented classically. The second part finds the period using the quantum Fourier transform, and is responsible for the quantum speedup. I. Obtaining factors from periodThe integers less than N and coprime with N form a finite group under multiplication modulo N, which is typically denoted (Z/NZ)×. By the end of step 3, we have an integer a in this group. Since the group is finite, a must have a finite order r, the smallest positive integer such that
Therefore, N | (a r - 1). Suppose we are able to obtain r, and it is even. Then r is the smallest positive integer such that a r ≡ 1, so N cannot divide (a r / 2 - 1). If N also does not divide (a r / 2 + 1), then N must have a nontrivial common factor with each of (a r / 2 - 1) and (a r / 2 + 1). Proof: For simplicity, denote (a r / 2 - 1) and (a r / 2 + 1) by u and v respectively. N | uv, so kN = uv for some integer k. Suppose gcd(u, N) = 1; then mu + nN = 1 for some integers m and n (this is a property of the greatest common divisor.) Multiplying both sides by v, we find that mkN + nvN = v, so N | v. By contradiction, gcd(u, N) ≠ 1. By a similar argument, gcd(v, N) ≠ 1. This supplies us with a factorization of N. If N is the product of two primes, this is the only possible factorization. II. Finding the periodShor's period-finding algorithm relies heavily on the ability of a quantum computer to be in many states simultaneously. Physicists call this behaviour a "superposition" of states. To compute the period of a function f, we evaluate the function at all points simultaneously. Quantum physics does not allow us to access all this information directly, though. A measurement will yield only one of all possible values, destroying all others. Therefore we have to carefully transform the superposition to another state that will return the correct answer with high probablity. This is achieved by the quantum Fourier transform. Shor thus had to solve three "implementation" problems. All of them had to be implemented "fast", which means that they can be implemented with a number of quantum gates that is polynomial in logN.
Note: another way to explain Shor's algorithm is by noting that it is just the quantum phase estimation algorithm in disguise. de:Shor-Algorithmus ReferencesPreprint of the original paper by Peter Shor:
A general textbook on quantum computing:
Categories: Quantum algorithms |
|
This article is licensed under the GNU Free Documentation License. It uses material from Wikipedia article. Browse Wikipedia for more information. |