qiskit/circuit/instruction.py
def mirror(self):
        """For a composite instruction, reverse the order of sub-gates.

        This is done by recursively mirroring all sub-instructions.
        It does not invert any gate.

        Returns:
            Instruction: a fresh gate with sub-gates reversed
        """
        if not self._definition:
            return self.copy()

        reverse_inst = self.copy(name=self.name + '_mirror')
        reverse_inst.definition = []
        for inst, qargs, cargs in reversed(self._definition):
            reverse_inst._definition.append((inst.mirror(), qargs, cargs))
        return reverse_inst
def mirror(self):
        if not self._definition:
            return self.copy()

        reverse_inst = self.copy(name=self.name + '_mirror')
        reverse_inst.definition = []
        for inst, qargs, cargs in reversed(self._definition):
            reverse_inst._definition.append((inst.mirror(), qargs, cargs))
        return reverse_inst
def mirror ( self ) : if not self . _definition : return self . copy ( ) reverse_inst = self . copy ( name = self . name + '_mirror' ) reverse_inst . definition = [ ] for inst , qargs , cargs in reversed ( self . _definition ) : reverse_inst . _definition . append ( ( inst . mirror ( ) , qargs , cargs ) ) return reverse_inst
For a composite instruction, reverse the order of sub-gates.

        This is done by recursively mirroring all sub-instructions.
        It does not invert any gate.

        Returns:
            Instruction: a fresh gate with sub-gates reversed
For a composite instruction reverse the order of sub - gates .