Metadata-Version: 2.4
Name: neutt
Version: 0.1.0
Summary: Differentiable JAX port of BURST's neutrino transport: N_eff and the neutrino spectra through weak decoupling
Author: Evan Grohs, George Fuller, Shasha Arani
Author-email: Cara Giovanetti <cgiovanetti@lbl.gov>
License-Expression: MIT
Keywords: cosmology,neutrino decoupling,N_eff,big bang nucleosynthesis,JAX
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: jax>=0.8.1
Requires-Dist: equinox>=0.13
Requires-Dist: diffrax>=0.7.1
Requires-Dist: optimistix>=0.0.11
Requires-Dist: numpy>=2.0
Requires-Dist: scipy>=1.13
Provides-Extra: cuda12
Requires-Dist: jax[cuda12]>=0.8.1; extra == "cuda12"
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Provides-Extra: docs
Requires-Dist: sphinx>=8; extra == "docs"
Requires-Dist: furo; extra == "docs"
Requires-Dist: myst-parser; extra == "docs"
Dynamic: license-file

# neutt

`neutt` is the differentiable JAX/GPU port of the neutrino-transport sector of **BURST**: `N_eff`
and the neutrino spectral distortions through weak decoupling, with finite-temperature QED and
the flavour-mixing (QKE) refinement, and (coupled to **LINX**) the light-element abundances.

## Installation

```bash
pip install neutt                 # CPU
pip install "neutt[cuda12]"       # NVIDIA GPU (CUDA 12 build of jaxlib)
```

`neutt` is pure Python. It needs float64, which it switches on in JAX when imported, so import
`neutt` before creating any JAX array.

## Quickstart

```python
from neutt.decoupling import make_decoupling_solver

solve, grid = make_decoupling_solver()    # builds the collision kernels
out = solve()                             # compiles on the first call, then solves
print(float(out["neff_final"]))           # 3.043322 (Standard Model, NLO QED)
```

Every solver has this shape: `make_*_solver(...)` builds once and returns a jitted `solve`, whose
arguments are traced, so calling it again with new values does not recompile.

## Documentation

- **Reference manual:** [`docs/burst_manual.pdf`](docs/burst_manual.pdf), covering every module,
  option and solver, with the physics and the numerical-design rationale.
- **API reference:** the Sphinx site built from `docs/sphinx/` (`pip install "neutt[docs]"`, then
  `sphinx-build docs/sphinx docs/sphinx/_build`).
- **Quickstart:** [`docs/USER_MANUAL.md`](docs/USER_MANUAL.md).

## Releasing

`.github/workflows/release.yml` builds the sdist and wheel on every `v*` tag and publishes them to
PyPI by trusted publishing. Register this repository on PyPI as a trusted publisher for `neutt`
(workflow `release.yml`, environment `pypi`), set the version in `neutt/__init__.py`, then push a
tag such as `v0.1.0`.

## License

MIT (see `LICENSE`).
