class_docstr: Class to test the shape of the Grad/Jacobian/Hessian with different return types.
class_docstr_tok: ["Class","to","test","the","shape","of","the","Grad\/Jacobian\/Hessian","with","different","return","types","."]
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_grad_single_measurement_multiple_param(
      self, dev_name, diff_method, grad_on_execution, shots, interface
  ):
      """For one measurement and multiple param, the gradient is a tuple of arrays."""
      if shots is not None and diff_method in ("backprop", "adjoint"):
          pytest.skip(
              "Test does not support finite shots and adjoint/backprop"
          )
  
      num_wires = 1
  
      if diff_method == "hadamard":
          num_wires = 2
  
      dev = qml.device(dev_name, wires=num_wires, shots=shots)
  
      @qnode(
          dev,
          interface=interface,
          diff_method=diff_method,
          grad_on_execution=grad_on_execution,
      )
      def circuit(a, b):
          qml.RY(a, wires=0)
          qml.RX(b, wires=0)
          return qml.expval(qml.PauliZ(0))
  
      a = jax.numpy.array(0.1)
      b = jax.numpy.array(0.2)
  
      grad = jax.grad(circuit, argnums=[0, 1])(a, b)
  
      assert isinstance(grad, tuple)
      assert len(grad) == 2
      assert grad[0].shape == ()
      assert grad[1].shape == ()
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane import qnode
  from pennylane.tape import QuantumScript
label_desc: Use image node_id 2 for calling the TestReturn obj's underlying member method code with example usage: obj.test_grad_single_measurement_multiple_param(dev_name, diff_method, grad_on_execution, shots, interface) and returns: qml