Skip to content

Fix MPO_new assembly cutoff and add H1 accuracy regression test#34

Merged
corbett5 merged 3 commits intoITensor:mainfrom
srwhite59:fix-mponew-assembly-cutoff
Feb 11, 2026
Merged

Fix MPO_new assembly cutoff and add H1 accuracy regression test#34
corbett5 merged 3 commits intoITensor:mainfrom
srwhite59:fix-mponew-assembly-cutoff

Conversation

@srwhite59
Copy link
Contributor

@srwhite59 srwhite59 commented Feb 11, 2026

Problem

MPO_new can lose one-body accuracy (~1e-7) on a minimal reproducer where reference MPO(...; cutoff=0.0) is ~1e-11.

Root cause

During tensor assembly in src/MPOConstruction.jl, entries are filtered with a hard-coded tol=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.

  - tol=1e-10
  + tol=0.0

Validation

Added a minimal accuracy loss test case in test/

On the reproducer case:

  • before: MPO_new max|Δ| = 3.132e-07
  • after: MPO_new max|Δ| = 2.910e-11
  • reference MPO(...; cutoff=0.0): 4.093e-11

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.

@srwhite59 srwhite59 requested a review from corbett5 February 11, 2026 06:03
@codecov
Copy link

codecov bot commented Feb 11, 2026

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 ☂️

Copy link
Collaborator

@corbett5 corbett5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@corbett5 corbett5 merged commit a1749da into ITensor:main Feb 11, 2026
6 of 10 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.

2 participants