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)
      new_actual = circuit.tape.measurements[0].process(
          circuit.tape, circuit.device
      )
  
      assert actual.shape == (len(obs_max_entangled),)
      assert actual.dtype == np.float64
      assert qml.math.allclose(actual, expected, atol=1e-1)
      assert qml.math.allclose(new_actual, expected, atol=1e-1)
  
imports: import autograd.numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.measurements import Shots
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