class_docstr: Test ``qml.qjit`` with Catalyst's grad operations
class_docstr_tok: ["Test","``","qml.qjit","``","with","Catalyst","'s","grad","operations"]
docstr: Test the grad transformation with purely classical functions.
docstr_tok: ["Test","the","grad","transformation","with","purely","classical","functions","."]
code: def test_grad_with_pure_classical(self):
      """Test the grad transformation with purely classical functions."""
  
      def square(x: float):
          return x**2
  
      @qml.qjit
      def dsquare(x: float):
          return catalyst.grad(square)(x)
  
      assert jnp.allclose(dsquare(2.3), 4.6)
  
imports: from unittest.mock import patch
  import pytest
  import pennylane
  from pennylane.compiler.compiler import CompileError
  from pennylane import numpy
  from jax import numpy
  from jax.core import ShapedArray
label_desc: Use image node_id 4 for calling the TestCatalystGrad obj's underlying member method code with example usage: obj.test_grad_with_pure_classical() and returns: unknown, catalyst