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 one param, the gradient is a float.
docstr_tok: ["For","one","measurement","and","one","param",",","the","gradient","is","a","float","."]
code: def test_grad_single_measurement_param(
      self,
      dev,
      diff_method,
      grad_on_execution,
      device_vjp,
      shots,
      interface,
  ):
      """For one measurement and one param, the gradient is a float."""
      if shots is not None and diff_method in ("backprop", "adjoint"):
          pytest.skip(
              "Test does not support finite shots and adjoint/backprop"
          )
  
      @qnode(
          dev,
          interface=interface,
          diff_method=diff_method,
          grad_on_execution=grad_on_execution,
          device_vjp=device_vjp,
      )
      def circuit(a):
          qml.RY(a, wires=0)
          qml.RX(0.2, wires=0)
          return qml.expval(qml.PauliZ(0))
  
      a = jax.numpy.array(0.1)
  
      grad = jax.grad(circuit)(a, shots=shots)
  
      assert isinstance(grad, jax.numpy.ndarray)
      assert grad.shape == ()
  
imports: from itertools import product
  import numpy
  import pytest
  import pennylane
  from pennylane import qnode
  from pennylane.devices import DefaultQubit
label_desc: Use image node_id 1 for calling the TestReturn obj's underlying member method code with example usage: obj.test_grad_single_measurement_param(dev, diff_method, grad_on_execution, device_vjp, shots, interface) and returns: qml