Skip to content

Conversation

@astralcai
Copy link
Contributor

@astralcai astralcai commented Apr 1, 2025

Context:

For the new decomposition system, we want an interpreter that does a first pass analysis of the circuit and collect all operator types (CompressedResourceOp) that potentially need to be decomposed. It is essentially the same as CollectOpsandMeas, except that it:

  • Explores every branch of a cond_prim because operators in all branches may need to be decomposed.
  • Returns a set of CompressedResourceOp rather than a list of Operator.

Description of the Change:

Benefits:

Possible Drawbacks:

Related GitHub Issues:

[sc-87632]

@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2025

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.
@PietropaoloFrisoni PietropaoloFrisoni added this to the v0.41 milestone Apr 1, 2025
@codecov
Copy link

codecov bot commented Apr 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.64%. Comparing base (c6fb5ed) to head (392c1fd).
Report is 346 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7184   +/-   ##
=======================================
  Coverage   99.64%   99.64%           
=======================================
  Files         510      511    +1     
  Lines       49714    49770   +56     
=======================================
+ Hits        49538    49594   +56     
  Misses        176      176           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Copy link
Contributor

@JerryChen97 JerryChen97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the great work! The current implementation is in excellent shape, with clear structure and strong maintainability. Given the complexity of the new decomposition system, we won’t identify every potential issue at this stage. We’ll discover and address the next steps as we gain more practical experience with it.

Copy link
Contributor

@mudit2812 mudit2812 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation looks great! Just left some comments about testing.

@astralcai astralcai requested a review from mudit2812 April 3, 2025 13:28
@astralcai astralcai enabled auto-merge April 3, 2025 17:53
@astralcai astralcai added this pull request to the merge queue Apr 3, 2025
Merged via the queue into master with commit a77a148 Apr 3, 2025
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants