class_docstr: Tests for the qml.map_wires method used with qnodes.
class_docstr_tok: ["Tests","for","the","qml.map_wires","method","used","with","qnodes","."]
docstr: Test the map_wires method with a qnode.
docstr_tok: ["Test","the","map_wires","method","with","a","qnode","."]
code: def test_map_wires_qnode(self):
      """Test the map_wires method with a qnode."""
      dev = qml.device("default.qubit", wires=5)
  
      @qml.qnode(dev)
      def qnode():
          build_op()
          return qml.expval(
              qml.prod(qml.PauliX(0), qml.PauliY(1), qml.PauliZ(2))
          )
  
      # TODO: Use qml.equal when supported
      mapped_obs = qml.prod(qml.PauliX(4), qml.PauliY(3), qml.PauliZ(2))
  
      m_qnode = qml.map_wires(qnode, wire_map=wire_map)
      assert m_qnode() == qnode()
      assert len(m_qnode.tape) == 2
      tapes, _ = m_qnode.transform_program((m_qnode.tape,))
  
      m_op = tapes[0].operations
      m_obs = tapes[0].observables
      assert qml.equal(m_op[0], mapped_op)
      assert qml.equal(m_obs[0], mapped_obs)
  
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 TestMapWiresQNodes obj's underlying member method code with example usage: obj.test_map_wires_qnode() and returns: qml