Quantum Teleportation Protocol Lab โ by Darion Kellar
Educational quantum teleportation lab in ONE pure-Python file: the full protocol run on a from-scratch 3-qubit statevector simulator โ the headline input |psi> = 0.6|0> + 0.8|1> teleports with all four Bell-measurement outcomes at p = 0.2500 each and fidelity 1.000000000000 after Pauli corrections, across an 8-state input grid whose worst fidelity is also 1.000000000000. The no-cloning receipt is computed from the density matrix: after the measurement the sender's original qubit is I/2 (max deviation 1.11e-16, overlap with the input exactly 0.5000), and Bob's qubit is I/2 until the 2 classical bits arrive. Superdense coding runs on the same pair (all four 2-bit messages decode at probability 1.0000). With labelled Kraus noise on the shared pair, the delivered fidelity matches its closed forms โ depolarizing F = 1 - 2p/3 (1.000 down to 0.333) and dephasing F = (1 - q) + q(|a|^2 - |b|^2)^2 (down to 0.0784 for the headline state) โ and a bisection on the simulation locates where each channel stops beating the classical 2/3 bound: depolarizing at p = 0.500000, dephasing at q = 0.361690. The resource ledger prices the classical alternative with F(N) = (N + 1)/(N + 2): 98 copies for 0.99, no finite N for 1. A distance-weighted kNN classifier labels links from the lab's own policy.
Pure Python standard library. Zero dependencies. Zero network. Honest scope: nothing was teleported anywhere โ Alice and Bob are registers in one process, the "channel" is a Kraus map on a matrix, and no photon, fibre, or network exists here. Every real-communication / quantum-internet / faster-than-light / hardware use is a permanent HOLD gate (14 total).
โ ๐งฐ Tech Stack Badges & Full Architecture Tech Stack
๐ Python 3.12, pure standard library (math, hashlib, json, sys) โ zero dependencies, zero network, deterministic (double-run byte-identical)
โ๏ธ Statevector core from scratch: H / X / Y / Z gates and CNOT applied by index arithmetic on 8 complex amplitudes โ the Bell pair, the Bell-basis rotation (CNOT + H), all four measurement outcomes, and the Pauli corrections are computed, never quoted
๐ฌ Density-matrix noise core from scratch: 8ร8 density matrices, Kronecker products, partial traces, and Kraus channels written operator by operator (depolarizing: โ(1โp)ยทI + โ(p/3)ยท{X, Y, Z}; dephasing: โ(1โq)ยทI + โ(q)ยทZ) โ every simulated fidelity is graded against its closed form in CHECKS
๐ Resource ledger: the quantum cost (1 ebit + 2 classical bits + 1 copy โ fidelity exactly 1) printed against the optimal classical estimation fidelity F(N) = (N + 1)/(N + 2) โ the 2/3 bound is its N = 1 case, and 0.99 costs N = 98 copies
๐ง TinyML kNN link classifier (from scratch, stdlib, distance-weighted): perfect-protocol / beats-classical / classical-tie / broken from channel + noise strength + delivered fidelity, labels from the lab's own policy
๐ช Council seats: Gemini Argon 4 DECIDER (names-only, tighten-only) + Muse advisor (never overrides HOLD) + Google Flow plan-only (rendered = False, live = 0)
๐ซ Not applicable โ honestly. No blockchain, no Web3, no tokens: the "infrastructure" in this lab is one offline file holding three simulated qubits. Quantum-internet deployment is a permanent HOLD gate, not a feature. No fake badges here.
โ โ๏ธ Platform Support & Hardware Architecture
๐ฅ๏ธ Pure Python โ runs anywhere Python 3.12+ runs (Linux, macOS, Windows), plus the python:3.12-slim Docker image
๐ No hardware is controlled, ever: real photonic links, ion traps, superconducting qubits, and network nodes are permanent HOLD gates (see the gate table below)
๐ซ No low-level code โ honestly. No C, no C++, no GPU, no compiled extensions: this is one interpreted Python file on purpose, so every amplitude can be read, checked, and diffed. Performance here means honest algorithms โ an 8-amplitude statevector, exact 8ร8 density-matrix algebra, and a 60-step bisection that locates the classical-bound crossing to 1e-6 โ all deterministic and byte-identical between runs.
๐ซ None โ honestly. No cloud provider is used or needed: the lab runs fully offline on your own machine or in a local Docker container. Docker Hub appears only as the registry the publish workflow pushes the image to.
The protocol, computed โ Bell pair + CNOT/H Bell measurement on a from-scratch statevector: four outcomes at p = 0.2500 each, Bob's corrected fidelity 1.000000000000 for every outcome and for all 8 grid input states.
No-cloning receipt โ the sender's post-measurement qubit traced out of the density matrix: I/2 to 1.11e-16, overlap with the input exactly 0.5000, for two different inputs โ the original is destroyed, not copied.
No-signalling receipt โ Bob's qubit before the classical bits arrive is also I/2 (deviation 1.11e-16): nothing usable moves faster than the classical channel.
Superdense coding โ the same pair carries 2 classical bits per qubit sent: all four messages decode at probability 1.0000, encoded states verified orthonormal.
Dephasing table, input dependence shown โ F = (1 - q) + q(|a|^2 - |b|^2)^2: headline state falls to 0.0784 at q = 1, an equatorial input falls as exactly 1 - q, pole states are untouched.
The 2/3 crossings โ bisected from the simulation: depolarizing stops beating the classical bound at p = 0.500000, dephasing at q = 0.361690; both match the analytic values.
Resource ledger โ quantum: 1 ebit + 2 classical bits + 1 copy โ fidelity 1. Classical estimation F(N) = (N + 1)/(N + 2): N = 1 is the 2/3 bound, 0.99 needs 98 copies, 1 is unreachable at any finite N.
TinyML kNN classifier โ perfect-protocol / beats-classical / classical-tie / broken from (channel, noise, delivered fidelity); scenario fidelities computed by the density-matrix simulator, labels from the lab's own policy.
Advisory seats โ Gemini Argon 4 DECIDER (names-only, tighten-only, sha256 trace), Muse advisor (can never override HOLD), Google Flow plan-only (rendered = False, live = 0).