# Big Endian vs. Little Endian in Qiskit

I've noticed that Q# favors Little Endian. Meaning that most operations are designed for this type of encoding. Is is it the same with Qiskit?

Qiskit uses little-endian for both classical bit ordering and qubit ordering.

For classical bits:

A 3-bit classical register creg with value abc has creg=c, creg=b, creg=a.

For qubits:

The ordering is with respect to the tensor-product structure of the state space. So a 3-qubit quantum register qreg with wave-function $$|\psi\rangle = |A\otimes B\otimes C\rangle = |ABC\rangle$$ has qreg$$= |C\rangle$$, qreg$$= |B\rangle$$, qreg$$= |A\rangle$$.

Similarly for representing unitary matrices of a circuit. $$U = U_A \otimes U_B \otimes U_C = U_A U_B U_C$$ would have $$U_C$$ acting on qreg, $$U_B$$ acting on qreg and $$U_A$$ acting on qreg.

Note that the bits are labelled from right to left. So cr is the one to the furthest right, and so on. As an example of this, here's an 8 qubit circuit with a Pauli X on only the qubit numbered 7, which has its output stored to the bit numbered 7.

https://qiskit.org/textbook/ch-appendix/qiskit.html