Skip to content

Restore accuracy truncation bound in 2.1.2 - #77

Merged
shinaoka merged 1 commit into
mainlinefrom
agent/restore-accuracy-bound-2.1.2
Aug 18, 2026
Merged

Restore accuracy truncation bound in 2.1.2#77
shinaoka merged 1 commit into
mainlinefrom
agent/restore-accuracy-bound-2.1.2

Conversation

@shinaoka

Copy link
Copy Markdown
Member

Summary

  • restore the sparse-ir 1.x meaning of FiniteTempBasis.accuracy: the relative first excluded singular value
  • retain the last-included fallback only when the full SVE has no excluded value
  • cover epsilon truncation, max_size truncation, and the no-excluded-value case
  • allow the upcoming pylibsparseir 0.9.x release and advertise Python 3.14 support
  • fix the README filename used by package metadata and the source manifest
  • bump sparse-ir to 2.1.2

Why

In 2.x, accuracy returned the last included singular value. That reversed the relationship expected by callers using requested_tolerance > basis.accuracy. The first excluded singular value is the truncation error bound and matches sparse-ir 1.x behavior.

Verification

  • Python 3.11: 97 passed, 8 skipped
  • Python 3.14 with locally built pylibsparseir 0.9.0 wheel: 97 passed, 8 skipped
  • source distribution and universal wheel build successfully
  • pylibsparseir dependency specifications are consistent between PyPI and conda metadata

Release ordering

This PR accepts pylibsparseir 0.9.x, but Python 3.14 installation requires the CPython 3.14 wheel prepared in SpM-lab/sparse-ir-rs#251. Publish pylibsparseir 0.9.0 first, then sparse-ir 2.1.2.

@shinaoka
shinaoka merged commit 43061fa into mainline Aug 18, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant