4

I'm new to quantum computing, but everything I've read about superdense coding claims that, in the circuit below, Bob should receive a $[01\rangle$ from Alice.

Superdense Coding Circuit(01)

Unfortunately, that's not what I get I run the above circuit in either Qiskit or Circuit Composer. The latter results are shown below.

Superdense coding results (bar graph)

If I replace the Pauli-X gate with a Pauli-Z gate, the outcome is $[01\rangle$. What am I missing?

Martin Vesely
  • 15,244
  • 4
  • 32
  • 75

1 Answers1

4

Bit ordering convention in Qiskit is reversed to what is common in many physics textbooks.

From Qiskit textbook:

The bit we flipped, which comes from qubit 7, lives on the far left of the string. This is because Qiskit numbers the bits in a string from right to left. If this convention seems odd to you, don’t worry. It seems odd to lots of other people too, and some prefer to number their bits the other way around. But this system certainly has its advantages when we are using the bits to represent numbers. Specifically, it means that qubit 7 is telling us about how many 27s we have in our number. So by flipping this bit, we’ve now written the number 128 in our simple 8-bit computer.

You can also have a look at Big Endian vs. Little Endian in Qiskit (question on this stackexchange):

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

Adrien Suau
  • 5,172
  • 22
  • 58
Yehuda Naveh
  • 318
  • 1
  • 5