HUB
Sign inSign up
quantumbiology-lab logo

credkellar/quantumbiology-lab

By credkellar

โ€ขUpdated 17 days ago

QuantumBiology-Lab: quantum biology lab - ENAQT excitons, radical pairs, proton tunnelling. Sim!!!!!

Image
Machine learning & AI
Developer tools
Data science
1

205

credkellar/quantumbiology-lab repository overview

โ QuantumBiology-Lab ๐Ÿงฌโš›๏ธ

Quantum Biology Toy-Model Lab โ€” by Darion Kellar

Educational quantum biology lab in ONE pure-Python file: excitonic transport on a 7-site FMO-like network (labelled Adolphs-Renger-style site energies and couplings, trap at the lowest-energy site 3, Haken-Strobl dephasing, exact Liouvillian efficiency eta = kappa * int rho_trap dt from one linear solve, eta + loss = 1 to <1e-9), a golden-section ENAQT optimum (eta = 0.553574 at zero dephasing, eta* = 0.915700 at gamma* = 26.52 rad/ps = 140.81 cm^-1, eta = 0.379288 at gamma = 5120 in the Zeno limit), a one-hyperfine radical-pair toy whose singlet yield is computed from the exact 8x8 spin spectrum (Phi_S(0) = 0.700000, dip 0.682573 at B/a = 0.75, Phi_S(3) = 0.734909, swing 0.052336), WKB proton tunnelling graded against the exact rectangular-barrier formula (T_WKB = 5.9677e-08 vs T_exact = 3.9368e-08; tunnel rate 716.7x the classical Arrhenius rate; H/D isotope effect 982.6), and a from-scratch kNN transport-regime classifier whose labels come from the lab's own policy.

Pure Python standard library. Zero dependencies. Zero network. Honest scope: every parameter is a LABELLED teaching value โ€” nothing was measured from any organism, protein, bird, or enzyme, and no output is a biological measurement. A toy efficiency peak is not photosynthesis, a toy yield curve is not a compass, and a WKB exponent is not an enzyme rate. Every medical / drug / agriculture / sensor / navigation / product use is a permanent HOLD gate (14 total).

โ ๐Ÿงฐ Tech Stack Badges & Full Architecture Tech Stack

โ ๐Ÿ’ป Core Programming Languages & Core Systems

Python Stdlib Only Network Deterministic License

  • ๐Ÿ Python 3.12, pure standard library (math, hashlib, json, sys) โ€” zero dependencies, zero network, deterministic (double-run byte-identical)
  • ๐ŸŒฟ Transport core: a 49ร—49 complex Liouvillian (Hakenโ€“Strobl dephasing + trap + recombination) solved exactly โ€” efficiency is ฮบ โˆซฯ_trap dt from one linear solve Lx = โˆ’ฯ(0), so ฮท + loss = 1 holds to <1e-9 and is asserted in CHECKS; RK4 density-matrix evolution for coherence and population snapshots
  • ๐Ÿงฎ Eigensolver from scratch: cyclic Jacobi for real symmetric Hamiltonians, reconstruction Vฮ›Vแต€ = H asserted <1e-9 for both the 7ร—7 site Hamiltonian and the 8ร—8 radical-pair Hamiltonian
  • ๐Ÿงญ Radical pair: singlet yield from the exact spectrum with Haberkorn equal-rate weighting k / (k + iฮ”E) โ€” no time integration, no sampling
  • โš›๏ธ Tunnelling: WKB exponent from exact SI constants, checked against the exact rectangular-barrier transmission formula
  • ๐Ÿง  TinyML kNN regime classifier (from scratch, stdlib): coherent-trapped / ENAQT-optimal / over-dephased from dephasing + efficiency + coherence, 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)
โ โ›“๏ธ Web3 & Infrastructure
  • ๐Ÿšซ Not applicable โ€” honestly. No blockchain, no Web3, no tokens: the "infrastructure" in this lab is a labelled simulation of a pigment network, a spin pair, and a barrier inside one offline file. No fake badges here.
โ โš™๏ธ Platform Support & Hardware Architecture

Linux macOS Windows

  • ๐Ÿ–ฅ๏ธ Pure Python โ€” runs anywhere Python 3.12+ runs (Linux, macOS, Windows), plus the python:3.12-slim Docker image
  • ๐Ÿ”’ No organism, instrument, or hardware is touched, ever: real measurements and biological claims are permanent HOLD gates (see the gate table below)
โ โšก Low-Level Infrastructure & Performance
  • ๐Ÿšซ No low-level code โ€” honestly. No C, no C++, no GPU, no compiled extensions: this is one interpreted Python file on purpose, so every number can be read, checked, and diffed. Performance here means honest algorithms โ€” an exact Liouvillian linear solve instead of long stochastic trajectories, a golden-section search for the ENAQT optimum, and stability-aware RK4 step sizing โ€” all deterministic and byte-identical between runs.
โ ๐Ÿ› ๏ธ DevOps & Build Tools

Docker GitHub Actions pytest Git

  • ๐Ÿณ Docker (python:3.12-slim), GitHub Actions CI + Docker Publish (delivered in the paste pack)
  • ๐ŸŽฏ Target image: credkellar/quantumbiology-lab:latest
  • ๐Ÿงช Tests: pytest (40 tests) + the built-in CHECKS suite (49 checks) in main.py
โ โ˜๏ธ Cloud Providers
  • ๐Ÿšซ 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.

โ ๐Ÿณ Quick start

docker pull credkellar/quantumbiology-lab:latest
docker run --rm credkellar/quantumbiology-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/quantumbiology-lab:latest python3 main.py checks    # CHECKS 49/49
docker run --rm credkellar/quantumbiology-lab:latest python3 main.py transport # FMO spectrum + ENAQT sweep + optimum (JSON)
docker run --rm credkellar/quantumbiology-lab:latest python3 main.py radical   # singlet yield vs applied field (JSON)
docker run --rm credkellar/quantumbiology-lab:latest python3 main.py tunnel    # WKB + exact transmission, rates, isotope effect (JSON)
docker run --rm credkellar/quantumbiology-lab:latest python3 main.py classify  # kNN regime classifier report
docker run --rm credkellar/quantumbiology-lab:latest python3 main.py holds     # 14 HOLD gates

โ ๐Ÿ”ฌ What's inside

  • Exact transport efficiency โ€” the 49x49 Liouvillian (coherent commutator + Haken-Strobl dephasing + trap anticommutator + uniform loss) is solved once per dephasing rate; eta and the recombination loss are exact linear-solve outputs that sum to 1 (<1e-9 asserted), with the solve residual asserted <1e-8.
  • ENAQT, measured both sides โ€” eta climbs 0.553574 (gamma = 0, coherent localisation) through the golden-section optimum 0.915700 at gamma* = 26.52 rad/ps, then falls to 0.379288 at gamma = 5120 rad/ps where Zeno quenching makes transport worse than no noise at all.
  • Jacobi eigensolver, from scratch โ€” the 7x7 site Hamiltonian gives exciton energies -30.01 ... 471.20 cm^-1 (relative); the lowest exciton sits 77.9% on the trap site and 0.23% on the start site. Reconstruction V L V^T = H asserted <1e-9 for both Hamiltonians in the lab.
  • Coherence on a clock โ€” RK4 density-matrix evolution (stability-aware step) measures mean l1 coherence over the first picosecond: 2.0376 at gamma = 0, 0.3967 at gamma*, 0.0300 at gamma = 1280.
  • Radical pair from its spectrum โ€” 8x8 spin Hamiltonian (two electrons + one nucleus, a = 1 labelled), Haberkorn equal-rate weighting k = 0.5a; Phi_S(0) = 0.700000 exactly, a dip to 0.682573 at B/a = 0.75, and 0.734909 at B/a = 3.
  • Tunnelling with its error bar shown โ€” WKB T = 5.9677e-08 vs exact 3.9368e-08 (ratio 0.6597, asserted inside [0.3, 1.5]); enhancement 716.7x over the classical rate at the same attempt frequency; deuteron transmission 6.0737e-11 prices the isotope effect at 982.6.
  • TinyML kNN classifier โ€” coherent-trapped / ENAQT-optimal / over-dephased from (dephasing rate, efficiency, mean coherence); labels generated by the lab's own regime policy over its measured sweep ranges.
  • 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: 40 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/quantumbiology-lab:latest
Tag summary
Recent tags
Content type
Image
Digest
sha256:1f10f863bโ€ฆ
Size
41.5 MB
Last updated
17 days ago
docker pull credkellar/quantumbiology-lab:latest