class_docstr: Unit tests for process_state_with_shots for the classical_shadow
  and shadow_expval measurements
class_docstr_tok: ["Unit","tests","for","process_state_with_shots","for","the","classical_shadow","and","shadow_expval","measurements"]
docstr: Test expval results when the rng is the same
docstr_tok: ["Test","expval","results","when","the","rng","is","the","same"]
code: def test_expval_same_rng(self):
      """Test expval results when the rng is the same"""
      state = np.ones((2, 2)) / 2
  
      mp1 = qml.shadow_expval(qml.PauliZ(0) @ qml.PauliZ(1), seed=123)
      mp2 = qml.shadow_expval(qml.PauliZ(0) @ qml.PauliZ(1), seed=123)
  
      res1 = mp1.process_state_with_shots(
          state, qml.wires.Wires([0, 1]), shots=1000, rng=100
      )
      res2 = mp2.process_state_with_shots(
          state, qml.wires.Wires([0, 1]), shots=1000, rng=200
      )
  
      # test results are different
      assert res1 != res2
  
      res1 = mp1.process_state_with_shots(
          state, qml.wires.Wires([0, 1]), shots=1000, rng=456
      )
      res2 = mp2.process_state_with_shots(
          state, qml.wires.Wires([0, 1]), shots=1000, rng=456
      )
  
      # now test that results are the same
      assert res1 == res2
  
imports: import copy
  import autograd.numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.measurements import ClassicalShadowMP, Shots
  from pennylane.measurements.classical_shadow import ShadowExpvalMP
label_desc: Use image node_id 7 for calling the TestProcessState obj's underlying member method code with example usage: obj.test_expval_same_rng() without return types