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: The jacobian of multiple measurements with a multiple params return a tuple of arrays.
docstr_tok: ["The","jacobian","of","multiple","measurements","with","a","multiple","params","return","a","tuple","of","arrays","."]
code: def test_jacobian_multiple_measurement_multiple_param(
      self,
      dev,
      diff_method,
      grad_on_execution,
      jacobian,
      device_vjp,
      shots,
      interface,
  ):
      """The jacobian of multiple measurements with a multiple params return 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"
          )
      if "lightning" in getattr(dev, "short_name", ""):
          pytest.xfail(
              "lightning device_vjp not compatible with jax.jacobian."
          )
      if diff_method == "adjoint" and jacobian == jax.jacfwd:
          pytest.skip("jacfwd doesn't like complex numbers")
  
      @qnode(
          dev,
          interface=interface,
          diff_method=diff_method,
          grad_on_execution=grad_on_execution,
          device_vjp=device_vjp,
      )
      def circuit(a, b):
          qml.RY(a, wires=0)
          qml.RX(b, wires=0)
          return qml.expval(qml.PauliZ(0)), qml.probs(wires=[0, 1])
  
      a = jax.numpy.array(0.1)
      b = jax.numpy.array(0.2)
  
      jac = jacobian(circuit, argnums=[0, 1])(a, b, shots=shots)
  
      assert isinstance(jac, tuple)
      assert len(jac) == 2
  
      assert isinstance(jac[0], tuple)
      assert len(jac[0]) == 2
      assert isinstance(jac[0][0], jax.numpy.ndarray)
      assert jac[0][0].shape == ()
      assert isinstance(jac[0][1], jax.numpy.ndarray)
      assert jac[0][1].shape == ()
  
      assert isinstance(jac[1], tuple)
      assert len(jac[1]) == 2
      assert isinstance(jac[1][0], jax.numpy.ndarray)
      assert jac[1][0].shape == (4,)
      assert isinstance(jac[1][1], jax.numpy.ndarray)
      assert jac[1][1].shape == (4,)
  
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 12 for calling the TestReturn obj's underlying member method code with example usage: obj.test_jacobian_multiple_measurement_multiple_param(dev, diff_method, grad_on_execution, jacobian, device_vjp, shots, interface) and returns: qml,  qml