-
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.
**Context:** `qml.TrotterProduct()` now has error tracking functionality, but ins't compatible with resource tracking. This bug fix adds native resource tracking functionality to allow for compatibility with both pipelines. ![image](https://github.com/PennyLaneAI/pennylane/assets/21964864/f815b1e5-bf5d-46a0-8539-840013c51d85) **Description of the Change:** Inherit from `ResourcesOperation` class as well and directly implement the resource method. **Benefits:** Allows for tracking resources without decomposing the template. **Possible Drawbacks:** If we change the target gate-set or want to decompose further, then this method is no longer accurate. **Related GitHub Issues:** Replicating most of this [PR](#5629) post release. --------- Co-authored-by: Utkarsh <utkarshazad98@gmail.com>
- Loading branch information
1 parent
2100476
commit 879c1e4
Showing
3 changed files
with
230 additions
and
3 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