A quantum operating system.

QUASI manages heterogeneous compute resources — CPU, GPU, QPU — and makes allocation decisions autonomously. Programs go in, results come back. What runs where, when, and on which hardware is the OS’s concern.

12,600 lines of Rust. 375 tests. 14 backend profiles. Verified on IBM quantum hardware.


Architecture

How a problem flows through QUASI

The user submits an Ehrenfest program (a Hamiltonian + evolution time + noise constraints, encoded as CBOR binary). Everything after that is automatic.

Ehrenfest CBOR (user submits physics problem) │ ┌────┴────────────────────────────────┐ │ QUASI OS │ │ │ │ ┌───────────┐ ┌────────────┐ │ │ │ Afana │ │ Cache │ │ │ │ Compiler │ │ (BLAKE3) │ │ │ │ CBOR→QASM │ │ hit→skip │ │ │ └─────┬─────┘ └─────┬──────┘ │ │ │ │ │ │ ┌─────┴────────────────┴───────┐ │ │ │ Solvayeur (QUORA) │ │ │ │ QPU-native resource alloc. │ │ │ │ measurement = decision │ │ │ └────────────┬─────────────────┘ │ │ │ │ │ ┌────────────┴─────────────────┐ │ │ │ Scheduler │ │ │ │ filter → score → bind │ │ │ │ 14 backend profiles │ │ │ └────────────┬─────────────────┘ │ └───────────────┼────────────────────┘ │ ┌──────────────┼──────────────┐ ▼ ▼ ▼ Huoma IBM/IQM/ Quantinuum/ 1M qubits Rigetti IonQ/AQT (tensor net) (supercond.) (trapped ion)

Components

What QUASI can do today

Afana — Compiler

Compiles Ehrenfest programs (physics-native CBOR) to executable OpenQASM 2.0/3.0. Pipeline: deserialize → Trotterize → type check → lower to ZX-IR → noise analysis → observable synthesis → QASM emission → optimize. 3,500 lines of Rust, 208 tests.

Scheduler

Filter-Score-Bind pipeline (Kubernetes pattern). Hard constraints first (gate support, qubit count, noise budget), then weighted scoring across 7 criteria: gate set fit, noise margin, connectivity, queue depth, cost, preference, cache hit. 14 backend profiles with real hardware specs. 1,599 lines, 54 tests.

Cache

Content-addressed using BLAKE3. The cache key includes the circuit, backend ID, parameters, and calibration version. Changed calibration produces a different key — no invalidation logic needed. L1 in-memory, L2 filesystem. 614 lines, 17 tests.

Solvayeur — Quantum-Optimized Resource Allocator (QUORA)

The Solvayeur is a new kind of kernel: a resource allocator that runs on a QPU. Existing quantum operating systems (QOS, HALO, IBM QCSC) use classical schedulers to manage quantum resources. The Solvayeur inverts this — the scheduling decision itself is a quantum computation.

Concretely: the Solvayeur is an Ehrenfest program, compiled by Afana through the same pipeline it dispatches user programs to. Its scheduling Hamiltonian encodes backend contention (ZZ coupling), learned preference (Z bias), and exploration (transverse field X). After each dispatching round, the bias fields update from the observed execution reward — fidelity, latency, cost. Over time, the ground state of the Hamiltonian converges toward the optimal resource allocation.

Verified on IBM Strasbourg: 10 ATW rounds, 2-qubit scheduling circuit, 100 shots per round. The kernel explored 4 backends through quantum measurement and began converging toward Huoma as the optimal target.

Huoma Profiler

Before spending QPU time, the profiler estimates whether a circuit is classically simulable. Bond dimension below threshold → run on Huoma (tensor network, up to 1,000,000 qubits in 5.2 seconds). Exponential entanglement → route to QPU. QPU is reserved for problems that genuinely need it.


Codebase

Crate map

CrateLinesTestsPurpose
afana3,500208Ehrenfest compiler: CBOR → AST → ZX-IR → QASM
quasi-scheduler1,59954Filter-Score-Bind + 14 backend profiles + Huoma profiler
quasi-cache61417BLAKE3 content-addressed result cache
quasi-solvayeur98627ATW quantum scheduling kernel
quasi-demo900Pipeline demo + VQE orchestrator
quasi-senate~5,00010AI governance daemon
Total~12,600375All Rust. Zero Python in the critical path.

Backends

14 backend profiles

Real hardware specs from vendor documentation. The scheduler selects automatically.

BackendTypeQubitsNative GatesTopology
IBM Heron / TorinoSuperconducting156RZ/SX/X/ECRHeavy-hex
IBM Eagle / MarrakeshSuperconducting127RZ/SX/X/ECRHeavy-hex
IQM GarnetSuperconducting20PRX/CZGrid
IQM SiriusSuperconducting6PRX/CZStar
IonQ Aria / ForteTrapped ion25–36GPI/GPI2/MS/ZZAll-to-all
Quantinuum H1 / H2Trapped ion20–56RZ/RX/RY/ZZAll-to-all
Rigetti Ankaa-3Superconducting84RZ/RX/iSWAPGrid
AQT PineTrapped ion24RZ/RXX/RAll-to-all
Huoma ProjectedTTNTensor network1,000,000AllAll-to-all
Statevector simulatorExact30AllAll-to-all

Verification

Verified on real quantum hardware

Rabi oscillation (1 qubit)

Afana-compiled, 30 gates. IBM Torino (156q Heron).
50.9% |0⟩ / 49.1% |1⟩.
Job d7cui865nvhs73a53h70

Transverse Ising (2 qubits)

10 Trotter steps, 94 gates. IBM Strasbourg (127q Eagle).
70.7% ground state. Consistent with Afana’s 0.763 fidelity estimate.
Job d7cuqjp4p4gc73f5o63g

Solvayeur on QPU

10 ATW rounds on IBM Strasbourg. 2-qubit scheduling circuit, 100 shots per round. The kernel explored 4 backends (Huoma, IBM, IQM, Quantinuum) through quantum measurement. Measurement distributions near-uniform early (transverse-field regime), bias converging toward Huoma as optimal after reward feedback.


Naming

After Paul Ehrenfest

QUASI is named after the Quasi-Ergodic Hypothesis (1911) by Paul Ehrenfest and Tatiana Afanasyeva. The Afana compiler carries her name. The Solvayeur is named after the Solvay Conferences where Ehrenfest shaped the foundations of quantum mechanics.