0

I'm using python qiskit==0.36.2.
The following code:

sv = Statevector.from_label('00')
mycircuit = QuantumCircuit(2)
mycircuit.h(0)
sv = sv.evolve(Operator(mycircuit))
print(sv.data)

Yeilds: [0.70710678+0.j 0.70710678+0.j 0. +0.j 0. +0.j]
Which doesn't make sense, because Hadamard on the first qubit (qubit 0) should be equal to $1/\sqrt(2)(|00\rangle+|10\rangle)$ yet the output I get corresponds to $1/\sqrt(2)(|00\rangle+|01\rangle)$.

I'm confused as to why this happens.
Thank you.

1 Answers1

1

This is because Qiskit uses little-endian[1] for bit ordering. So, $|01\rangle$ means that first qubit in the state $|1\rangle$ and second qubit in the state $|0\rangle$.

For more details see the answers here, here, and here.

Egretta.Thula
  • 9,972
  • 1
  • 11
  • 30