Educational quantum measurement lab in ONE pure-Python file: the trine POVM built explicitly (elements positive, summing to I) and refereed against projective measurement on the same discrimination task β POVM success 0.666667 against the best projective strategy found by an exhaustive 1,440-angle scan, 0.622008 (textbook aligned strategy: 0.583333) β a Neumark dilation constructed in code (isometry completed to an explicit 4x4 unitary; statistics match the POVM to 1.11e-16 and the fourth outcome never fires), a Gaussian pointer on a 1,201-point grid whose information-disturbance tradeoff is integrated from the actual pointer states (g = 0.5 keeps fidelity 0.941248 for 0.108515 bits; g = 3 pays down to 0.505554 for 0.985181 bits), an exact anomalous weak value of 21 for sigma_z printed beside its 0.002262 post-selection probability and reproduced by the post-selected pointer simulation as g -> 0 (shift/g: 16.4728 at g = 0.05, 20.7715 at g = 0.01), a five-row back-action ledger from none to strong, and a from-scratch kNN measurement classifier whose labels come from the lab's own policy.
Pure Python standard library. Zero dependencies. Zero network. Honest scope: the pointer is a Gaussian wavefunction on a labelled grid and the qubit is 2x2 matrices β no detector clicked, no sensor exists here, and every number is a statement about the model at the stated inputs. A weak value is a conditional average of a defined procedure, never a measured eigenvalue and never free amplification; its post-selection probability is printed wherever it appears. Every detector / sensing / hardware / calibration / surveillance 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)
π Measurement core: a from-scratch complex linear-algebra kit (2Γ2 and 4Γ4 matrices as plain lists) β the trine POVM built explicitly and asserted positive + summing to I, a Neumark isometry completed to an explicit 4Γ4 unitary by GramβSchmidt, and a Gaussian pointer discretised on a 1,201-point grid (Ο = 1, step 0.02) whose overlaps, readout probabilities, and partial traces are integrated numerically β every headline number asserted against its analytic value in CHECKS
π Discrimination, honestly refereed: the POVM strategy is exact, and the "best projective" number comes from an exhaustive deterministic scan (1,440 basis angles Γ all guess assignments), not from a textbook quote
π§ TinyML kNN measurement classifier (from scratch, stdlib): projective-like / weak-informative / too-weak-to-read / demolished from coupling + pointer width + readout separation, 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 a POVM, a pointer wavefunction, and a ledger. Cryptographic measurement attacks are 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 detectors, pointers, and readout electronics 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 probability can be read, checked, and diffed. Performance here means honest algorithms β closed-form weak values graded against grid-integrated pointer simulations, an exhaustive projective scan instead of a quoted bound β 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.
Trine POVM, explicit β three states at 120 degrees, elements (2/3)|psi_k><psi_k| with eigenvalues 2/3 and 0, summing to I; |0> reads [0.666667, 0.166667, 0.166667], |+> reads [0.333333, 0.622008, 0.044658].
Discrimination, refereed β POVM success 0.666667 (error 0.333333); best projective 0.622008 by exhaustive scan over basis angle and guess assignments; aligned textbook strategy 0.583333 (7/12). Three states want three outcomes.
Neumark receipt β the isometry W is completed to an explicit 4x4 unitary (unitarity error 3.33e-16); projective readout on qubit + ancilla reproduces the POVM statistics to 1.11e-16, and the fourth outcome's probability is exactly 0 on every test state.
The tradeoff table β overlap / fidelity / readout success / information at g = 0, 0.25, 0.5, 1, 1.5, 2, 3, all integrated from discretised pointer states; grid overlap matches exp(-g^2/2 sigma^2) to <1e-6, readout success matches the normal CDF to <0.005.
Disturbance as bookkeeping β the unread disturbed state's off-diagonal is the pointer overlap itself (0.303265 at g = 1), so fidelity kept = (1 + overlap)/2 is a verified identity, not an assumption.
Weak values, exact and priced β post-select |0>: A_w = 1 (the eigenvalue); |+>: 0; |->: undefined at probability 0; tilted delta = 0.1 off |->: A_w = 21 at P(post) = 0.002262. The anomaly never appears without its price.
The sim grades the formula β post-selected pointer shift/g converges 16.4728 (g = 0.05, already too strong) -> 20.1150 (0.02) -> 20.7715 (0.01) -> 21 exact; sim post-selection probability 0.002287 at g = 0.01 against the exact 0.002262.
Back-action ledger β same input, five rows: none (0 bits, fidelity 1.000000), weak g = 0.5 / 1 / 2 (0.108515 / 0.368898 / 0.843365 bits; 0.941248 / 0.803265 / 0.567668), strong (1 bit, 0.500000). Monotone both ways.
TinyML kNN classifier β projective-like / weak-informative / too-weak-to-read / demolished from (coupling g, pointer width, readout separation); a wide pointer keeps g = 2 weak-informative while a narrow one makes g = 1 demolished.
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).