Introduction

The Bardeen–Cooper–Schrieffer1 and Migdal–Eliashberg2,3 theories of conventional phonon-mediated superconductivity imply that high frequency phonons and strong electron-phonon interactions are favorable for high-temperature superconductivity. Hydrogen, which has the highest naturally-occurring phonon frequencies due to its low mass, could be the best candidate material for high-temperature superconductivity4,5. Although the realization of superconductivity in pure hydrogen has been hindered by the extreme pressures required to reach the superconducting state (500 GPa), the idea of “chemical precompression” of hydrogen by heavier chemical elements in hydrogen-rich compounds6 has brought great success. Following the discovery of Tc = 203 K in H3S at 150 GPa7,8, higher Tcs were subsequently reported in so-called metal superhydrides including Tc 220 K in CaHx9,10, Tc 243 K in YH911 and Tc 250 K in LaH1012,13,14. These major leaps toward room temperature superconductivity are the result of fruitful synergy between theory, computation, and experiment.

Superconductivity in hydrogen-rich compounds has since been demonstrated in numerous experiments15,16; however, it was identified based mostly on electrical transport measurements. Magnetic measurements, which are, inter alia, a crucial and independent test of superconductivity are scarce. They have not provided reliable experimental values of a lower critical field Hc1 and the London penetration depth λL in hydrogen-rich superconductors. Magnetic field screening in the superconducting state of the Im-3m-H3S phase below 203 K was demonstrated using a superconducting quantum interference device (SQUID) and was in good agreement with the sharp drop of resistance in corroborating electrical resistance measurements of the same sample7. However, Hc1 was only roughly estimated from the hysteretic loops of M(H) data instead of the initial virgin portion of magnetization curves of zero-field-cooled (ZFC) sample. More recently, the diamagnetic response in H3S17 and LaH1018 were qualitatively demonstrated by alternating current magnetic susceptibility measurements adapted for diamond anvil cells (DACs)19.

In the present work, we created an effective approach for accurate magnetometry measurements of samples under megabar pressures by measuring the reference magnetic signal of the whole DAC assembly before the synthesis of a superconducting compound. This technique allows us to accurately determine the values of Hc1, λL, the Ginzburg–Landau parameter κ, and the critical current density jc in Im-3m-H3S and Fm-3m-LaH10 high-temperature superconductors.

Results

Synthesis and characterization of superconducting samples

Samples of H3S and LaH10 were synthesized via a chemical reaction between sulfur or lanthanum trihydride and hydrogen at high pressures, in the stability field of the final products. The samples were prepared by sandwiching thin plates of S or LaH3 between two thicker layers of NH3BH3 and pressurized in miniature nonmagnetic DACs to 170 GPa. The reference background magnetization signal was collected from the whole assembly of DAC including the pressurized precursor compounds in a SQUID magnetometer. The samples were subsequently heated using a pulsed laser to synthesize the desired superconducting products. Several photos of samples are shown in Fig. 1. Ammonia borane was chosen as an alternative source of hydrogen20, as it readily decomposes at high temperature and releases free H2. This approach was successfully implemented for synthesis of hydrides earlier11,13. In contrast to synthesis in an atmosphere of pure H2, the use of NH3BH3 simplified the experimental procedure and significantly enlarged a size of the final products. The latter is crucial for SQUID measurements because the measured magnetic moment is proportional to square of a sample radius. In addition, the use of NH3BH3 allowed for correct reference magnetization measurements in contrast to pure hydrogen, which can cause uncontrolled spontaneous hydrogenation and formation of the superconducting phases at high pressure prior to the laser heating.

Fig. 1: Synthesis of the Im-3m-H3S and Fm-3m-LaH10 phases.
figure 1

a Illustration of the miniature DAC used for magnetic measurements in SQUID. b Scheme showing the typical arrangement of the sandwiched precursors in the DAC. c, d Photos of the sandwiched samples, S + NH3BH3 and LaH3 + NH3BH3, after loading at PD 1 and 3 GPa, respectively. e, f Photos of the H3S and LaH10 samples after compression and subsequent pulsed laser heating. g, h X-ray powder diffraction patterns collected from the synthesized Im-3m-H3S and Fm-3m-LaH10 samples. The black circles and red and blue curves correspond to the experimental data, Rietveld refinement fits and residues, respectively. The green ticks indicate the calculated peak positions. The (101) reflection stemming from the P63/mmc-LaH10 impurity phase is marked by asterisk. The fragments of the crystal structure with the characteristic SH6 and LaH32 coordination polyhedra are shown as insets. The large yellow and cyan and small black spheres represent the S, La and H atoms in the crystallographic unit cells, respectively. The spatial distribution across the heated samples and the estimated diameter of the superconducting Im-3m-H3S and Fm-3m-LaH10 phases are shown as inset. PD, PH and PS are pressure values estimated from the position of diamond edge and hydrogen vibron in Raman spectra and refined lattice parameters of the final products, respectively (see details in “Methods”).

Figure 1g, h shows X-ray diffraction patterns from the dominant Im-3m-H3S and Fm-3m-LaH10 phases in the heated samples. Although LaH10 sample contained P63/mmc-LaH10 as a minor impurity phase, we note that this was also found in various samples synthesized from La or LaH3 and pure H2 in previous studies and did not hinder superconductivity in Fm-3m-LaH10, which has the highest Tc in the lanthanum-hydrogen system12,21. Both the Im-3m-H3S and Fm-3m-LaH10 phases were found to be homogeneous and evenly distributed within the heated area to an average diameter of 85 and 70 μm, respectively (insets in Fig. 1), which are in good agreement with the values estimated by optical microscopy. In addition, a sample pressure of PS = 155 ± 5 GPa for Im-3m-H3S and PS = 130 ± 8 GPa for Fm-3m-LaH10 was determined more precisely based on the variation of the refined lattice parameters across the sample (see Supplementary Information). The Fm-3m crystal lattice of LaH10 sample is likely slightly distorted as (111), (220) and (311) diffraction peaks are broader than (200) peak. These peaks were shown to be most sensitive to the monoclinic structural distortions in LaH10 at pressures below 138 GPa21.

M(T) magnetization measurements

The ZFC samples with the Im-3m-H3S and Fm-3m-LaH10 phases exhibit clear diamagnetic signal below their respective Tcs, indicated that they had become superconducting after laser heating (see Fig. 2 and Supplementary Figs. S1 and S2). The pronounced changes were detected in raw voltage curves of direct current (DC) scans measured before and after laser heating (see Fig. 2a, b). The pressurized unheated precursors have two minima in DC scans at ~0 and −1.5 cm, which correspond to the centered position of the sample in DAC and the center of the massive part of DAC body including a piston and a cap, respectively (see Supplementary Fig. S3). After the synthesis of Im-3m-H3S and Fm-3m-LaH10 phases, an additional diamagnetic signal originating from the superconductor below its Tc appeared at 0 cm. The distinctive step on the resulting M(T) dependence associated with superconductivity was observed in both heated samples at 2, 4 and 10 mT (see Fig. 2c–f). The LaH10 sample has a broader superconducting transition, which is most likely caused by a larger pressure gradient across the sample and a strong Tc(P) dependence on the verge of structural instability in this pressure range21. The observed values of Tc 231 K in Fm-3m-LaH10 and 196 K in Im-3m-H3S are in excellent agreement with the previously-reported values from four-probe electrical transport measurements of samples at the same pressures7,21,22,23,24.

Fig. 2: Expulsion of magnetic field by the superconducting Im-3m-H3S and Fm-3m-LaH10 phases at PS = 155 ± 5 GPa and PS = 130 ± 8 GPa, respectively.
figure 2

a, b Appearance of the diamagnetic signal in the raw SQUID output signal of ZFC samples containing the superconducting Im-3m-H3S and Fm-3m-LaH10 phases under low magnetic fields below their Tcs. Black circles correspond to data measured for the compressed S + NH3BH3 and LaH3 + NH3BH3 sandwiched samples at PD 167 GPa before laser heating, red circles correspond to data collected from heated samples with Im-3m-H3S and Fm-3m-LaH10 phases. The blue circles show the difference, whereas the green curve shows the fit. The position at 0 cm corresponds to the center of the pickup coil relative to which the superconducting samples were centered (see “Methods”). c, d ZFC and FC portions of M(T) measurements of the sandwiched samples with metallic S and LaH3 (top panel) and heated samples with Im-3m-H3S and Fm-3m-LaH10 phases (bottom panel), respectively. e, f ZFC portions of M(T) magnetization data for the Im-3m-H3S and Fm-3m-LaH10 phases at 2, 4 and 10 mT after subtraction of the background signal measured from the DACs with the pressurized unheated sandwiched samples. g, h FC portions of M(T) data measured at 2, 4 and 10 mT after formation of the Im-3m-H3S and Fm-3m-LaH10 phases. The curves were vertically translated for better representation. The raw M(T) data of the initial pressurized and heated samples are summarized in Supplementary Figs. S2 and S3. Smoothed by a percentile filter, light blue curves demonstrate the subtle Meissner effect in FC measurements.

It is worth noting that whereas the superconducting transition is pronounced in ZFC measurements, its signature is subtle or almost undetectable in field-cooled measurements (see Fig. 2g, h and Supplementary Figs. S1 and S2). The weak flux expulsion or its absence is well-known for type II superconductors with strong pinning of vortices25. Strong pinning prevents vortices inside the sample from leaving the sample below the Hc1(T) value. The very low fields are favorable for the detection of the Meissner state, because in this case the Hc1(T) line is crossed in the vicinity of Tc where critical currents are smaller and the pinning is weaker26. We also observed strong suppression of the Meissner effect in the test measurements performed on a powder sample of MgB2 (see Supplementary Information). No flux expulsion at all was also reported in some publications on Fe-based superconductors27,28.

When measuring a superconducting sample with a large magnetization value, it is important to consider demagnetization effects. The total magnetic field Ht inside a sample is given by:

$${H}_{t}=H-{H}_{d},$$
(1)

where H is the external applied field and Hd is the demagnetization field. The demagnetization field is given by Hd = −NM, where N is a shape-dependent demagnetization factor and M is the magnetization of a sample. For a long and thin sample in a parallel field N ≈ 0, while for a short and flat sample in a perpendicular magnetic field the demagnetization correction NM can be enormous.

We estimated an effective demagnetization factor N in the studied samples using the measured values of magnetization, assuming an ideal diamagnetic signal in low fields ZFC measurements. Then the demagnetization correction for a perfect diamagnet (magnetic susceptibility χ = −1) can be written as follows:

$$\frac{\triangle M}{{HV}}=-\frac{1}{1-N},$$
(2)

where V is the volume of a sample. The absolute value of ΔM, the difference in M between a normal metal state (above Tc) and a superconducting state (below Tc), was extracted from the measurements by subtraction of the reference data of the compressed sandwiched samples (see Fig. 2). A thickness of samples is, however, the main contributor to the uncertainty in the values of V and N because it cannot be directly probed in the experiment. Nevertheless, we indirectly estimated a thickness of the final H3S and LaH10 samples as 2.8 and 1.9 µm, respectively, by considering: (1) the visual expansion of samples during pressurizing, (2) the pressure-induced compressibility of S and LaH3, and (3) the increase of product volumes after the hydrogenation reaction (see details in Supplementary Information). If we put the values of ΔM and V in Eq. (2) the demagnetization correction is 8.5 for the sample of Im-3m-H3S and 13.5 for the sample of Fm-3m-LaH10.

An alternative way of the evaluation of the diamagnetic factor would be approximating of the shape of samples by thin solid disks and using the equation for effective demagnetization factor from ref. 29 (see detailed discussion in “Methods”). We consider the N values from M(T) data more reasonable and reliable and will use them in the rest of the paper.

M(H) magnetization measurements

Measurements of the magnetic field dependence of magnetization allow us to estimate the characteristic superconducting parameters Hc1, λL, κ, and jc. The value of Hp, at which the applied magnetic field starts to penetrate the sample, was determined from the onset of the deviation of M(H) from the linear dependence (see Fig. 3). The extrapolation of Hp(T) to lower temperatures yields Hp(0 K) 96 mT for Im-3m-H3S and 41 mT for Fm-3m-LaH10. Applying the demagnetization correction we obtain values of Hc1(0 K) 820 mT for H3S and 550 mT for LaH10. The Ginzburg–Landau parameter κ can be evaluated from the equation:

$$\frac{{H}_{c2}}{{H}_{c1}}=\frac{2{\kappa }^{2}}{{{{{{\rm{ln}}}}}}\kappa },$$
(3)

where Hc2 is an upper critical field30. Inserting the experimental estimations of Hc2(0 K) 97 T for Im-3m-H3S23 and 143.5 T for Fm-3m-LaH1021 gives κ 12 and 20 for H3S and LaH10, respectively. A coherence length ξ(0 Κ) 1.8 nm for H3S and 1.5 nm for LaH10 were evaluated using the available experimental data21,23, which gives a London penetration depth of λL(0 Κ) 22 nm in Im-3m-H3S and 30 nm in Fm-3m-LaH10. The temperature dependence of λL is shown in Supplementary Fig. S4. At low temperatures, the s-wave model of conventional superconductivity well reproduces the data for both compounds. The thermodynamic critical field value is given by:

$${H}_{c}\left(0\,{{{{{\rm{K}}}}}}\right)=\frac{\sqrt{{H}_{c1}(0\,{{{{{\rm{K}}}}}}){H}_{c2}(0\,{{{{{\rm{K}}}}}})}}{\sqrt{{{{{{\rm{ln}}}}}}\kappa }}.$$
(4)

Hc(0 K) 5.6 T for H3S and 5.1 T for LaH10. The robustness of the dissipation-free vortex solid phase in hydrides can be evaluated via Ginzburg–Levanyuk number:

$${Gi}=\frac{1}{2}{\left(\frac{2\pi {\mu }_{0}{\kappa }_{B}{T}_{c}{\lambda }_{L}^{2}}{{\phi }_{0}^{2}\xi }\right)}^{2}$$
(5)

were \({\kappa }_{B}\) is the Boltzmann constant, μ0 is the vacuum permeability and \({\phi }_{0}\) is the magnetic flux quantum. Gi quantifies the scale of fluctuations responsible for vortex melting31 and vortex creep32 in a superconductor. Gi(0 K) ~9 × 10−7 for H3S and ~6 × 10−6 for LaH10, which is substantially smaller than what is reported for cuprate and pnictide high-temperature superconductors31,32 and comparable to that of Nb3Sn. Despite high Tc both hydrides display a moderate κ which results in weaker vortex fluctuations and explains why the reported vortex liquid region remains narrow even at high magnetic fields21,23.

Fig. 3: M(H) magnetization data for Im-3m-H3S and Fm-3m-LaH10 at high pressure.
figure 3

a, b Magnetic moment associated with the penetration of the applied magnetic field into the Im-3m-H3S phase at PS = 155 ± 5 GPa and the Fm-3m-LaH10 phase at PS = 130 ± 8 GPa based on virgin curves of the M(H) magnetization data at selected temperatures. The curves were superimposed by performing linear transformations for a better representation. A linear background, defined as a straight line connecting M(H = 0 T) and M(H = 1 T) at corresponding temperature, was subtracted. After that the data were normalized to H = 15 mT data so that to have the same initial linear M(H) slope. c, d Temperature dependence of a penetration field Hp for Im-3m-H3S and Fm-3m-LaH10 derived from the virgin curves of M(H) magnetization data. Black circles and red curves correspond to the experimental data and fits, respectively. e, f Hysteretic part of M(H) measurements of H3S and LaH10 in the normal metallic state above Tc and the superconducting state below Tc, correspondingly.

It is important to estimate the range of values of the superconducting parameters of Im-3m-H3S and Fm-3m-LaH10, which depends on a sample thickness. We evaluated the minimum and maximum values of a sample thickness as 2.1–3.1 μm for H3S and 0.6–2.5 μm for LaH10 (see details in Supplementary Information). Thus, the lower and upper limits are: 0.74–1.09 T for Hc1(0 K), 18–23 nm for λL(0 Κ) and 10–13 for κ in Im-3m-H3S; and 0.42–1.75 T for Hc1(0 K), 14–35 nm for λL(0 Κ) and 10–23 for κ in Fm-3m-LaH10. For LaH10, the larger dispersion is a result of a substantial increase of N in case of the lower limit of a sample thickness. The estimated superconducting parameters for both hydrides are summarized in Table 1.

Table 1 Summary of estimated superconducting parameters for Im-3m-H3S and Fm-3m-LaH10 at high pressure.

A general behavior of M(H) (see Fig. 3e, f) is typical for type II superconductors, in particular, the difference in a magnetic moment between the forward and reverse sweep of an applied magnetic field increases with a decrease of temperature. However, it was not possible to observe the extent of the superconducting magnetization hysteresis and the characteristic field H*, above which magnetization becomes reversable, because the magnetic signal of the DAC becomes much higher in comparison with the magnetic response of H3S and LaH10 samples for the reliable subtraction of the background.

We also estimated the critical currents using the Bean critical state model33,34. This model assumes that when the sweeping magnetic field fully penetrates the sample the density of the screening current equals the critical current value jc. The difference in magnetic moment Δm between forward and reverse field is due to the reversal of the direction of the screening moment, and can be used to evaluate the magnitude of the bulk critical current. A concentric screening current pattern with density jc creates a magnetic moment \(m=\frac{\pi }{3}{j}_{c}h{r}^{3}\), where h is the thickness and r is the radius of the disk-shaped sample, often approximated by \({j}_{c}=30\frac{m}{{Vr}}\), where m, V, and r are in CGS units and jc is in A cm−2. We found that jc reaches values of 7 × 106 A cm−2 for both LaH10 and H3S at 100 K (see Supplementary Fig. S5). This high value of the critical current indicates strong vortex pinning, which corroborates negligible magnetization signal observed during field cooling, as well as very high irreversibility field H*, or vortex melting/de-pining field, reported in magnetotransport measurements7,12,21,23,35. The critical currents in LaH10 estimated from the magnetization measurements are of the same order of magnitude but somewhat higher than the value of 1.2–2.8 × 106 A cm−2 at 4.2 K measured in presumably yttrium-doped lanthanum superhydride using electrical transport technique35. This discrepancy can be attributed to the fact that in the transport measurements jc is constrained by those parts of the electrical current path where the superconductivity is least robust, while the magnetization signal is dominated by the parts of the sample with most robust superconductivity.

Discussion

It is informative to compare our findings with the available magnetic data from previous studies on H3S7,36. Although Hc1 30 mT was reported in an earlier study of Im-3m-H3S7, this value was strongly underestimated. Firstly, Hc1 was determined from the hysteretic loops of M(H) data instead of the initial virgin magnetization curves, which were not measured. Secondly, the real shape of the superconducting phase was not determined and the corresponding demagnetization correction were not applied. In addition, the diamagnetic signal was superposed by a much stronger paramagnetic signal, presumably stemming from the body of DAC.

In another work, authors applied forward nuclear resonant scattering technique using the 119Sn Mössbauer isotope as a sensor and reported a value of H 0.68 T, which was expelled by the sample at 120 K36. The sample was synthesized by pressure-induced disproportionation of H2S at 150 GPa as in ref. 7, however the superconducting phase was not characterized—neither crystal structure nor Tc were determined. Since the geometry and arrangement of a tin foil and superconducting sample, which are required for calculations of demagnetization and end effects, are unknown, it is not possible to quantify the value of Hc1 from this experiment.

In summary, we have performed magnetization measurements using a specially-designed miniature DAC for representative members of two families of hydrogen-rich superconductors—H3S, which contains covalent H-S bonds, and LaH10, which has ionic bonding between La and H. The present data demonstrate that the diamagnetic signal is absent in the pressurized S and LaH3 precursor compounds and only appears after laser heating of the samples and the resultant chemical synthesis of the respective superconducting phases. In contrast to high-Tc superconductors of the cuprate family, the Im-3m-H3S and Fm-3m-LaH10 phases have significantly lower values of λL. The low values of κ indicate that both compounds belong to “moderate” type II superconductors not far from the clean limit. Both H3S and LaH10 hydrides possess good superconducting characteristics; in addition to high values of Tc they exhibit high critical current densities and have high values of lower and upper critical fields. These make hydrogen-rich compounds promising materials for technological use, provided that they can be stabilized at ambient or accessible pressure conditions.

Methods

Diamond anvil cell

The samples were synthesized in miniature DACs, which were specially designed for a standard commercial SQUID magnetometer (either Quantum Design MPMS or Cryogenic Limited S700X) with the sample space diameter of 9 mm by reworking and modifying the prototype piston/locking nut design. The design of the DAC was briefly described in ref. 7. To minimize the magnetic signal over a wide temperature range simultaneously providing a high mechanical strength, the body of the DAC was made of a high-purity Cu-Ti alloy with 3 wt% Ti37. This material has the lowest magnetic susceptibility among the known hard metallic alloys: χg = 8 × 10−4 mJ T−1 g−1 at 1.8 K and at the same time it is hard enough to build parts of the DAC: its tensile strength is 103 MPa38. As parts such as piston and diamond seats are subjected to the highest load, they were made of harder Cu-Be alloy with 1.8-2.0 wt% Be. Such combination of materials allows us to construct the miniature DAC with an outer diameter of 8.8 mm, which is capable to reach pressures as high as 220 GPa retaining the low overall magnetic response.

The diamonds were beveled at 9° to a diameter of ~250 µm with a culet size of ~75 and ~90 µm. In total, 200-µm-thick rhenium gasket was pre-indented to a thickness of 20 and 30 µm, and a hole with a diameter of about the culet size was drilled using a laser. All elements of the high-pressure cell assembly were thoroughly etched in acids in order to remove a possible contamination by magnetic pieces, which could stem from the manufacturing of the DAC parts, polishing of the diamonds and cutting of the gaskets. All parts of the DACs and prepared gaskets were etched in 3 M hydrochloric acid for 30 min, and diamonds were etched in a mixture of concentrated nitric and hydrochloric acids in 1:3 molar ratio for 90 min in an ultrasonic cleaner.

Preparation of samples

Sulfur (99.999%, Alfa), NH3BH3 (97%, Sigma-Aldrich), and LaH3, which was synthesized from La (99.9%, Alfa Aesar) and H2 (99.999%, Spectra Gases), were used as initial reactants. In contrast to metallic La, LaH3 was beneficial because it required less hydrogen for the full hydrogenation. The loading of samples in DACs were handled in an inert Ar atmosphere with the O2 and H2O residual contents of <0.1 ppm. NH3BH3 acted both as a source of H2 and a thermal isolator from the diamonds during laser heating. The thin plates of S, LaH3 and NH3BH3 for the sandwiched samples were molded out the corresponding powder samples by squeezing them between two large 1-mm-diameter diamond anvils. The thickness of the plates was monitored by the interference of the visible light.

The sandwiched samples, in which 8-µm-thick S or 6-µm-thick LaH3 plates were interposed between two 10–15-µm-thick layers of NH3BH3 were put in the hole of pre-indented metallic gaskets. Then samples were pressurized to PD of 167 GPa with a pressure gradient across the culet of about ±7 GPa. The decomposition of NH3BH3 and synthesis of the superconducting Im-3m-H3S and Fm-3m-LaH10 phases were performed using the one-side heating with Nd:YAG pulse laser (a wavelength λ = 1.064 μm, the duration of pulses of 3 µs, and frequency of 104 Hz). We heated S + NH3BH3 sample at 700 K and LaH3 + NH3BH3 sample at 2000 K by traversing the 5-µm-diameter laser spot horizontally and vertically across the diamond culets. Several photos of the initial, pressurized and heated samples are summarized in Supplementary Figs. S6 and S7.

Importantly, the integrity of a superconducting phase in a final sample is crucial for detecting of the diamagnetic signal by a SQUID. For example, LaH3 completely transformed to the Fm-3m-LaH10 phase already after the first laser heating at 1000 K according to the X-ray diffraction data, nevertheless the superconducting transition was not observed in the magnetic measurements (see Supplementary Fig. S8). We guessed that this was because the sample was not uniform and consisted of separate parts, from which the sum magnetic signal is smaller than that from the one uniform disk of the same integral area. Our rough estimations gave a factor of ~5 difference in the signal between one 60-µm-diameter disk and 20 12-µm-diameter disks with a thickness of 2 µm just because of different demagnetization factors. Additionally, the smaller disks might have a smaller total volume resulting in an increase of a factor to 10, so the sum magnetic signal becomes less than the sensitivity of a SQUID. To improve the integrity of the superconducting phase by sintering, we again heated LaH10 but at significantly higher temperatures of 2000 K. As a result, the pronounced superconducting transition appeared in the subsequent magnetic measurements.

Estimation of pressure

The pressure values in samples were estimated using three different techniques. Initially we determined the pressure in the compressed sandwiched samples using the diamond scale39 based on the shift of the Raman line edge of a stressed diamond (marked as PD in the text). This scale is not accurate and depends on the arrangement of a sample and the geometry of diamond anvils. Therefore, after the high-pressure synthesis we estimated pressure values more accurately using the refined lattice parameters of the superconducting Im-3m-H3S and Fm-3m-LaH10 phases from X-ray diffraction data (marked as PS in the text). The average value of the refined lattice parameter a across the sample is 3.057(8) Å for Im-3m-H3S phase and 5.175(13) Å for Fm-3m-LaH10 phase. Taking into account the available accurate structural data of H3S and LaH10 measured in samples under quasi hydrostatic conditions of H2 medium12,21,22,23,24,40, we defined pressure as PS = 155 ± 5 GPa in Im-3m-H3S sample and PS = 130 ± 8 GPa in Fm-3m-LaH10 sample.

In addition, we identified the vibron of H2 at 4035 cm−1 in Raman spectra of the heated sample with Im-3m-H3S phase (see Supplementary Fig. S8), which corresponds to PH = 155 GPa according to the hydrogen scale41.

X-ray diffraction measurements

X-ray diffraction data were collected from the heated samples in the same miniature DACs at the beamlines 13-IDD at GSECARS, Advanced Photon Source (λ = 0.2952 Å, a beam spot size of ~2.5 × 3.5 µm2, Pilatus 1 M CdTe detector) and P02.2 at PETRA III, DESY (λ = 0.2885 Å, a beam spot size of ~2 × 2 µm2, LAMBDA GaAs detector). The reference samples of LaB6 and CeO2 were used for calibration of the distance between sample and detector. To examine the size and distribution of the superconducting phase in the samples, we collected X-ray powder diffraction patterns form the spatial area of 110 × 110 µm2 with the horizontal and vertical step of 10 µm. Primary processing and integration of the data were made using the Dioptas software42. The indexing of X-ray diffraction patterns and refinement of the crystal structures were done with GSAS and EXPGUI packages43.

Magnetization measurements

Magnetization measurements were done in the S700X SQUID magnetometer by Cryogenic Limited, a miniature DAC was attached to the 140-mm-long straw made of kapton polyimide film, which was specially designed to minimize the end effects. The relative position of the sample in the SQUID magnetometer was determined using the ferromagnetic signal from a small steel piece with a size of about 140 × 100 × 25 μm3 attached directly to the rhenium gasket, which surrounded the sample (see Supplementary Fig. S3). This approach allows one to directly find the sample position in contrast to the centering procedure for a symmetric DAC, in which the total magnetization response from the whole assembly is inferred (presumed to be) as symmetric44. To minimize the errors associated with the sample positioning at different temperatures, the temperature-induced expansion of the rod, which holds the sample, was additionally calibrated within the wide temperature range using the ferromagnetic signal from the same steel piece.

For the micrometer-size superconducting samples in DACs we were able to extract the small diamagnetic signal of a superconductor from the measured overall magnetic moment including that of the bulky body of DAC, diamonds and rhenium gasket. We first measured the magnetic signal of the DACs with the starting pressurized precursor compounds before laser heating, in which S and LaH3 were normal metals. Then we subtracted these reference data from the magnetic moment collected from the same DACs after laser heating and chemical synthesis, i.e., with the superconducting Im-3m-H3S and Fm-3m-LaH10 phases.

Tc was determined as the offset of the diamagnetic transition on the ZFC curves of the temperature dependence of magnetic moment M(T). The other basic characteristic of superconductivity, such as Hc1(0 K), λL(0 Κ) and κ, were determined from the magnetization measurements. The M(H) data were collected at several temperatures above and below Tc within the range of magnetic field up to −1–1 T and summarized in Supplementary Figs. S10 and S11. The value of Hp, at which an applied magnetic field starts to penetrate into the sample, was determined from the onset of the evident deviation of the M(H) from the linear dependence. We note that the raw magnetization curves include the significant diamagnetic response of the miniature high-pressure cell, which increases with the applied magnetic field (see Fig. 3e, f and Supplementary Figs. S10 and S11). To better illustrate the determination of Hp in Figs. 3a and 3b, we have subtracted a linear background from the measured M(H) magnetization data. This linear background was determined as the straight line connecting two endpoints: the magnetic moment value at H = 0 T (the starting point of measurements) and the magnetic moment value at H = 1 T (the highest value of the applied magnetic field) (see Supplementary Fig. S12). Subsequently, we performed additional linear transformations so that the curves have the same initial linear M(H) slope. Importantly, these linear manipulations do not affect the onset of the deviation of the M(H) virgin curve from the linear dependence. We extrapolated Hp(T) to lower temperatures using the equation \({H}_{p}(T)={H}_{p}(0\,{{{{{{\rm{K}}}}}}})(1-{(\frac{T}{{T}_{c}})}^{2})\) with the fixed Tc = 196 K for Im-3m-H3S and 231 K for Fm-3m-LaH10. The coherence length ξ(0 Κ) was determined from the experimental estimation of Hc2(0 K)21,23 using the equation \({H}_{c2}\left(0\,{{{{{{\rm{K}}}}}}}\right)=\frac{{\phi }_{0}}{2\pi {\xi }^{2}(0\,{{{{{{\rm{K}}}}}}})}\). The London penetration depth was determined using the equation \({\lambda }_{L}=\kappa \,\xi\).

Another, independent, very rough estimation of the λL can be done using the equation \({\lambda }_{L}=\sqrt{\frac{{m}_{e}{c}^{2}}{4\pi {n}_{s}{e}^{2}}}\), where me is the effective mass, c—speed of light, ns—density of superconducting electrons, e—electron charge. Using n for ns from the measurements of the Hall effect at room temperature21,23 and assuming no mass enhancement the λL(0 K) is ~18 nm for H3S and ~63 nm for LaH10. These values are reasonably consistent with the more accurate estimations using the values of the upper and lower critical fields.

An order-of-magnitude estimation of the mean free path l can be done using the formula \(l=\frac{m{v}_{F}}{n{e}^{2}\rho (0\,{{{{{{\rm{K}}}}}}})}\), where \({v}_{F}=\frac{\xi (0\,{{{{{{\rm{K}}}}}}})\pi \Delta (0\,{{{{{{\rm{K}}}}}}})}{\hbar }\) is the Fermi velocity with 2Δ(0 Κ) = 3.52 kBTc, ρ(0 Κ)—a residual resistivity, and Δ(0 Κ)—a superconducting gap. Using the data from refs. 21,23 we obtain the values for vF of ~2.6 × 105 m s−1 and l of ~1.3 nm for Im-3m-H3S, and vF of ~2.5 × 105 m s−1 and l of ~4 nm or ~0.4 nm for Fm-3m-LaH10 if we assume ρ(0 Κ) = 0.1 × ρ(300 Κ) or ρ(0 Κ) = ρ(300 Κ), respectively. Thus, we conclude that l ~ ξ(0 Κ) for both materials and they are not far from the clean limit.

Demagnetization correction

We estimated the effective demagnetization correction as 8.5 for the 85 × 2.8 µm3 sample of Im-3m-H3S and 13.5 for the 70 × 1.9 µm3 sample of Fm-3m-LaH10 using the measured value of magnetization. The demagnetization factor N can be also calculated for the given geometry of a superconductor according to ref. 29. This gives demagnetization correction 20 and 24 for the Im-3m-H3S and Fm-3m-LaH10 samples, respectively. We note that the difference in values of N for a thin disk- and thin ellipsoid-shaped (due to the cupping effect in diamond anvils at high pressures) samples is negligible if a diameter is much larger than a thickness. For the sake of simplicity, we consider the samples as thin disks in our estimates. The larger values of the computed demagnetization correction stem from the ignoring of variation of thickness in a sample and imperfections of sample integrity, which are, conversely, already included in the experimental value of ΔM. A magnetic field penetrates into a superconductor at these imperfections decreasing an effective demagnetizing factor N. Thus, using the measured value of ΔM we obtain a lower estimate of N, since a decrease of a sample volume in a case of variation of a sample thickness will lead to an increase of N. For a good single-crystal, where imperfections of a sample are minimal, the demagnetization correction should be of the same value if calculated from a sample geometry or its value of magnetization. For instance, we have almost the same values of demagnetization correction derived from the prior ZFC M(T) measurements of the test single-crystal of Bi2Sr2CaCu2O8 with a size of a size of 100 × 80 × 10 μm3 (see details in Supplementary Information). In particular, \(\frac{1}{1-N}\) 8 from the value of ΔM and 7 from the geometry of the sample.