qiskit/quantum_info/operators/channel/choi.py
def transpose(self):
        """Return the transpose of the QuantumChannel."""
        # Make bipartite matrix
        d_in, d_out = self.dim
        data = np.reshape(self._data, (d_in, d_out, d_in, d_out))
        # Swap input and output indicies on bipartite matrix
        data = np.transpose(data, (1, 0, 3, 2))
        # Transpose channel has input and output dimensions swapped
        data = np.reshape(data, (d_in * d_out, d_in * d_out))
        return Choi(
            data, input_dims=self.output_dims(), output_dims=self.input_dims())
def transpose(self):
        """Return the transpose of the QuantumChannel."""
        # Make bipartite matrix
        d_in, d_out = self.dim
        data = np.reshape(self._data, (d_in, d_out, d_in, d_out))
        # Swap input and output indicies on bipartite matrix
        data = np.transpose(data, (1, 0, 3, 2))
        # Transpose channel has input and output dimensions swapped
        data = np.reshape(data, (d_in * d_out, d_in * d_out))
        return Choi(
            data, input_dims=self.output_dims(), output_dims=self.input_dims())
def transpose ( self ) : # Make bipartite matrix d_in , d_out = self . dim data = np . reshape ( self . _data , ( d_in , d_out , d_in , d_out ) ) # Swap input and output indicies on bipartite matrix data = np . transpose ( data , ( 1 , 0 , 3 , 2 ) ) # Transpose channel has input and output dimensions swapped data = np . reshape ( data , ( d_in * d_out , d_in * d_out ) ) return Choi ( data , input_dims = self . output_dims ( ) , output_dims = self . input_dims ( ) )
Return the transpose of the QuantumChannel.
Return the transpose of the QuantumChannel .