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 multiple param, the gradient is a tuple of arrays.
docstr_tok: ["For","one","measurement","and","multiple","param",",","the","gradient","is","a","tuple","of","arrays","."]
code: def test_jac_single_measurement_multiple_param(
      self, dev_name, diff_method, gradient_kwargs, shots, num_copies
  ):
      """For one measurement and multiple param, the gradient is a tuple of arrays."""
      dev = qml.device(dev_name, wires=1, shots=shots)
  
      @qnode(dev, diff_method=diff_method, **gradient_kwargs)
      def circuit(a, b):
          qml.RY(a, wires=0)
          qml.RX(b, wires=0)
          return qml.expval(qml.PauliZ(0))
  
      a = np.array(0.1)
      b = np.array(0.2)
  
      def cost(a, b):
          return qml.math.stack(circuit(a, b))
  
      jac = qml.jacobian(cost, argnum=[0, 1])(a, b)
  
      assert isinstance(jac, tuple)
      assert len(jac) == 2
      for j in jac:
          assert isinstance(j, np.ndarray)
          assert j.shape == (num_copies,)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane import qnode
label_desc: Use image node_id 2 for calling the TestReturnWithShotVectors obj's underlying member method code with example usage: obj.test_jac_single_measurement_multiple_param(dev_name, diff_method, gradient_kwargs, shots, num_copies) and returns: qml, qml