Introduction

Since its discovery in 19111, superconductivity has been one of the most investigated topics in both theoretical and experimental physics. While it was discovered that almost every conductor could reach zero resistance at low-enough temperatures (T < 10 K)2, the quest for higher critical temperature (Tc) superconductors became the new challenge. Until recently, cuprates were leading the race with a Tc as large as 133 K for Hg-Ba-Ca-Cu-O systems3, although the pairing mechanism in these materials is considered unconventional and it is not explained by the standard Bardeen-Cooper-Schrieffer (BCS) theory4.

In 2015, the discovery of conventional superconductivity in H3S with a maximum Tc of 203 K reached at a pressure Pc as high as 150 GPa5 paved the way to a new era of high-Tc materials. Indeed, hydrogen (H)-based systems are nowadays the most promising candidates to achieve room-temperature superconductivity. As a matter of fact, in 2019, the same team that discovered H3S claimed to have measured an even higher Tc in LaH10, superconducting already at 250 K6, later followed by a similar discovery in the yttrium hydride7. In a rush toward room-temperature superconductivity, more recent claims of Tc larger than the one found in LaH10 did not meet the consensus of the whole community8,9. The main issue of these materials is the extreme pressure conditions, usually larger than 150 GPa, needed to obtain the high-Tc superconducting phase. Indeed, while all the binary candidates involving hydrogen were theoretically investigated, none of them seems to sufficiently decrease the pressure of the superconducting state. Eyes are now turned toward ternary materials10.

In this work, we focus on the prototypical case of H3S and we study its structural phase transition generally associated with the maximum of the superconducting critical temperature, located at around 150 GPa11,12,13,14. According to x-ray diffraction data15, at lower pressures the sulfur (S) sites are arranged in a geometry that is compatible with the trigonal R3m symmetry (Fig. 1b) and, upon compression, the system undergoes a phase transition toward a body-centered-cubic (bcc) \({\rm{Im}}{\bar{3}}{\rm{m}}\) structure (Fig. 1a).

Fig. 1: H3S crystal structures.
figure 1

a Crystal structure of the \({\rm{Im}}{\bar{3}}{\rm{m}}\) symmetric phase (smaller volume, higher-pressure phase). b The R3m asymmetric phase (larger volume, lower-pressure phase). dSS is the lattice parameter of the bcc crystal.

After the first theoretical prediction of high-Tc superconductivity in H3S16, several works tried to explain the origin of the maximum of Tc found in experiments as a function of pressure. Even if the magnitude of the calculated Tc is right, confirming the BCS origin of the superconducting state, a quantitative disagreement between various theoretical approaches was found, with estimated Tc values fluctuating over a 50 K range for the high-pressure phase17. Moreover, theoretical studies more oriented to understand the underlying structural properties of H3S, revealed a significant disagreement in the transition pressures between the predicted phases. In those works18,19, the structural phase transition is explained by a quantum proton symmetrization from the R3m phase, with displaced protons, to the \({\rm{Im}}{\bar{3}}{\rm{m}}\) one, where every hydrogen lies in the midpoint of the two neighboring sulfur atoms (S-S midpoint). This is also called ferroelectric transition, because the hydrogen atoms displaced from the S-S midpoint lead in the R3m phase to a long-range order of local dipole moments, created by the H-S bond asymmetry. In that context, the shuttling mode of hydrogen atoms, namely their vibrational mode along the direction linking two neighboring sulfur atoms, was thoroughly investigated. The phase transition was then identified by looking at the dynamical instability of the symmetric \({\rm{Im}}{\bar{3}}{\rm{m}}\) phase when the pressure is lowered and the shuttling mode softens. On general grounds, this reflects the sudden transformation of the free energy profile, leading to a sign change of its curvature across the transition between two different crystal structures, one with lower symmetry than the other.

These findings were obtained by solving the nuclear Hamiltonian within the Stochastic Self-Consistent Harmonic Approximation (SSCHA)20,21,22, which has proven to be one of the best approximated theories to deal with nuclear quantum effects (NQE). Within this framework, the electronic part was solved by Density Functional Theory (DFT) using different parametrizations for the exchange-correlation functional, like the Perdew-Burke-Ernzerhof (PBE)23 and the Becke-Lee-Yang-Parr (BLYP)24,25 ones. Independently of the DFT functional used, a sizable underestimation of the experimental critical pressure Pc by ≈40 GPa was always observed, leaving open the question about the origin of this mismatch, and whether this should be attributed to the electronic or to the nuclear components.

Here, we go beyond the previous state-of-the-art calculations by treating the electronic problem not only at the DFT-BLYP, but also at Quantum Monte Carlo (QMC) level, which provides a benchmark for the DFT methods. QMC is known to yield very accurate total energies in both molecules and solids26,27,28, thanks to its stochastic Green’s function algorithms29,30, such as the lattice regularized diffusion Monte Carlo31, projecting any initial trial wavefunction toward the ground state of the system within the fixed node approximation. Moreover, we solve the nuclear Hamiltonian by using Path Integral Molecular Dynamics (PIMD), which is in principle exact, outperforming any other approximation for the nuclear degrees of freedom. Then, we analyze the resulting phase diagram by looking at the ferroelectric order parameter, at the hydrogen/deuterium density, focusing on its transformation from the unimodal to bimodal distribution, and finally at its quantum fluctuations, detecting when the associated local polarization freezes in a displaced geometry.

In this work, we have been able to track the evolution of the mode distribution with a high resolution in volume (and pressure), thanks to a three-dimensional (3D) model of the shuttling mode. The reliability of our model has been benchmarked using ab initio PIMD simulations with BLYP electrons, across the local moment formation. The advantage of the 3D model is that its potential energy surface (PES) can still be derived by much more expensive, although more accurate, QMC calculations, allowing us to check the impact of the electronic description on the occurrence of a local polarization.

In the model we developed, all hydrogen atoms in the system are allowed to move in the same way. However, only the spatial degrees of freedom of a single H site are retained. This feature induces some limitations, such as the lack of spatially disordered H configurations, and of correlations beyond a single-site description. In spite of this, we can accurately describe the local path from the symmetric proton arrangement to the asymmetric one, by detecting the local moment formation in the system, related to the shuttling mode softening. We have finally performed both SSCHA and PIMD simulations of the 3D model to investigate how NQE treated at different levels of approximation affect the final outcome.

Results

Harmonic and anharmonic phonons

At high pressure, above 150 GPa, the H3S crystal is expected to be in the cubic \({\rm{Im}}{\bar{3}}{\rm{m}}\) symmetric phase (Fig. 1a), where every hydrogen atom sits on the midpoint of two neighboring sulfur atoms. Upon pressure release, the lattice undergoes a trigonal distortion and the hydrogen atoms leave the aforementioned midpoint to move closer to one of the two flanking sulfur atoms, leading to the R3m asymmetric phase, depicted in Fig. 1b. In our description, we introduce a simplification by neglecting the trigonal distortion, which is however very weak (<0.06°)19. Thus, the R3m phase considered here differs from the \({\rm{Im}}{\bar{3}}{\rm{m}}\) one just by the hydrogen positions.

In Fig. 2, we report the analysis of the phonon dispersion for different volumes of the cubic \({\rm{Im}}{\bar{3}}{\rm{m}}\) unit cell, obtained at the ab initio level using the BLYP functional, either through the harmonic approximation via Density Functional Perturbation Theory (DFPT), or with the inclusion of quantum anharmonicity via PIMD simulations at the temperature T = 200 K. Hereafter, volumes and energies will be expressed per H3S unit, while the unit cell will be taken as cubic with S atoms arranged in a bcc lattice.

Fig. 2: Phonon dispersion for different volumes of the cubic \({\rm{Im}}{\bar{3}}{\rm{m}}\) unit cell, whose electronic structure has been computed with the BLYP functional.
figure 2

At V = 83.6 \({a}_{0}^{3}\) (volume per H3S unit), only the harmonic dispersion is reported. For all the other volumes, we compare the harmonic dispersion (light-blue color) with the PIMD one (green color). Full dispersions are obtained by interpolating harmonic (anharmonic) dynamical matrices defined on a 6 × 6 × 6 (2 × 2 × 2) q-grid. PIMD simulations are performed at T = 200 K.

At this point, it is important to underline that the DFPT and the PIMD phonons bear different information (see also section “Phonons”). The PIMD phonons are computed through the quantum displacement-displacement correlator recently developed in ref. 32. They describe the lowest vibrational excitations33, that is the energy difference between the first excited state and the ground state of the nuclear Hamiltonian. This is the quantity normally measured by experimental probes, such as infrared or Raman spectroscopies. Consequently, phonons computed in this way fully include anharmonic effects and are always positive definite, meaning that they cannot describe dynamical instabilities via the appearance of imaginary phonons. This is at variance with the harmonic case or with approximated theories devised to deal with NQE, such as the SSCHA20, which instead provide information about the sign of the free energy curvature at the reference geometry.

While for V = 83.6 \({a}_{0}^{3}\) only the harmonic dispersion is reported in Fig. 2, for larger volumes we compare the PIMD phonons (green lines) obtained in a 2 × 2 × 2 supercell with the harmonic ones (light-blue lines). For PIMD phonons, the spatial range of the force constant matrix is such that the 2 × 2 × 2 supercell is large enough to allow for a q-interpolation of the phonon branches ωm = ωm(q). The comparison between PIMD and harmonic phonons of Fig. 2 clearly shows how strong NQE are and how sizable is the softening of the most energetic phonons due to quantum anharmonicity, particularly at the largest volumes. In the harmonic framework, for V > 85 \({a}_{0}^{3}\) (see Figs. 2 and 3), the appearance of imaginary frequencies indicates the dynamical instability of the \({\rm{Im}}{\bar{3}}{\rm{m}}\) structure. More specifically, the softening of the shuttling hydrogen mode at q = Γ signals the transition toward the asymmetric R3m phase18. From Fig. 2, one can see that imaginary frequencies disappear in PIMD phonons and their evolution as a function of volume is much smoother than in the harmonic case. As expected from the definition of PIMD phonons, PIMD simulations never yield imaginary frequencies for the shuttling mode. In this regard, see also Fig. 3, where we report the shuttling mode frequency we obtained as a function of volume at different levels of theory. This analysis shows that the putative transition implied by the maximum in Tc cannot be determined using solely the shuttling mode frequency as a proxy, because in the volume range corresponding to the experimental Tc maximum5, i.e., between 98 \({a}_{0}^{3}\) and 100 \({a}_{0}^{3}\) (see equation of state (EOS) in Fig. 9a), there is no anomalous behavior of the proton shuttling mode frequency. We need to rely upon other observables in a framework describing nuclei as quantum particles.

Fig. 3: Shuttling mode frequencies as a function of volume by different approaches.
figure 3

At the PIMD level, the phonon frequencies are computed using the S-S midpoint as reference position for the quantum displacement-displacement correlator32. Within the SSCHA framework, phonons are computed using the centroid position obtained through the free energy minimization and the full self-energy dynamical correction is included20. Imaginary phonon components are represented with negative values.

So far, we have reported the structural behavior as a function of volume, fixed in our simulations. However, we can easily deduce the corresponding pressure by deriving the EOS P = P(V) using the Vinet relation34 computed with the same functionals employed to calculate the phonon dispersions. Nevertheless, our goal is to go beyond DFT and reach a more accurate electronic description of the system using QMC methods (the details of our QMC calculations are reported in the “Electronic structure calculations for the PES model” section). A simple comparison of the EOS produced by the two approaches, shown in Fig. 9a, reveals visible differences, suggesting that a description of the electronic structure at the QMC level is crucial to estimate correctly the critical pressure. Unfortunately, QMC calculations are much more expensive than DFT, and coupling them with ab initio PIMD simulations to study the real crystalline system is out of reach. Therefore, we need a simplified PES describing the hydrogen shuttling mode that can be derived, after a fitting procedure, from QMC total energy calculations performed on a coarse grid of nuclear configurations. This model PES can then be used to compute the shuttling mode frequencies and to study the local polarization properties induced by the proton displacement at the PIMD level.

Classical 3D model

The model PES is derived by considering the collective and coherent motion of all the hydrogen atoms along the direction connecting the two S atoms flanking each H (S-S direction), by allowing also hydrogen out-of-axis mobility, while the S atoms are pinned in their bcc positions. In this way, we aim at reproducing the shuttling mode dynamics that takes place at q = Γ, thus having the same modulation for all hydrogen atoms in the crystal. Therefore, we reduce the 3N dimensions of the ab initio potential (with N the number of atoms in the supercell) to only 3 dimensions. The PES is fitted over total energies generated either by DFT-BLYP or by QMC for nuclear configurations defined on a cylindrical grid. Further details about the model description can be found in the “Potential energy surface parametrization” section.

In Fig. 4, we report the PES profiles obtained by solving the electronic problem within the DFT-BLYP (first row) and QMC (third row) methods. At the volumes taken into account here, both DFT-BLYP PES and QMC PES have two minima connected through the inversion symmetry with respect to the S-S midpoint ((0.5,0,0) in fractional units). The second row shows a comparison of both energy profiles cut along the line connecting these two PES minima, going through the S-S midpoint. For the smallest volume analyzed, V = 90.9 \({a}_{0}^{3}\), we found a good agreement between the DFT-BLYP PES and QMC PES, suggesting that electron correlation effects are reasonably well described at the DFT level at high-enough pressures. However, the discrepancy between the two approaches appears when we increase the volume and it grows continuously upon pressure release. For the largest volume considered, V = 110.0 \({a}_{0}^{3}\), the height of the double well barrier for QMC is ~270 meV per H3S unit, 80% larger than the DFT-BLYP one.

Fig. 4: 3D-PES landscapes (in meV per H3S unit) for different volumes.
figure 4

Top panel: DFT-BLYP PES computed on the plane containing the S-S direction (x axis) and bisecting the yz quadrant (y = z plane). The points on the plane are fully defined by their x and y coordinates, expressed in fractional units. Middle panel: 1D projection along the axis connecting the two minima. Bottom panel: same as Top panel with QMC PES. In the top and bottom panels the zero of energy is the PES value at (0.5,0,0). In the middle panel, the zero is the PES minimum.

The ferroelectric transition volume for classical nuclei can be estimated based on the PES by using the Landau theory for continuous phase transitions35. This method relies on the sign change of the free energy curvature (the total energy curvature at T = 0 K) at the volume when the two displaced minima merge into a single one, in the symmetric configuration corresponding to the point (0.5,0,0) in Fig. 4. For DFT-BLYP, we found a critical volume Vferro around 85 \({a}_{0}^{3}\) corresponding to a pressure of 263 GPa, while for QMC we found the same volume (≈85 \({a}_{0}^{3}\)) which corresponds to 238 GPa in this case (see Fig. 9a). We note that the Vferro yielded by the BLYP 3D-PES is in nice agreement with the value at which the shuttling mode frequency vanishes, computed ab initio in the harmonic approximation (see Fig. 3). This is a signature of our model PES quality.

Quantum 3D model

In order to have a reliable description of the structural phase transition based on our 3D-PES, we need to include nuclear quantum effects. We add them by performing PIMD calculations at T = 200 K as implemented in ref. 36. Numerical details of these simulations can be found in the “PIMD simulations” section. Here, we mention only that in the PIMD simulations of our 3D model the hydrogen atom has an effective mass equal to three times the physical hydrogen mass, owing to the fact that the PES is expressed per H3S unit and the 3D motion of all hydrogen atoms in the H3S molecule is concerted by construction.

In Fig. 5, we report the projections of the resulting 3D proton density, which takes two distinct shapes depending on the volume. The density exhibits only one peak centered in the middle of the S-S axis for small volumes and the central peak splits into two lobes for the largest volumes. In the contour plot of Fig. 5a, one can clearly see that the doubling of the peak happens in QMC at smaller volumes (higher pressures) than in DFT-BLYP, as expected from the analysis of the classical PES, which shows deeper minima in the QMC PES at fixed volume. In Fig. 5b, we plot the distribution of the hydrogen position projected along the shuttling mode direction, by including also the data coming from the ab initio PIMD simulations driven by DFT-BLYP forces. Our 3D model has a similar behavior in comparison with the full 3N dimensional system. The mode distribution assumes a double peak shape at approximately the same volume for the model (blue lines) and the ab initio system (green lines), evaluated for the same BLYP functional. The main differences are the broadness of the distribution, underestimated by the model, and the position of the peak, which lies closer to the S atoms in the ab initio simulations. These differences can be understood based on the enhanced quantum-thermal fluctuations of the ab initio system compared to the one with a reduced number of degrees of freedom. Nevertheless, as far as the peak splitting is concerned, the ab initio and the model PIMD calculations are in agreement. This validates the accuracy of our 3D-PES model, which then allows one to compare directly BLYP and QMC results. The projected 1D distribution in Fig. 5b reveals that the QMC PES leads to a smaller volume for the peak splitting, as shown already in the contour plot of Fig. 5a.

Fig. 5: Quantum hydrogen distributions.
figure 5

a Two-dimensional projection on the y = z plane of hydrogen positions with our 3D model solved by PIMD at 200 K. The results of BLYP PES calculations are represented in the top panel and the QMC PES ones in the bottom. b Hydrogen distribution projected along the shuttling mode. Blue points are for the BLYP 3D-PES; green points for the ab initio BLYP simulations; red points for QMC 3D-PES. Lengths are expressed in Bohr. The origin of the reference frame is centered at the S-S midpoint. δx is the distance from the origin.

By fitting the distribution in Fig. 5b and interpolating the parameters obtained for several volumes, it is possible to determine precisely the position of its maximum as a function of volume, and thus the occurrence of the bimodal distribution. We estimate the peak splitting to take place in H3S at a volume of 99.6 \({a}_{0}^{3}\) for DFT-BLYP, and of 96.3 \({a}_{0}^{3}\) for QMC. According to the EOS of Fig. 9a, these volumes correspond to pressures of 153 GPa for DFT-BLYP and of 152 GPa for QMC. These values, reported in Table 1, are in good agreement with the position of the maximum Tc measured in experiments5, and they are strongly affected by NQE. Nevertheless, it is important to underline that the two similar pressures obtained by BLYP PES and QMC PES after inclusion of NQE originate from a compensation of errors in the BLYP values, if we take QMC as reference. Indeed, a volume overestimation found in the BLYP PES compensates with a pressure overestimation in the BLYP EOS to yield approximately the same pressure for the peak splitting as the one found in QMC (see Fig. 9a).

Table 1 Transition pressures and volumes for the local moment formation yielded by PIMD

The occurrence of the bimodal distribution signals the proximity of a critical region where the quantum proton is more localized, either dynamically or statically, in one of the two wells. However, from a more rigorous point of view the instantaneous localization of the proton, namely the local dipole formation, is better characterized by the “local moment” susceptibility, as defined below. Indeed, quantum fluctuations are at work across the transition to make hydrogen atoms shuttle between the two PES minima. As the volume increases and the minima deepen, the fluctuations will start freezing, leading to the creation of a local electric dipole moment, generated by the statically displaced proton in the R3m phase, or generated dynamically, by instantaneous configurations where the whole path representing the quantum proton is fully localized in one of the two wells. PIMD fully accounts for quantum fluctuations, thanks to its imaginary time resolution. We can measure them by computing the imaginary time correlator g(β/2) = 〈δx(0)δx(β/2)〉, with β = 1/(kBT) the inverse temperature used in the PIMD simulations, and \(\delta x(\tau )=x(\tau )-\left\langle x\right\rangle\), where \(\left\langle x\right\rangle\) is the thermal quantum average of the x coordinate, corresponding to the symmetric position in the 3D model. Quantum fluctuations reduce the value of g(β/2). A non-zero value of g(β/2) can be interpreted by the presence of a finite moment in the distribution. In our 3D-PES, this moment is by definition local, because by model construction the hydrogen dynamics is condensed in a single 3D site. Therefore, the local moment susceptibility χg is the normalized variance of g(β/2), namely χg = Var[g(β/2)]/Var[g(0)]. Within the local moment fluctuation picture, the occurrence of local polarization can then be estimated by evaluating the volume at which χg is maximum, as shown in Fig. 6a, b. This quantity has already been used in a previous work37 to identify the transition from a paraelectric phase to a disordered regime in an anharmonic oscillator chain, characterized by a tunable double well potential, where the symmetry is locally and instantaneously broken in favor of displaced configurations. If we describe the change of regime based on local moment fluctuations, we obtain Vc = 104.2 \({a}_{0}^{3}\) for DFT-BLYP, corresponding to Pc = 131 GPa, and Vc = 100.9 \({a}_{0}^{3}\) for QMC, corresponding to Pc = 126 GPa (Fig. 6a and Table 1). Also in this case, like for the density probe, cancellation of errors is at play and, by consequence, the two electronic descriptions provide almost the same critical pressure.

Fig. 6: Imaginary time correlator g(β/2) and normalized local moment susceptibility.
figure 6

Local moment susceptibility for H3S (a) and D3S (b) for quantum nuclei with the DFT-BLYP (blue) and QMC (red) 3D-PES. The vertical dashed lines indicates the susceptibility maxima. c Imaginary time correlator g(β/2) for H3S. Blue circles and green stars are DFT-BLYP results for the 3D-PES and ab initio simulations, respectively. For reference, vertical dashed lines indicate the position of the local moment susceptibility peak and the ferroelectric transition, as determined in Fig. 7.

We evaluated g(β/2) also in our ab initio PIMD simulations, and in Fig. 6c we compare it against the values of g(β/2) coming from the PIMD solution of the 3D model. The ab initio and model results are in statistical agreement for this local quantity, confirming that the 3D model correctly captures the volume evolution of the local polarization.

The two probes we used in this work, the local moment susceptibility and the peak splitting, allow us to determine a lower and an upper bound for the pressure where the fluctuating local dipoles disappear in favor of a paraelectric phase, by squeezing the compound. Notice that this does not correspond to the ferroelectric transition pressure, associated instead with the global \({\rm{Im}}{\bar{3}}{\rm{m}}\)-R3m symmetry breaking, and long-range dipole order, which happens at lower values. The same analysis is carried out for both the hydrogen H3S and deuterium D3S crystals, to estimate the magnitude of isotope effects (see Fig. 6b). We summarize the results in Table 1, where we show that the hydrogen-to-deuterium substitution brings about an increase of the local polarization formation pressure that falls into the [17–35] GPa range.

Full BLYP-PIMD solution of the H3S phase diagram at 200 K and comparison with SSCHA

After having analyzed the local moment formation with the help of the 3D model, we turn now the attention to the ferroelectric transition, associated with the global R3m → \({\rm{Im}}{\bar{3}}{\rm{m}}\) transformation. The suitable order parameter to identify this transition is \(\Delta =\langle \frac{1}{{N}}\mathop{\sum }\nolimits_{{{{\rm{i}}}} = 1}^{{{{\rm{N}}}}}\delta {{x}}_{{{{\rm{i}}}}}\rangle\), where the sum runs over all the N hydrogen atoms in the supercell, and δxi is the distance of the ith proton from the S-S midpoint at a given snapshot. An equivalent order parameter, showing usually less statistical fluctuations, is \({\Delta }_{{{{\rm{abs}}}}}=\langle | \frac{1}{{{{\rm{N}}}}}\mathop{\sum }\nolimits_{{{{\rm{i}}}} = 1}^{{{{\rm{N}}}}}\delta {x}_{i}| \rangle\). The brackets indicate the average over the classical or quantum nuclear distribution. In PIMD simulations an additional average is then done over the beads positions. From these definitions, it is clear that this order parameter can only be computed in our ab initio simulations, being the 3D model local.

In Fig. 7, we plot the volume dependence of the order parameter Δ and Δabs and their susceptibilities. Their peak is located at the ferroelectric transition, occurring at \({{V}}_{{{{\rm{ferro}}}}}=117{a}_{0}^{3}\), Pferro 82 GPa, as found in our BLYP-PIMD simulations in the 2 × 2 × 2 supercell at T = 200 K. We notice that the peak location is correlated with the jump in the shuttling mode frequency, reported in both Figs. 3 and 7. The agreement between the Δ and Δabs susceptibilities and the shuttling mode frequency jump strengthens the reliability of our estimate. Interestingly, at 200 K the ferroelectric transition takes place at a pressure much lower than the one where the local moments are suppressed. For quantum nuclei, between these two pressures the system is in a regime characterized by disordered local moments and \({\rm{Im}}{\bar{3}}{\rm{m}}\) symmetry (see Fig. 8 for the resulting phase diagram). Accounting for thermal and quantum effects leads to a strong reduction of the critical ferroelectric pressure observed in the classical framework, which is as large as 263 GPa at zero temperature. Furthermore, in order to distinguish between anharmonicity coming from thermal and NQE, we also performed classical ab initio MD simulations at the same temperature (see Supplementary Note V of the Supplementary Information (SI)), which yield a ferroelectric transition at ≈133 GPa (see Fig. 8). Thus, classical anharmonicity accounts for about 70% of the total pressure reduction of the ferroelectric transition at 200 K. The remaining 30% is due to NQE at the same temperature.

Fig. 7: Ferroelectric transition from ab initio BLYP PIMD simulations at 200 K in a 2 × 2 × 2 supercell.
figure 7

Black (blue) points are values of the ferroelectric order parameter Δ (Δabs) as a function of volume. The variance (i.e., susceptibility) of these order parameters is represented by green and red crosses, respectively. We also report the shuttling mode frequencies (gold pentagons). All quantities are in atomic units except for the phonon frequencies, expressed in cm−1. The vertical red-dashed line locates Vferro.

Fig. 8: Phase diagram at 200 K for classical and quantum nuclei as determined by BLYP-driven classical and path integral molecular dynamics.
figure 8

Both ferroelectric transition (black dots) and the region where the local polarization vanishes into a paraelectric Im\(\bar{3}\)m phase (bracketed by the blue star and the purple pentagon) are reported. Between ferro and para, an Im\(\bar{3}\)m phase with disordered local moments is expected to take place37. The disordered region is reported only for the quantum case. We also report the ferroelectric critical pressures predicted by SSCHA, from both ab initio19 (white square) and our 3D-PES model (orange diamonds). For comparison, the pressure of the experimental Tc maximum is shown by a teal diamond.

The ferroelectric transition cannot be estimated at the QMC level, due to its computational cost when applied to the dynamics of a real extended system. However, as we have seen, the 3D model, derived at both the DFT-BLYP and QMC levels, is enough to determine the formation of local electric dipole moments, whose pressure Pc matches well the position of the experimental Tc maximum.

At variance with previous state-of-the-art calculations based on a combination of DFT-BLYP and SSCHA frameworks, our PIMD results yield Pc in a substantial agreement with the experimental finding, and this irrespective of the electronic theory used to generate the PES. One should notice here that the original SSCHA approximation is not able to capture the disordered Im\(\bar{3}\)m phase, being a mean-field theory with no disordered configurational entropy and no direct information of imaginary time correlations, key to detect the dynamical local moment formation. Thus, the critical pressure that SSCHA can normally compute is the ferroelectric one, Pferro, and not Pc. However, time resolved extensions of SSCHA have been recently proposed, able in principle to access also retardation effects38.

To investigate more deeply this mismatch, we carry out SSCHA calculations with our model PES (see section “SSCHA simulations” for details). In SSCHA, the occurrence of the asymmetric R3m phase is signaled by a centroid displaced with respect to the S-S midpoint. The SSCHA critical values are Vferro = 107.8\({a}_{0}^{3}\), Pferro = 114 GPa for the DFT-BLYP PES, and Vferro = 102.4\({a}_{0}^{3}\), Pferro = 118 GPa for the QMC PES. As in PIMD, there is no significant difference in the transition pressures between the electronic structure methods used to generate the PES. Our SSCHA results for the DFT-BLYP PES are in a very good agreement with the outcome of previous SSCHA simulations for the full ab initio system19, calculated with the same DFT-BLYP functional. We find that the SSCHA overestimates Pferro with respect to the one obtained in PIMD for the same BLYP functional, as expected from a mean-field theory, and underestimates Pc, which is however out of reach by the SSCHA, suggesting that the approximated description of the nuclear Hamiltonian is the source of disagreement with both PIMD and experimental results.

Let us look now at the predictions for the shuttling mode frequencies, plotted in Fig. 3 for various methods. It has to be noted that, within the SSCHA, the phonon frequency of the shuttling mode shows a jump at Vferro. This is due to the hop of the SSCHA centroid from its symmetric position to a different minimum of the free energy, already “preformed”, which breaks the symmetry and becomes energetically more favorable at Vferro. Moreover, we also observe an increase of the SSCHA phonon line-width across the transition of the order of 10 cm−1. A similar jump in the shuttling phonon frequencies is detected by our ab initio BLYP simulations in correspondence with the ferroelectric transition (see Figs. 3 and 7).

Nevertheless, our PIMD phonon determination shows a progressive phonon softening without jumps across the volume region of local moment formation. This is not only true within our 3D model PES, but also for our PIMD calculations driven by ab initio forces computed at the DFT-BLYP level, as shown in Fig. 3. The agreement between shuttling mode frequencies yielded by the 3D model and the ones given by ab initio calculations in this volume region highlights once again the quality of our model PES. This supports the hypothesis of two different transitions. The first one is a smooth transition, or crossover, from the paraelectric \({\rm{Im}}{\bar{3}}{\rm{m}}\) to a phase sharing the same \({\rm{Im}}{\bar{3}}{\rm{m}}\) symmetry and characterized by the formation of local and spatially disordered local moments. This phase cannot be detected by looking at the phonon frequencies, and it is not accessible within the SSCHA formulation. The second one is the ferroelectric transition from the disordered \({\rm{Im}}{\bar{3}}{\rm{m}}\) to the asymmetric R3m phase, which happens at significantly lower pressure than the first one, where the shuttling phonon frequency shows a jump. The phase diagram deducible from our combined ab initio and 3D model results is drawn in Fig. 8.

Discussion

In this work, starting from ab initio electronic structure calculations, we generated a model PES to describe the shuttling mode of hydrogen in H3S, responsible for the R3m → \({\rm{Im}}{\bar{3}}{\rm{m}}\) transition, which was originally associated with the Tc maximum as a function of pressure. Despite the fact that such a hydrogen symmetrization is expected to happen in H3S upon compression, so far no theoretical method has been able to spot it at pressures near the one that maximizes Tc in experiments. This raised doubts on the original association between superconductivity and structural transition39,40, worsened by the fact that other competing symmetries could be stable in the same pressure range41,42,43,44. The mismatch found between previous theoretical estimates of the critical pressure Pc and the experimental values for the Tc maximum is solved by applying state-of-the-art computational methods in both the electronic and nuclear Hamiltonians, namely using QMC calculations for electrons, and the PIMD approach for nuclei. Within our QMC+PIMD approach, the experimental pressure where Tc is maximum is bracketed by the Pc value estimated from the local fluctuations probe and the one determined by the transformation of the bimodal hydrogen distribution into a unimodal one. Consequently, these two probes provide a lower and an upper bound for the critical pressure, with a range between the two of ≈20 GPa. The range of transition pressures identified is consistent with the available experimental data for the Tc maximum5,11,13 for both H3S and D3S, as we can see in Fig. 9b.

Fig. 9: Transition values from theory and experiment.
figure 9

a Equation of state P = P(V) (see section “Equation of state” and Eq. (7)) for both DFT-BLYP (blue color) and QMC (red color) calculations of H3S in the \({\rm{Im}}{\bar{3}}{\rm{m}}\) phase. The transition volumes and the corresponding pressures identified at different levels of theory using the density probe (peak splitting) are displayed by dashed lines. b Tc as a function of pressure in H3S and D3S from Drozdov et al.5, Einaga et al.11 and from Minkov et al.13. The shaded areas on each data set represent the pressure range when the transition occurs according to our PIMD results for the QMC PES, where the lower limit is based on the local quantum fluctuations analysis and the upper one on the density evolution (see Table 1 for the actual values).

We have thus shown that the occurrence of the Tc maximum should be linked with the formation of the phase characterized by disordered local moments37, and it cannot be associated with the ferroelectric R3m \({\rm{Im}}{\bar{3}}{\rm{m}}\) transformation, which takes place at a lower pressure Pferro compared with Pc. According to our outcome, Tc reaches its maximum when the local dipole moments melt upon compression, and protons become fully delocalized across the PES barrier.

Furthermore, we notice that the ab initio electronic structure computed at the DFT-BLYP level predicts very good results for the critical pressure, similar to those obtained by QMC. However, it is important to stress that the DFT-BLYP pressures are affected by error compensation, the overestimation of the critical volume being balanced by a different EOS if compared against QMC calculations. This aspect underlines the importance of using an accurate electronic description, beyond the DFT level. The generation of our model PES, built to describe the hydrogen shuttling mode, allowed us to exploit the QMC energies in a PIMD framework, otherwise unfeasible in the full 3N dimensional system.

We conclude by noting that the R3m → \({\rm{Im}}{\bar{3}}{\rm{m}}\) structural phase transition in sulfur hydride has strong analogies with the hydrogen bond symmetrization in other compounds such as high-pressure ice, where, upon compression, phase VII and VIII hosting displaced protons, stable at lower pressure, are expected to transform into the symmetric phase X45,46. However, it is still a matter of debate whether the transformation is direct or whether other intermediate disordered structures appear, with protons only partially symmetrized. In this respect, further work is needed to extend our model beyond the collective path dynamics to treat non-local spatial correlations and disordered patterns. Machine learning schemes could then be useful to generate more extended PES from QMC data47,48,49 with the aim at including a larger variety of hydrogen configurations in PIMD calculations by keeping the same QMC accuracy.

Methods

Electronic structure calculations for the PES model

For the DFT electronic structure calculations, we used the Quantum Espresso (QE) suite of codes50,51, while for the QMC calculations, we employed the TurboRVB package52. For sake of consistency, in both DFT and QMC calculations, we used the same set of pseudopotentials. Namely, we treated the sulfur atom with the ccECP neon-core pseudopotential53 particularly suited for correlated calculations, available in both the QE-compatible Unified Pseudopotential Format (UPF) and in the TurboRVB-compatible Gaussian expansion format. For hydrogen, we used the bare Coulomb potential, with a very short-range cutoff for a QE usage within the plane-wave framework. In the QMC calculations instead, no short-range cutoff is needed for the bare Coulomb potential, because the nuclear cusp conditions are automatically fulfilled by our QMC wave function (see below). These pseudopotentials have been chosen after performing preliminary calculations at the DFT level to test their accuracy. We also tested other pseudopotentials (ultrasoft (US), projector augmented wave (PAW), and a combination of the above), by comparing the total energy profile obtained by moving the hydrogen atom away from the S-S midpoint, and constrained to stay on the S-S axis. This leads to a very crude one-dimensional (1D) PES, which is however useful for testing purposes, with the advantage that it is easily computable for its simplicity. We took as reference the total DFT energy computed with the all-electron LAPW approach, as implemented in Elk54. The ccECP pseudopotential for the sulfur atom and the bare Coulomb potential with short-range cutoff for the hydrogen atom turned out to be the most accurate choice (see Supplementary Note I).

For single-point calculations at selected nuclear configurations, we carried out DFT calculations with the Becke-Lee-Yang-Parr (BLYP) functional24,25. The cutoff energy for plane waves is set to 200 Ry (due to the hardness of the H Coulomb pseudopotential), with the smearing parameter equal to 0.002 Ry and a k-points grid of 32 × 32 × 32.

For the QMC calculations, we used a Slater-Jastrow wavefunction Ψ, which reads as:

$$\Psi ={\Phi }_{{{{\rm{S}}}}}\cdot \exp (J),$$
(1)

where the term \(\exp \left({J}\right)\) is the Jastrow factor, symmetric under electron exchange, while ΦS is the antisymmetric Slater determinant. The Slater orbitals in ΦS are generated by DFT calculations within the Local Density Approximation (LDA)55, performed in a Gaussian basis set by means of the DFT code built in TurboRVB. For the sulfur atom, we employed a modified cc-pVTZ primitive basis set with 6s6p2d1f components, contracted into 11 hybrid orbitals through the Geminal Embedded Orbitals (GEO) procedure56. For hydrogen, we used a modified cc-pVTZ primitive basis set with 4s2p1d components contracted into 6 GEO hybrid orbitals.

The Jastrow exponent J introduces explicitly electronic correlation in the wavefunction, and it can be decomposed into three terms, such that J = J1 + J2 + J3.

J1 is the so-called one-body term, which takes into account the interaction effects between the electrons i and a nucleus I, and it depends on the relative electron-nucleus distances riI. J2 is the so-called two-body term, treating the correlations between electrons i and j, and depending on their relative distance rij. Both J1 and J2 are designed to fulfill the electron-nucleus and electron-electron cusp conditions, respectively. They read as \({{J}}_{{1}}=\mathop{\sum }\nolimits_{{{{\rm{i}}}} = 1}^{{{{{\rm{N}}}}}_{{{{\rm{e}}}}}}\mathop{\sum }\nolimits_{{{{\rm{I}}}} = 1}^{{{{\rm{N}}}}}{u}_{{{{\rm{I}}}}}({r}_{{{{\rm{iI}}}}})\), and \({{J}}_{2}=\mathop{\sum }\nolimits_{{{{\rm{i}}}} < {{{\rm{j}}}} = 1}^{{{{{\rm{N}}}}}_{{{{\rm{e}}}}}}v({r}_{{{{\rm{ij}}}}})\), where N (Ne) is the number of nuclei (electrons) in the supercell, and the functions u and v are defined as follows:

$${u}_{{{{\rm{I}}}}}(r)=\frac{{Z}_{{{{\rm{I}}}}}}{a}(1-{e}^{-ar})$$
(2)
$$v(r)=\frac{r}{2(1+br)},$$
(3)

with a and b variational parameters, and ZI the charge of the Ith pseudoatom. The coefficients in Eqs. (2) and (3) are set to fulfill the Kato cusp conditions for electron-nucleus and electron-electron coalescence, respectively57.

J3 is the three-body term that accounts for the electron-electron-nucleus interactions. As defined in TurboRVB, it is also intrinsically non-homogeneous, because it depends on the individual electron positions and not only on the relative distances, which is less accurate. Being non-homogeneous, it is expanded on a modified atomic Gaussian basis set of 2s2p1d atomic orbitals, for both sulfur and hydrogen atoms.

The J3 parameters, together with a and b, are optimized by minimizing the variational energy of the many-body wavefunction in Eq. (1). The Slater part is instead kept frozen as determined by DFT-LDA. As stochastic minimization algorithm, we employed the linear method58. We then carried out lattice regularized diffusion Monte Carlo (LRDMC) calculations31, to stochastically project the initial wavefunction toward the ground state of the system, within the fixed node approximation. Within this approximation, the LDA nodes provide accurate results for this system, as verified in Supplementary Note II. In LRDMC, we used a lattice space of 0.25 a0, which is known to produce converged energy differences. We started the projection from the best variational state optimized in the previous step, taken as trial wavefunction. Finite-size scaling has been performed on the 2 × 2 × 1, 2 × 2 × 2, 3 × 2 × 2 and 3 × 3 × 2 real-space supercells in order to extrapolate the LRDMC total energy to the thermodynamic limit, by also using Kwee-Zhang-Krakauer (KZK)59 corrections to make its size dependence milder.

This workflow has been repeated for every point in the real-space grid used to interpolate the PES model from ab initio data (see section “Potential energy surface parametrization”).

Potential energy surface parametrization

To derive an effective low-dimensional PES, we considered the collective and concerted motion of all the hydrogen atoms of the cubic unit cell, with sulfur atoms forming a bcc sublattice. The position of a hydrogen atom is described by the cylindrical coordinates x, r and ϕ, defined along the axis connecting the two flanking sulfur atoms (S-S axis): r is the position of the hydrogen atom along the S-S axis, r is the radial distance from the S-S axis, and ϕ is the azimuthal angle, wrapping around the same axis. We use fractional coordinates, where the lengths are expressed in dSS units, dSS being the lattice parameter of the bcc unit cell. Within this reference system, the S-S midpoint has coordinates (x, r, ϕ) ≡ (0.5, 0, 0). We assume that all hydrogen atoms in the unit cell move in the same way. This fixes the choice of a collective path connecting the \({\rm{Im}}{\bar{3}}{\rm{m}}\) symmetry (with all hydrogen atoms sitting at the S-S midpoints) to the R3m one (with all hydrogen atoms coherently displaced from the midpoint). In this way, we apply a dimensionality reduction of the full potential, depending on 3N dimensional coordinates, where N is the number of atoms in the cell, to a much simpler 3D PES: E = E(x, r, ϕ).

The functional form of our 3D PES is constructed as follows:

$$E(x,r,\phi )=A(x,r)+B(x,r)\sin (\phi +5\pi /4),$$
(4)

with:

$$A(x,r)=\frac{{{f}}_{\max }(x,r)+{{f}}_{\min }(x,r)}{2},\quad B(x,r)=\frac{{{f}}_{\max }(x,r)-{{f}}_{\min }(x,r)}{2},$$
(5)

and where \({{f}}_{\min }\) and \({{f}}_{\max }\) are defined as:

$$\begin{array}{ll}{{f}}_{\min ,\max }(x,r)=&\,a+\frac{1}{2}b{(x-0.5)}^{2}+\frac{1}{4}c{(x-0.5)}^{4}\\& +\,dr+\frac{1}{2}e{r}^{2}\\&\pm\, f(x-0.5)r\pm g(x-0.5){r}^{2}\\&\pm\, {h}_{1}{(x-0.5)}^{3}r\pm {h}_{2}{(x-0.5)}^{3}{r}^{2}\\& +\,{h}_{3}{(x-0.5)}^{2}r+{h}_{4}{(x-0.5)}^{2}{r}^{2}\\&+\,{h}_{5}{(x-0.5)}^{4}r+{h}_{6}{(x-0.5)}^{4}{r}^{2}\end{array}$$
(6)

The choice of this functional form is motivated by the symmetries of the system. For a fixed {x, r}, the potential E has an angular dependence that varies following a sine curve with 2π-periodicity. In particular, for x < 0.5, E has a minimum given by \({{f}}_{\min }\) at ϕ = π/4 and the maximum \({{f}}_{\max }\) at ϕ = 5π/4. This dependence is built in Eqs. (4) and (5). The \({\{{{f}}_{{{{\rm{i}}}}}({x,\; r})\}}_{{{{\rm{i}}}} = \min ,\max}\) functions in Eq. (6) are a composition of the following terms: a Landau-type potential that well describes the energy profile for r = 0, a second-order polynomial function in r for x = 0.5, and mixed terms made of cross products of factors up to the fourth order in (x − 0.5) and up to the second order in r, which give enough flexibility in order to well reproduce the total PES. The signs in \({\{{{f}}_{i}({x,\; r})\}}_{{{{\rm{i}}}} = \min ,\max}\) ensure the symmetry: E(1 − x,r, ϕ + π) = E(x, r, ϕ), fulfilled by the system.

We sampled the PES by discretizing the 3D space according to the following grid defined in cylindrical coordinates: \(x=\left[0.42,0.44,0.46,0.48,0.5\right]\) (in dSS units), r = [0.00, 0.02, 0.05, 0.08] (in dSS units) and ϕ = [π/4, 5π/4]. For these points we computed the ab initio total energies, given either by DFT-BLYP or by QMC calculations. We finally used the generated datasets to best fit the PES, parametrized according to Eqs. (4)–(6). The root mean square error of these fits amounts to ≈1 meV per H3S unit.

Equation of state

In order to get the pressure associated to each volume, P = P(V), we use the Vinet EOS:

$${P}({V})=3{B}_{0}\frac{1-\eta }{{\eta }^{2}}\exp \left(-\frac{3}{2}({B}_{0}^{{\prime} }-1)(1-\eta )\right).$$
(7)

with \(\eta ={({V}/{{V}}_{{{{\rm{0}}}}})}^{1/3}\). In Eq. (7), the parameters V0, B0 and \({{B}}_{{{{\rm{0}}}}}^{{\prime} }\) are the equilibrium volume, the isothermal bulk modulus, and the derivative of bulk modulus with respect to pressure, respectively. The Vinet EOS34 is empirical and, despite having only a few parameters, it is very accurate to describe solids under extreme conditions. We obtained V0, B0 and \({{B}}_{{{{\rm{0}}}}}^{{\prime} }\) by fitting the E = E(V) relation for the \({\rm{Im}}{\bar{3}}{\rm{m}}\) phase, where the total energy is computed from first principles, either by DFT-BLYP or by QMC, on a grid of volumes (see Fig. 9a). In the fit, we disregarded the Zero-Point Energy (ZPE) contribution, because we verified that the ZPE variation is very small (<1 mHa per H3S unit) in the range of pressures analyzed here within the same \({\rm{Im}}{\bar{3}}{\rm{m}}\) phase.

PIMD simulations

The PIMD simulations are carried out at 200 K using 20 beads with ab initio DFT forces, while using 40 beads with 3D-PES forces, to take into account quantum effects. A convergence study of the PIMD results with respect to the number of beads is reported in Supplementary Note III. Nuclei are evolved in time using the PIOUD integrator36 with a time step equal to 0.75 fs and a friction parameter of the Langevin thermostat equal to 1.46  10−3 atomic units. The latter value is the same as in ref. 36, where it is found to be optimal for both stochastic and deterministic forces. Simulations lasted around 6 ps, until the convergence of the vibrational modes at Γ is reached. Forces are computed from the Born-Oppenheimer PES evaluated at DFT level within the QE package, or from the model PES defined in the “Potential energy surface parametrization” section. In case of ab initio PIMD, we used a BLYP functional for computing the PES. The wavefunction cut-off for the PES is set to 90 Ry (420 Ry for the charge density), while the Fermi smearing is Gaussian and set equal to 0.03 Ry. PIMD simulations are performed using 2 × 2 × 2 real-space supercells, containing in each case 32 atoms, and the corresponding reciprocal-space mesh is always equal to 9 × 9 × 9. We used a smaller plane-wave cutoff than the one used in single-point DFT calculations, because in PIMD we replaced the hard H Coulomb pseudopotential with a smoother PAW one. This has been necessary to speed up the PIMD calculations, which would otherwise have been too time consuming.

In our PIMD framework, non-adiabatic effects and permutation exchanges are not included. However, in this work we focused on the normal electronic state, where the system is purely metallic, with no relevant excitonic effects, and without superconducting gap opened. As far as quantum statistics is concerned60, exchange effects should not play a major role in the range of volumes analyzed for H3S. Indeed, by comparing the density of hydrogen atoms in the largest volume we studied (ρH) against the typical density of pristine hydrogen where exchange effects are significant (ρ < ρ0 = 0.0435 mol per cm3)61, we find ρH ≥ 3ρ0. Furthermore, the average distance between hydrogen atoms (dHH) in the range of volumes considered is always such that dHH ≥ 2 Å and no pure roto-librations between two hydrogen atoms are present in the vibrational spectrum.

SSCHA simulations

Besides the exact description of quantum nuclear motion provided by PIMD, one can also rely on approximated theories like the SSCHA20, based on a variational principle on the free energy, which allows one to include quantum nuclear anharmonicity in a non-perturbative way. Here, we performed SSCHA simulations on the 3D H3S (D3S) model using up to 30,000 configurations. The average proton position (centroid) reported in Supplementary Fig. 5 (in Supplementary Note IV) are directly accessible through the SSCHA free energy minimization.

Phonons

Harmonic phonons are obtained through DFPT simulations62 as implemented within QE51. The same set of DFT parameters and pseudopotentials employed for PIMD simulations were used to compute harmonic phonon dispersions, except for the k-space grid that was chosen equal to 18 × 18 × 18, as in this case it is referred to the unit cell. The results of these calculations are shown in Fig. 2. We specify that the DFPT shuttling mode frequency at q = Γ, reported in Fig. 3 has been computed with higher precision by employing the more accurate H Coulomb pseudopotential, requiring a plane-wave cutoff of 200 Ry.

Anharmonic phonon frequencies at PIMD level are evaluated by computing the zero frequency component of the phonon Matsubara Green’s function from PIMD simulations. This method has been recently implemented in ref. 32 and it has been shown to describe accurately the vibron frequencies of solid phases of hydrogen. Conversely, within the SSCHA, auxiliary phonons are a byproduct of the free energy minimization. However, to get the physical phonons of Fig. 3, probed by spectroscopies, we apply the full self-energy dynamical corrections to the auxiliary dynamical matrix, described in detail in ref. 20, including both the third and fourth-order terms.