-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into svd_adjoint
- Loading branch information
Showing
48 changed files
with
2,257 additions
and
1,124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: CompatHelper | ||
on: | ||
schedule: | ||
- cron: 0 0 * * * | ||
workflow_dispatch: | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
jobs: | ||
CompatHelper: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check if Julia is already available in the PATH | ||
id: julia_in_path | ||
run: which julia | ||
continue-on-error: true | ||
- name: Install Julia, but only if it is not already available in the PATH | ||
uses: julia-actions/setup-julia@v2 | ||
with: | ||
version: '1' | ||
arch: ${{ runner.arch }} | ||
if: steps.julia_in_path.outcome != 'success' | ||
- name: "Add the General registry via Git" | ||
run: | | ||
import Pkg | ||
ENV["JULIA_PKG_SERVER"] = "" | ||
Pkg.Registry.add("General") | ||
shell: julia --color=yes {0} | ||
- name: "Install CompatHelper" | ||
run: | | ||
import Pkg | ||
name = "CompatHelper" | ||
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7" | ||
version = "3" | ||
Pkg.add(; name, uuid, version) | ||
shell: julia --color=yes {0} | ||
- name: "Run CompatHelper" | ||
run: | | ||
import CompatHelper | ||
CompatHelper.main() | ||
shell: julia --color=yes {0} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: TagBot | ||
|
||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
workflow_dispatch: | ||
inputs: | ||
lookback: | ||
default: 3 | ||
|
||
permissions: | ||
actions: read | ||
checks: read | ||
contents: write | ||
deployments: read | ||
issues: read | ||
discussions: read | ||
packages: read | ||
pages: read | ||
pull-requests: read | ||
repository-projects: read | ||
security-events: read | ||
statuses: read | ||
|
||
jobs: | ||
TagBot: | ||
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: JuliaRegistries/TagBot@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
ssh: ${{ secrets.DOCUMENTER_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
docs/build | ||
Manifest.toml | ||
examples/.ipynb_checkpoints | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 QuantumGroup@UGent | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,43 @@ | ||
name = "PEPSKit" | ||
uuid = "52969e89-939e-4361-9b68-9bc7cde4bdeb" | ||
authors = ["maarten <maarten.vandamme@ugent.be>"] | ||
authors = ["Maarten Vandamme", "Paul Brehmer", "Lander Burgelman", "Rui-Zhen Huang", "Daan Maertens", "Lukas Devos <lukas.devos@ugent.be"] | ||
version = "0.1.0" | ||
|
||
[deps] | ||
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" | ||
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" | ||
ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a" | ||
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20" | ||
KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502" | ||
MPSKitModels = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" | ||
OptimKit = "77e91f04-9b3b-57a6-a776-40b61faaebe0" | ||
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a" | ||
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" | ||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" | ||
TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" | ||
VectorInterface = "409d34a3-91d5-4945-b6ec-7529ddf182d8" | ||
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" | ||
|
||
[compat] | ||
Accessors = "0.1" | ||
ChainRulesCore = "1.0" | ||
Compat = "3.46, 4.2" | ||
KrylovKit = "0.6, 0.7, 0.8" | ||
LinearAlgebra = "1" | ||
MPSKit = "0.10" | ||
OptimKit = "0.3" | ||
Printf = "1" | ||
Statistics = "1" | ||
TensorKit = "0.12" | ||
VectorInterface = "0.4" | ||
Zygote = "0.6" | ||
julia = "1.6" | ||
|
||
[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" | ||
|
||
[targets] | ||
test = ["Test", "SafeTestsets", "ChainRulesTestUtils", "FiniteDifferences"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,67 @@ | ||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/quantumghent/PEPSKit.jl/blob/master/docs/src/assets/logo-dark.svg"> | ||
<img alt="PEPSKit.jl logo" src="https://github.com/quantumghent/PEPSKit.jl/blob/master/docs/src/assets/logo.svg" width="150"> | ||
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/QuantumKitHub/PEPSKit.jl/blob/master/docs/src/assets/logo-dark.svg"> | ||
<img alt="PEPSKit.jl logo" src="https://github.com/QuantumKitHub/PEPSKit.jl/blob/master/docs/src/assets/logo.svg" width="150"> | ||
</picture> | ||
|
||
# PepsKit.jl | ||
# PEPSKit.jl | ||
|
||
[![docs][docs-dev-img]][docs-dev-url] ![CI][ci-url] [![codecov][codecov-img]][codecov-url] | ||
|
||
[docs-dev-img]: https://img.shields.io/badge/docs-dev-blue.svg | ||
[docs-dev-url]: https://quantumghent.github.io/PEPSKit.jl/dev/ | ||
[docs-dev-url]: https://QuantumKitHub.github.io/PEPSKit.jl/dev/ | ||
|
||
[codecov-img]: https://codecov.io/gh/quantumghent/PEPSKit.jl/branch/master/graph/badge.svg | ||
[codecov-url]: https://codecov.io/gh/quantumghent/PEPSKit.jl | ||
[codecov-img]: https://codecov.io/gh/QuantumKitHub/PEPSKit.jl/graph/badge.svg?token=1OBDY03SUP | ||
[codecov-url]: https://codecov.io/gh/QuantumKitHub/PEPSKit.jl | ||
|
||
[ci-url]: https://github.com/quantumghent/PEPSKit.jl/workflows/CI/badge.svg | ||
[ci-url]: https://github.com/QuantumKitHub/PEPSKit.jl/workflows/CI/badge.svg | ||
|
||
**Tools for working with projected entangled-pair states** | ||
|
||
It contracts, it optimizes, it may be broken at any point. | ||
It contracts, it optimizes, it may break. | ||
|
||
## Installation | ||
|
||
The package can be installed through the Julia general registry, via the package manager: | ||
|
||
```julia-repl | ||
pkg> add PEPSKit | ||
``` | ||
|
||
## Quickstart | ||
|
||
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: | ||
|
||
```julia | ||
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) | ||
|
||
# configuring the parameters | ||
D = 2 | ||
chi = 20 | ||
ctm_alg = CTMRG(; trscheme = truncdim(chi), tol=1e-20, miniter=4, maxiter=100, verbosity=1) | ||
opt_alg = PEPSOptimize(; | ||
boundary_alg=ctm_alg, | ||
optimizer=LBFGS(4; maxiter=100, gradtol=1e-4, verbosity=2), | ||
gradient_alg=GMRES(; tol=1e-6, maxiter=100), | ||
reuse_env=true, | ||
verbosity=2, | ||
) | ||
|
||
# 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) | ||
|
||
@show result.E # -0.6625... | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" | ||
|
||
[compat] | ||
Documenter = "0.27" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Coming soon. | ||
For now, refer to the [examples folder](https://github.com/QuantumKitHub/PEPSKit.jl/tree/master/examples) on GitHub. |
Oops, something went wrong.