A planar optical waveguide has sets of diffractive elements, each routing between
input and output optical ports diffracted portions of an input optical signal.
The diffractive elements are arranged so that the impulse response function of
the diffractive element set comprises a reference temporal waveform or its time-reverse.
A planar optical waveguide has NM sets of diffractive elements, each routing
between corresponding input and output optical ports corresponding diffracted portions
of an input optical signal. The NM diffractive element sets, NM input
optical ports, and N 1M optical switches enable routing of an input optical
signal any of the N input optical sources to any of the M output optical ports
based on the operational state of the corresponding 1M optical switch.