1
$\begingroup$

enter image description here

In the circuit, the CNOT gate is applied in 11 state and it should transform into 10 state. But why is the probability of getting 01 state 100 percent?

$\endgroup$
1
  • $\begingroup$ Actually, the second digit of the bat plot refers to q0, the result is correct, it's just a little weird. $\endgroup$ – Yitian Wang Nov 21 '20 at 3:35
1
$\begingroup$

You are right, that $CNOT |11\rangle = |10\rangle $ in the usual setting. But the reason why you see the answer as $|01\rangle$ instead is because Qiskit uses little endian convention.

See this documentation to clear thing up.

$\endgroup$

Your Answer

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

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