class_docstr: Tests for the qml.map_wires method used with tapes.
class_docstr_tok: ["Tests","for","the","qml.map_wires","method","used","with","tapes","."]
docstr: Test the execution of a mapped tape.
docstr_tok: ["Test","the","execution","of","a","mapped","tape","."]
code: def test_execute_mapped_tape(self, shots):
      """Test the execution of a mapped tape."""
      dev = qml.device("default.qubit", wires=5)
      with qml.queuing.AnnotatedQueue() as q_tape:
          build_op()
          qml.expval(op=qml.PauliZ(1))
  
      tape = QuantumScript.from_queue(q_tape, shots=shots)
      # TODO: Use qml.equal when supported
  
      m_tapes, _ = qml.map_wires(tape, wire_map=wire_map)
      m_tape = m_tapes[0]
      m_op = m_tape.operations[0]
      m_obs = m_tape.observables[0]
      assert qml.equal(m_op, mapped_op)
      assert tape.shots == m_tape.shots
      assert m_obs.wires == Wires(wire_map[1])
      assert qml.math.allclose(
          dev.execute(tape), dev.execute(m_tape), atol=0.05
      )
  
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 2 for calling the TestMapWiresTapes obj's underlying member method code with example usage: obj.test_execute_mapped_tape(shots) without return types