Tuning two-dimensional electron (hole) gases at LaInO$_{3}$/BaSnO$_{3}$ interfaces: Impact of polar distortions, termination, and thickness

Two-dimensional election gases (2DEG), arising due to quantum confinement at interfaces between transparent conducting oxides, have received tremendous attention in view of electronic applications. The challenge is to find a material system that exhibits both a high charge-carrier density and mobility, at and even above room temperature. Here, we explore the potential of interfaces formed by two lattice-matched wide-gap oxides of emerging interest, $\textit{i.e.}$, the polar, orthorhombic perovskite LaInO$_{3}$ and the non-polar, cubic perovskite BaSnO$_{3}$, employing density-functional theory and many-body theory. We demonstrate that this material combination exhibits all the key features for reaching the goal. For periodic heterostructures, we find that the polar discontinuity at the interface is mainly compensated by electronic relaxation through charge transfer from the LaInO$_{3}$ to the BaSnO$_{3}$ side. This leads to the formation of a 2DEG hosted by the highly-dispersive Sn-$s$-derived conduction band and a 2D hole gas of O-$p$ character, strongly localized inside LaInO$_{3}$. Remarkably, structural distortions through octahedra tilts induce a depolarization field counteracting the polar discontinuity, and thus increasing the $critical$ (minimal) LaInO$_{3}$ thickness, $t_c$, required for the formation of a 2DEG. These polar distortions decrease with increasing LaInO$_{3}$ thickness, enhancing the polar discontinuity and leading to a 2DEG density of 0.5 electron per unit-cell surface. Interestingly, in non-periodic heterostructures, these distortions lead to a decrease of $t_c$, thereby enhancing and delocalizing the 2DEG. We rationalize how polar distortions, termination, and thickness can be exploited in view of tailoring the 2DEG characteristics, and why this material is superior to the most studied prototype LaAlO$_{3}$/SrTiO$_{3}$.


INTRODUCTION
Heterostructures of transparent conducting oxides (TCOs) have attracted the attention of researchers in view of both fundamental research as well as potential applications [1,2]. Among them, interfaces of the perovskite materials LaAlO 3 and SrTiO 3 are most studied prototypes due to the emergence of fascinating physical phenomena including superconductivity, ferromagnetism [3], and interfacial two-dimensional electron gases (2DEG) [1]. The latter is mainly a consequence of the electronic reconstruction to compensate the interfacial polar discontinuity induced by deposition of the polar material LaAlO 3 formed by alternatingly charged (LaO) + and (AlO 2 ) − planes on a neutral, TiO 2terminated SrTiO 3 substrate. The 2DEG density confined within the SrTiO 3 side of the interface can reach 0.5 electrons (e) per a 2 (a being the lattice parameter of SrTiO 3 ), corresponding to ∼ 3.3 × 10 14 cm −2 for a complete compensation of the formal polarization induced within LaAlO 3 [4]. However, in real samples, the presence of defects impact both, polar discontinuity and electronic reconstruction, and thus carrier mobilities [5]. This includes cation intermixing [5,6], oxygen vacancies [7], edge dislocations [8], and changes in surface stoichiometry [9]. Overall, the electron mobilities at such an interface are very sensitive to growth conditions [5]. Besides these extrinsic effects, the low interfacial mobility of this material system is also caused by the low-dispersion (large effective electron masses) of the partially occupied Ti-d states. Further, scattering of electrons within these bands induced by significant electron-phonon coupling (EPC) decreases the mobility from 10 4 cm 2 V −1 s −1 at low temperature, to 1 cm 2 V −1 s −1 at room temperature [1,10]. * aggoune@physik.hu-berlin.de According to the polar-catastrophe model, in a perfect LaAlO 3 /SrTiO 3 interface, the formal polarization (P 0 LAO ) allows for an insulator-to-metal transition at the interface beyond a certain thickness (t c ) of LaAlO 3 . Estimating this quantity by considering the energy difference between the valence-band edge of LaAlO 3 and the conduction-band edge of SrTiO 3 [4,11], one obtains a value of 3.5 unit cells. Higher t c values reported theoretically and experimentally, are due to structural relaxations, i.e., polar distortions that induce a polarization opposite to P 0 LAO . Such polar distortions that are not considered in the polar-catastrophe model, maintain the insulating character of the interface above 3.5 unit cells as confirmed theoretically [2,13] and later observed experimentally [14]. These distortions appear mainly in the LaAlO 3 side of the interface and arise due to changes inter-plane distances between La and Al planes upon interface formation. More recently, a competition between polar and nonpolar distortions through octahedra tilts has been observed [5]. Interestingly, the dependence of the octahdra tilts on the LaAlO 3 thickness can be exploited to tune the functionality of such interface [5]. We expect fascinating characteristics to occur when involving a polar material with pristine octahedral distortions such as a perovskite with an orthorhombic primitive cell.
Focusing first on nonpolar candidates as the substrate, cubic BaSnO 3 (BSO) has emerged as a most attractive system to overcome the limitations of SrTiO 3 , as it exhibits extraordinary room-temperature mobilities, reaching 320 cm 2 V −1 s −1 [16][17][18][19][20][21]. This value is the highest ever measured in a TCO and attributed to the low effective electron mass as well as to the long relaxation time of the longitudinal optical phonon scattering compared to SrTiO 3 [16,22,23]. In contrast to other suggested polar materials to be combined with BaSnO 3 , such as LaScO 3 [17], LaGaO 3 [18], or LaAlO 3 [24], LaInO 3 (LIO) has the advantage of being nearly lattice matched to BaSnO 3 and exhibiting a favorable band offset to con-fine a 2DEG within the BaSnO 3 side [1,[19][20][21]25]. Interestingly, it has an orthorhombic structure with tilted InO 6 octahedra, thus ideal for exploring also interfaces made of tilted and nontilted components.
In a previous work [27], it was shown by transmission electron microscopy (TEM) that LaInO 3 can be coherently grown on (001) BaSnO 3 , forming a sharp interface with negligible atomic disorder or misfit dislocations. This characteristic makes such an interface fascinating, since -as reported for LaAlO 3 /SrTiO 3 [8]-the interface conductivity and the mobility of the electron gas are enhanced by minimizing the dislocation density. Later it was shown by HRTEM analysis [8] that even if the BaO termination of the (001) BaSnO 3 surface is most favorable, the LaInO 3 /BaSnO 3 interface (termed LIO/BSO from now on) is characterized by the LaO/SnO 2 termination, which is key for the formation of a 2DEG. Thereby, cation intermixing at the interface was rated to be negligible. Therefore, the combination of LaInO 3 and BaSnO 3 exhibits all the key features and appears superior to LaAlO 3 /SrTiO 3 interfaces for reaching a high mobility 2DEG.
In this work, we explore the characteristics of ideal LIO/BSO interfaces, based on density-functional-theory (DFT), also employing many-body perturbation theory where needed. We focus only on intrinsic effects that may play a role in compensating the interfacial polar discontinuity, i.e., electronic reconstruction (formation of 2DEG) and possible structural distortions (formation of a depolarization field). Considering first periodic heterostructures, we address the competition between the polar distortions and the 2DEG charge density to compensate the interfacial polar discontinuity, upon increasing the thickness of the polar LaInO 3 block. Second, we discuss the impact of the interface termination that may give rise to either a 2DEG or 2D hole gas (2DHG). Finally, motivated by the advancements in synthesis techniques and in control of nanoscale structures [29], we provide a detailed comparison between the characteristics of the 2DEG in a periodic heterostructure and a non-periodic LIO/BSO interface, discussing how one can exploit dimensionality for tailoring the properties of the 2DEG. Overall, our results demonstrate the potential of this material combination for tuning and achieving high electron density and mobility.

Pristine materials
Before discussing the results for the periodic heterostructures LIO/BSO, we summarize the basic properties of the pristine materials. BaSnO 3 crystallizes in the cubic space group Pm3m and is built by alternating neutral (BaO) 0 and (SnO 2 ) 0 planes along the cartesian directions, making it a nonpolar material. Its static dielectric constant was estimated to be about 20 [16]. The calculated lattice constant of 4.119Å obtained with the PBEsol functional is in excellent agreement with experiment [16]. LaInO 3 has an orthorhombic perovskite structure of space group Pbnm, containing four formula units per unit cell. The optimized structural parameters a= 5.70Å, b= 5.94Å, and c= 8.21Å are in good agreement with experimental values [30]. The corresponding pseudocubic unit cell is defined such to have the same volume per LaInO 3 formula as the orthorhombic structure [for more details, we refer to the Supporting Information (SI) [31]]. Its calculated lattice parameter is about 4.116Å. In LaInO 3 , the InO 6 octahedra are tilted along the pseudocubic unit cell directions with an a − a − c + pattern according to the Glazer notation [32]. Considering the formal ionic charges of La (+3), In (+3), and O (-2), the charged (LaO) +1 and (InO 2 ) −1 planes along the pseudocubic unit cell [100], [010], and [001] directions make LaInO 3 a polar material (see supplementary figure  1).
The calculated lattice mismatch between the cubic BaSnO 3 and the pseudocubic LaInO 3 unit cells is about 0.07%, suggesting a coherent interface as confirmed experimentally [27]. In the latter work, it was shown that LaInO 3 can be favorably grown on top of a (001) BaSnO 3 substrate along the three pseudocubic unit cell directions, preserving the polar discontinuity at the interface, regardless of the orientation. Here, we consider the interface formed by [001]-oriented LaInO 3 (i.e., c= 8.21Å corresponds to the out-of-plane direction) on top of the (001) BaSnO 3 surface (see supplementary figure 1).
The electronic properties of both bulk BaSnO 3 and LaInO 3 have been reported by us in previous works [7,9], revealing PBEsol band gaps of 0.9 and 2.87 eV, and quasiparticle band gaps of 3.5 and 5.0 eV, respectively, as obtained by the G 0 W 0 correction to results obtained by the exchange-correlation functional HSE06 (G 0 W 0 @HSE06). In both cases, the valenceband maximum is dominated by O-p states, while, the conduction-band minimum has Sn-s and In-s character, respectively.

Stoichiometric periodic heterostructures
In Fig. 1 we show a comprehensive compilation of the electronic properties of the LIO/BSO interface in a periodic heterostructure. Thereby, n-type (LaO/SnO 2 ) and p-type (InO 2 /BaO) building blocks are periodically replicated in the out-of-plane direction (z ). In this case, the system is stoichiometric and ideally suited for investigating the electronic reconstruction due to the polar discontinuity. The BaSnO 3 block has a thickness of 10 unit cells which is enough to minimize the interaction with its replica. It is determined by making sure that the central part of the BaSnO 3 block behaves like in its bulk counterpart (see supplementary figure 2). The LaInO 3 block has a thickness of 12 pseudocubic unit cells. (We use the notation LIO 12 /BSO 10 heterostructure in the following). Since the LaInO 3 block has different terminations on the two sides, a formal polarization of P 0 = e/2a 2 =0.47 C m −2 , oriented from the (InO 2 ) −1 to the (LaO) +1 plane, is induced (black arrow in the bottom panel of Fig. 1). As BaSnO 3 is a nonpolar material, this gives rise to a polar discontinuity at the interface.
The charge reconstruction is evident from the electronic band structure [ Fig. 1(e)] showing that the combination of these two insulators has metallic character. From the local density of states (LDOS, per unit cell) depicted in panel (a) along the z direction, we can clearly see that the dipole induced within the LaInO 3 side causes an upward shift of the valence-band edge, evolving be-tween the (LaO) +1 and (InO 2 ) −1 terminations. This is also reflected in the in-plane averaged electrostatic potential shown in panel (b) (for more details see supplementary figure 9). At the latter termination, the valenceband maximum crosses the Fermi level inside LaInO 3 , leading to a charge transfer to the BaSnO 3 side in order to compensate the polar discontinuity. Consequently, the bottom of the conduction band of BaSnO 3 becomes partially occupied, giving rise to a 2DEG confined within three unit cells (∼10Å). A 2DHG forms in the LaInO 3 side localized within one pseudocubic unit cell (∼4Å). Integrating over these now partially occupied conduction states (see supplementary methods), we find that the 2DEG density reaches a value of 2.7 × 10 14 cm −2 i.e., ∼0.46 e per a 2 (a 2 being the unit cell area of bulk BaSnO 3 ). Obviously, the same value is obtained for the 2DHG when integrating over the now empty parts of the valence bands. The charge distribution shown in Fig. 1(d) reveals that the 2DEG is located mainly within the SnO 2 plane and exhibits Sn-s character. This highlydispersive s-band suggests high mobility, unlike the situation in LaAlO 3 /SrTiO 3 . These results demonstrate the exciting potential of such a material combination as an ideal platform for achieving a high-density 2DEG. We also highlight the importance of the well-confined 2DHG hosted by O-p states in view of p-type conductivity. We note that in SrTiO 3 /LaAlO 3 /SrTiO 3 , another heterostructures [35] formed by a polar and a nonpolar material, only recently the presence of a 2DHG has been confirmed experimentally [29]. The coexistence of highdensity well-confined electron and hole gases within one system as shown here, appears as a promising platform for exploring also intriguing phenomena such as longlifetime bilayer excitons [36] or Bose-Einstein condensation [37].

Polar distortions in stoichiometric periodic heterostructures
The 2DEG density reached in the periodic heterostructure LIO 12 /BSO 10 , being slightly lower than 0.5 e per a 2 , indicates that polar distortions are involved to partially compensate for the polar discontinuity. Looking into its optimized geometry, we find that the tilt of the octahedra decreases gradually from the LaInO 3 to the BaSnO 3 side [see Fig. 1 Consequently, the out-of-plane lattice spacing increases close to the interface by about 3% (see supplementary figure 2), in good agreement with an experimental observation [1]. We also find that the out-of-plane displacements of the inequivalent O atoms are not the same within all octahedra (see supplementary figure 2 and 3). Moreover, the distances between AO and BO 2 planes (A= Ba, La and B= Sn, In) across the interface are also unequal (see supplementary figure  2). Using a simple linear approximation for the local polarization based on Born effective charges (Z * ) [3,6] of the atomic species (calculated for the pristine materials), we obtain a qualitative trend of the out-of-plane polarization induced by such structural distortions (see supplementary discussion). We note that due to the tilt of the octahedra, calculating the polarization for such a heterostructure is less straightforward than for, e.g., LaAlO 3 /SrTiO 3 . We find that the structural distortions within the LaInO 3 side induce a polarization ∆P LIO that counteracts the formal polarization P 0 . Moreover, the polar discontinuity at the interface is reduced by structural distortions within the BaSnO 3 side, inducing ∆P BSO that is parallel to P 0 . The total polarization within the LaInO 3 side, P LIO total , shown in Fig. 1(g) is the sum of −∆P LIO and P 0 . As expected for the particular case of LIO 12 /BSO 10 , the average polarization within LaInO 3 (P LIO total ) is smaller than P 0 due to partial compensation by structural distortions. For this reason, the 2DEG density mentioned above is smaller than 0.5 e per a 2 . For better grasping the polar discontinuity at the interface, we plot the total polarization along the z direction [see Fig. 1(c)]. Focusing first on the particular case of LIO 12 /BSO 10 , we can clearly see that within the LaInO 3 side, it is smaller than P 0 and also non-negligible inside BaSnO 3 , making the polar discontinuity at the interface less pronounced. As we provide only a qualitative analysis of the polarization, we do not expect a full match between the values of the 2DEG and the corresponding polarization discontinuity. However, the obtained trend of the polarization strength is valuable to understand and explain the relationship between the calculated 2DEG density and the LaInO 3 thickness.

Impact of the LaInO 3 thickness in stoichiometric periodic heterostructures
Now, we fix the thickness of the BaSnO 3 building block to 10 unit cells and vary that of LaInO 3 between 2 and 12 pseudocubic unit cells, labeling the systems LIO m /BSO 10 (m=2, 4, 6, 8, 10, 12). Before discussing the results, we note that the critical thickness, t c , for an insulator-to-metal transition at the interface is about one pseudocubic LaInO 3 unit cell, when ignoring effects from structural relaxation as given by the polar catastrophe model [4,11]. This value is obtained as t c = 0 LIO ∆E/eP 0 LIO . Here, LIO ∼ 24 is the relative static dielectric constant of LaInO 3 [30,40], and ∆E= 1 eV represents the energy difference between the valence-band edge of LaInO 3  Focusing on the electronic charge, we find that at a thickness of 4 pseudocubic LaInO 3 unit cells, the density of the 2DEG is only about 0.03 e per a 2 [see Fig. 1 i.e., distinctively smaller than the nominal value of 0.5 e per a 2 . Increasing the LaInO 3 thickness, the 2DEG density increases progressively and reaches a value of ∼0.46 e per a 2 with 12 pseudocubic LaInO 3 unit cells. This means that the polar distortions are also non-negligible beyond the critical thickness. In Fig 1(g), we display the averages of ∆P LIO and ∆P total for the considered structures LIO m /BSO 10 , finding that the polar distortions (total polarization) is maximal (minimal) at two pseudocubic LaInO 3 unit cells and decreases (increases) with LaInO 3 thickness. ∆P BSO increases with LaInO 3 thickness, but it is smaller than its counterpart in LaInO 3 . As a result, the polar discontinuity at the interface increases with increasing LaInO 3 thickness [see Fig. 1 Hence, the 2DEG density increases accordingly in order to compensate it [see Fig. 1 For a more reliable estimation of the critical thickness of LaInO 3 for an insulator-to-metal transition, we evaluate ∆E by considering the quasiparticle band gaps of the constituents [7,9]. Applying a scissor shift to the PBEsol band offset leads to a quasiparticle value of ∆E=3.4 eV, in agreement with the band offset reported in Ref. [20] (see supplementary discussion). Thus, we obtain a t c =4 pseudocubic LaInO 3 unit cell which is increased by 3 pseudocubic unit cells compared to that given by PBEsol offset (one pseudocubic unit cell). For the relaxed structures, we estimate t c to be about seven pseudocubic LaInO 3 unit cells when considering quasiparticle band gaps, which is distinctively larger than the 4 pseudocubic unit cells derived from PBEsol [see Fig. 1(f)]. This result indicates that a thick LaInO 3 component is needed to reach high 2DEG densities in periodic heterostructures, as both sides contribute to the compensation of the polar discontinuity through atomic distortions. This result is inline with a previous theoretical discussion reported for oxide interfaces [13].
Proceeding now to the nature of the atomic distortions, we find that, in contrast to the LaAlO 3 /SrTiO 3 interface where the unequal distances between La and Al planes dominate [14], the unequal displacements of the inequivalent oxygen atoms are most decisive for the polar distortions in the LaInO 3 side of the interface (see supplementary figure 2). This behavior is governed by the gradual tilts of octahedra across the interface which facilitates the compensation of the polar discontinuity. This indicates that below the critical thickness, this compensation happens through such atomic distortions, rather than elimination by ionic intermixing or other defects, explaining the sharp interface and negligible intermixing observed experimentally [27]. The latter characteristic is crucial for achieving a high-density 2DEG beyond t c . The band offset at the interface shows that the conductionband minimum of BaSnO 3 is about 1.4 eV below that of LaInO 3 , confining the 2DEG at the BaSnO 3 side [see Fig. 1(a)].
Non-stoichiometric nn-type periodic heterostructure Adopting thicker polar building blocks, i.e., above 12 pseudocubic unit cells, the interaction between the n-type and the p-type interfaces is prevented. Due to the considerable computational costs, several models were proposed to predict the characteristics of such situation in oxide interfaces [13]. One of them is to consider nonstoichiometric structures, where the polar LaInO 3 block is terminated by a (LaO) +1 plane on both sides. In this case, termed nn-type periodic heterostructure, the system is self-doped as the additional (LaO) +1 layer serves donor. As the LaInO 3 building block is symmetric, the formal polarization P 0 is induced from the middle of the slab outwards on both sides, that compensate each other. In this way, the built-in potential inside the LaInO 3 is avoided, while the discontinuity at the LIO/BSO interface is preserved. To this end, we consider a periodic heterostructure formed by 10 BaSnO 3 unit cells and 10 pseudocubic LaInO 3 unit cells, which is large enough to minimize the interaction between the periodic n-type interfaces [see Fig. 2(bottom) and supplementary figure 6].
The electronic band structure, obtained by PBEsol, shows that this system has metallic character, where the partial occupation of the conduction band amounts to 1 e per a 2 [see Fig. 2(e)]. The corresponding effective electron mass, being 0.24 m e , is quite low compared with that of LaAlO 3 /SrTiO 3 interfaces (0.38 m e [35]), and suggests a high electron mobility. This value is close to that found for pristine BaSnO 3 (0.17 m e obtained by PBEsol, 0.2 m e by G 0 W 0 ) [9]. In pristine SrTiO 3 , a transition from band-like conduction (scattering of renormalized quasiparticles) to a regime governed by incoherent contributions due to the interaction between the electrons and their phonon cloud has been reported upon increasing temperature [41]. In BaSnO 3 , the relaxation time for the longitudinal optical phonon scattering is found to be larger compared to SrTiO 3 , contributing to the high-room temperature mobility reported for the Ladoped BaSnO 3 single crystals [23]. Based on this, a high room-temperature mobility is also expected at the here investigated interfaces as this material combination basically preserves the structure of the pristine BaSnO 3 [42]. Overall, significant polaronic effects are not expected. In both constituents, we find typical EPC effects on the electronic properties [7,9], i.e., a moderate renormalization of the band gap by zero point vibrations and temperature. Given the excellent agreement between theory and experiment that can explain all features of the optical spectra [7,9], we conclude that polaronic distortions do not play a significant role. Thus, we do not expect a dramatically different behavior at the interfaces.
Before analyzing the spatial charge distribution, we note that in a pristine symmetric LaInO 3 slab, the electronic charge accumulates on its surfaces, accompanied by structural distortions that tend to screen the discontinuity of the polarization. Combined with BaSnO 3 , the polar distortions vanish at the LaInO 3 side but appear in the BaSnO 3 building block and are accompanied by a charge redistribution [see Fig. 2(a) and (c)]. In Fig. 2(c), we display the polarization induced by the structural distortions along the slab. We find that the gradual decrease of the octahedra tilt from the LaInO 3 to the BaSnO 3 side enlarges the out-of-plane lattice spacing at the interface and enhances the unequal oxygen-cation displacements within the BaSnO 3 side (see supplementary figure 6). This, in turn, induces a gradually decreasing polariza-  Fig. 2(a)]. This value is also inline with that estimated for the stoichiometric periodic heterostructure LIO 12 /BSO 10 (∼ 1.4 eV). Such an offset is crucial for confining the 2DEG in order to reach a value of 0.5 e per a 2 [see Fig. 2(a) and (d)].
Note that here, we can determine the band offsets by considering the respective quasiparticle gaps of the pristine materials [7,9] as well as an alternative approach based on the electrostatic potential [10] (see Fig. 2(b) and supplementary discussion). We find that, the conduction-band offset between the middle of the BaSnO 3 and LaInO 3 blocks is almost the same when using quasiparticle or PBEsol band gaps [see Fig. 2(b) and (f)]. Thus, we conclude that PBEsol is good enough to capture band offset and charge distribution at the interface. The latter conclusions are confirmed by calculations using HSE06 for a smaller (feasible) nn-type system (see supplementary figure 7).
Non-stoichiometric pp-type periodic heterostructure Calculations for a periodic pp-type heterostructure (see supplementary figure 5) with (InO 2 ) −1 termination on both sides of LaInO 3 reveal a 2DHG with a density of 0.5 e per a 2 . Interestingly, the hole stays at the LaInO 3 side, confined within one pseudocubic unit cell. Like in the periodic nn-type heterostructure, the tilt of the octahedra decreases gradually from the LaInO 3 to BaSnO 3 side. However, the BaO termination in the pp-type case favors nonpolar distortions within the BaSnO 3 side, i.e., equal displacements of the inequivalent O atoms, while polar distortions appear only in the LaInO 3 side. Consequently, local dipoles are induced in the latter, pushing up its valence-band edge above that of BaSnO 3 (see supplementary figure 5). Hence, the 2DHG exhibiting O-p character, stays on the LaInO 3 side of the interface. It has been shown recently by a combined theoretical and experimental investigation [8] that the n-type interface is more favorable than the p-type interface. Since at the BaO-terminated p-type interface, the 2DHG stays within the LaInO 3 side it contributes less to the compensation of the interfacial polar discontinuity. In contrast, the SnO 2 -terminated n-type interface allows for electronic charge transfer to the BaSnO 3 side, forming a 2DEG that compensates the interfacial polar discontinuity more efficiently (see supplementary discussion).

Stoichiometric non-periodic interface
Now, we investigate the case of a non-periodic LIO/BSO interface, consisting of a thin LaInO 3 layer on top of a (001) BaSnO 3 substrate. Considering stoichiometric systems, we only focus on the n-type interface as it is predicted to be more favorable [8]. For BaSnO 3 , we find that 11 unit cells are enough to capture the extension of the structural deformations and the 2DEG distribution away from the interface. We then vary the thickness of LaInO 3 between one and eight pseudocubic unit cells, labeling the systems as LIO n /BSO 11 (n=1, 2, 4, 6, 8). In Fig. (bottom panel), we show the optimized geometry of LIO 8 /BSO 11 . The BaSnO 3 substrate terminates with a (SnO 2 ) 0 plane at the interface, and the surface termination of LaInO 3 is a (InO 2 ) −1 plane. Thus, LaInO 3 is stoichiometric and has a formal polarization of P 0 =0.47 C m −2 , oriented from the surface to the interface, as in the stoichiometric periodic heterostructures discussed above.
Electronic reconstruction, that leads to a metallic character, is evident from the resulting band structure, where the valence and conduction bands overlap at the Γ point [see Fig. (e)]. In the LDOS, we clearly see that the dipole induced within LaInO 3 causes an upward shift of the valence-band edge (most pronounced at the surface) which is also evident in the in-plane averaged electrostatic potential [see Figs. (a) and (b)]. At the surface, the valence-band edge crosses the Fermi level, leading to a charge transfer across the interface that counteracts the polar discontinuity [see Fig. (a)]. Consequently, the bottom of the conduction band becomes partially occupied within the BaSnO 3 side, giving rise to a 2DEG that is confined within five unit cells (∼ 20Å) [see Fig. (d)]. The 2DHG formed at the surface is localized within one pseudocubic LaInO 3 unit cell (∼4Å). In this case, the conduction-band minimum of the BaSnO 3 building block is about 1.7 eV below that of LaInO 3 [ Fig. 1(a)], in agreement with an experimental observation of 1.6 eV [20]. Integrating the LDOS over the region of these partially filled states, we find that the 2DEG density (and likewise the 2DHG density) reaches a value of 2.9×10 14 cm −2 i.e., ∼0.49 e per a 2 .
By increasing the LaInO 3 thickness from one to eight pseudocubic unit cells, the polar distortions (∆P LIO ) decrease, being accompanied by an electronic charge transfer from the surface to the interface [see Compared to the periodic heterostructure [ Fig. 1(c)], they are less pronounced at the BaSnO 3 side [Fig. (c)]. This enhances the polar discontinuity (see supplementary figure 8) and thus, the 2DEG density that reaches a higher value than in the periodic systems with similar LaInO 3 thickness [see Fig. (f)]. Focusing on the charge confinement, the conduction-band edge in the BaSnO 3 side is gradually shifted up when moving away from the interface as ∆P BSO is less pronounced. This allows an extension of the 2DEG up to five unit cells (∼ 20Å) in the BaSnO 3 (substrate) compared to three unit cells in the periodic heterostructure case [see Fig. (d)]. The enhanced polar discontinuity reduces the critical thickness to only two pseudocubic LaInO 3 unit cells compared to four found for the periodic heterostructure, when relying on PBEsol [see Fig. (f)]. Based on the quasiparticle band gaps, however, we estimate t c to be five pseudocubic LaInO 3 unit cells in the non-periodic system compared to seven in the periodic case. Overall tuning of the 2DEG charge density through the LaInO 3 thickness is possible, and remarkably, also the type of heterostructure (i.e., periodic or non-periodic) impacts its spacial distribution. Both aspects can be exploited to tune the characteristic of the 2DEG.
In view of realistic applications, it is worth considering the results presented here in the context of existing experimental research on LIO/BSO interfaces. A main challenge here is the quality of the BaSnO 3 substrate [44]. Previous experimental works [1,20] investigated a field effect transistor, formed by a LaInO 3 gate and a La-doped BaSnO 3 channel on a SrTiO 3 substrate. An enhancement of conductance with increasing LaInO 3 thickness was observed, but no indication of a critical thickness for an insulator-to-metal transition at the interface. A maximal 2DEG density of only 3 ×10 13 (0.05 e per a 2 ) was reported for 4 pseudocubic LaInO 3 unit cells, and a decrease beyond it. We assign the differences to our predictions for non-periodic interfaces mainly to the high density of structural defects (e.g, dislocations) due to the large mismatch (∼ 5%) between the channel and the substrate. The La doping, needed to compensate the acceptors induced by such dislocations, may cause an alleviation of the polar discontinuity at the interface and, hence, limit the 2DEG density. On the other hand, it makes the system metallic without a clear critical thickness. With the recent advances in achieving high-quality BaSnO 3 and LaInO 3 single crystals [7,30,44] as well as interfaces [8,27], our predictions open up a perspective for exploring interfacial charge densities in combinations of these materials in view of potential electronic applications. Conclusions In summary, we have presented the potential of combining nonpolar BaSnO 3 and polar LaInO 3 for reaching a high interfacial carrier density. Our calculations show that, depending on the interface termination, both electron and hole gases can be formed that compensate the polar discontinuity. The gradual decrease of octahedra tilts from the orthorhombic LaInO 3 to the cubic BaSnO 3 side increases the out-of-plane lattice spacing at the interface and governs the unequal oxygen-cation displacements within the octahedra. The latter distortions induce a depolarization field, counteracting the formal polarization in the LaInO 3 block and hampering electronic reconstruction, i.e. the formation of a 2DEG at the interface up to a critical LaInO 3 thickness of seven (five) pseudocubic unit cells for periodic (non-periodic) heterostructures. While the PBSEsol functional provides a good description of the interfacial charge-density distributions as well as the type of band offset, it fails to determine t c reliably, as the knowledge of the quasiparticle gaps of the pristine materials is required. The polar distortions (polar discontinuity) decrease (increases) with LaInO 3 thickness, leading to a progressive charge transfer until reaching a 2DEG density of 0.5 e per surface unit cell. The electronic charge density is hosted by a highly dispersive Sn-s-derived conduction band, suggesting a high carrier mobility. Overall, the 2DEG charge density can be tuned through the LaInO 3 thickness. Interestingly, also the type of interface (i.e., periodic or non-periodic heterostructure) strongly impacts its density and spatial confinement. All these effects can be exploited in view of tailoring the characteristics of the 2DEG.

Theory
Ground-state properties are calculated using densityfunctional theory (DFT), within the generalized gradient approximation (GGA) in the PBEsol parameterization [45] for exchange-correlation effects. All calculations are performed using FHI-aims [46], an all-electron fullpotential package, employing numerical atom-centered orbitals. For all atomic species we use a tight setting with a tier 2 basis set for oxygen, tier1+fg for barium, tier1+gpfd for tin, tier 1+hfdg for lanthanum, and tier 1+gpfhf for indium. The convergence criteria are 10 −6 electrons for the density, 10 −6 eV for the total energy, 10 −4 eVÅ −1 for the forces, and 10 −4 eV for the eigenvalues. Lattice constants and internal coordinates are optimized for all systems until the residual forces on each atom are less than 0.001 eVÅ −1 . The sampling of the Brillouin zone is performed with an 8 × 8 × 8 k-grid for bulk BaSnO 3 and a 6 × 6 × 4 k-grid for bulk LaInO 3 . These parameters ensure converged total energies and lattice constants of 8 meV per atom and 0.001Å, respectively.
For the heterostructures, a 6 × 6 × 1 k-grid is used. The in-plane lattice parameters are fixed to √ 2a BSO (a BSO being the bulk BaSnO 3 lattice spacing) (see supplementary figure 1). For the non-periodic systems, vacuum of about 150Å is included and a dipole correction is applied in the [001] direction in order to prevent unphysical interactions between neighboring replica. In this case, we fix the first two BaSnO 3 unit cells to the bulk structure to simulate the bulk-like interior of the substrate, and relax the other internal coordinates. For computing the electronic properties, a 20 × 20 × 1 k-grid is adopted for all systems. This parameter ensures converged densities of states and electron/hole charge densities up to 0.01 e per a 2 . Atomic structures are visualized using the software package VESTA [47].

Local density of states and charge densities
The local density of states per unit cell (LDOS) in the out-of-plane direction is obtained by summing over the atom-projected density of states of the atoms within the respective unit cell. The density of the two-dimensional electron gas (2DEG) is evaluated by integrating the LDOS of the occupied states between the conductionband minimum and the Fermi level (E F ) and summing over all planes i.e. AO (A = La, Ba) and BO 2 (B = Sn, In). Likewise, the hole-gas density (2DHG) is obtained from the corresponding integral over the unoccupied states between the E F and valence-band maximum. For the non-stoichiometric nn-and pp-type periodic heterostructures, we integrate over the states comprised between the mid gap and the Fermi level.

Structural properties
The primitive unit cell in BaSnO 3 contains 5 atoms, with highly symmetric (non-tilted) SnO 6 octahedra [see Supplementary figure 1(a)]. The pseudocubic LaInO 3 unit cell is defined as the structure exhibiting the same volume per LaInO 3 formula unit as the orthorhombic cell [see Supplementary figure 1(b)]. The calculated averaged pseudocubic lattice parameter is 4.116Å. In Supplementary figure 1(c) we show the top view of an interface where the in-plane lattice parameters are fixed to √ 2a BSO (a BSO being the bulk BaSnO 3 lattice spacing). Details on the structural parameters of the considered heterostructures are summarized in Table Supplementary  table 1. As shown in Supplementary figure 2(a) for the stoichiometric periodic heterostructure LIO 12 /BSO 10 , the out-of-plane lattice spacing increases locally due to the gradual change of the octahedra tilts, amounting to about +3% with respect to that of bulk BaSnO 3 at the interface. This finding is in very good agreement with experimental observations [1], reporting a local increase of about 2%. We also clearly see that 10 unit cells of BaSnO 3 are enough to minimize the interaction with its replica, since the out-of-plane lattice spacing in the middle of BaSnO 3 block is similar to its bulk counterpart [ Supplementary figure 2(a)]. A qualitative trend of the polarization induced by the structural distortions are estimated using the relative atomic displacements in the supercell together with the Born effective charges (Z * ) calculated for bulk BaSnO 3 and LaInO 3 , along the z direction. Such approach has been largely used in literature for the description of polarization effects in oxides interfaces [2]. The fact that it cannot be fully quantitative, is attributed to local dipoles induced in the heterostructures, which do not exist in the bulk, as well as to the possible appearance of a metallic Supplementary table 1. Structural parameters of the heterostructure geometries shown in Fig. 1 (stoichiometric periodic LIO12/BSO10), Fig. 2 (non-stoichiometric periodic nn-type LIO10/BSO10), and Fig. 3 (stoichiometric non-periodic LIO8/BSO11), shown in the main text, as well as in Supplementary figure 5 (non-stoichiometric periodic pp-type LIO10/BSO10). The non-stoichiometric nn-and pp-type systems are symetric and have overall nonpolar character.  character across the interface. As a consequence, polarization and 2DEG densities are not the same in the two models. However, the periodic heterostructures a nevertheless a valuable approach for analyzing trends, like how the polarization behaves with the thickness of the polar LaInO 3 block.
Z * are computed within the Berry phase approach [3] using exciting [4], an all-electron full-potential code, implementing the family of (L)APW+LO (linearized augmented planewave plus local orbital) methods. These Using a simple linear approximation [6], the local polarization per unit cell is written as where, Ω is the volume of the unit cell and Z * z,i is the Born effective charge of ion i along the z direction. the polar discontinuity. Reaching the critical thickness of 4 pseudocubic LaInO 3 unit cells, a 2DEG forms inside BaSnO 3 . Increasing the LaInO 3 thickness, the charge density increases and the polar distortions decrease. The latter behavior implies that the octahedral tilt within the LaInO 3 converges to that of the bulk counterpart upon increasing the thickness. The same behavior is found for the non-periodic systems, but with less pronounced structural distortions in the BaSnO 3 substrate [see also Fig. 3 (c), (f) and (g) in the main text].
Comparison between n-and p-type interfaces In Supplementary figure 5, we present the electronic properties of a non-stoichiometric periodic heterostructure, where the LaInO 3 slab terminates with an (InO 2 ) −1 plane on both sides (termed pp-type). The electronic band structure shows that this system has metallic character, where the the (former) valence band in LaInO In Supplementary figure 6, we compare the optimized geometries of nn-and pp-type periodic heterostructures. Before analyzing the latter, we note that in a pristine symmetric LaInO 3 slab with InO −1 2 termination, the hole charge accumulates on its surfaces, accompanied by structural distortions that tend to screen the discontinuity of the polarization. Combined with BaSnO 3 (pp-type periodic heterostructure), the hole charge stays at the LaInO 3 side. The structural distortions also appear only in the LaInO 3 side [see Supplementary figure 6(b)]. Thus, the interfacial polar discontinuity is less compensated than in the n-type interface, making the latter more favorable. This explains why, at the interface, (n-type) SnO 2 termination is predominantly found experimentally [8]. This is also confirmed by computing the formation energies, that differ by 0.05 eV per atom (-2.40 eV per atom compared to -2.45 eV per atom).

Band alignment in non-stoichiometric periodic heterostructures
To compute the band offset using the quasiparticle band gaps of the bulk materials BaSnO 3 and LaInO 3 [7,9], we use an approach based on the electrostatic potential that accounts for all electrostatic Supplementary figure 6. Properties of the non-stoichiometric periodic heterostructure. Out-of-plane spacing S1 (S2) between adjacent Ba (Sn) atoms within BaSnO3 and between adjacent La (In) atoms within the LaInO3 block, also indicated by arrows in the structure model for the (a) nn-type and (d) pp-type periodic heterostructure. The red lines indicate the spacing in the bulk counterparts. Displacement of oxygen atoms ∆z,O in the (b) nn-type and (c) pp-type models. For details see Supplementary figure 3. effects at the interface, i.e., charge rearrangements upon interface formation and interface dipoles [10]. We first estimate the energy shift between the in-plane averaged electrostatic potential of the pristine components (orthorhombic LaInO 3 and cubic BaSnO 3 ) and that of the periodic heterostructure [see Fig. 2(b) in the main text and Supplementary figure 5(b)]. This energy difference is used to shift the valence-and conduction-band edges calculated for the bulk materials in order to determine the corresponding band alignment in the heterostructure. We note that this approach provides the alignment only away from the interface as the potential-energy shift can be only estimated there [see Fig. 2(b) in the main text and Supplementary figure 5(b)]. We find that the conduction-band offset between BaSnO 3 and LaInO 3 is almost the same using the PBEsol gaps or the respective quasiparticle gaps [7,9] [see Fig. 2(f) in the main text]. Likewise, for the periodic pp-type heterostructure, a similar valence-band offset is found using PBEsol or the quasiparticle gaps [see Supplementary figure 5(f)]. We note that the band alignment exactly at interface can be evaluated from the LDOS only [see Figs. 1(a), 2(a), 3(a) in the main text and Supplementary figure  5(a)]. Overall, these results show that the PBEsol functional is good enough to capture band offset and charge distribution at the interface.

HSE06 calculation for validating the scissor-shift approach
To justify the scissor-shift approach considered above, we compute the electronic properties of a feasible heterostructure using HSE06 for comparison with PBEsol. For more information on its performance for oxide perovskites, we refer to calculations for pristine BaSnO 3 and LaInO 3 materials [7,9]. In Supplementary figure 7, we depict the results for a non-stoichiometric nn-type periodic heterostructure, formed by three BaSnO 3 unit cells and three pseudocubic LaInO 3 unit cells. Comparing panels (a) and (b), we clearly see that the LDOS obtained by HSE06 and PBEsol, respectively, have similar band alignment and shape within each unit cell. Form the right panels, we also see that the band edges are similar. Differences only appear in higher-lying energy bands (between 2 and 4 eV), attributed to the fact that these bands are formed by localized Ba-d and -f states as well as La-f orbitals which are better described by HSE06. Overall, the conduction-band edge is well captured by PBEsol. This can be attributed to the fact that the valence-(conduction-)band edge of both materials is made of delocalized p-states (s-states). This finding validates the critical thickness of 7 pseudocubic LaInO 3 unit cells estimated in the main text for the stoichiometric periodic heterostructure by relying on the offset given by PBEsol [LDOS, Fig. 1(a) in the main text] that is corrected by a scissor shift according to the quasiparticle gaps of the pristine materials [7,9]. Applying the same procedure, for the non-periodic interface, a critical thickness of five pseudocubic LaInO 3 unit cells is found.

Comparison between periodic and non-periodic systems
In the main text, we show that, for a given LaInO 3 thickness, the 2DEG density is higher in the nonperiodic heterostructures compared to periodic ones [see Fig. 3(f)]. As shown in Supplementary figure 9 for a thickness of eight pseudocubic LaInO 3 unit cells, the enhanced 2DEG charge density in the non-periodic system is due to the pronounced polar discontinuity at the interface. The latter is attributed to smaller polar distor-

Supplementary figure 7.
Non-stoichiometric periodic nn-type heterostructure: the system is formed by LIO3/BSO3 in the out-of-plane direction z (bottom), that is shared between panels (a), (b), and (c) as their horizontal axis. Local density of states per unit cell (LDOS) obtained using (a) HSE06 and (b) PBEsol. The Fermi level is set to zero, and the electron population of the (original) conduction bands is shown as shaded blue area. The corresponding band structures along X-Γ-M are shown in the right panels. (c) Distribution of the electron charge density obtained by integration over the occupied conduction states indicated by the blue area in panel (a). The electronic distribution obtained by PBEsol (from panel b) is shown for comparison. tions within the BaSnO 3 side. This, in turn, allows for an extension of the 2DEG up to five unit cells into the BaSnO 3 substrate. In the periodic heterostructures, the significant polar distortions in the BaSnO 3 side reduce the interfacial polar discontinuity and thus the electronic charge density. However, such distortions lead to a con-