Repository navigation
Solaris 1.1.0: pluggable quantum layer (ports & adapters) - #1
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 nomeasure(): 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).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|qiskitorSOLARIS_ENGINE. Lazy imports: a missing library only disables its own flag value.labs/qm_tests.pystays frozen as the reference battery.requirements-engines.txtfor the optional backends.Verification
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