class_docstr: Test the construction of composite ops.
class_docstr_tok: ["Test","the","construction","of","composite","ops","."]
docstr: Test the map_wires method.
docstr_tok: ["Test","the","map_wires","method","."]
code: def test_map_wires(self):
      """Test the map_wires method."""
      diag_op = ValidOp(*self.simple_operands)
      # pylint:disable=attribute-defined-outside-init
      diag_op._pauli_rep = qml.pauli.PauliSentence(
          {qml.pauli.PauliWord({0: "X", 1: "Y"}): 1}
      )
  
      wire_map = {0: 5, 1: 7, 2: 9, 3: 11}
      mapped_op = diag_op.map_wires(wire_map=wire_map)
  
      assert mapped_op.wires == Wires([5, 7])
      assert mapped_op[0].wires == Wires(5)
      assert mapped_op[1].wires == Wires(7)
      assert mapped_op.pauli_rep is not diag_op.pauli_rep
      assert mapped_op.pauli_rep == qml.pauli.PauliSentence(
          {qml.pauli.PauliWord({5: "X", 7: "Y"}): 1}
      )
  
imports: from copy import copy
  import numpy
  import pytest
  import pennylane
  from pennylane.operation import DecompositionUndefinedError
  from pennylane.ops.op_math import CompositeOp, Prod, Sum, SProd
  from pennylane.wires import Wires
label_desc: Use image node_id 17 for calling the TestConstruction obj's underlying member method code with example usage: obj.test_map_wires() without return types