two wells 14 and 15 of the first embodiment another well or the third well 16 is provided effect of the third well 16 will be described in the first and second wells 14 and 15 wavelengths of respective inter band transitions are made equal to each other and the polarization dependency of gain is eliminated in a state of low density carrier injection however in hh and lh of the respective wells 14 and 15 polarization dependency of gain occurs in a state of high density carrier injection because of a difference in effective mass and influence of a level next to the ground level anticipating the injection state to be used prior to use and shifting ground levels of the respective wells is an effective solution but in this case polarization dependency would occur in the low density carrier injection range the third well 16 is provided for compensating for this drawback and eliminates the polarization dependency in a state of high density carrier injection namely in the third well 16 the ground level is a level of lh to compensate for the optical transition of lh which is disadvantageous at the time of high density injection at the time of low density injection the two wells 14 and 15 serve to eliminate the polarization dependency during low density carrier injection while the three wells 14 15.