QKDpy Documentation

Welcome to the documentation for QKDpy, a Python library for Quantum Key Distribution simulation at the intersection of Space Technology, Quantum Computing, AI/ML, and Enterprise Compliance.

Status & Scope. QKDpy is a research / educational simulator. It models QKD protocols, channels, and attacks with phenomenological approximations. It is not validated for securing real key material and not a hardened, standards-compliant codec. See the Status & Scope section in the README for the precise maturity level.

Key Capabilities

Domain

Features

Satellite QKD

Satellite-ground links, free-space optical channels, orbital mechanics, atmospheric modeling

QKD Protocols

10+ protocols (BB84, E91, CV-QKD, HD-QKD, B92, SARG04, SixState, DI-QKD)

Density Matrix

Mixed-state simulation, partial trace, fidelity, entropy, purity, CPTP channels (depolarizing, amplitude damping, Kraus channel composition)

Circuit Composer

Quantum circuit construction, gate composition, Bell state preparation, OpenQASM 2.0 export, simulation

Secret Key Rate

Asymptotic and finite-size secret key rate computation for BB84 and other protocols

AI/ML

Bayesian optimization, neural network predictors, anomaly detection, adaptive protocols

Enterprise

Three-tier licensing (FREE/ENTERPRISE/PREMIUM), compliance checking, HSM integration, audit logging

Observability

Structured instrumentation via OperationSpan, @instrument decorator, domain-specific events

Quantum-Safe

Crypto inventory assessment, risk scoring, phased migration roadmap (PREMIUM)

Contents

Architecture Decision Records

Design rationale for major architectural choices is captured in Architecture Decision Records. Internal ADRs (not compiled into the public site) document decisions that are primarily relevant to maintainers and contributors.

ADR

Subject

ADR-001

Product tier licensing model

ADR-002

Observability and instrumentation

ADR-003

Enterprise config audit architecture

ADR-004

HSM is a software simulation

ADR-005

Core quantum simulation stack

ADR-006

Protocol execution model (template method)

Architecture & Diagrams

The diagrams below summarize how the library is organized — from the high-level module breakdown through the protocol execution flow, the core quantum stack, key management, network / satellite links, framework integrations, the crypto & enterprise surface, the ML optimization pipeline, and the end-to-end data flow.

Indices and tables