There are some special vectors, called eigenvectors, where applying the X gate results in the exact same vector, multiplied by a by a number called an eigenvector. For example, ∣+⟩ is an eigenvector of the X gate.
X∣+⟩=(0110)(2121)=(2121)=∣+⟩
The goal of phase estiamtion is:
Given a unitary matrix U and an eigenvector ∣ψ⟩, find ϕ such that U∣ψ⟩=eiϕ∣ψ⟩
Represnting the phase From binary number to decimal number:
where a and N are positve integers, a is less than N, and they have no common factors. The period, or order(r), is the Smallest (non zero) integer such that:
armodN=1
Shor's solution was to use quantum phase estimation on the unitary operator:
U∣y⟩≡∣aymodN⟩
Shor's Algorithm in quantum circuit
Measurement outcome
Upper register m: outputs binary number to find r
Lower register: n: outputs outcome of fa,N
m: outcome M: number of qubits in upper register
rk=2Mm
Quantum states during the circuit
∣ψ0⟩=∣0m,0n⟩
∣ψ1⟩=2m∑x∈{0,1}m∣x,0n⟩
∣ψ2⟩=2m∑x∈{0,1}m∣x,axMod N⟩
·
∣ψ3⟩=⌊r2m⌋∑j=02m/r−1∣t0+jr,axˉModN⟩
Example For N = 15, we will have n = 4 and m = 8. For a = 13, the state ∣ψ2⟩ will be