qiskit/quantum_info/operators/channel/transformations.py
def _stinespring_to_operator(data, input_dim, output_dim):
    """Transform Stinespring representation to Operator representation."""
    trace_dim = data[0].shape[0] // output_dim
    if data[1] is not None or trace_dim != 1:
        raise QiskitError(
            'Channel cannot be converted to Operator representation')
    return data[0]
def _stinespring_to_operator(data, input_dim, output_dim):
    trace_dim = data[0].shape[0] // output_dim
    if data[1] is not None or trace_dim != 1:
        raise QiskitError(
            'Channel cannot be converted to Operator representation')
    return data[0]
def _stinespring_to_operator ( data , input_dim , output_dim ) : trace_dim = data [ 0 ] . shape [ 0 ] // output_dim if data [ 1 ] is not None or trace_dim != 1 : raise QiskitError ( 'Channel cannot be converted to Operator representation' ) return data [ 0 ]
Transform Stinespring representation to Operator representation.
Transform Stinespring representation to Operator representation .