-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QFT-Issue] Quantum Fourier Transform needs SWAP gates. #1
Comments
AQS uses Big Endian for the order of quantum registers/qubits. After the QFT algorithm implemented is run, it modifies the state of the quantum computer in such a way that in the Fourier basis, the first qubit just stores its own value in its rotation (the least significant amount of information), while the last qubit encodes the values of all the other qubit in its rotation (the most significant amount of information). You can observe this fact in the representation of the Fourier Basis using qubits in the link you provided. In the qubit The reason for our QFT not having SWAPs is to keep it consistent with the endianness of our implementation. If you want to change to Little Endian, you may do so by adding the SWAP gates. |
To complete the algorithm it's necessary to apply a SWAP gate between pairs of qubits after all the H and CPhase gate.
You will find more information explained in the next link:
https://qiskit.org/textbook/ch-algorithms/quantum-fourier-transform.html
The text was updated successfully, but these errors were encountered: