class_docstr: Class to test the shape of the Jacobian/Hessian with different return types and shot vectors.
class_docstr_tok: ["Class","to","test","the","shape","of","the","Jacobian\/Hessian","with","different","return","types","and","shot","vectors","."]
docstr: For one measurement and one param, the gradient is a float.
docstr_tok: ["For","one","measurement","and","one","param",",","the","gradient","is","a","float","."]
code: def test_jac_single_measurement_param(
      self, dev_name, diff_method, gradient_kwargs, shots, num_copies
  ):
      """For one measurement and one param, the gradient is a float."""
      dev = qml.device(dev_name, wires=1, shots=shots)
  
      @qnode(dev, diff_method=diff_method, **gradient_kwargs)
      def circuit(a):
          qml.RY(a, wires=0)
          qml.RX(0.2, wires=0)
          return qml.expval(qml.PauliZ(0))
  
      a = np.array(0.1)
  
      def cost(a):
          return qml.math.stack(circuit(a))
  
      jac = qml.jacobian(cost)(a)
  
      assert isinstance(jac, np.ndarray)
      assert jac.shape == (num_copies,)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane import qnode
label_desc: Use image node_id 1 for calling the TestReturnWithShotVectors obj's underlying member method code with example usage: obj.test_jac_single_measurement_param(dev_name, diff_method, gradient_kwargs, shots, num_copies) and returns: qml, qml