A semiconductor optical element has an active layer including quantum
dots. The density of quantum dots in the resonator direction in a portion
of the active layer in which the density of photons is relatively high is
increased relative to the density of quantum dots in a portion of the
active layer in which the density of photons is relatively low.