Let's consider two qubits and the corresponding computational basis $\{|0\rangle\, |1\rangle, |2\rangle, |3\rangle\}$. In binary form, any of these vectors can also be written as a product $|x_1\rangle\otimes |x_2\rangle$ where $x_1$ and $x_2$ can be either $0$ or $1$. Let's take these two qubits and perform the following operation on them: $$|y\rangle=(H\otimes \mathbb I)(CR_2)(\mathbb I\otimes H)|x_1x_2\rangle=\frac{1}{2}(|0\rangle+e^{2\pi ix_2/2^2}e^{2\pi ix_1/2}|1\rangle)\otimes(|0\rangle+e^{2\pi ix_2/2}|1\rangle) $$where $H$ is the Hadamard gate and $R_2$ is the $2\times 2$ diagonal matrix $[1, e^{2\pi i/2^k}]$. Looking at that first exponential, if $x=x_1x_2$, then in decimal $x=2x_1+x_2$, which means that $$|y\rangle=\frac{1}{2}(|0\rangle+e^{2\pi i x_1/2^2}|1\rangle)\otimes (|0\rangle+e^{2\pi i x_2/2}|1\rangle)\tag 1$$ which is to be compared to the QFT of $|x\rangle$

$$|\tilde x\rangle=\frac{1}{2}(|0\rangle+e^{2\pi i x/2}|1\rangle)\otimes (|0\rangle+e^{2\pi ix/2^2}|1\rangle).\tag 2$$ These two are supposed to be the same thing, only with qubits in reversed order. However, something seems remiss to me: the second factor in $|y\rangle$ has $x_2/2$ in the exponential, while the first factor of $|\tilde x\rangle$ has $x/2$. Am I being colossally blind, or is there a mistake somewhere?

  • $\begingroup$ Should it be $|y\rangle=\frac{1}{2}(|0\rangle+e^{2\pi i x_1/2^2}|1\rangle)\otimes (|0\rangle+e^{2\pi i x_2/2}|1\rangle)$? I think, as you hinted, you just had an endianness convention issue. The qubits are in the reverse order, aren't they? $\endgroup$
    – Mark S
    May 8 at 23:55
  • $\begingroup$ @MarkS Well, yeah, I'm just comparing that $e^{2\pi i x_2/2}$ in $|y\rangle$ with the $e^{2\pi i x/2}$ in $|\tilde x\rangle$. Since $x\ne x_2$, doesn't that difference mean that $|y\rangle\ne |\tilde x\rangle$? $\endgroup$ May 9 at 18:21
  • $\begingroup$ $x$ is two qubits (or one qudit, with $d=4$), while $x_2$ is a single qubit, right? $\endgroup$
    – Mark S
    May 9 at 18:25
  • $\begingroup$ I just made a change to equation 1 - let me know if that's correct? $\endgroup$
    – Mark S
    May 9 at 18:27


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.