Skip to content

Fix gauge fixing in :fixed mode for non-uniform unit cells from full SVD#249

Merged
pbrehmer merged 9 commits intomasterfrom
pb/fix-full-svd-gauging
Aug 26, 2025
Merged

Fix gauge fixing in :fixed mode for non-uniform unit cells from full SVD#249
pbrehmer merged 9 commits intomasterfrom
pb/fix-full-svd-gauging

Conversation

@pbrehmer
Copy link
Collaborator

I noticed that when using :fixed mode differentiation the gauge fixing routine would error for non-uniform unit cells when using a full SVD (as opposed a IterSVD). This came down the fact that the gauge signs on the full space were initialized with the wrong spaces. Now we explicitly initialize the correct spaces which is also tested in the test/ctmrg/unitcell.jl tests.

@pbrehmer pbrehmer requested a review from lkdvos August 25, 2025 15:45
@codecov
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
...rithms/optimization/fixed_point_differentiation.jl 94.48% <100.00%> (+0.49%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pbrehmer
Copy link
Collaborator Author

The random cartesian spaces test should be fixed, so hopefully now everything runs through.

I also added a line to the _rrule(::GradMode{:fixed}, ...) which ensure fixed space truncation, as suggested in #157. This should now hopefully prevent any errors related to space incompatibility during gauge fixing.

@lkdvos lkdvos linked an issue Aug 26, 2025 that may be closed by this pull request
lkdvos
lkdvos previously approved these changes Aug 26, 2025
Copy link
Member

@lkdvos lkdvos left a comment

Choose a reason for hiding this comment

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

Suggested a slight reorganization of the code, otherwise happy to merge once tests pass (also happy to merge like this)

@pbrehmer pbrehmer enabled auto-merge (squash) August 26, 2025 12:23
@pbrehmer pbrehmer merged commit b25d9f1 into master Aug 26, 2025
43 of 45 checks passed
@pbrehmer pbrehmer deleted the pb/fix-full-svd-gauging branch August 26, 2025 16:00
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.

Use FixedSpaceTruncation before gauge fixing

2 participants