docstr: Tests that the CZ eigenvalue matches the numpy eigenvalues of the CZ matrix
docstr_tok: ["Tests","that","the","CZ","eigenvalue","matches","the","numpy","eigenvalues","of","the","CZ","matrix"]
code: def test_CZ_eigenval(self):
      """Tests that the CZ eigenvalue matches the numpy eigenvalues of the CZ matrix"""
      op = qml.CZ(wires=[0, 1])
      exp = np.linalg.eigvals(op.matrix())
      res = op.eigvals()
      assert np.allclose(res, exp)
  
imports: import copy
  import numpy
  import pytest
  from scipy.linalg import fractional_matrix_power
  from scipy.sparse import csr_matrix
  from scipy.stats import unitary_group
  from gate_data import CY, CZ
  import pennylane
  from pennylane.wires import Wires
  from pennylane.operation import AnyWires
  from pennylane.ops.qubit.matrix_ops import QubitUnitary
label_desc: Use image node_id 1 for calling the TestEigenval obj's underlying member method code with example usage: obj.test_CZ_eigenval() without return types