A semiconductor-based optical amplifier/attenuator is disclosed. An
apparatus according to aspects of the present invention includes an
optical waveguide disposed in semiconductor material. A first optical
beam having a first wavelength is to be directed through the optical
waveguide. The optical waveguide is optically coupled to receive a pump
optical beam having a pump wavelength. The pump optical beam also has a
power level sufficient to amplify the first optical beam via stimulated
Raman scattering (SRS) in the optical waveguide. A diode structure is
disposed in the optical waveguide. The diode structure coupled is to be
selectively biased to selectively control free carrier lifetimes of the
free carriers in the optical waveguide. This enables to selective
amplification or attenuation of the first optical beam output from the
optical waveguide.