FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix `findtruncated` with `truncspace` by Yue-Zhengyuan · Pull Request #369 · QuantumKitHub/TensorKit.jl · GitHub

Fix findtruncated with truncspace - #369

Merged
lkdvos merged 2 commits into
mainfrom
zy/fix-truncspace
Feb 9, 2026
Merged

lkdvos merged 2 commits into
mainfrom
zy/fix-truncspace

Conversation

Copy link
Copy Markdown
Member

This PR fixes

function MAK.findtruncated(values::SectorVector, strategy::TruncationSpace)

which affects eig(h)_trunc with truncspace (see QuantumKitHub/PEPSKit.jl#314). Still need to come up with tests to catch this case, though.

Yue-Zhengyuan commented Feb 8, 2026 •
edited
Loading

Copy link
Copy Markdown
Member Author

I also wonder why we need both findtruncated and findtruncated_svd. This bug was clearly due to failing to sync these two functions. But when looking at the code (in both TensorKit and MAK), it seems that they always appear together and contain exactly the same logic...

codecov Bot commented Feb 8, 2026 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/factorizations/truncation.jl 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/factorizations/truncation.jl 94.40% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

lkdvos commented Feb 8, 2026

Copy link
Copy Markdown
Member

The reason is that some truncation strategies can be made more efficient when working with data that it knows is already sorted, but our current implementation in TensorKit has to deal with multiple blocks so that is only implicitly visible in the per block implementation.

lkdvos enabled auto-merge February 8, 2026 23:52
lkdvos merged commit 91fa268 into main Feb 9, 2026
41 of 42 checks passed
lkdvos deleted the zy/fix-truncspace branch February 9, 2026 01:30
lkdvos mentioned this pull request Feb 10, 2026
lkdvos referenced this pull request Feb 10, 2026
* update changelog

* Bump v0.16.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL