class_docstr: Tests for the integration of shots with the autograd interface.
class_docstr_tok: ["Tests","for","the","integration","of","shots","with","the","autograd","interface","."]
docstr: Tests correct output shape and evaluation for a tape
  with a single expval output
docstr_tok: ["Tests","correct","output","shape","and","evaluation","for","a","tape","with","a","single","expval","output"]
code: def test_single_expectation_value(
      self, dev_name, diff_method, gradient_kwargs, shots, num_copies
  ):
      """Tests correct output shape and evaluation for a tape
      with a single expval output"""
      np.random.seed(42)
      dev = qml.device(dev_name, wires=2, shots=shots)
      x = np.array(0.543)
      y = np.array(-0.654)
  
      @qnode(dev, diff_method=diff_method, **gradient_kwargs)
      def circuit(x, y):
          qml.RX(x, wires=[0])
          qml.RY(y, wires=[1])
          qml.CNOT(wires=[0, 1])
          return qml.expval(qml.PauliZ(0) @ qml.PauliX(1))
  
      def cost(x, y):
          res = circuit(x, y)
          return qml.math.stack(res)
  
      all_res = qml.jacobian(cost, argnum=[0, 1])(x, y)
  
      assert isinstance(all_res, tuple)
      assert len(all_res) == 2
  
      expected = np.array(
          [-np.sin(y) * np.sin(x), np.cos(y) * np.cos(x)]
      )
      tol = TOLS[diff_method]
  
      for res, exp in zip(all_res, expected):
          assert isinstance(res, np.ndarray)
          assert res.shape == (num_copies,)
          assert np.allclose(res, exp, atol=tol, rtol=0)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane import qnode
label_desc: Use image node_id 1 for calling the TestReturnShotVectorIntegration obj's underlying member method code with example usage: obj.test_single_expectation_value(dev_name, diff_method, gradient_kwargs, shots, num_copies) and returns: qml, qml