  The use of the probabilistic approach to solve inverse problems is becoming
more popular in the geophysical community, thanks to its ability to address
nonlinear forward problems and to provide uncertainty quantification. However,
such strategy is often tailored to specific applications and therefore there is
a lack of a common platform for solving a range of different geophysical
inverse problems and showing potential and pitfalls. We demonstrate a common
framework to solve such inverse problems ranging from, e.g, earthquake source
location to potential field data inversion and seismic tomography. Within this
approach, we can provide probabilities related to certain properties or
structures of the subsurface. Thanks to its ability to address high-dimensional
problems, the Hamiltonian Monte Carlo (HMC) algorithm has emerged as the
state-of-the-art tool for solving geophysical inverse problems within the
probabilistic framework. HMC requires the computation of gradients, which can
be obtained by adjoint methods, making the solution of tomographic problems
ultimately feasible. These results can be obtained with "HMCLab", a tool for
solving a range of different geophysical inverse problems using sampling
methods, focusing in particular on the HMC algorithm. HMCLab consists of a set
of samplers and a set of geophysical forward problems. For each problem its
misfit function and gradient computation are provided and, in addition, a set
of prior models can be combined to inject additional information into the
inverse problem. This allows users to experiment with probabilistic inverse
problems and also address real-world studies. We show how to solve a selected
set of problems within this framework using variants of the HMC algorithm and
analyze the results. HMCLab is provided as an open source package written both
in Python and Julia, welcoming contributions from the community.
