A spectral filter comprises a planar optical waveguide having at least one
set of diffractive elements. The waveguide confines in one transverse
dimension an optical signal propagating in two other dimensions therein.
The waveguide supports multiple transverse modes. Each diffractive
element set routes, between input and output ports, a diffracted portion
of the optical signal propagating in the planar waveguide and diffracted
by the diffractive elements. The diffracted portion of the optical signal
reaches the output port as a superposition of multiple transverse modes.
A multimode optical source may launch the optical signal into the planar
waveguide, through the corresponding input optical port, as a
superposition of multiple transverse modes. A multimode output waveguide
may receive, through the output port, the diffracted portion of the
optical signal. Multiple diffractive element sets may route corresponding
diffracted portions of optical signal between one or more corresponding
input and output ports.