Optical switching with gain realised with monolithic waveguide-based s
mart pixels is reported. In this smart pixel a high-power light beam p
ropagating in a waveguide structure is controlled by small surface-nor
mal optical input beams incident on a reference diode and a threshold
switch. A photoconductive switch, a reference diode and a high-contras
t waveguide modulator have been fabricated monolithically from the sam
e GaAs/AlGaAS double-hetero-p-i-n structure grown on a semi-insulating
GaAs substrate. Even with this first nonoptimised structure an optica
l gain larger than 150 has been achieved. The contrast ratio of the ou
tput signal was greater than 17dB. The switching energy is 2pJ, corres
ponding to 5fJ/mu m(2).