in a diffraction element , a diffraction grating is formed with a grating pitch having different diffraction angles in accordance with a wavelength of a laser light beam incident thereon . the wavelength is variable in accordance with an environment temperature . the diffraction element is made of a material having a linear expansion coefficient which causes thermal variation in the grating pitch enough to compensate at least a part of the diffraction angle variation due to environment temperature change .