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 an independent parameter is skipped
  during the Jacobian computation.
code: def test_independent_parameter(self, mocker):
      """Test that an independent parameter is skipped
      during the Jacobian computation."""
      spy = mocker.spy(
          qml.gradients.hadamard_gradient, "_expval_hadamard_grad"
      )
  
      with qml.queuing.AnnotatedQueue() as q:
          qml.RX(0.543, wires=[0])
          qml.RY(
              -0.654, wires=[1]
          )  # does not have any impact on the expval
          qml.expval(qml.PauliZ(0))
  
      tape = qml.tape.QuantumScript.from_queue(q)
      dev = qml.device("default.qubit", wires=3)
  
      res_hadamard, tapes = grad_fn(tape, dev)
  
      assert len(tapes) == 1
  
      assert isinstance(res_hadamard, tuple)
      assert len(res_hadamard) == 2
      assert res_hadamard[0].shape == ()
      assert res_hadamard[1].shape == ()
  
      # only called for parameter 0
      assert spy.call_args[0][0:2] == (tape, [0])
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 10 for calling the TestHadamardGradEdgeCases obj's underlying member method code with example usage: obj.test_independent_parameter(mocker) without return types