In a first aspect, an apparatus includes a substrate having a planar
surface, an optical demultiplexer located along the surface, and an
optical cross-connect matrix located along the surface. The optical
demultiplexer has N optical outputs. The optical cross-connect matrix has
a first array of N optical input ports and a second array of N optical
output ports. Each optical input port of the optical cross-connect matrix
is optically connected to a corresponding one of the optical outputs of
the optical demultiplexer. The output ports have a sequential ordering in
the second array that is a nontrivial permutation of a sequential
ordering of the corresponding input ports in the first array.