class_docstr: Tests for the batch_transform decorator differentiability
class_docstr_tok: ["Tests","for","the","batch_transform","decorator","differentiability"]
docstr: Test that batch transforms can be applied to a QNode
  without affecting device batch transforms
docstr_tok: ["Test","that","batch","transforms","can","be","applied","to","a","QNode","without","affecting","device","batch","transforms"]
code: def test_batch_transforms_qnode(self, diff_method):
      """Test that batch transforms can be applied to a QNode
      without affecting device batch transforms"""
      if diff_method == "backprop":
          pytest.skip("Test only supports finite shots")
  
      dev = qml.device("default.qubit", wires=2, shots=100000)
  
      H = qml.PauliZ(0) @ qml.PauliZ(1) - qml.PauliX(0)
      weights = np.array([0.5, 0.3], requires_grad=True)
  
      @qml.gradients.param_shift
      @qml.qnode(dev, diff_method=diff_method)
      def circuit(weights):
          qml.RX(weights[0], wires=0)
          qml.RY(weights[1], wires=1)
          qml.CNOT(wires=[0, 1])
          return qml.expval(H)
  
      res = circuit(weights)
  
      assert np.allclose(res, [0, -np.sin(weights[1])], atol=0.1)
  
imports: import functools
  import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 8 for calling the TestBatchTransformGradients obj's underlying member method code with example usage: obj.test_batch_transforms_qnode(diff_method) and returns: qml