class_docstr: Tests for the expval function
class_docstr_tok: ["Tests","for","the","expval","function"]
docstr: Check that the hash of an expectation value of an observable can distinguish different observables.
docstr_tok: ["Check","that","the","hash","of","an","expectation","value","of","an","observable","can","distinguish","different","observables","."]
code: def test_standard_obs(self):
      """Check that the hash of an expectation value of an observable can distinguish different observables."""
  
      o1 = qml.prod(qml.PauliX(0), qml.PauliY(1))
      o2 = qml.prod(qml.PauliX(0), qml.PauliZ(1))
  
      assert qml.expval(o1).hash == qml.expval(o1).hash
      assert qml.expval(o2).hash == qml.expval(o2).hash
      assert qml.expval(o1).hash != qml.expval(o2).hash
  
      o3 = qml.sum(qml.PauliX("a"), qml.PauliY("b"))
      assert qml.expval(o1).hash != qml.expval(o3).hash
  
imports: import copy
  import numpy
  import pytest
  import pennylane
  from pennylane.measurements import Expectation, Shots
  from pennylane.measurements.expval import ExpectationMP
label_desc: Use image node_id 14 for calling the TestExpval obj's underlying member method code with example usage: obj.test_standard_obs() without return types