Hybrid input output (HIO) algorithm for phase retrieval