def _tensor_product(self, other, reverse=False):
if not isinstance(other, PTM):<EOL><INDENT>other = PTM(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 PTM(data, input_dims, output_dims)<EOL>
Return the tensor product channel.

        Args:
            other (QuantumChannel): a quantum channel.
            reverse (bool): If False return self ⊗ other, if True return
                            if True return (other ⊗ self) [Default: False
        Returns:
            PTM: the tensor product channel as a PTM object.

        Raises:
            QiskitError: if other cannot be converted to a channel.