matrix_to_double_ket¶ matrix_to_double_ket(op_matrix: ndarray) → ndarray[source]¶ Return the double-ket representation of an operator. Parameters: op_matrix (ndarray) – an operator in matrix representation. Returns: The double-ket representation of the operator op. Return type: ndarray