class_docstr: Tests for purity transform
docstr: Tests purity for a qnode
docstr_tok: ["Tests","purity","for","a","qnode"]
code: def test_IsingXX_qnode_purity(self, device, param, wires, is_partial):
      """Tests purity for a qnode"""
  
      dev = qml.device(device, wires=2)
  
      @qml.qnode(dev)
      def circuit_state(x):
          qml.IsingXX(x, wires=[0, 1])
          return qml.state()
  
      purity = qml.qinfo.purity(circuit_state, wires=wires)(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 3 for calling the TestPurity obj's underlying member method code with example usage: obj.test_IsingXX_qnode_purity(device, param, wires, is_partial) and returns: qml