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 compute_vjp with multiple parameters and multiple outputs.
docstr_tok: ["Test","compute_vjp","with","multiple","parameters","and","multiple","outputs","."]
code: def test_vjp_multi_params_multi_out(self, jpc):
      """Test compute_vjp 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)
  
      dy = (np.array([0.25, 0.5]), 1.5)
      dy2 = (0.7, 0.8)
      vjps = jpc.compute_vjp((tape1, tape2), (dy, dy2))
  
      dy = (
          0.5 * 0.25 * np.cos(x) * -np.sin(y)
          + 0.5 * 0.5 * np.cos(x) * np.sin(y)
          + 1.5 * np.cos(x) * -np.sin(y)
      )
      assert qml.math.allclose(vjps[0][0], dy)
  
      dx = (
          0.5 * 0.25 * -np.sin(x) * np.cos(y)
          + 0.5 * 0.5 * np.sin(x) * np.cos(y)
          + 1.5 * -np.sin(x) * np.cos(y)
      )
      assert qml.math.allclose(vjps[0][1], dx)
  
      assert qml.math.allclose(vjps[1], -0.8 * 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 3 for calling the TestProbsTransformJacobians obj's underlying member method code with example usage: obj.test_vjp_multi_params_multi_out(jpc) without return types