class_docstr: Tests for the sign_expand transform
class_docstr_tok: ["Tests","for","the","sign_expand","transform"]
docstr: Tests that the sign_expand transform returns the correct value as a transform program
docstr_tok: ["Tests","that","the","sign_expand","transform","returns","the","correct","value","as","a","transform","program"]
code: def test_hamiltonians_qnode(self, tape, output):
      """Tests that the sign_expand transform returns the correct value as a transform program"""
  
      @qml.transforms.sign_expand
      @qml.qnode(dev)
      def qnode():
          for op in tape.operations:
              qml.apply(op)
  
          return qml.apply(tape.measurements[0])
  
      expval = qnode()
      assert np.isclose(output, expval)
  
file_path: pennylane/tests/transforms/test_sign_expand.py
imports: import functools
  import pytest
  import numpy
  import pennylane
  import pennylane.tape
label_desc: Use image node_id 2 for calling the TestSignExpand obj's underlying member method code with example usage: obj.test_hamiltonians_qnode(tape, output) and returns: qml