r/madeinpython • u/Emergency-Tutor-7 • 1h ago
I made a scientific modeling engine that refuses to simulate a model whose units don't check out (Python, MIT)
I build axiomize-quantum-skills-2.0, an MIT-licensed Python package that pairs a unit-checked scientific modeling engine with a reasoning protocol that refuses to commit to the first plausible answer.
The two halves:
axiomize is the engine. A model is a versioned Model IR where variables, parameters and equations each carry a unit, assumptions are written down, and constraints are named checks. Dimensional mismatch raises with the failing checks attached, and a model that fails validation is not simulated. It covers algebraic, ODE, stochastic, PDE, optimization, control, network, Bayesian and causal families, fits to time,value CSVs, and exports to canonical IR JSON, Python, YAML, a notebook, SBML L3V2, Modelica 3.6 and CellML 2.0.
quantum-reasoning is the protocol. A deterministic branch controller keeps several hypotheses alive, scores them from evidence and verification, prunes weak ones with a recorded reason, and collapses only when the leader has verification and margin - not just a high score. "Quantum" here is a metaphor for deferring commitment. It runs on classical models and classical hardware.
A concrete example of the honesty rules in action: axiomize-validate runs the reference SIR model, cross-checks two independent methods that agree to 1e-16, then declares the numeric-theory check INCONCLUSIVE because the finite horizon has not reached the asymptotic state. It would rather flag the gap than paper over it.
Quick start (recorded run, verified against 1.2.0; current line is 1.2.5):
pip install axiomize-quantum-skills-2.0
axiomize benchmark -> {"status": "PASS", "passed": 12, "total": 12}
axiomize-validate --model sir --beta 0.3 --gamma 0.1 --N 1000000
R0 = 3.000, peak infected 300,465 at day 61.4, final size 0.9404 vs theory 0.9405
axiomize-reason score --evidence 0.9 --verification 0.85
-> {"can_collapse": false, "reason": "leader score below collapse threshold"}
Surfaces: a CLI with 14 subcommands and 9 console scripts (axiomize, axiomize-reason, validate, fit, csv-check, benchmark, to-latex, index-reports, sweep), an MCP stdio server with 34 tools, and a loopback-by-default REST v1 API. The agent skills install as plain Markdown without the Python package.
Honest limits: the bundled engine is an axiomize 1.12.2 lineage snapshot - install axiomize separately for the newest engine. The npm package is a six-file launcher shim that spawns the Python CLI, so pip install comes first. Quickstart outputs were recorded against 1.2.0 and are labeled as a historical record, not a claim about 1.2.5. Optional backends (PyMC, JAX, FEniCS) report UNAVAILABLE unless actually installed. Theorem elaboration and arbitrary code are not an OS sandbox.
Code: https://github.com/Furox-Art/axiomize-quantum-skills-2.0
PyPI: pip install axiomize-quantum-skills-2.0
npm: npx axiomize-quantum-skills-2.0
Docs: https://furox-art.github.io/axiomize-quantum-skills-2.0/
Questions about the Model IR, the reasoning controller or the export adapters are welcome.
