def _stinespring_to_operator(data, input_dim, output_dim):
trace_dim = data[<NUM_LIT:0>].shape[<NUM_LIT:0>] // output_dim<EOL>if data[<NUM_LIT:1>] is not None or trace_dim != <NUM_LIT:1>:<EOL><INDENT>raise QiskitError(<EOL>'<STR_LIT>')<EOL><DEDENT>return data[<NUM_LIT:0>]<EOL>
Transform Stinespring representation to Operator representation.