Skip to content

Conversation

@pbrehmer
Copy link
Collaborator

@pbrehmer pbrehmer commented Jan 21, 2026

In this PR we will finally add a dedicated C4v CTMRG algorithm. I started with the standard version using eigh projectors but we can easily also implement a QR version by making a C4vQRProjector algorithm and the corresponding c4v_projector method. (@Yue-Zhengyuan said he would be up for doing this :-)) This C4v routine is completely differentiable using naive AD, :diffgauge and :fixed mode.

Note that I needed to generalize the gauge_fix method for CTMRGEnvs to not have separate methods for all the C4v stuff. Same thing is true for environment initialization, where it would be nice to have an initialize_environment method where one can dispatch on an algorithm. Here we'll have to wait until we merge #264.

Let me also say that it would eventually be nicer to have a dedicated C4vCTMRGEnv since this would make things cleaner. However, this would entail a larger rewrite of quite a few things, so I propose that I postpone this rewriting and cleaning up process until I have more resources for that again. (In general I feel like we should clean up and refactor some stuff again since the codebase has been growing quite a bit.) Anyways, for now it would be nice to have a working C4v CTMRG that people can use.

This is still very much under construction but I'll finish up things and adjust the test suite tomorrow.

Closes #258.

@pbrehmer pbrehmer self-assigned this Jan 21, 2026
@pbrehmer pbrehmer marked this pull request as draft January 21, 2026 19:12
@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

Your PR no longer requires formatting changes. Thank you for your contribution!

@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

❌ Patch coverage is 4.79452% with 278 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/utility/eigh.jl 0.00% 127 Missing ⚠️
src/algorithms/ctmrg/c4v.jl 0.00% 54 Missing ⚠️
...rithms/optimization/fixed_point_differentiation.jl 0.00% 38 Missing ⚠️
src/algorithms/ctmrg/gaugefix.jl 0.00% 30 Missing ⚠️
src/utility/qr.jl 0.00% 18 Missing ⚠️
src/algorithms/ctmrg/projectors.jl 61.11% 7 Missing ⚠️
src/algorithms/select_algorithm.jl 50.00% 2 Missing ⚠️
src/algorithms/ctmrg/ctmrg.jl 50.00% 1 Missing ⚠️
src/environments/ctmrg_environments.jl 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/Defaults.jl 85.71% <ø> (ø)
src/PEPSKit.jl 100.00% <ø> (ø)
src/algorithms/ctmrg/sequential.jl 87.30% <ø> (-11.12%) ⬇️
src/algorithms/ctmrg/simultaneous.jl 82.35% <ø> (-17.65%) ⬇️
src/utility/svd.jl 82.99% <ø> (-4.51%) ⬇️
src/algorithms/ctmrg/ctmrg.jl 88.52% <50.00%> (-1.96%) ⬇️
src/environments/ctmrg_environments.jl 47.09% <0.00%> (-34.41%) ⬇️
src/algorithms/select_algorithm.jl 17.39% <50.00%> (-57.61%) ⬇️
src/algorithms/ctmrg/projectors.jl 50.84% <61.11%> (-32.18%) ⬇️
src/utility/qr.jl 0.00% <0.00%> (ø)
... and 4 more

... and 20 files with indirect coverage changes

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

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.

[Feature] C4v CTMRG

2 participants