class_docstr: Test converters to_zx and from_zx.
docstr: Test to convert the script to a ZX graph and back for supported operations with parameters.
docstr_tok: ["Test","to","convert","the","script","to","a","ZX","graph","and","back","for","supported","operations","with","parameters","."]
code: def test_supported_operation_params(self, operation, script):
      """Test to convert the script to a ZX graph and back for supported operations with parameters."""
  
      if script:
          qs = QuantumScript([operation])
      else:
          qs = operation
  
      I = qml.math.eye(2 ** len(operation.wires))
  
      matrix_qscript = qml.matrix(qs)
  
      zx_g = qml.transforms.to_zx(qs)
  
      matrix_zx = zx_g.to_matrix()
  
      assert isinstance(zx_g, pyzx.graph.graph_s.GraphS)
      # 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)
  
      qscript_back = qml.transforms.from_zx(zx_g)
      assert isinstance(qscript_back, qml.tape.QuantumScript)
  
      matrix_qscript_back = qml.matrix(
          qscript_back, wire_order=list(range(len(qs.wires)))
      )
  
      # Check whether the two matrices are each others conjugate transposes
      mat_product = qml.math.dot(
          matrix_qscript, qml.math.conj(matrix_qscript_back.T)
      )
      # Remove global phase
      mat_product /= mat_product[0, 0]
  
      assert qml.math.allclose(mat_product, I)
  
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 3 for calling the TestConvertersZX obj's underlying member method code with example usage: obj.test_supported_operation_params(operation, script) without return types