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: Tes that the tape wires are correct when it has nested tapes.
docstr_tok: ["Tes","that","the","tape","wires","are","correct","when","it","has","nested","tapes","."]
code: def test_map_wires_nested_tape(self):
      """Tes that the tape wires are correct when it has nested tapes."""
  
      tape = QuantumScript(
          [
              qml.PauliX(0),
              qml.PauliZ(1),
              qml.PauliX(3),
              QuantumScript(
                  [qml.PauliY(0), qml.Hadamard(1), qml.PauliY(3)]
              ),
          ]
      )
  
      [m_tape], _ = qml.map_wires(tape, wire_map=wire_map)
  
      m_ops = m_tape.operations
      assert len(m_ops) == 4
      assert len(m_tape.measurements) == 0
      assert m_ops[:3] == [qml.PauliX(4), qml.PauliZ(3), qml.PauliX(1)]
  
      nested_m_tape = m_ops[3]
      assert isinstance(nested_m_tape, QuantumScript)
      assert nested_m_tape.operations == [
          qml.PauliY(4),
          qml.Hadamard(3),
          qml.PauliY(1),
      ]
      assert len(nested_m_tape.measurements) == 0
  
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 3 for calling the TestMapWiresTapes obj's underlying member method code with example usage: obj.test_map_wires_nested_tape() without return types