a, In a neutral state, the ionization potential (IP) of an organic semiconductor is equal to the edge of its semiconductor HOMO band (HOMOSC). b, In conventional molecular doping with F4TCNQ, electrons within the HOMO band of the organic semiconductor are transferred to the LUMO level (dotted line) of the F4TCNQ, such that IP is close to the LUMO level of the dopant (LUMODo). The resulting donor–acceptor association minimizes the Gibbs free energy at equilibrium (orange line) such that no further charge transfer occurs. c, In anion-exchange doping, additional energy gain reduces the Gibbs free energy of the final state (red line), thus promoting the charge-transfer reaction. In this case, the IP of the organic semiconductor exceeds the LUMO level of the dopant approximately by the energy gain resulting from anion exchange (Δex). We determined the resulting shift in IP by photoelectron yield spectroscopy to be approximately 0.2 eV (Fig. 3d).