class_docstr: Unit tests for the batch_transform class
class_docstr_tok: ["Unit","tests","for","the","batch_transform","class"]
docstr: Test that a non-differentiable transform cannot be differentiated
docstr_tok: ["Test","that","a","non-differentiable","transform","can","not","be","differentiated"]
code: def test_not_differentiable(self):
      """Test that a non-differentiable transform cannot be differentiated"""
  
      def my_transform(tape):
          tape1 = tape.copy()
          tape2 = tape.copy()
          return [tape1, tape2], qml.math.sum
  
      my_transform = qml.batch_transform(
          my_transform, differentiable=False
      )
  
      dev = qml.device("default.qubit", wires=2)
  
      @my_transform
      @qml.qnode(dev)
      def circuit(x):
          qml.Hadamard(wires=0)
          qml.RY(x, wires=0)
          return qml.expval(qml.PauliX(0))
  
      res = circuit(0.5)
      assert isinstance(res, float)
      assert not np.allclose(res, 0)
  
      with pytest.warns(
          UserWarning,
          match="Attempted to differentiate a function with no",
      ):
          qml.grad(circuit)(0.5)
  
imports: import functools
  import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 8 for calling the TestBatchTransform obj's underlying member method code with example usage: obj.test_not_differentiable() and returns: list,  qml, qml