Protocols
Three higher-level quantum networking protocols available as both engine methods and module-level convenience functions.
QKD (Quantum Key Distribution)
BB84-style protocol for secure key exchange between two nodes.
QKDParameters
| Field | Type | Default | Description |
|---|---|---|---|
from_node | str | — | Source node ID |
to_node | str | — | Destination node ID |
fidelity_target | float | — | Required entanglement fidelity |
max_latency_ms | float | — | Maximum allowed latency (ms) |
rounds | int | 100 | Number of QKD rounds |
error_rate_tolerance | float | 0.11 | BB84 error threshold |
sifting_overhead_ratio | float | 0.5 | Public sifting overhead |
privacy_amplification_factor | float | 0.8 | Privacy amplification factor |
QKDResult
| Field | Type | Description |
|---|---|---|
success | bool | Whether secure key was established |
secret_key_length_bits | int | Length of generated secret key (bits) |
efficiency_rate | float | Key generation efficiency [0, 1] |
qber | float | Quantum bit error rate |
latency_ms | float | Total protocol latency (ms) |
execution_path | List[str] | Node IDs traversed |
rounds_completed | int | Number of successful rounds |
rounds_failed | int | Number of failed rounds |
QKDStats (Monte Carlo ensemble)
Note: Monte Carlo ensemble for QKD is planned but not yet implemented.
run_qkd()currently returns a singleQKDResult.
| Field | Type | Description |
|---|---|---|
total_runs | int | Number of QKD runs executed |
success_rate | float | Fraction of successful runs [0, 1] |
mean_key_length_bits | float | Mean secret key length (bits) |
mean_efficiency | float | Mean key generation efficiency |
mean_qber | float | Mean quantum bit error rate |
Teleportation
Entanglement-based quantum state teleportation across the network.
TeleportationParameters
| Field | Type | Default | Description |
|---|---|---|---|
source_node | str | — | Source node (Alice) |
target_node | str | — | Target node (Bob) |
state_fidelity | float | 0.95 | Input state fidelity |
classical_bandwidth_ms | float | 100.0 | Classical channel latency (ms) |
relay_nodes | List[str] | [] | Intermediate relay node IDs |
TeleportationOutcome
| Field | Type | Description |
|---|---|---|
success | bool | Whether teleportation succeeded |
teleportation_fidelity | float | Fidelity of teleported state |
resource_entanglement_fidelity | float | Fidelity of resource entanglement links |
latency_ms | float | End-to-end latency (ms) |
path | List[str] | Node IDs traversed |
classical_bits_transferred | int | Number of classical bits sent |
TeleportationStats (Monte Carlo ensemble)
Note: Monte Carlo ensemble for teleportation is planned but not yet implemented.
execute_teleportation()currently returns a singleTeleportationOutcome.
| Field | Type | Description |
|---|---|---|
total_runs | int | Number of teleportation runs executed |
success_rate | float | Fraction of successful runs [0, 1] |
mean_teleportation_fidelity | float | Mean teleportation fidelity |
teleportation_fidelity_stddev | float | Standard deviation of teleportation fidelity |
mean_latency_ms | float | Mean end-to-end latency (ms) |
Distributed Quantum Computing
Multi-party quantum computation with coordinated measurements. Supports star, ring, mesh, and arbitrary topologies with GHZ / cluster / graph measurement bases.
DistributedComputingParameters
| Field | Type | Default | Description |
|---|---|---|---|
participants | List[str] | — | Participant node IDs |
coordination_topology | CoordinationTopology | — | Coordination pattern |
measurement_basis | MeasurementBasis | GHZ, 0.85 | Measurement basis config |
classical_relay_latency_ms | float | 5.0 | Classical relay latency (ms) |
DistributedComputingResult
| Field | Type | Description |
|---|---|---|
success | bool | Whether computation succeeded |
computation_fidelity | float | Fidelity of the distributed computation |
party_results | List[PartyOutcome] | Per-party measurement outcomes |
resource_links_used | List[str] | Links used during protocol |
total_latency_ms | float | End-to-end latency (ms) |
coordination_overhead_ms | float | Coordination overhead (ms) |
PartyOutcome
| Field | Type | Description |
|---|---|---|
node_id | str | Participant node ID |
successful_measurement | bool | Whether measurement succeeded |
local_fidelity | float | Local measurement fidelity |
DistributedComputingStats (Monte Carlo ensemble)
Note: Monte Carlo ensemble for distributed computation is planned but not yet implemented.
run_distributed_computation()currently returns a singleDistributedComputingResult.
| Field | Type | Description |
|---|---|---|
total_runs | int | Number of runs executed |
success_rate | float | Fraction of successful runs [0, 1] |
mean_computation_fidelity | float | Mean computation fidelity |
mean_coordination_overhead_ms | float | Mean coordination overhead (ms) |
MeasurementBasis
Measurement basis configuration for distributed protocols.
MeasurementBasis(basis_type: BasisType, correlation_strength: float = 0.85)
| Field | Type | Default | Description |
|---|---|---|---|
basis_type | BasisType | — | Measurement basis (GHZ, Cluster, GraphGraph) |
correlation_strength | float | 0.85 | Correlation strength parameter |
CoordinationTopology
Party coordination pattern with static factory methods.
| Method/Field | Signature / Type | Description |
|---|---|---|
.star(center_node) | (str) -> CoordinationTopology | Star topology with center node |
.ring() | () -> CoordinationTopology | Ring topology (circular) |
.mesh() | () -> CoordinationTopology | All-to-all mesh topology |
.arbitrary(edges) | ((src, dst), ...) -> CoordinationTopology | Custom edges list |
kind | str | "star", "ring", "mesh", or "arbitrary" |
center_node | Optional[str] | Center node for star (optional) |
edges | Optional[List[tuple]] | Edge list for arbitrary (optional) |