## Introduction

Transparent conducting oxides (TCO) have attracted the attention of researchers and engineers due to their wide range of potential applications. Among them, the perovskite BaSnO3, when doped with lanthanum, has turned out as the most promising candidate for the next generation of electronic devices. This is mainly due to the combination of extraordinary room-temperature mobility, reaching 320 cm2 V−1 s−1—which is the highest ever measured in TCOs—and a significant degree of transparency in the visible range1. Additionally, BaSnO3 exhibits excellent thermal stability. As such, it is already explored as a channel material in field-effect transistors and as an electron-transporting layer for highly efficient dye-sensitized solar cells1,2,3,4,5,6. The high mobility in this material is attributed to the low effective electron mass of the conduction band, composed of Sn-s states, as well as to the reduced carrier scattering due the large dielectric constant3,7. However, at higher doping densities, it was shown that ionized-impurity scattering may limit the mobility8. As an alternative to La-doping, an exciting perspective has been opened by polar-discontinuity doping, i.e., by forming interfaces or heterostructures of the nonpolar BaSnO3 with a polar oxide perovskite. In this case, a high-mobility two-dimensional electron gas can be formed in BaSnO3 without doping4,8,9,10,11,12,13,14.

Detailed knowledge of the pristine material is a prerequisite for the fundamental understanding of its doped or nanostructured counterparts and, consequently, for developing such promising applications. In the past years, the electronic and optical properties of BaSnO3 have been intensively investigated from both theory and experiment3,8,11,15,16,17,18,19,20,21,22,23,24,25,26,27,28. However, effective masses, band gaps, and absorption edges are still controversial. While the value of the fundamental gap is under debate, there is evidence of its indirect character, obtained by angle-resolved photoemission spectroscopy29 and absorption measurements22. Measured values3,15,16,17,18,20,21,22,23,24 for the indirect fundamental gap vary between 2.85 and 3.3 eV, while for the direct counterpart between 3.1 and 4 eV, with a majority of the latter being around 3.5 eV. The corresponding estimates of the difference between the two range between 0.15 and 0.5 eV. These diverse findings were assigned to the presence of uncontrolled defects as well as to differences in measurement techniques. Also, the experimental estimates of the effective electron mass are scattered, ranging between 0.19 and 0.65 m03,7,20,24,30.

From the theoretical side, density-functional-theory (DFT) calculations based on semi-local exchange–correlation (xc) functionals31 find an indirect fundamental gap that is underestimated by about 75%. Incorporating 25% of Hartree–Fock exchange, the hybrid functional HSE0632 naturally improves the results. The still too small gap (by about 15%) was explained by the significant dielectric screening included in the functional8,11,25,26,27. The calculated electron masses also widely scatter between 0.06 m0 and 0.9 m0, depending on the xc treatment20,27.

Absorption measurements show a weak signal at the onset3, suggesting it to be related to the indirect gap. This was later confirmed22, and a temperature-induced shift of about −0.18 eV was reported, going from 5 to 297 K. In addition, a recent theoretical study28 reveals phonon-assisted absorption across the indirect gap, also leading to the temperature dependence of the spectrum.

For an in-depth understanding of this puzzle, several parameters need to be disentangled: These are the values of the fundamental direct and indirect gaps, the impact of electron–phonon (e-ph) coupling in terms of zero-point vibrations (ZPV) and temperature, as well as electron–hole (e–h) interaction (exciton-binding energies) for direct as well as indirect transitions. To this end, we present a combined theoretical and experimental study of the electronic structure and the optical excitations of cubic BaSnO3.

Our theoretical analysis is based on many-body perturbation theory (MBPT) in the framework of the G0W0 approximation33,34 and the Bethe–Salpeter equation (BSE)35,36,37. To understand the role of xc effects on the electronic structure, we first compute the DFT band structure, employing both semi-local and hybrid xc functionals. Then, we obtain the quasi-particle (QP) bands by self-energy corrections. Through a detailed analysis of the dielectric function, we discuss the impact of e-h interaction on the absorption edge. We present the origin and the spatial distribution of the e-h pairs that dominate the different frequency ranges. Furthermore, we discuss the impact of e-ph coupling on the opto-electronic excitations at the onset.

The theoretical absorption spectrum is compared with electron energy loss spectroscopy (EELS) performed on a single crystal. Here we succeed in using EELS at high-energy resolution as a stand-alone technique for measuring the band gap as well as obtaining the dielectric function of BaSnO3. An advantage of this set-up is that transmitted electrons interact more strongly with matter than photons, transferring momentum to the orbital electrons, which enhances the measurability of indirect band gaps38. Moreover, it can be performed on a small crystal volume. In this way, one can select defect-free sample regions, offering the possibility to assess the properties of the perfect crystal. However, the observation of band gaps and other electronic features by EELS is typically hampered by spurious contributions from the surface and relativistic losses. Also for this particular material, the relatively high refractive index at the energy region close to the band gap indicates that relativistic losses contribute to the spectrum of electrons transmitted with accelerating voltages >60 kV. Purely experimental procedures have been proposed to generally address this issue, including low-voltage and off-axis EELS39,40. Nevertheless, these procedures are material specific and can make the analysis of the spectra difficult41,42. Recently, inverse algorithms based on modified Kramers–Kronig analysis (KKA) are emerging as an advantageous alternative to purely experimental methods43. In this off-line approach, a self-consistent estimate of the spurious contributions to the EELS spectra is obtained and removed from the experimental data. Here we demonstrate how this technique can be applied to reveal previously unknown valence properties and obtain a measurement of the dielectric function. With these measurement techniques, onsets of both direct and indirect transitions can be captured. To examine the possible role of indirect interband transitions on the absorption onset, the spectrum is also computed and analyzed at finite momentum transfer. Through temperature-dependent optical absorption measurements of the optical onset, we determine to which extent e-ph coupling renormalizes the band gap, complementing the quantitative comparison between theory and experiment to give a fully consistent picture.

## Results and discussion

### Electronic structure

At room temperature, BaSnO3 crystallizes in the cubic perovskite structure with space group Pm$$\overline{3}$$m as shown in Fig. 1. Its primitive unit cell containing five atoms exhibits a highly symmetric (non-tilted) SnO6 octahedra. The lattice constant of 4.127 Å obtained with the PBEsol functional is close to the experimental value of 4.116 Å1. As the band gap of this material is very sensitive to strain44, we adopt the latter in the following calculations to ensure a quantitative comparison between measured and computed quantities. Considering the formal ionic charges of Ba (+2), Sn (+4), and O (−2), BaSnO3 is formed by alternating neutral BaO and SnO2 layers along the [100], [010], and [001] directions, making it a nonpolar material.

We first present the electronic band structure obtained by PBEsol and HSE06. The corresponding values of the band gaps are reported in Table 1. The results for PBEsol shown in Fig. 2a, indicate an indirect band gap of 0.9 eV, with the valence-band maximum (VBM) and the conduction-band minimum (CBm) located at the R and the Γ point of the Brillouin zone, respectively. The direct gap, located at Γ, is about 1.39 eV. These values underestimate the experimental counterparts by about 70%. As shown in the middle panels of the figure, the VBM is mainly dominated by O-p states, while the highly dispersed conduction band around Γ exhibits mainly Sn-s character with some contribution from O-s orbitals (see Figs. 2a and 3). Ba-d states dominate the conduction bands between 5 and 9 eV, while Ba-f-derived bands appear above 9 eV. At the R point, the VBM and CBm are threefold degenerate, exhibiting O-p and Ba-d character, respectively (see also Fig. 3b). In addition, the CBm has some contribution from Sn-p states. At the Γ point, the VBM is also threefold degenerate, showing O-p character. The PBEsol band structure including spin–orbit coupling is shown in the right panel of Fig. 2a. The effect of spin–orbit coupling is small within the energy range between −9 and 12 eV, in agreement with a previous theoretical study45. Pronounced spin–orbit coupling appears in the valence band at about −10 eV, where the Ba-p bands split by about 1.80 eV. Since these strongly affected bands do not enter the calculation of the optical properties, spin–orbit coupling is neglected in the following. We also note that there is no change in the size of the indirect or direct band gap due to spin–orbit coupling.

Employing the hybrid functional HSE06, the indirect (direct) band gap increases to 2.70 (3.13) eV (see Table 1). These values that are in agreement with previous theoretical values25 still underestimate the experimental values by about 10%. Besides, we notice several changes in the band structure upon using HSE06. As evident from the left panel of Fig. 2b, conduction bands can be approximated by a simple scissor shift with respect to those given by PBEsol up to 10 eV above the CBm. For the bands lying above, the scissor approximation is not valid due to changes in the band dispersion as well as the band order caused by the localized nature of Ba-d and -f states. As an example, the Ba-f-derived bands at about 12 eV in the PBEsol band structure are shifted up by about 3 eV in HSE06.

To obtain the QP band structure, we apply a self-energy correction (Eq. (3)) in the G0W0 approximation. To this end, we consider both the PBEsol and the HSE06 band structure as a starting point, and the results are depicted in the middle and right panel of Fig. 2b, respectively. As shown in Table 1, the QP correction increases the indirect (direct) gap by approximately 1.7 eV, resulting in 2.62 (3.08) eV. Such a large magnitude of the self-energy correction reflects the strong electron-electron correlation effects in this material. Therefore, a pronounced starting-point dependence is expected. The QP gaps obtained starting from PBEsol are close to those of plain HSE06. G0W0 on top of the latter (G0W0@HSE06) leads to a further increase by about 0.8 eV, giving values of 3.50 (3.96) eV for the indirect (direct) gap. This method has turned out most reliable for computing the electronic properties of a wide range of oxides, including TCOs46. However, as expected, these values are larger than most experimental gaps as neither ZPV nor temperature effects are considered here. We will get back to this point in the section “Optical properties”.

Looking at the entire band structures, the QP correction to both PBEsol and HSE06 varies from band to band and depends on the k-point, specifically, within the bands where the localized Ba-d and Ba-f states appear. The bands derived from the latter (not shown) are located about 14 eV above the CBm in both G0W0@PBEsol and G0W0@HSE06 (see Fig. 2b). Overall, a simple scissor shift of the DFT conduction bands is sufficient to capture the features of the unoccupied bands up to 10 eV above the CBm. However, for computing optical spectra in a larger energy window (>10 eV), the QP band structure is needed23. Due to the computational complexity, we use the QP band structure obtained by G0W0@PBEsol and a scissors operator of 0.88 eV to recover the G0W0@HSE06 band gap.

Finally, we focus on the effective electron masses for which previous calculations have shown that it is sensitive to the xc functional20,27. Our results are summarized in Table 1. For visual inspection, we plot in Fig. 3a all band structures computed in this work in the vicinity of the band gap, setting the CBms to zero. Although there exists a dependency on the applied method, the differences stay within approximately 15%. While PBEsol and HSE06 calculations give about 0.21 and 0.17 m0, respectively, along the Γ–X direction, and the same values are found also along the Γ–M and Γ–R directions, we obtain 0.20 m0 with both G0W0@PBEsol and G0W0@HSE06. Compared with previous calculations, our results are close to those obtained by HSE068,11,25.

### Optical properties

We proceed with our analysis by investigating the optical properties of BaSnO3. Previous investigations reported the material to be transparent in the visible region and absorbing light from the near-ultraviolet range above 3 eV, with relatively low intensity, followed by intense absorption starting from 7 eV3,18,23,28,31. Difficulties to analyze the shape of the experimental absorption edge arise mainly due to the fact that the absorption onset originates from weak phonon-assisted transitions across the indirect band gap3,22,28. Further complications arise from the presence of defects and impurities18. EELS experiments in the scanning transmission electron microscope (STEM-EELS) turn out to be an advantageous experimental technique to address these difficulties. One reason already mentioned is that momentum exchange increases the relevance of indirect transitions. Additionally, when performed in the STEM-EELS mode, properties from relatively small volumes of material can be measured. This makes EELS desirable when larger defect-free samples are difficult to obtain. To get insight into the characteristics of the absorption onset, we present and analyze in the following computed and measured absorption spectra.

#### BSE calculations

In Fig. 4a, we depict the optical spectra of BaSnO3 computed by the BSE. In the displayed energy range, we identify two main regions, distinguished by their intensity. Between 3.86 and 7 eV (region I), the absorption is relatively low. Above that (region II), the intensity increases and a pronounced peak centered at about 8 eV is formed. The e-h interaction vastly redshifts the entire spectrum as observed from comparison with the independent particle spectrum. The absorption starts at 3.86 eV (optical gap), which is 100 meV below the direct gap (3.96 eV) where the independent particle onset sets in. Region I is governed by transitions between the O-p-derived valence bands and the Sn-s-derived conduction band. Bound excitons give rise to high spectral intensity in the region around the direct band gap. The lowest bound state, exciton A, arises from transitions around the VBM and the CBm at the Γ point of the Brillouin zone as highlighted in Fig. 4b. The corresponding e-h wavefunction is shown in Fig. 4d for a fixed hole position at the oxygen site. The electron is delocalized around the hole with a three-dimensional extension >20 Å, mainly spreading over the Sn-s and the O-s orbitals. This delocalized character reflects the rather low exciton binding energy of about 100 meV, which is comparable to values in other oxides, e.g., in ZnO47 and LaInO348.

Starting from 7 eV (region II), the spectral weight increases steeply, where the peak at around 8 eV stems from intensive transitions between O-p and Ba-d states. From the comparison with the corresponding peak in the independent particle spectrum, one can notice a significant red-shift by ~2 eV, induced by e-h attraction (Fig. 4a) while local-field effects are negligible. Exemplary, we consider excitation B that contributes to the peak. As evident from Fig. 4b, B is built of transitions between the VBM and the CBm at the R point (see also Fig. 3b). The corresponding excitonic wavefunction is characterized by a rather localized electronic distribution (2–3 unit cells) surrounding the hole whose position is fixed on an O atom for visualization (Fig. 4c). The electrons spread mainly over Ba-d and to less extent over Sn-s orbitals.

#### EELS measurements

In Fig. 4a, we also display the imaginary part of the dielectric function obtained by applying relativistic KKA (rKKA) to the EELS measurement. One can see excellent agreement with the BSE result in terms of peak positions, magnitude, and overall shape. The real part of the obtained dielectric function (not shown) indicates that the threshold for Cherenkov radiation is considerably surpassed only for the energy region above the band gap, i.e., ~5–10 eV. In fact, our result indicates that the impact of relativistic losses for the band-gap region is small, considering the experimental parameters and estimated thickness of this sample. For more details and comparison between theory and experiment of both real part and imaginary part at higher energies, we refer the reader to Supplementary Fig. 3. Focusing on the location of the absorption onset, we note that even after plasma cleaning (see “Methods” section), there is still some weak signal seen at about 2 eV (Fig. 4a). This might be mainly attributed to the remaining contamination at the BaSnO3 surface, but it apparently does not affect the spectrum at higher energies. Therefore, as depicted in Fig. 5a, we analyze the onset of the EELS spectrum in order to understand the characteristic of the absorption edge.

At first glance, we recognize two regimes, consisting of a region between 3 and ~3.5 eV where the signal only increases weakly, followed by a drastically increasing intensity above 3.5 eV. While the latter stems from strong direct transitions, we attribute the former to originate from indirect transitions. This characteristic is in line with recent experimental observations from optical absorption22, as well as with angle-resolved photoemission spectroscopy29. This finding is also supported by calculations on the independent particle level28.

To determine the absorption from the EELS spectra, we employ the model introduced in the section “Methods,” restricting the fit to the energy range between 2.5 to 4.5 eV (see Supplementary Methods for more details). The model parameters are adjusted using bounded optimization with the Levenberg–Marquart algorithm followed by dual annealing as implemented in the Python package HyperSpy49. Our results indicate that the onset of the indirect and direct transitions are at 2.97 ± 0.04 and 3.57 ± 0.04 eV, respectively. The difference between the two onsets of about 0.60 ± 0.06 eV agrees well with the calculated G0W0@HSE06 counterpart of ~0.45 eV (Table 1). As shown in Table 2, excellent agreement is found with the optical measurement of ref. 22. Overall, the measured values are also in agreement with most reported experimental values that are about ~3.019,23,24 and 3.5 eV18,19,21,29 for the onset of the indirect and direct transitions, respectively. Note that both values are not fundamental band gaps as the spectra include excitonic effects. A detailed comparison between experiment and theory will be given in the last part before conclusions.

We also estimate the effective electron mass from the dielectric function in the framework of the free-electron approximation50,

$${m}^{* }=\frac{{n}_{{{{{{\rm{eff}}}}}}}}{{\varepsilon }_{0}{\varepsilon }_{\infty }}{\left(\frac{e\hbar }{{E}_{{{{{{\rm{pl}}}}}}}}\right)}^{2},$$
(1)

where neff is the effective valence electron density, ε is the high-frequency dielectric constant, and Epl is the plasmon energy of the material. The latter is retrieved as the zero-crossing of the real part from the negative half-plane (see Supplementary Fig. 3). The obtained value of Epl ~ 25.2 eV is in excellent agreement with the free-electron prediction for this material using the experimental lattice parameter of 4.116 Å. The high-frequency dielectric constant obtained from the rKKA analysis is ε ~ 4.2, leading to an estimate for the effective electron mass of m* ~ 0.16 m0. This value is very close to the PBEsol result of ~0.17m0 and slightly lower but still comparable to the G0W0@HSE06 value of 0.20 m0. The deviation could be due to the usage of the simple free-electron framework. Overall, these values confirm experimental works reporting a low effective mass of ~0.19 m07,30, which suggests high electron mobility in BaSnO3.

#### Optical absorption

For a quantitative evaluation of band gaps and absorption onsets, vibrational effects must be considered. Previous finite-temperature calculations28 indicate that the onset of the indirect transitions at 300 K is about 0.19 eV below that at 0 K. The experimental counterpart was estimated to be about 0.18 eV (Table 2)22. In both cases, the role of ZPV was not known. To remedy this situation, we perform optical absorption measurements below room temperature. The resulting dependence of the energy onset is shown in Fig. 6. More information related to the optical absorption spectra, crystal growth, and sample preparation can be found in ref. 22.

The measured data are fitted using a single-oscillator model51, expressed by

$${E}^{{{{{{{{\rm{onset}}}}}}}}}\left(T\right)={E}^{{{{{{{{\rm{onset}}}}}}}}}\left(0\right)-S\langle \hbar \omega \rangle \left[\coth \left(\frac{\langle \hbar \omega \rangle }{2{k}_{{{{{{\rm{B}}}}}}}T}\right)-1\right],$$
(2)

where the parameter Eonset(0) is the energy onset at zero temperature, S is a measure of the e-ph coupling strength, and 〈$$\hbar$$ω〉 an average phonon energy48,51,52. Considering the whole temperature range, the best-fit parameters Eonset(0) = 3.17 eV, S = 6.5, and $$\hbar$$ω = 28 meV are obtained. Extrapolating to 1200 K, the energy is about 1 eV lower than at room temperature, reflecting the strong impact of e-ph coupling. Similar values have also been reported for other TCOs, such as In2O3 and SrTiO352,53. The high-temperature part of the curve can be fitted with linear regression, i.e., Eonset(0) − 2SkBT + S$$\hbar$$ω51. The ZPV contribution is, thus, given by S$$\hbar$$ω〉, which amounts to 0.182 eV. Going from 0 and 300 K, the onset decreases by about 0.367 eV, where 0.182 eV is assigned to ZPV and 0.185 eV to temperature effects, including lattice expansion. These values are comparable to those reported for other TCOs48,52. These values will be used as corrections to enhance the theoretical spectra as shown in Fig. 5b.

#### Comparison between theory and experiment

The BSE spectrum shown in Fig. 4a is formed only by vertical excitations. To describe transitions across the indirect gap, i.e., from R to Γ, we solve the BSE for momentum transfer qΓR = (1/2,1/2,1/2). Both spectra are depicted in Fig. 5b, where the correction to account for vibrational effects, estimated above, is included in the scissors shift (see “Methods” section).

We note that the latter spectrum has almost zero intensity at the onset, compared to that of q0. This is attributed to the use of the centrosymmetric BaSnO3 structure, i.e., we do not consider atomic displacements due to phonons. As such, transitions between the threefold degenerate VBM at the R point and the CBm at the Γ point belonging to the T2u and A1g representations of point group Oh, respectively, are dipole forbidden. However, mediated by vibrations, such transitions become optically allowed, as supported by calculations on the independent particle level28. Therefore, we attribute the measured weak absorption across the indirect band gap here (Fig. 5a) and in ref. 22 to the fact that phonons lower the symmetry of the here simulated ideal crystal. Such effect has previously been observed in other materials54,55,56. Importantly, our BSE calculation at finite momentum allows us to access the location of the first indirect transition as well as the amount of the excitonic effects. We note that the differences between the rKKA-EELS and the BSE (q = 0) spectrum in Fig. 5b are mainly due to ignoring temperature in the latter, which has been reported to reduce the intensity at the onset28.

In Table 3, we report the indirect QP gap, as given by G0W0@HSE06 at 0 K, and the optical gap obtained by the BSE. The latter is given by the first direct excitation (A) (Fig. 5b). In addition, we also provide the energy of the first indirect excitation (A’). The corrected values, accounting for ZPV and temperature effects shown in Fig. 6, are also shown. At room temperature, the fundamental QP gap is 3.13 eV. We obtain the absorption onset (excitation A’) and the optical gap (excitation A) at room temperature to be 3.03 and 3.5 eV, respectively. The former is in excellent agreement with both EELS (2.97 ± 0.04 eV) and optical absorption (2.99 ± 0.04 eV) counterparts (Fig. 5). The latter value is also in very good agreement with the optical gap obtained by the EELS measurement (3.57 ± 0.04 eV; see Fig. 5).

Finally, the binding energy of excitation A’ amounts to 100 meV, the same value as that of the direct excitation A (see Fig. 5b). We note that the excitonic effect in the EELS measurement may be smeared out at room temperature. Anyway, the predicted, relatively small computed value is within the experimental error bar. Considering the measured absorption onset at 3.0 eV, we can deduce the fundamental gap by adding the excitonic binding energy. Doing so, we arrive at a value of $${E}_{{{{{{\rm{g}}}}}}}^{{{{{{\rm{exp}}}}}}}$$=3.1 eV at room temperature.

## Conclusions

We have presented a detailed analysis of the electronic and optical properties of the cubic perovskite BaSnO3 from a first-principles, many-body study, and experiment. Applying a self-energy correction to the bands obtained by the hybrid functional HSE06 (G0W0@HSE06), we predict an indirect (direct) QP gap of 3.50 (3.96) eV and an effective electron mass of about 0.2 m0. Spin–orbit coupling has a minor effect on the band edges. The optical gap obtained by BSE calculations is 3.86 eV (not considering vibrational effects), reflecting an exciton binding energy of 100 meV of the lowest-energy excitation. The latter has a delocalized character, distributed over Sn-s and O-s orbitals. Above 7 eV, Ba-d states are involved in the transitions and give rise to more localized excitons with high binding energy.

Temperature-dependent optical absorption measurements show the optical onset to decrease by about 0.185 eV going from 5 to 300 K. Below that, ZPV effects are estimated to amount to a further reduction of 0.182 eV. Including the latter corrections, the BSE spectrum shows an excellent agreement with the experimental counterpart obtained from the EELS measurement, in terms of energy, intensity, and shape. The latter captures an additional weak absorption feature below the strong direct transitions. It is assigned to indirect transitions driven by phonons, as reported previously in a theoretical work28. The onset of direct transitions (optical gap) is observed at 3.57 ± 0.04 eV, in good agreement with the theoretical value of 3.50 eV. The calculated spectrum at finite momentum transfer shows that the lowest excitation across the indirect gap has also binding energy of about 100 meV. It sets in at about 3.03 eV, in excellent agreement with its counterparts obtained by EELS (2.97 ± 0.04 eV) and by optical absorption (2.99 ± 0.04 eV). As such, indirect excitations are dipole forbidden and thus should not be observed in the latter experiment for a perfect crystal, and our findings support the theoretical observation28 of the weak absorption across the indirect gap to be related to phonon-induced symmetry lowering.

Overall, we have demonstrated that the combination of state-of-the-art techniques in both theory and experiment and careful analysis allows for quantitative characterization of excitations in crystalline materials as exemplified by BaSnO3.

## Methods

### First-principles calculations

Ground-state (GS) properties are calculated using DFT57,58 with the generalized gradient approximation in the PBEsol parameterization59 for the xc functional. Also, the hybrid functional HSE0632 with 25% of Hartree–Fock exchange is employed to compute the electronic properties.

QP energies are obtained by the G0W0 approximation33,34 by solving the QP equation

$${\epsilon }_{i}^{{{{{{\rm{QP}}}}}}}={\epsilon }_{i}^{{{{{{\rm{KS}}}}}}}+\langle {\phi }_{i}^{{{{{{\rm{KS}}}}}}}| {{\Sigma }}({\epsilon }_{i}^{{{{{{\rm{QP}}}}}}})-{v}_{XC}^{{{{{{\rm{KS}}}}}}}| {\phi }_{i}^{{{{{{\rm{KS}}}}}}}\rangle ,$$
(3)

where Σ is the non-local and energy-dependent electronic self-energy, $${\epsilon }_{i}^{{{{{{\rm{KS}}}}}}}$$ and $${\phi }_{i}^{{{{{{\rm{KS}}}}}}}$$ are the Kohn–Sham energies and wave-functions, respectively. Band structure and effective masses are computed by making use of the Wannier interpolation60.

The optical spectra are obtained by solving the BSE, the equation of motion of the two-particle Green function35,36,37. This problem can be mapped onto the secular equation

$$\mathop{\sum}\limits_{v^{\prime} c^{\prime} {{{{{{{\bf{k}}}}}}}}^{\prime} }{H}_{vc{{{{{{{\bf{k}}}}}}}},v^{\prime} c^{\prime} {{{{{{{\bf{k}}}}}}}}^{\prime} }^{{{{{{\rm{BSE}}}}}}}{A}_{v^{\prime} c^{\prime} {{{{{{{\bf{k}}}}}}}}^{\prime} }^{\lambda }={E}^{\lambda }{A}_{vc{{{{{{{\bf{k}}}}}}}},}^{\lambda }$$
(4)

where v, c, and k indicate valence bands, conduction bands, and k-points in the reciprocal space, respectively. The effective Hamiltonian consists of three terms, HBSE = Hdiag + Hdir + 2Hx. The first term, Hdiag, accounts for vertical transitions between QP energies and, when considered alone, corresponds to the independent quasiparticle approximation (IQPA). The other two terms incorporate the screened Coulomb interaction (Hdir) and the bare e-h exchange (Hx). The factor 2 in front of the latter accounts for the spin multiplicity in non-spin-polarized systems. The eigenvalues of Eq. (4), Eλ, are the excitation energies. The corresponding eigenvectors, $${A}_{vc{{{{{{{\bf{k}}}}}}}}}^{\lambda }$$, provide information about the composition of the λ-th excitation and act as weighting factors in the transition coefficients

$${{{{{{{{\bf{t}}}}}}}}}_{\lambda }=\mathop{\sum}\limits_{vc{{{{{{{\bf{k}}}}}}}}}{A}_{vc{{{{{{{\bf{k}}}}}}}}}^{\lambda }\frac{\langle v{{{{{{{\bf{k}}}}}}}}| \widehat{{{{{{{{\bf{p}}}}}}}}}| c{{{{{{{\bf{k}}}}}}}}\rangle }{{\epsilon }_{c{{{{{{{\bf{k}}}}}}}}}\,-\,{\epsilon }_{v{{{{{{{\bf{k}}}}}}}}}},$$
(5)

that determine the oscillator strength in the imaginary part of the macroscopic dielectric function,

$${{{{{{{\rm{Im}}}}}}}}{\varepsilon }_{M}\,=\,\frac{8{\pi }^{2}}{{{\Omega }}}\mathop{\sum}\limits_{\lambda }| {{{{{{{{\bf{t}}}}}}}}}_{\lambda }{| }^{2}\delta (\omega -{E}^{\lambda }),$$
(6)

where Ω is the unit cell volume.

All calculations are performed using exciting61,62,63, an all-electron full-potential code, implementing the family of linearized augmented planewave plus local orbitals ((L)APW+LOs) methods. The atomic radii are chosen 2.2 bohr for Ba, 2.0 bohr for Sn, and 1.6 bohr for O. The local part of the LAPW basis includes three s, p, and d local orbitals for Ba and Sn and three s and p local orbitals for O. The Sn 4s and 4p orbitals are treated as semicore states. The LAPW cutoff Gmax is set to 5.0 bohr−1, which guarantees adequate convergence of the GS properties. Spin–orbit coupling is included by the use of a second-variational procedure. Brillouin zone integrations are carried out on an 8 × 8 × 8 k-grid for all total-energy and electronic-structure calculations. In the HSE06 calculations, a basis-set cutoff Gmax = 4.375 bohr−1 and 250 unoccupied states are used. The G0W0 QP band structures is computed using as a starting point either PBEsol or HSE06 eigenstates. Here, the same computational parameters are chosen as for HSE06, reaching a numerical precision of about 30 meV for the band gap (see Supplementary Fig. 1). The frequency-dependent screened Coulomb potential is treated in the random-phase approximation and computed on a grid of 16 imaginary frequencies. Padé approximation is employed for evaluating the self-energy on a real frequency mesh to solve the QP Eq. (3).

For the solution of the BSE63 on top of the QP band structure, an LAPW cutoff Gmax of 4.375 bohr−1 is employed. The screened Coulomb potential is computed using 100 empty bands. In the construction and diagonalization of the BSE Hamiltonian, 9 occupied and 7 unoccupied bands are included, and a 14 × 14 × 14 shifted k-point mesh is adopted. Owing to the high dispersion of the conduction band around its minimum at the Γ point, the k-point sampling is interpolated onto a 28 × 28 × 28 mesh, using a double grid technique64. These parameters ensure well-converged spectra within an energy window up to 10 eV, and precision of the binding energy of the lowest-energy exciton within 20 meV (see Supplementary Fig. 2). For the q-dependent absorption spectra63, we solve the BSE for a momentum transfer of qR) between Γ and R using the centrosymmetric structure (i.e., without considering atomic displacement due to phonons). Since we focus on the absorption onset, it is sufficient to use the PBEsol band structure and apply a scissor operator. In this case, three occupied and two unoccupied bands are included for the construction and diagonalization of the BSE Hamiltonian, and a 20 × 20 × 20 shifted k-point mesh is adopted. This parameter choice ensures converged spectra up to 5 eV, and a numerical uncertainty of <10 meV for the binding energy of the lowest-energy excitons. We note that the point group symmetry analysis was carried out by using the Irvsp tool65 of the VASP code.

We note that we also computed the electronic and optical properties of BaSnO3 using the optimized lattice parameter of 4.127 Å. The main difference with the results presented in this work is found in the size of the band gaps (direct and indirect) which are about 0.12 eV smaller than those reported here. Atomic structures and isosurfaces are visualized using the software package VESTA66.

### EELS measurements

Plan-view transmission electron microscopy (TEM) samples oriented along the [100] lattice direction of the BaSnO3 single crystal are prepared by classical tripod polishing, i.e., the same technique and growth conditions as reported in ref. 22. Additional smoothing of the surface is obtained by chemical-mechanical polishing (CMP) using the SiO2 suspension. Argon ion-milling is done at liquid nitrogen temperature using a Precision Ion Polishing System (PIPS) at beam energies of 3.5–0.2 keV.

STEM-EELS are carried out using a Nion HERMES microscope. This instrument is equipped with an aberration corrector, a cold-field emission gun, a monochromator at ground potential, and a hybrid-pixel direct-detection camera (Dectris ELA). Such experimental set-up allows one to acquire EELS spectra with energy resolution below 10 meV at 60 kV accelerating voltage. In our case, we use relatively large energy dispersions of 5, 50, and 100 meV/channel and opt for opening the monochromatic slit to allow for more intensity in the beam at the expense of some energy resolution. Using the smallest dispersion and 10 mrad convergence and collection angles, we measure a zero-loss peak with the full width half maximum (ZLP-FWHM) in the vacuum of ~40 meV (see Supplementary Fig. 6). We monitor the relative alignment of the electron beam and crystalline plane orientation, acquiring spectra using on-axis and off-axis conditions (see Supplementary Fig. 4). The on-axis spectra are better suited for the study of the dielectric function using KKA. The off-axis spectra show better statistics and also reproduce well the shape of the signal in the region of the optical gap ($${E}_{{{{{{\rm{g}}}}}}}^{{{{{{{{\rm{opt}}}}}}}}}$$). Finally, only the on-axis spectrum is presented here, but both can be found in Supplementary Fig. 5.

In addition to these measurements, the impact of thickness and surface contamination is studied. On the one hand, we initially find no difference in the apparent optical gap for spectra acquired at thicker or thinner regions. The consistency of these measurements is achieved due to the use of a relatively low beam voltage of 60 kV in our STEM experiments. On the other hand, we find indications that surface contamination, originating from sample preparation and ubiquitous hydrocarbons from the atmosphere, strongly affects our ability to observe a signal from indirect transitions. Thus, the final measurements reported here are performed after the sample is treated using plasma cleaning with Argon.

The STEM-EELS characterization of BaSnO3 is carried out with the objective of measuring low-loss EELS spectra. In this technique, inelastically scattered electrons with energy loss in the range from zero up to a few tens of eV provide an alternative means of studying the dielectric properties of thin samples. In contrast to photons, the strongly interacting electrons allow for studying direct and indirect transitions. In particular, the position of the onset of the inelastic signal at a few-eV in a semiconductor material is related to its optical onset.

Naked-eye examination of these spectra already hints at the presence of the optical gap at around 3 eV. Indeed, for our experimental set-up, at this energy resolution and owing to the use of a direct-detection camera, background intensity sources are greatly suppressed above 2 eV. We expect the main contributions to this background intensity to follow a power-law model, including the tail of the zero-loss peak and vibrational losses (that are not resolved in this experiment). From a spectrum image acquisition, we identify and sum the spectra in a homogeneous area of the specimen. We carefully fit a model to the resulting spectrum that incorporates expressions for the power-law background and band-gap contributions. In our model, signals in the region of an energy gap Et are represented by the following expression,

$$s(E)={{\Theta }}(E-{E}_{t})\frac{{(E-{E}_{t})}^{r}}{1+{e}^{k(E-{E}_{t})}},$$
(7)

where Θ is the Heaviside step function and r is a factor indicating the nature of the transition, either 0.5 or 1.5 for direct or indirect transitions, respectively. In other words, in the former case, Et is the optical gap. These parameters stem from the expected shape of the EELS signal close to the absorption onset according to the joint density of states and matrix element for single-electron transitions between parabolic bands67. The sigmoid function fixed by the parameter k is used to represent the decay of the signal far away from the absorption onset where the parabolic approximation does not hold anymore and the joint density of states associated with the transition drops. We let the parameter k vary to tune the decay far away from the main absorption onset in order to highlight the weak signal coming from indirect transitions and fix it to k = 0 for the direct transitions (no decay). This heuristic is inspired by the behavior of the excitation signal dictated by the Tauc-Lorentz model that is employed in the study of dielectric properties of semiconductor materials43. Poissonian noise variance of the EELS data is taken into account for the model-based fit49. This algorithm also calculates the standard deviation for the obtained parameters68. The presented uncertainties correspond to these values. In some cases, the standard deviation of the model parameters is well below our estimate for the energy resolution. In these cases, we choose to report the ZLP-FWHM value as the measurement uncertainty.

For most materials, the measurement of valence properties such as the band gap using EELS requires considering the impact of various spurious sources, among which relativistic losses are typically most problematic40. BaSnO3 is no exception, and for transmitted electrons at 60 kV accelerating voltage, the Cherenkov threshold $${c}^{2}/{v}^{2}\simeq 5 < {{{{{{{\rm{Re}}}}}}}}\varepsilon$$ indicates that in this material relativistic losses might contribute to EELS at the vicinity of the band gap and above, i.e., ~3–10 eV. Experimental techniques that aim at reducing or suppressing the impact of bulk relativistic losses (also known as Cherenkov-loss) have to be carefully tailored as they depend on the material in a non-trivial manner.

Perhaps the most popular method consists of reducing the accelerating voltage aiming to “slow down" the transmitted electrons below the Cherenkov threshold41,69. This threshold is material-specific, and in many cases, it lies well below the voltages that are attainable in most STEM instruments. An alternative method is using off-axis acquisition geometries (sometimes also called dark-field EELS), eluding most of the relativistic losses since these appear at very small scattering angles39,42. These techniques typically require careful experimental set-up, and in most cases, convergent-beam electron diffraction needs to be considered, which is again sample-specific.

With the aim to address these issues, we also acquire spectra with larger energy dispersion, up to around 100 eV, including all transitions from the valence bands, some core transitions, and collective excitation of bulk and surface plasmons. In order to study the bulk dielectric properties of BaSnO3, we remove plural scattering, using Fourier-log deconvolution, and apply rKKA, using an in-house developed algorithm43. For the latter, we normalize the experimental EELS using a reference refractive index, $${n}_{{{{{{{{{\rm{BaSnO}}}}}}}}}_{3}}$$ = 2.05, achieving convergence after <10 iterations. We monitor the convergence by computing the chi-square test between experimental and corrected spectra, with a target value of X2 = 10−4. This results in an estimate of the complex dielectric function, ε(E), and of the sample-region thickness of around 120 nm, which is probably underestimated because of beam broadening.

### Optical absorption measurements

Optical transmittance spectra are recorded from 5 to 300 K using a Lambda 19 (PerkinElmer) spectrophotometer and a liquid helium cryostat (Oxford Instruments). The used sample of 150 μm thickness is double side polished. Absorption coefficients are calculated from the transmittance data by approximately taking account of the reflection losses setting the refraction index to 2. More details can also be found in refs. 22,48.