class_docstr: Tests for purity transform
docstr: Tests purity for a qnode for the tf interface.
docstr_tok: ["Tests","purity","for","a","qnode","for","the","tf","interface","."]
code: def test_IsingXX_qnode_purity_tf(
      self, device, param, wires, is_partial, interface
  ):
      """Tests purity for a qnode for the tf interface."""
  
      import tensorflow as tf
  
      dev = qml.device(device, wires=2)
  
      @qml.qnode(dev, interface=interface)
      def circuit_state(x):
          qml.IsingXX(x, wires=[0, 1])
          return qml.state()
  
      purity = qml.qinfo.purity(circuit_state, wires=wires)(
          tf.Variable(param)
      )
      expected_purity = (
          expected_purity_ising_xx(param) if is_partial else 1
      )
      assert qml.math.allclose(purity, expected_purity)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 14 for calling the TestPurity obj's underlying member method code with example usage: obj.test_IsingXX_qnode_purity_tf(device, param, wires, is_partial, interface) and returns: qml