Fig. 4: Mechanism of the programmable photovoltaic effect.

a Sliding between the WS2 layers, which generates residual strain and a spontaneous electric field. b Current and differential conductance versus voltage bias. c Mapped photocurrent of a WS2 nanotube device before bias. The scale bar is 2 μm. d, e Mapped photocurrent of the WS2 nanotube device after negative bias (d) and after positive bias (e). Note the different scales of c–e. The laser intensity is 1 mW. f A WS2 nanotube device. g, h The layered structure of the WS2 nanotube before (g) and after (h) bias.