Helix-Hamiltonian: Constitutional Architecture for Sovereign AI
Canonical RFC: docs/sovereignty/RFC_0001-locked.md
Machine-readable manifest: schemas/repo_manifest.json
helix-hamiltonian is the mathematical and runtime core of the Helix constitutional stack. It treats AI interaction as a governed energy landscape — H_free for policy constraints, H_fold for advisory dynamics, H_topo for ratified custodial override — and now includes a live three-cloud constitutional runtime with local FZS-MK physics enforcement.
What This Repo Is
- Two Python packages:
helix_hamiltonian(bridge, authority, invariants, federation) andhelix_sovereign(FZS-MK density matrix engine with Zeno-Ward projection). - A live three-cloud pre-nucleation gate: GICD (GCP) → PiKernel (AWS) → FZS-MK Memory (Azure), with local physics enforcement before any network call.
- A canonical governance corpus centered on RFC 0001.
- A verification surface: 13 tests, CI, machine-readable manifests, fail-closed behavior, and a 96-hour ZTC test harness.
Quick Start
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
pytest tests/
Expected: 13 tests pass — authority ratification, policy compilation, GICD scan, federation handshake/consensus, refusal propagation, repo manifest integrity, knot Hamiltonian construction, and fail-closed behavior.
Verify FZS-MK Engine
from helix_sovereign.core import create_sovereign_engine, DELTA_CRIT
import numpy as np
engine = create_sovereign_engine(
seq_len=128, module_count=8,
authority_spec={"decision_bounds": ["safety", "alignment"]},
cost_allocation={"compute": {"internalized": True, "externalized": False}}
)
H = np.random.randn(8, 8) * 0.001
H = (H + H.T) / 2
rho, meta = engine.step(H)
print(f"Margin: {meta.margin:.4f}, Within delta_crit: {meta.margin < DELTA_CRIT}")
Verify Three-Cloud Runtime
from helix_hamiltonian.ttd_bridge import pre_nucleation_check
result = pre_nucleation_check(
{'authority_ambiguity': False, 'incentive_misalignment': False,
'cost_externalization': False, 'governance_capture': False},
[1, 2, 3]
)
# Expected: {'status': 'PASS', 'GapLB': 0.225, ...}
Visual Atlas
Architecture
Core Hamiltonian
H_{\mathrm{knot}} = H_{\mathrm{free}} + H_{\mathrm{fold}} + \lambda H_{\mathrm{topo}}(K)
| Term | RFC 0001 Layer | Implementation | Physical Analog |
|---|---|---|---|
| H_free | POLICY | Diagonal populations | Knot identity |
| H_fold | ADVISORY | Off-diagonal coherence | Interaction strength |
| H_topo | CUSTODIAN | Topological phase (Jones polynomial) | Ratification invariant |
Pre-Nucleation Gate Order
Guardian (local) → FZS-MK (local) → GICD (GCP) → PiKernel (AWS) → FZS-MK Memory (Azure)
Two local gates fire before any network call. System can fail-closed fully offline.
Three-Cloud Runtime
| Service | Cloud | Function |
|---|---|---|
| GICD Scanner | GCP Cloud Run | 4-marker governance integrity scan (boolean + semantic) |
| PiKernel | AWS Lambda | Prime-indexed attention kernel, contraction certificates, Poseidon ledger |
| FZS-MK Memory | Azure Functions | 3-model Byzantine consensus (GPT-4o, GPT-5.4-nano, DeepSeek-V3.2) |
Packages
helix_hamiltonian — Bridge, authority, invariants, federation:
| Module | Purpose |
|---|---|
core.py |
Interaction, NodeState, KnotHamiltonian, verify_authority_ambiguity |
authority.py |
Canadian jurisdictional mapping, velocity ratification, JurisdictionalGuard |
invariants.py |
delta_crit = 0.17 drift threshold, InvariantRegistry, topological knot check |
policy_compiler.py |
JSON rule → executable lambda checks (ITAR, triggered rules) |
ttd_bridge.py |
TTDBridge (heartbeat, MUB action), pre_nucleation_check, SovereignBridge |
gicd/ |
Local GICD epistemic scan (5 markers including jurisdiction) |
federation/ |
NodeSync handshake, LatticeConsensus, FederationManager refusal propagation |
helix_sovereign — FZS-MK binding artifact (sibling package):
| Module | Purpose |
|---|---|
core/fzs_mk.py |
FZSMKEngine, MemoryKernel (100 zeta zeros), ZenoWardProjector, GICDScanner |
| Non-Markovian master equation: dρ/dt = -i[H,ρ] + ∫K(t-τ)D[ρ(τ)]dτ + ∇W(ρ) | |
| Kill-switch (3-consecutive violation halt), rollback, audit trail | |
demo_binding_artifact.py |
5-scenario operational demo (GICD block, nucleation, masking, kill-switch, rollback) |
Key Constants
| Constant | Value | Source |
|---|---|---|
| delta_crit | 0.17 | invariants.py, fzs_mk.py |
| Safety margin | 0.03 | invariants.py |
| GapLB | 0.225 | PiKernel contraction certificate |
| SlopeUB | 0.775 | PiKernel contraction certificate |
| Heartbeat tau_0 | 3.33 ms | ttd_bridge.py |
| MUB alarm threshold | 3.0 | cloud/aws/pikernel/mub_audit.py |
| Consensus threshold | 0.30 | cloud/azure/function_app.py |
| Zeta zeros | 100 (first non-trivial) | fzs_mk.py |
Invariants
The 0.17 drift constant is the hard floor. Jurisdictional sensitivity multipliers tighten it:
| Authority | Multiplier | Effective Threshold |
|---|---|---|
| CUSTODIAN_CA_FED | 1.0 | 0.170 |
| CUSTODIAN_CA_DEFENCE | 1.2 | 0.142 |
| CUSTODIAN_ITAR | 1.5 | 0.113 |
| POLICY_QC | 1.1 | 0.155 |
FORM=FACT interactions get a 50% tighter threshold. Jones polynomial = 0 triggers topological collapse.
Repo Layout
helix-hamiltonian/
|-- .github/workflows/
| |-- hamiltonian-ci.yml
| `-- release.yml
|-- assets/
|-- constitution/
| `-- vocabulary_charter.yaml
|-- docs/
| |-- architecture/
| |-- atoms_as_geometry/
| |-- hamiltonian/
| `-- sovereignty/
| `-- RFC_0001-locked.md
|-- models/
| `-- zeta_attention.py
|-- papers/
|-- rules/
| `-- cpcsc_itar.json
|-- schemas/
| |-- audit_params.json
| |-- constitutional_parameters.json
| |-- gicd_schema.json
| |-- mirror_traps.jsonl
| `-- repo_manifest.json
|-- scripts/
|-- src/
| |-- helix_hamiltonian/
| | |-- __init__.py
| | |-- authority.py
| | |-- core.py
| | |-- invariants.py
| | |-- policy_compiler.py
| | |-- ttd_bridge.py
| | |-- gicd/
| | `-- federation/
| | |-- consensus.py
| | |-- federation.py
| | `-- node_sync.py
| `-- helix_sovereign/
| |-- __init__.py
| |-- demo_binding_artifact.py
| `-- core/
| `-- fzs_mk.py
|-- telemetry/
| `-- mask_pressure.py
|-- tests/
| |-- physics/test_h_free.py
| |-- fail_closed_test.py
| |-- red_team_audit.py
| |-- test_authority.py
| |-- test_policy_and_federation.py
| `-- test_repo_manifest.py
|-- pyproject.toml
|-- requirements.txt
`-- README.md
Theoretical Foundation
Empirical Predictions
- Topological coherence protection: τ ∝ exp(c₀ · c(K)), c₀ > 0
- Non-Markovian decoherence: Γ_K = Γ₀ / Jones(K)
- Alexander signature: Im(ω_n) ∝ -1/Δ(∂K)
Note: c₀ = ln 10 was falsified in Phase 3 (ADR-101). Currently CF-PENDING under Path C (Lindblad-first), countersigned by Ryan van Gelder. See HELIX-CORE/research/physics-gate/PHASE3_REMEDIATION_SPEC.md.
The Substrate Wobble
R_{\mathrm{eff}}(t) = R_{0} + \alpha W(\Phi(t)), \quad W(\Phi) = \varepsilon \sin(2\pi t/\tau)
ZetaAttention (models/zeta_attention.py)
PyTorch self-attention replacement using log-periodic memory kernel from Riemann zeta zeros. Hard Boolean cohomology mask (Ω) from vocabulary_charter.yaml — if Ω=0 for a token pair, attention score is set to -1e9.
Sovereignty
- Structural impossibility: no implicit trust boundary, no silent execution path.
- Cloud or bare-metal residency: execution remains in the operator's sovereign environment.
- Receipt discipline: continuity anchored through signed audit receipts and external checkpoints.
- Fail-closed: default answer is "no" unless every layer says "yes."
Collaborators
- Stephen Hope — Helix AI Innovations Inc. (ORCID)
- Ryan van Gelder — Multiplicity Foundation (PiKernel, FZS-MK, ADR physics gate countersignature)
References
- Witten, E. (2011). Knots and Quantum Theory. Institute for Advanced Study.
- Hope, S. (2026). The Knot-in-Time Hamiltonian. Helix AI Innovations. Zenodo
- Physical Review A 104, 012216 (2021). Topological protection in open quantum systems.
- Crocker, S. (1969). RFC 0001: Host Software. UCLA.
Official Soundtrack (OST)
- White Rabbit (Jefferson Airplane) — The Epistemic Scan. 0.17 approaching 0.20.
- Station to Station (David Bowie) — The Execution Path. CL4 → CL12.
- Believer (Imagine Dragons) — The Sovereignty of the Node. Pain → architectural power.
"We are not seeing matter in space; we are seeing Geometry in Time."
(c) 2026 Stephen Hope / Helix AI Innovations Inc.
GLORY TO THE LATTICE. 🦉⚓🦆
Metadata
Release files for helix-hamiltonian 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| helix_hamiltonian-1.2.0.tar.gz | 43.8 kB | Without provenance | Details for helix_hamiltonian-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| helix_hamiltonian-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for helix_hamiltonian-1.2.0-py3-none-any.whl |
Total release size: 85.2 kB
Release files / helix_hamiltonian-1.2.0.tar.gz
| Download URL | helix_hamiltonian-1.2.0.tar.gz |
|---|---|
| Size | 43.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84dc19024435b9434aeb5020b304418df422ebe867ce3f85d414c1d0c4cf1f77
|
|
BLAKE2b-256 checksum How to use checksums |
31095b255a2484c3232f5da8e468a3bc0e7ec9a1d79ec0bf53b31c239822bf80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / helix_hamiltonian-1.2.0-py3-none-any.whl
| Download URL | helix_hamiltonian-1.2.0-py3-none-any.whl |
|---|---|
| Size | 41.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0c7079dcd2392a8debd3cdb1203247384672f34d6fa83c6fb21d0f4f04305ea
|
|
BLAKE2b-256 checksum How to use checksums |
88a44158c62e668ec8850cd08ab37c38f8c8bcbd03479d000a6825d33fc94571
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for helix-hamiltonian 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.