Algebraic Approach to Phase Problem