-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathj1j2_model.jl
More file actions
34 lines (30 loc) · 1.15 KB
/
j1j2_model.jl
File metadata and controls
34 lines (30 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using Test
using Random
using PEPSKit
using TensorKit
using KrylovKit
using OptimKit
# initialize parameters
χbond = 2
χenv = 12
ctm_alg = SimultaneousCTMRG()
opt_alg = PEPSOptimize(;
boundary_alg=ctm_alg,
optimizer=LBFGS(4; gradtol=1e-3, verbosity=3),
gradient_alg=LinSolver(; iterscheme=:diffgauge),
)
# initialize states
Random.seed!(91283219347)
H = j1_j2(InfiniteSquare(); J2=0.25)
psi_init = product_peps(2, χbond; noise_amp=1e-1)
psi_init = symmetrize!(psi_init, RotateReflect())
env_init = leading_boundary(CTMRGEnv(psi_init, ComplexSpace(χenv)), psi_init, ctm_alg);
# find fixedpoint
result = fixedpoint(psi_init, H, opt_alg, env_init; symmetrization=RotateReflect())
ξ_h, ξ_v, = correlation_length(result.peps, result.env)
# compare against Juraj Hasik's data:
# https://github.com/jurajHasik/j1j2_ipeps_states/blob/main/single-site_pg-C4v-A1/j20.25/state_1s_A1_j20.25_D2_chi_opt48.dat
ξ_ref = -1 / log(0.2723596743547324)
@test result.E ≈ -0.5618837021945925 atol = 1e-3
@test all(@. isapprox(ξ_h, ξ_ref; atol=1e-1) && isapprox(ξ_v, ξ_ref; atol=1e-1))
@test ξ_h ≈ ξ_v atol = 1e-6 # Test symmetrization of optimized PEPS and environment