class_docstr: tests for qml.ops._ctrl_decomp_bisect_od
docstr: Tests that an error is raised when an invalid operation is passed
docstr_tok: ["Tests","that","an","error","is","raised","when","an","invalid","operation","is","passed"]
code: def test_invalid_op_error(self):
      """Tests that an error is raised when an invalid operation is passed"""
      with pytest.raises(
          ValueError, match="Target operation's matrix must have real"
      ):
          _ = _ctrl_decomp_bisect_od(
              _convert_to_su2(qml.Hadamard.compute_matrix()), 0, [1, 2]
          )
  
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 1 for calling the TestControlledBisectOD obj's underlying member method code with example usage: obj.test_invalid_op_error() without return types