For now, refer to the examples folder on GitHub.
diff --git a/dev/examples/index.html b/dev/examples/index.html index 0959f4ba..3f78450f 100644 --- a/dev/examples/index.html +++ b/dev/examples/index.html @@ -1,2 +1,2 @@ -
For now, refer to the examples folder on GitHub.
Settings
This document was generated with Documenter.jl version 0.27.25 on Tuesday 9 July 2024. Using Julia version 1.10.4.
For now, refer to the examples folder on GitHub.
Settings
This document was generated with Documenter.jl version 0.27.25 on Wednesday 10 July 2024. Using Julia version 1.10.4.
Tools for working with projected entangled-pair states
It contracts, it optimizes, it may break.
The package can be installed through the Julia general registry, via the package manager:
pkg> add PEPSKit
After following the installation process, it should now be possible to load the packages and start simulating. For example, in order to obtain the groundstate of the 2D Heisenberg model, we can use the following code:
using TensorKit, PEPSKit, KrylovKit, OptimKit
# constructing the Hamiltonian:
-Jx, Jy, Jz = (-1, 1, -1) # sublattice rotation to obtain single-site unit cell
-physical_space = ComplexSpace(2)
-T = ComplexF64
-σx = TensorMap(T[0 1; 1 0], physical_space, physical_space)
-σy = TensorMap(T[0 im; -im 0], physical_space, physical_space)
-σz = TensorMap(T[1 0; 0 -1], physical_space, physical_space)
-H = (Jx * σx ⊗ σx) + (Jy * σy ⊗ σy) + (Jz * σz ⊗ σz)
-Heisenberg_hamiltonian = NLocalOperator{NearestNeighbor}(H / 4)
+H = square_lattice_heisenberg(; Jx=-1, Jy=1, Jz=-1) # sublattice rotation to obtain single-site unit cell
# configuring the parameters
D = 2
chi = 20
-ctm_alg = CTMRG(; trscheme = truncdim(chi), tol=1e-20, miniter=4, maxiter=100, verbosity=1)
+ctm_alg = CTMRG(; tol=1e-10, miniter=4, maxiter=100, verbosity=1, trscheme=truncdim(chi))
opt_alg = PEPSOptimize(;
boundary_alg=ctm_alg,
optimizer=LBFGS(4; maxiter=100, gradtol=1e-4, verbosity=2),
@@ -26,6 +19,6 @@
# ground state search
state = InfinitePEPS(2, D)
ctm = leading_boundary(CTMRGEnv(state; Venv=ComplexSpace(chi)), state, ctm_alg)
-result = fixedpoint(state, Heisenberg_hamiltonian, opt_alg, ctm)
+result = fixedpoint(state, H, opt_alg, ctm)
-@show result.E # -0.6625...
Settings
This document was generated with Documenter.jl version 0.27.25 on Tuesday 9 July 2024. Using Julia version 1.10.4.
Settings
This document was generated with Documenter.jl version 0.27.25 on Wednesday 10 July 2024. Using Julia version 1.10.4.