-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
specs
can be requested at a specific stage of the transform program
#5781
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5781 +/- ##
==========================================
- Coverage 99.68% 99.67% -0.01%
==========================================
Files 421 421
Lines 40437 40139 -298
==========================================
- Hits 40309 40009 -300
- Misses 128 130 +2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Glad for this to finally be getting finished up!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, I can't wait to play around with this feature myself! I left a few small changes to be addressed.
Additionally, I found a bug! When passing in level = "device"
, we lose the error
key of the specs dictionary. This is because we compute the error on the decomposed tape, but the error is only defined for templates which get decomposed into fundamental gates. I can share an example of this with you offline and we can discuss how best to support it !
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Context:
Currently,
specs()
can only be requested after applying the full transform program, with the exception of the stages provided throughexpansion_strategy
.Description of the Change:
Using the new
level
argument fromconstruct_batch
, the function is adapted to make use of the argument as well, which allows for more flexible requests and ability to pinpoint when exactly to ask for specs. In addition, the function works with transforms that split the tape, returning a list of dictionaries each corresponding to one of the new tapes.Benefits:
More flexible resource estimation.
[sc-53736] Fixes #5706