Although in this embodiment, the electrode of the optical device is coated with SiO2 or SiN to suppress reaction between the electrode metal and the solder metal, the same effect may also be obtained by such metal nitrides as TiN and AlN and such metal silicides as WSi.