|
For these two circuits:
Why does qcec.verify(qr,qr_shuffled)return I thought gate order didn't matter in quantum circuits, as unitary operations are involved here, no? |
Answered by
Geremia
Jun 20, 2026
Replies: 2 comments
|
Well, because they are not equivalent. |
0 replies
0 replies
Answer selected by
Geremia
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment




Gate order does matter.
What you seem to want to be testing is whether quantum circuits are reversible.
For example, for this circuit:
Simulating this circuit with its reversed circuit appended:
produces a result of 100% in the$|0001\rangle$ state, proving it's reversible.