Why Are Swap Gates Used in Quantum Fourier Transform Circuits?

Click For Summary

Discussion Overview

The discussion revolves around the use of swap gates in Quantum Fourier Transform (QFT) circuits, specifically addressing the reasons for their inclusion in the circuit design as presented in Nielsen & Chuang's work. Participants explore the implications of qubit order in relation to endian-ness and its effect on frequency representation.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • Some participants explain that swap gates are used to reverse the order of qubits in the QFT output to align with conventional definitions of the discrete Fourier transform.
  • It is proposed that the use of swap gates helps maintain consistency in endian-ness, which is important for interpreting the output frequencies correctly.
  • One participant mentions that the amplitude of the state 10010 corresponds to a specific frequency, suggesting that the output qubit order affects frequency interpretation.
  • Another participant questions the frequency representation, suggesting a correction from 7/N to 9/N based on the reversed qubit order.
  • A participant acknowledges a mistake regarding the frequency representation, indicating an ongoing refinement of understanding.

Areas of Agreement / Disagreement

Participants generally agree on the role of swap gates in addressing endian-ness in QFT circuits, but there is some disagreement regarding the specific frequency representations associated with qubit states, indicating unresolved aspects of the discussion.

Contextual Notes

The discussion includes potential confusion regarding the correct frequency values associated with specific qubit states, highlighting the need for clarity in definitions and interpretations of output in QFT circuits.

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   Reactions: 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.
 

Similar threads

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