Skip to content

Graph-based ISA pruning for resource estimation#3031

Merged
msoeken merged 6 commits intofeature/qrefrom
msoeken/estimate_with_graph
Mar 23, 2026
Merged

Graph-based ISA pruning for resource estimation#3031
msoeken merged 6 commits intofeature/qrefrom
msoeken/estimate_with_graph

Conversation

@msoeken
Copy link
Copy Markdown
Member

@msoeken msoeken commented Mar 19, 2026

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: Add build_pareto_index() to compute per-instruction-ID Pareto-optimal node sets over (space, time, error). Add query_satisfying() to enumerate ISAs from pruned graph nodes. Extract InstructionConstraint::is_satisfied_by() from inline logic.
  • trace.rs: Add estimate_with_graph() — a new parallel estimator that uses the provenance graph with per-slot dominance pruning to skip combinations dominated by previously successful estimates. Add Trace::required_instruction_ids() helper. Add post_process flag to estimate_parallel() to control summary collection.
  • result.rs / lib.rs: Expose new types and re-exports.

Python (source/pip/)

  • _estimation.py: Add use_graph parameter to estimate() (default True). When enabled, populates the provenance graph and calls the graph-based estimator instead of the flat enumerator.
  • _isa_enumeration.py: Add populate() method to ISAQuery and its subclasses to fill the provenance graph without yielding ISA objects.
  • _instruction.py: Add InstructionSource utility.
  • qre.rs: Expose _estimate_with_graph, ProvenanceGraph bindings, and related Python-facing APIs.
  • _qre.pyi: Update type stubs.

Tests

  • Add tests verifying graph-based estimation produces Pareto-optimal results consistent with the exhaustive path.

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=False
can be used when completeness of the Pareto frontier is required.

@msoeken msoeken merged commit 317ff6a into feature/qre Mar 23, 2026
9 checks passed
@msoeken msoeken deleted the msoeken/estimate_with_graph branch March 23, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants