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 results when the rng is the same
docstr_tok: ["Test","results","when","the","rng","is","the","same"]
code: def test_same_rng(self):
      """Test results when the rng is the same"""
      state = np.ones((2, 2)) / 2
  
      mp1 = qml.classical_shadow(wires=[0, 1], seed=123)
      mp2 = qml.classical_shadow(wires=[0, 1], seed=123)
  
      res1 = mp1.process_state_with_shots(
          state, qml.wires.Wires([0, 1]), shots=100
      )
      res2 = mp2.process_state_with_shots(
          state, qml.wires.Wires([0, 1]), shots=100
      )
  
      # test recipes are the same but bits are different
      assert np.all(res1[1] == res2[1])
      assert np.any(res1[0] != res2[0])
  
      res1 = mp1.process_state_with_shots(
          state, qml.wires.Wires([0, 1]), shots=100, rng=456
      )
      res2 = mp2.process_state_with_shots(
          state, qml.wires.Wires([0, 1]), shots=100, rng=456
      )
  
      # now test everything is the same
      assert np.all(res1[1] == res2[1])
      assert np.all(res1[0] == res2[0])
  
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 4 for calling the TestProcessState obj's underlying member method code with example usage: obj.test_same_rng() without return types