  In this paper we tackle the problem of recovering the phase of complex linear
measurements when only magnitude information is available and we control the
input. We are motivated by the recent development of dedicated optics-based
hardware for rapid random projections which leverages the propagation of light
in random media. A signal of interest $\mathbf{\xi} \in \mathbb{R}^N$ is mixed
by a random scattering medium to compute the projection $\mathbf{y} =
\mathbf{A} \mathbf{\xi}$, with $\mathbf{A} \in \mathbb{C}^{M \times N}$ being a
realization of a standard complex Gaussian iid random matrix. Such optics-based
matrix multiplications can be much faster and energy-efficient than their CPU
or GPU counterparts, yet two difficulties must be resolved: only the intensity
${|\mathbf{y}|}^2$ can be recorded by the camera, and the transmission matrix
$\mathbf{A}$ is unknown. We show that even without knowing $\mathbf{A}$, we can
recover the unknown phase of $\mathbf{y}$ for some equivalent transmission
matrix with the same distribution as $\mathbf{A}$. Our method is based on two
observations: first, conjugating or changing the phase of any row of
$\mathbf{A}$ does not change its distribution; and second, since we control the
input we can interfere $\mathbf{\xi}$ with arbitrary reference signals. We show
how to leverage these observations to cast the measurement phase retrieval
problem as a Euclidean distance geometry problem. We demonstrate appealing
properties of the proposed algorithm in both numerical simulations and real
hardware experiments. Not only does our algorithm accurately recover the
missing phase, but it mitigates the effects of quantization and the sensitivity
threshold, thus improving the measured magnitudes.
