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 a multiple param array return a single array.
docstr_tok: ["The","hessian","of","multiple","measurements","with","a","multiple","param","array","return","a","single","array","."]
code: def test_hessian_var_multiple_param_array2(
      self, dev, diff_method, grad_on_execution, device_vjp
  ):
      """The hessian of multiple measurements with a multiple param array return a single array."""
      if diff_method == "adjoint":
          pytest.skip(
              "The adjoint method does not currently support second-order diff."
          )
      elif diff_method == "hadamard":
          pytest.skip("Hadamard gradient does not support variances.")
  
      params = qml.numpy.array([0.1, 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):
          qml.RX(x[0], wires=[0])
          qml.RY(x[1], wires=[1])
          qml.CNOT(wires=[0, 1])
          return qml.var(qml.PauliZ(0) @ qml.PauliX(1)), qml.probs(
              wires=[0]
          )
  
      def cost(x):
          return anp.hstack(circuit(x))
  
      hess = qml.jacobian(qml.jacobian(cost))(params)
  
      assert isinstance(hess, np.ndarray)
      assert hess.shape == (3, 2, 2)
  
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 17 for calling the TestReturn obj's underlying member method code with example usage: obj.test_hessian_var_multiple_param_array2(dev, diff_method, grad_on_execution, device_vjp) and returns: qml,  qml, anp