Sequential HAmiltonian Riemann montecarlo Python sampler for cutting-edge Gravitational Wave inference
© 2025- Gabriele Demasi, Walter Del Pozzo
For avoiding package incompatibilities, create a dedicated conda environment
conda create --name sharpy_env python==3.11
conda activate sharpy_env
or if conda is not available
python -m venv /path_to/sharpy_env
source /path_to/sharpy_env/bin/activate
then install SHARPy:
git clone git@github.com:gabrieledemasi/sharpy.git
cd sharpy
pip install .
To run on GPU please install this version of JAX:
pip install --upgrade "jax[cuda12]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
This notebook contains a simple test case( a 11D bimodal gaussian mixture) that can be run on a laptop. The run time should be around 1 min, depending on the hardware.
If you use SHARPy in your research, please cite Demasi et al, 2026
@article{Demasi:2026ltw,
author = "Demasi, Gabriele and others",
title = "{The Sequential Monte Carlo goes NUTS: Boosting Gravitational-Wave Inference}",
eprint = "2601.02336",
archivePrefix = "arXiv",
primaryClass = "gr-qc",
month = "1",
year = "2026"
}