I have a question about the notation of QFT. I would like to present briefly what my problem is. So given is the QFT as a mapping with:

$$|j_1,...,j_n\rangle \rightarrow \frac{(|0\rangle + e^{2\pi i 0.j_n}|1\rangle)(|0\rangle + e^{2\pi i0.j_{n-1}j_n}|1\rangle)...(|0\rangle + e^{2\pi i 0.j_1j_2 ... j_n}|1\rangle)}{\sqrt{2^n}} \quad\quad\text{eq.1}$$

Based on this notation, I would number the individual qubits as follows:

$$|j_1,...,j_n\rangle = \overbrace{|j_1\rangle}^{\text{Qubit 1}}\overbrace{|j_2\rangle}^{\text{Qubit 2}}...\overbrace{|j_n\rangle}^{\text{Qubit $n$}} \rightarrow \frac{\overbrace{(|0\rangle + e^{2\pi i0.j_n}|1\rangle)}^{\text{Qubit 1}}\overbrace{(|0\rangle + e^{2\pi i0.j_{n-1}j_n}|1\rangle)}^{\text{Qubit 2}}...\overbrace{(|0\rangle + e^{2\pi i0.j_1j_2 ... j_n}|1\rangle)}^{\text{Qubit $n$}}}{\sqrt{2^n}}$$

If what I said before is correct, I am a bit confused about the following statement I read in "Physics 191 Lecture, Fall 14", there it says:

Lets take the $l$th qubit, $|j_l\rangle$. According to eq. (2) above. this needs to be transformed from $|j_l\rangle$ into the state $$\frac{1}{\sqrt{2}}(|0\rangle + e^{2\pi i0.j_l ... j_n}|1\rangle)$$

A few words regarding the quote:

  • What is described in the quote as equation 2 corresponds to my first equation here eq.1 (the mapping).

Let's assume a very simple setup, say we have two qubits $|1_{1}0_{2}\rangle$ (Indices explicitly added) that we want to transform with QFT. According to the quote, however, I would get the following result:

Let's just look at the first qubit $l = 1$ then (QFT on first Qubit):

$$|1\rangle \rightarrow \frac{1}{\sqrt{2}}(|0\rangle + e^{2\pi i0.j_1 ... j_2}|1\rangle) = \frac{1}{\sqrt{2}}(|0\rangle + e^{2\pi i0.10}|1\rangle)$$

Second qubit $l = 2$ then (QFT on second Qubit):

$$|0\rangle \rightarrow \frac{1}{\sqrt{2}}(|0\rangle + e^{2\pi i0.j_2}|1\rangle) = \frac{1}{\sqrt{2}}(|0\rangle + e^{2\pi i0.0}|1\rangle)$$

But then this does not correspond to what I marked/interpreted above as qubit 1 and 2.

In my opinion, however, the first and second qubit should be displayed like this:

$$|10\rangle = \overbrace{|1\rangle}^{\text{Qubit 1}}\overbrace{|0\rangle}^{\text{Qubit 2}} \rightarrow \frac{\overbrace{(|0\rangle + e^{2\pi i0.0}|1\rangle)}^{\text{Qubit 1}}\overbrace{(|0\rangle + e^{2\pi i0.10}|1\rangle)}^{\text{Qubit 2}}}{\sqrt{2^2}}$$

My question now is, what is correct here? It may also be that my interpretation and numbering of the qubits is wrong?

I know that the question may go into great detail, but hope to have expressed myself understandably here :)

  • 4
    $\begingroup$ The answer might have to do with the fact that after QFT the registers come out inverted in order. $\endgroup$
    – Pablo
    Oct 20, 2021 at 17:08
  • $\begingroup$ @Pablo that was my guess too. I think that is meant to rotate eq.1 and argue from that and generate the circuit (After the citation, this is done in the text then also in such a way). Then at the end you would claim to rotate what you generated again to get to the original version of eq.1. In this sense, then, the mapping of the $l$-th qubit, as in the quote, also makes sense. $\endgroup$
    – P_Gate
    Oct 21, 2021 at 8:39

1 Answer 1


You are missing the fact that after applying all the Hadamard gates and Rotation Gates, Swap Gates are used. As shown below: enter image description here

Now, QFT$|j_1j_2...j_n\rangle=\frac{1}{\sqrt(2^n)}((|0\rangle+e^{2\pi i0.j_n})(|0\rangle+e^{2\pi i0.j_{n-1}j_n})...(|0\rangle+e^{2\pi i0.j_1j_2...j_n}))$, if you apply the swap gates also.

Now, if you don't apply swap gates then you end up getting for the $l^{th}$ state as,

$|j_l\rangle = |0\rangle+e^{2\pi i0.j_l...j_n}|1\rangle$, of course normalized state.

  • $\begingroup$ This goes in the direction of my comment above. I think this has didactic reasons (Why this was done in the source). If the mapping is defined like this $|j_l\rangle = |0\rangle+e^{2\pi i0.j_l...j_n}|1\rangle$ you get the equation, which then has to be rotated to get the right output. But the derivation is easier to show if you use the mapping like this. Then at the end one says add swap gates and you have reached the appropriate state. Finally I would agree with your statement. $\endgroup$
    – P_Gate
    Oct 23, 2021 at 8:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.