Ptychography of pure quantum states