NuOscProbExact 1.11.0: exact neutrino oscillation probabilities for two, three, and now four flavors — on PyPI!

Standard

Documentation: https://mbustama.github.io/NuOscProbExact/

Notebooks: https://github.com/mbustama/NuOscProbExact/tree/main/notebooks

Source code: https://github.com/mbustama/NuOscProbExact

PyPI: https://pypi.org/project/nuoscprobexact/

Neutrino oscillation probabilities look like a solved problem until the Hamiltonian stops being the textbook one. There is a closed form in vacuum, and another in two-flavor constant-density matter, and after that it runs out. Add a realistic density profile, a non-standard interaction, a Lorentz-violating operator or a fourth state, and the usual options are to expand in a parameter that may not be small, to diagonalise the Hamiltonian numerically at every point of a grid, or to integrate the Schrödinger equation and hope the step was short enough.

NuOscProbExact does none of these. The Hamiltonian and the time-evolution operator are expanded in the basis of SU(2), SU(3) or SU(4) matrices, and exponentiated analytically using the closure of the algebra. What comes out is a closed form for the probabilities in terms of two or three invariants of the Hamiltonian: no eigenvectors, no numerical diagonalisation, no integration, and no approximation beyond floating-point round-off. Any Hermitian 2×2, 3×3 or 4×4 matrix will do, whatever physics put it there. The method is Ohlsson and Snellman’s, revisited in the 2019 paper; the extension to SU(4) is new since then.

Four flavors is where it stops, for a reason external to neutrino physics: at five, the eigenvalues stop being expressible in radicals — Abel–Ruffini — and the closed form ends with them. Four is exactly what 3+1 needs.

If your reference point is a numerical evolution code, the output is the same object — probabilities, or the evolution operator itself — but with no step size to converge and no dependency beyond numpy. I wrote the first version because adding a model should mean writing down a matrix, not writing a solver. Seven years on it does rather more than it did, and version 1.11.0 now installs with pip.

What it makes easy

  • Any model, without a new code path. Vacuum, matter, non-standard interactions, Lorentz-invariance violation, sterile states: none of these is a special case in the code. Each is a different matrix handed to the same routine.
  • A whole scan in one call. A curve against energy or baseline, or a full oscillogram over both, with no Python loop.
  • Neutrinos through the Earth. Along a zenith angle, or between two of fifteen named sites — CERN–Gran Sasso, Fermilab–Homestake, Tokai–Kamioka and others — with the density profile taken from PREM. Or through any hand-built sequence of slabs of arbitrary width and density, each solved exactly and the operators multiplied.
  • 3+1 sterile scenarios at four flavors, as closed four-state systems rather than as leakage out of the three-flavor block.
  • The evolution operator itself, not only probabilities, for composing across segments or propagating a density matrix.

Install with:

pip install nuoscprobexact

and, for the optional compiled backend:

pip install "nuoscprobexact[fast]"

MIT licence. Python 3.9 or newer, tested on 3.9 through 3.13, and numpy is the only required dependency: no compiler, nothing to build.

Main features

Accuracy

  • Cross-checked against independently written code. The probabilities agree with nuSQuIDS to round-off once conventions are matched, and the matter spectrum agrees with the Zaglauer–Schwarzer closed form.
  • A regression suite of 596 tests, at 100% coverage.

Speed

  • Arrays instead of loops. Stacks of Hamiltonians, arrays of baselines, or both broadcast together: roughly 20x to 90x faster than the equivalent Python loop, with no extra dependency.
  • An optional compiled backend. With numba installed, the batched paths run as compiled kernels — answers identical to round-off, used only where it has been measured to win.

What you need to provide

You provide a Hermitian matrix and a baseline, built by hand or with one of the bundled builders for the standard cases. The package returns the exact evolution operator and the probabilities that follow from it, and stops there: no fluxes, no cross sections, no detector response, no fitting. One assumption is worth stating plainly: the Hamiltonian is taken to be time-independent over each segment. A smoothly varying profile can be slabbed, but the step size is then set by the oscillation rather than by the density, and there the documentation points at a Magnus-type method instead.

A minimal example

import numpy as np
import oscprob3nu
import hamiltonians3nu
from globaldefs import *
# The vacuum Hamiltonian, without the 1/E factor, so an energy scan
# computes it once
h_vac = hamiltonians3nu.hamiltonian_3nu_vacuum_energy_independent(
S12_NO_BF, S23_NO_BF, S13_NO_BF, DCP_NO_BF, D21_NO_BF, D31_NO_BF)
# One probability, at 1 GeV over 1300 km
Pee, Pem, Pet, Pme, Pmm, Pmt, Pte, Ptm, Ptt = oscprob3nu.probabilities_3nu(
np.asarray(h_vac)/1.e9, 1300.0*CONV_KM_TO_INV_EV)
print('Pee = %.5f, Pem = %.5f, Pet = %.5f' % (Pee, Pem, Pet))

prints

Pee = 0.92768, Pem = 0.01432, Pet = 0.05800


(The quickstart goes through this more slowly; the recipes page has short, complete snippets for most of what the package can compute, each with real output.)

What is new since 1.0.0

The original announcement, in May 2019, covered the method paper and the code on GitHub. The method has not changed since; almost everything around it has. Whole-array scans arrived in 1.2.0, the optional numba backend in 1.6.0, the Earth and arbitrary layered matter in 1.8.0, and four flavors — oscprob4nuhamiltonians4nu, the SU(4) expansion — in 1.9.0. In 1.11.0, a non-Hermitian Hamiltonian raises instead of quietly returning probabilities that still sum to one. Along the way, a documentation site and eighteen worked notebooks.

One thing to flag for anyone still running 1.0.0: two fixes in 1.1.0 changed numbers, both at two flavors. probabilities_2nu was missing the h2 contribution to P(νe → νμ), which is invisible whenever the off-diagonal entry is real — so vacuum and constant-density matter were unaffected, but a CP-violating two-flavor Hamiltonian was not — and the two-flavor vacuum Hamiltonian used the opposite sign convention, invisible in vacuum and consequential once a matter potential is added. Three-flavor results from 1.0.0 are unaffected; the changelog has the details.

Some physics it’s meant for

Long-baseline accelerator experiments. DUNE-like baselines through the crust, with matter effects and the CP phase, and the bi-probability ellipses above, which show how matter pushes neutrinos and antineutrinos off the CP-symmetric diagonal. Notebook 05.

Atmospheric neutrinos through the Earth. Zenith-angle scans with the density taken from PREM rather than from a single average value, which is where the mass ordering and the θ23 octant separate. Notebooks 07 and 12.

Sterile neutrinos, 3+1. Short-baseline appearance and disappearance, and the sterile matter resonance through the Earth, with the four states treated as a closed, unitary system rather than as leakage out of the three-flavor block. Notebook 16.

Non-standard interactions and Lorentz-invariance violation. Both enter as extra Hermitian terms added to the vacuum Hamiltonian, so a new operator means a new matrix, not a new solver. Notebook 03.

Unusual matter profiles. Castle-wall and other hand-built profiles, where the arrangement of the matter changes the answer even when the mean density does not — a parametric-resonance effect no constant-density approximation can show. Notebook 08.

Astrophysical bounds on the high-energy evolution of neutrino mixing

Standard

Today, the values of the neutrino mixing angles and mass differences that govern flavor transitions are known to quite high precision. However, we know them exclusively from sub-TeV terrestrial experiments. Because these experiments operate at low transferred momenta (typically, Q ~ few GeV), a fundamental question remains: are the mixing parameters universal constants, or do they evolve at high energies?

Quantum field theory dictates that these parameters should “run” with Q via renormalization group (RG) equations. While this running is negligible in the Standard Model, well-motivated new-physics frameworks, like the Standard Model Effective Field Theory (SMEFT), can accelerate this evolution. Detecting the high-energy running of neutrino mixing parameters would be a smoking-gun signature of new physics.

To access the high-Q regime, we turn to high-energy astrophysical neutrinos, with energies in the TeV–PeV and EeV ranges. They interact in neutrino telescopes via deep inelastic scattering and probe average momentum transfers of Q ~ 20-40 GeV, offering an unprecedented window into this high-Q evolution.

In a new paper with Qinrui Liu and Gabriela Barenboim, we evaluate the power of high-energy astrophysical neutrinos to test the evolution of neutrino mixing. We use the neutrino flavor composition at Earth, i.e., the relative proportions of electron, muon, and tau neutrinos in the diffuse flux. We execute a two-pronged analysis: first, extracting generic high-Q mixing parameters to remain model-agnostic, and second, constraining RG-inducing dimension-6 SMEFT coefficients.

We extract present bounds from the 11.4-year IceCube Medium Energy Starting Events (MESE) sample, published in 2025. Because the uncertainties in current flavor measurements are large, present data cannot yet meaningfully constrain the high-Q mixing parameters or SMEFT operators.

However, the future is promising. For our projections, we simulate the combined detection capabilities of existing (IceCube, Baikal-GVD, KM3NeT) and upcoming (P-ONE, IceCube-Gen2, NEON, TRIDENT, HUNT) optical-Cherenkov neutrino telescopes by the years 2040 and 2050, using both High-Energy Starting Events (HESE) and through-going muons. Crucially, we profile over the unknown astrophysical source flavor composition to ensure our bounds are robust and realistic.

Our results show that by 2040–2050, this global network will achieve the precision necessary to place unprecedented bounds on high-Q mixing (yielding particularly strong constraints in the 23 and 13 sectors). Furthermore, if the astrophysical neutrinos are produced via muon-damped pion decay, these telescopes will be capable of placing limits on individual SMEFT coefficients at a new-physics scale of 1 TeV, easily translatable to other energy scales.

We also forecasted the sensitivity of ultra-high-energy (UHE) radio arrays, such as the planned IceCube-Gen2 radio array. Counterintuitively, we found that despite UHE neutrinos possessing much higher energies, they yield drastically weaker constraints than their TeV–PeV counterparts. This is driven both by the logarithmic scaling of the RG evolution and by the vast experimental uncertainties inherent to radio-based flavor tagging.

Read more at:

Astrophysical bounds on the high-energy evolution of neutrino mixing
Mauricio Bustamante, Qinrui Liu, Gabriela Barenboim
2604.14409 hep-ph

Measuring neutrino mixing above 1 TeV with astrophysical neutrinos

Standard

Today, the values of the neutrino mixing angles that govern flavor transitions are known to percent precision (the Dirac CP-violation phase is known much more poorly). However, these values are inferred exclusively from sub-TeV neutrino experiments. No measurement of the mixing parameters exists at the TeV scale and above. There, new-physics effects whose intensity grows with neutrino energy could modify the effective neutrino mixing. High-energy astrophysical neutrinos, with TeV-PeV energies, are primed for such measurements.

In a new paper with Qinrui Liu and Gabriela Barenboim, we have assessed in detail the power in these neutrinos to test mixing above 1 TeV, today and in the future. Concretely, we have extracted values of the four neutrino mixing angles (𝛉12, 𝛉23, 𝛉13) and the CP-violation phase (δCP) from the flavor composition of high-energy astrophysical neutrinos, i.e., the proportion of electron, muon, and tau neutrinos in their diffuse flux.

We extract present bounds on the mixing parameters from the 11.4-year IceCube Medium Energy Starting Events (MESE) sample, published in 2025. We find that the uncertainty in the measurement is too large to claim meaningful sensitivity to the mixing parameter.

For our projections, we use multi-neutrino-telescope combinations using projected detection rates at existing (IceCube, Baikal-GVD, KM3NeT) and future (P-ONE, IceCube-Gen2, NEON, TRIDENT, HUNT) neutrino telescopes. For these, we combine High Energy Starting Events (HESE) and through-going muons. Our projections show clear sensitivity to 𝛉23 and 𝛉13 (and, if neutrino production occurs via muon-damped pion decay, to δCP). This establishes benchmarks for the minimum size that new-physics modifications to the mixing parameters must have in order to be detectable.

Read more at:

Measuring neutrino mixing above 1 TeV with astrophysical neutrinos
Mauricio Bustamante, Qinrui Liu, Gabriela Barenboim
2602.14308 hep-ph

A plethora of long-range neutrino interactions probed by DUNE and T2HK

Standard

If there are new neutrino interactions with matter, and if they affect neutrinos of different flavor differently, then they could impact neutrino oscillations. Long-baseline neutrino experiments are well-suited to look for them, thanks to their use of intense, well-characterized neutrino beams.

If the new interactions have a long range—i.e., if they are mediated by a new, ultra-light mediator—then neutrinos on Earth may experience a matter potential sourced by the vast amount of faraway matter elsewhere inside the Earth, Moon, Sun, Milky Way, and in the cosmological matter distribution, as pointed out in 1808.02042 [Universe’s Worth of Electrons to Probe Long-Range Interactions of High-Energy Astrophysical Neutrinos, by MB & Sanjib Agarwalla, PRL 2019]. This boosts the chances of discovering the new interaction even if it is supremely feeble.

In a recent paper (2305.05184 [Flavor-dependent long-range neutrino interactions in DUNE & T2HK: alone they constrain, together they discover, by Masoom Singh, MB, and Sanjib Agarwalla, JHEP 2023]), we explored the prospects of constraining or discovering these new, long-range neutrino interactions in the upcoming long-baseline experiments DUNE and T2HK. We found promising prospects. However, we explored only three different possible forms of the interaction, introduced by gauging three of the accidental global lepton-number U(1) symmetries of the Standard Model.

In a new paper (2404.02775), led by PhD students Masoom Singh and Pragyanprasu Swain, we now extend this to many other symmetries—a plethora of them!—that introduce new neutrino interactions with electrons, neutrons, and protons. Each symmetry affects oscillations differently.

Our new results cement and extend our original findings: DUNE and T2HK should be able to probe the existence of new interactions—and possibly discover and distinguish between alternatives—regardless of which symmetry is responsible for inducing them. The reach of DUNE and T2HK to probe new neutrino interactions is not only deep, but also broad!

Read more at

A plethora of long-range neutrino interactions probed by DUNE and T2HK
Sanjib Kumar Agarwalla, Mauricio Bustamante, Masoom Singh, Pragyanprasu Swain
2404.02775 hep-ph

Download the digitized data from out plots from this GitHub repository.