class_docstr: Test converters to_zx and from_zx.
docstr: Test operations that result in a non diagram like circuit.
docstr_tok: ["Test","operations","that","result","in","a","non","diagram","like","circuit","."]
code: def test_non_diagram_like_op(self, operation):
      """Test operations that result in a non diagram like circuit."""
  
      I = qml.math.eye(2 ** len(operation.wires))
  
      qs = QuantumScript([operation], [])
      matrix_qscript = qml.matrix(qs)
  
      zx_g = qml.transforms.to_zx(qs)
      assert isinstance(zx_g, pyzx.graph.graph_s.GraphS)
  
      matrix_zx = zx_g.to_matrix()
      # Check whether the two matrices are each others conjugate transposes
      mat_product = qml.math.dot(
          matrix_qscript, qml.math.conj(matrix_zx.T)
      )
      # Remove global phase
      mat_product /= mat_product[0, 0]
      assert qml.math.allclose(mat_product, I)
  
      with pytest.raises(
          qml.QuantumFunctionError,
          match="Graph doesn't seem circuit like",
      ):
          qml.transforms.from_zx(zx_g)
  
imports: import sys
  from functools import partial
  import numpy
  import pytest
  import pennylane
  from pennylane.tape import QuantumScript
  from pennylane.transforms.op_transforms import OperationTransformError
label_desc: Use image node_id 5 for calling the TestConvertersZX obj's underlying member method code with example usage: obj.test_non_diagram_like_op(operation) without return types