Setup
The input consists of two registers (namely, two parts): the upper qubits comprise the first register, and the lower qubits are the second register.
The initial state of the system is:
After applying n-bit Hadamard gate operation on the first register, the state becomes:
- .
Let be a unitary operator with eigenvector such that . Thus,
- .
Overall, the transformation implemented on the two registers by the controlled gates applying is
This can be seen by the decomposition of into its bitstring and binary representation , where . Clearly, becomes
Each will only apply if the qubit is , implying that it is controlled by that bit. Therefore the overall transformation to is equivalent to the controlled gates from each -th qubit.
Therefore, the state will be transformed by the controlled gates like so:
At this point, the second register with the eigenvector is not needed. It can be reused again in another run of phase estimation. The state without is