class_docstr: Test the Hadamard gradient transform and edge cases such as non diff parameters, auxiliary wires, etc...
class_docstr_tok: ["Test","the","Hadamard","gradient","transform","and","edge","cases","such","as","non","diff","parameters",",","auxiliary","wires",",","etc","..."]
docstr: Test that the correct ouput and warning is generated in the absence of any trainable
  parameters
code: def test_no_trainable_params_qnode_torch_legacy(self):
      """Test that the correct ouput and warning is generated in the absence of any trainable
      parameters"""
      dev = qml.device("default.qubit.torch", wires=2)
  
      @qml.qnode(dev, interface="torch")
      def circuit(weights):
          qml.RX(weights[0], wires=0)
          qml.RY(weights[1], wires=0)
          return qml.expval(qml.PauliZ(0) @ qml.PauliZ(1))
  
      weights = [0.1, 0.2]
      with pytest.raises(
          qml.QuantumFunctionError, match="No trainable parameters."
      ):
          qml.gradients.hadamard_grad(circuit)(weights)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 16 for calling the TestHadamardGradEdgeCases obj's underlying member method code with example usage: obj.test_no_trainable_params_qnode_torch_legacy() and returns: qml