Skip to content

Commit

Permalink
LocalOperator Refactor (#49)
Browse files Browse the repository at this point in the history
This is a major overhaul of the implementation of local operators. In particular, this PR enables the use of arbitrary interactions on a lattice through the `LocalOperator` construction.
Additionally, this changes some conventions on how the sites of unit cells are labeled for CTMRG environments.
Various other fixes and improvements are also incorporated
  • Loading branch information
lkdvos authored Jul 9, 2024
1 parent 4a1e5fb commit 53e53aa
Show file tree
Hide file tree
Showing 20 changed files with 942 additions and 413 deletions.
28 changes: 1 addition & 27 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
version:
- '1.6' # LTS version
- '1.8' # LTS version
- '1' # automatically expands to the latest stable 1.x release of Julia
os:
- ubuntu-latest
Expand All @@ -47,29 +47,3 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: lcov.info
test-nightly:
needs: test
name: Julia nightly - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- 'nightly'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
env:
JULIA_NUM_THREADS: 4
13 changes: 8 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec"
TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2"
VectorInterface = "409d34a3-91d5-4945-b6ec-7529ddf182d8"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

Expand All @@ -24,20 +25,22 @@ ChainRulesCore = "1.0"
Compat = "3.46, 4.2"
KrylovKit = "0.6, 0.7, 0.8"
LinearAlgebra = "1"
MPSKit = "0.10"
MPSKit = "0.11"
OptimKit = "0.3"
Printf = "1"
Random = "1"
Statistics = "1"
TensorKit = "0.12"
TensorKit = "0.12.4"
TensorOperations = "4"
VectorInterface = "0.4"
Zygote = "0.6"
julia = "1.6"
julia = "1.8"

[extras]
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "SafeTestsets", "ChainRulesTestUtils", "FiniteDifferences"]
7 changes: 4 additions & 3 deletions src/PEPSKit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ using Base: @kwdef
using Compat
using Accessors
using VectorInterface
using TensorKit, KrylovKit, MPSKit, OptimKit
using TensorKit, KrylovKit, MPSKit, OptimKit, TensorOperations
using ChainRulesCore, Zygote

include("utility/util.jl")
include("utility/eigsolve.jl")
include("utility/rotations.jl")
include("utility/hook_pullback.jl")
include("utility/autoopt.jl")

include("states/abstractpeps.jl")
include("states/infinitepeps.jl")
Expand Down Expand Up @@ -59,7 +60,7 @@ module Defaults
end

export CTMRG, CTMRGEnv
export NLocalOperator, AnisotropicNNOperator, OnSite, NearestNeighbor
export LocalOperator
export expectation_value, costfun
export leading_boundary
export PEPSOptimize, GeomSum, ManualIter, LinSolve
Expand All @@ -69,6 +70,6 @@ export InfinitePEPO, InfiniteTransferPEPO
export initializeMPS, initializePEPS
export symmetrize, None, Depth, Full
export showtypeofgrad
export square_lattice_heisenberg, square_lattice_pwave
export square_lattice_tf_ising, square_lattice_heisenberg, square_lattice_pwave

end # module
Loading

0 comments on commit 53e53aa

Please sign in to comment.