Holistic energy landscape management in 2D/3D heterojunction via molecular engineering for efficient perovskite solar cells

Constructing two-dimensional (2D) perovskite atop of 3D with energy landscape management is still a challenge in perovskite photovoltaics. Here, we report a strategy through designing a series of π-conjugated organic cations to construct stable 2D perovskites and to realize delicate energy level tunability at 2D/3D heterojunctions. As a result, the hole transfer energy barriers can be reduced both at heterojunctions and within 2D structures, and the preferable work function shift reduces charge accumulation at interface. Leveraging these insights and also benefitted from the superior interface contact between conjugated cations and poly(triarylamine) (PTAA) hole transporting layer, a solar cell with power conversion efficiency of 24.6% has been achieved, which is the highest among PTAA-based n-i-p devices to the best of our knowledge. The devices exhibit greatly enhanced stability and reproducibility. This approach is generic to several hole transporting materials, offering opportunities to realize high efficiency without using the unstable Spiro-OMeTAD.


INTRODUCTION
Perovskite solar cells (PSCs) have emerged as a strong candidate for future photovoltaic technology (1)(2)(3)(4). However, achieving high efficiency together with long-term stability is still a challenge (5)(6)(7). More recently, the strategy of constructing two-dimensional/threedimensional (2D/3D) heterostructures to passivate interface defects and improve stability has contributed to some of high-efficiency devices, including the record-performing PSCs (8)(9)(10)(11)(12)(13)(14). These studies have also revealed that energy level alignment at the 2D/ 3D heterojunction is crucial for efficient charge transfer (15,16). However, the methods of managing energy level alignment are limited to phase control of 2D perovskites (i.e., the thickness of the inorganic layers), owing to the insignificant contribution of conventional organic ligands to the density of states at the band edges in 2D perovskites (17).
Here, we developed a series of bulky semiconducting ligands with tunable energy levels that can form stable 2D perovskites (Fig. 1A). These π-conjugated ligands provide an opportunity for manipulating energy level alignment at 2D/3D heterojunctions through rational design of organic cations, thereby allowing more efficient hole extraction and reducing interface charge accumulation (18). Furthermore, the reduced energy level offset between the valence band maximum (VBM) of inorganic sheets and the highest occupied molecular orbital (HOMO) of conjugated organic layers in 2D perovskites, as well as preferable ligand packing geometry, allows more efficient hole transfer through the out-of-plane direction (19,20). This holistic energy landscape management of 2D/3D heterojunction in PSCs, together with the improved interface quality between perovskite and polymeric hole transporting layer (HTL) via π-conjugated ligands, enabled the demonstration of a remarkable power conversion efficiency (PCE) of 24.6% for poly(triarylamine) (PTAA)-based devices with n-i-p structure. The fine-tuned conjugated ligands allow more stable 2D structures and suppress interlayer ion migration, which result in improved photostability and thermal stability.

2D perovskite structures and properties
Our general design strategy of the ligands is tethering an ammonium anchoring group to one end of a conjugated quaterthiophene unit (18,21) and having halogen substitution on the opposite end thiophene to manipulate the HOMO levels of the molecules (22). The chemical structures of the synthesized organic ligands feature different substituting groups, namely, F4Tm, Cl4Tm, and Br4Tm, all of which are derived from 4Tm (Fig. 1B). The synthesis of halogen-4Tm was based on electrophilic halogenation reactions to add functional groups and Stille coupling reaction to connect all the thiophene moieties together (details of synthesis in the Supplementary Materials). All ligands were converted to iodide salts through reactions with hydroiodic acid. The halogen substituent acts as an electron-withdrawing group that deepens the HOMO level of the ligands, from −5.21 eV for 4Tm to −5.25, −5.26, and −5.25 eV for F4Tm, Cl4Tm, and B4Tm ligands, respectively (fig. S1 and table S1).
Within the 2D perovskite structures formed with these ligands, type II band alignments are formed, because of the small bandgaps and shallow HOMO levels of the conjugated ligands (Fig. 1C). The type II alignment results in quenched photoluminescence observed from these 2D perovskite thin films ( fig. S2). Unlike the conventional wide-bandgap ligands that usually form type I artificial quantum wells in 2D perovskites and generate energy barriers for out-ofplane charge transfer, the shallow HOMO levels of conjugated ligands reduce the energy barriers for hole transfer. However, the shallow HOMO level of 4Tm creates a reverse energy level offset with inorganic layers in 2D perovskites, which, in turn, can potentially trap holes. The halogen-4Tm reduces the energy level offsets, suggesting minimal energy barriers and a decreased probability of hole trapping, which, in principle, could facilitate out-of-plane hole transport within 2D perovskite structures.
To gauge the effect of molecular configuration on intermolecular packing, we further examined the single crystals of 2D perovskites formed with different ligands (Fig. 2, B to D). Single crystals of (Cl4Tm) 2 PbI 4 were obtained by slow-cooling method, while solvent diffusion method was applied to grow crystals of (Br4Tm) 2-PbI 4 (details in the Supplementary Materials). For F4TmI, suitable crystal specimens for accurate single-crystal structure determination proved challenging and resulted in high R-factors, although several attempts have been made, which is probably due to the weak interactions between F4Tm layers ( fig. S5). The average inplane Pb─I─Pb bond angle is 151.6°and the Pb─I bond length is 3.17 Å (horizontal) in (Cl4Tm) 2 PbI 4 . We observed a small distance of 3.2 Å between alternating Cl─Cl atoms within two Cl4Tm layers, which indicates the existence of weak halogen interaction (considering the 1.75-Å van der Waals radius of a single chlorine atom) and could contribute to the stabilization of the structure. The (Br4Tm) 2-PbI 4 single-crystal structure was resolved with chloroform solvent molecules trapped between the ligand layers, from which Br─Cl halogen interaction between Br4Tm and chloroform were observed because of the shortened interatom distance. Because of solvent intercalation, the inorganic lattice of (Br4Tm) 2 PbI 4 has less distortion compared with (Cl4Tm) 2 PbI 4 , with the average in-plane Pb─I─Pb bond angle as 152.6°and Pb─I bond length as 3.14 Å (horizontal). However, part of the conjugated ligand molecules in (Br4Tm) 2 PbI 4 crystal structure exhibit more distortion compared to (Cl4Tm) 2-PbI 4 , which could increase the formation barrier of this 2D structure (25).
To understand the relationship between crystal structures and the electronic properties, we applied time-resolved microwave conductivity (TRMC) measurements to characterize the out-ofplane carrier transport in 2D perovskite thin films (Fig. 2E) (13,26). The (Br4Tm) 2 PbI 4 sample has the highest yield-mobility product, which is a factor of 2 to 4 larger than that of (Cl4Tm) 2 PbI 4 and (4Tm) 2 PbI 4 . However, the (F4Tm) 2 PbI 4 sample exhibits obviously lower mobility, which could be correlated with the difficulty of achieving high-quality (F4Tm) 2 PbI 4 single crystal and the repulsion between fluorine atoms. We also performed conductive atomic force microscopy (cAFM) to examine the spatial distribution of the current path in these thin films (Fig. 2F). In agreement with the TRMC results, the (F4Tm) 2 PbI 4 sample exhibits the lowest conductivity, while the (Br4Tm) 2 PbI 4 sample preserves the highest conductivity. The higher out-of-plane conductivity of the (Br4Tm) 2 PbI 4 thin film than the Cl4TmI sample has also been confirmed with single-crystal conductivity ( fig. S6). The single-crystal structures show that the outer thiophenes in (Cl4Tm) 2 PbI 4 crystals favor in-plane edge-to-edge arrangement between the neighboring Cl4Tm layers, similar to 4Tm samples, which may not support efficient charge transfer ( fig. S7). In contrast, the (Br4Tm) 2 PbI 4 crystal exhibits face-to-face ligand packing geometry, thus exhibiting higher out-of-plane conductivity (23,25,27,28). However, the cAFM images reveal that (Br4Tm) 2 PbI 4 thin film, although having higher conductivity, has greater heterogeneity in the current path distribution, which may result from the nonuniform crystallinity and the potential higher formation energy of this 2D structure.

2D/3D heterostructure formation and characterization
We then investigated the formation of 2D/3D heterostructures on the surface of 3D perovskites for photovoltaic devices. The 2D structures were formed by means of coating the corresponding ligand solution on the surface of 3D perovskite, followed by thermal annealing. To enhance the 2D perovskite signal for XRD characterization, we extended the reaction time between 3D perovskite and the ligands by dropping the ligand solutions and waiting for 60 s before spinning. The thin-film XRD suggests that n = 1 2D structures form with all the investigated ligands, as evidenced by the diffraction peaks at low angles (<10°) (Fig. 3A), which match with the peaks from pure 2D perovskite thin films. The minor shift of the lowangle peaks from pure 2D perovskites to the 2D/3D heterostructures may be induced by the slight lattice distortion caused by 2D/3D interfacial strain. Only the n = 1 phase is formed on the surface with horizontal orientation, while high-n number phases are absent for all ligands investigated. We ascribe the stability of 2D structures, the rigidity of the ligands, and their unlikely penetration into the 3D structure due to steric bulk, all as factors that prevent formation of other phases during the treatment. The exclusive formation of n = 1 phase in 2D/3D junctions distinguishes these ligands from conventional small ligands and eliminates the influence of phase impurity in the surface characterizations. The AFM images indicate the unchanged surface morphology of perovskite with short-time ligand treatment ( fig. S8). The x-ray photoelectron spectroscopy (XPS) conducted on ligand-treated 3D perovskite thin films demonstrates the existence of oligothiophene ligands on the 3D perovskite surface from the peaks of S 2p at 164 eV ( fig. S9). Moreover, the characteristic peaks of F 1s (687 eV), Cl 2p (202 eV), and Br 3d (71 eV) show up in the XPS results of F4TmI, Cl4TmI, and Br4TmI thin films, respectively, which belong to the terminal substituents of the corresponding ligands.
We proposed to modulate the surface potential and 2D/3D band alignment via rational design of ligand molecular configurations. Through ultraviolet photoelectron spectroscopy (UPS) measurements ( Fig. 3B), we verified that ligand treatment upshifts the VBM in comparing with the control film (untreated), based on the aligned Fermi level, which is induced by the shallower HOMO levels of the conjugated ligands ( fig. S10 and table S2). The upshifted VBM generates a more p-type surface, which is expected to facilitate efficient hole transfer from perovskite to PTAA (with a reported HOMO at −5.2 eV) (21). The shallow HOMO levels of these conjugated ligands also allow them to directly extract holes from 3D perovskites, which is verified by time-resolved photoluminescence (TRPL) measurement with a biexponential decay and fast hole extraction process within 20 ns (fig. S11).
The work functions (WFs) have also been extracted from UPS measurements, which show notable differences between 4TmI and halogen-4TmI treatment. The 4TmI treatment notably reduces WF to 3.82 eV from the 4.22 eV of the control film. In contrast, the reduction of WF is smaller when halogen substitutions are introduced, showing less than 0.1-eV changes ( Fig. 3B and table S2). Kelvin probe force microscopy (KPFM) measurements revealed WF distribution differences at the ligand-treated surfaces (Fig. 3C). The average WF of 4TmI-treated surface reduced to 4.18 eV from 4.76 eV for the control film, while the change of WF of the halogen-4TmI-treated surface was negligible (Fig. 3D), which is in accordance with the trend observed in UPS analysis.
The band alignment formed with 4TmI surface treatment showed that the perovskite surface has shallower VBM compared with the bulk material, but a negative ΔWF could generate a potential well at the interface of the 2D/3D heterostructure and trap the electrons ( fig. S11). Unlike the downshifted VBM of other 2D/ 3D heterostructures formed with wide-bandgap ligands, the hole transfer benefits from the upshifted VBM of perovskite surface with conjugated ligands. However, the trapped and accumulated electrons at perovskite/HTL interface can cause charge trappinginduced defects (4,29). In comparison, the 2D/3D heterostructures formed with halogen-4TmI cause minimum WF shift, thus being unlikely to create a deep potential well at interfaces. The reduced charge-trapping defects in halogen-4TmI-treated films are evidenced by the enhanced photoluminescence (PL) intensities with a film structure of glass/3D perovskite/2D perovskite ( fig. S12). The reduced bimolecular recombination was further affirmed with intensity-dependent photoconductivity transient characterization from TRMC measurements ( fig. S13).
In addition, benefitted from the exceptional out-of-plane transport of the n = 1 2D perovskite structures containing Cl4TmI and Br4TmI, the coverage of 2D perovskite atop of 3D thin films does not decrease the carrier mobility ( fig. S14), which further indicates that the enhanced out-of-plane charge transport in 2D perovskites is critical to reduce charge transfer barriers at the 2D/3D heterojunction. The cAFM results even suggest slightly higher conductivity in Cl4TmI-treated films than that in Br4TmI samples ( fig. S15), which we attribute to the different formation energy of 2D/3D heterojunction with different ligands.

Carrier dynamics and device performance
We investigated the impact of these 2D/3D heterostructures on the photovoltaic performance by fabricating the PSCs using an n-i-p device architecture, ITO/SnO 2 /perovskite/PTAA/Au, with different surface ligand treatments. In agreement with our analysis, the Cl4TmI and Br4TmI surface treatment results in remarkably enhanced PCE, which outperformed the devices treated with 4TmI and F4TmI. A typical set of J-V curves of devices fabricated with different ligands is shown in Fig. 4A. The nonideal energy alignment of 4TmI and the unstable 2D crystal structure and low conductivity of (F4Tm) 2 PbI 4 are the limiting factors of these two ligands. Comparing with Cl4TmI, slightly less improvement with Br4TmI treatment was achieved, which could correspond to the different conductivity of the 2D/3D heterostructure formed with Cl4TmI and Br4TmI, as well as the heterogeneity of conductivity distribution in (Br4Tm) 2 PbI 4 thin film. To verify the reproducibility of the results, we provide the statistics for at least 38 devices of each condition (Fig. 4B and fig. S16). Furthermore, we compared our conjugated ligands to the devices passivated with butylammonium iodide and phenethylammonium iodide ( fig. S17). Neither of these commonly used ligands was able to produce comparable PCEs as Cl4TmI and Br4TmI, which suggests the critical role of the semiconducting ligands in 2D/3D heterostructures. In addition to the FA 0.9 MA 0.05 Cs 0.05 PbI 3 perovskite composition, we also investigated the effect of Cl4TmI surface treatment on PSCs with a composition of double halide (FA 0.88 MA 0.07 Cs 0.05 PbI 2.89 Br 0.11 ) and also found an increase in PCE ( fig. S18).
Note that we focused on PTAA doped with a hydrophobic Lewis acid as HTL, because it is considered as a more stable hole transporting material than Spiro-OMeTAD and does not need lithium salt for efficient doping, which eliminates a degrading factor of FAPbI 3 . In addition, PTAA is known to be less sensitive to processing conditions with no air aging requirement and leads to devices with better reproducibility. However, the limiting factor of the application of PTAA is the interface quality with perovskite, leading to low PCE values in conventional devices (30). Here, the designed conjugated ligands increase the hydrophobicity of perovskite surface ( fig. S19), forming perfect atomic registry to the perovskite lattice, and share similar aromaticity and improve the interface contact between perovskite and PTAA. This critical interface supports efficient hole transfer and results in increased open circuit voltage (V OC ) and fill factor (FF). With further optimization of ligand concentrations and passivation procedures (figs. S20 to S23), and together with an antireflection layer coating, a champion device with a PCE of 24.63% was achieved through Cl4TmI treatment (V OC = 1.125 V, FF = 84.32%, short circuit current density (J SC ) = 25.96 mA/cm 2 ) with small hysteresis comparing with control device (Fig. 4C and fig. S24), which is the highest reported PCE among PTAA-based PSCs to the best of our knowledge (31)(32)(33). A stabilized power output of 24.45% was also measured at maximum power point (Fig. 4C), and the external quantum efficiency (EQE) spectrum was confirmed with an integrated J SC of 25.5 mA/cm 2 ( fig. S25). The reproducibility of PTAA-based devices with our strategy has also been demonstrated by showing the small deviation from person-to-person variations of four different researchers ( fig. S26).
We further conducted space-charge-limited current (SCLC) to probe the hole mobilities in the hole-only devices (Fig. 4D). Devices treated with different conjugated ligands all exhibit almost two orders of magnitude increase in hole mobility compared with the control device, which highlights the critical role of interface treatment in improving the interface contact between perovskite and PTAA and enhancing charge transport efficiency (table S3) (34,35). Note that, although the F4TmI-treated perovskite thin film exhibits lower mobility than the control film by TRMC, the F4TmI device still shows higher hole mobility than the control device, further supporting the notion that the PTAA/perovskite interface is the major bottleneck at the device level. In addition, the trap densities extracted from the trap-filled limit voltage (V TFL ) in SCLC plots indicate reduced defect density in ligand-treated devices (table S3) (36). TRPL measurements on samples with a structure of glass/perovskite/ligand/PTAA were used to assess the defect densities at interfaces and the charge extraction processes ( Fig. 4E and  table S4). Ligand-treated films, benefitting from the gradient energy level alignment, exhibit faster charge extraction, as indicated by the fast decay of PL at initial stage. In the second stage of the biexponential decay, the PL lifetime is dominated by defect-induced monomolecular recombination. The lifetime of Cl4TmI-treated perovskite is 20.65 ns, two times higher than the 9.34 ns of the control sample that is correlated with the decreased defect density and increased V OC with surface passivation (37,38). The suppressed mobile ions in Cl4TmI-treated devices were further evidenced by the capacitance-frequency profiles of the device compared with the control device ( fig. S27). The decreased capacitance at a low-frequency region (<100 Hz) in the Cl4TmI-treated device reveals lessmobile ion response, which is correlated with the suppressed defect density at the surface (39). The tuned energy level alignment of perovskite surface not only results in efficient charge transfer but also affects the built-in potential (V bi ). The Mott-Schottky plot analysis of ligand-treated devices reveals higher V bi compared with that of control device, which is induced by the proper band alignment and the efficient hole extraction, among which Cl4TmI device exhibits the highest V bi ( fig. S28 and table S5). In addition, the improved energy level alignment also reduces the energy barriers for charge injection when the device is operated as a light-emitting diode (LED) and results in an electroluminescence EQE of 4.6% ( fig.  S29). This strategy is generically applicable to multiple small molecular and polymeric HTL materials with remarkably improved performance ( fig. S30), representing a critical design element for future PSC interfacial engineering.
Last, we tracked the thermal stability of the unencapsulated devices at 65°C under N 2 environment (Fig. 4F). The device treated with Cl4TmI maintained 80% of its initial efficiency after 2220 hours of heating, while the PCE of the control device dropped by 20% within 640 hours, showing only one-third of T 80 lifetime compared with the Cl4TmI-treated device. The improved thermal stability is benefitted from the inhibition of ion migration at interface with the 2D layer modification, characterized with timeof-flight secondary ion mass spectrometry (TOF-SIMS) ( fig. S31). We also checked the photostability of the encapsulated device under continuous illumination at an open-circuit condition in N 2 environment (Fig. 4G). The photogenerated charge carriers are unextractable under an open-circuit condition and can accumulate at interfaces, accelerating the degradation process. The Cl4TmItreated device exhibits 20% relative efficiency drop after 507 hours, while the control device decreased to 80% of its initial efficiency within 50 hours. In addition, the Cl4TmI-treated device maintained 80% of its initial PCE after 496 hours of continuous

DISCUSSION
We present the pivotal role of organic molecular design in holistically manipulating the physical and energy landscapes to reduce charge transfer barriers and defects at 3D/2D/HTL heterointerfaces. The synergistic impact of tunable energy levels and molecular packing geometry of conjugated ligands in 2D structures facilitates efficient out-of-plane charge transport in 2D perovskites, while the manageable energy alignment at 2D/3D heterojunction supports charge extraction in device level. Our strategy of molecular engineering enabled us to demonstrate a remarkable PCE of 24.6% for n-i-p PSCs based on PTAA HTLs, addressing long-standing interfacial issues in PTAA-based devices.

2D perovskite single-crystal growth
The (Cl4Tm) 2 PbI 4 single crystal was obtained by slow cooling method. Two milligrams of Cl4TmI, 5 mg of PbI 2 , 200 μl of 57 wt % (weight %) of hydroiodic acid (HI) solution, and 100 μl of H 3 PO 2 were added to 1 ml of ethanol. The mixture was heated at 100°C until dissolved and then the solution was slowly cooled to room temperature over the course of 60 hours. By filtration and ethanol wash, orange needle-like single crystals were collected.
The (Br4Tm) 2 PbI 4 single crystal was obtained by solvent diffusion method. A total of 0.01 M Br4TmI and 0.005 M PbI 2 were dissolved in gamma-butyrolactone at 70°C overnight. After dissolution, 0.1 ml of the precursor solution in a small vial was placed in a large vial with 3 ml of chloroform as antisolvent. Orange plate-like crystals precipitated out after 3 days. The crystallization process was conducted at room temperature in atmosphere.

2D perovskite film fabrication
Glass slides were cleaned using soap water, water, acetone, and isopropanol for 15 min in ultrasonic bath; dried with a nitrogen gun; and then were used as substrates for 2D perovskite thin-film fabrication. The clean substrates were treated with UV Ozone cleaner for 20 min before use. The precursor solution (200 μl) for spin-coating was prepared by dissolving 0.2 M ligands and 0.1 M PbI 2 in dry DMF/DMSO (in 4/1 ratio) at 70°C. For spin-coating, 20 μl of precursor solution was used with a spin speed at 2000 rpm for 30 s. In the end, as-prepared thin films were transfer to a heating plate to anneal at 100°to 200°C for 10 min. The above precursor solution preparation, spin,-coating and thermal annealing processes were conducted in a N 2 glove box.

PSC fabrication
The ITO/glass substrates were cleaned extensively with deionized water, acetone, and isopropanol. The cleaned substrates were UVO treated for 30 min before using. SnO 2 (15 wt%) stock solution was diluted with IPA:H 2 O (v/v = 1:1) to 2.14%, and then 0.61% polyethylenimine ethoxylated (PEIE) solution was added to the SnO 2 solution. The SnO 2 solution was spun-coated onto the ITO substrate at 3000 rpm, followed by annealing at 150°C for 30 min. After UVO treating the SnO 2 surface for 10 min, 10 mM KOH solution was coated on to the substrate at 3000 rpm, followed by another annealing at 150°C for 30 min. The SnO 2 substrates were UVO treated for 10 min before transferred into the glovebox to conduct the following process. The perovskite film was coated on SnO 2 substrate with a two-step method. In the first step, the PbI 2 solution (691.5 mg of PbI 2 , 19.5 mg of CsI, 900 μl of DMF, and 100 μl of DMSO) was spun-coated onto the substrate at 1500 rpm for 30 s, followed by annealing at 70°C for 1 min. After cooling down, the cation solution (90 mg of FAI, 5 mg of MAI, 10.8 mg of MACl, and 1 ml of IPA) was coated on the PbI 2 film at 1500 rpm for 30 s, followed by annealing at 150°C for 15 min under ambient environment (50 to 70% relative humidity). For FA 0.88 MA 0.07 Cs 0.05 PbI 2.89 Br 0.11 devices, the composition of cation solution changed to 90 mg of FAI, 3.2 mg of MABr, and 10.8 mg of MACl in 1 ml of IPA. The perovskite film was then transferred back to an N 2 -filled glovebox for ligand and HTL coating. The conjugated ligands were dissolved in a mixture of chlorobenzene and isopropanol (9:1 v/v) with a concentration of 0.5 mg/ml. Because of the properties of oligothiophene ammonia iodide salt, a mixture of polar solvent and nonpolar solvent was selected for better solubility. The concentration of the ligand solution was optimized on the basis of its solubility and influence on device performance. For ligand-treated devices, the ligand solution was coated on perovskite surface at 4000 rpm, followed by annealing at 100°C for 2 min. PTAA HTL was prepared in chlorobenzene solution (30 mg/ ml), doped with 11% TPFB. The doped PTAA solution was stirred at 45°C overnight to ensure full dissolving and doping of PTAA. TPFB, a hydrophobic Lewis acid, is selected here as the dopant to avoid the incorporation of small mobile Li + into the system while maintaining the hole mobility of PTAA. PTAA solution was spun on perovskite film at 4000 rpm for 30 s, followed by annealing at 80°C for 5 min. Last, 90 nm of gold was evaporated onto the device with shadow mask to determine the device area. For champion devices, 105 nm of MgF 2 was evaporated on to the glass substrate as an antireflection layer. Four pixels are made on each device substrates, and more than 10 batches of devices were fabricated to confirm the reproducibility.
Chemical characterization NMR spectra were collected using a Bruker AV-III-400-MHz spectrometer. The cyclic voltammetry was completed with a CHI660 electrochemical analyzer. The working electrode is a glassy carbon, and the counter electrode is a Pt wire. Ag/AgCl is the S C I E N C E A D VA N C E S | R E S E A R C H A R T I C L E reference electrode, and the electrolyte is 0.1 M TBAPF 6 , 1 mM ligand in dry dichloromethane. The measurement was conducted at a scan rate of 40 mV/s under a N 2 -purged environment. Ferrocene was added to the electrolyte to calibrate the reference electrode.

Thin film characterization
The 2D/3D thin films used for characterizations were prepared with the same methods used in device fabrication, unless otherwise noted. The thin-film XRD patterns were characterized with a Rigaku Smart Lab equipped with a Cu Kα source (λ = 1.54056 Å). The 2D layer formed on top of 3D thin films used for XRD characterization was prepared by allowing the ligand solution (0.5 mg/ml) to stay on the surface of 3D thin films for an extended time before spun off. Steady-state PL spectra were measured using a SpectraPro HRS-300. TRPL spectra were collected using a time-correlated single-photon counting apparatus (PicoQuant) with a picosecond pulsed laser at 447 nm as the excitation source. The water contact angle image was captured with Ramé-hart Model 200. Fractional absorptance was measured inside a Cary 6000i integrating sphere center-mounted sample holder to account for diffuse and specular scatter off the film and quartz substrate independently from absorption of photons by each film.
All TRMC measurements on the 3D/2D perovskite films were recorded at 650-nm excitation, over one order of magnitude in excitation power at the lowest fluence limit, while continuously purging the microwave cavity with dry nitrogen. For the n = 1 2D perovskite films, 512 nm was used as the excitation wavelength, with over two orders of magnitude in power. The pulse width of the 10-Hz excitation beam is approximately 5 ns, and photoconductivity transients were recorded over a 500-ns time window for all samples. Fractional absorptance was used to quantify the TRMC yield-mobility product data.
The UPS characterization was conducted with an H Lyman-α photon source (E-LUX 121), which emits photon energy of 10.2 eV, and the electrons were detected with a 5.85-eV pass energy using a multichannel plate detector and a hemispherical electron energy analyzer while the perovskite samples were biased at −5 V. The XPS measurements were performed with the same PHI 5600 ultrahigh vacuum system and used an Al Kα source (1486.6 eV; PHI 04-548 dual-anode x-ray source) for excitation.
Both the KPFM and cAFM images were obtained using the Asylum Research Cypher ES Environmental AFM in the air. The samples for KPFM and cAFM measurements were prepared on ITO/glass substrates as conductive substrates, and the AFM tips used during the measurement were Ti/Pt-coated AC240TM-R3 tips (Oxford Instruments). All the KPFM measurements were conducted with the same tip and repetitively checked with another tip. In addition, during each KPFM measurement, the perovskite sample was electrically grounded with a conductive sample holder, which allows the surface potential of all the samples having the same zero point. For cAFM, all the measurements were conducted in the dark. Both the 2D thin-film samples and 2D single-crystal samples were biased at 3 V, while the 3D perovskite thin films treated with different ligands were biased at 0.8 V. The 2D single-crystal samples were transferred on to the substrates through tape-peeling method.
Positive high-mass resolution depth profile was performed using a TOF-SIMS NCS instrument, which combines a TOF.SIMS5 instrument (ION-TOF GmbH, Münster, Germany) and an in situ scanning probe microscope (NanoScan, Switzerland) at the Shared Equipment Authority from Rice University.

Device characterization
The J-V curve characteristics were performed with simulated AM1.5G irradiation (100 mW/cm 2 ), produced by a Xenon lampbased solar simulator (Enlitech, SS-F5-3A). The light intensity was calibrated with Si reference cell certified by National Renewable Energy Laboratory (NREL). The active area was defined by Au electrode and was measured under a microscope (around 0.05 cm 2 ). The voltage scan was conducted under both reverse scan (1.2 to −0.1 V) and forward scan (−0.1 to 1.2 V). The voltage step is 40 mV from −0.1 to 0.8 V and 10 mV from 0.8 to 1.2 V. The devices were measured in a nitrogen-filled glovebox. The EQE results were collected at zero bias under an ambient environment on a homebuilt equipment using a preamplifier and a lock-in amplifier at a chopper frequency of around 161 Hz. The light source was calibrated with a reference Si (818-UV-L) diode. The SCLC characterization was performed with hole-only devices (ITO/PEDOT:PSS/ perovskite/PTAA/Au), and the voltage was scanned from 0 to 5 V with step size of 20 mV under a dark condition. The hole mobilities were calculated by fitting the curve using Mott-Gurney law in Child's regime with the following equation J ¼ 9ɛ 0 ɛ r μV 2 8L 3 where ε 0 is the vacuum permittivity, ε r (i.e., 25) is the relative dielectric constant, μ is the charge mobility, V is the applied voltage, L is the thickness of perovskite (700 nm), and J is the current density.
The defect density was calculated on the basis of the following equation where V TFL is the onset voltage of the trap filled limit region and q is the elemental charge. The capacitance-frequency measurements were performed at a frequency range of 1000 kHz to 100 mHz using a VersaSTAT electrochemical workstation (Ametek). The devices were measured with zero direct voltage bias and a sinusoidal perturbation of 20 mV. The Mott-Schottky analysis was performed on the same equipment at fixed frequency (10 kHz) with a scan from 0 to 1.2 V.

Device stability measurement
For maximum power point stability test, the unencapsulated devices were exposed under continuous LED light source under N 2 environment. The devices were biased with a voltage corresponding to their maximum power point, and the current was continuously tracked. For open-circuit stability test, the encapsulated devices were exposed under continuous LED light source under N 2 environment. All the stability tests were performed without temperature control, and the device temperature was around 45°C. For thermal stability test, the devices were located on a hot plate with designated temperature under N 2 environment.

Supplementary Materials
This PDF file includes:

Supplementary Text
Figs. S1 to S32 Tables S1 to S7 References