class_docstr: Tests for the vjp function
class_docstr_tok: ["Tests","for","the","vjp","function"]
docstr: Tests correct output shape and evaluation for a tape
  with multiple expval outputs
docstr_tok: ["Tests","correct","output","shape","and","evaluation","for","a","tape","with","multiple","expval","outputs"]
code: def test_multiple_expectation_values(self, tol):
      """Tests correct output shape and evaluation for a tape
      with multiple expval outputs"""
      dev = qml.device("default.qubit", wires=2)
      x = 0.543
      y = -0.654
  
      with qml.queuing.AnnotatedQueue() as q:
          qml.RX(x, wires=[0])
          qml.RY(y, wires=[1])
          qml.CNOT(wires=[0, 1])
          qml.expval(qml.PauliZ(0))
          qml.expval(qml.PauliX(1))
  
      tape = qml.tape.QuantumScript.from_queue(q)
      tape.trainable_params = {0, 1}
      dy = np.array([1.0, 2.0])
  
      tapes, fn = qml.gradients.vjp(tape, dy, param_shift)
      assert len(tapes) == 4
  
      res = fn(dev.execute(tapes))
      assert res.shape == (2,)
  
      exp = np.array([-np.sin(x), 2 * np.cos(y)])
      assert np.allclose(res, exp, atol=tol, rtol=0)
  
imports: from functools import partial
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.gradients import param_shift
label_desc: Use image node_id 4 for calling the TestVJP obj's underlying member method code with example usage: obj.test_multiple_expectation_values(tol) without return types