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, device, shots):
      """Tests correct output shape and evaluation for a tape
      with prob and expval outputs"""
  
      def cost(x, y):
          ops = [qml.RX(x, wires=0), qml.RY(y, 1), qml.CNOT((0, 1))]
          m = [qml.expval(qml.PauliZ(0)), qml.probs(wires=1)]
          tape = qml.tape.QuantumScript(ops, m)
          return qml.math.hstack(
              execute([tape], device, **execute_kwargs)[0],
              like="tensorflow",
          )
  
      x = tf.Variable(0.543)
      y = tf.Variable(-0.654)
  
      with tf.GradientTape() as tape:
          cost_res = cost(x, y)
  
      expected = tf.convert_to_tensor(
          [
              tf.cos(x),
              (1 + tf.cos(x) * tf.cos(y)) / 2,
              (1 - tf.cos(x) * tf.cos(y)) / 2,
          ]
      )
      assert np.allclose(
          cost_res, expected, atol=atol_for_shots(shots), rtol=0
      )
  
      if (
          execute_kwargs.get("interface", "") == "tf-autograph"
          and execute_kwargs.get("gradient_fn", "") == "adjoint"
      ):
          with pytest.raises(tf.errors.UnimplementedError):
              tape.jacobian(cost_res, [x, y])
          return
      res = tape.jacobian(cost_res, [x, y])
      assert isinstance(res, list) and len(res) == 2
      assert res[0].shape == (3,)
      assert res[1].shape == (3,)
  
      expected = (
          tf.convert_to_tensor(
              [
                  -tf.sin(x),
                  -tf.sin(x) * tf.cos(y) / 2,
                  tf.sin(x) * tf.cos(y) / 2,
              ]
          ),
          tf.convert_to_tensor(
              [0, -tf.cos(x) * tf.sin(y) / 2, tf.cos(x) * tf.sin(y) / 2]
          ),
      )
      assert np.allclose(
          res[0], expected[0], atol=atol_for_shots(shots), rtol=0
      )
      assert np.allclose(
          res[1], expected[1], atol=atol_for_shots(shots), rtol=0
      )
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.devices import DefaultQubit
  from pennylane.gradients import 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, device, shots) and returns: qml