class_docstr: Tests for the integration of shots with the TF interface.
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_prob_expectation_values(
      self,
      dev,
      diff_method,
      gradient_kwargs,
      shots,
      num_copies,
      interface,
  ):
      """Tests correct output shape and evaluation for a tape
      with prob and expval outputs"""
      np.random.seed(214)
  
      x = tf.Variable(0.543)
      y = tf.Variable(-0.654)
  
      @qnode(
          dev,
          diff_method=diff_method,
          interface=interface,
          **gradient_kwargs,
      )
      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=[0, 1])
  
      with tf.GradientTape() as tape:
          res = circuit(x, y, shots=shots)
          res = qml.math.stack(
              [tf.experimental.numpy.hstack(r) for r in res]
          )
  
      all_res = tape.jacobian(res, (x, y))
  
      assert isinstance(all_res, tuple)
      assert len(all_res) == 2
  
      expected = np.array(
          [
              [
                  -np.sin(x),
                  -(np.cos(y / 2) ** 2 * np.sin(x)) / 2,
                  -(np.sin(x) * np.sin(y / 2) ** 2) / 2,
                  (np.sin(x) * np.sin(y / 2) ** 2) / 2,
                  (np.cos(y / 2) ** 2 * np.sin(x)) / 2,
              ],
              [
                  0,
                  -(np.cos(x / 2) ** 2 * np.sin(y)) / 2,
                  (np.cos(x / 2) ** 2 * np.sin(y)) / 2,
                  (np.sin(x / 2) ** 2 * np.sin(y)) / 2,
                  -(np.sin(x / 2) ** 2 * np.sin(y)) / 2,
              ],
          ]
      )
  
      tol = TOLS[diff_method]
  
      for res, exp in zip(all_res, expected):
          assert isinstance(res, tf.Tensor)
          assert res.shape == (num_copies, 5)
          assert np.allclose(res, exp, atol=tol, rtol=0)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane import qnode
  from pennylane.devices import DefaultQubit
label_desc: Use image node_id 2 for calling the TestReturnShotVectorIntegration obj's underlying member method code with example usage: obj.test_prob_expectation_values(dev, diff_method, gradient_kwargs, shots, num_copies, interface) and returns: qml,  qml