The complexcirclefactory in Manopt is designed for continuous optimization under the constraint that each entry has constant modulus, but allows arbitrary (continuous) phase. If your problem involves discrete phases (e.g., only a finite set of possible angles), then it's no longer a smooth manifold optimization problem — it's a combinatorial (or mixed) optimization problem.
In that case:
Retraction modification won't solve it. Retraction is intended to map points back onto a smooth manifold. Discretization is fundamentally different — you would need a different optimization strategy (e.g., rounding, projected gradient, or custom discrete search methods).
Manopt by default assumes smooth manifolds. If you modify retractions to "snap" to discrete phases, you break smoothness, and most convergence guarantees no longer apply.
One approach: You could still optimize over the continuous complexcirclefactory manifold (i.e., with continuous phase) and then project the final solution onto the discrete set at the end, or include rounding steps during optimization. This is common in applications like MIMO communication or beamforming.