A system including at least one input optical waveguide configured to receive an optical wave, at least one digital input port configured to receive a series of digital input values, each digital input value including two or more bits, and an optical modulator coupled to the input optical waveguide. The optical modulator includes an optical waveguide portion that includes multiple optical waveguide segments associated with diode sections positioned along the optical waveguide segments, in which the diode sections are configured to apply different respective modulation contributions to an optical wave propagating through the optical waveguide portion.