a Element-wise phase as a fraction of π of the 5 × 5 Vandermonde matrix implementing the discrete Fourier transform. Element-wise phase achieved by the inverse-design algorithm for b Nr = 1 and Nf = 4, with a fidelity of 0.8 and global phase of 0.099π and c Nr = 4 and Nf = 4, with a fidelity of 1 − 7.25 × 10−7 and global phase 0.596π. d One minus the maximum fidelities achieved by the inverse-design algorithm as a function of Nr and Nf. A value closer to zero indicates a better performance. Modulation parameters for c are provided in Supplementary Note 6.