## 3 Methods  
Our theoretical approach is sketched in Figure 5. We provide a diagrammatic outline of the main elements of the proposed theoretical platform, as well as their inter-relations. Our technique creates a modular structure for the screening of high-pressure materials. **Structural predictions. ** Crystal structure investigation by particle swarm optimization (CALYPSO) [30, 31], based on PSO algorithm [32, 33], provides stoichiometric compositions via Gibbs enthalpies for the equation of state and convex hull. The structure searches were carried out at 400 GPa with primitive cells of LaH\({}_{10}\) and LaH\({}_{18}\) for more than 600 structures. **Ab initio calculations. ** Structural optimization and computations of enthalpy were performed using VASP code [34]. Electronic structures were calculated by QUANTUM ESPRESSO (QE) [35] code. **EPC calculations. ** We performed the electron-phonon coupling (EPC) calculation using QE with a kinetic energy cutoff of 90 Ry. In order to perform reliable calculation of the electron-phonon coupling in metallic systems, we have employed k-meshes of 2 \(\times\) 0.045\({}^{-1}\) for the electronic Brillouin zone integration and q-meshes of 2 \(\times\) 0.09\({}^{-1}\) for LaH\({}_{10}\) and LaH\({}_{18}\) compounds. **Methods. ** We combined the use of QE and CASTEP [36, 37] by using input file format conversion, pseudopotentials, and K-point grids. Core libraries for DMFT quantum embedding were used for the many-body corrections, which provided the total free energies, electronic densities, and Kohn-Sham levels occupancies [9, 38]. Norm-conserving pseudopotentials by OPIUM were adopted for describing the core electrons and their effects on the valence orbitals [39]. Reference electronic configurations of 55\({}^{\circ}\)25\(p^{65}\)4\(l^{6}\)6\({}^{2}\) for the La atoms and 1\(s^{1}\) for the H atoms were used. **Post-processing. ** For estimating the superconducting transition temperature, \(T_{c}\) we used the Allen-Dynes modified McMillan equation [40]:  
\[T_{c}=\frac{\omega_{\text{log}}}{1.2}\exp\biggl{[}\frac{-1.04(1+\lambda)}{ \lambda-\mu^{\star}(1+0.62\lambda)}\biggr{]} \tag{1}\]  
where \(\mu^{\star}\) is the Coulomb pseudopotential. Formulas for the electron-phonon coupling strength \(\lambda\) and \(\omega_{\text{log}}\) were taken from Ref. [9]. In the post-processing stage, we have followed the procedure outlined by [9]; the reader interested in the computation details could refer  
Figure 4: (**a**) Density of states produced by DFT calculations. In (**b,c**), we show the density of states, obtained within the one-shot DFT + DMFT and within the full-charge self-consistent DFT + DMFT + CSC, respectively. \(tDOS\) and \(fDOS\) signify the density of states corresponding to the lattice and \(f\) impurity Green’s function, respectively. All calculations were carried out in the Fmmm phase of LaH\({}_{18}\) at 400 GPa. to this paper for more exhaustive explanations of the steps, equations, and definitions of the relevant terms. Below, we quote the main equations that we used in our calculations of \(T_{c}\). The Allen-Dynes analysis models the Eliashberg function \(\alpha^{2}F(\omega)\) as a sum at the Fermi level over all scattering processes, mediated by phonon momentum transfer [41]:  
\[\alpha^{2}F(\omega)=N(\epsilon_{F})\frac{\sum_{\mathbf{k_{1}},\mathbf{k_{2}}} \big{|}M_{\mathbf{k_{1}},\mathbf{k_{2}}}\big{|}^{2}\delta(\epsilon_{\mathbf{ k_{2}}})\delta(\epsilon_{\mathbf{k_{1}}})\delta(\omega-\omega_{\mathbf{q} \
u})}{\sum_{\mathbf{k_{1}},\mathbf{k_{2}}}\delta(\epsilon_{\mathbf{k_{1}}}) \delta(\epsilon_{\mathbf{k_{2}}})}. \tag{2}\]  
where \(N(\epsilon_{F})\) is the DOS at Fermi level, \(\omega_{\mathbf{q}\
u}\) is the phonon spectrum of a branch \(\
u\) at momentum \(\mathbf{q}=\mathbf{k_{2}}-\mathbf{k_{1}}\), \(\epsilon_{\mathbf{k_{1}}}\) and \(\epsilon_{\mathbf{k_{2}}}\) are electronic band energies, referred to the Fermi level, while \(M_{\mathbf{k_{1}},\mathbf{k_{2}}}\) are the electron-phonon coupling matrix elements.