Skip to content

Commit

Permalink
Remove test that checked that multi-controlled global-phase decomposi…
Browse files Browse the repository at this point in the history
…tion raises a warning (#1522)

**Context:** A decomposition for multi-controlled global phases was
recently added in PennyLane: PennyLaneAI/pennylane#6936. Catalyst
contained a test `test_global_phase_decomp_raises_warning` that checked
that such decompositions raise a warning. This test is therefore no
longer needed and can be removed.

**Description of the Change:** Removes the test
`test_global_phase_decomp_raises_warning`.

**Benefits:** This test is currently failing with PennyLane `latest`.
Removing it will fix the pytest failure.
  • Loading branch information
joeycarter authored Feb 14, 2025
1 parent dd4a4e5 commit 2636b05
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions frontend/test/pytest/test_quantum_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -1666,14 +1666,6 @@ def test_decomposition_undefined(self):
with pytest.raises(DecompositionUndefinedError):
op.decomposition()

def test_global_phase_decomp_raises_warning(self):
"""Test that ctrl(GlobalPhase).decomposition() raises a warning."""
op = qml.ctrl(qml.GlobalPhase(1.23), control=[0, 1])
with pytest.warns(
UserWarning, match="Multi-Controlled-GlobalPhase currently decomposes to nothing"
):
assert op.decomposition() == []

def test_control_on_zero(self):
"""Test decomposition applies PauliX gates to flip any control-on-zero wires."""

Expand Down

0 comments on commit 2636b05

Please sign in to comment.