class_docstr: Test the THermitian observable
class_docstr_tok: ["Test","the","THermitian","observable"]
docstr: Tests that the eigendecomposition property of the THermitian class returns the correct results
  for a single wire.
docstr_tok: ["Tests","that","the","eigendecomposition","property","of","the","THermitian","class","returns","the","correct","results","for","a","single","wire","."]
code: def test_thermitian_eigegendecomposition_single_wire(
      self, observable, eigvals, eigvecs, tol
  ):
      """Tests that the eigendecomposition property of the THermitian class returns the correct results
      for a single wire."""
  
      eigendecomp = qml.THermitian(
          observable, wires=0
      ).eigendecomposition
      assert np.allclose(
          eigendecomp["eigval"], eigvals, atol=tol, rtol=0
      )
      assert np.allclose(
          eigendecomp["eigvec"], eigvecs, atol=tol, rtol=0
      )
  
      key = tuple(observable.flatten().tolist())
      assert np.allclose(
          qml.THermitian._eigs[key]["eigval"], eigvals, atol=tol, rtol=0
      )
      assert np.allclose(
          qml.THermitian._eigs[key]["eigvec"], eigvecs, atol=tol, rtol=0
      )
  
imports: import functools
  from unittest.mock import PropertyMock, patch
  import pytest
  import numpy
  from gate_data import GELL_MANN
  import pennylane
label_desc: Use image node_id 3 for calling the TestTHermitian obj's underlying member method code with example usage: obj.test_thermitian_eigegendecomposition_single_wire(observable, eigvals, eigvecs, tol) without return types