class_docstr: Class to test the shape of the Grad/Jacobian/Hessian with different return types and shot vectors.
class_docstr_tok: ["Class","to","test","the","shape","of","the","Grad\/Jacobian\/Hessian","with","different","return","types","and","shot","vectors","."]
docstr: The hessian of single measurement with a multiple params array return a single array.
docstr_tok: ["The","hessian","of","single","measurement","with","a","multiple","params","array","return","a","single","array","."]
code: def test_hessian_expval_multiple_param_array(
      self, dev_name, diff_method, gradient_kwargs, shots, interface
  ):
      """The hessian of single measurement with a multiple params array return a single array."""
      dev = qml.device(dev_name, wires=2, shots=shots)
  
      params = jax.numpy.array([0.1, 0.2])
  
      @qnode(
          dev,
          interface=interface,
          diff_method=diff_method,
          max_diff=2,
          **gradient_kwargs,
      )
      def circuit(x):
          qml.RX(x[0], wires=[0])
          qml.RY(x[1], wires=[1])
          qml.CNOT(wires=[0, 1])
          return qml.expval(qml.PauliZ(0) @ qml.PauliX(1))
  
      hess = jax.hessian(circuit)(params)
  
      num_copies = sum(
          [1 for x in shots if isinstance(x, int)]
          + [x[1] for x in shots if isinstance(x, tuple)]
      )
      assert len(hess) == num_copies
      for h in hess:
          assert isinstance(h, jax.numpy.ndarray)
          assert h.shape == (2, 2)
  
imports: import pytest
  from flaky import flaky
  import pennylane
  from pennylane import numpy
  from pennylane import qnode
label_desc: Use image node_id 15 for calling the TestReturnWithShotVectors obj's underlying member method code with example usage: obj.test_hessian_expval_multiple_param_array(dev_name, diff_method, gradient_kwargs, shots, interface) and returns: qml