An optical waveform shaping device includes a first waveguide portion,
formed on a substrate, for transmitting the optical signal and
simultaneously absorbing a portion of the optical signal, which has a
signal level equal to or smaller than a predetermined value, so as to
shape the optical signal; and a second waveguide portion, formed on the
substrate, for transmitting the optical signal, which was transmitted
through the first waveguide portion, and simultaneously amplifying the
optical signal. The first waveguide portion may be formed using a
saturable absorber. A first electrode for supplying electric current to
the first waveguide portion so that the first waveguide portion is
provided with a function of absorbing the optical signal; and a second
electrode for supplying electric current to the second waveguide portion
so that the second waveguide portion is provided with a function of
amplifying the optical signal may also be provided.