Optimization of Nonlinear Phase Retrieval