class_docstr: Test converters to_zx and from_zx.
docstr: Test the circuit mod 5 4.
docstr_tok: ["Test","the","circuit","mod","5","4","."]
code: def test_circuit_mod_5_4(self):
      """Test the circuit mod 5 4."""
      operations = [
          qml.PauliX(wires=4),
          qml.Hadamard(wires=4),
          qml.CNOT(wires=[3, 4]),
          qml.CNOT(wires=[0, 4]),
          qml.T(wires=4),
          qml.CNOT(wires=[3, 4]),
          qml.adjoint(qml.T)(wires=4),
          qml.CNOT(wires=[0, 4]),
          qml.CNOT(wires=[0, 3]),
          qml.adjoint(qml.T)(wires=3),
          qml.CNOT(wires=[0, 3]),
          qml.CNOT(wires=[3, 4]),
          qml.CNOT(wires=[2, 4]),
          qml.adjoint(qml.T)(wires=4),
          qml.CNOT(wires=[3, 4]),
          qml.T(wires=4),
          qml.CNOT(wires=[2, 4]),
          qml.CNOT(wires=[2, 3]),
          qml.T(wires=3),
          qml.CNOT(wires=[2, 3]),
          qml.Hadamard(wires=4),
          qml.CNOT(wires=[3, 4]),
          qml.Hadamard(wires=4),
          qml.CNOT(wires=[2, 4]),
          qml.adjoint(qml.T)(wires=4),
          qml.CNOT(wires=[1, 4]),
          qml.T(wires=4),
          qml.CNOT(wires=[2, 4]),
          qml.adjoint(qml.T)(wires=4),
          qml.CNOT(wires=[1, 4]),
          qml.T(wires=4),
          qml.CNOT(wires=[1, 2]),
          qml.adjoint(qml.T)(wires=2),
          qml.CNOT(wires=[1, 2]),
          qml.Hadamard(wires=4),
          qml.CNOT(wires=[2, 4]),
          qml.Hadamard(wires=4),
          qml.CNOT(wires=[1, 4]),
          qml.T(wires=4),
          qml.CNOT(wires=[0, 4]),
          qml.adjoint(qml.T)(wires=4),
          qml.CNOT(wires=[1, 4]),
          qml.T(wires=4),
          qml.CNOT(wires=[0, 4]),
          qml.adjoint(qml.T)(wires=4),
          qml.CNOT(wires=[0, 1]),
          qml.T(wires=1),
          qml.CNOT(wires=[0, 1]),
          qml.Hadamard(wires=4),
          qml.CNOT(wires=[1, 4]),
          qml.CNOT(wires=[0, 4]),
      ]
  
      qs = QuantumScript(operations, [])
      zx_g = qml.transforms.to_zx(qs)
  
      assert isinstance(zx_g, pyzx.graph.graph_s.GraphS)
  
      matrix_qscript = qml.matrix(qs)
      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]
      I = qml.math.eye(2**5)
      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 7 for calling the TestConvertersZX obj's underlying member method code with example usage: obj.test_circuit_mod_5_4() without return types