class_docstr: Test the construction of composite ops.
class_docstr_tok: ["Test","the","construction","of","composite","ops","."]
docstr: Test that the eigendecomposition is stored in cache.
docstr_tok: ["Test","that","the","eigendecomposition","is","stored","in","cache","."]
code: def test_eigen_caching(self):
      """Test that the eigendecomposition is stored in cache."""
      diag_op = ValidOp(*self.simple_operands)
      eig_decomp = diag_op.eigendecomposition
  
      eig_vecs = eig_decomp["eigvec"]
      eig_vals = eig_decomp["eigval"]
  
      eigs_cache = diag_op._eigs[diag_op.hash]
      cached_vecs = eigs_cache["eigvec"]
      cached_vals = eigs_cache["eigval"]
  
      assert np.allclose(eig_vals, cached_vals)
      assert np.allclose(eig_vecs, cached_vecs)
  
imports: from copy import copy
  import numpy
  import pytest
  import pennylane
  from pennylane.operation import DecompositionUndefinedError
  from pennylane.ops.op_math import CompositeOp, Prod, Sum, SProd
  from pennylane.wires import Wires
label_desc: Use image node_id 16 for calling the TestConstruction obj's underlying member method code with example usage: obj.test_eigen_caching() without return types