# Is IBM Q composer using little-endian representation for multi-qubit states?

I am still confused when I am trying to use the IBM Q composer to reproduce some quantum circuits I found in different papers, and I am wondering if it is because there are two ways to represent a multi-qubit state in a quantum circuit.

The multi-qubit state $$|xy\rangle$$ can be represented in a quantum circuit by

1. putting the $$|x\rangle$$ qubit (left) on top, and the $$|y\rangle$$ one below, or by
2. putting the $$|y\rangle$$ qubit (right) on top, and the $$|x\rangle$$ one below.

Is that correct?

1. The convention of putting on top of the circuit the qubit that is the furthest to the left on the state, is called big-endian, while
2. The convention of putting on top of the circuit the qubit that is the furthest to the right on the state, is called little-endian.

Is that correct?

IBM Q composer is putting the on top of the circuit the qubit that is the furthest to the right on the state, meaning it is using the little-endian representation of multi-qubit states.

Is that correct?

IBM Q Experience and Qiskit both use the little-endian format.

The multi-qubit state $$|xy\rangle$$ can be represented in a quantum circuit by

1. putting the $$|x\rangle$$ qubit (left) on top, and the $$|y\rangle$$ one below, or by
2. putting the $$|y\rangle$$ qubit (right) on top, and the $$|x\rangle$$ one below.

Is that correct?

Yes. The IBM Q Composer uses convention 1.

1. The convention of putting on top of the circuit the qubit that is the furthest to the left on the state, is called big-endian, while
2. The convention of putting on top of the circuit the qubit that is the furthest to the right on the state, is called little-endian.

Is that correct?

Yes. The point being that the qubits are numbered starting from the top (i.e., q, q, q,...).

IBM Q composer is putting the on top of the circuit the qubit that is the furthest to the right on the state, meaning it is using the little-endian representation of multi-qubit states.

Is that correct?

Correct.

• Many thanks @Sanchayan for answering directly (and clearly) my questions, in addition of pointing to a related question/answer. I had seen it, but as a newcomer I was (am still) not 100% sure about the relationship between IBM Q Composer and Qiskit. As a newcomer, I can also tell that this is quite confusing when trying to compare two circuits that are using different convention! Do you know about any initiatives trying to standardize that, or at least proposing a way to clearly indicate which convention is used. – Patrice Oct 9 '19 at 6:38