Input. A unitary on a target register, given through controlled applications; a target state ; the number of control qubits. Write .
Procedure.
- Prepare the control register in and apply , giving .
- For , apply controlled- with control the control qubit of weight (qubit in the big-endian convention) and target the target register.
- Apply the inverse QFT to the control register.
- Measure the control register in the computational basis, obtaining an integer , and output .
Why it works. If the target is an eigenvector, controlled- leaves it unchanged and multiplies the component of its control by (phase kickback). After step 2 the registers are
If is an integer , this control state is exactly , so step 3 returns and the output is exact. Otherwise the outcome distribution is the phase estimation kernel, concentrated near ; its accuracy is quantified in the accuracy theorem.
Superpositions. If the target is with , the eigenvectors are orthogonal, so the outcome distribution is the mixture with weights of the distributions for each . After outcome the target is proportional to , where is the amplitude of for a single eigenphase; it is close to one eigenvector when the eigenphases are separated by much more than .
Cost. Hadamards, one inverse QFT on qubits ( gates, or fewer approximately), and controlled powers amounting to controlled applications of when each power is implemented by repetition. When can be implemented directly at lower cost, as for modular multiplication in Shor's algorithm, the cost is much smaller.
The eigenvalue-measurement idea is due to Kitaev; the form with an inverse QFT is that of Cleve, Ekert, Macchiavello and Mosca, and section 5.2 of Nielsen and Chuang is a textbook account.