enter image description here

enter image description here

I am simulating the phase shift algorithm on the Quirk platform. Even when the endian-ness of the built-in inverse QFT gate is corrected for, the circuits still output different results. Shouldn't the output be identical?

The bottom circuit seems to be producing the output I would expect from the phase estimation algorithm, I'm not sure what is going on with the top circuit.

I am using Quirk to ensure I am implementing the order finding algorithm correctly, so this result is kind of worrying, since I trust the built in inverse QFT over the one that I made, however, mathematically, I am fairly certain that my circuit is producing the right values.

You have to put an extra SWAP-gate after the QFT, see this circuit.

Furthermore, the two controlled-Z gates on the same qubit are not necessary. This can reduce the circuit further to this.

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.