Q-Sec: Quantum Key Distribution System Architecture

High-Level 3-Layer Architecture with Qiskit Aer Simulation and Physical Noise Modeling

Q-Sec: Quantum Key Distribution System Architecture High-Level 3-Layer Architecture with Qiskit Aer Simulation and Physical Noise Modeling Web Clients · Guest & Authenticated · Architecture component · HTTP / JSON Web Clients Guest & Authenticated HTTP / JSON Flask Presentation · views/routes.py · Presentation Layer (views/) · Routes & API Endpoints · Flask Flask Presentation views/routes.py Routes & API Endpoints Jinja2 UI & SVG · views/templates · Presentation Layer (views/) · Photon Visualizer Jinja2 UI & SVG views/templates Photon Visualizer Simulation Controller · simulation_controller.py · Business / Quantum Domain Layer (business/) · Zero-Friction Orchestrator · Python Simulation Controller simulation_controller.py Zero-Friction Orchestrator BB84 Quantum Core · bb84_simulation.py · Business / Quantum Domain Layer (business/) · X & H Basis Preparation · Python BB84 Quantum Core bb84_simulation.py X & H Basis Preparation Channel & Eve Attack · Depolarizing Noise · Business / Quantum Domain Layer (business/) · NoiseModel + Intercept Channel & Eve Attack Depolarizing Noise NoiseModel + Intercept Information Theory · Shannon & Key Rate · Business / Quantum Domain Layer (business/) · h(p) & 11% Cutoff Information Theory Shannon & Key Rate h(p) & 11% Cutoff Qiskit Aer Backend · AerSimulator · Quantum Simulation Runtime · Quantum Circuit Execution Qiskit Aer Backend AerSimulator Quantum Circuit Execution Session Repository · session_repository.py · Data & Persistence Layer (datos/) · Audit & Session CRUD · Python Session Repository session_repository.py Audit & Session CRUD SQLAlchemy ORM · datos/models.py · Data & Persistence Layer (datos/) · User & Session Models SQLAlchemy ORM datos/models.py User & Session Models Schema Migrator · datos/esquema.py · Data & Persistence Layer (datos/) · Auto DDL & Widening Schema Migrator datos/esquema.py Auto DDL & Widening Relational Storage · SQLite / PostgreSQL · Data & Persistence Layer (datos/) · instance/qsec.db · SQLite Relational Storage SQLite / PostgreSQL instance/qsec.db HTTPS run simulation dispatch protocol execute circuits save session SQLAlchemy SQL Presentation Layer (views/) Business / Quantum Domain Layer (business/) Quantum Simulation Runtime Data & Persistence Layer (datos/) Legend Frontend Backend Database Cloud Security External

Presentation Tier

  • • Flask routes provide public guest endpoints and authenticated dashboards
  • • Zero-friction Guest Mode allows immediate execution without account creation
  • • Interactive SVG visualization of photon pulses and reconciliation in real time

Quantum Business Logic

  • • BB84 protocol with Pauli-X and Hadamard state preparation (|0>, |1>, |+>, |->)
  • • Physical depolarizing noise channel and Eve intercept-resend attack via Qiskit Aer
  • • Devetak-Winter asymptotic secret key rate with rigorous 11% QBER threshold cutoff

Data Integrity Tier

  • • Clean repository pattern separating ORM models from simulation business logic
  • • Runtime non-destructive schema migrations for SQLite and PostgreSQL
  • • Audit log tracking QBER, noise rates, and distilled secret key lengths