mqt.bench.benchmarks.superdense_coding

Superdense Coding benchmark definition.

Module Contents

create_circuit(num_qubits: int, message: str | None = None) → QuantumCircuit[source]

Encode a classical message by superdense coding with a shared GHZ state.

Alice encodes the message on her first num_qubits - 1 qubits and sends them to Bob. Bob applies the inverse GHZ preparation and measures all qubits. For two qubits this is the Bennett-Wiesner protocol. For the multipartite construction see Bose, Vedral & Knight (1998), Phys. Rev. A 57, 822, Hao et al. (2001), Phys. Rev. A 63, 054301, and Hillebrand (2012), https://arxiv.org/abs/1210.0650, Sec. 3.6.

Parameters:
  • num_qubits – Total width of the shared GHZ state. Must be at least 2.

  • message – Binary string of length num_qubits. Defaults to all ones.

Returns:

A circuit that recovers the message in the ideal measurement of c. The rightmost character maps to classical bit zero.