Repository navigation
Fix the global sign of the C4v corner spectrum for convergence - #436
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 97 files with indirect coverage changes 🚀 New features to boost your workflow:
|
leburgel
force-pushed
the
lb/c4v_sign_insensitive_convergence
branch
2 times, most recently
from
October 12, 2026 18:34
20f47c2 to
ed78189
Compare
kshyatt
reviewed
Oct 15, 2026
Member
|
Oof! Sorry that I introduced this bug, I should indeed have thought of this. Modulo one small performance question LGTM |
The C4v convergence check compares corner eigenvalues, so a fixed point on which every iteration maps (C, E) to (-C, -E) never registered as converged. Fix the sign of the spectrum such that the eigenvalue of largest magnitude is positive.
Co-authored-by: Katharine Hyatt <kshyatt@users.noreply.github.com>
leburgel
force-pushed
the
lb/c4v_sign_insensitive_convergence
branch
from
October 16, 2026 07:29
ed78189 to
ef04559
Compare
kshyatt
reviewed
Oct 16, 2026
kshyatt
approved these changes
Oct 16, 2026
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.
Since #419, C4v CTMRG measures corner convergence through the eigenvalue spectrum of the corner (
eigh_vals) instead of its singular values. Some fixed points are only fixed up to a sign: every iteration maps(C, E)to(-C, -E). The edge spectrum (singular values) does not see that sign, but the corner eigenvalues flip with it, so their distance to the previous iteration stays finite and CTMRG runs untilmaxiterwithout reporting convergence.This happens, for instance, for states with half-integer U(1) charges on the virtual bonds, where fixed points come in pairs, one of which flips sign every iteration. Starting from a random environment, CTMRG can land on either.
This PR fixes the global sign of the C4v corner spectrum such that the eigenvalue of largest magnitude is positive, so that the spectra of
Cand-Ccoincide. Unlike comparing absolute values, as the singular values did before #419, this still detects eigenvalues that change sign relative to the others.The new test
test/ctmrg/c4v_sign_branches.jlconverges a half-integer U(1) Heisenberg state, constructs the twin of its fixed point, checks that the two branches have opposite iteration signs, and checks that CTMRG converges on both to the same energy.