[WIP] Boundary-MPS approximate contraction of an iPEPO window with CTMRG environment - #415
Draft
Yue-Zhengyuan wants to merge 1 commit into
Draft
[WIP] Boundary-MPS approximate contraction of an iPEPO window with CTMRG environment#415Yue-Zhengyuan wants to merge 1 commit into
Yue-Zhengyuan wants to merge 1 commit into
Conversation
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.
(This PR requires QuantumKitHub/MPSKit.jl#470 which has not been released yet. @lkdvos)
Summary
This PR adds approximate expectation-value contractions using boundary MPS method for finite windows of a single-layer
InfinitePEPO:MPOObservablerepresents a physical OBC-MPO acting on a path of the 2D network.expectation_value_approxmeasures the expectation value ofMPOObservable.correlator_approxspecializes on 2-site correlators on many bonds, with a caching mechanism to reuse intermediate contraction results.The implementation converts CTMRG boundaries to finite MPSs, applies PEPO rows as finite MPOs with MPSKit's zip-up contraction, optionally refines each MPO-MPS product with one-site DMRG, and closes the window against the opposite CTMRG boundary.
Design
Note
This is definitely not finalized, and up to further improvements.
Path-based MPO observables
MPOObservablestores three aligned pieces of information:sites: lattice sites on which physical MPO tensors act;mpo: the corresponding OBC-MPO tensors, withmpo[k]acting onsites[k];path: a non-self-intersecting nearest-neighbor path containingsitesin MPO order and any intermediate sites needed to route the virtual string.The purpose of
pathis to avoid materializing aBraidingTensorat each of the routing sites.An
MPOObservablecan be built from explicit MPO tensors, from an manually routed path, or from a denseAbstractTensorMap. The dense constructor will first order the sites to be acted, decompose the operator to an MPO, and automatically choose a path to connect the sites.Note
Currently the automatic
pathrouting does not work for allsites.Fusing an MPO path into a PEPO
The functions
mpo_path_first,mpo_path_middle,mpo_path_last, andmpo_path_stringapplies the physical MPO on the iPEPO, and then trace out the physical legs. The virtual strings of the MPO are fused with the iPEPO tensor virtual legs. It is assumed that each site can only be passed by the MPO once, hence the requirement that the MPO path is not self-intersecting.Note
Fusing the MPO strings with the iPEPO virtual legs is not the optimal way to contract, especially for the routing sites.
Finite-window contraction
For row-by-row contraction of a rectangular window in the iPEPO from north to south,
expectation_value_approxproceeds in the following steps.FiniteMPSfrom CTMRG corners and north edges;FiniteMPOrow from the west/east CTMRG edges and traced or observable-modified PEPO tensors;approximate((W, psi), Zipup(...));DMRG;dot.The south tensors are conjugated and permuted when the boundary MPS is built, in order to cancel the conjugation applied to the first argument of
dot.Column sweeps reuse the same backend by rotating the PEPO, CTMRG environment, coordinates, and observable. With
direction = :auto, wide windows use row sweeps and tall or square windows use rotated column sweeps.WindowApproxis an internal, unexported wrapper for the zip-up and optional DMRG algorithms. Public callers only choosetrunc,maxiter, anddirection. By default,truncistruncrank(chi), wherechiis the largest CTMRG corner-space dimension;maxiter = 0disables DMRG refinement.Two-site correlators with caching mechanism
correlator_approxis specialized to measure the same two-site operatoropon many bonds (using one window that covers all bonds, even if some bonds can be covered with a smaller window) with a caching mechanism to reduce repeated contractions. The cache stores:bondsshould not contain duplicates. First, each bond is ordered geometrically. After ordering, the first and the second site is referred to as the "source" and the "target", respectively.A
swappedflag records if the bond is reversed by the ordering.Bonds with the same source and
swappedflag are put in one evaluation group to share common contractions. For row-by-row contraction,correlator_approxproceeds as follows:correlator.Thus rows before the source and after the target are reused through north/south caches, the vertical string is propagated once per source, and horizontal segments are shared between ordered targets.
TODO
The most important task is adding the support for fermions.
EdgeTransferMatrixto avoid double conjugation of the south boundary and easier generalization to the case of iPEPS and purified iPEPO.