Repository navigation
Name all decomp rules - #10492
Name all decomp rules#10492comp-phys-marc wants to merge 76 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10492 +/- ##
=======================================
Coverage 99.38% 99.39%
=======================================
Files 613 613
Lines 67668 67686 +18
=======================================
+ Hits 67255 67274 +19
+ Misses 413 412 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…o chore/names_on_decomp_rules
|
🤖
|
|
@comp-phys-marc , mind fixing up CI before I take a look? 🙏🏼 |
You mean just the pylint and sphinx? |
|
|
||
| @register_resources(_multi_rz_decomposition_resources) | ||
| def _multi_rz_decomposition(theta: TensorLike, wires: WiresLike): | ||
| @register_name("standard") |
There was a problem hiding this comment.
Idk if standard is a good name. It seems pretty subjective. Can we instead just say to_rz_cnot_ladder or something?
There are a few places this was done, not just this operator.
There was a problem hiding this comment.
Select seems to be showing the private function names?
https://xanaduai-pennylane--10492.com.readthedocs.build/en/10492/code/api/pennylane.Select.html
There was a problem hiding this comment.
Good catch, thanks
|
Just for the sake of communication: in offline discussion with @andrijapau and @isaacdevlugt we have landed on neither the |
…o chore/names_on_decomp_rules
andrijapau
left a comment
There was a problem hiding this comment.
Happy to approve. Thanks for the hard work 🚀 💪🏼
Let's make sure we get an approval from product.
Co-authored-by: Andrija Paurevic <46359773+andrijapau@users.noreply.github.com>
isaacdevlugt
left a comment
There was a problem hiding this comment.
Nice! Looks amazing 😁. A few comments.
Q: Any way we can make key errors list the available names when providing an incorrect name to, e.g., list_decomps, inspect_decomps and fixed_decomps?
Claude findings:
- the subcircuit rule name regressed to MyOpdecomp. pennylane/ops/functions/subcircuit.py:55 changed qfunc.name + "_decomp" to qfunc.name + "decomp". That looks like an automated find-and-replace. The changelog example and the docstring were updated to show MyOpdecomp rather than flagging it. It should probably stay MyOp_decomp, or use a strategy-style name like body.
Fixed the bug that Claude found dff9317 |
We now list the available names db0e25f |
…o chore/names_on_decomp_rules
…o chore/names_on_decomp_rules


Context: We would like to provide names for all decomposition rules that are user-friendly.
Description of the Change: Provides names for all decomp rules. Standardizes everything to the following format.
<strategy>to_cnot_<operator>_<strategy>_swap_to_cnot_<operator>_<strategy>_resources_swap_to_cnot_resources_<operator>_<strategy>_work_wiresBenefits: Better UI, we always have a name to go in the decomp rule tables in the docs.
Possible Drawbacks: Large automated change.
Related GitHub Issues: [sc-135010]
Assisted by Codex.