Stanford researchers have patented a design for electronically pumping photonic crystal membrane nanocavities using a lateral p-i-n junction. The p-i-n junction can be defined by any number of methods, including ion implantation, regrowth, or diffusion doping.