Repository: PennyLaneAI/pennylane
Pull request #7791 (2025-07-04 18:50:14)

Fix missing `method` change in changelog
**Context:** Missed a change in the changelog.

**Description of the Change:** `method="gridsynth"` in the changelog example. 

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**


codecov[bot]: ## [Codecov](https://app.codecov.io/gh/PennyLaneAI/pennylane/pull/7791?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 99.68%. Comparing base [(`fe1c27d`)](https://app.codecov.io/gh/PennyLaneAI/pennylane/commit/fe1c27d2a998dc64031ab1dee64a874b016c3fc6?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI) to head [(`cdb829c`)](https://app.codecov.io/gh/PennyLaneAI/pennylane/commit/cdb829c1d0c415295bb4bb0f3c83ab63b083b3f8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI).
> Report is 2 commits behind head on master.

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##           master    #7791   +/-   ##
=======================================
  Coverage   99.68%   99.68%           
=======================================
  Files         543      543           
  Lines       55208    55208           
=======================================
  Hits        55034    55034           
  Misses        174      174           
```

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/PennyLaneAI/pennylane/pull/7791?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>

Patch:
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md
index ea71d08f0..baeeeeada 100644
--- a/doc/releases/changelog-dev.md
+++ b/doc/releases/changelog-dev.md
@@ -221,6 +221,7 @@
   [(#7611)](https://github.com/PennyLaneAI/pennylane/pull/7611)
   [(#7711)](https://github.com/PennyLaneAI/pennylane/pull/7711)
   [(#7770)](https://github.com/PennyLaneAI/pennylane/pull/7770)
+  [(#7791)](https://github.com/PennyLaneAI/pennylane/pull/7791)
 
   The Ross-Selinger algorithm can drastically outperform the Solovay-Kitaev algorithm in many cases.
   Consider this simple circuit:
@@ -235,7 +236,7 @@
 
       return qml.expval(qml.Z(0))
 
-  rs_circuit = qml.clifford_t_decomposition(circuit, method="rs")
+  rs_circuit = qml.clifford_t_decomposition(circuit, method="gridsynth")
   sk_circuit = qml.clifford_t_decomposition(circuit, method="sk")
 
   x, y = 0.12, 0.34
diff --git a/pennylane/ops/op_math/decompositions/rings.py b/pennylane/ops/op_math/decompositions/rings.py
index a1767685f..58677c6e0 100644
--- a/pennylane/ops/op_math/decompositions/rings.py
+++ b/pennylane/ops/op_math/decompositions/rings.py
@@ -241,8 +241,10 @@ class ZOmega:
     def __sub__(self, other):
         return self + (-other)
 
+    def __rsub__(self, other):
+        return other + (-self)
+
     __radd__ = __add__
-    __rsub__ = __sub__
     __rmul__ = __mul__
 
     def __neg__(self: ZOmega) -> ZOmega:


Test patch:
diff --git a/tests/ops/op_math/decompositions/test_rings.py b/tests/ops/op_math/decompositions/test_rings.py
index 050ee5b67..5e0f990a2 100644
--- a/tests/ops/op_math/decompositions/test_rings.py
+++ b/tests/ops/op_math/decompositions/test_rings.py
@@ -138,6 +138,7 @@ class TestZOmega:
         assert z1.parity() == 0 and z2.parity() == 0  # Both z1 and z2 have even parity
         assert z2.norm() == abs(complex(z2)) * abs(complex(z2.conj()))
         assert (z1 - ZOmega(a=2, b=2, c=2)).to_sqrt_two() == ZSqrtTwo(a=4, b=1)
+        assert 1 - ZOmega() == ZOmega(d=1)
 
     def test_arithmetic_errors(self):
         """Test that arithmetic operations raise errors for invalid types."""