Fix MPO_new assembly cutoff and add H1 accuracy regression test#34
Merged
corbett5 merged 3 commits intoITensor:mainfrom Feb 11, 2026
Merged
Fix MPO_new assembly cutoff and add H1 accuracy regression test#34corbett5 merged 3 commits intoITensor:mainfrom
corbett5 merged 3 commits intoITensor:mainfrom
Conversation
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
corbett5
approved these changes
Feb 11, 2026
Collaborator
corbett5
left a comment
There was a problem hiding this comment.
Looks good to me. I appreciate the inclusion of the test as well.
I don't even know if I had any justification for choosing tol=1e-10 other than it sounded like a good idea.
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
MPO_newcan lose one-body accuracy (~1e-7) on a minimal reproducer where referenceMPO(...; cutoff=0.0)is ~1e-11.Root cause
During tensor assembly in
src/MPOConstruction.jl, entries are filtered with a hard-codedtol=1e- 10:my_ITensor(...; tol=1e-10, ...)itensor(...; tol=1e-10, ...)This creates an additional implicit truncation independent of the user-facing
MPO_new(...; tol=...).Change
Replaced the fixed assembly cutoff with exact assembly (
tol=0.0) in both call sites.Validation
Added a minimal accuracy loss test case in test/
On the reproducer case:
Why this is correct
MPO_new approximation should be controlled by its decomposition logic/tolerance settings. A fixed
assembly-time drop introduces uncontrolled representation error and can dominate one-body
expectation values.