-
Notifications
You must be signed in to change notification settings - Fork 714
Standardize the output format of qml.specs
#8713
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
base: master
Are you sure you want to change the base?
Conversation
|
Hello. You may have forgotten to update the changelog!
|
| tape_resources.gate_sizes, | ||
| tape_resources.depth, | ||
| Shots(shots_from_dev), | ||
| resources = SpecsResources( # temporary until shots get updated on tape ! |
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.
| resources = SpecsResources( # temporary until shots get updated on tape ! | |
| resources = SpecsResources( |
Should I remove this comment? It seems to have been left here for a very long time
| """A special dictionary for storing the specs of a circuit. Used to customize ``KeyError`` messages.""" | ||
|
|
||
| def __getitem__(self, __k): | ||
| if __k == "num_diagonalizing_gates": |
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.
I removed the warning associated with this since this specific field since it was removed back in March (several releases ago).
Context:
qml.specsmakes very few guarantees on the shape of its output. This PR aims to make a single unified out type forqml.specs, which contains all of (and only) the information needed for circuit inspection.Description of the Change:
SpecsResourcesandSpecsResultclassesspecsfunctions throughout PennyLane to make use of the new classesBenefits:
Cleaner and more consistent
specsreturns.Possible Drawbacks:
Introduces another "resources" object into PennyLane. A followup PR should restructure these PRs such that all of them inherit from a common base class.
Related GitHub Issues:
[sc-104965]