class_docstr: 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_ragged_differentiation(
      self,
      decorator,
      interface,
      dev_name,
      diff_method,
      grad_on_execution,
      tol,
  ):
      """Tests correct output shape and evaluation for a tape
      with prob and expval outputs"""
      # pylint: disable=too-many-arguments
  
      dev = qml.device(dev_name, wires=2)
      x = tf.Variable(0.543, dtype=tf.float64)
      y = tf.Variable(-0.654, dtype=tf.float64)
  
      @decorator
      @qml.qnode(
          dev,
          diff_method=diff_method,
          grad_on_execution=grad_on_execution,
          interface=interface,
      )
      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])]
  
      with tf.GradientTape() as tape:
          res = tf.experimental.numpy.hstack(circuit(x, y))
  
      expected = np.array(
          [
              tf.cos(x),
              (1 + tf.cos(x) * tf.cos(y)) / 2,
              (1 - tf.cos(x) * tf.cos(y)) / 2,
          ]
      )
      assert np.allclose(res, expected, atol=tol, rtol=0)
  
      res = tape.jacobian(res, [x, y])
      expected = np.array(
          [
              [
                  -tf.sin(x),
                  -tf.sin(x) * tf.cos(y) / 2,
                  tf.cos(y) * tf.sin(x) / 2,
              ],
              [
                  0,
                  -tf.cos(x) * tf.sin(y) / 2,
                  tf.cos(x) * tf.sin(y) / 2,
              ],
          ]
      )
      assert np.allclose(res, expected, atol=tol, rtol=0)
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane import numpy
  from pennylane.devices.default_mixed import DefaultMixed
label_desc: Use image node_id 13 for calling the TestPassthruIntegration obj's underlying member method code with example usage: obj.test_ragged_differentiation(decorator, interface, dev_name, diff_method, grad_on_execution, tol) and returns: list