The working principle of nanowire photodetectors is based on the photoconductive effect and the photovoltaic effect. When light photons are absorbed by the nanowire, they generate electron-hole pairs. In the case of photoconductive detectors, these carriers increase the conductivity of the nanowire, which can be measured as a change in electrical current. For photovoltaic detectors, the electron-hole pairs are separated by an internal electric field, generating a voltage or current that can be directly measured.