130,000 lines. 30 languages. 1 human.
No cloud. No vendor. No libc. No sorry.
From bare metal to formal proof — sovereign at every layer.
Interactive Hub · BOB Meets BOB Demo · Sovereign Convergence Art
Two BOBs. Two Realms. One Bridge. Infinite Possibilities. Built on IBM credits. In IBM's IDE. With IBM's model. The handshake before the revolution.
Every quantum computing platform today runs on someone else's cloud. IBM Qiskit routes through IBM hardware. Google Cirq requires Google infrastructure. Amazon Braket bills by the shot. Your quantum programs, your algorithms, your results — they all pass through a corporation that can revoke access, inspect your work, or shut down the service.
The AI stack has the same problem. Every LLM inference call goes to OpenAI, Anthropic, or Google. They decide what you can ask. They decide what gets refused. They see every prompt. Your intellectual work passes through their servers, subject to their terms, logged in their databases.
This repository is the answer to both problems at once.
This is a complete, sovereign quantum computing platform — compiler, execution engine, AI inference runtime, formal verification layer, and cryptographic attestation system — that runs on YOUR hardware, answers to YOUR keys, and proves its own correctness mathematically.
It is two systems fused into one:
QATAAUM (Quantum Assembly Runtime) — A clean-room quantum circuit compiler. Takes OpenQASM 2.0, 3.0, or our custom MetaQASM-4 language. Transforms it through 9 intermediate representations. Routes qubits via SABRE. Lowers to pulse schedules. Outputs executable quantum programs. 33,000+ lines of Rust. 221 passing tests. 31 Lean 4 theorems with zero sorry. Built from a single structured XML prompt in one execution — no human wrote the boilerplate.
Sov-Kernel-Monster (Quantum Execution Engine) — A Fortran 2018 bare-metal quantum math kernel. Evolves density matrices. Implements the Jordan Spectral Transformer. Runs on ARM64 SVE2 or RTX 4090 with zero libc, zero C runtime, zero external dependencies. Every output is cryptographically signed (Blake3 + Ed25519) and sealed to an append-only WORM chain. A Lean 4 proof guarantees the core mathematical invariant holds — not tested, PROVED.
Together: QATAAUM compiles quantum circuits. Sov-kernel-monster executes them. An RTX 4090 inference engine runs sovereign LLM inference with no API calls. Five parallel AI agents coordinate via Byzantine fault-tolerant consensus. Every result is formally verified and cryptographically attested. Nothing leaves your machine unsigned. Nothing enters your system unverified.
This has never been done before. Not the individual pieces — quantum compilers exist, formal verification exists, cryptographic signing exists. What's never been done is unifying all of them into a single sovereign system where the mathematics itself prevents compromise.
Every quantum operation in this system applies:
ρ' = φ⁻¹·UρU† + φ⁻²·ρ
where φ⁻¹ = 0.6180339887 (the golden ratio inverse). At the fixed point T(ρ*) = ρ*, we prove in Lean 4:
theorem jordan_fixed_point_commutes
(U ρ_star : Matrix n n ℂ) (hU : U * star U = 1) (hUH : star U * U = 1)
(h_fp : φ_inv • (U * ρ_star * star U) + φ_inv^2 • ρ_star = ρ_star) :
U * ρ_star = ρ_star * UWhat this means in plain English: When the system reaches equilibrium, the quantum operation and the quantum state MUST commute. This isn't a design choice — it's a mathematical necessity forced by the golden ratio weighting. And if they commute, the operation cannot disturb the state. The system becomes self-stabilizing.
This is also an algebraic bypass of 87 years of obstruction in the Jacobian Conjecture — the same fixed-point commutativity, applied to polynomial maps.
Traditional security: detect attacks, then respond. Our security: make attacks algebraically impossible.
! jordan_block.f90 — 12 lines that close 4 attack surfaces forever
! Side-channel timing: ∂U/∂t = 0 → unitary is time-independent → no information in timing
! Fault injection: ρ* = ψψ† → pure state is idempotent → corruption immediately detectable
! Coherence attacks: [U,ρ*] = 0 → Lean 4 proved → external manipulation impossible
! Entropy exhaustion: S(ρ) bound by φ⁻² → information can only contract, never leakYou don't need a firewall if the vector space doesn't contain the attack states.
Quantum states evolve under noise. We solve the full stochastic differential equation on the Bures manifold:
dρₜ = -∇_Riem S(ρₜ) dt + √D dWₜ
A geometric Euler-Maruyama solver that generates noise in the TANGENT SPACE of valid quantum states, then projects back to the density matrix manifold via eigenvalue retraction. GPU-batched Monte Carlo across thousands of trajectories simultaneously. Every trajectory checkpoint is WORM-attested.
This is not a toy. This is how you simulate real decoherence, real thermal noise, real quantum measurement — and prove the result is still a valid quantum state at every step.
→ SOVEREIGN_INTEGRITY_ARCHITECTURE.md
Three cryptographic defense layers. 117 lines total. Zero new sorries. <50ms overhead.
Layer 1 — Operational Integrity (Four Agreements)
| Gate | What it enforces |
|---|---|
SovWordSeal |
Every claim WORM-sealed with Blake3+Ed25519 before it leaves the boundary |
knowledge_verify |
Must prove knowledge from WORM chain BEFORE answering — hallucination structurally impossible |
SovAssumeCheck |
If an assumption is detected, HALT and ask — never silently proceed on unverified premises |
apply_sovereign_effort |
Every output must show work — no bare conclusions without derivation |
Layer 2 — Grey Hat Defense (12 lines of Fortran)
Black hat attack techniques reduced to algebraic cores, then made mathematically impossible by the spectral properties of the Jordan operator. Not "hard to exploit" — the attack states DON'T EXIST in the Hilbert space.
Layer 3 — Sovereign Meta-Agent (45 lines of PL/I)
Knowledge comes from the WORM chain only. Scoring uses MLIR-fused cosine similarity. Synthesis uses Born rule density matrix aggregation. Output sealed with Blake3+Ed25519. The agent's lens to the world is its own verified experience — not the open web, not training data, not hallucination.
When this system needs information, it doesn't call Google. It doesn't query a vector database someone else hosts. It searches its OWN cryptographically sealed knowledge chain.
Query → 768-dim embedding → cosine similarity against WORM chain
→ Born rule synthesis: answer = tr(q_j · ρ)
→ Blake3 + Ed25519 seal
→ Return attested result
Every answer is traceable to its source. Every source was WORM-sealed when it entered. Every synthesis step is reproducible. If the source doesn't exist in the chain, the answer is "I don't know" — not a confident hallucination.
Entry point: sovereign-pli/SovMetaAgent.pli (356 lines, PL/I, non-recursive)
Sovereign LLM inference on bare metal. No CUDA toolkit installation. No Python. No PyTorch. The binary walks the Windows PEB to find nvcuda.dll, resolves 25 CUDA driver functions from the PE export table, and dispatches kernels directly.
| Component | What it does |
|---|---|
flash_attention.ptx |
sm_89 PagedAttention + online softmax + tensor core WMMA + RMSNorm + SiLU |
scheduler.cmm |
C-- continuous batching (6 states). WORM attestation every 64 tokens |
transformer_kernel.f90 |
Fortran 2018: RoPE, GQA paged attention, KV cache, blake3 per-KV |
gguf.c |
GGUF v3 parser. Q4_0/Q4_K/Q8_0/F16/BF16/F32. VirtualAlloc. No malloc |
cuda_driver_loader.c |
PEB walk → nvcuda.dll → PE export table → CUDA without the toolkit |
power_handler.c |
Suspend → WORM checkpoint. Battery < 20% → reduce batch. 4 GUID registrations |
main.c |
Zero-CRT entry. Manual kernel32. Boot: CUDA → Power → Scheduler → inference loop |
The QATAAUM runtime includes a C ABI bridge to IBM i systems — qataaum_init, qataaum_job_create, qataaum_job_submit, qataaum_job_execute. This connects sovereign quantum execution to enterprise mainframe infrastructure. RPG-style job queues, EBCDIC journaling, message queue IPC — all through a clean Rust FFI layer.
Five parallel AI agents. One small, fast model each. Byzantine fault-tolerant consensus (4-of-5 quorum).
| Agent | Domain | Why it's separate |
|---|---|---|
| Fortran Agent | Kernel ops, vector math, ABI, WORM chain | Knows Goldilocks field arithmetic, not type theory |
| Haskell Agent | Type proofs, Jacobian algebra, Mora basis | Knows polynomial reduction, not hardware |
| Lean Agent | Formal verification, proof objects | Knows tactics, not scheduling |
| MLIR Agent | Polyhedral fusion, loop tiling, backend targets | Knows SVE2/AVX-512/PTX, not proofs |
| IDE Agent | Terminal, file I/O, WORM sealing, browser bridge | Knows user interaction, not math |
Why 5 small models beat 1 large model: Each agent runs in 4-7ms. In parallel, wall-clock = slowest single agent (~50ms total), not the sum. A single large model doing all five jobs would take 200-400ms and waste tokens on domains irrelevant to the current subtask. Speed × specialization × formal integration surface > raw parameter count.
Consensus: Agents don't vote on vibes. They produce formally typed outputs. Integration is mathematical — WORM sealing, Blake3 attestation, Ed25519 verification. If an agent is Byzantine (compromised, hallucinating, adversarial), the other four overrule it and the bad output never reaches the chain.
→ ADR_PHASE_MIRROR_GOVERNANCE.md
Every quantum circuit, every agent action, every knowledge query passes through a fail-closed verification gate BEFORE reaching the kernel. This is MIRROR KITTY — the governance model that has gated execution since the origin of SnapKitty (JAB Capital Trust, 2021).
Intent → Policy Check → Assumption Audit → WORM Seal → EXECUTE (or HALT)
There is no "run first, check later." There is no "log the violation and continue." If the gate doesn't open, execution doesn't happen. The system is fail-CLOSED, not fail-open. Silence is the default. Execution requires proof.
Three defense subsystems between the core JST and the final signed output:
| System | What it prevents | How |
|---|---|---|
| ZMOS | Spectral drift | Operator-valued Euler product. Fredholm determinant. HALT if Δ(t) > 1e-3 |
| QMHES | Key weakness | Prime-encoded quantum states ⊗ₚ|ψₚ⟩^kₚ. Hybrid classical⊕quantum → Blake3 → ML-KEM |
| SNDL | Harvest-now-decrypt-later | φ-decay key rotation on Fibonacci intervals. Triple gate: strength ≥ 128 AND fresh AND ≤3 missed rotations |
Gate ordering (every execution): JST → GREY HAT → ZMOS → MMP → SNDL → blake3 → bifrost_sign
This isn't a quantum simulator with crypto bolted on. The mathematics is load-bearing. Remove any piece and the security guarantees collapse.
| Mathematical Component | Where it lives | What it does |
|---|---|---|
| Jordan Spectral Transformer | jordan_block.f90 |
φ⁻¹ contraction forces convergence + commutative fixed point |
| Bures Riemannian Geometry | rust/algebraic-core/geometry.rs |
Lyapunov equation, geodesic distance, entropy gradient on curved manifold |
| Geometric Euler-Maruyama SDE | rust/algebraic-core/stochastic.rs |
Density matrix diffusion under noise, tangent-space projection, manifold retraction |
| Goldilocks Field Arithmetic | bob_goldilocks.f90 |
p=2⁶⁴−2³²+1 prime field, NTT, zero-knowledge friendly |
| Mora Standard Basis | haskell/LiquidLean/Jacobian/ |
Gröbner basis for local rings → singularity resolution → genus-0 forcing |
| Plücker Formula | haskell/LiquidLean/Jacobian/ |
genus = 0 proof via δ-invariant counting |
| Port-Hamiltonian DAE | bob_phdae.f90 |
Energy-preserving differential-algebraic equations, power balance audit |
| Von Neumann Entropy | geometry.rs |
S(ρ) = -Tr(ρ log ρ), Riemannian gradient drives thermal equilibrium |
| Born Rule | measurement_head.f90 |
p_j = tr(q_j · ρ) with Fibonacci temperature τ = φ⁻ᵏ |
| Josephson Vortex Lattice | bob_lattice.f90 |
3D topological charge, vortex detection, lattice energy minimization |
33,000+ lines of Rust. Clean-room implementation — no IBM code, no Qiskit code, no copied anything.
9-level IR pipeline:
Source (OpenQASM/MetaQASM-4)
→ Parsed AST
→ Typed AST (linear ownership, refinement types, capability indexing)
→ Control Flow Graph
→ SSA Form
→ Gate IR
→ Topologically Sorted (SABRE routing)
→ Scheduled
→ Pulse-level
→ Executable
MetaQASM-4 is our custom quantum language. It has:
- Typed effect monads (CircuitM, MeasureM, DynamicM, PulseM, BackendM, ProofM, ReceiptM)
- Linear ownership (owned/borrowed/released — no-cloning at language level)
- Refinement types (statically prove qubit count, gate depth, entanglement structure)
- Capability indexing (type-level hardware targeting)
- Proof obligations (each pass must discharge verification conditions)
221/221 tests passing. 31 Lean 4 theorems. 0 sorry.
| Component | Lines | Tests | Status |
|---|---|---|---|
| Rust Compiler | 21,900 | 161/161 | Production |
| Simulators (statevector + density matrix) | 1,348 | 18/18 | Production |
| Runtime (ShadowRPG-Q + IBM i FFI) | 1,958 | 16/16 | Production |
| Liquid Haskell Verification | 1,510 | 6 modules | Verified |
| Lean 4 Theorems | 958 | 31 theorems | Zero sorry |
| Tests + Benchmarks | 1,680 | 221/221 | All passing |
| Total | 32,334 | 221/221 | Production-ready |
The QATAAUM compiler was generated from a single XML prompt (QATAAUM_WORKFLOW_PUBLIC.xml) — executed on IBM Bob (Claude Sonnet 3.7 behind IBM branding, on IBM free credits). IBM's own platform, running Anthropic's model, produced the quantum compiler that makes IBM's quantum cloud obsolete. The agent couldn't even access the target repository — it built 32,334 lines blind, and the interfaces aligned because the architecture is formally specified.
The prompt defines:
- Clean-room boundary rules (no proprietary code, research ledger of sources)
- 6 parallel roles (RPG Engineer, System Architect, Haskell Verifier, Rust Runtime, Lean Auditor, Integration Governor)
- 21-state hybrid FSM governing compilation
- 18 quality gates (no Python in production, deterministic FSM, pre/postconditions on every pass, zero sorry, no AI weights, 15K minimum lines)
- Sovereign node key gate — won't execute without a valid Ed25519 key
The XML prompt IS the intellectual property. The code it generates is the product. A decoy version (QATAAUM_WORKFLOW_DECOY.xml) exists as a honeypot — contains a canary key (DEADBEEF) that logs unauthorized use attempts to the trust registry.
Prompt 0 (prompt.JSON) is the philosophical seed that started everything: force all output to simultaneously satisfy Rust memory safety, Lean 4 proof obligations, Idris linear types, and Prolog logic resolution. The quantum computer wasn't designed — it was FORCED into existence by the constraint space of four paradigms applied simultaneously.
| Module | Lines | What it does |
|---|---|---|
bob_kinds |
55 | ISO C binding types, Goldilocks constants |
bob_errors |
115 | 13 stable error codes, thread-local state |
bob_rng |
219 | xoshiro256** PRNG |
bob_state |
327 | State vector |ψ⟩, norm, inner product |
bob_gates |
481 | Pauli X/Y/Z, H, T, S, CNOT, phase rotation |
bob_lattice |
508 | 3D Josephson vortex lattice, topological charge |
bob_measurement |
531 | Born rule measurement, wavefunction collapse |
bob_hamiltonian |
550 | Ising H = −JΣσᶻσᶻ − hΣσˣ, Padé-13 matrix exponential |
bob_integrator |
456 | Trotter-2 evolution O(dt²) per step |
bob_metrics |
495 | Entropy, purity, coherence, fidelity |
bob_goldilocks |
429 | Field arithmetic p=2⁶⁴−2³²+1, NTT |
bob_worm |
421 | Blake3 WORM chain, full Fortran 2018 implementation |
bob_circuit |
376 | QFT, Grover, Shor, QPE, Bell pair, teleportation |
bob_phdae |
400 | Port-Hamiltonian DAE, power balance audit |
bob_abi |
487 | 14 C ABI exports via bind(C) |
| Module | Lines | What it does |
|---|---|---|
sov_monster_kernel |
1506 | Blake3 + Ed25519 + APL ZGEMM fused kernel |
boolean_spectral_lens |
296 | Jordan algebra → spectral flow → Lisp world dump |
measurement_head |
305 | Born rule, Fibonacci temperature τ=φ⁻ᵏ |
jordan_block |
284 | Jordan step, fixpoint, gradient adjoint + GREY HAT gates |
spe_encoder |
444 | SPE frame encoder |
training_adjoint |
354 | Training adjoint: ∂L/∂H = −i·dt·φ⁻¹·[λ,ρ] reverse-mode AD |
Full quantum engine compiled to WebAssembly. make wasm → 44KB .wasm. Runs in any browser.
All bindings compile to a single C ABI contract: bob_quantum_state_evolve(). Cross-language reproducibility verified — identical seeds produce identical results across all language pairs.
| # | Language | Domain |
|---|---|---|
| 1 | C | Core ABI |
| 2 | Rust | Systems + WASM bridge |
| 3 | Julia | Numerical computing |
| 4 | Elixir | Distributed systems |
| 5 | R | Statistical analysis |
| 6 | Smalltalk | Live object model |
| 7 | Racket | Lisp dialect + EmojiScript FSM |
| 8 | Janet | Dynamic language |
| 9 | Zig | Low-level systems |
| 10 | Odin | Game engine |
INPUT H ∈ ℂⁿˣⁿ (Hermitian) ρ ∈ ℂⁿˣⁿ (density matrix) dt sk pk
│
▼ VALIDATE — Hermitian? Trace-1? Shapes match? Blake3 hash input
│
▼ EXPONENTIATE — U = exp(−i·dt·H) via Padé-13 + scaling & squaring
│
▼ EVOLVE — ρ(t+dt) = φ⁻¹·U·ρ(t)·U† + φ⁻²·ρ(t) [JST step]
│
▼ VERIFY — [U,ρ*]=0? (GREY HAT) Δ(t)≤1e-3? (ZMOS) MMP? SNDL?
│
▼ MEASURE — p_j = tr(q_j·ρ), temperature τ = φ⁻ᵏ
│
▼ SEAL — Blake3(output ‖ input ‖ steps) + Ed25519(sk)
│
OUTPUT ρ(t+dt) Blake3 hash Ed25519 signature WORM receipt
# Quantum engine (gfortran)
make all
# Full LLVM pipeline → ARM64 SVE2 bare metal (flang-new-19)
make monster
# WASM bridge → browser (wasm-pack)
make wasm
# Debug with sanitizers
make debug
# Full sovereign pipeline with node key
SOV_SK=path/to/node_sk.bin ./build_monster.sh
# RTX 4090 zero-libc inference
cd rtx && mkdir build && cd build
cmake .. -DSOV_BUILD_CUDA=ON -DSOV_ZERO_LIBC=ON
cmake --build . --config Release
# Trajectory renderer (pure ES modules, no build step)
cd frontend && python -m http.server 8080sov-kernel-monster/
├── src/ Fortran 2018 quantum execution engine (22 modules)
├── rust/ Rust crates: algebraic-core, bob-quantum-sys, trajectory-export
├── qataaum/ Quantum compiler (33K+ lines Rust)
│ ├── compiler/ Parser → Semantic → IR → Passes → Routing
│ ├── simulator/ State-vector + density-matrix backends
│ ├── runtime/ IBM i FFI, job queue, journal, WORM receipts
│ └── verification/ 31 Lean 4 theorems + Liquid Haskell refinement types
├── rtx/ RTX 4090 zero-libc inference engine
├── frontend/ Three.js trajectory manifold renderer (Bloch sphere WebGL)
├── sovereign-pli/ PL/I + COBOL + INTERCAL governance layer
├── mlir/ MLIR polyhedral fusion pipeline
├── lean/ Lean 4 formal verification (zero sorry)
├── haskell/ Jacobian Conjecture (genus-0 forcing via Mora basis)
├── wasm/ Browser-native quantum engine (44KB .wasm)
├── tests/ Integration test suite
└── trust/ XML workflow prompts + trust deed + decoy honeypot
One person. AI-assisted. 130,000+ lines across 30 languages in under 90 days.
The architecture was conceived as a unit — not assembled from parts. Fortran quantum kernel + Rust compiler + MLIR acceleration + Lean 4 proofs + cryptographic attestation + sovereign AI agents — all designed together from day one. That's why they integrate cleanly instead of fighting each other at the boundaries.
Prior art established: PAR-001 through PAR-007 under SSL v3.0 Part IX. LinkedIn publication July 1, 2026. Zenodo DOI pending.
Sovereign Source License v3.0 — SnapKitty Collective / Bel Esprit D'Accord Trust
Functional Source License 1.1 — Change Date: 2030-07-22. Change License: Apache-2.0.
The prompt is the product. The math is the moat. The key is the gate.
Ω↺Ψ↺Δ↺Λ↺Σ↺Φ↺α · EVIDENCE OR SILENCE · SOURCE = BINARY = PROOF · SOVEREIGN