def _stinespring_to_superop(data, input_dim, output_dim):
trace_dim = data[<NUM_LIT:0>].shape[<NUM_LIT:0>] // output_dim<EOL>stine_l = np.reshape(data[<NUM_LIT:0>], (output_dim, trace_dim, input_dim))<EOL>if data[<NUM_LIT:1>] is None:<EOL><INDENT>stine_r = stine_l<EOL><DEDENT>else:<EOL><INDENT>stine_r = np.reshape(data[<NUM_LIT:1>], (output_dim, trace_dim, input_dim))<EOL><DEDENT>return np.reshape(<EOL>np.einsum('<STR_LIT>', stine_r.conj(), stine_l),<EOL>(output_dim * output_dim, input_dim * input_dim))<EOL>
Transform Stinespring representation to SuperOp representation.