2
$\begingroup$

The textbook on Qiskit.org has

When the H-gate is applied to first qubit, it creates superposition and we get the state $|0+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |01\rangle)$

Shouldn't it be: $$|0+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |10\rangle)$$

as explained in some answers here: (How do I apply the Hadamard gate to one qubit in a two-qubit pure state?)

$\endgroup$
1
  • $\begingroup$ Hi and welcome to Quantum Computing SE. Please use TeX notation for math instead of screenshots. $\endgroup$ – Martin Vesely Jan 13 at 8:38
2
$\begingroup$

Qiskit's coding of the qubits is made such that Qiskit's least significant bit has the lowest index (0) and will be written at the right of the state, so instead of writing a qubit like $ |q_0 q_1 ... q_n \rangle $, it will rather be $ |q_n q_{n-1} ... q_0 \rangle $, explaining the difference between the Qiskit explanation and the explanation from the question you pointed. The first qubit is on the far right, so Hadamard will be applied on the one in the far right, thus you have the first result you pointed.

Hope this clears your question, if not please tell me :)

$\endgroup$
2
  • $\begingroup$ Thanks for clarifying. Is there an advantage in having the lowest index for the least significant bit? $\endgroup$ – E-H Jan 12 at 18:58
  • $\begingroup$ You're welcome ! I believe this is to match the bits representation of numbers. They explain it a little bit here, it's called Little Endian :) $\endgroup$ – Lena Jan 13 at 10:43

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.