0
$\begingroup$

The descriptions can be found here:Qiskit Circuit. Where it says: Qiskit Circuit

It really confuses me, because it's very inconvenient to run quantum circuits designed in a classical way in the physics textbook and research papers. Commonly, the top bit is the most significant one.

Why was Qiskit designed this way? (e.g., for faster running?) Is there a method to change this in Qiskit?

$\endgroup$
2

1 Answer 1

1
$\begingroup$

This is related to 'endianess'. In Big Endian, the big end is stored first. IBM system like the Power architecture usually prefer this style. If, for example, you have a hex value 0x1234, on a big endian system you can read the value in a hex dump like:

  12 34 00 00 ...

Vs Little Endian, where the lower end is stored at lower addresses. Intel x86 uses this convention. A hex dump would read:

  34 13 00 00

I'm quantum computing there is general no advantage of one ordering over the other. It also depends on how you enumerate your qubits, top down or bottom up. You can always interpret a quantum state as a binary integer or binary fraction in any direction, depending on how you coded up the rest of the circuit. I think this is just a convention and as with any convention, as long as it used consistently, it is goodness.

$\endgroup$
1
  • $\begingroup$ Thank you so much, Hundt. I thought it may have some relation with the fundamental hardware, and now it's confirmed. $\endgroup$ Feb 12, 2023 at 4:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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