2

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?

Sanchayan Dutta
  • 17,497
  • 7
  • 48
  • 110
Patrice
  • 73
  • 4

1 Answers1

1

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[0], q[1], q[2],...).

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.

Sanchayan Dutta
  • 17,497
  • 7
  • 48
  • 110
  • 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 09 '19 at 06:38