Recently I was learning about QFT(Quantum Fourier Transform). I was learning how QFT is applied with H and cROT gates. I was playing with QFT here. I was testing with 3-Qubit set as you can see in the link. The expression used for calculating is
Note:-$[0.x_1x_2x_3...x_n] = \sum_{i=1} ^n x_i2^{-i} $.
I got the above expression from here
As you can see from the link given above I was doing QFT on |100>, which should yield a phase of $0$ or $2\pi$ (first qubit)(calculated from the above expression) but from the simulator it is showing phase f $\pi/4$. I also did the same simulation on Qiskit, i got the same Bloch representation, the same phase for the first Qubit $\pi/4$. Now my question is why the difference? Why the difference between calculated phase and the Bloch representation in the simulators? Please help!!
1 Answer
I think this is an issue of endianness of input. The Wikipedia article follows Nielsen & Chuang convention which assumes that both input and output are in big endian: the top wire has the most significant bit of the number. You can see the manually implemented circuit and the corresponding amplitudes - the phase is non-zero only on the 3rd qubit, $|0\rangle + e^{2\pi i [0.100]}|1\rangle$.
The library implementation in Quirk uses little-endian notation, so it's processing an input $|001\rangle$, and the phases of all three qubits are non-zero.
-
$\begingroup$ Yeah, i found out about the convention few minutes back. I was testing with |001> and |100> and found it. $\endgroup$ May 25, 2020 at 19:44