  Following the discovery of high-temperature superconductivity in the La-H
system, where for the recently discovered fcc-LaH10 a record critical
temperature Tc = 250 K was achieved [Drozdov et al., Nature, 569, 528 (2019)
and Somayazulu et al., Phys. Rev. Lett. 122, 027001 (2019)], we studied the
formation of new chemical compounds in the barium-hydrogen system at pressures
up to 173 GPa. Using in situ generation of hydrogen from NH3BH3, we synthesized
previously unknown superhydride BaH12 with a pseudocubic (fcc) Ba sublattice,
which was observed in a wide range of pressures from 75 to 173 GPa in four
independent experiments. DFT calculations indicate a close agreement between
the theoretical and experimental equations of state. In addition to BaH12, we
identified previously known P6/mmm BaH2 and possibly BaH10 and BaH6 as
impurities in the samples. Ab initio calculations show that newly discovered
semimetallic BaH12 contains H2, H3 molecular units and detached H12 chains.
Barium dodecahydride is a unique molecular hydride with metallic conductivity
which demonstrates a superconducting transition around 20 K at 140 GPa in
agreement with calculations (19-32 K). The interpretation of the multiphase XRD
data was possible thanks to the development of new Python scripts for
postprocessing the results of evolutionary searches. These scripts help quickly
identify the theoretical structures that explain the experimental data in the
best way, among thousands of candidates.
