class_docstr: Composite Operations use math.linalg.eig instead of math.linalg.eigh since the operators
  may not be hermitian.
class_docstr_tok: ["Composite","Operations","use","math.linalg.eig","instead","of","math.linalg.eigh","since","the","operators","may","not","be","hermitian","."]
docstr: Test that an arithmetic op with non-hermitian base ops produces the correct eigen-values.
docstr_tok: ["Test","that","an","arithmetic","op","with","non-hermitian","base","ops","produces","the","correct","eigen-values","."]
code: def test_composite_eigvals(self):
      """Test that an arithmetic op with non-hermitian base ops produces the correct eigen-values."""
      op = qml.prod(qml.PauliX(0), qml.adjoint(qml.PauliY(0)))
      op_adj = qml.adjoint(op)
      imag_op = -0.5j * (op - op_adj)
      op_eigvals = qml.eigvals(imag_op)
  
      mat_rep = np.array([[1.0, 0.0], [0.0, -1.0]])
      mat_eigvals = np.linalg.eig(mat_rep)[0]
  
      assert np.allclose(mat_eigvals, op_eigvals)
  
imports: from functools import reduce
  import pytest
  import scipy
  from gate_data import CNOT, H, I, S, X, Y, Z
  import pennylane
  from pennylane import numpy
  from pennylane.transforms.op_transforms import OperationTransformError
label_desc: Use image node_id 3 for calling the TestCompositeOperations obj's underlying member method code with example usage: obj.test_composite_eigvals() without return types