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 that shadow expval measurements work as expected
docstr_tok: ["Test","that","shadow","expval","measurements","work","as","expected"]
code: def test_expval_shape_and_val(self):
      """Test that shadow expval measurements work as expected"""
      mp = qml.shadow_expval(qml.PauliX(0) @ qml.PauliX(1), seed=200)
      res = mp.process_state_with_shots(
          np.ones((2, 2)) / 2,
          qml.wires.Wires([0, 1]),
          shots=1000,
          rng=100,
      )
  
      assert res.shape == ()
      assert np.allclose(res, 1.0, atol=0.05)
  
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 5 for calling the TestProcessState obj's underlying member method code with example usage: obj.test_expval_shape_and_val() without return types