Algorithmic phase retrieval