(A) Schematic diagram of a Fourier transform pulse shaping setup, consisting of a pair of diffraction gratings (G1 and G2), a pair of parabolic mirrors (PM1 and PM2), and a cascaded sequence of metasurfaces matrices Si (i = 1, 2, … n). Each matrix Si consists of m different metasurfaces (Mi,j=1 to Mi,j=m). An input optical pulse upon propagation through this setup is transformed into a shape-modified output pulse of tailored temporal characteristics. (B) Pulse shaping at the Fourier plane of the setup. A given metasurface Mi,j is discretized to N individual sectors to treat in parallel the broad range of frequencies (ωk for k = 1 to N), imparting a complex transfer function ti,keiφi,k for each ωk. The spectral components of the input pulse are treated in parallel through a location specific effective masking function of complex amplitude tkeiφk, where and .