class_docstr: Test the TensorFlow interface execute function
  integrates well for both forward and backward execution
class_docstr_tok: ["Test","the","TensorFlow","interface","execute","function","integrates","well","for","both","forward","and","backward","execution"]
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, execute_kwargs, tol):
      """Tests correct output shape and evaluation for a tape
      with prob and expval outputs"""
      if execute_kwargs["gradient_fn"] == "device":
          pytest.skip(
              "Adjoint differentiation does not yet support probabilities"
          )
  
      dev = qml.device("default.qubit.legacy", wires=2)
      x = tf.Variable(0.543, dtype=tf.float64)
      y = tf.Variable(-0.654, dtype=tf.float64)
  
      with tf.GradientTape() as t:
          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.probs(wires=[1])
  
          tape = qml.tape.QuantumScript.from_queue(q)
          res = execute([tape], dev, **execute_kwargs)[0]
          res = tf.experimental.numpy.hstack(res)
  
      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 = t.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 numpy
  import pytest
  import pennylane
  from pennylane.gradients import finite_diff, param_shift
  from pennylane import execute
label_desc: Use image node_id 12 for calling the TestTensorFlowExecuteIntegration obj's underlying member method code with example usage: obj.test_ragged_differentiation(execute_kwargs, tol) without return types