Skip to main content

Module superdense

Module superdense 

Source
Expand description

Superdense coding.

Superdense coding is the dual of teleportation: it transmits two classical bits by sending a single qubit, given a pre-shared Bell pair. Alice encodes the two-bit message (b0, b1) into her half of the pair using one of four Pauli operations, sends that one qubit to Bob, and Bob recovers both bits by a Bell-basis measurement on the (now reunited) two qubits.

Qubit layout (little-endian, two qubits):

  • qubit 0 — Alice’s half of the Bell pair (the qubit she physically sends).
  • qubit 1 — Bob’s half of the Bell pair.

Protocol:

  1. Share the Bell pair |Φ⁺⟩ = (|00⟩ + |11⟩)/√2 via H₀ · CNOT₀→₁.
  2. Alice’s encoding on qubit 0, indexed by (b0, b1): (0,0) → I, (0,1) → X, (1,0) → Z, (1,1) → ZX (i.e. iY up to phase), mapping |Φ⁺⟩ onto the four orthogonal Bell states.
  3. Bob decodes with the inverse Bell circuit CNOT₀→₁ · H₀, then reads the two computational-basis bits, recovering (b0, b1) deterministically.

Structs§

SuperdenseResult
Outcome of superdense_decode.

Functions§

superdense_decode
Run the full superdense-coding round-trip for the message (b0, b1).