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_hessian_probs_expval_multiple_params(
      self, dev, diff_method, grad_on_execution, device_vjp
  ):
      """The hessian of multiple measurements with multiple params return a tuple of arrays."""
      if diff_method in ["adjoint", "hadamard"]:
          pytest.skip(
              "The adjoint method does not currently support second-order diff."
          )
  
      par_0 = qml.numpy.array(0.1, requires_grad=True)
      par_1 = qml.numpy.array(0.2, requires_grad=True)
  
      @qnode(
          dev,
          interface="autograd",
          diff_method=diff_method,
          max_diff=2,
          grad_on_execution=grad_on_execution,
          device_vjp=device_vjp,
      )
      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.probs(
              wires=[0]
          )
  
      def circuit_stack(x, y):
          return anp.hstack(circuit(x, y))
  
      def cost(x, y):
          return anp.hstack(qml.jacobian(circuit_stack)(x, y))
  
      hess = qml.jacobian(cost)(par_0, par_1)
  
      assert isinstance(hess, tuple)
      assert len(hess) == 2
  
      assert isinstance(hess[0], np.ndarray)
      assert hess[0].shape == (6,)
  
      assert isinstance(hess[1], np.ndarray)
      assert hess[1].shape == (6,)
  
imports: import autograd
  import autograd.numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane import qnode
  from pennylane.devices import DefaultQubit
label_desc: Use image node_id 14 for calling the TestReturn obj's underlying member method code with example usage: obj.test_hessian_probs_expval_multiple_params(dev, diff_method, grad_on_execution, device_vjp) and returns: qml,  qml, anp, anp