class_docstr: Tests for integration with the PassthruQNode
class_docstr_tok: ["Tests","for","integration","with","the","PassthruQNode"]
docstr: Test that the device probability vector can be differentiated directly
docstr_tok: ["Test","that","the","device","probability","vector","can","be","differentiated","directly"]
code: def test_prob_vector_differentiability(self, tol):
      """Test that the device probability vector can be differentiated directly"""
      dev = qml.device("default.mixed", wires=2)
  
      @qml.qnode(dev, diff_method="backprop", interface="autograd")
      def circuit(a, b):
          qml.RX(a, wires=0)
          qml.RY(b, wires=1)
          qml.CNOT(wires=[0, 1])
          return qml.probs(wires=[1])
  
      a = np.array(0.54, requires_grad=True)
      b = np.array(0.12, requires_grad=True)
  
      res = circuit(a, b)
      expected = [
          np.cos(a / 2) ** 2 * np.cos(b / 2) ** 2
          + np.sin(a / 2) ** 2 * np.sin(b / 2) ** 2,
          np.cos(a / 2) ** 2 * np.sin(b / 2) ** 2
          + np.sin(a / 2) ** 2 * np.cos(b / 2) ** 2,
      ]
      assert np.allclose(res, expected, atol=tol, rtol=0)
  
      grad = qml.jacobian(circuit)(a, b)
      expected = 0.5 * np.array(
          [
              [-np.sin(a) * np.cos(b), np.sin(a) * np.cos(b)],
              [-np.cos(a) * np.sin(b), np.cos(a) * np.sin(b)],
          ]
      )
  
      assert np.allclose(grad, expected, 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 7 for calling the TestPassthruIntegration obj's underlying member method code with example usage: obj.test_prob_vector_differentiability(tol) and returns: qml