class_docstr: Tests for the qml.map_wires method used with callables.
class_docstr_tok: ["Tests","for","the","qml.map_wires","method","used","with","callables","."]
docstr: Test the map_wires method with a qfunc.
docstr_tok: ["Test","the","map_wires","method","with","a","qfunc","."]
code: def test_map_wires_qfunc(self):
      """Test the map_wires method with a qfunc."""
      dev = qml.device("default.qubit", wires=5)
  
      def qfunc():
          build_op()
          qml.prod(qml.PauliX(0), qml.PauliY(1))
          return qml.probs(wires=0), qml.probs(wires=1)
  
      m_qfunc = qml.map_wires(qfunc, wire_map=wire_map)
      mapped_op_2 = qml.prod(qml.PauliX(4), qml.PauliY(3))
      qnode = qml.QNode(qfunc, dev)
      m_qnode = qml.QNode(m_qfunc, dev)
  
      # TODO: Use qml.equal when supported
  
      assert qml.math.allclose(m_qnode(), qnode())
      assert len(m_qnode.tape) == 4
      m_ops = m_qnode.tape.operations
      assert isinstance(m_ops[0], Prod)
      assert isinstance(m_ops[1], Prod)
      assert m_ops[0].data == mapped_op.data
      assert m_ops[0].wires == mapped_op.wires
      assert m_ops[0].arithmetic_depth == mapped_op.arithmetic_depth
      assert m_ops[1].data == mapped_op_2.data
      assert m_ops[1].wires == mapped_op_2.wires
      assert m_ops[1].arithmetic_depth == mapped_op_2.arithmetic_depth
      assert m_qnode.tape.observables[0].wires == Wires(wire_map[0])
      assert m_qnode.tape.observables[1].wires == Wires(wire_map[1])
  
imports: from functools import partial
  import pytest
  import pennylane
  from pennylane.ops import Prod
  from pennylane.tape import QuantumScript
  from pennylane.wires import Wires
label_desc: Use image node_id 1 for calling the TestMapWiresCallables obj's underlying member method code with example usage: obj.test_map_wires_qfunc() and returns: qml,  qml