Superdense Coding: Two Bits over One Qubit with Shared Entanglement

Superdense Coding: Two Bits over One Qubit with Shared Entanglement

Superdense coding uses a shared Bell pair to encode two classical bits into one transmitted qubit. A Qiskit example builds and decodes all four messages.

Superdense coding sounds like a contradiction: Alice sends one qubit, yet Bob recovers two classical bits. The missing resource is shared entanglement. Alice and Bob prepare it before the message is sent, then use it to make one transmitted qubit carry one of four distinguishable messages.

Begin with a shared Bell pair

Assume Alice holds qubit q0 and Bob holds q1 of the Bell state |Phi+> = (|00> + |11>)/sqrt(2). The pair can be prepared with a Hadamard gate on q0 followed by a CNOT from q0 to q1. Bob keeps q1 while Alice encodes her message on q0.

The pre-shared Bell pair matters. Superdense coding does not send two bits through a qubit with no extra resources. It trades an entangled pair prepared in advance, plus one qubit sent from Alice to Bob, for two classical bits of communication.

Alice encodes one of four messages

Write the message as bits a and b. Alice applies one of four Pauli operations to q0:

message 00: do nothing, I
message 01: apply X
message 10: apply Z
message 11: apply Z and then X

These choices turn the shared pair into the four Bell states: Phi+, Psi+, Phi-, and Psi-, respectively. The final state for message 11 may differ by an overall phase depending on how the gates are written, but a global phase cannot change a measurement result. Alice then sends q0 to Bob.

Bob decodes with a Bell-basis measurement

Bob now has both qubits. He applies a CNOT from q0 to q1, then a Hadamard gate to q0. This maps the four Bell states to the four computational basis states. Measuring both qubits reveals Alice’s two bits.

Here is a small Qiskit Aer example that tries all four messages. Qiskit prints classical bit c1 before c0, so the code stores q0 in c1 and q1 in c0. That makes each displayed two-bit string match the original message order a b.

from qiskit import QuantumCircuit, transpile
from qiskit_aer import AerSimulator

simulator = AerSimulator()

def dense_coding_circuit(a, b):
    circuit = QuantumCircuit(2, 2)
    circuit.h(0)
    circuit.cx(0, 1)  # Prepare the shared Bell pair

    if a == 1:
        circuit.z(0)
    if b == 1:
        circuit.x(0)

    circuit.cx(0, 1)  # Bob starts Bell-basis decoding
    circuit.h(0)
    circuit.measure(0, 1)  # q0 -> c1, the first printed bit
    circuit.measure(1, 0)  # q1 -> c0, the second printed bit
    return circuit

for a in (0, 1):
    for b in (0, 1):
        circuit = dense_coding_circuit(a, b)
        compiled = transpile(circuit, simulator)
        result = simulator.run(compiled, shots=100).result()
        print(f"{a}{b} -> {result.get_counts()}")

In an ideal noiseless simulator, each run returns only the encoded key: 00, 01, 10, or 11. On a real device, gate and measurement errors can add other outcomes, but the decoding circuit is unchanged.

What the protocol teaches

Superdense coding makes the role of entanglement concrete. Alice acts locally on her half of a shared pair, but her choice changes which joint Bell state Bob can distinguish after receiving her qubit. The protocol does not allow faster-than-light messaging: Bob cannot read Alice’s choice until the qubit physically reaches him, and establishing the shared pair required resources beforehand.

It is also a useful contrast with quantum teleportation. Both protocols begin with shared entanglement, but teleportation transfers an unknown quantum state using classical bits, while superdense coding sends a classical message by transmitting a qubit. Keeping those directions straight helps explain what entanglement can and cannot do.