Default HybridEngine to the Rust PHIR interpreter#348
Closed
ciaranra wants to merge 2 commits into
Closed
Conversation
…uzz iterations, and a QASM-generated-PHIR differential
Member
Author
|
Consolidated into #347 (the default-to-Rust switch + parity strengthening now live there); avoiding a separate PR. |
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.
Default
HybridEngine's classical interpreter to the Rust implementation (RustPhirClassicalInterpreter), and strengthen the Rust↔Python parity coverage that backs the switch.Change
_make_classical_interpreter(None)now returns the Rust interpreter instead of the Python one. Thecinterpargument still lets callers choose:cinterp="python"for the pure-PythonPhirClassicalInterpreter,cinterp="rust"(or the default) for the Rust-backed one, or a concrete instance. Rust is a core dependency (pecos_rslibalways ships), so the default path is always available; no fallback added.Motivation: the Rust interpreter is bit-for-bit equivalent to Python (parity suite) and materially faster.
Verification
RustPhirClassicalInterpreter.~; added theexample1WASM program; added a QASM→PHIR generated-differential over the curated converter fixtures. ~3,200 direct Rust≡Python comparisons total, all green, in <3s.Notes
cinterp="python".HybridEngineusers.