class_docstr: Test that the gradient of the state reconstruction is correct
class_docstr_tok: ["Test","that","the","gradient","of","the","state","reconstruction","is","correct"]
docstr: Test the gradient of the state for the tensorflow interface
docstr_tok: ["Test","the","gradient","of","the","state","for","the","tensorflow","interface"]
code: def test_backward_tf(self):
      """Test the gradient of the state for the tensorflow interface"""
      import tensorflow as tf
  
      shadow_circuit = basic_entangler_circuit(
          3, shots=20000, interface="tf"
      )
  
      sub_wires = [[0, 1], [1, 2]]
      shadow_circuit = qml.shadows.shadow_state(
          shadow_circuit, wires=sub_wires, diffable=True
      )
  
      x = tf.Variable(self.x)
  
      with tf.GradientTape() as tape:
          out = qml.math.stack(shadow_circuit(x))
  
      actual = tape.jacobian(out, x)
  
      for act, w in zip(qml.math.unstack(actual), sub_wires):
          exact_circuit = basic_entangler_circuit_exact_state(
              3, w, "tf"
          )
  
          with tf.GradientTape() as tape2:
              out2 = exact_circuit(x)
  
          expected = tape2.jacobian(out2, x)
  
          assert qml.math.allclose(act, expected, atol=1e-1)
  
imports: from functools import partial
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.shadows.transforms import _replace_obs
label_desc: Use image node_id 3 for calling the TestStateBackward obj's underlying member method code with example usage: obj.test_backward_tf() without return types