-
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
transforms.insert
: Update docs, improve decomposition
#5681
Conversation
Hello. You may have forgotten to update the changelog!
|
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.
Thanks @dwierichs!
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.
Looks like this will still be waiting on all the autoray issues, but still gets an approval from me :)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5681 +/- ##
==========================================
- Coverage 99.68% 99.67% -0.01%
==========================================
Files 414 414
Lines 38814 38527 -287
==========================================
- Hits 38691 38402 -289
- Misses 123 125 +2 ☔ View full report in Codecov by Sentry. |
**Context:** The first example in the docs of `qml.transforms.insert` was reported to not be working [here](https://discuss.pennylane.ai/t/qml-device-error-with-qiskit-aer/4556/9). Other examples also do not work. **Description of the Change:** This PR changes the docs examples to work. It also replicates the change in #5424 to use `devices.preprocess.decompose` instead of `tape.expand`, adding support for non-commuting measurements (which is unrelated to the transform anyways), and removing the need for a custom error to be raised. **Benefits:** Docs examples work. Non-commuting measurements support. **Possible Drawbacks:** Similar to #5424, this introduces cross-dependency to the devices module. **Related GitHub Issues:**
Context:
The first example in the docs of
qml.transforms.insert
was reported to not be working here.Other examples also do not work.
Description of the Change:
This PR changes the docs examples to work.
It also replicates the change in #5424 to use
devices.preprocess.decompose
instead oftape.expand
, adding support for non-commuting measurements (which is unrelated to the transform anyways), and removing the need for a custom error to be raised.Benefits:
Docs examples work.
Non-commuting measurements support.
Possible Drawbacks:
Similar to #5424, this introduces cross-dependency to the devices module.
Related GitHub Issues: