A preview of what we have been building: a quantum programming toolkit in Rust, with a QML over-layer, formal verification export, and integration with our Omega Functions runtime.
What's In It
Four crates:
- quantum-core — AST with symbolic parameters, 30+ gate types (Pauli, Clifford, T, rotations, controlled, photonic), 12 optimizer passes, 10 circuit builders, error correction codes, omega bridge, and CLI
- quantum-macros — a
circuit!proc-macro for inline circuit definition - quantum-qml — statevector simulator with mid-circuit measurement and reset,
QuantumLayerfor PyTorch (via tch-rs), surrogate trainer, CMA-ES optimizer - quantum-py — Python bindings via PyO3/maturin
Circuit DSL
The circuit! macro gives a concise way to build circuits:
circuit!(bell, 2, 2 => { h 0; cx 0,1; measure_all; })
Circuits support composition via pipe (>>), tensor product (|), repeat, and inverse. Parameters can be symbolic for variational algorithms.
Optimizers
Twelve optimization passes: identity removal, adjacent gate cancellation, rotation merging, commutation reorder, gate decomposition, T-merge, Clifford tableau fast T-merge, and more. The Clifford+T pipeline chains them for deep optimization.
Format Export
Eight format exporters: QASM 2.0, OPTICQASM 1.0, JSON, .qc, omega-IR (for our runtime), C ABI FFI, Lean 4, and Rocq/Coq. The formal verification exports (Lean 4, Rocq) generate proof obligations from circuit annotations (Assert, Prove, Ensures, Invariant).
Status
131 tests passing, 35 Rust examples, 3 WASM guests, 2 Python demos. Integration with Omega Functions is live. More details to follow.