feat(ipeps): split_honeycomb_merge — SVD reverse of Honeycomb A/B merge#48
Open
yuchihe wants to merge 2 commits into
Open
feat(ipeps): split_honeycomb_merge — SVD reverse of Honeycomb A/B merge#48yuchihe wants to merge 2 commits into
yuchihe wants to merge 2 commits into
Conversation
Add `split_honeycomb_merge(M; convention, χmax, cutoff)` to recover the two sublattice tensors from a merged single-site Honeycomb iPEPS tensor of shape `(D, D, D, D, d²)`. The function reshapes the merged physical leg back to `(σ_A, σ_B)` (column-major, σ_A inner), regroups external legs into two halves, and performs a single SVD to introduce a new internal virtual bond of dimension χ ≤ D²·d. Two conventions are supported: - `:LU_RD` (default): A=(L,U), B=(R,D) — matches the natural u/v merge along the `a` bond in the brickwall convention. - `:LD_RU`: A=(L,D), B=(R,U) — diagonal partition. Singular values are distributed evenly (`A·√S` and `√S·B'`). `χmax > 0` caps the kept bond dimension; `cutoff > 0` discards tails relative to the largest singular value. Tests cover roundtrip accuracy for both conventions, truncation, and argument validation. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
In TeneT, `χ` already denotes the boundary VUMPS environment bond dimension. Naming the new SVD-introduced internal bond `χ` (and its keyword `χmax`) is confusing. Rename to `Dtrunc` everywhere — keyword, internal variables, docstring, and the corresponding test names. The internal full-rank counterpart (`χfull`) becomes `Dfull`, the kept rank is `Dkeep`, and the kept singular values are `Skeep`. Default `Dtrunc=0` still means "no truncation, keep all D²·d singular values". Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
Add
split_honeycomb_merge(M; convention, χmax, cutoff)insrc/ipeps_optimize/build_A.jl— the inverse of the Honeycomb sublatticemerge. Given a merged single-site iPEPS tensor
Mof shape(D, D, D, D, d²), it returns two sublattice tensorsAandBwiththree virtual legs and one physical leg each, joined by a new internal
virtual bond of dimension
χ ≤ D²·dproduced by a single SVD.Details
σ_ABto(σ_A, σ_B)in Julia's column-majororder (
σ_Ais the inner index).(A-side | B-side)grouping selected by theconventionkeyword::LU_RD(default, "anti-diagonal" merge): A keeps(L, U),B keeps
(R, D). ReconstructionM[L,D,R,U,σ_AB] = Σ_x A[L,U,σ_A,x] · B[x,R,D,σ_B].This matches the natural u/v merge along the
abond in thebrickwall convention (u with external
(L=c, U=b), v withexternal
(R=c, D=b)).:LD_RU("diagonal" merge): A keeps(L, D), B keeps(R, U).(D²d × D²d)matrix, distribute singular values evenlybetween A and B (
A·√Sand√S·B').χmax > 0caps the bond;cutoff > 0discardsS[i] ≤ cutoff · S[1].Returns a NamedTuple
(A, B, S):A: shape(D, D, d, χ)—A[extA1, extA2, σ_A, x_internal]B: shape(χ, D, D, d)—B[x_internal, extB1, extB2, σ_B]S: kept singular values (lengthχ)Test plan
Added a
@testset "split_honeycomb_merge SVD reverse"block intest/test_ipeps.jlthat:A,Bwithχ = D²d, contracts to formM, callssplit_honeycomb_merge, and verifiesM_reconstructed ≈ Mforboth
:LU_RDand:LD_RUconventions.Ais(D, D, d, D²d),Bis(D²d, D, D, d),length(S) == D²d.χmax = 5keeps exactly 5 singular values (largest) andthat the returned
Sis sorted in descending order.ArgumentErroris thrown for non-square physical dim,mismatched virtual bond dims, and unknown convention symbol.
🤖 Generated with Claude Code