Graph-based ISA pruning for resource estimation#3031
Merged
msoeken merged 6 commits intofeature/qrefrom Mar 23, 2026
Merged
Conversation
…e graph with more sophisticated pruning strategies.
brad-lackey
approved these changes
Mar 22, 2026
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.
Adds an alternative estimation path that builds a provenance graph of ISA instructions and prunes suboptimal candidates before forming the Cartesian product, significantly reducing the combinatorial search space.
Changes
Rust (
source/qre/src/)isa.rs: Addbuild_pareto_index()to compute per-instruction-ID Pareto-optimal node sets over (space, time, error). Addquery_satisfying()to enumerate ISAs from pruned graph nodes. ExtractInstructionConstraint::is_satisfied_by()from inline logic.trace.rs: Addestimate_with_graph()— a new parallel estimator that uses the provenance graph with per-slot dominance pruning to skip combinations dominated by previously successful estimates. AddTrace::required_instruction_ids()helper. Addpost_processflag toestimate_parallel()to control summary collection.result.rs/lib.rs: Expose new types and re-exports.Python (
source/pip/)_estimation.py: Adduse_graphparameter toestimate()(defaultTrue). When enabled, populates the provenance graph and calls the graph-based estimator instead of the flat enumerator._isa_enumeration.py: Addpopulate()method toISAQueryand its subclasses to fill the provenance graph without yielding ISA objects._instruction.py: AddInstructionSourceutility.qre.rs: Expose_estimate_with_graph,ProvenanceGraphbindings, and related Python-facing APIs._qre.pyi: Update type stubs.Tests
Trade-offs
The graph-based pruning filters ISA instructions by comparing per-instruction space, time, and error independently. Because total qubit counts depend on the interaction between factory space and runtime (copies × factory_space), an instruction dominated on per-instruction metrics can still contribute to a globally Pareto-optimal result.
use_graph=Falsecan be used when completeness of the Pareto frontier is required.