class_docstr: Unit tests for the hadamard_grad function
class_docstr_tok: ["Unit","tests","for","the","hadamard_grad","function"]
docstr: Test that an error is raised for a broadcasted/batched tape.
code: def test_batched_tape_raises(self):
      """Test that an error is raised for a broadcasted/batched tape."""
      tape = qml.tape.QuantumScript(
          [qml.RX([0.4, 0.2], 0)], [qml.expval(qml.PauliZ(0))]
      )
      _match = "Computing the gradient of broadcasted tapes with the Hadamard test gradient"
      with pytest.raises(NotImplementedError, match=_match):
          qml.gradients.hadamard_grad(tape)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 1 for calling the TestHadamardGrad obj's underlying member method code with example usage: obj.test_batched_tape_raises() without return types