class_docstr: Testing results when probabilities are returned. This only works with gradient transforms.
class_docstr_tok: ["Testing","results","when","probabilities","are","returned",".","This","only","works","with","gradient","transforms","."]
docstr: Test execute_and_compute_jvp with multiple parameters and multiple outputs
docstr_tok: ["Test","execute_and_compute_jvp","with","multiple","parameters","and","multiple","outputs"]
code: def test_execute_jvp_multi_params_multi_out(self, jpc):
      """Test execute_and_compute_jvp with multiple parameters and multiple outputs"""
      x = 0.62
      y = 2.64
      ops = [qml.RY(y, 0), qml.RX(x, 0)]
      measurements = [qml.probs(wires=0), qml.expval(qml.PauliZ(0))]
      tape1 = qml.tape.QuantumScript(ops, measurements)
  
      phi = 0.623
      ops2 = [qml.Hadamard(0), qml.IsingXX(phi, wires=(0, 1))]
      measurements2 = [
          qml.expval(qml.PauliZ(0)),
          qml.expval(qml.PauliZ(1)),
      ]
      tape2 = qml.tape.QuantumScript(ops2, measurements2)
  
      tangents = (1.5, 2.5)
      tangents2 = (0.6,)
      res, jvp = jpc.execute_and_compute_jvp(
          (tape1, tape2), (tangents, tangents2)
      )
  
      expected_res00 = 0.5 * np.array(
          [1 + np.cos(x) * np.cos(y), 1 - np.cos(x) * np.cos(y)]
      )
      assert qml.math.allclose(res[0][0], expected_res00)
  
      expected_res01 = np.cos(x) * np.cos(y)
      assert qml.math.allclose(res[0][1], expected_res01)
  
      assert qml.math.allclose(res[1][0], 0)
      assert qml.math.allclose(res[1][1], np.cos(phi))
  
      res0dx = 0.5 * np.array(
          [-np.sin(x) * np.cos(y), np.sin(x) * np.cos(y)]
      )
      res0dy = 0.5 * np.array(
          [-np.cos(x) * np.sin(y), np.cos(x) * np.sin(y)]
      )
      expected_jvp00 = 2.5 * res0dx + 1.5 * res0dy
      assert qml.math.allclose(expected_jvp00, jvp[0][0])
  
      expected_jvp01 = -2.5 * np.sin(x) * np.cos(y) - 1.5 * np.cos(
          x
      ) * np.sin(y)
      assert qml.math.allclose(expected_jvp01, jvp[0][1])
  
      assert qml.math.allclose(jvp[1][0], 0)
      assert qml.math.allclose(jvp[1][1], -0.6 * np.sin(phi))
  
imports: import pytest
  from cachetools import LRUCache
  from param_shift_dev import ParamShiftDerivativesDevice
  import numpy
  import pennylane
  from pennylane.workflow.jacobian_products import JacobianProductCalculator, TransformJacobianProducts, DeviceDerivatives, DeviceJacobianProducts, LightningVJPs
label_desc: Use image node_id 1 for calling the TestProbsTransformJacobians obj's underlying member method code with example usage: obj.test_execute_jvp_multi_params_multi_out(jpc) without return types