class_docstr: Test the THermitian observable
class_docstr_tok: ["Test","the","THermitian","observable"]
docstr: Tests that the compute_diagonalizing_gates method of the
  THermitian class returns the correct results.
docstr_tok: ["Tests","that","the","compute_diagonalizing_gates","method","of","the","THermitian","class","returns","the","correct","results","."]
code: def test_thermitian_compute_diagonalizing_gates(self, tol):
      """Tests that the compute_diagonalizing_gates method of the
      THermitian class returns the correct results."""
      eigvecs = np.array(
          [
              [0.38268343, -0.92387953, 0.70710678],
              [-0.92387953, -0.38268343, -0.70710678],
              [0.70710678, -0.38268343, 1.41421356],
          ]
      )
      res = qml.THermitian.compute_diagonalizing_gates(
          eigvecs, wires=[0]
      )[0].data
      expected = eigvecs.conj().T
      assert np.allclose(res, expected, 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 8 for calling the TestTHermitian obj's underlying member method code with example usage: obj.test_thermitian_compute_diagonalizing_gates(tol) without return types