QuantumKitHub / PEPSKit.jl

Julia package for PEPS algorithms
MIT License
52 stars 12 forks source link

Infinite error during CTMRG. #61

Closed Gertian closed 2 months ago

Gertian commented 2 months ago

I'm trying to to run PEPSKit for the pi-flux model (which lives on a 2 by 2 unit cell with fermions) and I'm bumping into some issues. More specifically leading_boundary(CTMRGEnv(state, χ), state, ctm_alg); gives me an infinite error for all except the first iteration.

A MWE ( which doesn't even care about the Hamiltonian yet) is :

using Revise
using TensorKit, PEPSKit, KrylovKit, OptimKit
########################################
#Define the symmetry gorup of the model#
########################################
sym = (SU2Irrep ⊠ U1Irrep ⊠ FermionParity);  #mixing colors * PN_conservation * it's fermions
#define some elementary IRREPS of this symmetry group.
empty  = sym.(0   ,0,0);  #empty empty
single = sym.(1//2,1,1);  #full empty + empty full
double = sym.(0   ,2,0);  #full full
#define the physical Hilbert space of this model :
ph = Vect[sym](empty => 1, single => 1, double => 1);

#############
#Find the GS#
#############
#define IC
D = Vect[sym](empty => 1, single=>1, double=>1)  #intial space of PEPS
intitial_tensors = [TensorMap(rand, ComplexF64, ph, D*D'*D'*D)  TensorMap(rand, ComplexF64, ph, D*D'*D'*D) ;
                    TensorMap(rand, ComplexF64, ph, D*D'*D'*D)  TensorMap(rand, ComplexF64, ph, D*D'*D'*D) ]  ;
initial_state = InfinitePEPS(intitial_tensors);

#Define the GS_search algorithm 
χ = Vect[sym](empty => 3, single=>3, double=>3)  #intial space of the boundary MPS
χ_max = 20                                       #maximal bond dimension of the boundary MPS
ctm_alg = CTMRG(; tol=1e-10, miniter=4, maxiter=100, verbosity=3, trscheme=truncdim( χ_max )); #verbosity can be lowered if you want less output.

#use the above to actually get the GS
state = initial_state
environments = leading_boundary(CTMRGEnv(state, χ), state, ctm_alg);  #initial boundaries

I also ran the same code with sym = (SU2Irrep ⊠ U1Irrep ⊠ Z2Irrep) which produces the same error. Therefore I suspect the issue doesn't sit with the fermionic reps.

lkdvos commented 2 months ago

can you also attach the error? what is an infinite error?

Gertian commented 2 months ago

I mean literally "an infinite error" .

image

lkdvos commented 2 months ago

that's not unexpected behavior, that means that the virtual spaces are still changing, in which case the difference between two iterations is not very well defined, and it returns Inf

Gertian commented 2 months ago

Ok I see, thanks !