class_docstr: Tests for purity transform
docstr: Test that purity is correct with custom wire labels
docstr_tok: ["Test","that","purity","is","correct","with","custom","wire","labels"]
code: def test_purity_wire_labels(self, device, tol):
      """Test that purity is correct with custom wire labels"""
      param = np.array(1.234)
      wires = ["a", 8]
      dev = qml.device(device, wires=wires)
  
      @qml.qnode(dev)
      def circuit_state(x):
          qml.PauliX(wires=wires[0])
          qml.IsingXX(x, wires=wires)
          return qml.state()
  
      purity0 = qml.qinfo.purity(circuit_state, wires=[wires[0]])(param)
      purity1 = qml.qinfo.purity(circuit_state, wires=[wires[1]])(param)
      expected = expected_purity_ising_xx(param)
  
      assert qml.math.allclose(purity0, expected, atol=tol)
      assert qml.math.allclose(purity1, expected, atol=tol)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 16 for calling the TestPurity obj's underlying member method code with example usage: obj.test_purity_wire_labels(device, tol) and returns: qml