Skip to main content

ABCMB

License: MIT arXiv Run Tests

Autodifferentiable Boltzmann solver for the CMB (ABCMB) is a Python+JAX package for differentiable computation of the Cosmic Microwave Background. ABCMB is complete to linear order in $\Lambda\rm{CDM}$ cosmology. It computes the matter and CMB power spectra and includes effects like lensing, massive neutrinos, and a state-of-the-art treatment of the physics of recombination through the companion code HyRex.

Installation

ABCMB is pip installable! Just run

pip install ABCMB

We recommend always doing so in a conda environment, preferably even a clean one.

If you'd like to clone the repo instead, after cloning you can run

pip install .

from the code directory.

Note that both methods of installing will automatically attempt to install JAX for CPU; to install for GPU, refer to the JAX documentation for a quick JAX installation guide.

Examples

We have included several pedagogical jupyter notebooks to walk you through how to get started with ABCMB in our example_notebooks folder. We suggest you start with ABCMB_basics to get a sense of how to run the code. If you'd like to add new physics to ABCMB, check out ABCMB_Fluids. If you'd like to run ABCMB with the Big Bang Nucleosynthesis (BBN) code LINX to do BBN+CMB joint analyses, check out ABCMB_with_LINX.

Issues

Please feel free to open an issue if something is amiss in ABCMB!

Third-party code

ABCMB's HALOFIT implementation (abcmb/halofit.py) is adapted from jax-cosmo (MIT License, Copyright (c) 2022 Differentiable Universe Initiative); see LICENSE-jax_cosmo. If you use the non-linear matter power spectrum, we suggest you cite jax-cosmo (Campagne et al. 2023) and the HALOFIT papers, Smith et al. 2003 and Takahashi et al. 2012.

Citation

If you use ABCMB to publish scientific research, we suggest you cite

@article{abcmb,
   title={{ABCMB: A Python+JAX Package for the Cosmic Microwave Background Power Spectrum}},
   volume={2026},
   ISSN={1475-7516},
   url={http://dx.doi.org/10.1088/1475-7516/2026/08/078},
   DOI={10.1088/1475-7516/2026/08/078},
   number={08},
   journal={Journal of Cosmology and Astroparticle Physics},
   publisher={IOP Publishing},
   author={Zhou, Zilu and Giovanetti, Cara and Liu, Hongwan},
   year={2026},
   month=Aug, pages={078} }

Metadata

Release files for ABCMB 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ABCMB 0.4.0
File Size Uploaded
abcmb-0.4.0.tar.gz 31.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ABCMB 0.4.0
File Interpreter ABI Platform
abcmb-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 64.9 MB

Release files / abcmb-0.4.0.tar.gz

Download URL abcmb-0.4.0.tar.gz
Size 31.9 MB
Tags Source
SHA-256 checksum
How to use checksums
2946e73b1f3597673ccf0878be693561199896e712712da55f0b597f7d3b9e71
BLAKE2b-256 checksum
How to use checksums
ce56884ec11887fe6039a2f73235f0ebddd365da9735058fac3d53433543e600
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / abcmb-0.4.0-py3-none-any.whl

Download URL abcmb-0.4.0-py3-none-any.whl
Size 32.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
21477328780aa0a2ef273d0a1686f3479885dfc809094d4250a6ee22d1ef9dbe
BLAKE2b-256 checksum
How to use checksums
980872c19fd7d028b13c766d7a83f614303fc4886afd874eb7ec45bd9b02a3c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1.1

1 release file

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page