I am currently studying Qiskit.
I don't understand the two pictures below while studying.
When I apply circuit.x(1), the X gate should be applied to the second qubit, resulting in the state |01>. However, I don't understand why I'm getting |10> instead. What could be the issue?
I posted a question and upon reflection, it seems that in Qiskit, the statevector ordering is such that when denoting the first qubit as q1 and the second qubit as q2, the output is in the form |q2q1>. To test this, I used an arbitrary controlled unitary gate.
If the ordering is opposite to most textbooks, and assuming circuit.x(1) flips the second qubit to 1, independent of ordering, the controlled unitary gate shouldn't operate because the state |q2q1> would be |10>. However, it seems to operate in this case. Is it correct to assume in Qiskit that if the leftmost bit of the statevector is 1, the controlled U gate operates, regardless of which qubit had the x gate applied?