class_docstr: Tests for integration with the PassthruQNode
class_docstr_tok: ["Tests","for","integration","with","the","PassthruQNode"]
docstr: Tests correct output shape and evaluation for a tape
  with prob and expval outputs
docstr_tok: ["Tests","correct","output","shape","and","evaluation","for","a","tape","with","prob","and","expval","outputs"]
code: def test_multiple_measurements_differentiation(
      self, dev_name, diff_method, mode, tol
  ):
      """Tests correct output shape and evaluation for a tape
      with prob and expval outputs"""
      dev = qml.device(dev_name, wires=2)
      x = np.array(0.543, requires_grad=True)
      y = np.array(-0.654, requires_grad=True)
  
      @qml.qnode(
          dev,
          diff_method=diff_method,
          interface="autograd",
          grad_on_execution=mode,
      )
      def circuit(x, y):
          qml.RX(x, wires=[0])
          qml.RY(y, wires=[1])
          qml.CNOT(wires=[0, 1])
          return qml.expval(qml.PauliZ(0)), qml.probs(wires=[1])
  
      res = circuit(x, y)
  
      expected = np.array(
          [
              np.cos(x),
              (1 + np.cos(x) * np.cos(y)) / 2,
              (1 - np.cos(x) * np.cos(y)) / 2,
          ]
      )
      assert np.allclose(
          qml.math.hstack(res), expected, atol=tol, rtol=0
      )
  
      def cost(x, y):
          return qml.math.hstack(circuit(x, y))
  
      res = qml.jacobian(cost)(x, y)
      assert isinstance(res, tuple) and len(res) == 2
      assert res[0].shape == (3,)
      assert res[1].shape == (3,)
  
      expected = (
          np.array(
              [
                  -np.sin(x),
                  -np.sin(x) * np.cos(y) / 2,
                  np.sin(x) * np.cos(y) / 2,
              ]
          ),
          np.array(
              [0, -np.cos(x) * np.sin(y) / 2, np.cos(x) * np.sin(y) / 2]
          ),
      )
      assert np.allclose(res[0], expected[0], atol=tol, rtol=0)
      assert np.allclose(res[1], expected[1], atol=tol, rtol=0)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.devices.default_mixed import DefaultMixed
  from pennylane import DeviceError
label_desc: Use image node_id 12 for calling the TestPassthruIntegration obj's underlying member method code with example usage: obj.test_multiple_measurements_differentiation(dev_name, diff_method, mode, tol) and returns: qml,  qml, qml