class_docstr: Tests that the debugger works for a simple circuit
docstr: Tests debugger with tensorflow.
docstr_tok: ["Tests","debugger","with","tensorflow","."]
code: def test_debugger_tf(self):
      """Tests debugger with tensorflow."""
      import tensorflow as tf
  
      phi = tf.Variable(4.873)
      debugger = self.Debugger()
  
      ops = [
          qml.Snapshot(),
          qml.RX(phi, wires=0),
          qml.Snapshot("final_state"),
      ]
      qs = qml.tape.QuantumScript(
          ops, [qml.expval(qml.PauliY(0)), qml.expval(qml.PauliZ(0))]
      )
      result = simulate(qs, debugger=debugger)
  
      assert qml.math.allclose(result[0], -tf.sin(phi))
      assert qml.math.allclose(result[1], tf.cos(phi))
  
      assert list(debugger.snapshots.keys()) == [0, "final_state"]
      assert qml.math.allclose(debugger.snapshots[0], [1, 0])
      assert qml.math.allclose(
          debugger.snapshots["final_state"],
          [np.cos(phi / 2), -np.sin(phi / 2) * 1j],
      )
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.devices.qubit import simulate, get_final_state, measure_final_state
label_desc: Use image node_id 5 for calling the TestDebugger obj's underlying member method code with example usage: obj.test_debugger_tf() without return types