Implements R20.1's catalogued refinement: when NV conf > 60% AND amplitude > 3 pT, trust NV entirely. Mixed result (5 distances): - 0.5 m: NV=72.00 ✓, smart=72.0 (+0.0 error, NV trusted) ✓ - 1.0 m: NV=144 (harmonic!), smart trusts wrong NV (+72 BPM error) - 1.5 m+: falls back to weighted (NV conf below threshold) Production lesson: the threshold-based policy is correct in spirit but incorrect with simple FFT rate estimator (picks harmonics). Production needs: 1. Harmonic rejection (Pan-Tompkins QRS or autocorrelation) 2. Cross-check vs breathing band 3. Per-frame plausibility window R20.1's 'production needs Pan-Tompkins' note is confirmed BINDING, not nice-to-have, before threshold hand-off can ship. ADR-114 implementation budget refined: +30-50 LOC for Pan-Tompkins. Five-step quantum arc: - R20 vision (tick 37) - Doc 17 bridge (tick 38) - ADR-114 spec (tick 39) - R20.1 working demo (tick 40) - R20.2 threshold refinement (this tick) Production ADR-114 cog now has all known refinements catalogued BEFORE any Rust code is written. Honest mixed result — catalogue-then-revisit pattern works: R20.1 flagged production gap; R20.2 attempted fix; fix surfaced deeper gap (harmonic rejection). Three layers of refinement. |
||
|---|---|---|
| .. | ||
| README.md | ||
| r20_1_fusion_results.json | ||
| r20_1_quantum_classical_fusion.py | ||
| r20_2_threshold_handoff.py | ||
| r20_2_threshold_results.json | ||
README.md
09 — Quantum-classical fusion (ADR-114 demo)
Working numpy demo of the cog-quantum-vitals architecture: classical CSI for multi-subject context, NV-diamond magnetometry for per-patient HRV contour fidelity.
Scripts
| Script | Thread | Headline |
|---|---|---|
r20_1_quantum_classical_fusion.py |
R20.1 | Bayesian fusion of CSI (R14 V1 breathing) + NV-diamond cardiac magnetometry. Empirically confirms R13 NEGATIVE (classical HR conf 38%, 105 BPM estimate vs 72 truth) AND doc 16's cube-of-distance bound (27× signal drop 1 m → 3 m). |
Five confirmations from the demo
- Classical breathing rate is reliable — 15.00 BPM correct (14 dB SNR)
- Classical HR is unreliable — 105 BPM vs 72 truth, conf 38% (R13 NEGATIVE empirically confirmed)
- NV cardiac at 1 m works — 72.00 BPM correct, SDNN 119 ms (R13 recovery validated)
- Cube-of-distance falloff is real — 6.25 pT @ 1 m → 0.23 pT @ 3 m (27× drop, matches 1/r³)
- Fusion produces correct breathing + improved HR at bedside
The arc that produced this demo
| Tick | Output | Time |
|---|---|---|
| 37 | R20 — quantum-classical vision | 11:15 UTC |
| 38 | Doc 17 — quantum-classical bridge | 11:25 UTC |
| 39 | ADR-114 — shippable cog spec | 11:35 UTC |
| 40 | R20.1 — working numpy demo | 11:40 UTC |
Vision → integration → spec → working code in 25 minutes.
Production status
ADR-114 specifies ~200 LOC Rust port; this 140 LOC numpy demo runs in <100 ms and validates the architecture. Engineering risk for cog-quantum-vitals (Tier 4.x in PRODUCTION-ROADMAP.md) is substantially lowered.
Bedside cost (per ADR-114)
| Component | Cost |
|---|---|
| 4× ESP32-S3 | $60 |
| 1× NV-diamond (today / 2028) | $200-2,000 / ~$200 |
| Mount + calibration | $50 |
| Total | $310-$2,110 |
vs clinical continuous monitor: $3,000-$10,000.
Honest scope
- Synthetic NV signals (
nvsimis also a simulator) - Cube-of-distance assumes clean dipole field
- HRV extraction = simple threshold (production needs Pan-Tompkins QRS)
- Naive Bayesian fusion (production needs threshold-based hand-off when NV confidence > 60%)
Composes with
01-physics-floor/r6_1_multiscatterer.py— provides the forward operator the fusion extends06-structure-detection/r12_1_pose_pabs_loop.py— pose-PABS hook in ADR-114 architecture07-negative-results/r13_bp_physics_floor.py— the negative result this demo recovers
See also
- ADR-114:
docs/adr/ADR-114-cog-quantum-vitals.md - Quantum-sensing series:
docs/research/quantum-sensing/{11..17}-*.md(especially doc 17 which bridges the loop with the existing series) - Research notes:
docs/research/sota-2026-05-22/R20-*.md,R20_1-*.md