class_docstr: Tests for the qfunc_transform decorator differentiability
class_docstr_tok: ["Tests","for","the","qfunc_transform","decorator","differentiability"]
docstr: Test that a qfunc transform is differentiable when using
  jax
docstr_tok: ["Test","that","a","qfunc","transform","is","differentiable","when","using","jax"]
code: def test_differentiable_qfunc_jax(self, diff_method):
      """Test that a qfunc transform is differentiable when using
      jax"""
      import jax
  
      dev = qml.device("default.qubit", wires=2)
      qnode = qml.QNode(self.circuit, dev, diff_method=diff_method)
  
      a = jax.numpy.array(0.5)
      b = jax.numpy.array([0.1, 0.2])
      x = jax.numpy.array(0.543)
  
      res = qnode(x, a, b)
      assert np.allclose(res, self.expval(x, a, b))
  
      grad = jax.grad(qnode, argnums=[0, 1, 2])(x, a, b)
      expected = qml.grad(self.expval)(
          np.array(x), np.array(a), np.array(b)
      )
      assert all(np.allclose(g, e) for g, e in zip(grad, expected))
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 8 for calling the TestQFuncTransformGradients obj's underlying member method code with example usage: obj.test_differentiable_qfunc_jax(diff_method) without return types