Introduction

Discovering and designing new and technologically relevant superconductors is one of the grand challenges of modern science1. Conventional superconductivity arises from an intricate interplay between the electrons and the vibrational modes of the lattice, which can be condensed into a single parameter known as the electron-phonon (el-ph) coupling strength λ. This interaction leads to pairing electrons with opposing spins below the critical temperature Tc, creating an energy gap at the Fermi surface and resulting in a zero-resistance superconducting condensate. Since the pioneering work of Bardeen, Cooper, and Schrieffer (BCS)2, advancements in computational and theoretical techniques have allowed accurate calculations of λ and fully ab-initio predictions of Tc3. The density-functional theory for superconductors4,5,6 and the anisotropic Migdal-Eliashberg theory (AME)7,8 are state-of-the-art examples of such techniques that have contributed significantly in unraveling the properties of the superconducting states of seminal materials like MgB29,10,11 and NbS212 in unprecedented detail, and in predicting entirely novel classes of superconductors from first principles13. One of the most topical examples is the class of the high-pressure superhydrides14,15,16, which have revolutionized the search for high-Tc superconductivity by demonstrating that detailed calculations of the electronic structure, phonon dispersion, and el-ph coupling can guide experiments in the search for new superconducting materials. Prominent examples would be LaH10, theoretically predicted in 201717,18 and experimentally confirmed two years later19, YH620,21,22,23 and CaH624,25,26, or most recently, LaBeH8, the first successfully synthesized ternary superhydride27,28.

The AME formalism is particularly useful in describing the order parameter of weak and strong coupling superconductors. However, computing the el-ph matrix elements and numerically solving the Eliashberg equations requires extremely dense electron and phonon meshes in the Brillouin zone (BZ) to overcome the strong sensitivity to the sampling of the el-ph scattering processes involving states around the Fermi level29. The AME implementation of the EPW code30,31, which was developed by some of the present authors32, enables the interpolation of a small number of el-ph matrix elements to arbitrary electron and phonon wave vectors in the Bloch representation using maximally localized Wannier functions33. This has helped to bridge the gap between experiments and theory and has been widely used in the last few years to determine, among other superconducting properties, the momentum- and band-resolved superconducting order parameter of various anisotropic bulk materials34,35,36,37,38, layered compounds39,40,41, and two-dimensional systems42,43,44,45,46.

Despite the extraordinary success of the AME implementation in EPW, its main shortage comes from the assumption that the density of states (DOS) is constant for a finite energy window around the Fermi level εF (of the order of the Debye energies) where the superconducting coupling occurs32. This approximation, widely employed in literature, is valid for a broad range of compounds but will break down for materials with narrow bands or critical points in the vicinity of εF47,48, such as van Hove singularities (VHSs) and Lifshitz transitions.

With the present work, we remedy this shortcoming. Our implementation goes beyond the limitations of the previous approach, by explicitly incorporating scattering processes of electrons with energies and momenta beyond the confines of the Fermi surface. This is made possible through the self-consistent determination of the mass renormalization function, energy shift, and order parameter at every temperature while ensuring the system’s charge neutrality (see Supplementary Method 1). The corresponding theoretical considerations and equations are detailed in the methods section and in Supplementary Method 1. As this leads to an increased computational workload, we have also implemented a sparse, non-uniform sampling scheme over the imaginary axis, considerably lowering the number of Matsubara frequencies needed compared to the uniform sampling scheme, which, in practice, highly decreases the computational costs (see methods section).

We apply this implementation to two different classes of topical superhydrides, the sodalite-like clathrates YH6 and CaH6, and the covalently-bonded H3S and D3S. Results and discussion are provided under General applications and benchmarking and material-specific computational details can be found in the methods section. Moreover, we present compelling evidence that the commonly used approach of computationally optimizing Tc by maximizing the DOS at εF (N(εF)) is often ineffective, as the reported enhancements in Tc are, in fact, artifacts resulting from the constant-DOS approximation. To support this claim, we conduct a detailed study of electron- and hole-doping effects in H3S and BaSiH8 using our full-bandwidth implementation (see Application to doped hydrides). The results shed light on the limitations of the maximizing-N(εF) strategy, emphasizing the need for a more comprehensive and accurate approach in predicting superconducting properties, as provided with our implementation.

Results

General applications and benchmarking

The emergence of superconductivity at record-breaking temperatures has reignited the hope of achieving superconductivity at ambient conditions1. Indeed, the discoveries of near-room temperature superconductivity in H3S49,50 and LaH1018,19,51 at megabar pressures constitute a new landmark for superconductivity and for the prediction of entirely new materials with advanced functionalities fully ab-initio.

Among the numerous already predicted and experimentally confirmed superhydrides, H3S and D3S have received particular attention from the scientific community. Multiple independent experimental groups employing different characterization techniques have confirmed the existence of the cubic \(Im\overline{3}m\)-H3S structure at pressures around 100–200 GPa and its superconducting state near room temperature52,53,54,55,56,57,58,59. Furthermore, after the prediction of stable body-centered cubic structures of hydrogen that form sodalite-like cages containing Ca20 and Y24 atoms above 150 GPa, YH6 and CaH6 have also been comprehensively studied by many independent theoretical17,18,60,61 and experimental groups21,22,23,25,26, paving the way for the search for the holy grail of superconductivity27,37,62,63,64. Many hydrides exhibit interesting features, such as van Hove singularities near εF and metallic hydrogen states with strong el-ph coupling1, which make them a unique condensed matter platform to study superconductivity.

Due to their topical relevance and the amount of experimental data available, we have employed the full-bandwidth method to the sodalite-like clathrates YH6 and CaH6, and to the covalently-bonded H3S and D3S. In the following, we will consider two levels of approximation when solving the AME. The first is the Fermi-surface-restricted approximation (FSR)30, which, as discussed in detail in the methods section, assumes that the DOS around εF is constant. The second, and main object of interest in this work, is the full-bandwidth method (FBW), which takes into account the full energy dependence of the DOS and thus allows for the inclusion of el-ph scattering processes away from εF31.

Furthermore, our implementation of FBW comes in two different flavors: (i) updating the chemical potential, μ, while solving self-consistently the AME equations to maintain the charge neutrality of the system (referred to as FBW+μ henceforth); and (ii) keeping the chemical potential fixed (referred to simply as FBW) to lighten the computational load. We will also compare our results for Tc to the values given by the commonly employed semi-empirical modified McMillan equation65,66 and the recently proposed machine-learned SISSO model67.

YH6 and CaH6

To benchmark our implementation, we first take a look at YH6 and CaH6, two hydrides whose variation in the DOS around εF is rather small, i.e., they are materials for which the FSR approach should be reasonably accurate.

In the following, we summarize the important physical properties to understand the emergence of a high-Tc in these materials: The electronic band structures and DOS for YH6 and CaH6 at a pressure of 200 GPa are presented in Fig. 1a, d. The corresponding phonon dispersions and phonon DOS along with the isotropic Eliashberg spectral function α2F(ω) and the cumulative el-ph coupling strength λ(ω) are reported in Fig. 1b, e. The relatively high el-ph coupling is associated primarily with the Kohn anomalies observed in the phonon dispersion along the Γ–H direction for YH6 and the HN direction for CaH624. For YH6, numerous modes between 90 meV and 220 meV significantly contribute to the total el-ph coupling strength. Conversely, the primary contribution for CaH6 is localized in the energy range of 100–160 meV, derived from the T2g and the Eg modes at the Γ-zone center belonging to the vibrations of the H4 units20. By integrating α2F(ω), the total el-ph coupling strengths for both YH6 and CaH6 are close to 2.0. This value and the α2F(ω) functions are in excellent agreement with the calculations presented in Refs. 20,60.

Fig. 1: Electron, phonon, and superconducting properties for sodalite-like clathrates.
figure 1

Panel (a) shows the calculated electronic band structure and DOS with respect to the Fermi energy εF for YH6 at 200 GPa. The solid blue lines represent the DFT bands, the dashed red lines the Wannier bands, the solid black line the total DOS, the shaded green area the projected DOS for hydrogen s states (H-s), and the dashed black line indicates εF. Panel (b) shows the phonon dispersion (solid blue), the phonon density of states (PDOS, solid black) and its elemental contributions (shaded green and purple), the isotropic Eliashberg spectral function α2F(ω) (shaded ochre), and the cumulative electron-phonon coupling parameter λ(ω) (solid black). Panel (c) displays the distribution of the values of the anisotropic superconducting gap Δnk on the Fermi surface according to the FSR (blue), FBW (red), and FBW+μ (green) implementations for the Migdal-Eliashberg equations. Panels (df) show the corresponding results for CaH6 at 200 GPa.

Figure 1 (c) and (f) depict the anisotropic superconducting gap Δnk as a function of temperature for YH6 and CaH6 at 200 GPa using the FSR, FBW, and FBW+μ implementations, with μ* = 0.16. YH6 exhibits two well-defined superconducting gaps on the Fermi surface; a larger, broad energy gap ranging from 35 meV to 56 meV at low temperatures, and a smaller gap at approximately 28 meV, the latter originated from the small zone-centered Fermi surface pockets12. The gaps of YH6 close at Tc ≈ 250 K within the FSR approximation and at Tc ≈ 238 K within the FBW approach, independent of whether the chemical potential is updated self-consistently or not. CaH6 is a single-gap superconductor featuring a well-defined gap energy with a maximum of approximately 45 meV and broadness of about 5 meV; the Tc value is around 200 K in all three implementations, FSR, FBW, and FBW+μ.

Experimentally, the critical temperature of YH6 varies depending on the synthesis route. Maximum values for Tc ranging from 220 K at 183 GPa21 to 224 K at 166 GPa23 have been reported. In contrast, CaH6 exhibits a wider transition width of approximately 25 K, with an onset Tc of 195 K at 185 GPa25. A maximum Tc of 215 K for CaH6 has been observed at 172 GPa26. At 200 GPa experiments report a Tc of about 211 K for YH6 and about 204 K for CaH6. Considering the considerable variation of Tc with respect to different samples and the uncertainties for a particular measurement, the agreement between experimental values and our numerically determined ones is quite satisfactory. We expect that by including corrections from quantum anharmonic effects, which can be sizeable in hydrides68,69,70, the difference between experiment and theory could be even further reduced, which will be a topic of future investigation.

As mentioned before, both YH6 and CaH6 exhibit a slowly varying DOS around εF and in such cases, the FSR approximation is reasonable for describing the el-ph scattering process around the Fermi level. This is also evident from the fact that the chemical potential remains almost constant throughout the self-consistent solution within FBW+μ. Nevertheless, it is important to note that the FBW implementation offers a better agreement with experiments even for these simple cases.

H3S and D3S

In contrast to the XH6 materials described above, the behavior of the DOS around εF is quite different in the covalently bonded H3S and D3S hydrides. As indicated in Fig. 2a, the Fermi level is located right at the shoulder of a marked peak in the DOS, which will give rise to considerable differences between the FSR and FBW approaches.

Fig. 2: Electron, phonon, and superconducting properties for the covalently-bonded materials.
figure 2

Panel (a) shows the calculated electronic band structure and DOS with respect to the Fermi energy εF for H3S and D3S at 200 GPa. The solid blue lines represent the DFT bands, the dashed red lines the Wannier bands, the solid black line the total DOS, the shaded coloured areas the projected DOS for hydrogen s (H-s) and sulfur s and p states (S-s, S-p), and the dashed black line indicates εF. Panel (b) shows the phonon dispersion (solid blue), the phonon density of states (PDOS, solid black) and its elemental contributions (shaded green and purple), the isotropic Eliashberg spectral function α2F(ω) (shaded ochre), and the cumulative electron-phonon coupling parameter λ(ω) (solid black). Panel (c) displays the distribution of the values of the anisotropic superconducting gap Δnk on the Fermi surface according to the FSR (blue), FBW (red), and FBW+μ (green) implementations for the Migdal-Eliashberg equations. Panels (d, e) show the corresponding results for D3S at 200 GPa.

Figure 2b, d report the phonon dispersion, the phonon DOS, α2F(ω), and the cumulative λ(ω) for H3S and D3S at a pressure of 200 GPa. The corresponding α2F(ω) functions possess two main peaks in both compounds. For H3S, the dominant one is centered around 120 meV, and the second one, less intense, around 190 meV. For D3S, the peaks are shifted to lower frequencies, as expected due to the greater mass of deuterium atoms, with maxima centered around 90 meV and 130 meV, respectively. In both hydrides, the whole optical spectra from 30 to 40 meV to the Debye frequency contribute to the total electron-phonon coupling, which is found to be λ = 2.3 for H3S and λ = 2.2 for D3S, respectively. These values and the corresponding α2F(ω) functions are in excellent agreement with those reported in refs. 49,71,72.

The solution of the AME equations reveals that H3S and D3S are single-gap superconductors with a broad energy gap distribution. Compared to the FSR treatment, the FBW calculation with fixed μ lowers the gap energy [see Fig. 2c, e]. This effect is even more pronounced when updating μ self-consistently (FBW+μ), as the chemical potential is shifted to higher energies, moving the Fermi level away from the peak of the van Hove singularity. These results emphasize the critical role of the VHS on the superconducting properties of H3S, as has been pointed out in other works as well48,71,73,74,75.

The highest measured Tc in the study of ref. 50 is 203 K at 155 GPa for H3S and 152 K at 173 GPa for D3S, with a variation of Tc for different samples of up to 15 K. Samples with better crystallinity for H3S were later obtained by Mozaffari et al.57 with a Tc of 201 K at 155 GPa and a small transition width of 5.5 K; and also by ref. 56, where a sharp drop of the resistance was measured at Tc = 200 K at 150 GPa. Minkov et al.59 have used the same direct in-situ synthesis from elemental S and excess H2 as in Refs. 56,57 to obtain better homogeneous samples for D3S, revealing that D3S reached a maximum Tc of 166 K at 157 GPa, significantly higher ( ≈ 10 % difference) than previously reported values50.

As can be appreciated in Table 1, FBW+μ performs best in approaching the experimental critical temperatures Tc\({}^{\exp }\) among the different implementations for solving the AME equations. For H3S, our calculations provide Tc = 232 K at 200 GPa, a percentage difference of 23-30 % compared to the experimental values of 172–184 K at 200 GPa from Refs. 50,53,59. The rather large differences originate from anharmonicity and the quantum motion of the nuclei, which are known to play a crucial role in H3S68. Incorporating these effects is, in principle, possible within EPW, as demonstrated in Refs. 70,76 for example, but beyond the scope of the current work. Here, it is important to point out that FBW+μ provides a much better estimate for Tc than FSR. The performance of FBW+μ in reproducing the experimental values is notably better for D3S, where anharmonic and quantum ionic effects are smaller. The full-bandwidth treatment only slightly modifies the structure of the superconducting gap Δnk, i.e., the gap distributions are shifted to lower energies while retaining the overall shape at each temperature.

Table 1 Summary of the obtained superconducting properties for YH6, CaH6, H3S, and D3S.

The isotope effect coefficient, according to the BCS theory, is given by

$$\alpha =-\frac{\ln {T}_{{{{{{{{\rm{c}}}}}}}}}^{{{{{{{{{\rm{D}}}}}}}}}_{3}{{{{{{{\rm{S}}}}}}}}}-\ln {T}_{{{{{{{{\rm{c}}}}}}}}}^{{{{{{{{{\rm{H}}}}}}}}}_{3}{{{{{{{\rm{S}}}}}}}}}}{\ln {M}_{{{{{{{{\rm{D}}}}}}}}}-\ln {M}_{{{{{{{{\rm{H}}}}}}}}}},$$
(1)

where MH and MD are the atomic mass of hydrogen and deuterium. The experimental values obtained for α are around 0.47 at 150 GPa52. Within FSR, we obtain α = 0.54 at 200 GPa; for FBW we have α = 0.48; and for FBW+μ we have α = 0.45.

These results demonstrate that the full-bandwidth method is imperative for accurately describing these systems within the Eliashberg formalism. As already pointed out by other authors48,71,73, the conventional Eliashberg formalism within the FSR framework partially fails to accurately describe the Tc behavior in H3S due to a substantial variation of the DOS near εF originating from the van Hove-type singularity present there. The strong el-ph coupling of λ = 2.3 for H3S and λ = 2.2 for D3S, and the broad distribution of α2F over the vibrational spectra makes this scenario even more dramatic since the region around εF, where the phonon scattering dominates over the Coulomb repulsion, is strongly enhanced by the el-ph interactions. Lastly, these results highlight the importance of updating the chemical potential while solving the AME equations within the FBW treatment.

At the end of this section, we also want to shortly discuss the modified McMillan65,66 formula and a recent machine-learning approach to improve upon it67, both of which can be used as an almost instant way to predict Tc, but do not offer insight into other properties of the superconducting state. The modified McMillan formula (mMc, see Supplementary Note 1) is obtained from the Eliashberg theory by defining moments of the α2F spectral function and fitting an equation to match the experimental Tc, taking into account a bit more than 200 data points. As the data set consisted of the (low-Tc) superconductors known at the time and a few pure model calculations, it does not reproduce the experimental critical temperatures of the extreme cases of contemporary highly-compressed high-Tc materials, as is also evident for the materials chosen in this study66.

The machine-learned equation proposed by a group of the University of Florida (UF), on the other hand, has been trained to match the solutions of the Migdal-Eliashberg equations with a dataset of thousands of real and artificially generated α2F functions, including high-pressure, high-Tc hydrides as well. It thus performs much better than the mMc formula and matches the results obtained with AME fairly well. It is therefore a viable tool to determine an accurate value for Tc quickly but does not offer insight into the superconducting gap function and its energy distribution, the superconducting DOS, and so on. We also observe shortcomings when trying to simulate the effects of doping, as detailed in the next section.

Application to doped hydrides

Doping can be a powerful method to tailor and fine-tune specific material properties, especially in electronic applications. It has been used to metallize semiconducting phases, induce superconductivity, and optimize specific properties of the superconducting phase41,42,77,78,79,80. In particular, this approach has been employed to increase the Tc in known superconducting systems and is claimed to be a route to obtain (or to be the source of) room-temperature superconductivity in recently reported hydrides64,81,82,83,84,85,86,87.

The doping of hydrogen-rich superconductors and its tentatively beneficial effect on Tc has been extensively studied in various works83,84,88,89,90,91,92,93,94,95,96,97,98, however, most of the theoretical predictions for an enhancement of Tc rely on calculations based on the McMillan/Allen-Dynes formulas, or on the ME equations within the constant-DOS approximation, and hence focus mainly on maximizing the value of the DOS at the Fermi level and thereby that of λ. In particular, in systems with VHS-like peaks close to the Fermi level, this approach might severely overestimate the contribution of the electronic states available for the superconducting pairing and thus also the critical temperature. Furthermore, the exact value of the DOS close to a VHS-like shape is subject to large variations, which makes predictions even more error-prone73.

With the FBW implementation, we overcome these problems and limitations as demonstrated for H3S and BaSiH8, two materials exhibiting considerable variation in the DOS around the Fermi level. Applying doping via a rigid band shift, we explore the different regions of increased, maximal, and lowered DOS, and discuss the effects on Tc within the mMc and MD formulas, and the FSR and FBW methods. We want to note here that for these calculations we do not update the chemical potential, as an explicit shift in the Fermi level can also be interpreted as a shift in the chemical potential, and hence such a calculation can be reproduced by one with a (slightly) different effective shift.

H3S

The well-studied hydride superconductor H3S is a perfect candidate material where doping to optimize Tc appears very tempting due to the VHS-like peak in the DOS in close proximity to the Fermi level, as shown in Fig. 3a, b. Many theoretical works have considered doping of H3S to increase its Tc estimates, choosing dopants to bring the system’s Fermi level closer to the maximum of the VHS-like peak. The stability of the \(Im\overline{3}m\) H3S structure with incorporation of various elements has been systematically investigated using either the direct supercell approach with substitutional doping or the virtual crystal approximation, followed by Tc estimates based on the mMc formula or the isotropic FSR approach83,88,89,90,91,92,93,95,98,99,100.

Fig. 3: Doping effects on the critical temperature in different approaches.
figure 3

Effects of doping (shifting the Fermi level) in H3S at 200 GPa (panels (a, b)) and BaSiH8 at 30 GPa (panels (c, d)). Panel (a) shows the superconducting critical temperature Tc as a function of the Fermi level shift ΔεF, obtained within the mMc formula (green), the UF equation (orange), the FSR approximation (blue), and the FBW approach (red). The smaller subpanels on top show the corresponding DOS in a range of ± 2 eV around the unshifted Fermi energy εF, where the dashed lines mark the position of εF + ΔεF and the shaded red areas highlight the included electronic energy range of εF + ΔεF ± 1 eV. Panel (b) displays the distribution of the values of the anisotropic superconducting gap Δnk on the Fermi surface within the FSR (blue) and FBW (red) approach for H3S with ΔεF = −0.1 eV, where we find the maximum absolute difference between the FSR and FBW Tc (see blue and red lines in (a)). The inset shows the corresponding DOS subpanel from (a). Panels (c, d) show the corresponding results for BaSiH8 at 30 GPa, where we find the maximum Tc difference for ΔεF = +0.1 eV.

While adding dopants may increase the Tc by also enhancing the el-ph coupling, we want to specifically address the effect of a change in the number of available electronic states. To this end, we solved the AME equations in the FSR and FBW frameworks for shifts of the Fermi level ΔεF between −0.5 eV and +0.1 eV in steps of 0.1 eV, corresponding to changes in the electron number Δelec of −0.30, −0.26, −0.20, −0.13, −0.06, and +0.05.

In Fig. 3a, we present the Tc values obtained within the FSR and FBW treatments of the AME equations and the results obtained using the mMc and UF semi-empirical formulas mentioned earlier. The Tc values are plotted as a function of ΔεF demonstrating that all approaches show a clear correlation between Tc and DOS with the maximum Tc occurring at around ΔεF ~ −0.1 eV to −0.2 eV, as highlighted in Fig. 3b.

However, within the FSR approximation, there is a notable and unphysical increase in Tc values around the maximum of the DOS. This behavior can be attributed to the limitation of the constant-DOS assumption in the FSR approach. Similarly, the UF model exhibits a strong dependence on doping. In contrast, the AME solutions in the FBW approach, which consider the full energy dependence of the DOS, exhibit a much less pronounced effect of doping on Tc. Finally, the semi-empirical mMc formula consistently underestimates Tc for strongly coupled systems when compared to results obtained from the AME equations.

In the context of our analysis of a doped H3S system, we would like to address the topic of speculated room temperature superconductivity within this system101. Considering that the experimental Tc values for pure H3S are around or below 200 K, and that the FBW calculations only show a maximum increase in Tc of about 5–10% upon doping (see Fig. 4), achieving a conventional superconducting state at room temperature in the H3S parent phase remains elusive; at least within the assumption that the slight doping leaves the electronic structure unaltered.

Fig. 4: Dependence of the doped Tc results on the electronic smearing.
figure 4

Influence of the smearing value σ for the energy-conserving δ-functions on the Tc of doped H3S within the FSR (blue) and FBW (red) approach as a function of the Fermi energy shift ΔεF. The solid lines represent the corresponding results shown in Fig. 3a for a smearing value of σ= 25 meV, the dashed (dotted) lines represent the results for σ = 50(100) meV.

On a more technical note, we want to add that VHS-like features also pose other problems when trying to arrive at robust numerical results. For example, the exact value of the DOS at the VHS-like peak is difficult to converge and requires extremely dense k-grids and small smearing values. To demonstrate this, we examined the VHS region by performing additional calculations with two different smearing values σ for the energy-conserving δ-functions. The results are shown in Fig. 4. The critical temperature obtained with the FSR approximation is very sensitive to the smearing value chosen, the largest deviation in Tc reaching up to 70 K, whereas the FBW implementation is considerably more robust, with at most a 10 K difference between the different smearing values tested. The reason for that is that the only quantity impacted by smearing in the FBW implementation is the screened Coulomb interaction term in Eq. (15), whereas smearing impacts all FSR equations via N(εF) and δ(εmk+q − εF) (see Eqs. (18) and (19)). As a result, besides being more rigorous, the FBW implementation also considerably improves convergence behavior for materials exhibiting a strongly varying DOS.

BaSiH8

The \(Fm\overline{3}m\) phase of BaSiH8 was recently predicted and described in detail by some of the current authors37,70. This ternary hydride has the crystal structure of the XYH8 template first introduced for LaBH863, also assumed by other high-Tc superhydrides that are stable at moderate pressures27,102, like the recently synthesized LaBe-compound28. Up to now, BaSiH8 is the XYH8 compound with the lowest predicted pressure of dynamical stability of 5 GPa within the harmonic phonon theory. A more realistic estimate for the critical pressure of stability and synthesizability is provided by considering the kinetic stability of the compound, which places stability at a pressure above 30 GPa37,70.

Independent of the actual critical pressure, this material exhibits a step-like feature around the Fermi level, with an almost constant region of high DOS below the Fermi level and a sharp drop to a region of very low DOS above εF, as can be appreciated in Fig. 3c, making it another perfect test bed to compare the FSR and FBW approaches.

We solved the AME equations within FSR and FBW approaches for shifts of the Fermi level ΔεF between −0.5 eV and +0.5 eV in steps of 0.1 eV, corresponding to changes in the electron number Δelec of −0.52, −0.42, −0.31, −0.21, −0.10, +0.09, +0.15, +0.18, +0.20, and +0.22. In Fig. 3c, d, we show the Tc values obtained for the two levels of approximations as a function of ΔεF. As before, Tc roughly follows the shape of the DOS, but, in contrast to H3S, we observe a considerable increase in Tc for BaSiH8 when employing the more rigorous FBW approach. Already in the undoped case the Tc is raised to 87 K, which can be further increased by doping to about 92 K when shifting the Fermi level by −0.1 eV. This would place the critical superconducting temperature of BaSiH8 above the technologically extremely important threshold set by the boiling temperature of nitrogen.

The behaviour of Tc with respect to Fermi level shifts for the different methods is quite complex: For a shift of −0.1 eV or below the AME results are similar and also agree with the UF model, while mMc gives considerably lower values for Tc. In a region around 0.1 eV shift, the FBW implementation predicts a larger value for Tc than FSR, and the simple mMc and UF formulas provide an even smaller estimate. For εF-shifts larger than 0.2 eV, mMc and UF actually give the largest values for Tc and FBW the smallest. In other words, while the dependence of Tc with respect to Fermi level shifts was smallest in FBW for H3S, it is actually varying the strongest within FBW for BaSiH8.

These intricate results underscore the importance of taking into account the energy dependence of the electronic DOS around the Fermi level, in particular for systems where the DOS is either strongly peaked close to εF84,86,103,104,105, as for H3S, or highly asymmetric76,106,107,108,109, as for BaSiH8. In that light, we believe that the agreement between experimental measurements and theoretical predictions can be considerably improved by employing the FBW method not only for the class of superhydrides but also for other material systems showing similar features in the DOS42,45,110,111,112,113,114,115,116,117,118.

Discussion

In summary, we have employed the anisotropic Migdal-Eliashberg formalism within the full-bandwidth formulation utilizing maximally-localized Wannier functions as implemented in the EPW suite. This approach enables us to calculate the momentum- and band-resolved superconducting gap more accurately, taking into account the electron-phonon scattering processes around the Fermi level, and not only restricted to the Fermi surface. In addition, we introduced a sparse, non-uniform sampling scheme over the imaginary Matsubara frequencies, which shows similar accuracy and much-improved efficiency compared to the uniform sampling scheme.

To validate the robustness of our methodology, we conducted comprehensive tests on two representative classes of superhydrides: the sodalite-like clathrates YH6 and CaH6, as well as the covalent hydrides H3S and D3S. To assess the accuracy of our approach, we compared our results with previous ab-initio calculations and experimental data. Our results unequivocally demonstrate the indispensable role of the full-bandwidth formulation, particularly for compounds characterized by narrow bands or critical points in proximity to the Fermi level. A noteworthy illustration of the importance of employing the FBW formulation is evident in the case of H3S, which possesses a van Hove singularity. Our methodology effectively captures the intricate behavior of such systems, highlighting the superiority of the FBW approach in these critical scenarios. Furthermore, we emphasize the crucial impact of the chemical potential updating scheme within the FBW formulation, which substantially contributes to accurately describing the superconducting phase in these challenging cases. This aspect proves to be a vital component in achieving a comprehensive understanding of the superconducting properties of these complex materials.

In addition, we applied the FBW approach to investigate electron- and hole-doped hydride superconductors, namely H3S and the recently predicted low-pressure BaSiH8. These materials serve as prime examples of systems with distinct DOS features that deviate significantly from the constant-DOS assumption made in the FSR approximation. Previous studies have often focused on maximizing the DOS specifically at the Fermi level, aiming to design high(er)-Tc superconductors by doping the system to shift εF to the maximum of a VHS-like structure. Our calculations reveal significant pitfalls associated with such a simplistic FSR-based approach. We find instances of pronounced under- or overestimation of Tc, highlighting the critical importance of adopting the FBW method, particularly in scenarios with strongly peaked DOS or closely adjacent DOS regions exhibiting extremely high and low values. By employing the FBW approach, we can accurately capture the intricate interplay of DOS features and better predict the behavior of superconductors in these complex cases. This sheds light on the limitations of the FSR approach and underscores the significance of our advanced methodology in studying and engineering novel superconducting materials with tailored properties for real-world applications.

Methods

Anisotropic Migdal-Eliashberg theory

The Eliashberg theory is a powerful many-body perturbation approach for describing conventional superconductors, where the Cooper pairing between two electrons stems from the interplay between the attractive el-ph coupling and the repulsive screened Coulomb interaction8,119. The Nambu-Gor’kov’s formalism120,121 with a generalized matrix Green’s function can be used to formulate the Eliashberg theory. The on- and off-diagonal elements of the 2 × 2 Green’s function matrix describe the single-particle excitations in the normal state and Cooper-pair amplitudes in the superconducting state, corresponding to the standard and anomalous Green’s functions, respectively11,32,120,121,122,123,124. The transition from normal to superconducting state manifests in anomalous Green’s functions becoming nonzero below a material specific critical temperature.

The matrix Green’s function is obtained from the Dyson equation

$${\hat{G}}_{n{{{{{{{\bf{k}}}}}}}}}^{-1}(i{\omega }_{j})={\left[{\hat{G}}_{n{{{{{{{\bf{k}}}}}}}}}^{0}(i{\omega }_{j})\right]}^{-1}-{\hat{\Sigma }}_{n{{{{{{{\bf{k}}}}}}}}}^{{{{{{{{\rm{pa}}}}}}}}}(i{\omega }_{j}),$$
(2)

where \({\hat{G}}_{n{{{{{{{\bf{k}}}}}}}}}^{0}(i{\omega }_{j})\) is the non-interacting Green’s function in the normal state with band index n and wavevector k, \({\hat{\Sigma }}_{n{{{{{{{\bf{k}}}}}}}}}^{{{{{{{{\rm{pa}}}}}}}}}(i{\omega }_{j})\) is the pairing self-energy, and iωj = i(2j + 1)πT is the fermionic Matsubara frequency with T being the absolute temperature and j an integer. An expression for the self-energy in terms of the electron Green’s function can be obtained with the el-ph and electron-electron contributions given by the Migdal7,123 and GW125,126 approximations, respectively:

$${\hat{\Sigma }}_{n{{{{{{{\bf{k}}}}}}}}}^{{{{{{{{\rm{pa}}}}}}}}}(i{\omega }_{j})=\mathop{\hat{\Sigma }}\limits_{n{{{{{{{\bf{k}}}}}}}}}^{{{{{{{{\rm{ep}}}}}}}}}(i{\omega }_{j})+{\hat{\Sigma }}_{n{{{{{{{\bf{k}}}}}}}}}^{{{{{{{{\rm{c}}}}}}}}}(i{\omega }_{j}).$$
(3)

Using the Pauli matrices, \({\hat{\tau }}_{0}=\left(\begin{array}{cc}1&0\\ 0&1\end{array}\right),{\hat{\tau }}_{1}=\left(\begin{array}{cc}0&1\\ 1&0\end{array}\right),{\hat{\tau }}_{2}=\left(\begin{array}{cc}0&-i\\ i&0\end{array}\right),{\hat{\tau }}_{3}=\left(\begin{array}{cc}1&0\\ 0&-1\end{array}\right),\) the el-ph and Coulomb contributions to the self-energy can be expressed as

$${\hat{\Sigma }}_{n{{{{{{{\bf{k}}}}}}}}}^{{{{{{{{\rm{ep}}}}}}}}}(i{\omega }_{j})= -T\mathop{\sum}\limits_{m{j}^{{\prime} }\nu }\int\,\frac{{{{{{{{\rm{d}}}}}}}}{{{{{{{\bf{q}}}}}}}}}{{\Omega }_{{{{{{{{\rm{BZ}}}}}}}}}}\,{\hat{\tau }}_{3}{\hat{G}}_{m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}(i{\omega }_{{j}^{{\prime} }}){\hat{\tau }}_{3}\\ \times \,{\left\vert {g}_{mn\nu }({{{{{{{\bf{k}}}}}}}},{{{{{{{\bf{q}}}}}}}})\right\vert }^{2}{D}_{{{{{{{{\bf{q}}}}}}}}\nu }(i{\omega }_{j}-i{\omega }_{{j}^{{\prime} }}),$$
(4)

and

$${\hat{\Sigma }}_{n{{{{{{{\bf{k}}}}}}}}}^{c}(i{\omega }_{j})=-T\mathop{\sum}\limits_{m{j}^{{\prime} }}\int\,\frac{{{{{{{{\rm{d}}}}}}}}{{{{{{{\bf{q}}}}}}}}}{{\Omega }_{{{{{{{{\rm{BZ}}}}}}}}}}\,{\hat{\tau }}_{3}{\hat{G}}_{m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}^{{{{{{{{\rm{od}}}}}}}}}(i{\omega }_{{j}^{{\prime} }}){\hat{\tau }}_{3}{V}_{n{{{{{{{\bf{k}}}}}}}},m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}},$$
(5)

where ΩBZ is the BZ volume, \({D}_{{{{{{{{\bf{q}}}}}}}}\nu }(i{\omega }_{l})=2{\omega }_{{{{{{{{\bf{q}}}}}}}}\nu }/[{(i{\omega }_{l})}^{2}-{\omega }_{{{{{{{{\bf{q}}}}}}}}\nu }^{2}]\) is the dressed phonon propagator for phonons with wavevector q and branch index ν, iωl = i2lπT is the bosonic Matsubara frequency with l an integer, gmnν(k, q) is the screened el-ph matrix element for the scattering between the electronic states nk and mk + q through a phonon of frequency ωqν, and Vnk,mk+q is the static screened Coulomb interaction between electrons123,127. In Eq. (5), only the off-diagonal components of the Green’s function \({\hat{G}}_{n{{{{{{{\bf{k}}}}}}}}}^{{{{{{{{\rm{od}}}}}}}}}(i{\omega }_{j})\) are retained in order to avoid double counting the Coulomb effects that are already included in \({\hat{G}}_{n{{{{{{{\bf{k}}}}}}}}}^{0}(i{\omega }_{j})\)123.

The anisotropic el-ph coupling strength is described as

$${\lambda }_{n{{{{{{{\bf{k}}}}}}}},m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}({\omega }_{j}-{\omega }_{{j}^{{\prime} }})=N({\varepsilon }_{{{{{{{{\rm{F}}}}}}}}})\mathop{\sum}\limits_{\nu }\frac{2{\omega }_{{{{{{{{\bf{q}}}}}}}}\nu }{\left\vert {g}_{mn\nu }({{{{{{{\bf{k}}}}}}}},{{{{{{{\bf{q}}}}}}}})\right\vert }^{2}}{{({\omega }_{j}-{\omega }_{{j}^{{\prime} }})}^{2}+{\omega }_{{{{{{{{\bf{q}}}}}}}}\nu }^{2}},$$
(6)

with N(εF) the DOS per spin at the Fermi level. Eq. (6) can be used to rewrite the el-ph self-energy in Eq. (4), which can then be taken together with Eq. (5) and inserted into Eq. (3). The pairing self-energy then becomes:

$${\hat{\Sigma }}_{n{{{{{{{\bf{k}}}}}}}}}^{{{{{{{{\rm{pa}}}}}}}}}(i{\omega }_{j})= \frac{T}{N({\varepsilon }_{{{{{{{{\rm{F}}}}}}}}})}\mathop{\sum }_{m{j}^{{\prime} }}\int\,\frac{{{{{{{{\rm{d}}}}}}}}{{{{{{{\bf{q}}}}}}}}}{{\Omega }_{{{{{{{{\rm{BZ}}}}}}}}}}\\ \times \,\left\{{\lambda }_{n{{{{{{{\bf{k}}}}}}}},m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}({\omega }_{j}-{\omega }_{{j}^{{\prime} }}){\hat{\tau }}_{3}{\hat{G}}_{m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}(i{\omega }_{{j}^{{\prime} }}){\hat{\tau }}_{3}\right.\\ -\,\left.N({\varepsilon }_{{{{{{{{\rm{F}}}}}}}}}){V}_{n{{{{{{{\bf{k}}}}}}}},m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}{\hat{\tau }}_{3}{\hat{G}}_{m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}^{{{{{{{{\rm{od}}}}}}}}}(i{\omega }_{{j}^{{\prime} }}){\hat{\tau }}_{3}\right\}$$
(7)

To replace \({\hat{G}}_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j})\) in Eq. (7), we expand the two components of the Dyson equation (2) in terms of the Pauli matrices as

$${\left[{\hat{G}}_{n{{{{{{{\bf{k}}}}}}}}}^{0}(i{\omega }_{j})\right]}^{-1}=i{\omega }_{j}{\hat{\tau }}_{0}-({\varepsilon }_{n{{{{{{{\bf{k}}}}}}}}}-\mu ){\hat{\tau }}_{3},$$
(8)

where εnk are the Kohn-Sham eigenenergies, and

$${\hat{\Sigma }}_{n{{{{{{{\bf{k}}}}}}}}}^{{{{{{{{\rm{pa}}}}}}}}}(i{\omega }_{j})=\, i{\omega }_{j}\left[1-{Z}_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j})\right]{\hat{\tau }}_{0}+{\chi }_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j}){\hat{\tau }}_{3}\\ +{\phi }_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j}){\hat{\tau }}_{1}+{\bar{\phi }}_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j}){\hat{\tau }}_{2}.$$
(9)

In Eq. (9), we introduced the mass renormalization function Znk(iωj), the energy shift χnk(iωj), and the order parameter ϕnk(iωj). Inserting Eqs. (8) and (9) into Eq. (2), and inverting the resulting matrix leads to the following expression for \({\hat{G}}_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j})\):

$$\begin{array}{r}{\hat{G}}_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j})=\frac{1}{\det \left[{\hat{G}}_{n{{{{{{{\bf{k}}}}}}}}}^{-1}(i{\omega }_{j})\right]}\left\{i{\omega }_{j}{Z}_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j}){\hat{\tau }}_{0}\right.\\ +\left.\left[{\varepsilon }_{n{{{{{{{\bf{k}}}}}}}}}-\mu +{\chi }_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j})\right]{\hat{\tau }}_{3}+{\phi }_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j}){\hat{\tau }}_{1}+{\bar{\phi }}_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j}){\hat{\tau }}_{2}\right\}\\ \end{array}$$
(10)

It can be easily verified that ϕnk(iωj) and \({\bar{\phi }}_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j})\) are proportional within an arbitrary phase, and without loss of generality, one can choose the relative phase such that \({\bar{\phi }}_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j})=0\)30,123. Eq. (10) with \({\bar{\phi }}_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j})=0\) can be used to rewrite Eq. (7) for the pairing self-energy as:

$${\hat{\Sigma }}_{n{{{{{\bf{k}}}}}}}^{{{{{{\rm{pa}}}}}}}(i{\omega }_{j})= -\frac{T}{N({\varepsilon }_{{{{{{\rm{F}}}}}}})}\mathop{\sum}\limits_{m{j}^{{\prime} }}\int\,\frac{{{{{{\rm{d}}}}}}{{{{{\bf{q}}}}}}}{{\Omega }_{{{{{{\rm{BZ}}}}}}}}\frac{1}{{\theta }_{m{{{{{\bf{k}}}}}}+{{{{{\bf{q}}}}}}}(i{\omega }_{{j}^{{\prime} }})}\\ \times \,\left\{i{\omega }_{{j}^{{\prime} }}{Z}_{m{{{{{\bf{k}}}}}}+{{{{{\bf{q}}}}}}}(i{\omega }_{{j}^{{\prime} }}){\lambda }_{n{{{{{\bf{k}}}}}},m{{{{{\bf{k}}}}}}+{{{{{\bf{q}}}}}}}({\omega }_{j}-{\omega }_{{j}^{{\prime} }}){\hat{\tau }}_{0}\right.\\ +\,\left[{\varepsilon }_{m{{{{{\bf{k}}}}}}+{{{{{\bf{q}}}}}}}-\mu +{\chi }_{m{{{{{\bf{k}}}}}}+{{{{{\bf{q}}}}}}}(i{\omega }_{{j}^{{\prime} }})\right]{\lambda }_{n{{{{{\bf{k}}}}}},m{{{{{\bf{k}}}}}}+{{{{{\bf{q}}}}}}}({\omega }_{j}-{\omega }_{{j}^{{\prime} }}){\hat{\tau }}_{3}\\ -\,\left.{\phi }_{m{{{{{\bf{k}}}}}}+{{{{{\bf{q}}}}}}}(i{\omega }_{{j}^{{\prime} }})\left[{\lambda }_{n{{{{{\bf{k}}}}}},m{{{{{\bf{k}}}}}}+{{{{{\bf{q}}}}}}}({\omega }_{j}-{\omega }_{{j}^{{\prime} }})-N({\varepsilon }_{{{{{{\rm{F}}}}}}}){V}_{n{{{{{\bf{k}}}}}},m{{{{{\bf{k}}}}}}+{{{{{\bf{q}}}}}}}\right]{\hat{\tau }}_{1}\right\}, $$
(11)

where

$${\theta }_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j}) = -\det \left.\left[{\hat{G}}_{n{{{{{{{\bf{k}}}}}}}}}^{-1}(i{\omega }_{j})\right]\right|_{{\bar{\phi }}_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j}) = 0}\\ = {\left[{\omega }_{j}{Z}_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j})\right]}^{2}+{\left[{\varepsilon }_{n{{{{{{{\bf{k}}}}}}}}}-\mu +{\chi }_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j})\right]}^{2} \\ +{\left[{\phi }_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j})\right]}^{2}.$$
(12)

Equating the different components of the Pauli matrix elements in Eqs. (9) and (11) leads to a system of three coupled non-linear equations:

$${Z}_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j})=\, 1+\frac{T}{{\omega }_{j}N({\varepsilon }_{{{{{{{{\rm{F}}}}}}}}})}\mathop{\sum}\limits_{m{j}^{{\prime} }}\int\,\frac{{{{{{{{\rm{d}}}}}}}}{{{{{{{\bf{q}}}}}}}}}{{\Omega }_{{{{{{{{\rm{BZ}}}}}}}}}}\frac{{\omega }_{{j}^{{\prime} }}{Z}_{m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}(i{\omega }_{{j}^{{\prime} }})}{{\theta }_{m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}(i{\omega }_{{j}^{{\prime} }})}\\ \times \,{\lambda }_{n{{{{{{{\bf{k}}}}}}}},m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}({\omega }_{j}-{\omega }_{{j}^{{\prime} }})$$
(13)
$${\chi }_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j}) = -\frac{T}{N({\varepsilon }_{{{{{{{{\rm{F}}}}}}}}})}\mathop{\sum}\limits_{m{j}^{{\prime} }}\int\,\frac{{{{{{{{\rm{d}}}}}}}}{{{{{{{\bf{q}}}}}}}}}{{\Omega }_{{{{{{{{\rm{BZ}}}}}}}}}}\frac{{\varepsilon }_{m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}-\mu +{\chi }_{m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}(i{\omega }_{{j}^{{\prime} }})}{{\theta }_{m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}(i{\omega }_{{j}^{{\prime} }})}\\ \times \,{\lambda }_{n{{{{{{{\bf{k}}}}}}}},m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}({\omega }_{j}-{\omega }_{{j}^{{\prime} }})$$
(14)
$${\phi }_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j}) = \frac{T}{N({\varepsilon }_{{{{{{{{\rm{F}}}}}}}}})}\mathop{\sum}\limits_{m{j}^{{\prime} }}\int\,\frac{{{{{{{{\rm{d}}}}}}}}{{{{{{{\bf{q}}}}}}}}}{{\Omega }_{{{{{{{{\rm{BZ}}}}}}}}}}\frac{{\phi }_{m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}(i{\omega }_{{j}^{{\prime} }})}{{\theta }_{m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}(i{\omega }_{{j}^{{\prime} }})}\\ \times \,\left[{\lambda }_{n{{{{{{{\bf{k}}}}}}}},m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}({\omega }_{j}-{\omega }_{{j}^{{\prime} }})-N({\varepsilon }_{{{{{{{{\rm{F}}}}}}}}}){V}_{n{{{{{{{\bf{k}}}}}}}},m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}\right]$$
(15)

This set of equations is supplemented with an equation for the electron number, which determines the chemical potential μ127,128:

$${N}_{{{{{{{{\rm{e}}}}}}}}}=\mathop{\sum}\limits_{n}\int\,\frac{{{{{{{{\rm{d}}}}}}}}{{{{{{{\bf{k}}}}}}}}}{{\Omega }_{{{{{{{{\rm{BZ}}}}}}}}}}\left[1-2T{\sum }_{j}\frac{{\varepsilon }_{n{{{{{{{\bf{k}}}}}}}}}-\mu +{\chi }_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j})}{{\theta }_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j})}\right],$$
(16)

where Ne is the number of electrons per unit cell (see Supplementary Method 1 for a discussion about the electron number equation).

Equations (13)-(16) involve electronic states that are not restricted to the Fermi surface or its immediate vicinity; hence, labeled as anisotropic full-bandwidth (FBW) Migdal-Eliashberg equations129. We have recently implemented the above-described anisotropic FBW approach in the EPW code31.

The set of coupled equations can be solved self-consistently at various temperatures for the temperature-dependent superconducting gap Δnk, given by:

$${\Delta }_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j})=\frac{{\phi }_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j})}{{Z}_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j})}.$$
(17)

The Padé approximation130,131 can then be used to obtain the continuation of Δnk(iωj) from the imaginary to the real axis. The superconducting temperature Tc is the highest temperature at which ϕnk(iωj) ≠ 0 has a nontrivial solution.

The contribution of the Coulomb interaction to the Eliashberg equation, through matrix elements Vnk,mk+q, can be evaluated at the same level as the el-ph interaction for the simpler versions of the Eliashberg formalism48,69,72,132,133. To reduce the computational cost, however, the common approach is to replace the N(εF)Vnk,mk+q terms with the semi-empirical Morel-Anderson pseudopotential μ*134. In practice, the numerical value of this parameter is connected with the cutoff frequency \({\omega }_{\max }\) of the Matsubara frequencies. With a typical choice of \({\omega }_{\max }\) being ten times the maximum phonon frequency ωph, a value of μ* = 0.1–0.2 results in a satisfactory agreement with experiment for many applications. The μ* can also be calculated from first-principles, using the double Fermi surface average of Vnk,mk+q12,43,60,63.

The numerical solution of the anisotropic FBW Migdal-Eliashberg equations is computationally very demanding. A common simplification of these equations consists in restricting the energy range close to the Fermi level by introducing the unity factor \(\int\nolimits_{-\infty }^{+\infty }\,{{{{{{{\rm{d}}}}}}}}\varepsilon \,\delta ({\varepsilon }_{n{{{{{{{\bf{k}}}}}}}}}-\varepsilon )\), and to assume that the DOS within this energy window is constant11,32,123,127,135,136,137,138. It can be shown that, within these approximations, the energy shift χnk vanishes and the requirement in Eq. (16) is automatically satisfied. As a result, only two equations for Znk(iωj) and ϕnk(iωj) need to be solved self-consistently:

$${Z}_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j}) = 1+\frac{\pi T}{N({\varepsilon }_{{{{{{{{\rm{F}}}}}}}}}){\omega }_{j}}\mathop{\sum}\limits_{m{j}^{{\prime} }}\int\,\frac{{{{{{{{\rm{d}}}}}}}}{{{{{{{\bf{q}}}}}}}}}{{\Omega }_{{{{{{{{\rm{BZ}}}}}}}}}}\frac{{\omega }_{{j}^{{\prime} }}}{\sqrt{{\omega }_{{j}^{{\prime} }}^{2}+{\Delta }_{m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}^{2}(i{\omega }_{{j}^{{\prime} }})}}\\ \times \,{\lambda }_{n{{{{{{{\bf{k}}}}}}}},m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}({\omega }_{j}-{\omega }_{{j}^{{\prime} }})\delta ({\varepsilon }_{m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}-{\varepsilon }_{{{{{{{{\rm{F}}}}}}}}})$$
(18)
$${Z}_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j}){\Delta }_{n{{{{{{{\bf{k}}}}}}}}}(i{\omega }_{j}) = \frac{\pi T}{N({\varepsilon }_{{{{{{{{\rm{F}}}}}}}}})}\mathop{\sum}\limits_{m{j}^{{\prime} }}\int\,\frac{{{{{{{{\rm{d}}}}}}}}{{{{{{{\bf{q}}}}}}}}}{{\Omega }_{{{{{{{{\rm{BZ}}}}}}}}}}\,\frac{{\Delta }_{m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}(i{\omega }_{{j}^{{\prime} }})}{\sqrt{{\omega }_{{j}^{{\prime} }}^{2}+{\Delta }_{m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}^{2}(i{\omega }_{{j}^{{\prime} }})}}\\ \times \,\left[{\lambda }_{n{{{{{{{\bf{k}}}}}}}},m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}({\omega }_{j}-{\omega }_{{j}^{{\prime} }})-N({\varepsilon }_{{{{{{{{\rm{F}}}}}}}}}){V}_{n{{{{{{{\bf{k}}}}}}}},m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}\right]\delta ({\varepsilon }_{m{{{{{{{\bf{k}}}}}}}}+{{{{{{{\bf{q}}}}}}}}}-{\varepsilon }_{{{{{{{{\rm{F}}}}}}}}})$$
(19)

Equations (18) and (19) are the anisotropic FSR Migdal-Eliashberg equations. They have been the basis for the superconductivity calculations in the EPW code prior to the recent developments30,32.

Sparse sampling of Matsubara frequencies

All calculated quantities in the Migdal-Eliashberg equations depend on Matsubara frequencies, which are proportional to the absolute temperature. This results in a computational challenge since solving these equations at low temperatures (e.g., necessary for low-Tc superconductors) requires a larger number of frequencies within the same energy range. As discussed in the previous section, for the FBW+μ method, one needs a Matsubara frequency cutoff 6-12 times the Fermi energy window in order to converge the chemical potential and, consequently, the superconducting gap energy, leading to a considerable increase in computational cost. While a frequency cutoff of 4 eV has been found to be sufficient for calculations with FSR and FBW with fixed chemical potential at the Fermi level in the case of H3S, adopting FBW+μ required a Matsubara frequency 2-3 times larger as shown in Supplementary Figure 1.

The computational cost can be reduced by pruning the Matsubara frequencies132. We implemented a sparse sampling scheme, described in the following, in the EPW code as an alternative to uniform sampling over the Matsubara frequencies. Denoting with integer Nj the numerical index for the jth Matsubara frequency, iωj = i(2Nj + 1)πT, the uniform and sparse grids can be obtained as:

$${N}_{j}=j;\quad j=0,\pm 1,\pm 2,\pm 3,\cdots$$
(20)

and

$$\begin{array}{rc}{N}_{j}=&{N}_{j-1}+{{{{{{{\rm{INT}}}}}}}}\left[\exp \left(\frac{j}{{N}_{\max }W}\right)\right]\\ &{N}_{0}=0\,{{\mbox{and}}}\,j=1,2,3,\cdots \end{array}$$
(21)

where INT[] is the rounding to the closest integer, W is an adjustable weight factor, and \({N}_{\max }\) is the maximum Matsubara index for a given energy cutoff \({\omega }_{\max }\) and temperature T:

$${N}_{\max }={{{{{{{\rm{INT}}}}}}}}\left[\frac{1}{2}\left(\frac{{\omega }_{\max }}{\pi T}-1\right)\right]$$
(22)

Eq. (21) can be used to generate a Matsubara frequency grid with indices \({N}_{j}\le {N}_{\max }\). For negative indices, the corresponding frequency can be easily obtained as ω−(j+1) = − ωj (with j > 0). The resulting mesh is uniform at lower frequencies, contributing the most to the summation in the Migdal-Eliashberg equations, and becomes logarithmically sparser with increasing the Matsubara frequency index.

Increasing (decreasing) W results in a denser (sparser) grid sampling. With the default setting of W = 1.0, the sparse sampling scheme produces approximately 30% fewer Matsubara frequencies than the uniform one, while the first ~ 40% points of the grid are still uniformly distributed. Numerical tests show that this approach maintains the accuracy of more expensive calculations that use the full uniform grid.

We systematically evaluated this sampling approach by computing the superconducting gap function within the FBW+μ method using both the uniform and sparse sampling scheme over Matsubara frequencies up to 6 eV for H3S, D3S, YH6, and CaH6. The primary outcomes are presented in Supplementary Figure 2, where the temperature-dependent behavior of Δnk is plotted for FBW+μ (blue lines) and FBW+μ+sparse (red lines). The results indicate that the sparse sampling method can accurately reproduce the superconducting gap structure obtained using the uniform sampling scheme. In summary, no significant difference was observed across all the compounds analyzed. Among all the hydrides, the largest deviation was observed for D3S, with a difference of only 3 K compared to the uniform sampling, corresponding to a percentage difference of 1.8%. For all other hydrides, the difference between the sparse and uniform schemes was only 1 K. Thus, the sparse sampling can quantitatively reproduce the results obtained with the uniform sampling, but with a computational cost of approximately 40% lower.

Computational details

The electronic structure calculations are performed within the Kohn-Sham scheme139 of the density functional theory140 as implemented in the Quantum ESPRESSO suite141,142,143. The exchange and correlation effects are treated within the Perdew-Burke-Ernzerhof parametrization144 using scalar-relativistic optimized norm-conserving Vanderbilt pseudopotentials145,146. The Kohn-Sham orbitals are expanded in a plane-wave basis set with a kinetic-energy cutoff of 100 Ry for H3S, D3S, and CaH6, and 80 Ry for YH6 and BaSiH8. The charge density is computed using Γ-centered Monkhorst-Pack k-meshes147 of 243 k-points for H3S, D3S, and CaH6, 163 k-points for YH6, and 123 k-points for BaSiH8. The Brillouin-zone integration employs a Methfessel-Paxton smearing148 of 0.01 Ry for H3S, D3S, and BaSiH8, and 0.04 Ry for YH6 and CaH6. All lattice parameters and internal degrees of freedom were fully relaxed to reach a ground-state convergence of 10−7 Ry in the total energy and 10−6 Ry/a0 for forces acting on the nuclei. BaSiH8 is relaxed to a pressure of 30 GPa, all other compounds to 200 GPa.

The dynamical matrices and the linear variation of the self-consistent potential are calculated within the density-functional perturbation theory149 on a regular phonon grid of 43 q-points for H3S, D3S, and 63 q-points for YH6, CaH6, and BaSiH8. The threshold for self-consistency is set to 10−14 or lower.

The maximally localized Wannier functions (MLWFs) are constructed using the Wannier90 code33,150. In the case of H3S and D3S, 10 Wannier functions are used to describe the electronic states near the Fermi level. The Wannier orbitals are three H-s-like functions and seven functions with s, p, dxy, dxz, and dyz angular momentum states associated with the S site, with a spatial spread ranging from 0.77 Å2 to 1.53 Å2. For YH6, six H-s-like projections and five Y-d-like functions are used to construct the initial guess, resulting in a spatial spread between 1.74 Å2 and 1.86 Å2. For CaH6, besides the six H-s-like projections, we also use sp and sp3 hybrid orbital functions associated with the Ca site to construct the initial guess, yielding a spatial spread between 0.80 Å2 and 1.20 Å2. For BaSiH8, we use H s, Si s, p, \({d}_{{z}^{2}}\), \({d}_{{x}^{2}-{y}^{2}}\), and Ba p, d orbitals, giving a total of 22 Wannier functions, resulting in spatial spreads between 1.04 Å2 and 1.79 Å2.

The fully anisotropic Migdal-Eliashberg equations32 are solved using the EPW code30,31. Electron energies, phonon frequencies, and electron-phonon matrix elements are computed on fine grids containing 483 k- and q-points for H3S, D3S, YH6, and CaH6, and 303 k- and q-points for BaSiH8. The lower boundary for the phonon frequency is set to 5 cm−1 for H3S and D3S, and 15 cm−1 for YH6, CaH6, and BaSiH8. The width of the Fermi window is set to 2 eV for H3S, D3S, YH6, CaH6, and BaSiH8. We set the Matsubara frequency cutoff to \({\omega }_{\max }\) = 6 eV. The smearing values for the energy-conserving δ-function and for the sum over q-space in the el-ph coupling are set to 25 meV and 0.05 meV, respectively, for H3S and D3S, 150 meV and 0.15 meV for YH6 and CaH6, and 100 meV and 0.1 meV for BaSiH8. We solved the equations adopting a Coulomb pseudopotential of μ* = 0.16 for all materials except BaSiH8, where a value of 0.1 was chosen to be consistent with our previous works37,70. The continuation of the superconducting gap along the imaginary axis to the real energy axis is determined by applying the approximate analytic continuation using Padé functions130,131.

The doping calculations within rigid band model are performed by shifting the Fermi level in EPW before interpolating the el-ph matrix elements. All anisotropic Migdal-Eliashberg calculations are performed for electronic energies of ±1 eV around the (shifted) Fermi level and a Matsubara cutoff of \({\omega }_{\max }\)= 4 eV, if not stated otherwise.