# Qiskit qubit ordering

In their to_ising documantation page, Qiskit devs mark the comment:

Variables are mapped to qubits in the same order, i.e., $$i$$-th variable is mapped to $$i$$-th qubit.

I'm aware that Qiskit follows little endian, the rightmost bit being the least significant, but still a bit confused about the statement.

Suppose an example Ising Hamiltonian generated with to_ising:

...
+ 0.12072225349199095 * IIIIIZ
...


If I want to build a circuit with it, on which qubit should I apply the $$Z$$-gate? My initial guess was q[5](the bottommost qubit in the circuit), since the comment states that they're in the same order, but automatically building the circuit with the Hamiltonian and QAOAAnsatz shows it mirrored, i.e. $$Z$$ applied to q[0](the uppermost in the circuit).

Is that corresponding to what's intended, or am I missing something?

Using little-endian ordering implies that if $$A$$ and $$B$$ are two operators, then $$B \otimes A$$ means: apply $$A$$ to first qubit and $$B$$ to second qubit.
So, while in most quantum computing textbooks the bitstring $$011$$ means that the first bit equals zero, in Qiskit it will mean that the last bit equals zero. Similary, the Pauli string $$XYZ$$ will be written in Qiskit as $$ZYX$$.
Hence, in your case you should apply $$Z$$ operator to the first qubit (i.e., q[0])