class_docstr: tests for qml.ops.ctrl_decomp_zyz
docstr: Test that an operator decomposition doesn't have trivial rotations.
docstr_tok: ["Test","that","an","operator","decomposition","does","n't","have","trivial","rotations","."]
code: def test_trivial_ops_in_decomposition(self):
      """Test that an operator decomposition doesn't have trivial rotations."""
      op = qml.RZ(np.pi, wires=0)
      decomp = ctrl_decomp_zyz(op, [1])
      expected = [
          qml.RZ(np.pi, wires=0),
          qml.MultiControlledX(wires=[1, 0]),
          qml.RZ(-np.pi / 2, wires=0),
          qml.MultiControlledX(wires=[1, 0]),
          qml.RZ(-np.pi / 2, wires=0),
      ]
  
      assert len(decomp) == 5
      assert all(qml.equal(o, e) for o, e in zip(decomp, expected))
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.ops import ctrl_decomp_zyz
  from pennylane.wires import Wires
  from pennylane.ops.op_math.controlled_decompositions import _ctrl_decomp_bisect_od, _ctrl_decomp_bisect_md, _ctrl_decomp_bisect_general, ctrl_decomp_bisect, _convert_to_su2, _bisect_compute_a, _bisect_compute_b
  from pennylane.ops.op_math.controlled import Controlled
  from pennylane import math
label_desc: Use image node_id 6 for calling the TestControlledDecompositionZYZ obj's underlying member method code with example usage: obj.test_trivial_ops_in_decomposition() without return types