-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathtf_ising.jl
More file actions
51 lines (44 loc) · 1.57 KB
/
tf_ising.jl
File metadata and controls
51 lines (44 loc) · 1.57 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using Test
using Random
using PEPSKit
using TensorKit
using KrylovKit
using OptimKit
# References
# ----------
# Classical Simulation of Infinite-Size Quantum Lattice Systems in Two Spatial Dimensions
# J. Jordan, R. Orús, G. Vidal, F. Verstraete, and J. I. Cirac
# Phys. Rev. Lett. 101, 250602 – Published 18 December 2008
# (values estimated from plots)
# (factor of 2 in the energy due to convention differences)
g = 3.1
e = -1.6417 * 2
mˣ = 0.91
# initialize parameters
χbond = 2
χenv = 16
ctm_alg = SimultaneousCTMRG()
opt_alg = PEPSOptimize(;
boundary_alg=ctm_alg, optimizer=LBFGS(4; gradtol=1e-3, verbosity=3)
)
# initialize states
H = transverse_field_ising(InfiniteSquare(); g)
Random.seed!(2928528935)
psi_init = InfinitePEPS(2, χbond)
env_init = leading_boundary(CTMRGEnv(psi_init, ComplexSpace(χenv)), psi_init, ctm_alg)
# find fixedpoint
result = fixedpoint(psi_init, H, opt_alg, env_init)
ξ_h, ξ_v, = correlation_length(result.peps, result.env)
# compute magnetization
σx = TensorMap(scalartype(psi_init)[0 1; 1 0], ℂ^2, ℂ^2)
M = LocalOperator(H.lattice, (CartesianIndex(1, 1),) => σx)
magn = expectation_value(result.peps, M, result.env)
@test result.E ≈ e atol = 1e-2
@test imag(magn) ≈ 0 atol = 1e-6
@test abs(magn) ≈ mˣ atol = 5e-2
# find fixedpoint in polarized phase and compute correlations lengths
H_polar = transverse_field_ising(InfiniteSquare(); g=4.5)
result_polar = fixedpoint(psi_init, H_polar, opt_alg, env_init)
ξ_h_polar, ξ_v_polar, = correlation_length(result_polar.peps, result_polar.env)
@test ξ_h_polar < ξ_h
@test ξ_v_polar < ξ_v