def compose(self, other, qargs=None, front=False):
<EOL>if not isinstance(other, Operator):<EOL><INDENT>other = Operator(other)<EOL><DEDENT>if front and self.input_dims(qargs=qargs) != other.output_dims():<EOL><INDENT>raise QiskitError(<EOL>'<STR_LIT>')<EOL><DEDENT>if not front and self.output_dims(qargs=qargs) != other.input_dims():<EOL><INDENT>raise QiskitError(<EOL>'<STR_LIT>')<EOL><DEDENT>if qargs is None:<EOL><INDENT>if front:<EOL><INDENT>input_dims = other.input_dims()<EOL>output_dims = self.output_dims()<EOL>data = np.dot(self._data, other.data)<EOL><DEDENT>else:<EOL><INDENT>input_dims = self.input_dims()<EOL>output_dims = other.output_dims()<EOL>data = np.dot(other.data, self._data)<EOL><DEDENT>return Operator(data, input_dims, output_dims)<EOL><DEDENT>return self._compose_subsystem(other, qargs, front)<EOL>
Return the composition channel self∘other.

        Args:
            other (Operator): an operator object.
            qargs (list): a list of subsystem positions to compose other on.
            front (bool): If False compose in standard order other(self(input))
                          otherwise compose in reverse order self(other(input))
                          [default: False]

        Returns:
            Operator: The composed operator.

        Raises:
            QiskitError: if other cannot be converted to an Operator or has
            incompatible dimensions.