Shor's Algorithm - From Factoring to Period Finding
Explore Shor's Algorithm to learn how quantum computing tackles the problem of integer factorization by reducing it to period finding. Understand the use of modular exponentiation, superposition, and Quantum Phase Estimation to efficiently find non-trivial square roots and factors of large numbers. This lesson bridges classical concepts and quantum advantages to provide a strong foundation for implementing Shor's algorithm.
As a refresher, when we want to factor an integer , we want to find the non-trivial square root of the congruence . Then we feed the obtained into an efficient algorithm that calculates the greatest common divisor of two numbers to obtain two factors of with . Now, the agenda of this lesson is to find . So, let’s get started.
Let’s revisit our problem from the previous lesson. We want to factor . Let’s pick an at random, where . The inequality exists as we are not interested in obtaining or itself as its own factor, defeating the purpose of our original problem. Let’s say we pick . Now, we create a table with two columns and multiple rows. In the first column, we have , which is the number to which we shall be raising . In the second column, we have a function , which shows us the remainder we get after raising to that and then dividing it by .