Consider the following optimization problem

$$
\min \| \textbf{Ax-B}\|
$$

$$
s.t.|x_i|=1,i=1,...,n
$$

where $\textbf{x}\in \mathbb{C}^{n}$ is the optimization varaible, $x_i$ is the $i$-th element of $\textbf{x}$, $\textbf{A}\in \mathbb{C}^{m \times n}$ and $\textbf{B}\in \mathbb{C}^{m}$ are constant.

I want to find a algorithm to solve a stationary point of the problem. When I replace $x_i$ with theta, some search algorithms seem to be extremely difficult to solve. Maybe there are other methods to transform the problem to familiar one.