Releases: chaofanzhougit/GBSKernels
Release list
v0.2.2 — recursive torontonian enclosure soundness fix
Correctness
The recursive-torontonian double-double leaf accumulation now charges its enclosure radius against the operand magnitudes instead of the post-addition result.
The signed accumulation uses the sloppy double-word dd_add, whose represented-value error scales with the operand magnitudes. The previous u_DD * md_hi(total) charge could under-bound that error whenever a single accumulation step cancels the running sum by more than ~16× (where quick_two_sum's |s| >= |e| precondition can fail). The fix charges u_DD * (md_hi(total_before) + md_hi(c)), matching the operand-scaled Cholesky dot-chain charge already used in the kernel.
- Returned values are unchanged — centers are bit-identical; only the returned enclosure radius grows, and only at deeply-cancelling steps.
- Validated on an RTX 4090 (nvcc 12.4): the differential gate suite including
check_tor_recursive(double-double certified enclosure) passes with the fixed kernel.
See CHANGELOG.md for details.
GBSKernels v0.2.1
GBSKernels v0.2.1
GBSKernels 0.2.1 is a correctness and reproducibility release for the
certified permanent, hafnian, loop-hafnian, and torontonian paths.
Correctness
- Adds explicit absolute underflow terms to the FP64 and double-double (DD)
certified recurrences, including recursive-torontonian subtree collapse. - Replaces assumed DD division and square-root constants with outward residual
bounds on the values actually returned. - Makes certified APIs fail closed on non-finite inputs, values, bounds, and
tolerances. - Requires the single-large real torontonian input to be finite and exactly
symmetric before GPU dispatch, and removes binary64 inversion skew from the
canonical xxpp construction. - Corrects the retained Jiuzhang fixed-sample aggregation to its realized
finite-population stratified estimand. This historical sample is exploratory,
not preregistered or confirmatory.
Reproducibility
- Records full Git identity and tracked-dirty state when Git metadata is
available. The rsynced validation host used the environment-supplied
GBS_COMMIT, so its dirty state is recorded as unknown rather than guessed. - Ships checksummed session evidence, small validation inputs, and third-party
attribution. The manifest does not hash the uploaded source tree or loaded
CUDA-extension binary. - Packages the historical selector, corrected aggregator, decoder audit, five
retained checkpoint files, and canonical selection/result artifacts. - CI enforces the lock file and rebuilds the consumer wheel from the source
distribution before running the end-to-end example.
Validation
- Release commit:
96fe1a73db130df3bcf15a9d00e94cadad24f481 - Annotated tag object:
b2f7804d8db4e25d0db54f4d5ea9469bc99e4e64 - Public CI: fast CPU, slow CPU, and sdist-to-wheel consumer jobs passed.
- Device: NVIDIA GeForce RTX 4090 (
sm_89), CUDA 12.4, driver 550.144.03. - Container:
nvidia/cuda@sha256:da6791294b0b04d7e65d87b7451d6f2390b4d36225ab0701ee7dfec5769829f5. - All 24 CUDA device gates and the mandatory nanobind GPU smoke passed.
- The 50-digit-evaluated, binary64-recorded adversarial/physical reference gate
checked 312 of 312 cases atk=2..14, with zero violations and zero refusals. - Gate C completed paired FP64/DD timings at
k=25..32and 28 physical-event
evaluations with zero certificate refusals.
The authoritative release-validation manifest is
validation_v021_20260724T115201Z.json (SHA-256
9e72f42baa676085376d17dc8eee039bdb0908ac92dd8dde29967af7705747a9).
The session is release-commit-attributed through GBS_COMMIT; because the
rsynced host had no Git metadata and the record has no source-tree or loaded
extension hash, this is not a cryptographic source/binary binding to the tagged
commit. Nsight Compute performance counters were unavailable on the rented
container; those profiler diagnostics are explicitly non-gating.
Installation
The CPU package is published on PyPI:
python -m pip install gbskernels==0.2.1The exact wheel and source distribution are also attached to this release and
listed in SHA256SUMS.txt.
Scope
This release validates the tested numerical implementation paths and release
workflow in the recorded session; the finite tests are not a universal theorem.
It does not create a completed Jiuzhang confirmatory-v2 registration or a new
scientific outcome. Missing historical GPU/container/source provenance for the
retained 2026-07-15 event rows is disclosed rather than reconstructed.
See SHA256SUMS.txt for every attached asset digest and CHANGELOG.md for the
complete change list.
GBSKernels v0.2.0
Changelog
0.2.0 - 2026-07-22
Distribution
- The verified wheel and source archive are published on
PyPI. A clean Python 3.12
installation passed the packaged end-to-end consumer example.
Important Correction
- Replace the legacy Jiuzhang state reconstruction with the published
paired-source Q7 construction and the exact real xxpp threshold-torontonian
matrix. The two v0.1 frontier JSON files remain historical artifacts and are
rejected by the current figure tooling.
Added
- A fail-closed Jiuzhang confirmatory-v2 workflow covering exposure-ledger
audit, outcome-blind design, immutable public registration and beacon-derived
selection, content-addressed evaluation, refusal recovery,
reconstruction/calibration uncertainty, joint normalizer replicates,
absolute predictive checks, simultaneous coherence-grid inference, and
hash-verified release bundles. - Canonical registration, design, and exposure templates plus focused contract
and regression tests for the workflow and exact xxpp construction.
Fixed
- Harden certified recursive-torontonian bounds with directed downward
subtraction, sound double-double magnitude bounds, and explicit
double-double-to-FP64 collapse residual accounting, plus a dedicated
enclosure gate.
Scope
- This release provides code, templates, and validation contracts. It contains
no completed v2 registration or new scientific outcome; external calibration,
public timestamp/beacon evidence, and acquisition inputs remain required.
GBSKernels v0.1.0
GBSKernels v0.1.0 — initial public release
A GPU-native, batched library of the four #P-hard matrix functions behind photonic quantum sampling — the permanent, hafnian, loop hafnian, and torontonian — with an explicit floating-point accuracy model ranging from native double precision to rigorous a-posteriori error bounds.
Highlights
- All four functions, batched, on CPU and CUDA, each validated against independent combinatorial ground truth.
- Explicit precision model:
fp64(measured accuracy boundary),dd(double-double),ref(arbitrary precision),auto(heuristic cancellation guard), andcertified— a rigorous per-evaluation error bound whose enclosure of the true value is a hard test invariant. - Structure-aware kernels: a repeated-row finite-difference sieve for the loop hafnian and a recursive prefix-Cholesky torontonian (with a single-large mode to 32 modes).
- A conditional GBS sampler validated distributionally against The Walrus.
- A five-layer verification suite (independent ground truth, differential oracle, property-based invariants, end-to-end physics, numerical-accuracy characterization).
Install
pip install gbskernels # once on PyPI — CPU library, numpy + mpmath only
The CUDA extension is a separate, optional build (bindings/).
Complements The Walrus; Apache-2.0 licensed.