I simulated the circuit below in qiskit and used the statevector simulator to extract the statevector: The resulting statevector that it gave me was:

array([ 0.5+0.j, -0.5+0.j, 0.5+0.j, 0.5+0.j])

The problem here is that it is assigning a minus sign to the second component which is for the state |01>, while it should actually assign the minus sign to the third component, which is for the state |10>, so I was expecting to get instead:

array([ 0.5+0.j, 0.5+0.j, -0.5+0.j, 0.5+0.j])

Can anyone help to clarify this. I was using qiskit for statevector simulation and need to check this.

Thanks,

C. Pedro

• When I work out the math, I get the statevector with the negative being in $|01\rangle$ component. Your confusion may be caused by the qubit ordering in Qiskit. Qiskit uses a LSB ordering, meaning the first qubit is all the way to the right. For example, a state of $|01\rangle$ would mean the first qubit is 1 and the second qubit is 0. Jul 22 '19 at 20:06
• What is the initial state of the qubits?
– Aman
Jul 22 '19 at 20:10
• Thanks, @MatthewStypulkoski that's it, I was working with the reverse ordering, first qubit all the way to the left, and so on. The initial state Aman was |00>. Jul 22 '19 at 21:00