refactor: promote RZ / CRZ / SelectPauliRot phase gradient decomps to transforms/decompositions - #9928
refactor: promote RZ / CRZ / SelectPauliRot phase gradient decomps to transforms/decompositions#9928andrijapau wants to merge 22 commits into
RZ / CRZ / SelectPauliRot phase gradient decomps to transforms/decompositions#9928Conversation
…nnyLaneAI/pennylane into refactor/move-labs-phase-grad-decomps
RZ/CRZ/SelectPauliRot phase gradient decomps to transforms/decompositions
RZ/CRZ/SelectPauliRot phase gradient decomps to transforms/decompositionsRZ / CRZ / SelectPauliRot phase gradient decomps to transforms/decompositions
RZ / CRZ / SelectPauliRot phase gradient decomps to transforms/decompositionsRZ / CRZ / SelectPauliRot phase gradient decomps to transforms/decompositions
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9928 +/- ##
========================================
Coverage 99.46% 99.46%
========================================
Files 605 608 +3
Lines 67423 67552 +129
========================================
+ Hits 67059 67191 +132
+ Misses 364 361 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Had to add additional test coverage
dwierichs
left a comment
There was a problem hiding this comment.
Just some minor stuff :)
| @@ -226,17 +226,14 @@ def _resource_fn(num_wires, rot_axis): | |||
| match rot_axis: | |||
| case "X": | |||
| change_basis_rep_basis_adapted = change_op_basis_resource_rep( | |||
| qp.Hadamard, change_basis_rep, qp.Hadamard | |||
| qp.Hadamard, change_basis_rep, _adjoint_abstract(qp.Hadamard) | |||
There was a problem hiding this comment.
Sorry, yeah we no longer need this.
|
|
||
| # This should verify the decomp structure annd make sure that the resources match the | ||
| # decomposition, giving us enough coverage | ||
| _test_decomposition_rule(op, custom_decomp) |
There was a problem hiding this comment.
This does not change whether the basis change is the wrong way around, for example.
Might be worth to actually go for some numerical test? 🤔
Coverage is way better already with this PR, so it almost feels like a nit pick 😅
There was a problem hiding this comment.
Let me think of a better way.
Context:
These decompositions are used in OFC workflows and should therefore be CI tested during any migration.
Description of the Change:
Promote them out of
labs.Benefits: CI/CD tested.
Possible Drawbacks: None that I am aware of.
[sc-126092]