This circuit was created on the Quirk platform. I'm trying to implement a basic case of phase estimation. For some reason, I'm getting this strange result.

enter image description here

When the Inverse QFT is broken down, it seems to yield the expected answer:

enter image description here

I have no idea why this is happening. I tried playing around with the endian-ness of the qubits, but it didn't seem to work.

The endian-ness of the qubits is the answer. Both QFT and phase estimation rely on certain endianness of the register, and the representations used in the controlled-unitary part has to match the endianness used in the QFT part (and in the answer). This circuit produces the expected outcome with the inverse QFT block:

enter image description here

  • But why am I getting this result? I am trying to implement the phase estimation algorithm, and this doesn't seem to be the expected outcome of this circuit. – Jack Ceroni Dec 5 at 21:03
  • Additionally, when I try to flip the circuit to correct for the endian-ness on the preprogrammed inverse qft circuit, it doesn’t work. – Jack Ceroni Dec 5 at 21:52
  • Except the outputted result from that circuit is $|10\rangle$, while the expected output is $|01\rangle$. Why does that happen? – Jack Ceroni Dec 5 at 21:55
  • Is it simply dependent on how the endian-ness of the qubits is initialized? – Jack Ceroni Dec 5 at 22:29
  • 1
    @JackCeroni In Quirk, the top qubit is the least significant qubit. You might be assuming that the bottom qubit is the least significant? – Craig Gidney Dec 6 at 13:07

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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