-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
transforms.insert
: Update docs, improve decomposition (#5681)
**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:**
- Loading branch information
Showing
3 changed files
with
36 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters