3
$\begingroup$

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?

$\endgroup$
4
$\begingroup$

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.

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ quantumcomputing.stackexchange.com/questions/8244/…, qiskit.org/textbook/ch-states/atoms-computation.html (e.g., the section on addition in qiskit). For a more technical discussion and the rationale behind it look for the relevant Terra issues and discussions $\endgroup$ – Yehuda Naveh Feb 17 at 0:44
  • 3
    $\begingroup$ Hi @YehudaNaveh! Thanks for your answer. I edited it to make it more self-sufficient: the norm on this stackexchange when you include links is to cite the relevant part also in the answer, just in case the link goes down in the future. If you think that you have more relevant links, do not add them as a comment but rather edit your own answer. $\endgroup$ – Nelimee Feb 17 at 10:27
  • $\begingroup$ Just to be clear, the result shown in the histogram from my original question means $10 \longleftrightarrow [10\rangle \longleftrightarrow [q_1q_0\rangle$. Now since $c_0 = q_0$ and $c_1 = q_1$, Bob received the message $01_2$, as intended. Is that correct? $\endgroup$ – Richard Hensh Feb 17 at 10:50
  • 1
    $\begingroup$ Yes precisely that's the logic $\endgroup$ – Yehuda Naveh Feb 17 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.