A diffraction grating of the present invention includes a first block
(101) and a second block (102). The first block (101) is made up of a
plurality of input waveguides (103), a slab waveguide (104), a delay
waveguide array (105) and narrow grooves (106): each of which being
filled with resin. The second block (102) is made up of a plurality of
input waveguides (107), a slab waveguide (108) and a plurality of output
waveguides (109). Since a circuit is cut off at the ends of the arrayed
waveguides, a relative phase can easily be measured. The resin has
undergone a refractive-index adjustment and compensates a phase error.