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 hessian of multiple measurements with multiple params return a tuple of arrays.
docstr_tok: ["The","hessian","of","multiple","measurements","with","multiple","params","return","a","tuple","of","arrays","."]
code: def test_jacobian_expval_expval_multiple_params(
      self, dev, diff_method, grad_on_execution, device_vjp, shots
  ):
      """The hessian of multiple measurements with 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"
          )
  
      par_0 = torch.tensor(0.1, requires_grad=True)
      par_1 = torch.tensor(0.2, requires_grad=True)
  
      @qnode(
          dev,
          interface="torch",
          diff_method=diff_method,
          max_diff=1,
          device_vjp=device_vjp,
          grad_on_execution=grad_on_execution,
      )
      def circuit(x, y):
          qml.RX(x, wires=[0])
          qml.RY(y, wires=[1])
          qml.CNOT(wires=[0, 1])
          return qml.expval(qml.PauliZ(0) @ qml.PauliX(1)), qml.expval(
              qml.PauliZ(0)
          )
  
      jac = jacobian(
          lambda a, b: circuit(a, b, shots=shots), (par_0, par_1)
      )
  
      assert isinstance(jac, tuple)
  
      assert isinstance(jac[0], tuple)
      assert len(jac[0]) == 2
      assert isinstance(jac[0][0], torch.Tensor)
      assert jac[0][0].shape == ()
      assert isinstance(jac[0][1], torch.Tensor)
      assert jac[0][1].shape == ()
  
      assert isinstance(jac[1], tuple)
      assert len(jac[1]) == 2
      assert isinstance(jac[1][0], torch.Tensor)
      assert jac[1][0].shape == ()
      assert isinstance(jac[1][1], torch.Tensor)
      assert jac[1][1].shape == ()
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import qnode
  from pennylane.devices import DefaultQubit
label_desc: Use image node_id 7 for calling the TestReturn obj's underlying member method code with example usage: obj.test_jacobian_expval_expval_multiple_params(dev, diff_method, grad_on_execution, device_vjp, shots) and returns: qml,  qml