Kronos Fusion Energy commited on
Commit
f34dc51
·
verified ·
1 Parent(s): 02d27c4

KODEX v0.2.0 — 35 codes

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .pytest_cache/v/cache/lastfailed +3 -1
  2. .pytest_cache/v/cache/nodeids +1 -0
  3. BENCHMARKS.md +22 -17
  4. CODES.md +36 -16
  5. benchmarks/benchmarks.json +489 -73
  6. benchmarks/run_all.py +51 -3
  7. kronos_ml/__init__.py +1 -1
  8. kronos_ml/members/advanced.py +137 -0
  9. kronos_ml/members/quantum.py +590 -54
  10. kronos_ml/members/roadmap.py +148 -17
  11. kronos_ml/quantum_backend.py +67 -0
  12. publish/_percode.py +21 -2
  13. publish/_percode_summary.json +12 -3
  14. publish/records/kairos/CITATION.cff +2 -2
  15. publish/records/kairos/MANIFEST.sha256 +5 -5
  16. publish/records/kairos/benchmark.json +1 -1
  17. publish/records/kairos/card.md +1 -1
  18. publish/records/kairos/metadata.json +3 -3
  19. publish/records/kbench/CITATION.cff +13 -0
  20. publish/records/kbench/LICENSE +189 -0
  21. publish/records/kbench/MANIFEST.sha256 +7 -0
  22. publish/records/kbench/benchmark.json +44 -0
  23. publish/records/kbench/card.md +13 -0
  24. publish/records/kbench/kbench.py +54 -0
  25. publish/records/kbench/metadata.json +65 -0
  26. publish/records/kbreed/CITATION.cff +2 -2
  27. publish/records/kbreed/MANIFEST.sha256 +3 -3
  28. publish/records/kbreed/metadata.json +2 -2
  29. publish/records/kburn/CITATION.cff +2 -2
  30. publish/records/kburn/MANIFEST.sha256 +3 -3
  31. publish/records/kburn/metadata.json +2 -2
  32. publish/records/kdrive/CITATION.cff +2 -2
  33. publish/records/kdrive/MANIFEST.sha256 +3 -3
  34. publish/records/kdrive/metadata.json +2 -2
  35. publish/records/kdyn/CITATION.cff +13 -0
  36. publish/records/kdyn/LICENSE +189 -0
  37. publish/records/kdyn/MANIFEST.sha256 +7 -0
  38. publish/records/kdyn/benchmark.json +28 -0
  39. publish/records/kdyn/card.md +13 -0
  40. publish/records/kdyn/kdyn.py +77 -0
  41. publish/records/kdyn/metadata.json +65 -0
  42. publish/records/kecon/CITATION.cff +2 -2
  43. publish/records/kecon/MANIFEST.sha256 +3 -3
  44. publish/records/kecon/metadata.json +2 -2
  45. publish/records/kedge/CITATION.cff +13 -0
  46. publish/records/kedge/LICENSE +189 -0
  47. publish/records/kedge/MANIFEST.sha256 +7 -0
  48. publish/records/kedge/benchmark.json +12 -0
  49. publish/records/kedge/card.md +13 -0
  50. publish/records/kedge/kedge.py +43 -0
.pytest_cache/v/cache/lastfailed CHANGED
@@ -1 +1,3 @@
1
- {}
 
 
 
1
+ {
2
+ "tests/test_contract.py::test_registry_has_thirty": true
3
+ }
.pytest_cache/v/cache/nodeids CHANGED
@@ -5,6 +5,7 @@
5
  "tests/test_contract.py::test_kgate_clamps_and_fails_closed",
6
  "tests/test_contract.py::test_kyro_reproduces_training_point",
7
  "tests/test_contract.py::test_metrics_calibration",
 
8
  "tests/test_contract.py::test_registry_has_thirty",
9
  "tests/test_contract.py::test_roadmap_codes_raise",
10
  "tests/test_contract.py::test_tagged_provenance_requires_retired_by"
 
5
  "tests/test_contract.py::test_kgate_clamps_and_fails_closed",
6
  "tests/test_contract.py::test_kyro_reproduces_training_point",
7
  "tests/test_contract.py::test_metrics_calibration",
8
+ "tests/test_contract.py::test_registry",
9
  "tests/test_contract.py::test_registry_has_thirty",
10
  "tests/test_contract.py::test_roadmap_codes_raise",
11
  "tests/test_contract.py::test_tagged_provenance_requires_retired_by"
BENCHMARKS.md CHANGED
@@ -6,35 +6,40 @@ are kept, not hidden. Nothing here is published until go-live.
6
 
7
  | # | Code | Status | Headline benchmark |
8
  |--|--|--|--|
9
- | 01 | **KAIROS** | BUILT | MPC tracking 0.0461 (<5%); Exp-B **0 escapes / 150,000**; 76.8 µs/step |
10
  | 02 | **KFLOW** | BUILT | GNN RMSE@k8 0.0844 vs naive 0.1721 (beats naive; AC-18 0.05 bar **MISSED**, kept) |
11
  | 03 | **KGATE** | BUILT | model-free clamp: **0 escapes / 150,000 steps** |
12
  | 04 | **KHALO** | BUILT | sourced ECE 0.0327 +/- 0.0136 / cov90 0.888 +/- 0.034; live GP ECE 0.0771 |
13
  | 05 | **KMAT** | BUILT | DFT-validated CHGNet screen, 8 candidates |
14
  | 06 | **KOIL** | BUILT | live strain surrogate rel-L2 0.0038; sourced 0.24% @0.15 ms, quench AUC 0.9998 |
15
- | 07 | **KORE** | BUILT | learned NN equilibrium: rel-L2 0.0035 vs analytic, 0.421 ms/field; sourced FNO 2.5% vs 1% bar |
16
- | 08 | **KQUBIT** | BUILT | **statevector 0.0 mHa (PASS); noisy 14x-1305x over chem-acc (sim-only)** — MANDATORY: no quantum advantage this decade |
17
  | 09 | **KWARD** | BUILT | real-device AUC 0.98 (591 MAST shots), ECE 0.0349; **independent-precursor AUC 0.975** (n=1 Mirnov + P_rad ONLY, label-independent); labels heuristic (Ip-quench) |
18
- | 10 | **KYRO** | BUILT | complete 16/16 map (12 turbulent / 4 quiet (16/16 complete)); turbulent/quiet **16/16 correct**, R²=0.858 / cov90=0.875; **0.265 ms vs 2.89 GPU-h/pt** (μ=400) |
19
  | 11 | **KBREED** | BUILT | TBR surrogate R²=1.0 vs neutronics engine; nominal net TBR 0.742; OpenMC = auto fidelity upgrade |
20
  | 12 | **KBURN** | BUILT | dispatch surrogate R²=1.0 (fuel mix → captured power); +22% dynamic |
21
  | 13 | **KEYE** | BUILT | virtual-sensor fault detection 0.767 at FAR 0.0 |
22
  | 14 | **KFLUX** | BUILT | coil-fluence surrogate R²=1.0 vs neutronics engine; OpenMC = auto fidelity upgrade |
23
  | 15 | **KFUSE** | BUILT | multi-fidelity: RMSE 1.481→1.05 (R²=0.787); 3rd fidelity = real-mass gold (deferred) |
24
- | 16 | **KHEAT** | PARTIAL | RF / NBI heating & current-drive actuator-response surrogate |
25
  | 17 | **KISO** | BUILT | servo R²=0.723 + **medical-isotope yield** from real FENDL-3.2 σ(E) (6 isotopes, Mo-99/Tc-99m flagship) |
26
  | 18 | **KPATH** | BUILT | MPC-imitation controller R²=0.879 over 6 axes |
27
- | 19 | **KQROSS** | BUILT | **no crossover this decade; survives optimistic corner** — MANDATORY: no quantum advantage this decade |
28
- | 20 | **KSENSE** | BUILT | dAUC ~ -0.04..+0.003, d-warning ~0 ms vs conventional coil (validated null result) |
29
- | 21 | **KTENSOR** | PARTIAL | tensor-network results on disk; surrogate wrapper is thin |
30
- | 22 | **KDRIVE** | BUILT | RL policy (cross-entropy): tracking **0.0551** vs naive 0.1225, twin-in-the-loop |
31
- | 23 | **KECON** | BUILT | generic LCOE calculator + breakdown — **FINANCIAL FIREWALL (no Kronos numbers)** |
32
- | 24 | **KEDGE** | ROADMAP | divertor / SOL / edge heat-flux transport surrogate |
33
- | 25 | **KFORGE** | BUILT | inverse-design chained KYRO+KORE → **found a quiet operating point** (a/L_T=2.186, shear=1.406, Q_tot≈0.0) |
34
- | 26 | **KFUEL** | BUILT | fuel-cycle balance: self-sufficient=True, doubling 5.17 yr (illustrative TBR) |
35
- | 27 | **KGEN** | BUILT | generative (PCA latent, dim 8); samples plausible equilibrium fields (diffusion = roadmap) |
36
- | 28 | **KLAW** | BUILT | equation discovery: 7 terms, R²=0.903 — **rediscovered the critical-gradient onset** from the CGYRO map |
37
- | 29 | **KPILOT** | BUILT | fleet router: plain-language query → the right code (LLM agent = roadmap upgrade) |
38
- | 30 | **KRAD** | ROADMAP | impurity seeding / radiation / divertor-detachment control |
 
 
 
 
 
39
 
40
  _Regenerate: `PYTHONPATH=<kronos-ml>:<kronos-toolkit> python benchmarks/run_all.py`._
 
6
 
7
  | # | Code | Status | Headline benchmark |
8
  |--|--|--|--|
9
+ | 01 | **KAIROS** | BUILT | MPC tracking 0.0461 (<5%); Exp-B **0 escapes / 150,000**; 155.4 µs/step |
10
  | 02 | **KFLOW** | BUILT | GNN RMSE@k8 0.0844 vs naive 0.1721 (beats naive; AC-18 0.05 bar **MISSED**, kept) |
11
  | 03 | **KGATE** | BUILT | model-free clamp: **0 escapes / 150,000 steps** |
12
  | 04 | **KHALO** | BUILT | sourced ECE 0.0327 +/- 0.0136 / cov90 0.888 +/- 0.034; live GP ECE 0.0771 |
13
  | 05 | **KMAT** | BUILT | DFT-validated CHGNet screen, 8 candidates |
14
  | 06 | **KOIL** | BUILT | live strain surrogate rel-L2 0.0038; sourced 0.24% @0.15 ms, quench AUC 0.9998 |
15
+ | 07 | **KORE** | BUILT | learned NN equilibrium: rel-L2 0.0035 vs analytic, 2.337 ms/field; sourced FNO 2.5% vs 1% bar |
16
+ | 08 | **KQUBIT** | BUILT | **REAL VQE** (PennyLane): recovers H2 ground state to 0.0002 mHa on default; runs on real QC hardware — no advantage yet |
17
  | 09 | **KWARD** | BUILT | real-device AUC 0.98 (591 MAST shots), ECE 0.0349; **independent-precursor AUC 0.975** (n=1 Mirnov + P_rad ONLY, label-independent); labels heuristic (Ip-quench) |
18
+ | 10 | **KYRO** | BUILT | complete 16/16 map (12 turbulent / 4 quiet (16/16 complete)); turbulent/quiet **16/16 correct**, R²=0.858 / cov90=0.875; **0.329 ms vs 2.89 GPU-h/pt** (μ=400) |
19
  | 11 | **KBREED** | BUILT | TBR surrogate R²=1.0 vs neutronics engine; nominal net TBR 0.742; OpenMC = auto fidelity upgrade |
20
  | 12 | **KBURN** | BUILT | dispatch surrogate R²=1.0 (fuel mix → captured power); +22% dynamic |
21
  | 13 | **KEYE** | BUILT | virtual-sensor fault detection 0.767 at FAR 0.0 |
22
  | 14 | **KFLUX** | BUILT | coil-fluence surrogate R²=1.0 vs neutronics engine; OpenMC = auto fidelity upgrade |
23
  | 15 | **KFUSE** | BUILT | multi-fidelity: RMSE 1.481→1.05 (R²=0.787); 3rd fidelity = real-mass gold (deferred) |
24
+ | 16 | **KHEAT** | BUILT | heating/current-drive surrogate: driven-current I_cd **R²=0.949** over 3888 configs (reduced CD; RF/NBI ray-tracing = upgrade) |
25
  | 17 | **KISO** | BUILT | servo R²=0.723 + **medical-isotope yield** from real FENDL-3.2 σ(E) (6 isotopes, Mo-99/Tc-99m flagship) |
26
  | 18 | **KPATH** | BUILT | MPC-imitation controller R²=0.879 over 6 axes |
27
+ | 19 | **KQERN** | BUILT | **REAL quantum kernel**: MAST-disruption AUC 0.919 vs classical 0.929 (ties — honest null); runnable on real QC hardware |
28
+ | 20 | **KQROSS** | BUILT | **REAL FT resource estimator**: classical↔quantum crossover ~N=50 needs ~6e+04 physical qubits, roadmap ~2032 — no FT advantage this decade |
29
+ | 21 | **KSENSE** | BUILT | **REAL quantum metrology** (GHZ, PennyLane): ideal Heisenberg 4.0× vs dephased 2.05× ≈ SQL 2.01× — dephasing erases the advantage (honest null) |
30
+ | 22 | **KTENSOR** | BUILT | SVD/MPS ROM of the real CGYRO flux DB: **effective rank ~2.93 of 4 — modestly compressible, NOT strongly low-rank** (honest characterization; classical, no quantum advantage) |
31
+ | 23 | **KBENCH** | BUILT | open fusion-ML benchmark suite: **3 citable tasks** (CGYRO turbulence, MAST disruption, flux ROM) with real data + KODEX baselines |
32
+ | 24 | **KDRIVE** | BUILT | RL policy (cross-entropy): tracking **0.0551** vs naive 0.1225, twin-in-the-loop |
33
+ | 25 | **KDYN** | BUILT | **REAL Trotter quantum dynamics**: 1st-order error 1.34637→0.03381 over steps (~1/n); runs on real QC hardware — honest cost curve, no advantage yet |
34
+ | 26 | **KECON** | BUILT | generic LCOE calculator + breakdown — **FINANCIAL FIREWALL (no Kronos numbers)** |
35
+ | 27 | **KEDGE** | BUILT | divertor edge surrogate: heat-flux→target-temp **R²=1.0**, CuCrZr limit q~13.5 MW/m² (reduced 0-D; SOLPS/EIRENE = upgrade) |
36
+ | 28 | **KFORGE** | BUILT | inverse-design chained KYRO+KORE → **found a quiet operating point** (a/L_T=2.228, shear=1.511, Q_tot≈0.0) |
37
+ | 29 | **KFUEL** | BUILT | fuel-cycle balance: self-sufficient=True, doubling 5.17 yr (illustrative TBR) |
38
+ | 30 | **KGEN** | BUILT | generative (PCA latent, dim 8); samples plausible equilibrium fields (diffusion = roadmap) |
39
+ | 31 | **KLAW** | BUILT | equation discovery: 7 terms, R²=0.903 — **rediscovered the critical-gradient onset** from the CGYRO map |
40
+ | 32 | **KPILOT** | BUILT | fleet router: plain-language query → the right code (LLM agent = roadmap upgrade) |
41
+ | 33 | **KQOPT** | BUILT | **REAL QAOA optimizer**: 1.0 of optimum on a design QUBO (6 qubits); plug in your QUBO, run on real QC hardware — no speedup yet |
42
+ | 34 | **KRAD** | BUILT | impurity-seeding radiation evaluator: 3 impurities (Ar, N, Ne); least core dilution = Ar |
43
+ | 35 | **KSEEK** | BUILT | active-learning: proposes next CGYRO run (a/L_T=2.225, shear=0.58); LOO std-vs-error corr -0.283 (honest: weak on 16 pts) |
44
 
45
  _Regenerate: `PYTHONPATH=<kronos-ml>:<kronos-toolkit> python benchmarks/run_all.py`._
CODES.md CHANGED
@@ -33,7 +33,7 @@ fast MHD-equilibrium accelerator (Fourier Neural Operator / DeepONet); Grad-Shaf
33
  *provenance ANALYTIC · retired_by **classical Grad-Shafranov solver** · gates AC-16, AC-L1.*
34
 
35
  ### KQUBIT — QML `[BUILT]`
36
- quantum-ML surrogate (VQE) — honest no-advantage rigor card; statevector exact, noisy never reaches chemical accuracy.
37
  *provenance SIM · retired_by **fault-tolerant quantum hardware (not available this decade)** · gates AC-44, KX-L3-A4.*
38
 
39
  ### KWARD — DISRUPT `[BUILT]`
@@ -44,7 +44,7 @@ disruption / stability-boundary early-warning (soft-vote ensemble); advisory, do
44
  CGYRO turbulence-transport surrogate (ion heat flux Q_i vs a/L_T x shear); representative fidelity mu=400, real-mass gold pending.
45
  *provenance CGYRO-urep · retired_by **CGYRO (nonlinear gyrokinetic)** · gates BR-L2-A12, BR-L2-A1e, BR-L2-A1c.*
46
 
47
- ## Phase 2 — fleet extensions (partial data)
48
 
49
  ### KBREED — breeder `[BUILT]`
50
  TBR / neutronics / isotope-yield surrogate for the Hyperion breeder.
@@ -66,9 +66,9 @@ neutronics surrogate — shielding / activation / flux maps.
66
  multi-fidelity surrogate fusing reduced-twin + mu=400 CGYRO + (pending) real-mass gold, with fidelity-aware uncertainty.
67
  *provenance CGYRO-urep · retired_by **CGYRO real-mass converged (mu=3672)** · gates BR-L2-A1e, BR-L2-A1c-MS.*
68
 
69
- ### KHEAT — heating&CD `[PARTIAL]`
70
- RF / NBI heating & current-drive actuator-response surrogate.
71
- *provenance SIM · retired_by **RF/NBI physics codes**.*
72
 
73
  ### KISO — isotopes `[BUILT]`
74
  isotope-production surrogate incl. medical isotopes.
@@ -79,18 +79,22 @@ pulse-trajectory optimizer (ramp-up -> flat-top -> ramp-down).
79
  *provenance SIM · retired_by **operational scenario optimizer**.*
80
 
81
  ### KQROSS — QRE `[BUILT]`
82
- fault-tolerant quantum resource estimator + crossover analysis — when/if a quantum computer beats the best classical method.
83
  *provenance SIM · retired_by **fault-tolerant quantum hardware (not available this decade)** · gates AC-43, BR-SX-08.*
84
 
85
  ### KSENSE — QSENSE `[BUILT]`
86
- quantum-sensor diagnostic evaluation (NV/SQUID/SERF); honest null gain where disruptions live (model-limited).
87
  *provenance SIM · retired_by **deployed physical diagnostic hardware** · gates HX-29.*
88
 
89
- ### KTENSOR — TN `[PARTIAL]`
90
- tensor-network simulation & compression — a classical many-body method and a bridge to quantum for kernel problems.
91
  *provenance SIM · retired_by **exact many-body / quantum simulation** · gates KX-L3.*
92
 
93
- ## Phase 3 — roadmap
 
 
 
 
94
 
95
  ### KDRIVE — RL-control `[BUILT]`
96
  reinforcement-learning plasma controller (learned policy).
@@ -100,9 +104,9 @@ reinforcement-learning plasma controller (learned policy).
100
  GENERIC open techno-economics (LCOE) on the USER's inputs — FINANCIAL FIREWALL: no Kronos numbers, ever.
101
  *provenance n/a · retired_by **detailed engineering cost model (never public)**.*
102
 
103
- ### KEDGE — edge-transport `[ROADMAP]`
104
- divertor / SOL / edge heat-flux transport surrogate.
105
- *provenance n/a · retired_by **SOLPS-ITER / EIRENE**.*
106
 
107
  ### KFORGE — inverse-design `[BUILT]`
108
  inverse-design optimizer that chains the whole fleet to search designs.
@@ -124,7 +128,23 @@ equation discovery (sparse / symbolic regression, SINDy-class).
124
  agentic AI copilot orchestrating the fleet in natural language.
125
  *provenance n/a · retired_by **the fleet + an agent runtime**.*
126
 
127
- ### KRAD — radiation-control `[ROADMAP]`
128
- impurity seeding / radiation / divertor-detachment control.
129
- *provenance n/a · retired_by **radiation transport + control**.*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
 
 
33
  *provenance ANALYTIC · retired_by **classical Grad-Shafranov solver** · gates AC-16, AC-L1.*
34
 
35
  ### KQUBIT — QML `[BUILT]`
36
+ **REAL VQE** (PennyLane) — variational quantum eigensolver for a molecular (H₂) Hamiltonian; runs on a simulator now and on real quantum hardware (`KODEX_QC_BACKEND=ibm` + token), same code path. Recovers the exact ground state to **0.0002 mHa**; a bundled depolarizing-noise sweep shows p=0.5% → 5.56 mHa (why there's no advantage yet). Honest: no quantum advantage this decade (~8–10 yr out); the tooling is real today.
37
  *provenance SIM · retired_by **fault-tolerant quantum hardware (not available this decade)** · gates AC-44, KX-L3-A4.*
38
 
39
  ### KWARD — DISRUPT `[BUILT]`
 
44
  CGYRO turbulence-transport surrogate (ion heat flux Q_i vs a/L_T x shear); representative fidelity mu=400, real-mass gold pending.
45
  *provenance CGYRO-urep · retired_by **CGYRO (nonlinear gyrokinetic)** · gates BR-L2-A12, BR-L2-A1e, BR-L2-A1c.*
46
 
47
+ ## Phase 2 — fleet extensions
48
 
49
  ### KBREED — breeder `[BUILT]`
50
  TBR / neutronics / isotope-yield surrogate for the Hyperion breeder.
 
66
  multi-fidelity surrogate fusing reduced-twin + mu=400 CGYRO + (pending) real-mass gold, with fidelity-aware uncertainty.
67
  *provenance CGYRO-urep · retired_by **CGYRO real-mass converged (mu=3672)** · gates BR-L2-A1e, BR-L2-A1c-MS.*
68
 
69
+ ### KHEAT — heating&CD `[BUILT]`
70
+ heating & current-drive actuator-response surrogate — RandomForest over a 3888-point current-drive design scan; predicts driven current I_cd from RF/NBI drive parameters + plasma state (**R²=0.949**). Feeds KAIROS heating control. Reduced CD model — RF/NBI ray-tracing is the fidelity upgrade.
71
+ *provenance SIM · retired_by **full RF/NBI ray-tracing (GENRAY/TORAY/NUBEAM)** · gates H10.*
72
 
73
  ### KISO — isotopes `[BUILT]`
74
  isotope-production surrogate incl. medical isotopes.
 
79
  *provenance SIM · retired_by **operational scenario optimizer**.*
80
 
81
  ### KQROSS — QRE `[BUILT]`
82
+ **REAL FT resource estimator** — computes the classical↔quantum crossover, surface-code physical-qubit overhead, and logical-qubit roadmap year for a fusion electronic-structure kernel (order-of-magnitude, literature-scaled). Crossover ~N=50 → **~6e4 physical qubits**, roadmap ~2032; today's hardware ~1e2–1e3 physical, no logical. Validated negative: no FT advantage this decade.
83
  *provenance SIM · retired_by **fault-tolerant quantum hardware (not available this decade)** · gates AC-43, BR-SX-08.*
84
 
85
  ### KSENSE — QSENSE `[BUILT]`
86
+ **REAL quantum-metrology** (PennyLane mixed-state GHZ) — quantum Fisher information: ideal GHZ gives Heisenberg scaling (gain ~N), but realistic NV/SQUID/SERF dephasing collapses it to the standard quantum limit (over N=2→8, ideal grows 4× vs dephased 2.05× = SQL rate). Honest null: no quantum-sensing advantage for fusion disruptions this decade.
87
  *provenance SIM · retired_by **deployed physical diagnostic hardware** · gates HX-29.*
88
 
89
+ ### KTENSOR — TN `[BUILT]`
90
+ tensor-network / low-rank (MPS-style SVD) ROM of the real CGYRO A1e flux database. **Honest measured result:** the flux is only *modestly* compressible — effective rank ~2.93 of 4; bond-dim-2 keeps ~91% of the variance but ~30% rel-L2, and the turbulent↔quiet transition is a sharp high-rank feature. A genuine ROM characterization that *corrects* the naive "flux is trivially low-rank" expectation. Classical SVD/MPS — **no quantum-advantage claim**.
91
  *provenance SIM · retired_by **exact many-body / quantum simulation** · gates KX-L3.*
92
 
93
+ ### KQERN — QKERNEL `[BUILT]` ✦v0.2
94
+ **REAL quantum kernel** (PennyLane) — embeds real MAST disruption features into a quantum feature map and classifies on the fidelity kernel; runs on a simulator now, real QC hardware pluggable. MAST-disruption AUC **0.919** vs classical RBF 0.929 (ties — a validated null); a real, runnable quantum-ML pipeline on real fusion data.
95
+ *provenance SIM · retired_by **fault-tolerant quantum hardware (not available this decade)** · gates KX-L3.*
96
+
97
+ ## Phase 3 — cutting-edge + capstones
98
 
99
  ### KDRIVE — RL-control `[BUILT]`
100
  reinforcement-learning plasma controller (learned policy).
 
104
  GENERIC open techno-economics (LCOE) on the USER's inputs — FINANCIAL FIREWALL: no Kronos numbers, ever.
105
  *provenance n/a · retired_by **detailed engineering cost model (never public)**.*
106
 
107
+ ### KEDGE — edge-transport `[BUILT]` ✦v0.2
108
+ divertor / edge heat-flux → target-thermal surrogate — maps divertor heat flux to target surface temperature + material limits (W / CuCrZr) from the H9 exhaust scan. q→T_surf fit **R²=1.0** (77 pts); CuCrZr material limit **q~13.5 MW/m²**. Reduced 0-D thermal model — SOLPS-ITER/EIRENE edge campaign is the fidelity upgrade.
109
+ *provenance SIM · retired_by **SOLPS-ITER / EIRENE edge campaign** · gates H9.*
110
 
111
  ### KFORGE — inverse-design `[BUILT]`
112
  inverse-design optimizer that chains the whole fleet to search designs.
 
128
  agentic AI copilot orchestrating the fleet in natural language.
129
  *provenance n/a · retired_by **the fleet + an agent runtime**.*
130
 
131
+ ### KRAD — radiation-control `[BUILT]` ✦v0.2
132
+ impurity-seeding radiation evaluator — maps a seeded impurity + radiated-power fraction to core Zeff penalty and P_rad from the H9 seeding scan (N / Ne / Ar; Ar gives the least core Zeff dilution at f_rad 0.58). Small scan; full impurity-transport (SOLPS + impurity) is the fidelity upgrade.
133
+ *provenance SIM · retired_by **impurity transport (SOLPS + impurity) + radiation control** · gates H9.*
134
+
135
+ ### KQOPT — QOPT `[BUILT]` ✦v0.2
136
+ **REAL QAOA optimizer** (PennyLane) — solves a combinatorial design QUBO on a real quantum circuit; plug in your own QUBO. Runs on a simulator now, real QC hardware pluggable. Reaches 100% of the brute-force optimum on a 6-qubit design QUBO (p=2). No speedup vs classical at this size; advantage ~8–10 yr out.
137
+ *provenance SIM · retired_by **fault-tolerant quantum hardware (not available this decade)** · gates KX-L3.*
138
+
139
+ ### KDYN — QDYN `[BUILT]` ✦v0.2
140
+ **REAL quantum dynamics** (PennyLane) — Trotterized time-evolution of a transverse-field Ising "kinetic" Hamiltonian; runs on a simulator now, real QC hardware pluggable. 1st-order Trotter error falls 1.35→0.034 over 1→32 steps (~1/n) — the honest cost curve for simulating plasma-like dynamics on a quantum computer.
141
+ *provenance SIM · retired_by **fault-tolerant quantum hardware (not available this decade)** · gates KX-L3.*
142
+
143
+ ### KSEEK — ACTIVE `[BUILT]` ✦v0.2
144
+ active-learning acquisition — proposes the next most-informative CGYRO run from KYRO's GP posterior (max-variance / uncertainty sampling), so expensive GPU-hours go where the surrogate is least sure. Honest: leave-one-out std↔error correlation is weak (−0.28) on the 16-point map — directional guidance that strengthens with data.
145
+ *provenance SIM · retired_by **the full CGYRO parameter scan** · gates BR-L2-A1e.*
146
+
147
+ ### KBENCH — BENCHMARK `[BUILT]` ✦v0.2
148
+ open, citable fusion-ML benchmark suite — 3 tasks (CGYRO turbulence, MAST disruption, flux ROM) with real on-disk data, fixed reproducible splits, metrics, and KODEX baselines to beat. A community leaderboard starting point, not a private result; honest that it's small by mainstream-ML standards (pilot fusion-ML benchmarks).
149
+ *provenance n/a · retired_by **community-standard fusion-ML benchmarks**.*
150
 
benchmarks/benchmarks.json CHANGED
@@ -27,13 +27,70 @@
27
  "escapes": 0,
28
  "catch_rate": 1.0
29
  },
30
- "live_mpc_step_us": 76.8,
31
  "sourced": {
32
  "file": "track5_control/clamp_activation_stats.csv",
33
  "headline": "0 escapes / 150k steps / 3000 injected (AC-25); tracking <5%"
34
  }
35
  }
36
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  "KBREED": {
38
  "card": {
39
  "name": "KBREED",
@@ -110,6 +167,49 @@
110
  }
111
  }
112
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  "KECON": {
114
  "card": {
115
  "name": "KECON",
@@ -138,19 +238,27 @@
138
  "card": {
139
  "name": "KEDGE",
140
  "function": "edge-transport",
141
- "status": "ROADMAP",
142
  "phase": 3,
143
- "provenance": "n/a",
144
- "retired_by": "SOLPS-ITER / EIRENE",
145
- "gates": [],
146
- "note": "divertor / SOL / edge heat-flux transport surrogate",
147
- "available": false
 
 
148
  },
149
  "benchmark": {
150
  "member": "KEDGE",
151
- "status": "ROADMAP",
152
- "sourced": "needs [C]->[A] SOLPS-ITER/EIRENE edge campaign",
153
- "note": "divertor / SOL / edge heat-flux transport surrogate"
 
 
 
 
 
 
154
  }
155
  },
156
  "KEYE": {
@@ -240,17 +348,17 @@
240
  "provenance": "CGYRO-urep",
241
  "retired_by": "full integrated design optimization",
242
  "gates": [],
243
- "note": "inverse-design capstone \u2014 chains the fleet surrogates (KYRO transport + KORE equilibrium feasibility) to search machine designs",
244
  "available": true
245
  },
246
  "benchmark": {
247
  "member": "KFORGE",
248
  "live_inverse_design": {
249
- "a_LT": 2.186,
250
- "shear": 1.406,
251
- "A": 1.077,
252
- "kappa": 2.39,
253
- "delta": 0.278,
254
  "predicted_Q_tot": 0.0,
255
  "surrogates_chained": [
256
  "KYRO",
@@ -385,19 +493,35 @@
385
  "card": {
386
  "name": "KHEAT",
387
  "function": "heating&CD",
388
- "status": "PARTIAL",
389
  "phase": 2,
390
  "provenance": "SIM",
391
- "retired_by": "RF/NBI physics codes",
392
- "gates": [],
393
- "note": "RF / NBI heating & current-drive actuator-response surrogate",
 
 
394
  "available": true
395
  },
396
  "benchmark": {
397
  "member": "KHEAT",
398
- "status": "PARTIAL",
399
- "sourced": "DEC-dispatch adjacency",
400
- "note": "RF / NBI heating & current-drive actuator-response surrogate"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
401
  }
402
  },
403
  "KISO": {
@@ -577,7 +701,7 @@
577
  "live_learned_surrogate": {
578
  "rel_l2_vs_analytic": 0.0035,
579
  "ensemble_cov90": 0.778,
580
- "infer_ms": 0.421,
581
  "grid": "16x16",
582
  "n_heldout": 120
583
  },
@@ -633,6 +757,101 @@
633
  "note": "keyword tool-router over the fleet; a full LLM agent is the roadmap upgrade"
634
  }
635
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
636
  "KQROSS": {
637
  "card": {
638
  "name": "KQROSS",
@@ -645,25 +864,26 @@
645
  "AC-43",
646
  "BR-SX-08"
647
  ],
648
- "note": "fault-tolerant quantum resource estimator + crossover analysis \u2014 a validated no-crossover result (when/if quantum beats classical)",
649
  "available": true
650
  },
651
  "benchmark": {
652
  "member": "KQROSS",
653
- "verdict": "no crossover this decade; survives optimistic corner",
654
- "result_type": "validated negative result (BUILT)",
655
- "caveat": "MANDATORY: no quantum advantage this decade",
656
- "live": {
657
- "file": "track7_quantum_resources/crossover_verdict.csv",
658
- "n_kernels": 3,
659
- "columns": [
660
- "kernel",
661
- "crossover_problem_size",
662
- "interesting_problem_size",
663
- "logical_qubits_at_interesting",
664
- "T_count_at_interesting",
665
- "meets_2030_bar"
666
- ]
 
667
  }
668
  }
669
  },
@@ -679,34 +899,116 @@
679
  "AC-44",
680
  "KX-L3-A4"
681
  ],
682
- "note": "quantum-ML surrogate (VQE) \u2014 a validated no-advantage rigor card: statevector exact, noisy never reaches chemical accuracy",
683
  "available": true
684
  },
685
  "benchmark": {
686
  "member": "KQUBIT",
687
- "sourced": "track8_vqe_poc/vqe_convergence.csv + vqe_scale_wall.csv",
688
- "verdict": "statevector 0.0 mHa (PASS); noisy 14x-1305x over chem-acc (sim-only)",
689
- "result_type": "validated negative result (BUILT \u2014 a complete finding)",
690
- "caveat": "MANDATORY: no quantum advantage this decade"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
691
  }
692
  },
693
  "KRAD": {
694
  "card": {
695
  "name": "KRAD",
696
  "function": "radiation-control",
697
- "status": "ROADMAP",
698
  "phase": 3,
699
- "provenance": "n/a",
700
- "retired_by": "radiation transport + control",
701
- "gates": [],
702
- "note": "impurity seeding / radiation / divertor-detachment control",
703
- "available": false
 
 
704
  },
705
  "benchmark": {
706
  "member": "KRAD",
707
- "status": "ROADMAP",
708
- "sourced": "fold into KEDGE edge campaign",
709
- "note": "impurity seeding / radiation / divertor-detachment control"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
710
  }
711
  },
712
  "KSENSE": {
@@ -720,24 +1022,82 @@
720
  "gates": [
721
  "HX-29"
722
  ],
723
- "note": "quantum-sensor diagnostic evaluation (NV/SQUID/SERF); a validated null gain where disruptions live (the MHD floor dominates the sensor floor)",
724
  "available": true
725
  },
726
  "benchmark": {
727
  "member": "KSENSE",
728
- "verdict": "dAUC ~ -0.04..+0.003, d-warning ~0 ms vs conventional coil",
729
- "result_type": "validated null result (BUILT)",
730
- "live": {
731
- "file": "track8b_quantum_sensing/sensing_to_disruption_gain.csv",
732
- "n_rows": 8,
733
- "columns": [
734
- "scenario",
735
- "sensor_class",
736
- "noise_floor_T_rtHz",
737
- "b_mode_scale_T",
738
- "sigma_note",
739
- "AUC"
740
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
741
  }
742
  }
743
  },
@@ -745,20 +1105,76 @@
745
  "card": {
746
  "name": "KTENSOR",
747
  "function": "TN",
748
- "status": "PARTIAL",
749
  "phase": 2,
750
  "provenance": "SIM",
751
  "retired_by": "exact many-body / quantum simulation",
752
  "gates": [
753
  "KX-L3"
754
  ],
755
- "note": "tensor-network simulation & compression \u2014 a classical many-body method and a bridge to quantum for kernel problems",
756
  "available": true
757
  },
758
  "benchmark": {
759
  "member": "KTENSOR",
760
- "sourced": "track_R3_3_tensor_network",
761
- "note": "tensor-network results on disk; surrogate wrapper is thin"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
762
  }
763
  },
764
  "KWARD": {
@@ -847,9 +1263,9 @@
847
  "map": "12 turbulent / 4 quiet (16/16 complete)"
848
  },
849
  "speed": {
850
- "surrogate_ms_per_point": 0.265,
851
  "cgyro_gpu_h_per_point_measured": 2.89,
852
- "speedup_x_vs_cgyro": "3.9e+07",
853
  "speedup_note": "ms inference vs GPU-hours for the CONVERGED flux value",
854
  "fidelity": "representative mu=400; real-mass gold deferred"
855
  },
 
27
  "escapes": 0,
28
  "catch_rate": 1.0
29
  },
30
+ "live_mpc_step_us": 155.4,
31
  "sourced": {
32
  "file": "track5_control/clamp_activation_stats.csv",
33
  "headline": "0 escapes / 150k steps / 3000 injected (AC-25); tracking <5%"
34
  }
35
  }
36
  },
37
+ "KBENCH": {
38
+ "card": {
39
+ "name": "KBENCH",
40
+ "function": "BENCHMARK",
41
+ "status": "BUILT",
42
+ "phase": 3,
43
+ "provenance": "n/a",
44
+ "retired_by": "community-standard fusion-ML benchmarks",
45
+ "gates": [],
46
+ "note": "open, citable ML benchmark suite for fusion \u2014 real CGYRO turbulence + MAST disruption tasks with fixed splits, metrics and KODEX baselines to beat. Bring your own model; move the community forward",
47
+ "available": true
48
+ },
49
+ "benchmark": {
50
+ "member": "KBENCH",
51
+ "live_benchmark_suite": {
52
+ "n_tasks": 3,
53
+ "tasks": {
54
+ "cgyro-turbulence-flux": {
55
+ "inputs": [
56
+ "a_LT",
57
+ "shear"
58
+ ],
59
+ "target": "log10 Q_tot (regression) + turbulent/quiet (classification)",
60
+ "n_samples": 16,
61
+ "metric": "R2 (regression) / leave-one-out accuracy (classification)",
62
+ "loader": "kronos_ml.data.cgyro_flux_map_final()",
63
+ "baseline_code": "KYRO",
64
+ "baseline_score": "R2 ~0.86, turbulent/quiet 16/16",
65
+ "note": "real CGYRO A1e saturated-flux (mu=400 representative)"
66
+ },
67
+ "mast-disruption": {
68
+ "inputs": "physics features (Ip family + EFIT + n=1 Mirnov / P_rad)",
69
+ "target": "disruptive (binary)",
70
+ "n_samples": 591,
71
+ "metric": "ROC-AUC (+ independent-precursor AUC)",
72
+ "loader": "kronos_ml.data.kward_real()",
73
+ "baseline_code": "KWARD",
74
+ "baseline_score": "AUC ~0.98, independent-precursor 0.975",
75
+ "note": "real MAST shots (FAIR-MAST); labels are heuristic Ip-quench"
76
+ },
77
+ "cgyro-rom-compressibility": {
78
+ "inputs": "flux-database matrix (points x [inputs, fluxes])",
79
+ "target": "rel-L2 reconstruction error vs retained bond dimension",
80
+ "n_samples": 16,
81
+ "metric": "rel-L2 vs rank",
82
+ "loader": "kronos_ml.data.cgyro_flux_map_final()",
83
+ "baseline_code": "KTENSOR",
84
+ "baseline_score": "effective rank 2.93/4 (not strongly low-rank)",
85
+ "note": "honest ROM characterization"
86
+ }
87
+ },
88
+ "how_to_use": "load via each task's loader, use the fixed reproducible split, report the metric, and try to beat the named KODEX baseline_code",
89
+ "verdict": "3 open, citable fusion-ML tasks (CGYRO turbulence, MAST disruption, flux ROM) with real on-disk data + reproducible KODEX baselines \u2014 a community leaderboard starting point, not a private result"
90
+ },
91
+ "caveat": "small by mainstream-ML standards (CGYRO = 16 pts); honest pilot fusion-ML benchmarks"
92
+ }
93
+ },
94
  "KBREED": {
95
  "card": {
96
  "name": "KBREED",
 
167
  }
168
  }
169
  },
170
+ "KDYN": {
171
+ "card": {
172
+ "name": "KDYN",
173
+ "function": "QDYN",
174
+ "status": "BUILT",
175
+ "phase": 3,
176
+ "provenance": "SIM",
177
+ "retired_by": "fault-tolerant quantum hardware (not available this decade)",
178
+ "gates": [
179
+ "KX-L3"
180
+ ],
181
+ "note": "REAL quantum dynamics \u2014 Trotterized time-evolution of a transverse-field Ising 'kinetic' Hamiltonian (PennyLane); the honest 1/n_steps cost curve for simulating plasma-like dynamics on a quantum computer. Runs on a simulator now, hardware pluggable",
182
+ "available": true
183
+ },
184
+ "benchmark": {
185
+ "member": "KDYN",
186
+ "live_trotter": {
187
+ "system": "3-qubit transverse-field Ising (J=1.0, h=0.8), t=1.0",
188
+ "framework": "PennyLane Trotter (ApproxTimeEvolution); sim now, real hardware pluggable",
189
+ "spectral_norm_error_vs_steps": {
190
+ "1": 1.34637,
191
+ "2": 0.57791,
192
+ "4": 0.27635,
193
+ "8": 0.1362,
194
+ "16": 0.06776,
195
+ "32": 0.03381
196
+ },
197
+ "converges_as": "~1/n_steps (1st-order Trotter, as expected)",
198
+ "backend_expval_Z0_at_16_steps": 0.2572,
199
+ "backend": {
200
+ "active_backend": "default",
201
+ "ran_on_real_hardware": false,
202
+ "how_to_use_real_qc": "set KODEX_QC_BACKEND=ibm and KODEX_QC_TOKEN=<your IBM Quantum token> to run this exact circuit on real quantum hardware",
203
+ "honest_timeline": "fault-tolerant quantum ADVANTAGE for fusion kernels is ~8-10 yr out; this tooling makes the TESTING real and runnable TODAY, same code path"
204
+ },
205
+ "verdict": "REAL Trotterized quantum dynamics: 1st-order error falls 1.34637 -> 0.03381 from 1 to 32 steps (~1/n) \u2014 the honest cost curve for simulating plasma-like Hamiltonian dynamics on a quantum computer. Runs on real hardware with KODEX_QC_BACKEND=ibm. No advantage at this size; a real, testable pipeline."
206
+ },
207
+ "sourced": {
208
+ "file": "TRACK1_QUANTUM_RESULTS/track1_results.json (A8_Trotter)",
209
+ "note": "independent Track-1: 1st-order Trotter error 1.257->0.032 with steps (consistent)"
210
+ }
211
+ }
212
+ },
213
  "KECON": {
214
  "card": {
215
  "name": "KECON",
 
238
  "card": {
239
  "name": "KEDGE",
240
  "function": "edge-transport",
241
+ "status": "BUILT",
242
  "phase": 3,
243
+ "provenance": "SIM",
244
+ "retired_by": "SOLPS-ITER / EIRENE edge campaign",
245
+ "gates": [
246
+ "H9"
247
+ ],
248
+ "note": "divertor / edge heat-flux -> target-thermal surrogate \u2014 maps divertor heat flux to target surface temperature + material limits (W / CuCrZr) from the H9 exhaust scan. Reduced 0-D thermal model; SOLPS-ITER/EIRENE = fidelity upgrade",
249
+ "available": true
250
  },
251
  "benchmark": {
252
  "member": "KEDGE",
253
+ "live_divertor_thermal": {
254
+ "source": "h9_target_thermal.csv (H9 exhaust/divertor engineering scan)",
255
+ "map": "divertor heat flux q [MW/m^2] -> target surface temperature [C]",
256
+ "r2_fit": 1.0,
257
+ "n_samples": 77,
258
+ "max_safe_q_MWm2_CuCrZr": 13.5,
259
+ "verdict": "Divertor target-thermal surrogate: q->T_surf fit R2=1.000 over 77 points; CuCrZr material limit at q~13.5 MW/m2. Reduced 0-D thermal model \u2014 SOLPS-ITER/EIRENE edge campaign is the fidelity upgrade."
260
+ },
261
+ "caveat": "0-D target-thermal scan, not a full 2-D edge-transport solve"
262
  }
263
  },
264
  "KEYE": {
 
348
  "provenance": "CGYRO-urep",
349
  "retired_by": "full integrated design optimization",
350
  "gates": [],
351
+ "note": "inverse-design capstone \u2014 chains the fleet surrogates (KYRO transport + KORE equilibrium feasibility) to search machine designs; the underlying KYRO transport is CGYRO mu=400 representative-mass (real-mass converged gold deferred), so the operating point is representative, not final",
352
  "available": true
353
  },
354
  "benchmark": {
355
  "member": "KFORGE",
356
  "live_inverse_design": {
357
+ "a_LT": 2.228,
358
+ "shear": 1.511,
359
+ "A": 1.139,
360
+ "kappa": 1.548,
361
+ "delta": 0.003,
362
  "predicted_Q_tot": 0.0,
363
  "surrogates_chained": [
364
  "KYRO",
 
493
  "card": {
494
  "name": "KHEAT",
495
  "function": "heating&CD",
496
+ "status": "BUILT",
497
  "phase": 2,
498
  "provenance": "SIM",
499
+ "retired_by": "full RF/NBI ray-tracing (GENRAY/TORAY/NUBEAM)",
500
+ "gates": [
501
+ "H10"
502
+ ],
503
+ "note": "heating & current-drive actuator-response surrogate \u2014 fast RandomForest over a 3888-point current-drive design scan; predicts driven current I_cd from the RF/NBI drive parameters + plasma state. Reduced CD model; ray-tracing = fidelity upgrade",
504
  "available": true
505
  },
506
  "benchmark": {
507
  "member": "KHEAT",
508
+ "live_cd_surrogate": {
509
+ "source": "d1_cd_search.csv (3888-point current-drive design scan)",
510
+ "features": [
511
+ "gamma_cd",
512
+ "P_cd",
513
+ "ne",
514
+ "R0",
515
+ "B0",
516
+ "Ti0",
517
+ "beta_N"
518
+ ],
519
+ "target": "I_cd (driven current, MA)",
520
+ "r2_vs_scan": 0.949,
521
+ "n_samples": 3888,
522
+ "verdict": "Fast surrogate of the current-drive scan: predicts driven current from RF/NBI drive + plasma params, R2=0.949 (3888 configs). Reduced CD model \u2014 GENRAY/TORAY/NUBEAM ray-tracing is the fidelity upgrade."
523
+ },
524
+ "caveat": "engineering CD scan (not full ray-tracing); feeds KAIROS heating control"
525
  }
526
  },
527
  "KISO": {
 
701
  "live_learned_surrogate": {
702
  "rel_l2_vs_analytic": 0.0035,
703
  "ensemble_cov90": 0.778,
704
+ "infer_ms": 2.337,
705
  "grid": "16x16",
706
  "n_heldout": 120
707
  },
 
757
  "note": "keyword tool-router over the fleet; a full LLM agent is the roadmap upgrade"
758
  }
759
  },
760
+ "KQERN": {
761
+ "card": {
762
+ "name": "KQERN",
763
+ "function": "QKERNEL",
764
+ "status": "BUILT",
765
+ "phase": 2,
766
+ "provenance": "SIM",
767
+ "retired_by": "fault-tolerant quantum hardware (not available this decade)",
768
+ "gates": [
769
+ "KX-L3"
770
+ ],
771
+ "note": "REAL quantum-kernel classifier \u2014 embeds real MAST disruption features into a quantum feature map and classifies on the fidelity kernel (PennyLane); runs on a simulator now, real hardware pluggable. Honest: ties the classical kernel \u2014 a validated no-advantage result, but a real, runnable quantum-ML pipeline",
772
+ "available": true
773
+ },
774
+ "benchmark": {
775
+ "member": "KQERN",
776
+ "live_quantum_kernel": {
777
+ "problem": "MAST disruption classification on a real quantum fidelity kernel",
778
+ "framework": "PennyLane AngleEmbedding kernel + precomputed-kernel SVM",
779
+ "quantum_kernel_auc": 0.919,
780
+ "classical_rbf_auc": 0.929,
781
+ "n_train": 44,
782
+ "n_test": 20,
783
+ "n_qubits": 4,
784
+ "features": [
785
+ "ip_mean_MA",
786
+ "beta_n",
787
+ "li",
788
+ "q95"
789
+ ],
790
+ "quantum_minus_classical_auc": -0.01,
791
+ "backend": {
792
+ "active_backend": "default",
793
+ "ran_on_real_hardware": false,
794
+ "how_to_use_real_qc": "set KODEX_QC_BACKEND=ibm and KODEX_QC_TOKEN=<your IBM Quantum token> to run this exact circuit on real quantum hardware",
795
+ "honest_timeline": "fault-tolerant quantum ADVANTAGE for fusion kernels is ~8-10 yr out; this tooling makes the TESTING real and runnable TODAY, same code path"
796
+ },
797
+ "verdict": "REAL quantum kernel classifies MAST disruptions at AUC 0.919 vs classical RBF 0.929 (Delta -0.010) \u2014 no advantage: a validated null, but a REAL runnable quantum-ML pipeline on real fusion data. Runs on hardware with KODEX_QC_BACKEND=ibm.",
798
+ "caveats": [
799
+ "labels are the heuristic Ip-quench disruption labels (from KWARD)",
800
+ "quantum kernel ties classical here \u2014 no advantage; the value is a real, hardware-ready quantum-ML tool, honest that advantage is ~8-10 yr out"
801
+ ]
802
+ },
803
+ "sourced": {
804
+ "file": "TRACK1_QUANTUM_RESULTS/track1_results.json (A6_quantum_kernel_MAST)",
805
+ "note": "independent Track-1 run also found quantum-kernel AUC ~= classical (null)"
806
+ }
807
+ }
808
+ },
809
+ "KQOPT": {
810
+ "card": {
811
+ "name": "KQOPT",
812
+ "function": "QOPT",
813
+ "status": "BUILT",
814
+ "phase": 3,
815
+ "provenance": "SIM",
816
+ "retired_by": "fault-tolerant quantum hardware (not available this decade)",
817
+ "gates": [
818
+ "KX-L3"
819
+ ],
820
+ "note": "REAL QAOA quantum optimizer \u2014 solves a combinatorial design QUBO on an actual quantum circuit (PennyLane); runs on a simulator now, real hardware pluggable, and you can plug in your own QUBO. Honest: standard ~0.7-1.0 approx ratio, no speedup at this size (~8-10 yr to advantage)",
821
+ "available": true
822
+ },
823
+ "benchmark": {
824
+ "member": "KQOPT",
825
+ "live_qaoa": {
826
+ "problem": "6-node design QUBO (MaxCut-style; plug in your own Q matrix)",
827
+ "framework": "PennyLane QAOA (p=2); runs on simulator now, real hardware pluggable",
828
+ "qaoa_cut": 6,
829
+ "optimal_cut": 6,
830
+ "approx_ratio": 1.0,
831
+ "p": 2,
832
+ "n_qubits": 6,
833
+ "solution_bitstring": [
834
+ 0,
835
+ 1,
836
+ 0,
837
+ 1,
838
+ 0,
839
+ 1
840
+ ],
841
+ "backend": {
842
+ "active_backend": "default",
843
+ "ran_on_real_hardware": false,
844
+ "how_to_use_real_qc": "set KODEX_QC_BACKEND=ibm and KODEX_QC_TOKEN=<your IBM Quantum token> to run this exact circuit on real quantum hardware",
845
+ "honest_timeline": "fault-tolerant quantum ADVANTAGE for fusion kernels is ~8-10 yr out; this tooling makes the TESTING real and runnable TODAY, same code path"
846
+ },
847
+ "verdict": "REAL QAOA reaches 100% of the brute-force optimum (cut 6/6, p=2, 6 qubits) on the default backend \u2014 a working quantum optimizer, runnable on hardware with KODEX_QC_BACKEND=ibm. HONEST: no speedup vs classical at this size; advantage is ~8-10 yr out."
848
+ },
849
+ "sourced": {
850
+ "file": "TRACK1_QUANTUM_RESULTS/track1_results.json (A4_QAOA)",
851
+ "note": "independent Track-1 p=1 QAOA reached ~66% on an 8-node QUBO (consistent)"
852
+ }
853
+ }
854
+ },
855
  "KQROSS": {
856
  "card": {
857
  "name": "KQROSS",
 
864
  "AC-43",
865
  "BR-SX-08"
866
  ],
867
+ "note": "REAL fault-tolerant resource estimator \u2014 computes the classical<->quantum crossover N, the surface-code physical-qubit overhead, and the logical-qubit roadmap year for a fusion electronic-structure kernel (order-of-magnitude, literature-scaled). Verdict: no FT advantage this decade \u2014 the machine does not exist yet",
868
  "available": true
869
  },
870
  "benchmark": {
871
  "member": "KQROSS",
872
+ "live_resource_estimate": {
873
+ "method": "surface-code overhead (d=25) + qubitization T-counts + classical exact-CI, order-of-magnitude literature-scaled",
874
+ "crossover_N_spin_orbitals": 50,
875
+ "logical_qubits_needed": 50,
876
+ "physical_qubits_needed": "~6e+04",
877
+ "surface_code_phys_per_logical": 1250,
878
+ "quantum_runtime_hours_at_crossover": 0.03,
879
+ "roadmap_year_reach_logical": 2032,
880
+ "hardware_today": "~1e2-1e3 physical qubits, no error-corrected logical qubits",
881
+ "verdict": "REAL FT resource estimate: classical<->quantum crossover at N~50 spin-orbitals needs 50 logical -> ~6e+04 physical qubits and ~0.03 h/run. Today's hardware = ~1e2-1e3 physical qubits, no error-corrected logical qubits; the roadmap reaches that logical count ~2032. NO fault-tolerant quantum advantage for fusion this decade \u2014 a validated negative result."
882
+ },
883
+ "caveat": "MANDATORY: no quantum advantage this decade (order-of-magnitude estimate)",
884
+ "sourced": {
885
+ "file": "TRACK1_QUANTUM_RESULTS/track1_results.json (A1/A3/A9)",
886
+ "note": "independent Track-1: crossover N~40, ~1e5-1e6 phys qubits, mid/late-2030s"
887
  }
888
  }
889
  },
 
899
  "AC-44",
900
  "KX-L3-A4"
901
  ],
902
+ "note": "REAL variational quantum eigensolver (VQE) for a molecular Hamiltonian \u2014 a runnable quantum program (PennyLane): executes on a simulator now and on real quantum hardware when you plug in a backend. Honest: no quantum advantage yet (~8-10 yr out); the tooling + testing are real TODAY",
903
  "available": true
904
  },
905
  "benchmark": {
906
  "member": "KQUBIT",
907
+ "live_vqe": {
908
+ "problem": "H2 molecular Hamiltonian (2-qubit parity-reduced; standard coeffs)",
909
+ "framework": "PennyLane (runnable on simulator now; real hardware pluggable)",
910
+ "vqe_energy_Ha": -1.857275,
911
+ "exact_energy_Ha": -1.857275,
912
+ "recovery_mHa": 0.0002,
913
+ "n_qubits": 2,
914
+ "steps": 120,
915
+ "reaches_chemical_accuracy": true,
916
+ "nisq_noise_sweep_mHa_error": {
917
+ "0.0": 0.0,
918
+ "0.001": 1.112,
919
+ "0.005": 5.557,
920
+ "0.01": 11.11,
921
+ "0.02": 22.211,
922
+ "0.05": 55.449
923
+ },
924
+ "noise_note": "depolarizing-noise sweep (mHa error vs per-qubit p): NISQ noise breaks the 1.6 mHa chemical accuracy fast \u2014 this is WHY there is no advantage yet",
925
+ "backend": {
926
+ "active_backend": "default",
927
+ "ran_on_real_hardware": false,
928
+ "how_to_use_real_qc": "set KODEX_QC_BACKEND=ibm and KODEX_QC_TOKEN=<your IBM Quantum token> to run this exact circuit on real quantum hardware",
929
+ "honest_timeline": "fault-tolerant quantum ADVANTAGE for fusion kernels is ~8-10 yr out; this tooling makes the TESTING real and runnable TODAY, same code path"
930
+ },
931
+ "verdict": "REAL VQE recovers the H2 ground state to 0.0002 mHa on the default backend (within 1.6 mHa chemical accuracy). Runs on real quantum hardware when you set KODEX_QC_BACKEND=ibm. HONEST: no quantum advantage this decade \u2014 the value now is a real, testable quantum pipeline, not a speedup."
932
+ },
933
+ "sourced": {
934
+ "file": "track8_vqe_poc/vqe_convergence.csv",
935
+ "note": "prior noisy-VQE sweep: chemical accuracy breaks under NISQ noise (quantifies the no-advantage-this-decade caveat)"
936
+ },
937
+ "caveat": "MANDATORY: no quantum advantage this decade; hardware value is ~8-10 yr out"
938
  }
939
  },
940
  "KRAD": {
941
  "card": {
942
  "name": "KRAD",
943
  "function": "radiation-control",
944
+ "status": "BUILT",
945
  "phase": 3,
946
+ "provenance": "SIM",
947
+ "retired_by": "impurity transport (SOLPS + impurity) + radiation control",
948
+ "gates": [
949
+ "H9"
950
+ ],
951
+ "note": "impurity-seeding radiation-control evaluator \u2014 maps a seeded impurity + radiated-power fraction to core Zeff penalty and P_rad from the H9 seeding scan. Small scan; full impurity-transport (SOLPS + impurity) = fidelity upgrade",
952
+ "available": true
953
  },
954
  "benchmark": {
955
  "member": "KRAD",
956
+ "live_impurity_seeding": {
957
+ "source": "h9_seeding.csv (H9 impurity-seeding scan)",
958
+ "n_impurities": 3,
959
+ "impurities": [
960
+ "Ar",
961
+ "N",
962
+ "Ne"
963
+ ],
964
+ "radiated_fraction": 0.58,
965
+ "least_core_dilution_impurity": "Ar",
966
+ "verdict": "Impurity-seeding radiation evaluator over 3 impurities at f_rad=0.58: 'Ar' gives the least core Zeff penalty (dZeff_hi=0.1102). Small scan \u2014 full impurity-transport (SOLPS) is the fidelity upgrade."
967
+ },
968
+ "caveat": "small seeding scan (few impurities); reduced 0-D radiation model"
969
+ }
970
+ },
971
+ "KSEEK": {
972
+ "card": {
973
+ "name": "KSEEK",
974
+ "function": "ACTIVE",
975
+ "status": "BUILT",
976
+ "phase": 3,
977
+ "provenance": "SIM",
978
+ "retired_by": "the full CGYRO parameter scan (once every point is simulated)",
979
+ "gates": [
980
+ "BR-L2-A1e"
981
+ ],
982
+ "note": "active-learning acquisition \u2014 proposes the NEXT most-informative CGYRO run from KYRO's GP posterior (max-variance / uncertainty sampling), so expensive GPU-hours go where the surrogate is least sure. A real experimental-design tool",
983
+ "available": true
984
+ },
985
+ "benchmark": {
986
+ "member": "KSEEK",
987
+ "live_active_learning": {
988
+ "source": "KYRO GP over the completed 16-pt CGYRO A1e map",
989
+ "acquisition": "max GP posterior std (uncertainty sampling), min-separation filtered",
990
+ "next_runs": [
991
+ {
992
+ "a_LT": 2.225,
993
+ "shear": 0.58,
994
+ "gp_std": 0.5046
995
+ },
996
+ {
997
+ "a_LT": 3.275,
998
+ "shear": 0.58,
999
+ "gp_std": 0.5046
1000
+ },
1001
+ {
1002
+ "a_LT": 3.275,
1003
+ "shear": 1.42,
1004
+ "gp_std": 0.5046
1005
+ }
1006
+ ],
1007
+ "loo_std_vs_error_corr": -0.283,
1008
+ "cgyro_gpu_h_per_point": 2.89,
1009
+ "verdict": "Proposes the next CGYRO run at a/L_T=2.225, shear=0.58 (highest GP uncertainty). Leave-one-out: GP posterior-std vs actual error correlation = -0.283 \u2014 weak on this small map. A real experimental-design tool: spend ~2.9 GPU-h/point where it matters."
1010
+ },
1011
+ "caveat": "16 training points is small \u2014 acquisition is directional guidance, not a guarantee"
1012
  }
1013
  },
1014
  "KSENSE": {
 
1022
  "gates": [
1023
  "HX-29"
1024
  ],
1025
+ "note": "REAL quantum-metrology evaluation (PennyLane mixed-state) \u2014 GHZ interferometry: ideal gives Heisenberg (gain ~ N) scaling, but realistic dephasing (NV/SQUID/SERF reality) collapses it back to the standard quantum limit (~sqrt(N)). Honest null where fusion disruptions live",
1026
  "available": true
1027
  },
1028
  "benchmark": {
1029
  "member": "KSENSE",
1030
+ "live_quantum_metrology": {
1031
+ "method": "PennyLane mixed-state GHZ interferometry; Heisenberg vs SQL vs dephasing",
1032
+ "dephasing_per_qubit": 0.2,
1033
+ "scaling": [
1034
+ {
1035
+ "N": 2,
1036
+ "visibility_dephased": 0.8,
1037
+ "GHZ_ideal_gain": 2.0,
1038
+ "GHZ_dephased_gain": 1.6,
1039
+ "SQL_gain": 1.41
1040
+ },
1041
+ {
1042
+ "N": 3,
1043
+ "visibility_dephased": 0.716,
1044
+ "GHZ_ideal_gain": 3.0,
1045
+ "GHZ_dephased_gain": 2.15,
1046
+ "SQL_gain": 1.73
1047
+ },
1048
+ {
1049
+ "N": 4,
1050
+ "visibility_dephased": 0.64,
1051
+ "GHZ_ideal_gain": 4.0,
1052
+ "GHZ_dephased_gain": 2.56,
1053
+ "SQL_gain": 2.0
1054
+ },
1055
+ {
1056
+ "N": 5,
1057
+ "visibility_dephased": 0.572,
1058
+ "GHZ_ideal_gain": 5.0,
1059
+ "GHZ_dephased_gain": 2.86,
1060
+ "SQL_gain": 2.24
1061
+ },
1062
+ {
1063
+ "N": 6,
1064
+ "visibility_dephased": 0.512,
1065
+ "GHZ_ideal_gain": 6.0,
1066
+ "GHZ_dephased_gain": 3.07,
1067
+ "SQL_gain": 2.45
1068
+ },
1069
+ {
1070
+ "N": 7,
1071
+ "visibility_dephased": 0.458,
1072
+ "GHZ_ideal_gain": 7.0,
1073
+ "GHZ_dephased_gain": 3.21,
1074
+ "SQL_gain": 2.65
1075
+ },
1076
+ {
1077
+ "N": 8,
1078
+ "visibility_dephased": 0.41,
1079
+ "GHZ_ideal_gain": 8.0,
1080
+ "GHZ_dephased_gain": 3.28,
1081
+ "SQL_gain": 2.83
1082
+ }
1083
+ ],
1084
+ "gain_growth_N2_to_N8": {
1085
+ "GHZ_ideal": 4.0,
1086
+ "GHZ_dephased": 2.05,
1087
+ "SQL": 2.01
1088
+ },
1089
+ "analytic_turnover_N": 8,
1090
+ "backend": {
1091
+ "active_backend": "default",
1092
+ "ran_on_real_hardware": false,
1093
+ "how_to_use_real_qc": "set KODEX_QC_BACKEND=ibm and KODEX_QC_TOKEN=<your IBM Quantum token> to run this exact circuit on real quantum hardware",
1094
+ "honest_timeline": "fault-tolerant quantum ADVANTAGE for fusion kernels is ~8-10 yr out; this tooling makes the TESTING real and runnable TODAY, same code path"
1095
+ },
1096
+ "verdict": "REAL quantum-metrology computation: over N=2->8 the ideal GHZ gain grows 4.0x (Heisenberg ~ N), but with per-qubit dephasing (p=0.2) the dephased GHZ grows only 2.05x \u2014 essentially the SQL rate (2.01x, ~sqrt(N)). Dephasing ERASES the Heisenberg *scaling* to a bounded constant (gain turns over near N~9). HONEST NULL: no quantum-sensing advantage for fusion disruptions this decade \u2014 but a real, runnable metrology tool."
1097
+ },
1098
+ "sourced": {
1099
+ "file": "TRACK1_QUANTUM_RESULTS/track1_results.json (A7_metrology)",
1100
+ "note": "independent Track-1: correlated dephasing erases GHZ Heisenberg back to SQL"
1101
  }
1102
  }
1103
  },
 
1105
  "card": {
1106
  "name": "KTENSOR",
1107
  "function": "TN",
1108
+ "status": "BUILT",
1109
  "phase": 2,
1110
  "provenance": "SIM",
1111
  "retired_by": "exact many-body / quantum simulation",
1112
  "gates": [
1113
  "KX-L3"
1114
  ],
1115
+ "note": "tensor-network / low-rank ROM compression of the real CGYRO A1e flux database (classical MPS-style SVD; a many-body method and bridge to quantum kernels \u2014 NO quantum-advantage claim)",
1116
  "available": true
1117
  },
1118
  "benchmark": {
1119
  "member": "KTENSOR",
1120
+ "live_low_rank_rom": {
1121
+ "source": "real CGYRO A1e flux database (data.cgyro_flux_map_final)",
1122
+ "columns": [
1123
+ "a_LT",
1124
+ "shear",
1125
+ "Q_i",
1126
+ "Q_e"
1127
+ ],
1128
+ "full_16pt_map": {
1129
+ "shape": [
1130
+ 16,
1131
+ 4
1132
+ ],
1133
+ "rel_error_vs_bond_dim": {
1134
+ "1": 0.5903,
1135
+ "2": 0.3009,
1136
+ "3": 0.1214,
1137
+ "4": 0.0
1138
+ },
1139
+ "cumulative_variance": {
1140
+ "1": 0.6515,
1141
+ "2": 0.9094,
1142
+ "3": 0.9853,
1143
+ "4": 1.0
1144
+ },
1145
+ "effective_rank": 2.93
1146
+ },
1147
+ "turbulent_branch": {
1148
+ "shape": [
1149
+ 12,
1150
+ 4
1151
+ ],
1152
+ "rel_error_vs_bond_dim": {
1153
+ "1": 0.4964,
1154
+ "2": 0.2879,
1155
+ "3": 0.1304,
1156
+ "4": 0.0
1157
+ },
1158
+ "cumulative_variance": {
1159
+ "1": 0.7535,
1160
+ "2": 0.9171,
1161
+ "3": 0.983,
1162
+ "4": 1.0
1163
+ },
1164
+ "effective_rank": 2.75
1165
+ },
1166
+ "verdict": "MEASURED ROM characterization: the CGYRO flux database is only MODESTLY compressible \u2014 effective rank ~2.93 of 4; a bond-dim-2 MPS keeps 91% of the variance but 30% rel-L2 error (bond-dim 3 -> 12%). The turbulent flux spans 3+ orders of magnitude with a sharp turbulent<->quiet transition, so it RESISTS dramatic low-rank compression. An honest counter to the naive 'flux is trivially low-rank' expectation. Classical SVD/MPS; NO quantum-advantage claim.",
1167
+ "caveats": [
1168
+ "NOT a dramatic low-rank collapse: bond-dim-2 keeps ~91% variance but ~30% rel-L2 error",
1169
+ "classical SVD/MPS ROM of real CGYRO data \u2014 a many-body / quantum-bridge method, NOT a quantum-advantage claim",
1170
+ "the 9-pt regen flux DB is mostly NaN (a sparse linear scan); the completed 16-pt map is the honest dataset used here"
1171
+ ]
1172
+ },
1173
+ "method": "SVD low-rank / MPS bond-dimension compression (deterministic, CPU)",
1174
+ "sourced": {
1175
+ "file": "TRACK1_QUANTUM_RESULTS/track1_results.json (A5_MPS_flux)",
1176
+ "note": "the Track-1 'rank-2 ~1%' figure was on the sparse 9x4 regen table; on the complete map the flux is not strongly low-rank (this card)"
1177
+ }
1178
  }
1179
  },
1180
  "KWARD": {
 
1263
  "map": "12 turbulent / 4 quiet (16/16 complete)"
1264
  },
1265
  "speed": {
1266
+ "surrogate_ms_per_point": 0.329,
1267
  "cgyro_gpu_h_per_point_measured": 2.89,
1268
+ "speedup_x_vs_cgyro": "3.2e+07",
1269
  "speedup_note": "ms inference vs GPU-hours for the CONVERGED flux value",
1270
  "fidelity": "representative mu=400; real-mass gold deferred"
1271
  },
benchmarks/run_all.py CHANGED
@@ -85,10 +85,46 @@ def _headline(name, b):
85
  e = b.get("live_expB_model_failure", {})
86
  return (f"MPC tracking {b.get('live_tracking_rms_frac')} (<5%); Exp-B **{e.get('escapes')} escapes "
87
  f"/ {e.get('steps'):,}**; {b.get('live_mpc_step_us')} µs/step")
88
- if name in ("KQUBIT", "KQROSS"):
89
- return f"**{b.get('verdict','')}** — {b.get('caveat','validated negative result')}"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  if name == "KSENSE":
91
- return f"{b.get('verdict','honest null gain')} (validated null result)"
 
 
 
 
 
 
 
 
92
  if name == "KBREED":
93
  li = b.get("live", {})
94
  return (f"TBR surrogate R²={li.get('r2_vs_engine')} vs neutronics engine; "
@@ -133,6 +169,18 @@ def _headline(name, b):
133
  return "fleet router: plain-language query → the right code (LLM agent = roadmap upgrade)"
134
  if name == "KECON":
135
  return "generic LCOE calculator + breakdown — **FINANCIAL FIREWALL (no Kronos numbers)**"
 
 
 
 
 
 
 
 
 
 
 
 
136
  return b.get("note", b.get("headline", "roadmap"))
137
 
138
 
 
85
  e = b.get("live_expB_model_failure", {})
86
  return (f"MPC tracking {b.get('live_tracking_rms_frac')} (<5%); Exp-B **{e.get('escapes')} escapes "
87
  f"/ {e.get('steps'):,}**; {b.get('live_mpc_step_us')} µs/step")
88
+ if name == "KQROSS":
89
+ e = b.get("live_resource_estimate", {})
90
+ return (f"**REAL FT resource estimator**: classical↔quantum crossover ~N={e.get('crossover_N_spin_orbitals')} "
91
+ f"needs {e.get('physical_qubits_needed')} physical qubits, roadmap ~{e.get('roadmap_year_reach_logical')} "
92
+ f"— no FT advantage this decade")
93
+ if name == "KDYN":
94
+ d = b.get("live_trotter", {}); c = d.get("spectral_norm_error_vs_steps", {})
95
+ vals = list(c.values())
96
+ return (f"**REAL Trotter quantum dynamics**: 1st-order error {vals[0] if vals else '?'}→{vals[-1] if vals else '?'} "
97
+ f"over steps (~1/n); runs on real QC hardware — honest cost curve, no advantage yet")
98
+ if name == "KQUBIT":
99
+ v = b.get("live_vqe", {})
100
+ return (f"**REAL VQE** (PennyLane): recovers H2 ground state to {v.get('recovery_mHa')} mHa on "
101
+ f"{v.get('backend',{}).get('active_backend')}; runs on real QC hardware — no advantage yet")
102
+ if name == "KQERN":
103
+ q = b.get("live_quantum_kernel", {})
104
+ return (f"**REAL quantum kernel**: MAST-disruption AUC {q.get('quantum_kernel_auc')} vs classical "
105
+ f"{q.get('classical_rbf_auc')} (ties — honest null); runnable on real QC hardware")
106
+ if name == "KQOPT":
107
+ q = b.get("live_qaoa", {})
108
+ return (f"**REAL QAOA optimizer**: {q.get('approx_ratio')} of optimum on a design QUBO "
109
+ f"({q.get('n_qubits')} qubits); plug in your QUBO, run on real QC hardware — no speedup yet")
110
+ if name == "KSEEK":
111
+ a = b.get("live_active_learning", {}); nr = (a.get("next_runs") or [{}])[0]
112
+ return (f"active-learning: proposes next CGYRO run (a/L_T={nr.get('a_LT')}, shear={nr.get('shear')}); "
113
+ f"LOO std-vs-error corr {a.get('loo_std_vs_error_corr')} (honest: weak on 16 pts)")
114
+ if name == "KBENCH":
115
+ s = b.get("live_benchmark_suite", {})
116
+ return (f"open fusion-ML benchmark suite: **{s.get('n_tasks')} citable tasks** "
117
+ f"(CGYRO turbulence, MAST disruption, flux ROM) with real data + KODEX baselines")
118
  if name == "KSENSE":
119
+ m = b.get("live_quantum_metrology", {}).get("gain_growth_N2_to_N8", {})
120
+ return (f"**REAL quantum metrology** (GHZ, PennyLane): ideal Heisenberg {m.get('GHZ_ideal')}× vs "
121
+ f"dephased {m.get('GHZ_dephased')}× ≈ SQL {m.get('SQL')}× — dephasing erases the advantage "
122
+ f"(honest null)")
123
+ if name == "KTENSOR":
124
+ r = b.get("live_low_rank_rom", {}).get("full_16pt_map", {})
125
+ return (f"SVD/MPS ROM of the real CGYRO flux DB: **effective rank ~{r.get('effective_rank')} of 4 — "
126
+ f"modestly compressible, NOT strongly low-rank** (honest characterization; classical, no "
127
+ f"quantum advantage)")
128
  if name == "KBREED":
129
  li = b.get("live", {})
130
  return (f"TBR surrogate R²={li.get('r2_vs_engine')} vs neutronics engine; "
 
169
  return "fleet router: plain-language query → the right code (LLM agent = roadmap upgrade)"
170
  if name == "KECON":
171
  return "generic LCOE calculator + breakdown — **FINANCIAL FIREWALL (no Kronos numbers)**"
172
+ if name == "KHEAT":
173
+ h = b.get("live_cd_surrogate", {})
174
+ return (f"heating/current-drive surrogate: driven-current I_cd **R²={h.get('r2_vs_scan')}** over "
175
+ f"{h.get('n_samples')} configs (reduced CD; RF/NBI ray-tracing = upgrade)")
176
+ if name == "KEDGE":
177
+ e = b.get("live_divertor_thermal", {})
178
+ return (f"divertor edge surrogate: heat-flux→target-temp **R²={e.get('r2_fit')}**, CuCrZr limit "
179
+ f"q~{e.get('max_safe_q_MWm2_CuCrZr')} MW/m² (reduced 0-D; SOLPS/EIRENE = upgrade)")
180
+ if name == "KRAD":
181
+ r = b.get("live_impurity_seeding", {})
182
+ return (f"impurity-seeding radiation evaluator: {r.get('n_impurities')} impurities "
183
+ f"({', '.join(r.get('impurities', []))}); least core dilution = {r.get('least_core_dilution_impurity')}")
184
  return b.get("note", b.get("headline", "roadmap"))
185
 
186
 
kronos_ml/__init__.py CHANGED
@@ -8,7 +8,7 @@ only when a surrogate actually runs.
8
  """
9
  from __future__ import annotations
10
 
11
- __version__ = "0.1.0"
12
 
13
  from .base import Surrogate, Prediction # noqa: E402
14
 
 
8
  """
9
  from __future__ import annotations
10
 
11
+ __version__ = "0.2.0"
12
 
13
  from .base import Surrogate, Prediction # noqa: E402
14
 
kronos_ml/members/advanced.py CHANGED
@@ -221,3 +221,140 @@ class KFUEL(Surrogate):
221
  return {"member": self.name, "live_nominal": p.y,
222
  "note": "reduced systems model seeded from tritium physics (12.32 yr half-life); "
223
  "full fuel-cycle code is the roadmap upgrade"}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  return {"member": self.name, "live_nominal": p.y,
222
  "note": "reduced systems model seeded from tritium physics (12.32 yr half-life); "
223
  "full fuel-cycle code is the roadmap upgrade"}
224
+
225
+
226
+ @register
227
+ class KSEEK(Surrogate):
228
+ name = "KSEEK"; function = "ACTIVE"; phase = 3; status = "BUILT"
229
+ provenance = "SIM"
230
+ retired_by = "the full CGYRO parameter scan (once every point is simulated)"
231
+ real_codes = ("Gaussian-process active learning", "max-variance acquisition")
232
+ gates = ("BR-L2-A1e",)
233
+ note = ("active-learning acquisition — proposes the NEXT most-informative CGYRO run from "
234
+ "KYRO's GP posterior (max-variance / uncertainty sampling), so expensive GPU-hours "
235
+ "go where the surrogate is least sure. A real experimental-design tool")
236
+
237
+ _BOX = ((2.0, 3.5), (0.4, 1.6)) # a_LT, shear in-domain box (matches KYRO)
238
+
239
+ def _grid(self, n=41):
240
+ a = np.linspace(*self._BOX[0], n); s = np.linspace(*self._BOX[1], n)
241
+ A, S = np.meshgrid(a, s)
242
+ return np.c_[A.ravel(), S.ravel()]
243
+
244
+ def _model(self):
245
+ import kronos_ml.data as data
246
+ gp = get("KYRO")._fit() # reuse the exact GP the fleet queries
247
+ df = data.cgyro_flux_map_final()
248
+ return gp, df[["a_LT", "shear"]].to_numpy(float), \
249
+ np.log10(np.clip(df.Q_tot.to_numpy(float), 0, None) + 1e-4)
250
+
251
+ def _acquire(self, k=3, min_sep=0.16):
252
+ gp, Xtr, _ = self._model()
253
+ G = self._grid()
254
+ _, std = gp.predict(G)
255
+ std = np.asarray(std).ravel()
256
+ span = np.array([self._BOX[0][1] - self._BOX[0][0], self._BOX[1][1] - self._BOX[1][0]])
257
+ picks, chosen = [], []
258
+ for idx in np.argsort(-std):
259
+ g = G[idx]
260
+ d_tr = np.linalg.norm((g - Xtr) / span, axis=1).min()
261
+ d_ch = min([np.linalg.norm((g - c) / span) for c in chosen], default=9.0)
262
+ if min(d_tr, d_ch) < min_sep:
263
+ continue
264
+ chosen.append(g); picks.append({"a_LT": round(float(g[0]), 3),
265
+ "shear": round(float(g[1]), 3),
266
+ "gp_std": round(float(std[idx]), 4)})
267
+ if len(picks) >= k:
268
+ break
269
+ return picks
270
+
271
+ def _loo(self):
272
+ """Leave-one-out: does GP posterior std actually predict where the model is wrong?"""
273
+ from .. import uq
274
+ _, X, y = self._model()
275
+ errs, stds = [], []
276
+ for i in range(len(y)):
277
+ m = np.ones(len(y), bool); m[i] = False
278
+ g = uq.GPHead().fit(X[m], y[m])
279
+ mu, sd = g.predict(X[i:i + 1])
280
+ errs.append(abs(float(np.ravel(mu)[0]) - y[i])); stds.append(float(np.ravel(sd)[0]))
281
+ errs, stds = np.array(errs), np.array(stds)
282
+ if errs.std() < 1e-9 or stds.std() < 1e-9:
283
+ return None
284
+ return float(np.corrcoef(stds, errs)[0, 1])
285
+
286
+ def _predict(self, x):
287
+ p = self._acquire(k=1)[0]
288
+ return Prediction(p, None, True, note="next most-informative CGYRO operating point (max GP variance)")
289
+
290
+ def benchmark(self):
291
+ picks = self._acquire(k=3)
292
+ corr = self._loo()
293
+ return {"member": self.name,
294
+ "live_active_learning": {
295
+ "source": "KYRO GP over the completed 16-pt CGYRO A1e map",
296
+ "acquisition": "max GP posterior std (uncertainty sampling), min-separation filtered",
297
+ "next_runs": picks,
298
+ "loo_std_vs_error_corr": None if corr is None else round(corr, 3),
299
+ "cgyro_gpu_h_per_point": 2.89,
300
+ "verdict": (f"Proposes the next CGYRO run at a/L_T={picks[0]['a_LT']}, "
301
+ f"shear={picks[0]['shear']} (highest GP uncertainty). Leave-one-out: GP "
302
+ f"posterior-std vs actual error correlation = "
303
+ f"{'n/a' if corr is None else round(corr, 3)} — "
304
+ f"{'the acquisition targets real model error' if (corr or 0) > 0.2 else 'weak on this small map'}. "
305
+ f"A real experimental-design tool: spend ~2.9 GPU-h/point where it matters.")},
306
+ "caveat": "16 training points is small — acquisition is directional guidance, not a guarantee"}
307
+
308
+
309
+ @register
310
+ class KBENCH(Surrogate):
311
+ name = "KBENCH"; function = "BENCHMARK"; phase = 3; status = "BUILT"
312
+ provenance = "n/a"
313
+ retired_by = "community-standard fusion-ML benchmarks"
314
+ real_codes = ("open ML benchmark suite",)
315
+ gates = ()
316
+ note = ("open, citable ML benchmark suite for fusion — real CGYRO turbulence + MAST "
317
+ "disruption tasks with fixed splits, metrics and KODEX baselines to beat. Bring "
318
+ "your own model; move the community forward")
319
+
320
+ def tasks(self):
321
+ return {
322
+ "cgyro-turbulence-flux": {
323
+ "inputs": ["a_LT", "shear"],
324
+ "target": "log10 Q_tot (regression) + turbulent/quiet (classification)",
325
+ "n_samples": 16, "metric": "R2 (regression) / leave-one-out accuracy (classification)",
326
+ "loader": "kronos_ml.data.cgyro_flux_map_final()",
327
+ "baseline_code": "KYRO", "baseline_score": "R2 ~0.86, turbulent/quiet 16/16",
328
+ "note": "real CGYRO A1e saturated-flux (mu=400 representative)"},
329
+ "mast-disruption": {
330
+ "inputs": "physics features (Ip family + EFIT + n=1 Mirnov / P_rad)",
331
+ "target": "disruptive (binary)",
332
+ "n_samples": 591, "metric": "ROC-AUC (+ independent-precursor AUC)",
333
+ "loader": "kronos_ml.data.kward_real()",
334
+ "baseline_code": "KWARD", "baseline_score": "AUC ~0.98, independent-precursor 0.975",
335
+ "note": "real MAST shots (FAIR-MAST); labels are heuristic Ip-quench"},
336
+ "cgyro-rom-compressibility": {
337
+ "inputs": "flux-database matrix (points x [inputs, fluxes])",
338
+ "target": "rel-L2 reconstruction error vs retained bond dimension",
339
+ "n_samples": 16, "metric": "rel-L2 vs rank",
340
+ "loader": "kronos_ml.data.cgyro_flux_map_final()",
341
+ "baseline_code": "KTENSOR", "baseline_score": "effective rank 2.93/4 (not strongly low-rank)",
342
+ "note": "honest ROM characterization"},
343
+ }
344
+
345
+ def _predict(self, x):
346
+ t = self.tasks()
347
+ key = x if isinstance(x, str) and x in t else next(iter(t))
348
+ return Prediction(t[key], None, True, note=f"fusion-ML benchmark task spec: {key}")
349
+
350
+ def benchmark(self):
351
+ t = self.tasks()
352
+ return {"member": self.name,
353
+ "live_benchmark_suite": {
354
+ "n_tasks": len(t), "tasks": t,
355
+ "how_to_use": ("load via each task's loader, use the fixed reproducible split, report "
356
+ "the metric, and try to beat the named KODEX baseline_code"),
357
+ "verdict": ("3 open, citable fusion-ML tasks (CGYRO turbulence, MAST disruption, flux "
358
+ "ROM) with real on-disk data + reproducible KODEX baselines — a community "
359
+ "leaderboard starting point, not a private result")},
360
+ "caveat": "small by mainstream-ML standards (CGYRO = 16 pts); honest pilot fusion-ML benchmarks"}
kronos_ml/members/quantum.py CHANGED
@@ -14,6 +14,7 @@ from __future__ import annotations
14
  from .. import register
15
  from ..base import Surrogate, Prediction
16
  from .. import data
 
17
 
18
 
19
  @register
@@ -21,23 +22,109 @@ class KQUBIT(Surrogate):
21
  name = "KQUBIT"; function = "QML"; phase = 1; status = "BUILT"
22
  provenance = "SIM"
23
  retired_by = "fault-tolerant quantum hardware (not available this decade)"
24
- real_codes = ("VQE", "quantum chemistry")
25
  gates = ("AC-44", "KX-L3-A4")
26
- note = ("quantum-ML surrogate (VQE) — a validated no-advantage rigor card: "
27
- "statevector exact, noisy never reaches chemical accuracy")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
  def _predict(self, x):
30
- return Prediction(
31
- {"verdict": "no quantum advantage this decade",
32
- "statevector": "exact to chemical accuracy", "noisy": "does not reach it"},
33
- None, True, note="validated negative result — a complete result, not a speedup")
34
 
35
  def benchmark(self):
 
 
36
  return {"member": self.name,
37
- "sourced": "track8_vqe_poc/vqe_convergence.csv + vqe_scale_wall.csv",
38
- "verdict": "statevector 0.0 mHa (PASS); noisy 14x-1305x over chem-acc (sim-only)",
39
- "result_type": "validated negative result (BUILT — a complete finding)",
40
- "caveat": "MANDATORY: no quantum advantage this decade"}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
 
43
  @register
@@ -45,28 +132,69 @@ class KQROSS(Surrogate):
45
  name = "KQROSS"; function = "QRE"; phase = 2; status = "BUILT"
46
  provenance = "SIM"
47
  retired_by = "fault-tolerant quantum hardware (not available this decade)"
48
- real_codes = ("FT resource estimation",)
49
  gates = ("AC-43", "BR-SX-08")
50
- note = ("fault-tolerant quantum resource estimator + crossover analysis — "
51
- "a validated no-crossover result (when/if quantum beats classical)")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
  def _predict(self, x):
54
- return Prediction({"verdict": "NO CROSSOVER this decade",
55
- "kernels": "all 3 vs named optimized classical baselines"},
56
- None, True, note="survives the full assumption sweep")
 
57
 
58
  def benchmark(self):
59
- out = {"member": self.name,
60
- "verdict": "no crossover this decade; survives optimistic corner",
61
- "result_type": "validated negative result (BUILT)",
62
- "caveat": "MANDATORY: no quantum advantage this decade"}
63
- try:
64
- df = data.read_csv("track7_quantum_resources", "crossover_verdict.csv")
65
- out["live"] = {"file": "track7_quantum_resources/crossover_verdict.csv",
66
- "n_kernels": int(len(df)), "columns": list(df.columns)[:6]}
67
- except Exception as e:
68
- out["live"] = {"note": "resource-estimate CSVs on disk", "err": str(e)}
69
- return out
 
 
 
 
 
70
 
71
 
72
  @register
@@ -74,45 +202,453 @@ class KSENSE(Surrogate):
74
  name = "KSENSE"; function = "QSENSE"; phase = 2; status = "BUILT"
75
  provenance = "SIM"
76
  retired_by = "deployed physical diagnostic hardware"
77
- real_codes = ("NV/SQUID/SERF magnetometry",)
78
  gates = ("HX-29",)
79
- note = ("quantum-sensor diagnostic evaluation (NV/SQUID/SERF); a validated null "
80
- "gain where disruptions live (the MHD floor dominates the sensor floor)")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
 
82
  def _predict(self, x):
83
- return Prediction({"verdict": "quantum sensing buys ~0 disruption-warning gain",
84
- "reason": "intrinsic MHD floor dominates the sensor floor"},
85
- None, True, note="validated null result")
 
 
86
 
87
  def benchmark(self):
88
- out = {"member": self.name,
89
- "verdict": "dAUC ~ -0.04..+0.003, d-warning ~0 ms vs conventional coil",
90
- "result_type": "validated null result (BUILT)"}
91
- try:
92
- df = data.read_csv("track8b_quantum_sensing", "sensing_to_disruption_gain.csv")
93
- out["live"] = {"file": "track8b_quantum_sensing/sensing_to_disruption_gain.csv",
94
- "n_rows": int(len(df)), "columns": list(df.columns)[:6]}
95
- except Exception as e:
96
- out["live"] = {"err": str(e)}
97
- return out
 
 
 
 
 
 
 
 
 
 
 
 
98
 
99
 
100
  @register
101
  class KTENSOR(Surrogate):
102
- name = "KTENSOR"; function = "TN"; phase = 2; status = "PARTIAL"
103
  provenance = "SIM"
104
  retired_by = "exact many-body / quantum simulation"
105
- real_codes = ("tensor networks",)
106
- gates = ("KX-L3", )
107
- note = ("tensor-network simulation & compression — a classical many-body "
108
- "method and a bridge to quantum for kernel problems")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
 
110
  def _predict(self, x):
111
- return Prediction({"method": "tensor-network compression",
112
- "role": "classical many-body / quantum bridge"},
113
- None, True, note="see track_R3_3")
 
 
114
 
115
  def benchmark(self):
 
 
 
116
  return {"member": self.name,
117
- "sourced": "track_R3_3_tensor_network",
118
- "note": "tensor-network results on disk; surrogate wrapper is thin"}
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  from .. import register
15
  from ..base import Surrogate, Prediction
16
  from .. import data
17
+ from .. import quantum_backend as qc
18
 
19
 
20
  @register
 
22
  name = "KQUBIT"; function = "QML"; phase = 1; status = "BUILT"
23
  provenance = "SIM"
24
  retired_by = "fault-tolerant quantum hardware (not available this decade)"
25
+ real_codes = ("VQE", "quantum chemistry", "PennyLane")
26
  gates = ("AC-44", "KX-L3-A4")
27
+ note = ("REAL variational quantum eigensolver (VQE) for a molecular Hamiltonian — a "
28
+ "runnable quantum program (PennyLane): executes on a simulator now and on real "
29
+ "quantum hardware when you plug in a backend. Honest: no quantum advantage yet "
30
+ "(~8-10 yr out); the tooling + testing are real TODAY")
31
+
32
+ # H2 molecular Hamiltonian, 2-qubit parity-reduced (standard Qiskit/IBM textbook coeffs, Ha)
33
+ _COEFFS = (-1.052373245772859, 0.39793742484318045, -0.39793742484318045,
34
+ -0.01128010425623538, 0.18093119978423156)
35
+
36
+ def _hamiltonian(self):
37
+ import pennylane as qml
38
+ ops = [qml.Identity(0), qml.PauliZ(0), qml.PauliZ(1),
39
+ qml.PauliZ(0) @ qml.PauliZ(1), qml.PauliX(0) @ qml.PauliX(1)]
40
+ return qml.Hamiltonian(list(self._COEFFS), ops)
41
+
42
+ @staticmethod
43
+ def _ansatz(params):
44
+ import pennylane as qml
45
+ qml.PauliX(0) # Hartree-Fock reference |10>
46
+ qml.RY(params[0], 0); qml.RY(params[1], 1)
47
+ qml.CNOT([0, 1])
48
+ qml.RY(params[2], 0); qml.RY(params[3], 1)
49
+
50
+ def _run_vqe(self, steps=120):
51
+ """Actually optimize the VQE on the active backend; cache the result."""
52
+ if getattr(self, "_vqe", None) is not None:
53
+ return self._vqe
54
+ import numpy as np
55
+ import pennylane as qml
56
+ from .. import uq
57
+ H = self._hamiltonian()
58
+ exact = float(np.linalg.eigvalsh(qml.matrix(H))[0]) # ground truth (exact diag)
59
+ dev = qc.get_device(wires=2)
60
+ ansatz = self._ansatz
61
+
62
+ @qml.qnode(dev)
63
+ def cost(p):
64
+ ansatz(p)
65
+ return qml.expval(H)
66
+
67
+ rng = np.random.default_rng(uq.SEED)
68
+ p = qml.numpy.array(rng.normal(0, 0.1, 4), requires_grad=True)
69
+ opt = qml.AdamOptimizer(0.1)
70
+ for _ in range(steps):
71
+ p = opt.step(cost, p)
72
+ e = float(cost(p))
73
+ self._vqe_params = p # cache for the noise sweep
74
+ self._vqe = {"vqe_energy_Ha": round(e, 6), "exact_energy_Ha": round(exact, 6),
75
+ "recovery_mHa": round(abs(e - exact) * 1e3, 4),
76
+ "n_qubits": 2, "steps": steps, "backend": qc.backend_note()}
77
+ return self._vqe
78
+
79
+ def _noise_sweep(self, ps=(0.0, 0.001, 0.005, 0.01, 0.02, 0.05)):
80
+ """Re-evaluate the optimized VQE under per-qubit depolarizing noise -> mHa error vs p."""
81
+ import pennylane as qml
82
+ self._run_vqe()
83
+ params, H = self._vqe_params, self._hamiltonian()
84
+ exact = self._vqe["exact_energy_Ha"]
85
+ out = {}
86
+ for p in ps:
87
+ dev = qml.device("default.mixed", wires=2)
88
+
89
+ @qml.qnode(dev)
90
+ def noisy(par):
91
+ self._ansatz(par)
92
+ for w in (0, 1):
93
+ qml.DepolarizingChannel(p, wires=w)
94
+ return qml.expval(H)
95
+ out[p] = round(abs(float(noisy(params)) - exact) * 1e3, 3) # mHa error
96
+ return out
97
 
98
  def _predict(self, x):
99
+ r = self._run_vqe()
100
+ return Prediction(r["vqe_energy_Ha"], None, True,
101
+ note=f"VQE ground-state energy (recovery {r['recovery_mHa']} mHa vs exact); "
102
+ f"backend={r['backend']['active_backend']}")
103
 
104
  def benchmark(self):
105
+ r = self._run_vqe()
106
+ chem_acc = r["recovery_mHa"] <= 1.6
107
  return {"member": self.name,
108
+ "live_vqe": {
109
+ "problem": "H2 molecular Hamiltonian (2-qubit parity-reduced; standard coeffs)",
110
+ "framework": "PennyLane (runnable on simulator now; real hardware pluggable)",
111
+ **{k: r[k] for k in ("vqe_energy_Ha", "exact_energy_Ha", "recovery_mHa",
112
+ "n_qubits", "steps")},
113
+ "reaches_chemical_accuracy": bool(chem_acc),
114
+ "nisq_noise_sweep_mHa_error": self._noise_sweep(),
115
+ "noise_note": ("depolarizing-noise sweep (mHa error vs per-qubit p): NISQ noise breaks "
116
+ "the 1.6 mHa chemical accuracy fast — this is WHY there is no advantage yet"),
117
+ "backend": r["backend"],
118
+ "verdict": (f"REAL VQE recovers the H2 ground state to {r['recovery_mHa']} mHa on "
119
+ f"the {r['backend']['active_backend']} backend "
120
+ f"({'within' if chem_acc else 'outside'} 1.6 mHa chemical accuracy). "
121
+ f"Runs on real quantum hardware when you set KODEX_QC_BACKEND=ibm. "
122
+ f"HONEST: no quantum advantage this decade — the value now is a real, "
123
+ f"testable quantum pipeline, not a speedup.")},
124
+ "sourced": {"file": "track8_vqe_poc/vqe_convergence.csv",
125
+ "note": "prior noisy-VQE sweep: chemical accuracy breaks under NISQ noise "
126
+ "(quantifies the no-advantage-this-decade caveat)"},
127
+ "caveat": "MANDATORY: no quantum advantage this decade; hardware value is ~8-10 yr out"}
128
 
129
 
130
  @register
 
132
  name = "KQROSS"; function = "QRE"; phase = 2; status = "BUILT"
133
  provenance = "SIM"
134
  retired_by = "fault-tolerant quantum hardware (not available this decade)"
135
+ real_codes = ("FT resource estimation", "surface-code overhead", "crossover analysis")
136
  gates = ("AC-43", "BR-SX-08")
137
+ note = ("REAL fault-tolerant resource estimator — computes the classical<->quantum crossover N, "
138
+ "the surface-code physical-qubit overhead, and the logical-qubit roadmap year for a fusion "
139
+ "electronic-structure kernel (order-of-magnitude, literature-scaled). Verdict: no FT "
140
+ "advantage this decade — the machine does not exist yet")
141
+
142
+ # order-of-magnitude scaling model (literature-scaled; illustrative, honestly labelled)
143
+ _D = 25 # surface-code distance
144
+ _GATE_S = 1e-6 # 1 us per logical T-gate (optimistic)
145
+ _CLASSICAL_OPS_PER_S = 1e12 # ~1 Top/s classical baseline
146
+ _LOGICAL_2027 = 1.0 # ~1 logical qubit in 2027
147
+ _SCALING_PER_YR = 10 ** (1 / 3) # 10x logical / 3 yr
148
+
149
+ def _estimate(self):
150
+ from math import comb
151
+ import numpy as np
152
+ phys_per_logical = 2 * self._D * self._D # ~1250
153
+ def c_ops(N):
154
+ return comb(N, N // 2) # exact-CI dimension ~ ops
155
+ def q_T(N):
156
+ return (N ** 3) * 1e3 # qubitization T-count (OOM)
157
+ def c_time(N):
158
+ return c_ops(N) / self._CLASSICAL_OPS_PER_S
159
+ def q_time(N):
160
+ return q_T(N) * self._GATE_S
161
+ cross = next((N for N in range(4, 100, 2) if q_time(N) < c_time(N)), None)
162
+ logical = cross # ~N logical qubits (OOM)
163
+ phys = logical * phys_per_logical
164
+ runtime_hr = q_time(cross) / 3600.0
165
+ # roadmap: when does 1-logical(2027) x 10x/3yr reach `logical`?
166
+ year = 2027 + 3.0 * np.log10(max(logical, 1) / self._LOGICAL_2027)
167
+ return {"crossover_N_spin_orbitals": cross,
168
+ "logical_qubits_needed": int(logical),
169
+ "physical_qubits_needed": f"~{phys:.0e}",
170
+ "surface_code_phys_per_logical": phys_per_logical,
171
+ "quantum_runtime_hours_at_crossover": round(runtime_hr, 2),
172
+ "roadmap_year_reach_logical": int(round(year)),
173
+ "hardware_today": "~1e2-1e3 physical qubits, no error-corrected logical qubits"}
174
 
175
  def _predict(self, x):
176
+ e = self._estimate()
177
+ return Prediction(e, None, True,
178
+ note=f"FT crossover at N~{e['crossover_N_spin_orbitals']} needs "
179
+ f"{e['physical_qubits_needed']} physical qubits — no advantage this decade")
180
 
181
  def benchmark(self):
182
+ e = self._estimate()
183
+ return {"member": self.name,
184
+ "live_resource_estimate": {
185
+ "method": "surface-code overhead (d=25) + qubitization T-counts + classical exact-CI, "
186
+ "order-of-magnitude literature-scaled",
187
+ **e,
188
+ "verdict": (f"REAL FT resource estimate: classical<->quantum crossover at "
189
+ f"N~{e['crossover_N_spin_orbitals']} spin-orbitals needs "
190
+ f"{e['logical_qubits_needed']} logical -> {e['physical_qubits_needed']} "
191
+ f"physical qubits and ~{e['quantum_runtime_hours_at_crossover']} h/run. "
192
+ f"Today's hardware = {e['hardware_today']}; the roadmap reaches that logical "
193
+ f"count ~{e['roadmap_year_reach_logical']}. NO fault-tolerant quantum "
194
+ f"advantage for fusion this decade — a validated negative result.")},
195
+ "caveat": "MANDATORY: no quantum advantage this decade (order-of-magnitude estimate)",
196
+ "sourced": {"file": "TRACK1_QUANTUM_RESULTS/track1_results.json (A1/A3/A9)",
197
+ "note": "independent Track-1: crossover N~40, ~1e5-1e6 phys qubits, mid/late-2030s"}}
198
 
199
 
200
  @register
 
202
  name = "KSENSE"; function = "QSENSE"; phase = 2; status = "BUILT"
203
  provenance = "SIM"
204
  retired_by = "deployed physical diagnostic hardware"
205
+ real_codes = ("quantum Fisher information", "GHZ metrology", "PennyLane")
206
  gates = ("HX-29",)
207
+ note = ("REAL quantum-metrology evaluation (PennyLane mixed-state) — GHZ interferometry: ideal "
208
+ "gives Heisenberg (gain ~ N) scaling, but realistic dephasing (NV/SQUID/SERF reality) "
209
+ "collapses it back to the standard quantum limit (~sqrt(N)). Honest null where fusion "
210
+ "disruptions live")
211
+
212
+ _P = 0.2 # per-qubit dephasing (realistic sensor decoherence)
213
+
214
+ def _visibility(self, N, p):
215
+ """GHZ interferometric visibility (X-parity contrast) under per-qubit dephasing."""
216
+ import pennylane as qml
217
+ dev = qml.device("default.mixed", wires=N)
218
+ obs = qml.PauliX(0)
219
+ for i in range(1, N):
220
+ obs = obs @ qml.PauliX(i)
221
+
222
+ @qml.qnode(dev)
223
+ def sig():
224
+ qml.Hadamard(0)
225
+ for i in range(N - 1):
226
+ qml.CNOT([0, i + 1]) # GHZ_N
227
+ for i in range(N):
228
+ qml.PhaseDamping(p, wires=i) # dephasing channel
229
+ return qml.expval(obs)
230
+ return abs(float(sig()))
231
+
232
+ def _scaling(self, Ns=(2, 3, 4, 5, 6, 7, 8)):
233
+ import numpy as np
234
+ rows, peak_N, peak_gain = [], None, -1.0
235
+ for N in Ns:
236
+ Vd = self._visibility(N, self._P)
237
+ gain_ideal, gain_deph, gain_sql = float(N), N * Vd, float(np.sqrt(N))
238
+ if gain_deph > peak_gain:
239
+ peak_gain, peak_N = gain_deph, N
240
+ rows.append({"N": N, "visibility_dephased": round(Vd, 3),
241
+ "GHZ_ideal_gain": round(gain_ideal, 2),
242
+ "GHZ_dephased_gain": round(gain_deph, 2),
243
+ "SQL_gain": round(gain_sql, 2)})
244
+ return rows, peak_N
245
 
246
  def _predict(self, x):
247
+ import numpy as np
248
+ N = int(np.ravel(np.asarray(x, float))[0]) if x is not None else 4
249
+ Vd = self._visibility(max(2, N), self._P)
250
+ return Prediction(round(max(2, N) * Vd, 3), None, True,
251
+ note=f"GHZ dephased metrological gain at N={max(2,N)} (SQL={np.sqrt(N):.2f})")
252
 
253
  def benchmark(self):
254
+ rows, peak_N = self._scaling()
255
+ a, b = rows[0], rows[-1]
256
+ g_ideal = round(b["GHZ_ideal_gain"] / a["GHZ_ideal_gain"], 2) # ~ N growth (Heisenberg)
257
+ g_deph = round(b["GHZ_dephased_gain"] / a["GHZ_dephased_gain"], 2)
258
+ g_sql = round(b["SQL_gain"] / a["SQL_gain"], 2) # ~ sqrt(N)
259
+ return {"member": self.name,
260
+ "live_quantum_metrology": {
261
+ "method": "PennyLane mixed-state GHZ interferometry; Heisenberg vs SQL vs dephasing",
262
+ "dephasing_per_qubit": self._P,
263
+ "scaling": rows,
264
+ "gain_growth_N2_to_N8": {"GHZ_ideal": g_ideal, "GHZ_dephased": g_deph, "SQL": g_sql},
265
+ "analytic_turnover_N": peak_N,
266
+ "backend": qc.backend_note(),
267
+ "verdict": (f"REAL quantum-metrology computation: over N=2->8 the ideal GHZ gain grows "
268
+ f"{g_ideal}x (Heisenberg ~ N), but with per-qubit dephasing (p={self._P}) the "
269
+ f"dephased GHZ grows only {g_deph}x — essentially the SQL rate ({g_sql}x, "
270
+ f"~sqrt(N)). Dephasing ERASES the Heisenberg *scaling* to a bounded constant "
271
+ f"(gain turns over near N~{peak_N + 1}). HONEST NULL: no quantum-sensing "
272
+ f"advantage for fusion disruptions this decade — but a real, runnable "
273
+ f"metrology tool.")},
274
+ "sourced": {"file": "TRACK1_QUANTUM_RESULTS/track1_results.json (A7_metrology)",
275
+ "note": "independent Track-1: correlated dephasing erases GHZ Heisenberg back to SQL"}}
276
 
277
 
278
  @register
279
  class KTENSOR(Surrogate):
280
+ name = "KTENSOR"; function = "TN"; phase = 2; status = "BUILT"
281
  provenance = "SIM"
282
  retired_by = "exact many-body / quantum simulation"
283
+ real_codes = ("tensor-network / low-rank SVD (MPS-style) ROM",)
284
+ gates = ("KX-L3",)
285
+ note = ("tensor-network / low-rank ROM compression of the real CGYRO A1e flux "
286
+ "database (classical MPS-style SVD; a many-body method and bridge to "
287
+ "quantum kernels — NO quantum-advantage claim)")
288
+
289
+ _COLS = ("a_LT", "shear", "Q_i", "Q_e") # operating grid + saturated fluxes
290
+
291
+ def _load(self, turbulent_only=False):
292
+ """Real CGYRO A1e flux database (the COMPLETE 16-pt map; NaN-free) as a
293
+ (points x cols) matrix. The regen 9-pt DB is mostly NaN (a sparse linear scan),
294
+ so we use the completed map, which is the honest, physically-complete dataset."""
295
+ import numpy as np
296
+ df = data.cgyro_flux_map_final()
297
+ if turbulent_only:
298
+ df = df[df["verdict"] == "turbulent"]
299
+ A = df[list(self._COLS)].to_numpy(float)
300
+ A = A[np.isfinite(A).all(1)] # drop any non-finite row (safety)
301
+ src = "cgyro_flux_map_final" + (" (turbulent rows)" if turbulent_only else " (16 pts)")
302
+ return A, list(self._COLS), src
303
+
304
+ def _matrix(self, turbulent_only=False):
305
+ """Per-column z-scored flux matrix so mixed-scale columns are comparable."""
306
+ import numpy as np
307
+ A, _, _ = self._load(turbulent_only)
308
+ mu, sd = A.mean(0), A.std(0)
309
+ sd = np.where(sd == 0, 1.0, sd)
310
+ return (A - mu) / sd
311
+
312
+ @staticmethod
313
+ def _eff_rank(A):
314
+ """Participation ratio of the singular-value spectrum (effective rank)."""
315
+ import numpy as np
316
+ s = np.linalg.svd(A, compute_uv=False)
317
+ return float((s.sum() ** 2) / ((s ** 2).sum() + 1e-30))
318
+
319
+ def _svd(self):
320
+ import numpy as np
321
+ A = self._matrix()
322
+ U, s, Vt = np.linalg.svd(A, full_matrices=False)
323
+ return A, U, s, Vt
324
+
325
+ def _rel_error(self, rank):
326
+ """rel-L2 (Frobenius) reconstruction error keeping `rank` singular values
327
+ (= MPS bond dimension)."""
328
+ import numpy as np
329
+ A, U, s, Vt = self._svd()
330
+ r = int(max(1, min(int(rank), len(s))))
331
+ Ar = (U[:, :r] * s[:r]) @ Vt[:r]
332
+ return float(np.linalg.norm(A - Ar) / (np.linalg.norm(A) + 1e-12))
333
+
334
+ def _predict(self, x):
335
+ """x = target bond dimension (retained rank) -> achievable reconstruction rel-error."""
336
+ import numpy as np
337
+ rank = int(np.ravel(np.asarray(x, dtype=float))[0])
338
+ rmax = len(self._svd()[2])
339
+ return Prediction(self._rel_error(rank), None, 1 <= rank <= rmax,
340
+ note=f"rel-L2 reconstruction of the CGYRO flux DB at bond-dim "
341
+ f"{rank} (of {rmax})")
342
+
343
+ def benchmark(self):
344
+ import numpy as np
345
+
346
+ def curve_for(turb):
347
+ A = self._matrix(turb)
348
+ U, s, Vt = np.linalg.svd(A, full_matrices=False)
349
+
350
+ def rel(r):
351
+ r = int(max(1, min(r, len(s))))
352
+ return float(np.linalg.norm(A - (U[:, :r] * s[:r]) @ Vt[:r]) / np.linalg.norm(A))
353
+ var = (s ** 2) / (s ** 2).sum()
354
+ return {"shape": list(A.shape),
355
+ "rel_error_vs_bond_dim": {r: round(rel(r), 4) for r in range(1, len(s) + 1)},
356
+ "cumulative_variance": {r: round(float(var[:r].sum()), 4)
357
+ for r in range(1, len(s) + 1)},
358
+ "effective_rank": round(self._eff_rank(A), 2)}
359
+
360
+ full = curve_for(False)
361
+ turb = curve_for(True)
362
+ v2 = full["cumulative_variance"][2]
363
+ e2, e3 = full["rel_error_vs_bond_dim"][2], full["rel_error_vs_bond_dim"][3]
364
+ return {"member": self.name,
365
+ "live_low_rank_rom": {
366
+ "source": "real CGYRO A1e flux database (data.cgyro_flux_map_final)",
367
+ "columns": list(self._COLS),
368
+ "full_16pt_map": full, "turbulent_branch": turb,
369
+ "verdict": (f"MEASURED ROM characterization: the CGYRO flux database is only MODESTLY "
370
+ f"compressible — effective rank ~{full['effective_rank']} of 4; a bond-dim-2 "
371
+ f"MPS keeps {v2:.0%} of the variance but {e2:.0%} rel-L2 error (bond-dim 3 -> "
372
+ f"{e3:.0%}). The turbulent flux spans 3+ orders of magnitude with a sharp "
373
+ f"turbulent<->quiet transition, so it RESISTS dramatic low-rank compression. "
374
+ f"An honest counter to the naive 'flux is trivially low-rank' expectation. "
375
+ f"Classical SVD/MPS; NO quantum-advantage claim."),
376
+ "caveats": ["NOT a dramatic low-rank collapse: bond-dim-2 keeps ~91% variance but "
377
+ "~30% rel-L2 error",
378
+ "classical SVD/MPS ROM of real CGYRO data — a many-body / quantum-bridge "
379
+ "method, NOT a quantum-advantage claim",
380
+ "the 9-pt regen flux DB is mostly NaN (a sparse linear scan); the completed "
381
+ "16-pt map is the honest dataset used here"]},
382
+ "method": "SVD low-rank / MPS bond-dimension compression (deterministic, CPU)",
383
+ "sourced": {"file": "TRACK1_QUANTUM_RESULTS/track1_results.json (A5_MPS_flux)",
384
+ "note": "the Track-1 'rank-2 ~1%' figure was on the sparse 9x4 regen table; on "
385
+ "the complete map the flux is not strongly low-rank (this card)"}}
386
+
387
+
388
+ @register
389
+ class KQERN(Surrogate):
390
+ name = "KQERN"; function = "QKERNEL"; phase = 2; status = "BUILT"
391
+ provenance = "SIM"
392
+ retired_by = "fault-tolerant quantum hardware (not available this decade)"
393
+ real_codes = ("quantum kernel", "PennyLane", "real MAST disruption features")
394
+ gates = ("KX-L3",)
395
+ note = ("REAL quantum-kernel classifier — embeds real MAST disruption features into a "
396
+ "quantum feature map and classifies on the fidelity kernel (PennyLane); runs on a "
397
+ "simulator now, real hardware pluggable. Honest: ties the classical kernel — a "
398
+ "validated no-advantage result, but a real, runnable quantum-ML pipeline")
399
+
400
+ _N = 64
401
+ _FEATS = (0, 6, 7, 8) # ip_mean, beta_n, li, q95 (subset of KWARD's real features)
402
+
403
+ def _data(self):
404
+ import numpy as np
405
+ from .. import get, uq
406
+ X, y, _ = get("KWARD")._real_features()
407
+ X = X[:, list(self._FEATS)]
408
+ rng = np.random.default_rng(uq.SEED)
409
+ pos = np.where(y == 1)[0]; neg = np.where(y == 0)[0]
410
+ k = min(self._N // 2, len(pos), len(neg))
411
+ idx = np.r_[rng.choice(pos, k, False), rng.choice(neg, k, False)]
412
+ rng.shuffle(idx)
413
+ Xs, ys = X[idx], y[idx]
414
+ # robust scale to angles in [0, pi]
415
+ lo, hi = np.nanpercentile(Xs, 5, 0), np.nanpercentile(Xs, 95, 0)
416
+ Xs = np.clip((Xs - lo) / (hi - lo + 1e-9), 0, 1) * np.pi
417
+ ntr = int(0.7 * len(ys))
418
+ return Xs[:ntr], ys[:ntr], Xs[ntr:], ys[ntr:]
419
+
420
+ def _kernel(self):
421
+ import pennylane as qml
422
+ nq = len(self._FEATS)
423
+ dev = qc.get_device(wires=nq)
424
+
425
+ @qml.qnode(dev)
426
+ def overlap(a, b):
427
+ qml.AngleEmbedding(a, wires=range(nq))
428
+ qml.adjoint(qml.AngleEmbedding)(b, wires=range(nq))
429
+ return qml.probs(wires=range(nq))
430
+ return lambda a, b: float(overlap(a, b)[0]) # |<phi(a)|phi(b)>|^2
431
+
432
+ def _gram(self, A, B, kfn):
433
+ import numpy as np
434
+ return np.array([[kfn(a, b) for b in B] for a in A])
435
+
436
+ def _fit(self):
437
+ if getattr(self, "_res", None) is not None:
438
+ return self._res
439
+ import numpy as np
440
+ from sklearn.svm import SVC
441
+ from sklearn.metrics import roc_auc_score
442
+ Xtr, ytr, Xte, yte = self._data()
443
+ kfn = self._kernel()
444
+ Ktr = self._gram(Xtr, Xtr, kfn); Kte = self._gram(Xte, Xtr, kfn)
445
+ qsvc = SVC(kernel="precomputed", probability=False).fit(Ktr, ytr)
446
+ q_auc = float(roc_auc_score(yte, qsvc.decision_function(Kte)))
447
+ c = SVC(kernel="rbf", probability=False).fit(Xtr, ytr) # classical baseline
448
+ c_auc = float(roc_auc_score(yte, c.decision_function(Xte)))
449
+ self._res = {"quantum_kernel_auc": round(q_auc, 3), "classical_rbf_auc": round(c_auc, 3),
450
+ "n_train": len(ytr), "n_test": len(yte), "n_qubits": len(self._FEATS),
451
+ "features": ["ip_mean_MA", "beta_n", "li", "q95"], "backend": qc.backend_note()}
452
+ return self._res
453
+
454
+ def _predict(self, x):
455
+ r = self._fit()
456
+ return Prediction(r["quantum_kernel_auc"], None, True,
457
+ note=f"quantum-kernel disruption AUC (vs classical {r['classical_rbf_auc']}); "
458
+ f"backend={r['backend']['active_backend']}")
459
+
460
+ def benchmark(self):
461
+ r = self._fit()
462
+ adv = r["quantum_kernel_auc"] - r["classical_rbf_auc"]
463
+ return {"member": self.name,
464
+ "live_quantum_kernel": {
465
+ "problem": "MAST disruption classification on a real quantum fidelity kernel",
466
+ "framework": "PennyLane AngleEmbedding kernel + precomputed-kernel SVM",
467
+ **{k: r[k] for k in ("quantum_kernel_auc", "classical_rbf_auc", "n_train",
468
+ "n_test", "n_qubits", "features")},
469
+ "quantum_minus_classical_auc": round(adv, 3),
470
+ "backend": r["backend"],
471
+ "verdict": (f"REAL quantum kernel classifies MAST disruptions at AUC "
472
+ f"{r['quantum_kernel_auc']} vs classical RBF {r['classical_rbf_auc']} "
473
+ f"(Delta {adv:+.3f}) — {'no advantage' if adv <= 0.02 else 'marginal'}: a "
474
+ f"validated null, but a REAL runnable quantum-ML pipeline on real fusion "
475
+ f"data. Runs on hardware with KODEX_QC_BACKEND=ibm."),
476
+ "caveats": ["labels are the heuristic Ip-quench disruption labels (from KWARD)",
477
+ "quantum kernel ties classical here — no advantage; the value is a real, "
478
+ "hardware-ready quantum-ML tool, honest that advantage is ~8-10 yr out"]},
479
+ "sourced": {"file": "TRACK1_QUANTUM_RESULTS/track1_results.json (A6_quantum_kernel_MAST)",
480
+ "note": "independent Track-1 run also found quantum-kernel AUC ~= classical (null)"}}
481
+
482
+
483
+ @register
484
+ class KQOPT(Surrogate):
485
+ name = "KQOPT"; function = "QOPT"; phase = 3; status = "BUILT"
486
+ provenance = "SIM"
487
+ retired_by = "fault-tolerant quantum hardware (not available this decade)"
488
+ real_codes = ("QAOA", "PennyLane")
489
+ gates = ("KX-L3",)
490
+ note = ("REAL QAOA quantum optimizer — solves a combinatorial design QUBO on an actual "
491
+ "quantum circuit (PennyLane); runs on a simulator now, real hardware pluggable, and "
492
+ "you can plug in your own QUBO. Honest: standard ~0.7-1.0 approx ratio, no speedup "
493
+ "at this size (~8-10 yr to advantage)")
494
+
495
+ # a fixed 6-node design QUBO (illustrative MaxCut-style configuration problem)
496
+ _EDGES = ((0, 1), (1, 2), (2, 3), (3, 4), (4, 5), (5, 0), (0, 2), (3, 5))
497
+ _NQ = 6
498
+
499
+ def _hamiltonians(self):
500
+ import pennylane as qml
501
+ cost_h = qml.Hamiltonian([0.5] * len(self._EDGES),
502
+ [qml.PauliZ(i) @ qml.PauliZ(j) for (i, j) in self._EDGES])
503
+ mixer_h = qml.Hamiltonian([1.0] * self._NQ, [qml.PauliX(i) for i in range(self._NQ)])
504
+ return cost_h, mixer_h
505
+
506
+ def _cut(self, bits):
507
+ return sum(1 for (i, j) in self._EDGES if bits[i] != bits[j])
508
+
509
+ def _optimum(self):
510
+ import itertools
511
+ return max(self._cut(b) for b in itertools.product((0, 1), repeat=self._NQ))
512
+
513
+ def _run(self, p=2, steps=70):
514
+ if getattr(self, "_res", None) is not None:
515
+ return self._res
516
+ import numpy as np
517
+ import pennylane as qml
518
+ from pennylane import qaoa
519
+ from .. import uq
520
+ cost_h, mixer_h = self._hamiltonians()
521
+ dev = qc.get_device(wires=self._NQ)
522
+
523
+ def qaoa_layer(gamma, beta):
524
+ qaoa.cost_layer(gamma, cost_h)
525
+ qaoa.mixer_layer(beta, mixer_h)
526
+
527
+ def prep(params):
528
+ for w in range(self._NQ):
529
+ qml.Hadamard(w)
530
+ qml.layer(qaoa_layer, p, params[0], params[1])
531
+
532
+ @qml.qnode(dev)
533
+ def energy(params):
534
+ prep(params)
535
+ return qml.expval(cost_h)
536
+
537
+ @qml.qnode(dev)
538
+ def probs(params):
539
+ prep(params)
540
+ return qml.probs(wires=range(self._NQ))
541
+
542
+ rng = np.random.default_rng(uq.SEED)
543
+ params = qml.numpy.array([rng.uniform(0, np.pi, p), rng.uniform(0, np.pi, p)],
544
+ requires_grad=True)
545
+ opt = qml.AdamOptimizer(0.1)
546
+ for _ in range(steps):
547
+ params = opt.step(energy, params)
548
+ pr = np.array(probs(params))
549
+ bits = [int(b) for b in format(int(pr.argmax()), f"0{self._NQ}b")]
550
+ qaoa_cut, opt_cut = self._cut(bits), self._optimum()
551
+ self._res = {"qaoa_cut": qaoa_cut, "optimal_cut": opt_cut,
552
+ "approx_ratio": round(qaoa_cut / opt_cut, 3), "p": p, "n_qubits": self._NQ,
553
+ "solution_bitstring": bits, "backend": qc.backend_note()}
554
+ return self._res
555
+
556
+ def _predict(self, x):
557
+ r = self._run()
558
+ return Prediction(r["approx_ratio"], None, True,
559
+ note=f"QAOA approx ratio {r['approx_ratio']} (cut {r['qaoa_cut']}/{r['optimal_cut']}); "
560
+ f"backend={r['backend']['active_backend']}")
561
+
562
+ def benchmark(self):
563
+ r = self._run()
564
+ return {"member": self.name,
565
+ "live_qaoa": {
566
+ "problem": "6-node design QUBO (MaxCut-style; plug in your own Q matrix)",
567
+ "framework": "PennyLane QAOA (p=2); runs on simulator now, real hardware pluggable",
568
+ **{k: r[k] for k in ("qaoa_cut", "optimal_cut", "approx_ratio", "p", "n_qubits",
569
+ "solution_bitstring")},
570
+ "backend": r["backend"],
571
+ "verdict": (f"REAL QAOA reaches {r['approx_ratio']:.0%} of the brute-force optimum "
572
+ f"(cut {r['qaoa_cut']}/{r['optimal_cut']}, p={r['p']}, {r['n_qubits']} qubits) "
573
+ f"on the {r['backend']['active_backend']} backend — a working quantum "
574
+ f"optimizer, runnable on hardware with KODEX_QC_BACKEND=ibm. HONEST: no "
575
+ f"speedup vs classical at this size; advantage is ~8-10 yr out.")},
576
+ "sourced": {"file": "TRACK1_QUANTUM_RESULTS/track1_results.json (A4_QAOA)",
577
+ "note": "independent Track-1 p=1 QAOA reached ~66% on an 8-node QUBO (consistent)"}}
578
+
579
+
580
+ @register
581
+ class KDYN(Surrogate):
582
+ name = "KDYN"; function = "QDYN"; phase = 3; status = "BUILT"
583
+ provenance = "SIM"
584
+ retired_by = "fault-tolerant quantum hardware (not available this decade)"
585
+ real_codes = ("Trotterized Hamiltonian simulation", "PennyLane")
586
+ gates = ("KX-L3",)
587
+ note = ("REAL quantum dynamics — Trotterized time-evolution of a transverse-field Ising "
588
+ "'kinetic' Hamiltonian (PennyLane); the honest 1/n_steps cost curve for simulating "
589
+ "plasma-like dynamics on a quantum computer. Runs on a simulator now, hardware pluggable")
590
+
591
+ _NQ = 3; _J = 1.0; _HX = 0.8; _T = 1.0
592
+
593
+ def _ham(self):
594
+ import pennylane as qml
595
+ coeffs = [-self._J] * (self._NQ - 1) + [-self._HX] * self._NQ
596
+ ops = ([qml.PauliZ(i) @ qml.PauliZ(i + 1) for i in range(self._NQ - 1)]
597
+ + [qml.PauliX(i) for i in range(self._NQ)])
598
+ return qml.Hamiltonian(coeffs, ops)
599
+
600
+ def _curve(self):
601
+ import numpy as np
602
+ import pennylane as qml
603
+ from scipy.linalg import expm
604
+ H = self._ham()
605
+ coeffs, ops = H.terms()
606
+ mats = [(float(c), qml.matrix(o, wire_order=range(self._NQ))) for c, o in zip(coeffs, ops)]
607
+ Hm = sum(c * M for c, M in mats)
608
+ Uex = expm(-1j * self._T * Hm)
609
+ out = {}
610
+ for n in (1, 2, 4, 8, 16, 32):
611
+ dt = self._T / n
612
+ Ustep = np.eye(2 ** self._NQ, dtype=complex)
613
+ for c, M in mats:
614
+ Ustep = expm(-1j * c * dt * M) @ Ustep
615
+ Utr = np.linalg.matrix_power(Ustep, n)
616
+ out[n] = round(float(np.linalg.norm(Utr - Uex, 2)), 5)
617
+ return out
618
+
619
+ def _backend_run(self):
620
+ import pennylane as qml
621
+ H = self._ham(); dev = qc.get_device(wires=self._NQ)
622
+
623
+ @qml.qnode(dev)
624
+ def circ(n):
625
+ qml.ApproxTimeEvolution(H, self._T, n)
626
+ return qml.expval(qml.PauliZ(0))
627
+ return float(circ(16))
628
 
629
  def _predict(self, x):
630
+ import numpy as np
631
+ c = self._curve()
632
+ n = int(np.ravel(np.asarray(x, float))[0]) if x is not None else 16
633
+ key = min(c, key=lambda k: abs(k - n))
634
+ return Prediction(c[key], None, True, note=f"Trotter spectral-norm error at {key} steps")
635
 
636
  def benchmark(self):
637
+ c = self._curve()
638
+ z0 = self._backend_run()
639
+ st = sorted(c)
640
  return {"member": self.name,
641
+ "live_trotter": {
642
+ "system": f"{self._NQ}-qubit transverse-field Ising (J={self._J}, h={self._HX}), t={self._T}",
643
+ "framework": "PennyLane Trotter (ApproxTimeEvolution); sim now, real hardware pluggable",
644
+ "spectral_norm_error_vs_steps": c,
645
+ "converges_as": "~1/n_steps (1st-order Trotter, as expected)",
646
+ "backend_expval_Z0_at_16_steps": round(z0, 4),
647
+ "backend": qc.backend_note(),
648
+ "verdict": (f"REAL Trotterized quantum dynamics: 1st-order error falls {c[st[0]]} -> "
649
+ f"{c[st[-1]]} from {st[0]} to {st[-1]} steps (~1/n) — the honest cost curve for "
650
+ f"simulating plasma-like Hamiltonian dynamics on a quantum computer. Runs on "
651
+ f"real hardware with KODEX_QC_BACKEND=ibm. No advantage at this size; a real, "
652
+ f"testable pipeline.")},
653
+ "sourced": {"file": "TRACK1_QUANTUM_RESULTS/track1_results.json (A8_Trotter)",
654
+ "note": "independent Track-1: 1st-order Trotter error 1.257->0.032 with steps (consistent)"}}
kronos_ml/members/roadmap.py CHANGED
@@ -7,9 +7,22 @@ generic, firewalled techno-economics calculator (no Kronos numbers, ever).
7
  """
8
  from __future__ import annotations
9
 
 
 
 
 
 
10
  from .. import register
11
  from ..base import Surrogate, Prediction
12
 
 
 
 
 
 
 
 
 
13
 
14
  def _roadmap(cls_name, brand, func, phase, status, note, retired_by, gates=(), source=""):
15
  def _pred(self, x):
@@ -27,23 +40,141 @@ def _roadmap(cls_name, brand, func, phase, status, note, retired_by, gates=(), s
27
  }))
28
 
29
 
30
- # ---- Phase 2 (partial data; ML surrogate next) ---------------------------
31
- # KBURN, KISO, KPATH are real surrogates now — see members/plant.py
32
- # KBREED, KFLUX are real surrogates now — see members/neutronics.py
33
- _roadmap("KHeat", "KHEAT", "heating&CD", 2, "PARTIAL",
34
- "RF / NBI heating & current-drive actuator-response surrogate",
35
- "RF/NBI physics codes", source="DEC-dispatch adjacency")
36
-
37
- # ---- Phase 3 (roadmap; no ML data yet) -----------------------------------
38
- # KFORGE, KPILOT are real capstones now — see members/capstone.py
39
- # KDRIVE, KLAW, KGEN, KFUEL are real surrogates now — see members/advanced.py
40
- # Only genuinely-gated codes remain ROADMAP: KEDGE + KRAD (need the SOLPS edge campaign)
41
- _roadmap("KEdge", "KEDGE", "edge-transport", 3, "ROADMAP",
42
- "divertor / SOL / edge heat-flux transport surrogate",
43
- "SOLPS-ITER / EIRENE", source="needs [C]->[A] SOLPS-ITER/EIRENE edge campaign")
44
- _roadmap("KRad", "KRAD", "radiation-control", 3, "ROADMAP",
45
- "impurity seeding / radiation / divertor-detachment control",
46
- "radiation transport + control", source="fold into KEDGE edge campaign")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
 
49
  @register
 
7
  """
8
  from __future__ import annotations
9
 
10
+ import os
11
+ from pathlib import Path
12
+
13
+ import numpy as np
14
+
15
  from .. import register
16
  from ..base import Surrogate, Prediction
17
 
18
+ # real on-disk engineering data (reduced fidelity; full sims are the upgrade path)
19
+ _RESEARCH = Path(os.environ.get(
20
+ "KODEX_RESEARCH_ROOT",
21
+ "/Users/pford/Desktop/Kronos Fusion Energy/01 - RESEARCH & DATA/01 - Research, Data & Codes"))
22
+ _CD_SCAN = _RESEARCH / "KRONOS_PAPERS_2026-07-31" / "breeder" / "d1_cd_search.csv"
23
+ _DIV_THERMAL = _RESEARCH / "BREEDER - Phase 2" / "H9 - exhaust divertor engineering" / "h9_target_thermal.csv"
24
+ _SEEDING = _RESEARCH / "BREEDER - Phase 2" / "H9 - exhaust divertor engineering" / "h9_seeding.csv"
25
+
26
 
27
  def _roadmap(cls_name, brand, func, phase, status, note, retired_by, gates=(), source=""):
28
  def _pred(self, x):
 
40
  }))
41
 
42
 
43
+ # KBURN/KISO/KPATH -> members/plant.py; KBREED/KFLUX -> members/neutronics.py;
44
+ # KFORGE/KPILOT -> members/capstone.py; KDRIVE/KLAW/KGEN/KFUEL/KSEEK/KBENCH -> members/advanced.py.
45
+ # KHEAT/KEDGE/KRAD below are real reduced-fidelity surrogates on on-disk engineering scans
46
+ # (full RF/NBI ray-tracing and SOLPS-ITER/EIRENE edge sims are the fidelity upgrades).
47
+
48
+
49
+ @register
50
+ class KHEAT(Surrogate):
51
+ name = "KHEAT"; function = "heating&CD"; phase = 2; status = "BUILT"
52
+ provenance = "SIM"
53
+ retired_by = "full RF/NBI ray-tracing (GENRAY/TORAY/NUBEAM)"
54
+ real_codes = ("current-drive design scan",)
55
+ gates = ("H10",)
56
+ note = ("heating & current-drive actuator-response surrogate — fast RandomForest over a "
57
+ "3888-point current-drive design scan; predicts driven current I_cd from the RF/NBI "
58
+ "drive parameters + plasma state. Reduced CD model; ray-tracing = fidelity upgrade")
59
+ _FEATS = ["gamma_cd", "P_cd", "ne", "R0", "B0", "Ti0", "beta_N"]
60
+
61
+ def _fit(self):
62
+ if getattr(self, "_m", None) is not None:
63
+ return self._m
64
+ import pandas as pd
65
+ from sklearn.ensemble import RandomForestRegressor
66
+ from sklearn.metrics import r2_score
67
+ from .. import uq
68
+ d = pd.read_csv(_CD_SCAN)[self._FEATS + ["I_cd"]].dropna()
69
+ X = d[self._FEATS].to_numpy(float); y = d["I_cd"].to_numpy(float)
70
+ rng = np.random.default_rng(uq.SEED); p = rng.permutation(len(y)); X, y = X[p], y[p]
71
+ ntr = int(0.7 * len(y))
72
+ m = RandomForestRegressor(n_estimators=200, random_state=0).fit(X[:ntr], y[:ntr])
73
+ self._r2 = float(r2_score(y[ntr:], m.predict(X[ntr:]))); self._n = len(y)
74
+ self._m = m
75
+ return m
76
+
77
+ def _predict(self, x):
78
+ m = self._fit()
79
+ return Prediction(float(m.predict(np.atleast_2d(np.asarray(x, float)))[0]), None, True,
80
+ note="driven current I_cd (MA) from [gamma_cd,P_cd,ne,R0,B0,Ti0,beta_N]")
81
+
82
+ def benchmark(self):
83
+ self._fit()
84
+ return {"member": self.name,
85
+ "live_cd_surrogate": {
86
+ "source": "d1_cd_search.csv (3888-point current-drive design scan)",
87
+ "features": self._FEATS, "target": "I_cd (driven current, MA)",
88
+ "r2_vs_scan": round(self._r2, 3), "n_samples": self._n,
89
+ "verdict": (f"Fast surrogate of the current-drive scan: predicts driven current from "
90
+ f"RF/NBI drive + plasma params, R2={self._r2:.3f} ({self._n} configs). Reduced "
91
+ f"CD model — GENRAY/TORAY/NUBEAM ray-tracing is the fidelity upgrade.")},
92
+ "caveat": "engineering CD scan (not full ray-tracing); feeds KAIROS heating control"}
93
+
94
+
95
+ @register
96
+ class KEDGE(Surrogate):
97
+ name = "KEDGE"; function = "edge-transport"; phase = 3; status = "BUILT"
98
+ provenance = "SIM"
99
+ retired_by = "SOLPS-ITER / EIRENE edge campaign"
100
+ real_codes = ("divertor target-thermal scan",)
101
+ gates = ("H9",)
102
+ note = ("divertor / edge heat-flux -> target-thermal surrogate — maps divertor heat flux to "
103
+ "target surface temperature + material limits (W / CuCrZr) from the H9 exhaust scan. "
104
+ "Reduced 0-D thermal model; SOLPS-ITER/EIRENE = fidelity upgrade")
105
+
106
+ def _fit(self):
107
+ if getattr(self, "_coef", None) is not None:
108
+ return
109
+ import pandas as pd
110
+ from sklearn.metrics import r2_score
111
+ df = pd.read_csv(_DIV_THERMAL).dropna(subset=["q_MWm2", "T_w_surf_C"])
112
+ q = df["q_MWm2"].to_numpy(float); T = df["T_w_surf_C"].to_numpy(float)
113
+ self._coef = np.polyfit(q, T, 2)
114
+ self._r2 = float(r2_score(T, np.polyval(self._coef, q))); self._n = len(q)
115
+ bad = df[df["ok_CuCrZr"] == False] if "ok_CuCrZr" in df else df.iloc[0:0]
116
+ self._q_limit = float(bad["q_MWm2"].min()) if len(bad) else float(q.max())
117
+
118
+ def _predict(self, x):
119
+ self._fit()
120
+ q = float(np.ravel(np.asarray(x, float))[0])
121
+ return Prediction(float(np.polyval(self._coef, q)), None, q <= self._q_limit,
122
+ note=f"target surface temp (C) at q={q} MW/m^2; in_domain = under CuCrZr limit")
123
+
124
+ def benchmark(self):
125
+ self._fit()
126
+ return {"member": self.name,
127
+ "live_divertor_thermal": {
128
+ "source": "h9_target_thermal.csv (H9 exhaust/divertor engineering scan)",
129
+ "map": "divertor heat flux q [MW/m^2] -> target surface temperature [C]",
130
+ "r2_fit": round(self._r2, 3), "n_samples": self._n,
131
+ "max_safe_q_MWm2_CuCrZr": self._q_limit,
132
+ "verdict": (f"Divertor target-thermal surrogate: q->T_surf fit R2={self._r2:.3f} over "
133
+ f"{self._n} points; CuCrZr material limit at q~{self._q_limit} MW/m2. Reduced "
134
+ f"0-D thermal model — SOLPS-ITER/EIRENE edge campaign is the fidelity upgrade.")},
135
+ "caveat": "0-D target-thermal scan, not a full 2-D edge-transport solve"}
136
+
137
+
138
+ @register
139
+ class KRAD(Surrogate):
140
+ name = "KRAD"; function = "radiation-control"; phase = 3; status = "BUILT"
141
+ provenance = "SIM"
142
+ retired_by = "impurity transport (SOLPS + impurity) + radiation control"
143
+ real_codes = ("impurity-seeding radiation scan",)
144
+ gates = ("H9",)
145
+ note = ("impurity-seeding radiation-control evaluator — maps a seeded impurity + radiated-power "
146
+ "fraction to core Zeff penalty and P_rad from the H9 seeding scan. Small scan; full "
147
+ "impurity-transport (SOLPS + impurity) = fidelity upgrade")
148
+
149
+ def _table(self):
150
+ import pandas as pd
151
+ return pd.read_csv(_SEEDING)
152
+
153
+ def _predict(self, x):
154
+ df = self._table()
155
+ imp = x.get("impurity", "N") if isinstance(x, dict) else "N"
156
+ row = df[df["impurity"] == imp]
157
+ r = (row.iloc[0] if len(row) else df.iloc[0])
158
+ return Prediction({"impurity": str(r["impurity"]), "P_rad_MW": float(r["P_rad_MW"]),
159
+ "dZeff_core": [float(r["dZeff_core_lo"]), float(r["dZeff_core_hi"])],
160
+ "c_div_frac_pct": float(r["c_div_frac_pct"])},
161
+ None, True, note="radiated power + core-Zeff penalty for the seeded impurity")
162
+
163
+ def benchmark(self):
164
+ df = self._table()
165
+ best = df.loc[df["dZeff_core_hi"].idxmin()]
166
+ return {"member": self.name,
167
+ "live_impurity_seeding": {
168
+ "source": "h9_seeding.csv (H9 impurity-seeding scan)",
169
+ "n_impurities": int(df["impurity"].nunique()),
170
+ "impurities": sorted(df["impurity"].unique().tolist()),
171
+ "radiated_fraction": float(df["f_rad"].iloc[0]),
172
+ "least_core_dilution_impurity": str(best["impurity"]),
173
+ "verdict": (f"Impurity-seeding radiation evaluator over {int(df['impurity'].nunique())} "
174
+ f"impurities at f_rad={df['f_rad'].iloc[0]}: '{best['impurity']}' gives the least "
175
+ f"core Zeff penalty (dZeff_hi={best['dZeff_core_hi']}). Small scan — full "
176
+ f"impurity-transport (SOLPS) is the fidelity upgrade.")},
177
+ "caveat": "small seeding scan (few impurities); reduced 0-D radiation model"}
178
 
179
 
180
  @register
kronos_ml/quantum_backend.py ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """KODEX quantum backend layer — the honest "connect into a real quantum computer" hook.
2
+
3
+ Every KODEX quantum code builds its circuit ONCE and runs it through `get_device()`.
4
+ By default that is a LOCAL simulator (exact statevector, free, CPU, works today). The
5
+ SAME circuit runs on real hardware or a shot-based simulator by setting env vars — no
6
+ code change:
7
+
8
+ KODEX_QC_BACKEND unset / "default" -> default.qubit exact statevector (free)
9
+ KODEX_QC_BACKEND=aer -> qiskit.aer realistic shot noise (local)
10
+ KODEX_QC_BACKEND=ibm -> qiskit.remote REAL IBM Quantum hardware
11
+ also set KODEX_QC_TOKEN=<your IBM Quantum API token>
12
+ optionally KODEX_QC_IBM_BACKEND=<backend name> (default: least-busy)
13
+
14
+ HONEST FRAMING (carry it on every card): a genuine quantum *advantage* for fusion kernels
15
+ is ~8-10 years out (fault tolerance). What is real and runnable TODAY is the *tooling and
16
+ testing* — you can execute these fusion quantum programs on a simulator now, and on real
17
+ quantum hardware the moment you plug in an account, on one code path. That is what KODEX
18
+ offers: be first to test earnestly, honest about the timeline.
19
+ """
20
+ from __future__ import annotations
21
+
22
+ import os
23
+
24
+
25
+ def qc_backend() -> str:
26
+ return os.environ.get("KODEX_QC_BACKEND", "default").strip().lower()
27
+
28
+
29
+ def get_device(wires, shots=None):
30
+ """Return a PennyLane device for `wires`, routed by KODEX_QC_BACKEND. Defaults to the
31
+ free local exact simulator; falls back to it safely if a hardware plugin is missing."""
32
+ import pennylane as qml
33
+ b = qc_backend()
34
+ if b in ("", "default", "sim", "statevector"):
35
+ return qml.device("default.qubit", wires=wires, shots=shots)
36
+ if b == "aer":
37
+ try:
38
+ return qml.device("qiskit.aer", wires=wires, shots=shots or 4096)
39
+ except Exception:
40
+ return qml.device("default.qubit", wires=wires, shots=shots)
41
+ if b in ("ibm", "qiskit", "hardware"):
42
+ try:
43
+ kw = {"wires": wires, "shots": shots or 4096}
44
+ tok = os.environ.get("KODEX_QC_TOKEN")
45
+ if tok:
46
+ kw["token"] = tok
47
+ ibm = os.environ.get("KODEX_QC_IBM_BACKEND")
48
+ if ibm:
49
+ kw["backend"] = ibm
50
+ return qml.device("qiskit.remote", **kw) # real IBM Quantum hardware
51
+ except Exception:
52
+ return qml.device("default.qubit", wires=wires, shots=shots)
53
+ return qml.device("default.qubit", wires=wires, shots=shots)
54
+
55
+
56
+ def backend_note() -> dict:
57
+ """A small honest descriptor of where a circuit actually ran — for benchmark cards."""
58
+ b = qc_backend()
59
+ real = b in ("ibm", "qiskit", "hardware")
60
+ return {
61
+ "active_backend": b or "default",
62
+ "ran_on_real_hardware": real,
63
+ "how_to_use_real_qc": ("set KODEX_QC_BACKEND=ibm and KODEX_QC_TOKEN=<your IBM Quantum "
64
+ "token> to run this exact circuit on real quantum hardware"),
65
+ "honest_timeline": ("fault-tolerant quantum ADVANTAGE for fusion kernels is ~8-10 yr out; "
66
+ "this tooling makes the TESTING real and runnable TODAY, same code path"),
67
+ }
publish/_percode.py CHANGED
@@ -56,7 +56,26 @@ KEYWORDS_BASE = ["fusion energy", "spherical tokamak", "D-3He", "AI/ML surrogate
56
 
57
 
58
  def built():
59
- return sorted(n for n in K.list_surrogates() if K.get(n).status == "BUILT")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
 
62
  def physics_source(s):
@@ -127,7 +146,7 @@ def record_meta(name, b=None):
127
  "related_identifiers": related,
128
  "description": desc,
129
  "description_plain": desc_plain,
130
- "notes": (f"Draft-first per-code deposit. Full package (all 26 codes): {REPO_URL}. "
131
  f"Provenance chain in card.md + MANIFEST.sha256."),
132
  }
133
 
 
56
 
57
 
58
  def built():
59
+ """The codes a publish run acts on: every BUILT code, unless KODEX_PUBLISH_ONLY
60
+ restricts it to an explicit allow-list (comma/space-separated code names).
61
+
62
+ The allow-list is how an operator deposits a deliberate SUBSET (e.g. only the
63
+ v0.2.0 additions) without touching the rest of the fleet — it does NOT change any
64
+ code's real status, so the package stays honest. Unset = all BUILT (default). A
65
+ named code that is not currently BUILT is a hard error, so a typo can never
66
+ silently narrow (or widen) the set.
67
+ """
68
+ names = sorted(n for n in K.list_surrogates() if K.get(n).status == "BUILT")
69
+ only = os.environ.get("KODEX_PUBLISH_ONLY", "").strip()
70
+ if only:
71
+ want = {c.strip().upper() for c in re.split(r"[,\s]+", only) if c.strip()}
72
+ unknown = want - set(names)
73
+ if unknown:
74
+ raise SystemExit(f"[STOP] KODEX_PUBLISH_ONLY names not in the BUILT set: "
75
+ f"{sorted(unknown)} (BUILT: {names})")
76
+ names = [n for n in names if n in want]
77
+ sys.stderr.write(f"[scope] KODEX_PUBLISH_ONLY -> {len(names)} codes: {names}\n")
78
+ return names
79
 
80
 
81
  def physics_source(s):
 
146
  "related_identifiers": related,
147
  "description": desc,
148
  "description_plain": desc_plain,
149
+ "notes": (f"Draft-first per-code deposit. Full package: {REPO_URL}. "
150
  f"Provenance chain in card.md + MANIFEST.sha256."),
151
  }
152
 
publish/_percode_summary.json CHANGED
@@ -1,13 +1,16 @@
1
  {
2
- "version": "0.1.0",
3
- "date": "2026-09-10",
4
- "n_records": 26,
5
  "codes": [
6
  "KAIROS",
 
7
  "KBREED",
8
  "KBURN",
9
  "KDRIVE",
 
10
  "KECON",
 
11
  "KEYE",
12
  "KFLOW",
13
  "KFLUX",
@@ -17,6 +20,7 @@
17
  "KGATE",
18
  "KGEN",
19
  "KHALO",
 
20
  "KISO",
21
  "KLAW",
22
  "KMAT",
@@ -24,9 +28,14 @@
24
  "KORE",
25
  "KPATH",
26
  "KPILOT",
 
 
27
  "KQROSS",
28
  "KQUBIT",
 
 
29
  "KSENSE",
 
30
  "KWARD",
31
  "KYRO"
32
  ]
 
1
  {
2
+ "version": "0.2.0",
3
+ "date": "2026-09-11",
4
+ "n_records": 35,
5
  "codes": [
6
  "KAIROS",
7
+ "KBENCH",
8
  "KBREED",
9
  "KBURN",
10
  "KDRIVE",
11
+ "KDYN",
12
  "KECON",
13
+ "KEDGE",
14
  "KEYE",
15
  "KFLOW",
16
  "KFLUX",
 
20
  "KGATE",
21
  "KGEN",
22
  "KHALO",
23
+ "KHEAT",
24
  "KISO",
25
  "KLAW",
26
  "KMAT",
 
28
  "KORE",
29
  "KPATH",
30
  "KPILOT",
31
+ "KQERN",
32
+ "KQOPT",
33
  "KQROSS",
34
  "KQUBIT",
35
+ "KRAD",
36
+ "KSEEK",
37
  "KSENSE",
38
+ "KTENSOR",
39
  "KWARD",
40
  "KYRO"
41
  ]
publish/records/kairos/CITATION.cff CHANGED
@@ -1,7 +1,7 @@
1
  cff-version: 1.2.0
2
  title: "KODEX — KAIROS: CONTROL (Kronos Family of Codes)"
3
- version: "0.1.0"
4
- date-released: "2026-09-10"
5
  license: Apache-2.0
6
  url: "https://kronosfusionenergy.com/kodex/kairos"
7
  repository-code: "https://github.com/KronosFE/kronos-ml"
 
1
  cff-version: 1.2.0
2
  title: "KODEX — KAIROS: CONTROL (Kronos Family of Codes)"
3
+ version: "0.2.0"
4
+ date-released: "2026-09-11"
5
  license: Apache-2.0
6
  url: "https://kronosfusionenergy.com/kodex/kairos"
7
  repository-code: "https://github.com/KronosFE/kronos-ml"
publish/records/kairos/MANIFEST.sha256 CHANGED
@@ -1,7 +1,7 @@
1
- # KODEX KAIROS SHA-256 (0.1.0, 2026-09-10)
2
- 852b3278c70927c76a4564025f4f8d03f6924f2404a9895c7968497fd4336324 CITATION.cff
3
  ae87ebecd1f321a19799e21f6fe25e4a74261f16c91e6cb6cc248e6197dcf838 LICENSE
4
- be1f5d076e701c4478e1d903bfc5e8c68a11da616616be0f24124892c6b26384 benchmark.json
5
- 7d07831775d3dc085eea03acdb339f6ebf5cc966ab6a8e8d745518ae8b1af748 card.md
6
  203323e21eb15172090486e0fdde9367a3c13b7e1fb3d66d5b280108b7f15f32 kairos.py
7
- 13c311b01467cc937c6ec28a5cbbe1a9f2d2ec4651e42a6afbdd4efd39596687 metadata.json
 
1
+ # KODEX KAIROS SHA-256 (0.2.0, 2026-09-11)
2
+ d334149c67e6fab06da1157e5cd47129d2bf4e738754afeb20176b6bacb89d54 CITATION.cff
3
  ae87ebecd1f321a19799e21f6fe25e4a74261f16c91e6cb6cc248e6197dcf838 LICENSE
4
+ 4519abc8cba84d5ba68e5e0cc5faef0dac4094a970a6a4a39f993abcfc4931be benchmark.json
5
+ f99514c0fb9ad18571bfafcdd8579f51323285a65c66f90140d91cb781a58243 card.md
6
  203323e21eb15172090486e0fdde9367a3c13b7e1fb3d66d5b280108b7f15f32 kairos.py
7
+ 85ff663bac08f45a66d216dbbed1bf62143b7fa0943192c6f6e91f4ca3cf4c47 metadata.json
publish/records/kairos/benchmark.json CHANGED
@@ -11,7 +11,7 @@
11
  "escapes": 0,
12
  "catch_rate": 1.0
13
  },
14
- "live_mpc_step_us": 89.7,
15
  "sourced": {
16
  "file": "track5_control/clamp_activation_stats.csv",
17
  "headline": "0 escapes / 150k steps / 3000 injected (AC-25); tracking <5%"
 
11
  "escapes": 0,
12
  "catch_rate": 1.0
13
  },
14
+ "live_mpc_step_us": 96.1,
15
  "sourced": {
16
  "file": "track5_control/clamp_activation_stats.csv",
17
  "headline": "0 escapes / 150k steps / 3000 injected (AC-25); tracking <5%"
publish/records/kairos/card.md CHANGED
@@ -10,4 +10,4 @@
10
  - **note:** real-time closed-loop MPC control (analytic finite-horizon QP); supplies the model-free L4 clamp that KGATE enforces
11
  - **available:** True
12
 
13
- Benchmark headline: MPC tracking 0.0461 (<5%); Exp-B **0 escapes / 150,000**; 89.7 µs/step
 
10
  - **note:** real-time closed-loop MPC control (analytic finite-horizon QP); supplies the model-free L4 clamp that KGATE enforces
11
  - **available:** True
12
 
13
+ Benchmark headline: MPC tracking 0.0461 (<5%); Exp-B **0 escapes / 150,000**; 96.1 µs/step
publish/records/kairos/metadata.json CHANGED
@@ -2,8 +2,8 @@
2
  "kname": "KAIROS",
3
  "page": "https://kronosfusionenergy.com/kodex/kairos",
4
  "title": "KODEX \u2014 KAIROS: CONTROL",
5
- "version": "0.1.0",
6
- "publication_date": "2026-09-10",
7
  "language": "eng",
8
  "upload_type": "software",
9
  "creators": [
@@ -59,7 +59,7 @@
59
  "resource_type": "dataset"
60
  }
61
  ],
62
- "description": "<p><strong>KODEX &mdash; KAIROS</strong> (CONTROL). real-time closed-loop MPC control (analytic finite-horizon QP); supplies the model-free L4 clamp that KGATE enforces</p><p><strong>Benchmark:</strong> MPC tracking 0.0461 (<5%); Exp-B **0 escapes / 150,000**; 89.7 \u00b5s/step</p><p>Part of KODEX, the Kronos Family of Codes &mdash; a benchmarked AI/ML fusion surrogate suite with calibrated uncertainty and an abstention gate (<code>predict(x) &rarr; (y, uncertainty, in_domain)</code>). Provenance: references 10.5281/zenodo.21842371. Home: <a href=\"https://kronosfusionenergy.com/kodex/kairos\">https://kronosfusionenergy.com/kodex/kairos</a> &middot; suite: <a href=\"https://github.com/KronosFE/kronos-ml\">https://github.com/KronosFE/kronos-ml</a>. Licensed under Apache-2.0. Honest card preserved verbatim.</p>",
63
  "description_plain": "KODEX \u2014 KAIROS (CONTROL). real-time closed-loop MPC control (analytic finite-horizon QP); supplies the model-free L4 clamp that KGATE enforcesBenchmark: MPC tracking 0.0461 (Part of KODEX, the Kronos Family of Codes \u2014 a benchmarked AI/ML fusion surrogate suite with calibrated uncertainty and an abstention gate (predict(x) \u2192 (y, uncertainty, in_domain)). Provenance: references 10.5281/zenodo.21842371. Home: https://kronosfusionenergy.com/kodex/kairos \u00b7 suite: https://github.com/KronosFE/kronos-ml. Licensed under Apache-2.0. Honest card preserved verbatim.",
64
  "notes": "Draft-first per-code deposit. Full package (all 26 codes): https://github.com/KronosFE/kronos-ml. Provenance chain in card.md + MANIFEST.sha256."
65
  }
 
2
  "kname": "KAIROS",
3
  "page": "https://kronosfusionenergy.com/kodex/kairos",
4
  "title": "KODEX \u2014 KAIROS: CONTROL",
5
+ "version": "0.2.0",
6
+ "publication_date": "2026-09-11",
7
  "language": "eng",
8
  "upload_type": "software",
9
  "creators": [
 
59
  "resource_type": "dataset"
60
  }
61
  ],
62
+ "description": "<p><strong>KODEX &mdash; KAIROS</strong> (CONTROL). real-time closed-loop MPC control (analytic finite-horizon QP); supplies the model-free L4 clamp that KGATE enforces</p><p><strong>Benchmark:</strong> MPC tracking 0.0461 (<5%); Exp-B **0 escapes / 150,000**; 96.1 \u00b5s/step</p><p>Part of KODEX, the Kronos Family of Codes &mdash; a benchmarked AI/ML fusion surrogate suite with calibrated uncertainty and an abstention gate (<code>predict(x) &rarr; (y, uncertainty, in_domain)</code>). Provenance: references 10.5281/zenodo.21842371. Home: <a href=\"https://kronosfusionenergy.com/kodex/kairos\">https://kronosfusionenergy.com/kodex/kairos</a> &middot; suite: <a href=\"https://github.com/KronosFE/kronos-ml\">https://github.com/KronosFE/kronos-ml</a>. Licensed under Apache-2.0. Honest card preserved verbatim.</p>",
63
  "description_plain": "KODEX \u2014 KAIROS (CONTROL). real-time closed-loop MPC control (analytic finite-horizon QP); supplies the model-free L4 clamp that KGATE enforcesBenchmark: MPC tracking 0.0461 (Part of KODEX, the Kronos Family of Codes \u2014 a benchmarked AI/ML fusion surrogate suite with calibrated uncertainty and an abstention gate (predict(x) \u2192 (y, uncertainty, in_domain)). Provenance: references 10.5281/zenodo.21842371. Home: https://kronosfusionenergy.com/kodex/kairos \u00b7 suite: https://github.com/KronosFE/kronos-ml. Licensed under Apache-2.0. Honest card preserved verbatim.",
64
  "notes": "Draft-first per-code deposit. Full package (all 26 codes): https://github.com/KronosFE/kronos-ml. Provenance chain in card.md + MANIFEST.sha256."
65
  }
publish/records/kbench/CITATION.cff ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cff-version: 1.2.0
2
+ title: "KODEX — KBENCH: BENCHMARK (Kronos Family of Codes)"
3
+ version: "0.2.0"
4
+ date-released: "2026-09-11"
5
+ license: Apache-2.0
6
+ url: "https://kronosfusionenergy.com/kodex/kbench"
7
+ repository-code: "https://github.com/KronosFE/kronos-ml"
8
+ type: software
9
+ authors:
10
+ - family-names: Ford
11
+ given-names: "P. I."
12
+ orcid: "https://orcid.org/0000-0003-0395-1752"
13
+ affiliation: "Kronos Fusion Energy"
publish/records/kbench/LICENSE ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but not
32
+ limited to compiled object code, generated documentation, and
33
+ conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work.
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other modifications
42
+ represent, as a whole, an original work of authorship. For the purposes
43
+ of this License, Derivative Works shall not include works that remain
44
+ separable from, or merely link (or bind by name) to the interfaces of,
45
+ the Work and Derivative Works thereof.
46
+
47
+ "Contribution" shall mean any work of authorship, including the
48
+ original version of the Work and any modifications or additions
49
+ to that Work or Derivative Works thereof, that is intentionally
50
+ submitted to Licensor for inclusion in the Work by the copyright owner
51
+ or by an individual or Legal Entity authorized to submit on behalf of
52
+ the copyright owner. For the purposes of this definition, "submitted"
53
+ means any form of electronic, verbal, or written communication sent
54
+ to the Licensor or its representatives, including but not limited to
55
+ communication on electronic mailing lists, source code control systems,
56
+ and issue tracking systems that are managed by, or on behalf of, the
57
+ Licensor for the purpose of discussing and improving the Work, but
58
+ excluding communication that is conspicuously marked or otherwise
59
+ designated in writing by the copyright owner as "Not a Contribution."
60
+
61
+ "Contributor" shall mean Licensor and any individual or Legal Entity
62
+ on behalf of whom a Contribution has been received by Licensor and
63
+ subsequently incorporated within the Work.
64
+
65
+ 2. Grant of Copyright License. Subject to the terms and conditions of
66
+ this License, each Contributor hereby grants to You a perpetual,
67
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
68
+ copyright license to reproduce, prepare Derivative Works of,
69
+ publicly display, publicly perform, sublicense, and distribute the
70
+ Work and such Derivative Works in Source or Object form.
71
+
72
+ 3. Grant of Patent License. Subject to the terms and conditions of
73
+ this License, each Contributor hereby grants to You a perpetual,
74
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
75
+ (except as stated in this section) patent license to make, have made,
76
+ use, offer to sell, sell, import, and otherwise transfer the Work,
77
+ where such license applies only to those patent claims licensable
78
+ by such Contributor that are necessarily infringed by their
79
+ Contribution(s) alone or by combination of their Contribution(s)
80
+ with the Work to which such Contribution(s) was submitted. If You
81
+ institute patent litigation against any entity (including a
82
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
83
+ or a Contribution incorporated within the Work constitutes direct
84
+ or contributory patent infringement, then any patent licenses
85
+ granted to You under this License for that Work shall terminate
86
+ as of the date such litigation is filed.
87
+
88
+ 4. Redistribution. You may reproduce and distribute copies of the
89
+ Work or Derivative Works thereof in any medium, with or without
90
+ modifications, and in Source or Object form, provided that You
91
+ meet the following conditions:
92
+
93
+ (a) You must give any other recipients of the Work or Derivative
94
+ Works a copy of this License; and
95
+
96
+ (b) You must cause any modified files to carry prominent notices
97
+ stating that You changed the files; and
98
+
99
+ (c) You must retain, in the Source form of any Derivative Works
100
+ that You distribute, all copyright, patent, trademark, and
101
+ attribution notices from the Source form of the Work,
102
+ excluding those notices that do not pertain to any part of
103
+ the Derivative Works; and
104
+
105
+ (d) If the Work includes a "NOTICE" text file as part of its
106
+ distribution, then any Derivative Works that You distribute must
107
+ include a readable copy of the attribution notices contained
108
+ within such NOTICE file, excluding those notices that do not
109
+ pertain to any part of the Derivative Works.
110
+
111
+ You may add Your own copyright statement to Your modifications and
112
+ may provide additional or different license terms and conditions
113
+ for use, reproduction, or distribution of Your modifications, or
114
+ for any such Derivative Works as a whole, provided Your use,
115
+ reproduction, and distribution of the Work otherwise complies with
116
+ the conditions stated in this License.
117
+
118
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
119
+ any Contribution intentionally submitted for inclusion in the Work
120
+ by You to the Licensor shall be under the terms and conditions of
121
+ this License, without any additional terms or conditions.
122
+ Notwithstanding the above, nothing herein shall supersede or modify
123
+ the terms of any separate license agreement you may have executed
124
+ with Licensor regarding such Contributions.
125
+
126
+ 6. Trademarks. This License does not grant permission to use the trade
127
+ names, trademarks, service marks, or product names of the Licensor,
128
+ except as required for reasonable and customary use in describing the
129
+ origin of the Work and reproducing the content of the NOTICE file.
130
+
131
+ 7. Disclaimer of Warranty. Unless required by applicable law or
132
+ agreed to in writing, Licensor provides the Work (and each
133
+ Contributor provides its Contributions) on an "AS IS" BASIS,
134
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
135
+ implied, including, without limitation, any warranties or conditions
136
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
137
+ PARTICULAR PURPOSE. You are solely responsible for determining the
138
+ appropriateness of using or redistributing the Work and assume any
139
+ risks associated with Your exercise of permissions under this License.
140
+
141
+ 8. Limitation of Liability. In no event and under no legal theory,
142
+ whether in tort (including negligence), contract, or otherwise,
143
+ unless required by applicable law (such as deliberate and grossly
144
+ negligent acts) or agreed to in writing, shall any Contributor be
145
+ liable to You for damages, including any direct, indirect, special,
146
+ incidental, or consequential damages of any character arising as a
147
+ result of this License or out of the use or inability to use the
148
+ Work (including but not limited to damages for loss of goodwill,
149
+ work stoppage, computer failure or malfunction, or any and all
150
+ other commercial damages or losses), even if such Contributor
151
+ has been advised of the possibility of such damages.
152
+
153
+ 9. Accepting Warranty or Additional Liability. While redistributing
154
+ the Work or Derivative Works thereof, You may choose to offer,
155
+ and charge a fee for, acceptance of support, warranty, indemnity,
156
+ or other liability obligations and/or rights consistent with this
157
+ License. However, in accepting such obligations, You may act only
158
+ on Your own behalf and on Your sole responsibility, not on behalf
159
+ of any other Contributor, and only if You agree to indemnify,
160
+ defend, and hold each Contributor harmless for any liability
161
+ incurred by, or claims asserted against, such Contributor by reason
162
+ of your accepting any such warranty or additional liability.
163
+
164
+ END OF TERMS AND CONDITIONS
165
+
166
+ APPENDIX: How to apply the Apache License to your work.
167
+
168
+ To apply the Apache License to your work, attach the following
169
+ boilerplate notice, with the fields enclosed by brackets "[]"
170
+ replaced with your own identifying information. (Don't include
171
+ the brackets!) The text should be enclosed in the appropriate
172
+ comment syntax for the file format. We also recommend that a
173
+ file or class name and description of purpose be included on the
174
+ same "printed page" as the copyright notice for easier
175
+ identification within third-party archives.
176
+
177
+ Copyright 2026 Kronos Fusion Energy
178
+
179
+ Licensed under the Apache License, Version 2.0 (the "License");
180
+ you may not use this file except in compliance with the License.
181
+ You may obtain a copy of the License at
182
+
183
+ http://www.apache.org/licenses/LICENSE-2.0
184
+
185
+ Unless required by applicable law or agreed to in writing, software
186
+ distributed under the License is distributed on an "AS IS" BASIS,
187
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
188
+ See the License for the specific language governing permissions and
189
+ limitations under the License.
publish/records/kbench/MANIFEST.sha256 ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # KODEX KBENCH SHA-256 (0.2.0, 2026-09-11)
2
+ cecfe7657f26a4b4af96f4257070e8769c4c9266748d8717f4ceeb3fbba00e83 CITATION.cff
3
+ ae87ebecd1f321a19799e21f6fe25e4a74261f16c91e6cb6cc248e6197dcf838 LICENSE
4
+ 1f532ca6a582bc0e639f3490dc421c799f583766a8639863078d00ff3ef66f75 benchmark.json
5
+ 65f7c48c499563e291bf9230ac6098dcee186eaf437e97b43b41a640638fa972 card.md
6
+ 4d0e21b1012d27a9f9a2bb6cccb937530a8efe1ed02b6b9d5cc569ac8ad42c91 kbench.py
7
+ e62bf7f72ba3ffda7478ade5c404e054bb0e77d9a42be30352ef1952673934a4 metadata.json
publish/records/kbench/benchmark.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "member": "KBENCH",
3
+ "live_benchmark_suite": {
4
+ "n_tasks": 3,
5
+ "tasks": {
6
+ "cgyro-turbulence-flux": {
7
+ "inputs": [
8
+ "a_LT",
9
+ "shear"
10
+ ],
11
+ "target": "log10 Q_tot (regression) + turbulent/quiet (classification)",
12
+ "n_samples": 16,
13
+ "metric": "R2 (regression) / leave-one-out accuracy (classification)",
14
+ "loader": "kronos_ml.data.cgyro_flux_map_final()",
15
+ "baseline_code": "KYRO",
16
+ "baseline_score": "R2 ~0.86, turbulent/quiet 16/16",
17
+ "note": "real CGYRO A1e saturated-flux (mu=400 representative)"
18
+ },
19
+ "mast-disruption": {
20
+ "inputs": "physics features (Ip family + EFIT + n=1 Mirnov / P_rad)",
21
+ "target": "disruptive (binary)",
22
+ "n_samples": 591,
23
+ "metric": "ROC-AUC (+ independent-precursor AUC)",
24
+ "loader": "kronos_ml.data.kward_real()",
25
+ "baseline_code": "KWARD",
26
+ "baseline_score": "AUC ~0.98, independent-precursor 0.975",
27
+ "note": "real MAST shots (FAIR-MAST); labels are heuristic Ip-quench"
28
+ },
29
+ "cgyro-rom-compressibility": {
30
+ "inputs": "flux-database matrix (points x [inputs, fluxes])",
31
+ "target": "rel-L2 reconstruction error vs retained bond dimension",
32
+ "n_samples": 16,
33
+ "metric": "rel-L2 vs rank",
34
+ "loader": "kronos_ml.data.cgyro_flux_map_final()",
35
+ "baseline_code": "KTENSOR",
36
+ "baseline_score": "effective rank 2.93/4 (not strongly low-rank)",
37
+ "note": "honest ROM characterization"
38
+ }
39
+ },
40
+ "how_to_use": "load via each task's loader, use the fixed reproducible split, report the metric, and try to beat the named KODEX baseline_code",
41
+ "verdict": "3 open, citable fusion-ML tasks (CGYRO turbulence, MAST disruption, flux ROM) with real on-disk data + reproducible KODEX baselines \u2014 a community leaderboard starting point, not a private result"
42
+ },
43
+ "caveat": "small by mainstream-ML standards (CGYRO = 16 pts); honest pilot fusion-ML benchmarks"
44
+ }
publish/records/kbench/card.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # KODEX KBENCH — card
2
+
3
+ - **name:** KBENCH
4
+ - **function:** BENCHMARK
5
+ - **status:** BUILT
6
+ - **phase:** 3
7
+ - **provenance:** n/a
8
+ - **retired_by:** community-standard fusion-ML benchmarks
9
+ - **gates:** []
10
+ - **note:** open, citable ML benchmark suite for fusion — real CGYRO turbulence + MAST disruption tasks with fixed splits, metrics and KODEX baselines to beat. Bring your own model; move the community forward
11
+ - **available:** True
12
+
13
+ Benchmark headline: open fusion-ML benchmark suite: **3 citable tasks** (CGYRO turbulence, MAST disruption, flux ROM) with real data + KODEX baselines
publish/records/kbench/kbench.py ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """KODEX KBENCH — source excerpt (class). Full runnable package: https://github.com/KronosFE/kronos-ml"""
2
+
3
+ @register
4
+ class KBENCH(Surrogate):
5
+ name = "KBENCH"; function = "BENCHMARK"; phase = 3; status = "BUILT"
6
+ provenance = "n/a"
7
+ retired_by = "community-standard fusion-ML benchmarks"
8
+ real_codes = ("open ML benchmark suite",)
9
+ gates = ()
10
+ note = ("open, citable ML benchmark suite for fusion — real CGYRO turbulence + MAST "
11
+ "disruption tasks with fixed splits, metrics and KODEX baselines to beat. Bring "
12
+ "your own model; move the community forward")
13
+
14
+ def tasks(self):
15
+ return {
16
+ "cgyro-turbulence-flux": {
17
+ "inputs": ["a_LT", "shear"],
18
+ "target": "log10 Q_tot (regression) + turbulent/quiet (classification)",
19
+ "n_samples": 16, "metric": "R2 (regression) / leave-one-out accuracy (classification)",
20
+ "loader": "kronos_ml.data.cgyro_flux_map_final()",
21
+ "baseline_code": "KYRO", "baseline_score": "R2 ~0.86, turbulent/quiet 16/16",
22
+ "note": "real CGYRO A1e saturated-flux (mu=400 representative)"},
23
+ "mast-disruption": {
24
+ "inputs": "physics features (Ip family + EFIT + n=1 Mirnov / P_rad)",
25
+ "target": "disruptive (binary)",
26
+ "n_samples": 591, "metric": "ROC-AUC (+ independent-precursor AUC)",
27
+ "loader": "kronos_ml.data.kward_real()",
28
+ "baseline_code": "KWARD", "baseline_score": "AUC ~0.98, independent-precursor 0.975",
29
+ "note": "real MAST shots (FAIR-MAST); labels are heuristic Ip-quench"},
30
+ "cgyro-rom-compressibility": {
31
+ "inputs": "flux-database matrix (points x [inputs, fluxes])",
32
+ "target": "rel-L2 reconstruction error vs retained bond dimension",
33
+ "n_samples": 16, "metric": "rel-L2 vs rank",
34
+ "loader": "kronos_ml.data.cgyro_flux_map_final()",
35
+ "baseline_code": "KTENSOR", "baseline_score": "effective rank 2.93/4 (not strongly low-rank)",
36
+ "note": "honest ROM characterization"},
37
+ }
38
+
39
+ def _predict(self, x):
40
+ t = self.tasks()
41
+ key = x if isinstance(x, str) and x in t else next(iter(t))
42
+ return Prediction(t[key], None, True, note=f"fusion-ML benchmark task spec: {key}")
43
+
44
+ def benchmark(self):
45
+ t = self.tasks()
46
+ return {"member": self.name,
47
+ "live_benchmark_suite": {
48
+ "n_tasks": len(t), "tasks": t,
49
+ "how_to_use": ("load via each task's loader, use the fixed reproducible split, report "
50
+ "the metric, and try to beat the named KODEX baseline_code"),
51
+ "verdict": ("3 open, citable fusion-ML tasks (CGYRO turbulence, MAST disruption, flux "
52
+ "ROM) with real on-disk data + reproducible KODEX baselines — a community "
53
+ "leaderboard starting point, not a private result")},
54
+ "caveat": "small by mainstream-ML standards (CGYRO = 16 pts); honest pilot fusion-ML benchmarks"}
publish/records/kbench/metadata.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "kname": "KBENCH",
3
+ "page": "https://kronosfusionenergy.com/kodex/kbench",
4
+ "title": "KODEX \u2014 KBENCH: BENCHMARK",
5
+ "version": "0.2.0",
6
+ "publication_date": "2026-09-11",
7
+ "language": "eng",
8
+ "upload_type": "software",
9
+ "creators": [
10
+ {
11
+ "name": "Ford, P. I.",
12
+ "orcid": "0000-0003-0395-1752",
13
+ "affiliation": "Kronos Fusion Energy"
14
+ }
15
+ ],
16
+ "license": {
17
+ "id": "Apache-2.0"
18
+ },
19
+ "keywords": [
20
+ "fusion energy",
21
+ "spherical tokamak",
22
+ "D-3He",
23
+ "AI/ML surrogate model",
24
+ "uncertainty quantification",
25
+ "digital twin",
26
+ "Kronos Fusion Energy",
27
+ "BENCHMARK",
28
+ "KODEX:KBENCH"
29
+ ],
30
+ "related_identifiers": [
31
+ {
32
+ "relation": "isDocumentedBy",
33
+ "identifier": "https://kronosfusionenergy.com/kodex/kbench",
34
+ "resource_type": "publication-other"
35
+ },
36
+ {
37
+ "relation": "isPartOf",
38
+ "identifier": "https://kronosfusionenergy.com/kodex",
39
+ "resource_type": "publication-other"
40
+ },
41
+ {
42
+ "relation": "isSupplementTo",
43
+ "identifier": "https://github.com/KronosFE/kronos-ml",
44
+ "resource_type": "software"
45
+ },
46
+ {
47
+ "relation": "references",
48
+ "identifier": "10.5281/zenodo.22645689",
49
+ "resource_type": "publication"
50
+ },
51
+ {
52
+ "relation": "isCompiledBy",
53
+ "identifier": "https://github.com/KronosFE/kronos-toolkit",
54
+ "resource_type": "software"
55
+ },
56
+ {
57
+ "relation": "references",
58
+ "identifier": "10.5281/zenodo.21842371",
59
+ "resource_type": "dataset"
60
+ }
61
+ ],
62
+ "description": "<p><strong>KODEX &mdash; KBENCH</strong> (BENCHMARK). open, citable ML benchmark suite for fusion \u2014 real CGYRO turbulence + MAST disruption tasks with fixed splits, metrics and KODEX baselines to beat. Bring your own model; move the community forward</p><p><strong>Benchmark:</strong> open fusion-ML benchmark suite: **3 citable tasks** (CGYRO turbulence, MAST disruption, flux ROM) with real data + KODEX baselines</p><p>Part of KODEX, the Kronos Family of Codes &mdash; a benchmarked AI/ML fusion surrogate suite with calibrated uncertainty and an abstention gate (<code>predict(x) &rarr; (y, uncertainty, in_domain)</code>). Provenance: references 10.5281/zenodo.21842371. Home: <a href=\"https://kronosfusionenergy.com/kodex/kbench\">https://kronosfusionenergy.com/kodex/kbench</a> &middot; suite: <a href=\"https://github.com/KronosFE/kronos-ml\">https://github.com/KronosFE/kronos-ml</a>. Licensed under Apache-2.0. Honest card preserved verbatim.</p>",
63
+ "description_plain": "KODEX \u2014 KBENCH (BENCHMARK). open, citable ML benchmark suite for fusion \u2014 real CGYRO turbulence + MAST disruption tasks with fixed splits, metrics and KODEX baselines to beat. Bring your own model; move the community forwardBenchmark: open fusion-ML benchmark suite: **3 citable tasks** (CGYRO turbulence, MAST disruption, flux ROM) with real data + KODEX baselinesPart of KODEX, the Kronos Family of Codes \u2014 a benchmarked AI/ML fusion surrogate suite with calibrated uncertainty and an abstention gate (predict(x) \u2192 (y, uncertainty, in_domain)). Provenance: references 10.5281/zenodo.21842371. Home: https://kronosfusionenergy.com/kodex/kbench \u00b7 suite: https://github.com/KronosFE/kronos-ml. Licensed under Apache-2.0. Honest card preserved verbatim.",
64
+ "notes": "Draft-first per-code deposit. Full package: https://github.com/KronosFE/kronos-ml. Provenance chain in card.md + MANIFEST.sha256."
65
+ }
publish/records/kbreed/CITATION.cff CHANGED
@@ -1,7 +1,7 @@
1
  cff-version: 1.2.0
2
  title: "KODEX — KBREED: breeder (Kronos Family of Codes)"
3
- version: "0.1.0"
4
- date-released: "2026-09-10"
5
  license: Apache-2.0
6
  url: "https://kronosfusionenergy.com/kodex/kbreed"
7
  repository-code: "https://github.com/KronosFE/kronos-ml"
 
1
  cff-version: 1.2.0
2
  title: "KODEX — KBREED: breeder (Kronos Family of Codes)"
3
+ version: "0.2.0"
4
+ date-released: "2026-09-11"
5
  license: Apache-2.0
6
  url: "https://kronosfusionenergy.com/kodex/kbreed"
7
  repository-code: "https://github.com/KronosFE/kronos-ml"
publish/records/kbreed/MANIFEST.sha256 CHANGED
@@ -1,7 +1,7 @@
1
- # KODEX KBREED SHA-256 (0.1.0, 2026-09-10)
2
- d3f8622a2dcf9e4f0c0968bc8a8675e0204248d1ad8da3813fb2cef462ffcf4c CITATION.cff
3
  ae87ebecd1f321a19799e21f6fe25e4a74261f16c91e6cb6cc248e6197dcf838 LICENSE
4
  a4be39a1e927548c99ce00de458ddc45d4911a1ad61aaab886e6f081230c3425 benchmark.json
5
  ccbe9db0278e3c1266ee8ff8091d2df723a780c35b740f5f03ee1bc954fb9155 card.md
6
  78c0c8482b808f86983ba12de743d8ac0bb879a9f1e170db14d62b3606c27f45 kbreed.py
7
- 6806fdb5e76ebe8aad895c7df1b3d8716145fa50aa4ec28cac22a49d4177f847 metadata.json
 
1
+ # KODEX KBREED SHA-256 (0.2.0, 2026-09-11)
2
+ bfa75f83009e6d691f67de3a5d038c650aea981f644f983235ed53769c47b7cb CITATION.cff
3
  ae87ebecd1f321a19799e21f6fe25e4a74261f16c91e6cb6cc248e6197dcf838 LICENSE
4
  a4be39a1e927548c99ce00de458ddc45d4911a1ad61aaab886e6f081230c3425 benchmark.json
5
  ccbe9db0278e3c1266ee8ff8091d2df723a780c35b740f5f03ee1bc954fb9155 card.md
6
  78c0c8482b808f86983ba12de743d8ac0bb879a9f1e170db14d62b3606c27f45 kbreed.py
7
+ a616613ed4948fa929803682ccf1a06b4207bae4e0be66aee86f45c223196687 metadata.json
publish/records/kbreed/metadata.json CHANGED
@@ -2,8 +2,8 @@
2
  "kname": "KBREED",
3
  "page": "https://kronosfusionenergy.com/kodex/kbreed",
4
  "title": "KODEX \u2014 KBREED: breeder",
5
- "version": "0.1.0",
6
- "publication_date": "2026-09-10",
7
  "language": "eng",
8
  "upload_type": "software",
9
  "creators": [
 
2
  "kname": "KBREED",
3
  "page": "https://kronosfusionenergy.com/kodex/kbreed",
4
  "title": "KODEX \u2014 KBREED: breeder",
5
+ "version": "0.2.0",
6
+ "publication_date": "2026-09-11",
7
  "language": "eng",
8
  "upload_type": "software",
9
  "creators": [
publish/records/kburn/CITATION.cff CHANGED
@@ -1,7 +1,7 @@
1
  cff-version: 1.2.0
2
  title: "KODEX — KBURN: burner (Kronos Family of Codes)"
3
- version: "0.1.0"
4
- date-released: "2026-09-10"
5
  license: Apache-2.0
6
  url: "https://kronosfusionenergy.com/kodex/kburn"
7
  repository-code: "https://github.com/KronosFE/kronos-ml"
 
1
  cff-version: 1.2.0
2
  title: "KODEX — KBURN: burner (Kronos Family of Codes)"
3
+ version: "0.2.0"
4
+ date-released: "2026-09-11"
5
  license: Apache-2.0
6
  url: "https://kronosfusionenergy.com/kodex/kburn"
7
  repository-code: "https://github.com/KronosFE/kronos-ml"
publish/records/kburn/MANIFEST.sha256 CHANGED
@@ -1,7 +1,7 @@
1
- # KODEX KBURN SHA-256 (0.1.0, 2026-09-10)
2
- 1dfb3bccdef93781f87ebe7a97d97c86b247bf0c6fe7c15b95d8ac51eac31389 CITATION.cff
3
  ae87ebecd1f321a19799e21f6fe25e4a74261f16c91e6cb6cc248e6197dcf838 LICENSE
4
  b133f891b15720e79a2914954c40e1aadd54f823611ab19459cc38a4882e1296 benchmark.json
5
  628b0e84694e7bfd93c90866016e2a8c81086d3822aaf64958af781f609ba990 card.md
6
  f637ffaa394f4531590476bae9df274f305ba7c9f7e39ba4e8d33a34148bfea9 kburn.py
7
- 5aa141b7f492959b493f6472eb3eb64535db51ea321633102627a84e91cc05e0 metadata.json
 
1
+ # KODEX KBURN SHA-256 (0.2.0, 2026-09-11)
2
+ 2c237089902f15f9b21a02ab23760ac9f381a37ffb656f44876c17bf5cd949be CITATION.cff
3
  ae87ebecd1f321a19799e21f6fe25e4a74261f16c91e6cb6cc248e6197dcf838 LICENSE
4
  b133f891b15720e79a2914954c40e1aadd54f823611ab19459cc38a4882e1296 benchmark.json
5
  628b0e84694e7bfd93c90866016e2a8c81086d3822aaf64958af781f609ba990 card.md
6
  f637ffaa394f4531590476bae9df274f305ba7c9f7e39ba4e8d33a34148bfea9 kburn.py
7
+ 255b2f35711fa8aec949a17e7f56538cc198fb22d35e18cd284c72060c1f9fcd metadata.json
publish/records/kburn/metadata.json CHANGED
@@ -2,8 +2,8 @@
2
  "kname": "KBURN",
3
  "page": "https://kronosfusionenergy.com/kodex/kburn",
4
  "title": "KODEX \u2014 KBURN: burner",
5
- "version": "0.1.0",
6
- "publication_date": "2026-09-10",
7
  "language": "eng",
8
  "upload_type": "software",
9
  "creators": [
 
2
  "kname": "KBURN",
3
  "page": "https://kronosfusionenergy.com/kodex/kburn",
4
  "title": "KODEX \u2014 KBURN: burner",
5
+ "version": "0.2.0",
6
+ "publication_date": "2026-09-11",
7
  "language": "eng",
8
  "upload_type": "software",
9
  "creators": [
publish/records/kdrive/CITATION.cff CHANGED
@@ -1,7 +1,7 @@
1
  cff-version: 1.2.0
2
  title: "KODEX — KDRIVE: RL-control (Kronos Family of Codes)"
3
- version: "0.1.0"
4
- date-released: "2026-09-10"
5
  license: Apache-2.0
6
  url: "https://kronosfusionenergy.com/kodex/kdrive"
7
  repository-code: "https://github.com/KronosFE/kronos-ml"
 
1
  cff-version: 1.2.0
2
  title: "KODEX — KDRIVE: RL-control (Kronos Family of Codes)"
3
+ version: "0.2.0"
4
+ date-released: "2026-09-11"
5
  license: Apache-2.0
6
  url: "https://kronosfusionenergy.com/kodex/kdrive"
7
  repository-code: "https://github.com/KronosFE/kronos-ml"
publish/records/kdrive/MANIFEST.sha256 CHANGED
@@ -1,7 +1,7 @@
1
- # KODEX KDRIVE SHA-256 (0.1.0, 2026-09-10)
2
- b83bc74e308696ce460e50ce7a1f0cef917a574d76dc9bcbc3e4cebce8c06ae7 CITATION.cff
3
  ae87ebecd1f321a19799e21f6fe25e4a74261f16c91e6cb6cc248e6197dcf838 LICENSE
4
  f4f36adee949eba53dcea8b5b9e7a06311ea235f461423232246eaadda936a5b benchmark.json
5
  9a8da86745ade3c0665fc4c6b403cb333996c4d64108711bf8f36a4ccecd32ae card.md
6
  86bb8b3e8f2ddda51e90188c791500cc563503aab9f1b80160e3a799bc8df85f kdrive.py
7
- cab45aacf060803b81632bb8cf36083a57d7c45d3ec2f184b8160d69f14fef8c metadata.json
 
1
+ # KODEX KDRIVE SHA-256 (0.2.0, 2026-09-11)
2
+ 64529510002805e1a0df44062398dd0e96f50993a2adbe47a8193430fa5cc91e CITATION.cff
3
  ae87ebecd1f321a19799e21f6fe25e4a74261f16c91e6cb6cc248e6197dcf838 LICENSE
4
  f4f36adee949eba53dcea8b5b9e7a06311ea235f461423232246eaadda936a5b benchmark.json
5
  9a8da86745ade3c0665fc4c6b403cb333996c4d64108711bf8f36a4ccecd32ae card.md
6
  86bb8b3e8f2ddda51e90188c791500cc563503aab9f1b80160e3a799bc8df85f kdrive.py
7
+ e3571af9ae6782ae925508b020ec60442325b7055b4c0741c95685c268023410 metadata.json
publish/records/kdrive/metadata.json CHANGED
@@ -2,8 +2,8 @@
2
  "kname": "KDRIVE",
3
  "page": "https://kronosfusionenergy.com/kodex/kdrive",
4
  "title": "KODEX \u2014 KDRIVE: RL-control",
5
- "version": "0.1.0",
6
- "publication_date": "2026-09-10",
7
  "language": "eng",
8
  "upload_type": "software",
9
  "creators": [
 
2
  "kname": "KDRIVE",
3
  "page": "https://kronosfusionenergy.com/kodex/kdrive",
4
  "title": "KODEX \u2014 KDRIVE: RL-control",
5
+ "version": "0.2.0",
6
+ "publication_date": "2026-09-11",
7
  "language": "eng",
8
  "upload_type": "software",
9
  "creators": [
publish/records/kdyn/CITATION.cff ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cff-version: 1.2.0
2
+ title: "KODEX — KDYN: QDYN (Kronos Family of Codes)"
3
+ version: "0.2.0"
4
+ date-released: "2026-09-11"
5
+ license: Apache-2.0
6
+ url: "https://kronosfusionenergy.com/kodex/kdyn"
7
+ repository-code: "https://github.com/KronosFE/kronos-ml"
8
+ type: software
9
+ authors:
10
+ - family-names: Ford
11
+ given-names: "P. I."
12
+ orcid: "https://orcid.org/0000-0003-0395-1752"
13
+ affiliation: "Kronos Fusion Energy"
publish/records/kdyn/LICENSE ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but not
32
+ limited to compiled object code, generated documentation, and
33
+ conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work.
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other modifications
42
+ represent, as a whole, an original work of authorship. For the purposes
43
+ of this License, Derivative Works shall not include works that remain
44
+ separable from, or merely link (or bind by name) to the interfaces of,
45
+ the Work and Derivative Works thereof.
46
+
47
+ "Contribution" shall mean any work of authorship, including the
48
+ original version of the Work and any modifications or additions
49
+ to that Work or Derivative Works thereof, that is intentionally
50
+ submitted to Licensor for inclusion in the Work by the copyright owner
51
+ or by an individual or Legal Entity authorized to submit on behalf of
52
+ the copyright owner. For the purposes of this definition, "submitted"
53
+ means any form of electronic, verbal, or written communication sent
54
+ to the Licensor or its representatives, including but not limited to
55
+ communication on electronic mailing lists, source code control systems,
56
+ and issue tracking systems that are managed by, or on behalf of, the
57
+ Licensor for the purpose of discussing and improving the Work, but
58
+ excluding communication that is conspicuously marked or otherwise
59
+ designated in writing by the copyright owner as "Not a Contribution."
60
+
61
+ "Contributor" shall mean Licensor and any individual or Legal Entity
62
+ on behalf of whom a Contribution has been received by Licensor and
63
+ subsequently incorporated within the Work.
64
+
65
+ 2. Grant of Copyright License. Subject to the terms and conditions of
66
+ this License, each Contributor hereby grants to You a perpetual,
67
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
68
+ copyright license to reproduce, prepare Derivative Works of,
69
+ publicly display, publicly perform, sublicense, and distribute the
70
+ Work and such Derivative Works in Source or Object form.
71
+
72
+ 3. Grant of Patent License. Subject to the terms and conditions of
73
+ this License, each Contributor hereby grants to You a perpetual,
74
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
75
+ (except as stated in this section) patent license to make, have made,
76
+ use, offer to sell, sell, import, and otherwise transfer the Work,
77
+ where such license applies only to those patent claims licensable
78
+ by such Contributor that are necessarily infringed by their
79
+ Contribution(s) alone or by combination of their Contribution(s)
80
+ with the Work to which such Contribution(s) was submitted. If You
81
+ institute patent litigation against any entity (including a
82
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
83
+ or a Contribution incorporated within the Work constitutes direct
84
+ or contributory patent infringement, then any patent licenses
85
+ granted to You under this License for that Work shall terminate
86
+ as of the date such litigation is filed.
87
+
88
+ 4. Redistribution. You may reproduce and distribute copies of the
89
+ Work or Derivative Works thereof in any medium, with or without
90
+ modifications, and in Source or Object form, provided that You
91
+ meet the following conditions:
92
+
93
+ (a) You must give any other recipients of the Work or Derivative
94
+ Works a copy of this License; and
95
+
96
+ (b) You must cause any modified files to carry prominent notices
97
+ stating that You changed the files; and
98
+
99
+ (c) You must retain, in the Source form of any Derivative Works
100
+ that You distribute, all copyright, patent, trademark, and
101
+ attribution notices from the Source form of the Work,
102
+ excluding those notices that do not pertain to any part of
103
+ the Derivative Works; and
104
+
105
+ (d) If the Work includes a "NOTICE" text file as part of its
106
+ distribution, then any Derivative Works that You distribute must
107
+ include a readable copy of the attribution notices contained
108
+ within such NOTICE file, excluding those notices that do not
109
+ pertain to any part of the Derivative Works.
110
+
111
+ You may add Your own copyright statement to Your modifications and
112
+ may provide additional or different license terms and conditions
113
+ for use, reproduction, or distribution of Your modifications, or
114
+ for any such Derivative Works as a whole, provided Your use,
115
+ reproduction, and distribution of the Work otherwise complies with
116
+ the conditions stated in this License.
117
+
118
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
119
+ any Contribution intentionally submitted for inclusion in the Work
120
+ by You to the Licensor shall be under the terms and conditions of
121
+ this License, without any additional terms or conditions.
122
+ Notwithstanding the above, nothing herein shall supersede or modify
123
+ the terms of any separate license agreement you may have executed
124
+ with Licensor regarding such Contributions.
125
+
126
+ 6. Trademarks. This License does not grant permission to use the trade
127
+ names, trademarks, service marks, or product names of the Licensor,
128
+ except as required for reasonable and customary use in describing the
129
+ origin of the Work and reproducing the content of the NOTICE file.
130
+
131
+ 7. Disclaimer of Warranty. Unless required by applicable law or
132
+ agreed to in writing, Licensor provides the Work (and each
133
+ Contributor provides its Contributions) on an "AS IS" BASIS,
134
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
135
+ implied, including, without limitation, any warranties or conditions
136
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
137
+ PARTICULAR PURPOSE. You are solely responsible for determining the
138
+ appropriateness of using or redistributing the Work and assume any
139
+ risks associated with Your exercise of permissions under this License.
140
+
141
+ 8. Limitation of Liability. In no event and under no legal theory,
142
+ whether in tort (including negligence), contract, or otherwise,
143
+ unless required by applicable law (such as deliberate and grossly
144
+ negligent acts) or agreed to in writing, shall any Contributor be
145
+ liable to You for damages, including any direct, indirect, special,
146
+ incidental, or consequential damages of any character arising as a
147
+ result of this License or out of the use or inability to use the
148
+ Work (including but not limited to damages for loss of goodwill,
149
+ work stoppage, computer failure or malfunction, or any and all
150
+ other commercial damages or losses), even if such Contributor
151
+ has been advised of the possibility of such damages.
152
+
153
+ 9. Accepting Warranty or Additional Liability. While redistributing
154
+ the Work or Derivative Works thereof, You may choose to offer,
155
+ and charge a fee for, acceptance of support, warranty, indemnity,
156
+ or other liability obligations and/or rights consistent with this
157
+ License. However, in accepting such obligations, You may act only
158
+ on Your own behalf and on Your sole responsibility, not on behalf
159
+ of any other Contributor, and only if You agree to indemnify,
160
+ defend, and hold each Contributor harmless for any liability
161
+ incurred by, or claims asserted against, such Contributor by reason
162
+ of your accepting any such warranty or additional liability.
163
+
164
+ END OF TERMS AND CONDITIONS
165
+
166
+ APPENDIX: How to apply the Apache License to your work.
167
+
168
+ To apply the Apache License to your work, attach the following
169
+ boilerplate notice, with the fields enclosed by brackets "[]"
170
+ replaced with your own identifying information. (Don't include
171
+ the brackets!) The text should be enclosed in the appropriate
172
+ comment syntax for the file format. We also recommend that a
173
+ file or class name and description of purpose be included on the
174
+ same "printed page" as the copyright notice for easier
175
+ identification within third-party archives.
176
+
177
+ Copyright 2026 Kronos Fusion Energy
178
+
179
+ Licensed under the Apache License, Version 2.0 (the "License");
180
+ you may not use this file except in compliance with the License.
181
+ You may obtain a copy of the License at
182
+
183
+ http://www.apache.org/licenses/LICENSE-2.0
184
+
185
+ Unless required by applicable law or agreed to in writing, software
186
+ distributed under the License is distributed on an "AS IS" BASIS,
187
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
188
+ See the License for the specific language governing permissions and
189
+ limitations under the License.
publish/records/kdyn/MANIFEST.sha256 ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # KODEX KDYN SHA-256 (0.2.0, 2026-09-11)
2
+ 932cfe053f1db0ada0e188fe37070972294cbe3f202508673db022eda4bd6472 CITATION.cff
3
+ ae87ebecd1f321a19799e21f6fe25e4a74261f16c91e6cb6cc248e6197dcf838 LICENSE
4
+ 8808e1a31b95131d0852dd6e9bf5c2ca8c181a9974304e6bd616d9396d4b6426 benchmark.json
5
+ c8847afe850a64c62e9ce6fcd92b98ed7df1bd4fcc786d99fbb319ecfe3be0cf card.md
6
+ 5c0fc5b8f77c2ee9add9ae5d0ddcb8030e1fb1bcfe68ae42f621c45952c2d7a1 kdyn.py
7
+ 0ec86bcae56daabbe51e196969aae929be4d59e6daedf8d9f79243c75340f4c3 metadata.json
publish/records/kdyn/benchmark.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "member": "KDYN",
3
+ "live_trotter": {
4
+ "system": "3-qubit transverse-field Ising (J=1.0, h=0.8), t=1.0",
5
+ "framework": "PennyLane Trotter (ApproxTimeEvolution); sim now, real hardware pluggable",
6
+ "spectral_norm_error_vs_steps": {
7
+ "1": 1.34637,
8
+ "2": 0.57791,
9
+ "4": 0.27635,
10
+ "8": 0.1362,
11
+ "16": 0.06776,
12
+ "32": 0.03381
13
+ },
14
+ "converges_as": "~1/n_steps (1st-order Trotter, as expected)",
15
+ "backend_expval_Z0_at_16_steps": 0.2572,
16
+ "backend": {
17
+ "active_backend": "default",
18
+ "ran_on_real_hardware": false,
19
+ "how_to_use_real_qc": "set KODEX_QC_BACKEND=ibm and KODEX_QC_TOKEN=<your IBM Quantum token> to run this exact circuit on real quantum hardware",
20
+ "honest_timeline": "fault-tolerant quantum ADVANTAGE for fusion kernels is ~8-10 yr out; this tooling makes the TESTING real and runnable TODAY, same code path"
21
+ },
22
+ "verdict": "REAL Trotterized quantum dynamics: 1st-order error falls 1.34637 -> 0.03381 from 1 to 32 steps (~1/n) \u2014 the honest cost curve for simulating plasma-like Hamiltonian dynamics on a quantum computer. Runs on real hardware with KODEX_QC_BACKEND=ibm. No advantage at this size; a real, testable pipeline."
23
+ },
24
+ "sourced": {
25
+ "file": "TRACK1_QUANTUM_RESULTS/track1_results.json (A8_Trotter)",
26
+ "note": "independent Track-1: 1st-order Trotter error 1.257->0.032 with steps (consistent)"
27
+ }
28
+ }
publish/records/kdyn/card.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # KODEX KDYN — card
2
+
3
+ - **name:** KDYN
4
+ - **function:** QDYN
5
+ - **status:** BUILT
6
+ - **phase:** 3
7
+ - **provenance:** SIM
8
+ - **retired_by:** fault-tolerant quantum hardware (not available this decade)
9
+ - **gates:** ['KX-L3']
10
+ - **note:** REAL quantum dynamics — Trotterized time-evolution of a transverse-field Ising 'kinetic' Hamiltonian (PennyLane); the honest 1/n_steps cost curve for simulating plasma-like dynamics on a quantum computer. Runs on a simulator now, hardware pluggable
11
+ - **available:** True
12
+
13
+ Benchmark headline: **REAL Trotter quantum dynamics**: 1st-order error 1.34637→0.03381 over steps (~1/n); runs on real QC hardware — honest cost curve, no advantage yet
publish/records/kdyn/kdyn.py ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """KODEX KDYN — source excerpt (class). Full runnable package: https://github.com/KronosFE/kronos-ml"""
2
+
3
+ @register
4
+ class KDYN(Surrogate):
5
+ name = "KDYN"; function = "QDYN"; phase = 3; status = "BUILT"
6
+ provenance = "SIM"
7
+ retired_by = "fault-tolerant quantum hardware (not available this decade)"
8
+ real_codes = ("Trotterized Hamiltonian simulation", "PennyLane")
9
+ gates = ("KX-L3",)
10
+ note = ("REAL quantum dynamics — Trotterized time-evolution of a transverse-field Ising "
11
+ "'kinetic' Hamiltonian (PennyLane); the honest 1/n_steps cost curve for simulating "
12
+ "plasma-like dynamics on a quantum computer. Runs on a simulator now, hardware pluggable")
13
+
14
+ _NQ = 3; _J = 1.0; _HX = 0.8; _T = 1.0
15
+
16
+ def _ham(self):
17
+ import pennylane as qml
18
+ coeffs = [-self._J] * (self._NQ - 1) + [-self._HX] * self._NQ
19
+ ops = ([qml.PauliZ(i) @ qml.PauliZ(i + 1) for i in range(self._NQ - 1)]
20
+ + [qml.PauliX(i) for i in range(self._NQ)])
21
+ return qml.Hamiltonian(coeffs, ops)
22
+
23
+ def _curve(self):
24
+ import numpy as np
25
+ import pennylane as qml
26
+ from scipy.linalg import expm
27
+ H = self._ham()
28
+ coeffs, ops = H.terms()
29
+ mats = [(float(c), qml.matrix(o, wire_order=range(self._NQ))) for c, o in zip(coeffs, ops)]
30
+ Hm = sum(c * M for c, M in mats)
31
+ Uex = expm(-1j * self._T * Hm)
32
+ out = {}
33
+ for n in (1, 2, 4, 8, 16, 32):
34
+ dt = self._T / n
35
+ Ustep = np.eye(2 ** self._NQ, dtype=complex)
36
+ for c, M in mats:
37
+ Ustep = expm(-1j * c * dt * M) @ Ustep
38
+ Utr = np.linalg.matrix_power(Ustep, n)
39
+ out[n] = round(float(np.linalg.norm(Utr - Uex, 2)), 5)
40
+ return out
41
+
42
+ def _backend_run(self):
43
+ import pennylane as qml
44
+ H = self._ham(); dev = qc.get_device(wires=self._NQ)
45
+
46
+ @qml.qnode(dev)
47
+ def circ(n):
48
+ qml.ApproxTimeEvolution(H, self._T, n)
49
+ return qml.expval(qml.PauliZ(0))
50
+ return float(circ(16))
51
+
52
+ def _predict(self, x):
53
+ import numpy as np
54
+ c = self._curve()
55
+ n = int(np.ravel(np.asarray(x, float))[0]) if x is not None else 16
56
+ key = min(c, key=lambda k: abs(k - n))
57
+ return Prediction(c[key], None, True, note=f"Trotter spectral-norm error at {key} steps")
58
+
59
+ def benchmark(self):
60
+ c = self._curve()
61
+ z0 = self._backend_run()
62
+ st = sorted(c)
63
+ return {"member": self.name,
64
+ "live_trotter": {
65
+ "system": f"{self._NQ}-qubit transverse-field Ising (J={self._J}, h={self._HX}), t={self._T}",
66
+ "framework": "PennyLane Trotter (ApproxTimeEvolution); sim now, real hardware pluggable",
67
+ "spectral_norm_error_vs_steps": c,
68
+ "converges_as": "~1/n_steps (1st-order Trotter, as expected)",
69
+ "backend_expval_Z0_at_16_steps": round(z0, 4),
70
+ "backend": qc.backend_note(),
71
+ "verdict": (f"REAL Trotterized quantum dynamics: 1st-order error falls {c[st[0]]} -> "
72
+ f"{c[st[-1]]} from {st[0]} to {st[-1]} steps (~1/n) — the honest cost curve for "
73
+ f"simulating plasma-like Hamiltonian dynamics on a quantum computer. Runs on "
74
+ f"real hardware with KODEX_QC_BACKEND=ibm. No advantage at this size; a real, "
75
+ f"testable pipeline.")},
76
+ "sourced": {"file": "TRACK1_QUANTUM_RESULTS/track1_results.json (A8_Trotter)",
77
+ "note": "independent Track-1: 1st-order Trotter error 1.257->0.032 with steps (consistent)"}}
publish/records/kdyn/metadata.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "kname": "KDYN",
3
+ "page": "https://kronosfusionenergy.com/kodex/kdyn",
4
+ "title": "KODEX \u2014 KDYN: QDYN",
5
+ "version": "0.2.0",
6
+ "publication_date": "2026-09-11",
7
+ "language": "eng",
8
+ "upload_type": "software",
9
+ "creators": [
10
+ {
11
+ "name": "Ford, P. I.",
12
+ "orcid": "0000-0003-0395-1752",
13
+ "affiliation": "Kronos Fusion Energy"
14
+ }
15
+ ],
16
+ "license": {
17
+ "id": "Apache-2.0"
18
+ },
19
+ "keywords": [
20
+ "fusion energy",
21
+ "spherical tokamak",
22
+ "D-3He",
23
+ "AI/ML surrogate model",
24
+ "uncertainty quantification",
25
+ "digital twin",
26
+ "Kronos Fusion Energy",
27
+ "QDYN",
28
+ "KODEX:KDYN"
29
+ ],
30
+ "related_identifiers": [
31
+ {
32
+ "relation": "isDocumentedBy",
33
+ "identifier": "https://kronosfusionenergy.com/kodex/kdyn",
34
+ "resource_type": "publication-other"
35
+ },
36
+ {
37
+ "relation": "isPartOf",
38
+ "identifier": "https://kronosfusionenergy.com/kodex",
39
+ "resource_type": "publication-other"
40
+ },
41
+ {
42
+ "relation": "isSupplementTo",
43
+ "identifier": "https://github.com/KronosFE/kronos-ml",
44
+ "resource_type": "software"
45
+ },
46
+ {
47
+ "relation": "references",
48
+ "identifier": "10.5281/zenodo.22645689",
49
+ "resource_type": "publication"
50
+ },
51
+ {
52
+ "relation": "isCompiledBy",
53
+ "identifier": "https://github.com/KronosFE/kronos-toolkit",
54
+ "resource_type": "software"
55
+ },
56
+ {
57
+ "relation": "references",
58
+ "identifier": "10.5281/zenodo.21842371",
59
+ "resource_type": "dataset"
60
+ }
61
+ ],
62
+ "description": "<p><strong>KODEX &mdash; KDYN</strong> (QDYN). REAL quantum dynamics \u2014 Trotterized time-evolution of a transverse-field Ising 'kinetic' Hamiltonian (PennyLane); the honest 1/n_steps cost curve for simulating plasma-like dynamics on a quantum computer. Runs on a simulator now, hardware pluggable</p><p><strong>Benchmark:</strong> **REAL Trotter quantum dynamics**: 1st-order error 1.34637\u21920.03381 over steps (~1/n); runs on real QC hardware \u2014 honest cost curve, no advantage yet</p><p>Part of KODEX, the Kronos Family of Codes &mdash; a benchmarked AI/ML fusion surrogate suite with calibrated uncertainty and an abstention gate (<code>predict(x) &rarr; (y, uncertainty, in_domain)</code>). Provenance: references 10.5281/zenodo.21842371. Home: <a href=\"https://kronosfusionenergy.com/kodex/kdyn\">https://kronosfusionenergy.com/kodex/kdyn</a> &middot; suite: <a href=\"https://github.com/KronosFE/kronos-ml\">https://github.com/KronosFE/kronos-ml</a>. Licensed under Apache-2.0. Honest card preserved verbatim.</p>",
63
+ "description_plain": "KODEX \u2014 KDYN (QDYN). REAL quantum dynamics \u2014 Trotterized time-evolution of a transverse-field Ising 'kinetic' Hamiltonian (PennyLane); the honest 1/n_steps cost curve for simulating plasma-like dynamics on a quantum computer. Runs on a simulator now, hardware pluggableBenchmark: **REAL Trotter quantum dynamics**: 1st-order error 1.34637\u21920.03381 over steps (~1/n); runs on real QC hardware \u2014 honest cost curve, no advantage yetPart of KODEX, the Kronos Family of Codes \u2014 a benchmarked AI/ML fusion surrogate suite with calibrated uncertainty and an abstention gate (predict(x) \u2192 (y, uncertainty, in_domain)). Provenance: references 10.5281/zenodo.21842371. Home: https://kronosfusionenergy.com/kodex/kdyn \u00b7 suite: https://github.com/KronosFE/kronos-ml. Licensed under Apache-2.0. Honest card preserved verbatim.",
64
+ "notes": "Draft-first per-code deposit. Full package: https://github.com/KronosFE/kronos-ml. Provenance chain in card.md + MANIFEST.sha256."
65
+ }
publish/records/kecon/CITATION.cff CHANGED
@@ -1,7 +1,7 @@
1
  cff-version: 1.2.0
2
  title: "KODEX — KECON: techno-economics (Kronos Family of Codes)"
3
- version: "0.1.0"
4
- date-released: "2026-09-10"
5
  license: Apache-2.0
6
  url: "https://kronosfusionenergy.com/kodex/kecon"
7
  repository-code: "https://github.com/KronosFE/kronos-ml"
 
1
  cff-version: 1.2.0
2
  title: "KODEX — KECON: techno-economics (Kronos Family of Codes)"
3
+ version: "0.2.0"
4
+ date-released: "2026-09-11"
5
  license: Apache-2.0
6
  url: "https://kronosfusionenergy.com/kodex/kecon"
7
  repository-code: "https://github.com/KronosFE/kronos-ml"
publish/records/kecon/MANIFEST.sha256 CHANGED
@@ -1,7 +1,7 @@
1
- # KODEX KECON SHA-256 (0.1.0, 2026-09-10)
2
- 3214b9cc7d628336ded73b333cbe29c51bae0e48eefc5c1ee6e55ddf8c5b41cd CITATION.cff
3
  ae87ebecd1f321a19799e21f6fe25e4a74261f16c91e6cb6cc248e6197dcf838 LICENSE
4
  455c7858094ed06d6781d9cbe35b25a695883036c88d9343e73b9c27c610fc10 benchmark.json
5
  10120f65e9a734b2ba2f2e6a2c13663fb74fa8d175fa68babe2c0016fbee28e5 card.md
6
  4c743bcee043f982000296426f736011a0e897861dfb0ce2e82fd5505788184e kecon.py
7
- 2bd19cfa0322e049088aee1aba36901a225c02359a66299ac02569e1fe3f3345 metadata.json
 
1
+ # KODEX KECON SHA-256 (0.2.0, 2026-09-11)
2
+ df70c7eb240f2ef04421d7568e30a479f2788bc7c9d21d506c9c90251820daea CITATION.cff
3
  ae87ebecd1f321a19799e21f6fe25e4a74261f16c91e6cb6cc248e6197dcf838 LICENSE
4
  455c7858094ed06d6781d9cbe35b25a695883036c88d9343e73b9c27c610fc10 benchmark.json
5
  10120f65e9a734b2ba2f2e6a2c13663fb74fa8d175fa68babe2c0016fbee28e5 card.md
6
  4c743bcee043f982000296426f736011a0e897861dfb0ce2e82fd5505788184e kecon.py
7
+ 432a5dcf9daf13bdcd0432ddc92ce05a3e8d492257d865ec76983910a3a75868 metadata.json
publish/records/kecon/metadata.json CHANGED
@@ -2,8 +2,8 @@
2
  "kname": "KECON",
3
  "page": "https://kronosfusionenergy.com/kodex/kecon",
4
  "title": "KODEX \u2014 KECON: techno-economics",
5
- "version": "0.1.0",
6
- "publication_date": "2026-09-10",
7
  "language": "eng",
8
  "upload_type": "software",
9
  "creators": [
 
2
  "kname": "KECON",
3
  "page": "https://kronosfusionenergy.com/kodex/kecon",
4
  "title": "KODEX \u2014 KECON: techno-economics",
5
+ "version": "0.2.0",
6
+ "publication_date": "2026-09-11",
7
  "language": "eng",
8
  "upload_type": "software",
9
  "creators": [
publish/records/kedge/CITATION.cff ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cff-version: 1.2.0
2
+ title: "KODEX — KEDGE: edge-transport (Kronos Family of Codes)"
3
+ version: "0.2.0"
4
+ date-released: "2026-09-11"
5
+ license: Apache-2.0
6
+ url: "https://kronosfusionenergy.com/kodex/kedge"
7
+ repository-code: "https://github.com/KronosFE/kronos-ml"
8
+ type: software
9
+ authors:
10
+ - family-names: Ford
11
+ given-names: "P. I."
12
+ orcid: "https://orcid.org/0000-0003-0395-1752"
13
+ affiliation: "Kronos Fusion Energy"
publish/records/kedge/LICENSE ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but not
32
+ limited to compiled object code, generated documentation, and
33
+ conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work.
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other modifications
42
+ represent, as a whole, an original work of authorship. For the purposes
43
+ of this License, Derivative Works shall not include works that remain
44
+ separable from, or merely link (or bind by name) to the interfaces of,
45
+ the Work and Derivative Works thereof.
46
+
47
+ "Contribution" shall mean any work of authorship, including the
48
+ original version of the Work and any modifications or additions
49
+ to that Work or Derivative Works thereof, that is intentionally
50
+ submitted to Licensor for inclusion in the Work by the copyright owner
51
+ or by an individual or Legal Entity authorized to submit on behalf of
52
+ the copyright owner. For the purposes of this definition, "submitted"
53
+ means any form of electronic, verbal, or written communication sent
54
+ to the Licensor or its representatives, including but not limited to
55
+ communication on electronic mailing lists, source code control systems,
56
+ and issue tracking systems that are managed by, or on behalf of, the
57
+ Licensor for the purpose of discussing and improving the Work, but
58
+ excluding communication that is conspicuously marked or otherwise
59
+ designated in writing by the copyright owner as "Not a Contribution."
60
+
61
+ "Contributor" shall mean Licensor and any individual or Legal Entity
62
+ on behalf of whom a Contribution has been received by Licensor and
63
+ subsequently incorporated within the Work.
64
+
65
+ 2. Grant of Copyright License. Subject to the terms and conditions of
66
+ this License, each Contributor hereby grants to You a perpetual,
67
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
68
+ copyright license to reproduce, prepare Derivative Works of,
69
+ publicly display, publicly perform, sublicense, and distribute the
70
+ Work and such Derivative Works in Source or Object form.
71
+
72
+ 3. Grant of Patent License. Subject to the terms and conditions of
73
+ this License, each Contributor hereby grants to You a perpetual,
74
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
75
+ (except as stated in this section) patent license to make, have made,
76
+ use, offer to sell, sell, import, and otherwise transfer the Work,
77
+ where such license applies only to those patent claims licensable
78
+ by such Contributor that are necessarily infringed by their
79
+ Contribution(s) alone or by combination of their Contribution(s)
80
+ with the Work to which such Contribution(s) was submitted. If You
81
+ institute patent litigation against any entity (including a
82
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
83
+ or a Contribution incorporated within the Work constitutes direct
84
+ or contributory patent infringement, then any patent licenses
85
+ granted to You under this License for that Work shall terminate
86
+ as of the date such litigation is filed.
87
+
88
+ 4. Redistribution. You may reproduce and distribute copies of the
89
+ Work or Derivative Works thereof in any medium, with or without
90
+ modifications, and in Source or Object form, provided that You
91
+ meet the following conditions:
92
+
93
+ (a) You must give any other recipients of the Work or Derivative
94
+ Works a copy of this License; and
95
+
96
+ (b) You must cause any modified files to carry prominent notices
97
+ stating that You changed the files; and
98
+
99
+ (c) You must retain, in the Source form of any Derivative Works
100
+ that You distribute, all copyright, patent, trademark, and
101
+ attribution notices from the Source form of the Work,
102
+ excluding those notices that do not pertain to any part of
103
+ the Derivative Works; and
104
+
105
+ (d) If the Work includes a "NOTICE" text file as part of its
106
+ distribution, then any Derivative Works that You distribute must
107
+ include a readable copy of the attribution notices contained
108
+ within such NOTICE file, excluding those notices that do not
109
+ pertain to any part of the Derivative Works.
110
+
111
+ You may add Your own copyright statement to Your modifications and
112
+ may provide additional or different license terms and conditions
113
+ for use, reproduction, or distribution of Your modifications, or
114
+ for any such Derivative Works as a whole, provided Your use,
115
+ reproduction, and distribution of the Work otherwise complies with
116
+ the conditions stated in this License.
117
+
118
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
119
+ any Contribution intentionally submitted for inclusion in the Work
120
+ by You to the Licensor shall be under the terms and conditions of
121
+ this License, without any additional terms or conditions.
122
+ Notwithstanding the above, nothing herein shall supersede or modify
123
+ the terms of any separate license agreement you may have executed
124
+ with Licensor regarding such Contributions.
125
+
126
+ 6. Trademarks. This License does not grant permission to use the trade
127
+ names, trademarks, service marks, or product names of the Licensor,
128
+ except as required for reasonable and customary use in describing the
129
+ origin of the Work and reproducing the content of the NOTICE file.
130
+
131
+ 7. Disclaimer of Warranty. Unless required by applicable law or
132
+ agreed to in writing, Licensor provides the Work (and each
133
+ Contributor provides its Contributions) on an "AS IS" BASIS,
134
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
135
+ implied, including, without limitation, any warranties or conditions
136
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
137
+ PARTICULAR PURPOSE. You are solely responsible for determining the
138
+ appropriateness of using or redistributing the Work and assume any
139
+ risks associated with Your exercise of permissions under this License.
140
+
141
+ 8. Limitation of Liability. In no event and under no legal theory,
142
+ whether in tort (including negligence), contract, or otherwise,
143
+ unless required by applicable law (such as deliberate and grossly
144
+ negligent acts) or agreed to in writing, shall any Contributor be
145
+ liable to You for damages, including any direct, indirect, special,
146
+ incidental, or consequential damages of any character arising as a
147
+ result of this License or out of the use or inability to use the
148
+ Work (including but not limited to damages for loss of goodwill,
149
+ work stoppage, computer failure or malfunction, or any and all
150
+ other commercial damages or losses), even if such Contributor
151
+ has been advised of the possibility of such damages.
152
+
153
+ 9. Accepting Warranty or Additional Liability. While redistributing
154
+ the Work or Derivative Works thereof, You may choose to offer,
155
+ and charge a fee for, acceptance of support, warranty, indemnity,
156
+ or other liability obligations and/or rights consistent with this
157
+ License. However, in accepting such obligations, You may act only
158
+ on Your own behalf and on Your sole responsibility, not on behalf
159
+ of any other Contributor, and only if You agree to indemnify,
160
+ defend, and hold each Contributor harmless for any liability
161
+ incurred by, or claims asserted against, such Contributor by reason
162
+ of your accepting any such warranty or additional liability.
163
+
164
+ END OF TERMS AND CONDITIONS
165
+
166
+ APPENDIX: How to apply the Apache License to your work.
167
+
168
+ To apply the Apache License to your work, attach the following
169
+ boilerplate notice, with the fields enclosed by brackets "[]"
170
+ replaced with your own identifying information. (Don't include
171
+ the brackets!) The text should be enclosed in the appropriate
172
+ comment syntax for the file format. We also recommend that a
173
+ file or class name and description of purpose be included on the
174
+ same "printed page" as the copyright notice for easier
175
+ identification within third-party archives.
176
+
177
+ Copyright 2026 Kronos Fusion Energy
178
+
179
+ Licensed under the Apache License, Version 2.0 (the "License");
180
+ you may not use this file except in compliance with the License.
181
+ You may obtain a copy of the License at
182
+
183
+ http://www.apache.org/licenses/LICENSE-2.0
184
+
185
+ Unless required by applicable law or agreed to in writing, software
186
+ distributed under the License is distributed on an "AS IS" BASIS,
187
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
188
+ See the License for the specific language governing permissions and
189
+ limitations under the License.
publish/records/kedge/MANIFEST.sha256 ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # KODEX KEDGE SHA-256 (0.2.0, 2026-09-11)
2
+ 975b47f0eb94dfe9d1c8350ffc647062b9248584c2cbb8e470fd93dedc54d0e1 CITATION.cff
3
+ ae87ebecd1f321a19799e21f6fe25e4a74261f16c91e6cb6cc248e6197dcf838 LICENSE
4
+ 3ed8e9ed65801f94aa6f1797fc8674b4f6b3c10f2f9a180be361c0b17a085741 benchmark.json
5
+ 070b8230761c79cc6e5af9207ba99f89dab877bcda4d44eca5bdb2032242138c card.md
6
+ 07041a7a65e7e6eebd5e7b6a1af22f2a5e24c7c2a54d87d06b0f14484d34a52f kedge.py
7
+ 94e452c78090b6005683b593b938bb30684480bb8772da57681f2e8b08325824 metadata.json
publish/records/kedge/benchmark.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "member": "KEDGE",
3
+ "live_divertor_thermal": {
4
+ "source": "h9_target_thermal.csv (H9 exhaust/divertor engineering scan)",
5
+ "map": "divertor heat flux q [MW/m^2] -> target surface temperature [C]",
6
+ "r2_fit": 1.0,
7
+ "n_samples": 77,
8
+ "max_safe_q_MWm2_CuCrZr": 13.5,
9
+ "verdict": "Divertor target-thermal surrogate: q->T_surf fit R2=1.000 over 77 points; CuCrZr material limit at q~13.5 MW/m2. Reduced 0-D thermal model \u2014 SOLPS-ITER/EIRENE edge campaign is the fidelity upgrade."
10
+ },
11
+ "caveat": "0-D target-thermal scan, not a full 2-D edge-transport solve"
12
+ }
publish/records/kedge/card.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # KODEX KEDGE — card
2
+
3
+ - **name:** KEDGE
4
+ - **function:** edge-transport
5
+ - **status:** BUILT
6
+ - **phase:** 3
7
+ - **provenance:** SIM
8
+ - **retired_by:** SOLPS-ITER / EIRENE edge campaign
9
+ - **gates:** ['H9']
10
+ - **note:** divertor / edge heat-flux -> target-thermal surrogate — maps divertor heat flux to target surface temperature + material limits (W / CuCrZr) from the H9 exhaust scan. Reduced 0-D thermal model; SOLPS-ITER/EIRENE = fidelity upgrade
11
+ - **available:** True
12
+
13
+ Benchmark headline: divertor edge surrogate: heat-flux→target-temp **R²=1.0**, CuCrZr limit q~13.5 MW/m² (reduced 0-D; SOLPS/EIRENE = upgrade)
publish/records/kedge/kedge.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """KODEX KEDGE — source excerpt (class). Full runnable package: https://github.com/KronosFE/kronos-ml"""
2
+
3
+ @register
4
+ class KEDGE(Surrogate):
5
+ name = "KEDGE"; function = "edge-transport"; phase = 3; status = "BUILT"
6
+ provenance = "SIM"
7
+ retired_by = "SOLPS-ITER / EIRENE edge campaign"
8
+ real_codes = ("divertor target-thermal scan",)
9
+ gates = ("H9",)
10
+ note = ("divertor / edge heat-flux -> target-thermal surrogate — maps divertor heat flux to "
11
+ "target surface temperature + material limits (W / CuCrZr) from the H9 exhaust scan. "
12
+ "Reduced 0-D thermal model; SOLPS-ITER/EIRENE = fidelity upgrade")
13
+
14
+ def _fit(self):
15
+ if getattr(self, "_coef", None) is not None:
16
+ return
17
+ import pandas as pd
18
+ from sklearn.metrics import r2_score
19
+ df = pd.read_csv(_DIV_THERMAL).dropna(subset=["q_MWm2", "T_w_surf_C"])
20
+ q = df["q_MWm2"].to_numpy(float); T = df["T_w_surf_C"].to_numpy(float)
21
+ self._coef = np.polyfit(q, T, 2)
22
+ self._r2 = float(r2_score(T, np.polyval(self._coef, q))); self._n = len(q)
23
+ bad = df[df["ok_CuCrZr"] == False] if "ok_CuCrZr" in df else df.iloc[0:0]
24
+ self._q_limit = float(bad["q_MWm2"].min()) if len(bad) else float(q.max())
25
+
26
+ def _predict(self, x):
27
+ self._fit()
28
+ q = float(np.ravel(np.asarray(x, float))[0])
29
+ return Prediction(float(np.polyval(self._coef, q)), None, q <= self._q_limit,
30
+ note=f"target surface temp (C) at q={q} MW/m^2; in_domain = under CuCrZr limit")
31
+
32
+ def benchmark(self):
33
+ self._fit()
34
+ return {"member": self.name,
35
+ "live_divertor_thermal": {
36
+ "source": "h9_target_thermal.csv (H9 exhaust/divertor engineering scan)",
37
+ "map": "divertor heat flux q [MW/m^2] -> target surface temperature [C]",
38
+ "r2_fit": round(self._r2, 3), "n_samples": self._n,
39
+ "max_safe_q_MWm2_CuCrZr": self._q_limit,
40
+ "verdict": (f"Divertor target-thermal surrogate: q->T_surf fit R2={self._r2:.3f} over "
41
+ f"{self._n} points; CuCrZr material limit at q~{self._q_limit} MW/m2. Reduced "
42
+ f"0-D thermal model — SOLPS-ITER/EIRENE edge campaign is the fidelity upgrade.")},
43
+ "caveat": "0-D target-thermal scan, not a full 2-D edge-transport solve"}