Protocols

The Protocols module is where the individual optical components - light sources, beam splitters, detectors, quantum memories, channels - come together into the actual quantum-networking tasks AnuQrana simulates: generating a secret key, distributing entanglement across a city, teleporting a qubit, or producing certified random bits. Each protocol is a small, self-contained multi-party program that drives a specific arrangement of components through a well-defined sequence of pulses, measurements, and classical messages, and reports back the metrics that matter for that task.

This page gives a conceptual map of the eight protocols before you dive into the individual reference pages. If you already know which protocol you want, jump straight to its page from the Reference Pages table at the bottom; if you’re not sure where to start, read on.

What Counts as a “Protocol” Here

A protocol is not a single component - it is an orchestration layered on top of components. Concretely, every protocol in QNS.protocols:

  • is built from the same primitives described in Components (lasers, beam splitters, detectors, channels, and quantum memories where relevant);

  • runs against a shared Timeline and StateManager, so that every party’s view of the quantum state stays consistent as photons and memories evolve;

  • involves two or more logical parties - conventionally named Alice and Bob, with a third party Charlie appearing wherever a Bell-state measurement or relay node is needed; and

  • produces a results dictionary once run() completes, rather than a continuous stream - you configure parameters, click RUN, and read back what happened.

In the interface, every protocol also exposes the same two ways of looking at that arrangement: a Map View, which places Alice, Bob, and (where relevant) Charlie at real geographic locations and draws the channels between them, and a Component View, which shows the underlying optical/electronic block diagram. Both views configure the same underlying parameters - the map is a physical-distance-aware skin on top of the same simulation.

Four Families of Protocols

The eight protocols fall into four functional groups. It’s worth thinking of them this way rather than as an unordered list, because several of them are literally built on top of another:

1. Randomness generation

Quantum Random Number Generator stands alone. A single party sends light through a beam splitter and reads off which detector clicks; no second party, no channel between nodes, no entanglement. It’s the simplest protocol in the module and a good first one to run if you want to see a full configure-run-read cycle without any inter-node complexity.

2. Point-to-point key distribution

QKD-BB84 and QKD-BB84 Post Processing let Alice and Bob agree on a shared secret key by sending polarisation-encoded single photons directly from Alice to Bob and comparing measurement bases afterwards. No entangled pair is needed - only a direct quantum channel and a classical channel for sifting. Cascade adds an interactive error-correction pass on top of plain BB84 sifting. QKD-COW belongs to the same family but encodes each bit in the arrival time of a weak coherent pulse rather than in polarisation, and detects eavesdropping through the coherence between successive pulses instead of through basis reconciliation.

3. Entanglement distribution

Quantum Entanglement BarrettKok is the foundational protocol for everything below it: it generates a shared entangled pair between two quantum memories via a heralding measurement at a central BSM node. EntanglementSwapping runs two Barrett-Kok links back-to-back (Alice-Charlie and Charlie-Bob) and then swaps the entanglement onto the outer pair - the mechanism behind quantum repeaters, letting Alice and Bob share entanglement despite never exchanging a photon directly.

4. Entanglement-enabled communication

Quantum Teleportation and Superdense Protocol both consume an entangled pair generated exactly as in Barrett-Kok, then move information across it in opposite directions: teleportation sends one qubit’s worth of quantum state using two classical bits, while superdense coding sends two classical bits using one physical qubit. If you’re getting unexpected results from either, the first thing to check is the underlying Barrett-Kok link on its own.

That dependency - Barrett-Kok underneath swapping, teleportation, and superdense coding - is the single most useful thing to internalise about this module:

                     Entanglement: Barrett-Kok
                      (shared entangled pair)
                               │
          ┌────────────────────┼────────────────────┐
          │                    │                    │
          ▼                    ▼                    ▼
Entanglement Swapping   Quantum Teleportation   Superdense Coding
(extends the pair       (consumes the pair      (consumes the pair
 across a relay)         to send a qubit)        to send 2 bits)

QKD-BB84, its Cascade variant, QKD-COW, and QRNG sit outside this tree - they don’t need a pre-shared entangled pair at all.

A Typical Simulation Workflow

Regardless of which protocol you’re running, the workflow in the interface follows the same shape:

  1. Open Protocols and select the protocol you want.

  2. Choose Map View or Component View. Map View is usually more intuitive when you care about real-world distance and loss; Component View is more direct when you’re tuning individual device parameters.

  3. Expand each party’s panel (Alice, Bob, and Charlie where present) to configure light sources, memories, and detectors - or leave the near-ideal defaults in place for a first run.

  4. Expand Channel to set link length and attenuation, whether that’s a single Alice→Bob link (QKD, superdense) or several segments feeding a BSM node (Barrett-Kok, swapping, teleportation).

  5. Expand Input Parameters to set the protocol-specific run settings - number of trials/states, simulation time, and anything unique to that protocol (QBER and eavesdropper settings for QKD, the state to teleport for teleportation, the input bits for superdense coding, and so on).

  6. Click RUN ▶ and read the results - a key, a bit sequence, a fidelity, or a success/failure count, depending on the protocol.

The individual reference pages below follow this same run-then-read structure, so once you’re comfortable with one protocol the others should feel familiar.

Overview

Class

Parties

Channels

Role

QKD-BB84

Alice, Bob

Quantum + Classical

Polarisation-encoded BB84 key distribution, with intercept-resend and photon-number-splitting eavesdropping models.

QKD-BB84 Post processing

Alice, Bob

Quantum + Classical

BB84 sifting followed by the Cascade information-reconciliation protocol for interactive error correction.

QKD-COW

Alice, Bob

Quantum + Classical

Coherent One-Way key distribution: bits encoded in the arrival time of weak coherent pulses, with a delay-line interferometer monitoring coherence for eavesdropper detection.

Quantum Entanglement Barrett-Kok

Alice, Bob

Quantum + Classical

Heralded entanglement generation between two remote qubits via the Barrett-Kok fusion scheme. The building block for the three protocols below.

Quantum_Entanglement_Swapping

Alice, Bob, Charlie (relay)

Quantum + Classical

Extends entanglement across an untrusted relay node using a Bell-state measurement.

Quantum Random Number Generator

Single party

Generates certified random bits from beam-splitter measurement statistics.

Quantum Teleportation

Alice, Bob

Quantum + Classical

Transfers an unknown qubit state to a remote party using a pre-shared Bell pair and classical communication.

Superdense Protocol

Alice, Bob

Quantum + Classical

Sends two classical bits over a single qubit using a pre-shared entangled pair.

Reference Pages