#NEWLINE# @ staticmethod #NEWLINE# def MatrixSlice( expr , assumptions ) : #NEWLINE# #INDENT# if ( not expr . on_diag ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ask ( Q . unitary ( expr . parent ) , assumptions )