A gated few-photon pulse enters the device and is converted to electron-hole pairs through photoabsorption. Electric fields lead to the separation of the electron-hole pairs. The electrons are taken to an electronically defined well near a field-effect transistor. (The holes are discarded through a