class_docstr: Unit tests for the hadamard_grad function
class_docstr_tok: ["Unit","tests","for","the","hadamard_grad","function"]
docstr: Tests that the shots attribute is copied to the new tapes
code: def test_shots_attribute(self, shots):
      """Tests that the shots attribute is copied to the new tapes"""
      dev = qml.device("default.qubit", wires=3)
      x = 0.543
      y = -0.654
  
      with qml.queuing.AnnotatedQueue() as q:
          qml.RX(x, wires=[0])
          qml.RY(y, wires=[1])
          qml.CNOT(wires=[0, 1])
          qml.expval(qml.PauliZ(0) @ qml.PauliX(1))
  
      tape = qml.tape.QuantumScript.from_queue(q, shots=shots)
      _, tapes = grad_fn(tape, dev)
  
      assert all(new_tape.shots == tape.shots for new_tape in tapes)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 18 for calling the TestHadamardGrad obj's underlying member method code with example usage: obj.test_shots_attribute(shots) without return types