Skip to content

Solaris 1.1.0: pluggable quantum layer (ports & adapters) - #1

Merged
masteris777 merged 2 commits into
mainfrom
solaris-1.1-engine
Aug 23, 2026
Merged

masteris777 merged 2 commits into
mainfrom
solaris-1.1-engine

Conversation

@masteris777

Copy link
Copy Markdown
Contributor

What this is

Developers of quantum algorithms routinely run their code on classical simulators while hardware is scarce - that is what QuTiP and Qiskit Aer are for. Solaris 1.0.0 carried its own such simulation of the quantum layer (the amplitude table inside each shared contract). This release refactors that layer behind a ports-and-adapters interface: the ledger no longer cares whose mathematics holds the wave.

Changes

  • labs/engine/ - the pluggable quantum layer:
    • port.py - WaveEngine port, five methods (prepare / apply1 / cnot / branch_weight / project). Deliberately no measure(): the hash draw and the double-entry settlement decision stay on the ledger side (domain.py), so no backend can re-import the Born rule the model derives from two-signature settlement (QM-30..31).
    • Adapters: table.py (default - the original arithmetic, stdlib-only reference semantics), numpy_sv.py, qutip_qobj.py, qiskit_sv.py (AerStatevector, C++ path), broken.py (negative control).
  • labs/qm_battery.py - the nine-check QM battery, engine-parameterized: --engine table|numpy|qutip|qiskit or SOLARIS_ENGINE. Lazy imports: a missing library only disables its own flag value. labs/qm_tests.py stays frozen as the reference battery.
  • Version card -> Solaris 1.1.0 (implementation 1; every physical mechanism unchanged from implementation 0). The compounding composition law moves to the implementation-2 candidate slot.
  • Docs: README engine section, CHANGELOG entry, CITATION.cff version bump, requirements-engines.txt for the optional backends.

Verification

Engine Battery stdout vs frozen reference Exit
table (default) byte-identical 0
numpy byte-identical 0
qutip byte-identical 0
qiskit (AerStatevector) byte-identical 0
broken (negative control) differs, 4/9 checks FAIL, CHSH ~1.9 1

Byte-identity is exact, not statistical: draws are hash-fed and deterministic. The broken control shows the battery detects a wrong engine - and, as a bonus measurement, that the |a| (one-signature) law lands below the classical bound, not merely below Tsirelson.

Per the implementation-bump rule, the full 150-row battery was re-sat: 147 pass, 3 pre-registered red (GR-34..36), expected-red gate green - tests/results/solaris-1.1.0.md.

Why it matters beyond engineering

The port is the long-horizon socket: a future substrate construction that produces wave behaviour without storing amplitudes plugs in as one more adapter and sits the same exam. Conformance is then not a matter of argument but of a green battery.

🤖 Generated with Claude Code

masteris777 and others added 2 commits August 23, 2026 16:16
…mpy, qutip, qiskit/aer

Developers of quantum algorithms routinely run their code on classical
simulators while the hardware is still scarce - that is what libraries
like QuTiP and Qiskit Aer are for. Solaris 1.0.0 carried its own such
simulation of the quantum layer: the amplitude table inside each shared
contract. This release refactors that layer behind a ports-and-adapters
(hexagonal) interface, so the ledger no longer cares whose mathematics
holds the wave.

- labs/engine/: the WaveEngine port, five methods (prepare / apply1 /
  cnot / branch_weight / project). The ledger reads branch norms and
  orders projections; the hash draw and the double-entry settlement
  decision stay on the ledger side. The port deliberately has no
  measure(): no backend can re-import the Born rule the model derives
  from two-signature settlement.
- Adapters: table (our own implementation, the DEFAULT - stdlib-only
  reference semantics), numpy statevector, QuTiP, Qiskit/Aer (C++
  statevector), plus a broken negative control for the harness.
- labs/qm_battery.py --engine <name> (or SOLARIS_ENGINE): all four
  adapters reproduce the frozen reference battery labs/qm_tests.py
  byte-identically (deterministic hash-fed draws make the comparison
  exact, not statistical). The broken control (weights |a| instead of
  |a|^2) fails 4/9 checks with CHSH ~1.9 - below even the classical
  bound.
- Every physical mechanism is unchanged from implementation 0; the full
  150-row battery was re-sat for this version: 147 pass, 3 pre-registered
  red (GR-34..36), expected-red gate green
  (tests/results/solaris-1.1.0.md).
- Version card -> Solaris 1.1.0 (implementation 1); the compounding
  composition law moves to the implementation-2 candidate slot.

The port is also the long-horizon socket: a future substrate
construction that produces wave behaviour without storing amplitudes
plugs in as one more adapter and sits the same exam.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@masteris777
masteris777 merged commit 0764f8f into main Aug 23, 2026
2 checks passed
@masteris777
masteris777 deleted the solaris-1.1-engine branch August 23, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant