class_docstr: Test the shadow_expval measurement process forward pass
class_docstr_tok: ["Test","the","shadow_expval","measurement","process","forward","pass"]
docstr: Test that the expval estimation is correct for a maximally
  entangled state
docstr_tok: ["Test","that","the","expval","estimation","is","correct","for","a","maximally","entangled","state"]
code: def test_max_entangled_expval(
      self, k=1, obs=obs_max_entangled, expected=expected_max_entangled
  ):
      """Test that the expval estimation is correct for a maximally
      entangled state"""
      circuit = max_entangled_circuit(3, shots=100000)
      actual = circuit(obs, k=k)
  
      assert actual.shape == (len(obs_max_entangled),)
      assert actual.dtype == np.float64
      assert qml.math.allclose(actual, expected, atol=1e-1)
  
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 2 for calling the TestExpvalForward obj's underlying member method code with example usage: obj.test_max_entangled_expval(k, obs, expected) without return types