rivin-jones
Exact ordinary and colored Jones polynomials, with direct evaluation of colored knot invariants at roots of unity.
Licensed under GPL-3.0-or-later, with retained third-party notices. Release source archives include the native dependency sources and rebuild instructions.
The ordinary engine uses exact Temperley–Lieb frontier/tensor contraction. The colored engine uses sparse R matrices and a reduced open-strand quantum trace, with exact cabling retained as an independent calculation. No Sage Jones routine is called during native computation. An explicit planned-contraction route adds reusable paths, exact slicing, and optional NumPy batches to the same colored R-matrix formulas.
Installation
Python 3.10–3.13 is supported. Release wheels target Linux x86_64, macOS arm64 and macOS x86_64. Building from source needs Rust, a C compiler and the native build tools described in REBUILDING.md.
python -m pip install rivin-jones
# Optional NumPy batches:
python -m pip install 'rivin-jones[tensor]'
Cotengra is a runtime dependency. Sage and plotting packages are optional.
To build a Git checkout locally, use python -m pip install ..
Exact polynomials
from rivin_jones import jones_polynomial, colored_jones_polynomial
trefoil = jones_polynomial([1, 1, 1], strands=2)
assert trefoil == {-4: 1, -12: 1, -16: -1}
figure_eight = [1, -2, 1, -2]
colored = colored_jones_polynomial(figure_eight, strands=3, color=10)
Results are dictionaries {A_exponent: integer_coefficient}. The usual
Jones variable is q=t=A^-4. Color N is representation dimension, with
J_N(unknot)=1 and J_2 equal to the ordinary reduced Jones polynomial.
Braid width is explicit, including idle strands for ordinary links. Colored
input must close to one knot; multi-component colored links are rejected.
algorithm='auto' selects small cables or sparse R contraction. Force either
with 'cabling' or 'r-matrix'. Ordinary method options are 'auto',
'frontier', 'frontier-gmp', 'greedy' and 'sequential'.
Exact or interval evaluation
from fractions import Fraction
from rivin_jones import colored_jones_evaluate
value = colored_jones_evaluate([1, 1, 1], strands=2, color=5,
A=Fraction(3, 2))
The scalar's arithmetic is preserved: rational/exact field inputs give exact
results; Arb inputs give enclosures; Python float/complex inputs give
approximations. Evaluation defaults to direct R contraction without the full
polynomial. algorithm='polynomial' constructs the polynomial first and
'cabling' selects the cable reference. normalize=False retains blackboard
framing with reduced normalization. return_info=True also returns work counts.
Reusable colored tensor plans
Wider braids can benefit from a different contraction order. Build a plan once and reuse it with new scalar values:
from fractions import Fraction
from rivin_jones import plan_colored_jones
word = [1, -2, 3, -4] * 3
plan = plan_colored_jones(word, strands=5, color=4)
value = plan.evaluate(Fraction(3, 2)) # exact rational arithmetic
values = plan.evaluate_many([1j, -1j]) # preserves scalar arithmetic
print(plan.info())
colored_jones_evaluate(..., algorithm='tensor') builds and executes a plan
for a single call. The existing automatic evaluator remains the sparse braid
sweep, which wins on favorable narrow/high-color inputs. A plan holds only
topology and a path; it does not cache answers. The input word, width and color
are fixed by the plan; normalization can change at evaluation time.
Install the optional tensor extra to evaluate batches
with NumPy. This mode explicitly uses complex128 approximations:
import numpy as np
As = np.exp(-0.2j + 1j*np.linspace(-0.02, 0.02, 32))
values, info = plan.evaluate_many(As, backend='numpy', return_info=True,
batch_size=128, max_bytes=64*1024*1024)
Output arrays are complex128 even when the input array contains integers or real values. Exact fields and Arb enclosures should use the scalar backend. All methods use the open-strand reduction and remain defined at nonzero roots of unity. Approximate arithmetic still requires conditioning/precision checks.
The planner accepts Cotengra strategies or an unsliced optimizer through
optimize; 'sequential' is also available for comparison. max_entries
limits estimated live tensor and coefficient-cache slots. If necessary, the
plan fixes selected wire indices, evaluates each smaller network, and adds
all slice values. max_slices and max_operations bound that tradeoff.
NumPy batches additionally shrink their chunk size to fit the estimated array
payload budget max_bytes. These bounds exclude Python/BLAS overhead and the
variable bit sizes of exact scalar objects; they are not process RSS limits.
See planned contraction details.
For the Volume Conjecture, increase color N and evaluate at
A_N=exp(-pi*i/(2*N)). With Sage installed for Arb fields:
from sage.all import RealBallField, ComplexBallField
from rivin_jones import colored_jones_evaluate
N = 100
R, C = RealBallField(512), ComplexBallField(512)
A = C(0, -R.pi()/(2*N)).exp()
value = colored_jones_evaluate([1, -2, 1, -2], strands=3, color=N, A=A)
assert abs(value) > 0
growth = 2*R.pi()/N*abs(value).log()
This encloses the finite-N value, not the error to the conjectured limiting volume. The CLI example records enclosures and work counts. The mathematical specification states the crossing matrices, inverse, trace, framing and pruning argument.
Limits
Direct defaults are color <=32 for polynomials and <=256 for evaluations,
1,000,000 trace rows, 10,000 live states per row and 2,000,000 transitions.
The polynomial support-span bound is 200,000. Cables default to at most 12
strands and 500 crossings. Exceeding a guard raises
rivin_jones.colored.ColoredResourceLimitError without a partial answer.
Keyword arguments allow deliberate changes to the limits.
These are workload guards, not runtime or byte-memory guarantees. Direct trace rows grow as N^(strands-1); the figure-eight presentation is unusually favorable for pruning. Evidence at color 200 for that knot is not a promise for arbitrary knots at that color.
Evidence and development
The frozen candidate passed 405 direct-engine audit groups and 330 prior colored regression groups. Its 35 repeated polynomial cases were faster than Sage with exact coefficient equality; five completed root comparisons were faster, and one additional Sage comparison remained incomplete. See performance and provenance. Those measurements precede packaging; the renamed package is checked by coefficient replay and fresh invariant tests, not advertised as a new timing sweep.
python -m unittest discover -s tests -v
python tools/check_distribution.py dist/*
python tools/release_gate.py
Portable tests require only the installed package. Set RIVIN_JONES_TEST_SAGE=1
under a Sage Python interpreter to enable the additional exact/Arb oracle
tests. The source gate checks licensing and notices; hosted CI gates binary publication.
Release instructions separate local build, hosted CI,
repository publication and PyPI publication.
Metadata
Release files for rivin-jones 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rivin_jones-0.1.0.tar.gz | 22.7 MB | With provenance | Details for rivin_jones-0.1.0.tar.gz |
Built distributions (wheels)
Total release size: 40.1 MB
Release files / rivin_jones-0.1.0.tar.gz
| Download URL | rivin_jones-0.1.0.tar.gz |
|---|---|
| Size | 22.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0dbdd10cfd64016d17f7317536414ab8b3ca166ba06f37bdf9df87e3db7ad936
|
|
BLAKE2b-256 checksum How to use checksums |
57948ada182d2fa08801e9df9f3a71a4cf1a2830ce3e6ceee8bcde7f81a8d482
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / rivin_jones-0.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | rivin_jones-0.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
b7003820136cebdc8b3171b6040f2e8bb83ed120b08c112b4923bc2da25229d4
|
|
BLAKE2b-256 checksum How to use checksums |
af741db426cc2470229d272985d5a0d09dab3fbcd5d49dd442ea6fa869bc7738
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / rivin_jones-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | rivin_jones-0.1.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7264649f4859fb4fcd6ec406eb55408bbd08883bd45cfad06cdc6d1fe2d379d9
|
|
BLAKE2b-256 checksum How to use checksums |
e2e978d888d6364848ca4636e364a8ef0737214833669306e2287e65a231779a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / rivin_jones-0.1.0-cp313-cp313-macosx_10_12_x86_64.whl
| Download URL | rivin_jones-0.1.0-cp313-cp313-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.13 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
be028bd3624c57bd8f04e6184f2b333a6f177397b2228e78da4df7a05d18f221
|
|
BLAKE2b-256 checksum How to use checksums |
0243ad077d60c5b2ebb7fc19b36a46a2d44281074fb9925f676cdb4dc48c4d12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / rivin_jones-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | rivin_jones-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
7a1230764e7e98e8a77f7605f5693f2b3dca7ef86a248cf490d94cd89a86a206
|
|
BLAKE2b-256 checksum How to use checksums |
10dd7175ac4c48c0d3b064e4d17148f86ac453158cdd8c3598e4bf913a3b027e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / rivin_jones-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | rivin_jones-0.1.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9ef195483751c1e54a2931e4e23221fc75bac93e1f711ec13add7e43b9fac7dc
|
|
BLAKE2b-256 checksum How to use checksums |
b89193e3b2d3f802b4c142ff80b1e647f61075a31ded3f899e50ad4c5d419e31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / rivin_jones-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl
| Download URL | rivin_jones-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.12 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
c954dcd7febdcb4e7b5159953b67ce449083ba5e81487bddbe8bcd926306e0d9
|
|
BLAKE2b-256 checksum How to use checksums |
13424d3b0c315bf6b5491ab9bf87f2720cbbd2fe59dfd7d39d6f339f8da1ecab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / rivin_jones-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | rivin_jones-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
5c61fe960b9e30eed95d3c877c715ef371b1157675a200097f7e155c417946f7
|
|
BLAKE2b-256 checksum How to use checksums |
e566bd30de03f5dee8c376dd1cda47034272b05053e4e437abef2655263c2434
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / rivin_jones-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | rivin_jones-0.1.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a7058fe425096fd5e604ed5e8aea964f2d133a8097be53a9ea83941d98bd7458
|
|
BLAKE2b-256 checksum How to use checksums |
1f26e1eb4ce0a6d8c7b880cdd266a73a11f0bdf169decd8dc2edd06035a63397
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / rivin_jones-0.1.0-cp311-cp311-macosx_10_12_x86_64.whl
| Download URL | rivin_jones-0.1.0-cp311-cp311-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.11 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
19ea6296c7ba839c1c924570dd3470034d9a51ceadcf59c32ee7630e48b392b9
|
|
BLAKE2b-256 checksum How to use checksums |
a02b4a90b5c17b3ede5b9753fc4aa0f5c37b28898bb72d533b7691d38dbc0c5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / rivin_jones-0.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | rivin_jones-0.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
a15c603fcb7d14a2c202bf2e56e15b3980118c564240771fbdbe27e9c0f8d0b9
|
|
BLAKE2b-256 checksum How to use checksums |
666162f661f0ab4b8a60d094445b82b6bd71212a56965ff21d0860d1e6a4056d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / rivin_jones-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | rivin_jones-0.1.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c3c0c91d1ef5d710a63d84c278c3b3a7a64c4018fd4eff24c2b04957e5daf150
|
|
BLAKE2b-256 checksum How to use checksums |
2ef65b259ba24a99295d3d5c2ea069ba60de958b0a9f290c499aadbf858c17e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / rivin_jones-0.1.0-cp310-cp310-macosx_10_12_x86_64.whl
| Download URL | rivin_jones-0.1.0-cp310-cp310-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.10 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
9eb3679e630c8e047eb3061cf6acc2e6b27c8ff93ad7332c8a03d35cbc26f6fd
|
|
BLAKE2b-256 checksum How to use checksums |
42c6c1105ce177f06595e8ddf9fc129a445bd4086de4aa1fcc72c68a6960143e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logSecurity for rivin-jones 0.1.0
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.
Full provenance
All 13 files in this release have been uploaded with provenance metadata.
Attestation for rivin_jones-0.1.0.tar.gz
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 Nov 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.