class_docstr: Class to test the shape of the Hessian with different return types and shot vectors.
class_docstr_tok: ["Class","to","test","the","shape","of","the","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_var_multiple_param_array(
      self, dev_name, diff_method, gradient_kwargs, shots, num_copies
  ):
      """The hessian of single measurement with a multiple params array return a single array."""
      dev = qml.device(dev_name, wires=2, shots=shots)
  
      params = np.array([0.1, 0.2])
  
      @qnode(
          dev, 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.var(qml.PauliZ(0) @ qml.PauliX(1))
  
      def cost(x):
          def cost2(x):
              res = circuit(x)
              return qml.math.stack(res)
  
          return qml.jacobian(cost2)(x)
  
      hess = qml.jacobian(cost)(params)
  
      assert isinstance(hess, np.ndarray)
      assert hess.shape == (num_copies, 2, 2)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane import qnode
label_desc: Use image node_id 4 for calling the TestReturnShotVectorHessian obj's underlying member method code with example usage: obj.test_hessian_var_multiple_param_array(dev_name, diff_method, gradient_kwargs, shots, num_copies) and returns: qml, qml, qml