def is_hermitian_matrix(mat, rtol=RTOL_DEFAULT, atol=ATOL_DEFAULT):
if atol is None:<EOL><INDENT>atol = ATOL_DEFAULT<EOL><DEDENT>if rtol is None:<EOL><INDENT>rtol = RTOL_DEFAULT<EOL><DEDENT>mat = np.array(mat)<EOL>if mat.ndim != <NUM_LIT:2>:<EOL><INDENT>return False<EOL><DEDENT>return np.allclose(mat, np.conj(mat.T), rtol=rtol, atol=atol)<EOL>
Test if an array is a Hermitian matrix