Two-terminal reconfigurable and non-volatile photovoltaic detectors - Nature Nanotechnology