Why Are Swap Gates Used in Quantum Fourier Transform Circuits?

Click For Summary
Swap gates are utilized in Quantum Fourier Transform (QFT) circuits to reorder qubits, addressing the output's reverse order compared to typical expectations. This reordering transitions between big-endian and little-endian representations, ensuring that the amplitude of a state like 10010 corresponds correctly to the desired frequency. Maintaining this endian consistency simplifies the interpretation of QFT results, aligning them with the conventional definition of the discrete Fourier transform. The discussion clarifies that while the qubits can remain in their swapped order, doing so enhances understanding. Ultimately, the use of swap gates is crucial for accurate frequency representation in quantum computations.
jimmycricket
Messages
115
Reaction score
2
I'm currently working through Nielsen & Chuang's section on the circuit design for implementing the QFT. I'm confused as to why swap gates are used in the model to swap the order of qubits. Heres what I'm looking at http://www.johnboccio.com/research/quantum/notes/QC10th.pdf page 247 figure 5.1
Can anybody help?
 
Last edited by a moderator:
Physics news on Phys.org
jimmycricket said:
I'm currently working through Nielsen & Chuang's section on the circuit design for implementing the QFT. I'm confused as to why swap gates are used in the model to swap the order of qubits. Heres what I'm looking at http://www.johnboccio.com/research/quantum/notes/QC10th.pdf page 247 figure 5.1
Can anybody help?

Here's a blog post about the QFT with some puzzles in a circuit simulator.

The basic reason is that the QFT's output has the qubits in the reverse order of what you typically want. It switches you from big-endian bits to little-endian bits (or vice versa), so that the amplitude of the state 10010 corresponds to the 7/N frequency instead of the 18/N frequency (or vice-versa).

You don't have to swap them back into the right order, it just makes it easier to think about the QFT when used as a tool because you're keeping the endian-ness consistent. It makes the result match the usual definition of the discrete Fourier transform, where F(1) corresponds to the lowest non-zero frequency (instead of what F(N-1) corresponds to).
 
Last edited by a moderator:
  • Like
Likes jimmycricket
Strilanc said:
Here's a blog post about the QFT with some puzzles in a circuit simulator.

The basic reason is that the QFT's output has the qubits in the reverse order of what you typically want. It switches you from big-endian bits to little-endian bits (or vice versa), so that the amplitude of the state 10010 corresponds to the 7/N frequency instead of the 18/N frequency (or vice-versa).

You don't have to swap them back into the right order, it just makes it easier to think about the QFT when used as a tool because you're keeping the endian-ness consistent. It makes the result match the usual definition of the discrete Fourier transform, where F(1) corresponds to the lowest non-zero frequency (instead of what F(N-1) corresponds to).

Thats cleared that up, Thanks
 
Strilanc said:
Here's a blog post about the QFT with some puzzles in a circuit simulator.

The basic reason is that the QFT's output has the qubits in the reverse order of what you typically want. It switches you from big-endian bits to little-endian bits (or vice versa), so that the amplitude of the state 10010 corresponds to the 7/N frequency instead of the 18/N frequency (or vice-versa).
Do you mean the 9/N frequency not 7/N. Am I right in saying the qubits in your example reversed would read 01001=9?
 
jimmycricket said:
Do you mean the 9/N frequency not 7/N. Am I right in saying the qubits in your example reversed would read 01001=9?

Yeah, my mistake.
 
Time reversal invariant Hamiltonians must satisfy ##[H,\Theta]=0## where ##\Theta## is time reversal operator. However, in some texts (for example see Many-body Quantum Theory in Condensed Matter Physics an introduction, HENRIK BRUUS and KARSTEN FLENSBERG, Corrected version: 14 January 2016, section 7.1.4) the time reversal invariant condition is introduced as ##H=H^*##. How these two conditions are identical?

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 2 ·
Replies
2
Views
6K