HUB
Sign inSign up
quantumsensor-lab logo

credkellar/quantumsensor-lab

By credkellar

•Updated 17 days ago

QuantumSensor-Lab: quantum sensing lab - Ramsey limits, NV magnetometry, gravimeters, atomic clocks!

Image
Machine learning & AI
Developer tools
Data science
1

229

credkellar/quantumsensor-lab repository overview

⁠QuantumSensor-Lab 📡⚛️

Quantum Sensing Lab — by Darion Kellar

Educational quantum sensing lab in ONE pure-Python file: Ramsey interferometry phase estimation with the standard quantum limit (1/√N) and the Heisenberg limit (1/N) both asserted numerically, an NV-center magnetometry sensitivity model with labelled constants, an atom-interferometer gravimeter (phase = k_eff · g · T²), an Allan-deviation atomic-clock table with every row flagged LABELLED, spin squeezing (dB → variance factor → gain), an integration-time solver that refuses unreachable targets, and a from-scratch kNN detectability classifier whose labels come from the sensitivity model itself.

Pure Python standard library. Zero dependencies. Zero network. Honest scope: nothing here measures anything — no sensor is operated, no field is read, no clock is timed. Every number is a model value from a stated formula or a LABELLED published-class reference, and every real-hardware / live-measurement / navigation / weapons-guidance claim is a permanent HOLD gate (14 total).

⁠🐳 Quick start

docker pull credkellar/quantumsensor-lab:latest
docker run --rm credkellar/quantumsensor-lab:latest

The default command runs the full demo plus the built-in self-checks (CHECKS 49/49).

Run a specific command instead:

docker run --rm credkellar/quantumsensor-lab:latest python3 main.py checks     # CHECKS 49/49
docker run --rm credkellar/quantumsensor-lab:latest python3 main.py ramsey     # SQL vs Heisenberg table
docker run --rm credkellar/quantumsensor-lab:latest python3 main.py nv         # NV magnetometry example
docker run --rm credkellar/quantumsensor-lab:latest python3 main.py gravimeter # phase + per-shot sensitivity
docker run --rm credkellar/quantumsensor-lab:latest python3 main.py clocks     # Allan deviation table (LABELLED)
docker run --rm credkellar/quantumsensor-lab:latest python3 main.py squeezing  # dB -> gain table
docker run --rm credkellar/quantumsensor-lab:latest python3 main.py classify   # detectability report
docker run --rm credkellar/quantumsensor-lab:latest python3 main.py holds      # 14 HOLD gates

⁠🔬 What's inside

  • Ramsey scaling laws, asserted — SQL 1/√N vs Heisenberg 1/N for N = 1 → 10,000 (at N = 100: 0.1000 rad vs 0.0100 rad). The checks prove Heisenberg = SQL² and the entanglement gain = exactly √N.
  • NV-center magnetometry — η = 1/(C·γ·√(N·T2*)) with γ = 28.024 GHz/T (LABELLED) and labelled readout efficiency C = 0.01. Worked example (10¹² spins, T2* = 1 µs): η = 5.679×10⁻¹³ T/√Hz ≈ 0.57 pT/√Hz, all inputs printed.
  • Atom-interferometer gravimeter — phase = k_eff·g·T² (k_eff LABELLED, Rb-87): 1.580×10⁶ rad at T = 0.1 s; per-shot sensitivity 6.21×10⁻⁹ m/s² (0.62 µGal), 6.21×10⁻¹⁰ m/s² after 100 shots.
  • Atomic clocks (LABELLED) — Allan deviation σ(τ) = σ₁/√τ for Rb oscillator class (2.0×10⁻¹¹), Cs fountain class (3.0×10⁻¹³), Sr optical lattice class (2.0×10⁻¹⁶) at 1 s. Published-class references for scale — never measured here.
  • Spin squeezing — variance factor 10^(dB/10), gain its square root: 10 dB → 3.16× (not 10×), 20 dB → 10×.
  • Integration-time solver — t = η²/(target² − floor²): the NV example reaches 10⁻¹³ T in 32.3 s with no floor; with a 2×10⁻¹³ T floor the target is unreachable and the solver returns None instead of a fantasy number.
  • TinyML kNN classifier — detectable / marginal / undetectable from (signal, noise floor, integration time); its ~4,900-row training grid is labelled by the model's own SNR bands, and classifier–model agreement is asserted in the checks.
  • 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).

⁠✅ Verified

  • pytest: 43 passed
  • Built-in checks: CHECKS 49/49
  • Deterministic: double-run byte-identical
  • Base image: python:3.12-slim

⁠🏷️ Categories

Science · Developer tools · Machine learning & AI

  • License: MIT © 2026 Darion Kellar
  • Image: credkellar/quantumsensor-lab:latest
Tag summary
Recent tags
Content type
Image
Digest
sha256:8afa4d311…
Size
41.5 MB
Last updated
17 days ago
docker pull credkellar/quantumsensor-lab:latest