Skip to content

Fix the global sign of the C4v corner spectrum for convergence - #436

Merged
leburgel merged 2 commits into
mainfrom
lb/c4v_sign_insensitive_convergence
Oct 16, 2026
Merged

leburgel merged 2 commits into
mainfrom
lb/c4v_sign_insensitive_convergence

Conversation

@leburgel

@leburgel leburgel commented Oct 9, 2026

Copy link
Copy Markdown
Member

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 until maxiter without 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 C and -C coincide. 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.jl converges 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.

@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/algorithms/ctmrg/c4v.jl 89.77% <100.00%> (+89.77%) ⬆️

... and 97 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leburgel
leburgel force-pushed the lb/c4v_sign_insensitive_convergence branch 2 times, most recently from 20f47c2 to ed78189 Compare October 12, 2026 18:34
Comment thread src/algorithms/ctmrg/c4v.jl Outdated
@kshyatt

kshyatt commented Oct 15, 2026

Copy link
Copy Markdown
Member

Oof! Sorry that I introduced this bug, I should indeed have thought of this. Modulo one small performance question LGTM

leburgel and others added 2 commits October 16, 2026 09:26
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
leburgel force-pushed the lb/c4v_sign_insensitive_convergence branch from ed78189 to ef04559 Compare October 16, 2026 07:29
Comment thread src/algorithms/ctmrg/c4v.jl
@leburgel
leburgel merged commit 024fd5b into main Oct 16, 2026
76 of 77 checks passed
@leburgel
leburgel deleted the lb/c4v_sign_insensitive_convergence branch October 16, 2026 20:29
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