Quantum Fourier Transform
In this tutorial, some circuits are constructed with the controlled_on
option. This is the
experimental multi-controlled circuit feature, which is not yet released in the latest version of QURI Parts.
Starting from this section, we demonstrate how to use QURI Parts to implement several algorithms containing quantum Fourier transform. We will cover:
- Period finding
- Phase estimation algorithm
- The Shor's algorithm
So, in this section, we first illustrate how to use QURI Parts to build the circuit for performing quantum Fourier transform.
The purpose of this section is two fold:
- Introduce how multi-controlled gate feature is used in practice.
- Fix the convention of quantum Fourier transform.
Quick review of the quantum Fourier transform
The quantum Fourier transform is defined by the following operation:
where is the number of qubits. Written in terms of binary number notation, the above equation becomes:
where and .
The last line of eq.(2) gives a convenient form where the circuit representation of the operation can be read out straightforwardly. In our convention where the 0th qubit is positioned at the most right hand side, we need to first apply multiple SWAP gates to invert the order of the qubits: