def _tensor_product(self, other, reverse=False):
<EOL>if not isinstance(other, Operator):<EOL><INDENT>other = Operator(other)<EOL><DEDENT>if reverse:<EOL><INDENT>input_dims = self.input_dims() + other.input_dims()<EOL>output_dims = self.output_dims() + other.output_dims()<EOL>data = np.kron(other._data, self._data)<EOL><DEDENT>else:<EOL><INDENT>input_dims = other.input_dims() + self.input_dims()<EOL>output_dims = other.output_dims() + self.output_dims()<EOL>data = np.kron(self._data, other._data)<EOL><DEDENT>return Operator(data, input_dims, output_dims)<EOL>
Return the tensor product operator.

        Args:
            other (Operator): another operator.
            reverse (bool): If False return self ⊗ other, if True return
                            if True return (other ⊗ self) [Default: False
        Returns:
            Operator: the tensor product operator.

        Raises:
            QiskitError: if other cannot be converted into an Operator.