Skip to content

py-0.9.0.dev0

Pre-release
Pre-release

Choose a tag to compare

@ciaranra ciaranra released this 11 Jul 21:29
a54370f

PECOS 0.9.0.dev0 (pre-release)

Highlight: Rust classical interpreter is now the default

HybridEngine's default classical interpreter is now the Rust-backed RustPhirClassicalInterpreter (previously the pure-Python PhirClassicalInterpreter). For valid PHIR programs supplied as a dict, JSON string, or to_phir_dict()-convertible object it is behaviorally equivalent — differentially validated against the Python interpreter (~3,200 fuzzed programs, QASM-generated-PHIR differentials, exact exception-type parity).

Escape hatch: to restore the previous behavior, construct the engine with HybridEngine(cinterp="python").

Boundary behavior was brought to parity so the switch is not silent: phir_validate now schema-validates on the Rust path; division by zero raises ZeroDivisionError and undefined classical variables raise KeyError on both interpreters; undeclared assignment/ffcall/measurement targets fail fast (matching Python) instead of being auto-created; check_ffc fails fast on missing foreign functions; run_multisim works with to_dict-capable foreign objects. Known limitation: PyPHIR program objects are not accepted by the Rust interpreter (clear TypeError; use a dict/JSON or cinterp="python").

Also in this release

  • PHIR engine fail-fast fixes (#345): invalid variable definitions and out-of-range measurement writes error instead of being silently swallowed; the no-return measurement index is absolute across batches.
  • ~41 previously-dormant pecos-phir-json integration tests revived and running in CI.
  • Signed PHIR registers render as two's-complement binary strings (i(S+1) semantics); WASM fixtures corrected to i32 size 31.
  • Supply-chain: cxx 1.0.195, Go 1.26.5, triaged cgmath advisories (#349).
  • pecos-rslib-llvm is published alongside pecos-rslib and quantum-pecos (exact-version pins).

Rust API note: PecosError gains a RuntimeUndefinedVariable variant — source-breaking for downstream code that exhaustively matches the enum (0.x pre-release).

What's Changed

Full Changelog: py-0.8.0.dev8...py-0.9.0.dev0

Installing this pre-release

pip install quantum-pecos==0.9.0.dev0
# or with uv (transitive pre-release pins need the flag):
uv pip install --prerelease=allow quantum-pecos==0.9.0.dev0