Skip to main content

Calculable R-matrix solver for quantum scattering using just-in-time compilation for performance.

Project description

Python package PyPI publish

drawing

just-in-time R-Matrix (jitR)

A fast calculable $\mathcal{R}$-matrix solver for parametric reaction models, production ready for calibration and uncertainty-quantification. Give your UQ workflow a caffeine-kick with jitR!

quick start

 pip install jitr

The release versions of the package are hosted at pypi.org/project/jitr/.

description

A framework for uncertainty-quantification of nuclear reaction observables using parametric reaction models. Consider a local coordinate-space potential $V(r;\boldsymbol{\theta})$ that is a function of some parameters $\boldsymbol{\theta}$. Just write it like so:

def V(r,*theta):
  a,b,c,... = theta
  # calculate and return potential at radial coordinate r as a function of parameters a,b,c,...

Then, you can pass it along with many samples of $\boldsymbol{\theta}$ into jitR to calculate many samples of the corresponding cross sections for your system and reaction of interest!

Under the hood, jitR solves the radial Bloch-Shrödinger equation in the continuum using the calculable $\mathcal{R}$-Matrix method on a Lagrange-Legendre mesh. It is fast because it gives users the tools to precompute everything that they can for a system and reaction of interest, so given a single parameter sample, the minimal amount of compute is required to spit a cross section back out. For this reason, jitR is really suited to calculating an ensemble of observables for many parameter samples. Additionally, jitR relies on vectorized operations from numpy, as well as just-in-time (JIT) compilation from numba for the small subset of performance-critical code.

The theory generally follows:

with the primary difference being that this code uses the energy-scaled version of the Bloch-Shrödinger equation, with dimensionless domain, $s = k_0 r$, where $r$ is the radial coordinate and $k_0$ is the entrance channel wavenumber.

contributing, developing, and testing

To set up the repository for contributing, testing, access to non-release branches, access to the examples and notebooks, etc., clone the repository and install locally:

git clone git@github.com:beykyle/jitr.git
pip install -r ./jitr/requirements.txt
pip install -e ./jitr

then run the tests from the main project directory:

pytest jitr

Feel free to fork and make a pull request if you have things to contribute. There are many open issues, feel free to add more.

examples and tutorials

Various example scripts live in examples/. Tutorials live in examples/notebooks/.

In particular, examples/notebooks/kduq_cross_section_uq_tutorial.ipynb demonstrates how to perform UQ for $(n,n)$ cross sections using KDUQ.

BAND

This package is part of the BAND Framework

citation

@software{Beyer_JITR_2024,
author = {Beyer, Kyle},
license = {BSD-3-Clause},
month = oct,
title = {{JITR}},
url = {https://github.com/beykyle/jitr},
version = {1.3.0},
year = {2024}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jitr-2.1.tar.gz (7.2 MB view details)

Uploaded Source

Built Distribution

jitr-2.1-py3-none-any.whl (567.6 kB view details)

Uploaded Python 3

File details

Details for the file jitr-2.1.tar.gz.

File metadata

  • Download URL: jitr-2.1.tar.gz
  • Upload date:
  • Size: 7.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for jitr-2.1.tar.gz
Algorithm Hash digest
SHA256 af6dae7f55aceaf49d37300bb7e4a49807a98b8ef35da07fe257425ae2118211
MD5 47a3d343d95f96e2a05f94fae7036830
BLAKE2b-256 e978968399df5f54d1fe2867dd601c84eb8596364fa734ed3a2a25dc08e63d32

See more details on using hashes here.

File details

Details for the file jitr-2.1-py3-none-any.whl.

File metadata

  • Download URL: jitr-2.1-py3-none-any.whl
  • Upload date:
  • Size: 567.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for jitr-2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b60c992eea807fedae47060f9f7b4f34fe9c9d3fb701e8a29d02716cb3e23b0f
MD5 4743caed7c1fde74237397e65dc91a34
BLAKE2b-256 465efa885a1002dd55574b70b494cd54112c71a6251caa58625ce926538ad148

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page