From d7b9f1955a68e53799842c2a587cd2077d5ab6ec Mon Sep 17 00:00:00 2001 From: leburgel Date: Wed, 19 Mar 2025 11:58:13 +0100 Subject: [PATCH 001/113] Start docs update --- .github/workflows/DocumentationCleanup.yml | 33 +++++++++++++ .gitignore | 3 +- README.md | 28 ++++++----- docs/Project.toml | 8 ++- docs/make.jl | 57 ++++++++++++++++------ docs/src/assets/pepskit.bib | 12 +++++ docs/src/references.md | 4 ++ 7 files changed, 116 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/DocumentationCleanup.yml create mode 100644 docs/src/assets/pepskit.bib create mode 100644 docs/src/references.md diff --git a/.github/workflows/DocumentationCleanup.yml b/.github/workflows/DocumentationCleanup.yml new file mode 100644 index 000000000..36f8569a5 --- /dev/null +++ b/.github/workflows/DocumentationCleanup.yml @@ -0,0 +1,33 @@ +name: Doc Preview Cleanup + +on: + pull_request: + types: [closed] + +# Ensure that only one "Doc Preview Cleanup" workflow is force pushing at a time +concurrency: + group: doc-preview-cleanup + cancel-in-progress: false + +jobs: + doc-preview-cleanup: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout gh-pages branch + uses: actions/checkout@v4 + with: + ref: gh-pages + - name: Delete preview and history + push changes + run: | + if [ -d "${preview_dir}" ]; then + git config user.name "Documenter.jl" + git config user.email "documenter@juliadocs.github.io" + git rm -rf "${preview_dir}" + git commit -m "delete preview" + git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}) + git push --force origin gh-pages-new:gh-pages + fi + env: + preview_dir: previews/PR${{ github.event.number }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index f06d26994..e61e2aa31 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ docs/build Manifest.toml examples/.ipynb_checkpoints .vscode/ -.DS_Store \ No newline at end of file +.DS_Store +**/dev/ \ No newline at end of file diff --git a/README.md b/README.md index 8f22e28d1..33335cc82 100644 --- a/README.md +++ b/README.md @@ -38,25 +38,27 @@ For example, in order to obtain the groundstate of the 2D Heisenberg model, we c ```julia using TensorKit, PEPSKit, KrylovKit, OptimKit -# constructing the Hamiltonian: +# construct the Hamiltonian H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1) # sublattice rotation to obtain single-site unit cell -# configuring the parameters +# choose the bond dimensions D = 2 chi = 20 -ctm_alg = SimultaneousCTMRG(; tol=1e-10, trscheme=truncdim(chi)) -opt_alg = PEPSOptimize(; - boundary_alg=ctm_alg, - optimizer_alg=LBFGS(4; maxiter=100, gradtol=1e-4, verbosity=3), - gradient_alg=LinSolver(), - reuse_env=true, + +# configure the algorithm parameters +boundary_alg = (; + alg=:simultaneous, tol=1e-10, verbosity=2, trscheme=(; alg=:truncdim, η=chi) ) +optimizer_alg = (; alg=:lbfgs, tol=1e-4, verbosity=3) +gradient_alg = (; alg=:linsolver) +reuse_env = true -# ground state search +# and find the ground state state = InfinitePEPS(2, D) -ctm, = leading_boundary(CTMRGEnv(state, ComplexSpace(chi)), state, ctm_alg) -peps, env, E, = fixedpoint(H, state, ctm, opt_alg) +env0, = leading_boundary(CTMRGEnv(state, ComplexSpace(chi)), state; boundary_alg...) +peps, env, E, = fixedpoint( + H, state, env0; boundary_alg, optimizer_alg, gradient_alg, reuse_env +) -@show E # -0.6625... -``` +@show E # -0.6625...``` diff --git a/docs/Project.toml b/docs/Project.toml index 818c9dd4d..01115f08f 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,6 +1,12 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" +DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656" +KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" +MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502" +MPSKitModels = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" +TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" [compat] -Documenter = "0.27" +Documenter = "1.0" diff --git a/docs/make.jl b/docs/make.jl index 1814ee546..3cf76edaa 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,28 +1,57 @@ +# if docs is not the current active environment, switch to it +if Base.active_project() != joinpath(@__DIR__, "Project.toml") + using Pkg + Pkg.activate(@__DIR__) + Pkg.develop(PackageSpec(; path=joinpath(@__DIR__, ".."))) + Pkg.resolve() + Pkg.instantiate() +end + using Documenter +using DocumenterCitations +using DocumenterInterLinks using PEPSKit +# examples +example_dir = joinpath(@__DIR__, "src", "examples") + +# bibliography +bibpath = joinpath(@__DIR__, "src", "assets", "pepskit.bib") +bib = CitationBibliography(bibpath; style=:authoryear) + +# interlinks +links = InterLinks( + "TensorKit" => "https://jutho.github.io/TensorKit.jl/stable/", + "KrylovKit" => "https://jutho.github.io/KrylovKit.jl/stable/", + "MPSKit" => "https://quantumkithub.github.io/MPSKit.jl/stable/", + "MPSKitModels" => "https://quantumkithub.github.io/MPSKitModels.jl/stable/", +) + +# explicitly set math engine +mathengine = MathJax3( + Dict( + :loader => Dict("load" => ["[tex]/physics"]), + :tex => Dict( + "inlineMath" => [["\$", "\$"], ["\\(", "\\)"]], + "tags" => "ams", + "packages" => ["base", "ams", "autoload", "physics"], + ), + ), +) + makedocs(; modules=[PEPSKit], sitename="PEPSKit.jl", - format=Documenter.HTML(; - prettyurls=get(ENV, "CI", nothing) == "true", - mathengine=MathJax3( - Dict( - :loader => Dict("load" => ["[tex]/physics"]), - :tex => Dict( - "inlineMath" => [["\$", "\$"], ["\\(", "\\)"]], - "tags" => "ams", - "packages" => ["base", "ams", "autoload", "physics"], - ), - ), - ), - ), + format=Documenter.HTML(; prettyurls=get(ENV, "CI", nothing) == "true", mathengine), pages=[ "Home" => "index.md", "Manual" => "man/intro.md", "Examples" => "examples/index.md", "Library" => "lib/lib.md", + "References" => "references.md", ], + checkdocs=:exports, + plugins=[bib, links], ) -deploydocs(; repo="https://github.com/QuantumKitHub/PEPSKit.jl.git") +deploydocs(; repo="github.com/QuantumKitHub/PEPSKit.jl.git", push_preview=true) diff --git a/docs/src/assets/pepskit.bib b/docs/src/assets/pepskit.bib new file mode 100644 index 000000000..461591fed --- /dev/null +++ b/docs/src/assets/pepskit.bib @@ -0,0 +1,12 @@ +@article{francuz_stable_2025, + title = {Stable and Efficient Differentiation of Tensor Network Algorithms}, + author = {Francuz, Anna and Schuch, Norbert and Vanhecke, Bram}, + year = {2025}, + month = mar, + journal = {Physical Review Research}, + volume = {7}, + number = {1}, + pages = {013237}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevResearch.7.013237} +} \ No newline at end of file diff --git a/docs/src/references.md b/docs/src/references.md new file mode 100644 index 000000000..78f29bc41 --- /dev/null +++ b/docs/src/references.md @@ -0,0 +1,4 @@ +# References + +```@bibliography +``` From 670323f0e65c13288ef9512dce0210262b1d9e2f Mon Sep 17 00:00:00 2001 From: leburgel Date: Wed, 19 Mar 2025 12:03:01 +0100 Subject: [PATCH 002/113] Fix some formatting issues --- .github/workflows/DocumentationCleanup.yml | 2 +- .gitignore | 2 +- README.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/DocumentationCleanup.yml b/.github/workflows/DocumentationCleanup.yml index 36f8569a5..5be23b964 100644 --- a/.github/workflows/DocumentationCleanup.yml +++ b/.github/workflows/DocumentationCleanup.yml @@ -30,4 +30,4 @@ jobs: git push --force origin gh-pages-new:gh-pages fi env: - preview_dir: previews/PR${{ github.event.number }} \ No newline at end of file + preview_dir: previews/PR${{ github.event.number }} diff --git a/.gitignore b/.gitignore index e61e2aa31..b8339a652 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ Manifest.toml examples/.ipynb_checkpoints .vscode/ .DS_Store -**/dev/ \ No newline at end of file +**/dev/ diff --git a/README.md b/README.md index 33335cc82..67193c29a 100644 --- a/README.md +++ b/README.md @@ -60,5 +60,5 @@ peps, env, E, = fixedpoint( H, state, env0; boundary_alg, optimizer_alg, gradient_alg, reuse_env ) -@show E # -0.6625...``` - +@show E # -0.6625... +``` From 64427027448b45b01bc103c10538bcaaff93cd79 Mon Sep 17 00:00:00 2001 From: leburgel Date: Wed, 19 Mar 2025 12:33:55 +0100 Subject: [PATCH 003/113] Fix some broken `@ref`s [no ci] --- docs/make.jl | 2 ++ src/Defaults.jl | 2 +- src/algorithms/ctmrg/projectors.jl | 4 ++-- src/algorithms/optimization/peps_optimization.jl | 4 ++-- src/utility/svd.jl | 2 +- src/utility/util.jl | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 3cf76edaa..c323af66a 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -25,6 +25,8 @@ links = InterLinks( "KrylovKit" => "https://jutho.github.io/KrylovKit.jl/stable/", "MPSKit" => "https://quantumkithub.github.io/MPSKit.jl/stable/", "MPSKitModels" => "https://quantumkithub.github.io/MPSKitModels.jl/stable/", + "Zygote" => "https://fluxml.ai/Zygote.jl/dev/", + "ChainRulesCore" => "https://juliadiff.org/ChainRulesCore.jl/stable/", ) # explicitly set math engine diff --git a/src/Defaults.jl b/src/Defaults.jl index 842f3484a..0a123e42c 100644 --- a/src/Defaults.jl +++ b/src/Defaults.jl @@ -25,7 +25,7 @@ Module containing default algorithm parameter values and arguments. * `svd_fwd_alg=:$(Defaults.svd_fwd_alg)` : SVD algorithm that is used in the forward pass. - `:sdd`: TensorKit's wrapper for LAPACK's `_gesdd` - `:svd`: TensorKit's wrapper for LAPACK's `_gesvd` - - `:iterative`: Iterative SVD only computing the specifed number of singular values and vectors, see ['IterSVD'](@ref) + - `:iterative`: Iterative SVD only computing the specifed number of singular values and vectors, see [`IterSVD`](@ref) * `svd_rrule_tol=$(Defaults.svd_rrule_tol)` : Accuracy of SVD reverse-rule. * `svd_rrule_min_krylovdim=$(Defaults.svd_rrule_min_krylovdim)` : Minimal Krylov dimension of the reverse-rule algorithm (if it is a Krylov algorithm). * `svd_rrule_verbosity=$(Defaults.svd_rrule_verbosity)` : SVD gradient output verbosity. diff --git a/src/algorithms/ctmrg/projectors.jl b/src/algorithms/ctmrg/projectors.jl index 447eb528e..8c02868a4 100644 --- a/src/algorithms/ctmrg/projectors.jl +++ b/src/algorithms/ctmrg/projectors.jl @@ -82,7 +82,7 @@ Projector algorithm implementing projectors from SVDing the half-infinite CTMRG ## Keyword arguments -* `svd_alg::Union{<:SVDAdjoint,NamedTuple}=SVDAdjoint()` : SVD algorithm including the reverse rule. See ['SVDAdjoint'](@ref). +* `svd_alg::Union{<:SVDAdjoint,NamedTuple}=SVDAdjoint()` : SVD algorithm including the reverse rule. See [`SVDAdjoint`](@ref). * `trscheme::Union{TruncationScheme,NamedTuple}=(; alg::Symbol=:$(Defaults.trscheme))` : Truncation scheme for the projector computation, which controls the resulting virtual spaces. Here, `alg` can be one of the following: - `:fixedspace` : Keep virtual spaces fixed during projection - `:notrunc` : No singular values are truncated and the performed SVDs are exact @@ -113,7 +113,7 @@ Projector algorithm implementing projectors from SVDing the full 4x4 CTMRG envir ## Keyword arguments -* `svd_alg::Union{<:SVDAdjoint,NamedTuple}=SVDAdjoint()` : SVD algorithm including the reverse rule. See ['SVDAdjoint'](@ref). +* `svd_alg::Union{<:SVDAdjoint,NamedTuple}=SVDAdjoint()` : SVD algorithm including the reverse rule. See [`SVDAdjoint`](@ref). * `trscheme::Union{TruncationScheme,NamedTuple}=(; alg::Symbol=:$(Defaults.trscheme))` : Truncation scheme for the projector computation, which controls the resulting virtual spaces. Here, `alg` can be one of the following: - `:fixedspace` : Keep virtual spaces fixed during projection - `:notrunc` : No singular values are truncated and the performed SVDs are exact diff --git a/src/algorithms/optimization/peps_optimization.jl b/src/algorithms/optimization/peps_optimization.jl index 1769f0d19..8ddc88a18 100644 --- a/src/algorithms/optimization/peps_optimization.jl +++ b/src/algorithms/optimization/peps_optimization.jl @@ -138,8 +138,8 @@ keyword arguments are: * `maxiter::Int=$(Defaults.gradient_maxiter)` : Maximal number of gradient problem iterations. * `alg::Symbol=:$(Defaults.gradient_alg)` : Gradient algorithm variant, can be one of the following: - `:geomsum` : Compute gradient directly from the geometric sum, see [`GeomSum`](@ref) - - `:manualiter` : Iterate gradient geometric sum manually, see ['ManualIter'](@ref) - - `:linsolver` : Solve fixed-point gradient linear problem using iterative solver, see ['LinSolver'](@ref) + - `:manualiter` : Iterate gradient geometric sum manually, see [`ManualIter`](@ref) + - `:linsolver` : Solve fixed-point gradient linear problem using iterative solver, see [`LinSolver`](@ref) - `:eigsolver` : Determine gradient via eigenvalue formulation of its Sylvester equation, see [`EigSolver`](@ref) * `verbosity::Int` : Gradient output verbosity, ≤0 by default to disable too verbose printing. Should only be >0 for debug purposes. * `iterscheme::Symbol=:$(Defaults.gradient_iterscheme)` : CTMRG iteration scheme determining mode of differentiation. This can be: diff --git a/src/utility/svd.jl b/src/utility/svd.jl index f0c1ddd88..61243fdb6 100644 --- a/src/utility/svd.jl +++ b/src/utility/svd.jl @@ -26,7 +26,7 @@ removes the divergences from the adjoint. * `fwd_alg::Union{Algorithm,NamedTuple}=(; alg::Symbol=$(Defaults.svd_fwd_alg))`: SVD algorithm of the forward pass which can either be passed as an `Algorithm` instance or a `NamedTuple` where `alg` is one of the following: - `:sdd`: TensorKit's wrapper for LAPACK's `_gesdd` - `:svd`: TensorKit's wrapper for LAPACK's `_gesvd` - - `:iterative`: Iterative SVD only computing the specifed number of singular values and vectors, see ['IterSVD'](@ref) + - `:iterative`: Iterative SVD only computing the specifed number of singular values and vectors, see [`IterSVD`](@ref) * `rrule_alg::Union{Algorithm,NamedTuple}=(; alg::Symbol=$(Defaults.svd_rrule_alg))`: Reverse-rule algorithm for differentiating the SVD. Can be supplied by an `Algorithm` instance directly or as a `NamedTuple` where `alg` is one of the following: - `:tsvd`: Uses TensorKit's reverse-rule for `tsvd` which doesn't solve any linear problem and instead requires access to the full SVD, see [TensorKit](https://github.com/Jutho/TensorKit.jl/blob/f9cddcf97f8d001888a26f4dce7408d5c6e2228f/ext/TensorKitChainRulesCoreExt/factorizations.jl#L3) - `:gmres`: GMRES iterative linear solver, see the [KrylovKit docs](https://jutho.github.io/KrylovKit.jl/stable/man/algorithms/#KrylovKit.GMRES) for details diff --git a/src/utility/util.jl b/src/utility/util.jl index fe13edd0f..fec2224f0 100644 --- a/src/utility/util.jl +++ b/src/utility/util.jl @@ -191,7 +191,7 @@ end Macro utility to show to type of the gradient that is about to accumulate for `x`. -See also [`Zygote.@showgrad`](@ref). +See also [`Zygote.@showgrad`](@extref). """ macro showtypeofgrad(x) return :( From 1184bc3858350f1c891eb66b47c1f587c51b280a Mon Sep 17 00:00:00 2001 From: Lukas Devos Date: Thu, 20 Mar 2025 10:36:21 -0400 Subject: [PATCH 004/113] Fix links --- docs/make.jl | 9 ++++++--- src/Defaults.jl | 2 +- src/utility/util.jl | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index c323af66a..5e431fcc5 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -20,12 +20,13 @@ bibpath = joinpath(@__DIR__, "src", "assets", "pepskit.bib") bib = CitationBibliography(bibpath; style=:authoryear) # interlinks +# Zygote and MPSKitModels didn't update to documenter v1 yet... links = InterLinks( "TensorKit" => "https://jutho.github.io/TensorKit.jl/stable/", "KrylovKit" => "https://jutho.github.io/KrylovKit.jl/stable/", "MPSKit" => "https://quantumkithub.github.io/MPSKit.jl/stable/", - "MPSKitModels" => "https://quantumkithub.github.io/MPSKitModels.jl/stable/", - "Zygote" => "https://fluxml.ai/Zygote.jl/dev/", + # "MPSKitModels" => "https://quantumkithub.github.io/MPSKitModels.jl/", + # "Zygote" => "https://fluxml.ai/Zygote.jl/stable/", "ChainRulesCore" => "https://juliadiff.org/ChainRulesCore.jl/stable/", ) @@ -44,7 +45,9 @@ mathengine = MathJax3( makedocs(; modules=[PEPSKit], sitename="PEPSKit.jl", - format=Documenter.HTML(; prettyurls=get(ENV, "CI", nothing) == "true", mathengine), + format=Documenter.HTML(; + prettyurls=get(ENV, "CI", nothing) == "true", mathengine, size_threshold=1024000 + ), pages=[ "Home" => "index.md", "Manual" => "man/intro.md", diff --git a/src/Defaults.jl b/src/Defaults.jl index 0a123e42c..72189c5c4 100644 --- a/src/Defaults.jl +++ b/src/Defaults.jl @@ -25,7 +25,7 @@ Module containing default algorithm parameter values and arguments. * `svd_fwd_alg=:$(Defaults.svd_fwd_alg)` : SVD algorithm that is used in the forward pass. - `:sdd`: TensorKit's wrapper for LAPACK's `_gesdd` - `:svd`: TensorKit's wrapper for LAPACK's `_gesvd` - - `:iterative`: Iterative SVD only computing the specifed number of singular values and vectors, see [`IterSVD`](@ref) + - `:iterative`: Iterative SVD only computing the specifed number of singular values and vectors, see [`IterSVD`](@ref PEPSKit.IterSVD) * `svd_rrule_tol=$(Defaults.svd_rrule_tol)` : Accuracy of SVD reverse-rule. * `svd_rrule_min_krylovdim=$(Defaults.svd_rrule_min_krylovdim)` : Minimal Krylov dimension of the reverse-rule algorithm (if it is a Krylov algorithm). * `svd_rrule_verbosity=$(Defaults.svd_rrule_verbosity)` : SVD gradient output verbosity. diff --git a/src/utility/util.jl b/src/utility/util.jl index fec2224f0..d87df34e9 100644 --- a/src/utility/util.jl +++ b/src/utility/util.jl @@ -186,12 +186,13 @@ function ChainRulesCore.rrule(::typeof(_setindex), a::AbstractArray, tv, args... return t, _setindex_pullback end +# TODO: link to Zygote.showgrad once they update documenter.jl """ @showtypeofgrad(x) Macro utility to show to type of the gradient that is about to accumulate for `x`. -See also [`Zygote.@showgrad`](@extref). +See also `Zygote.@showgrad`. """ macro showtypeofgrad(x) return :( From 3269746dbc1b6fdce011d963181a059d5d7c5bf9 Mon Sep 17 00:00:00 2001 From: Lukas Devos Date: Thu, 20 Mar 2025 10:54:09 -0400 Subject: [PATCH 005/113] Add notebook generation infrastructure --- docs/make.jl | 4 +++- docs/src/examples/notebook.md | 43 ++++++++++++++++++++++++++++++++++ examples/Project.toml | 2 ++ examples/README.md | 38 ++++++++++++++++++++++++++++++ examples/make.jl | 24 +++++++++++++++++++ examples/notebooks/notebook.jl | 19 +++++++++++++++ 6 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 docs/src/examples/notebook.md create mode 100644 examples/Project.toml create mode 100644 examples/README.md create mode 100644 examples/make.jl create mode 100644 examples/notebooks/notebook.jl diff --git a/docs/make.jl b/docs/make.jl index 5e431fcc5..40fa913ce 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -42,6 +42,8 @@ mathengine = MathJax3( ), ) +examples = ["Notebook Example" => "examples/notebook.md"] + makedocs(; modules=[PEPSKit], sitename="PEPSKit.jl", @@ -51,7 +53,7 @@ makedocs(; pages=[ "Home" => "index.md", "Manual" => "man/intro.md", - "Examples" => "examples/index.md", + "Examples" => examples, "Library" => "lib/lib.md", "References" => "references.md", ], diff --git a/docs/src/examples/notebook.md b/docs/src/examples/notebook.md new file mode 100644 index 000000000..caad41876 --- /dev/null +++ b/docs/src/examples/notebook.md @@ -0,0 +1,43 @@ +```@raw html + + + + + +

Example

This is an example notebook to show that everything is working

+ +
1 + 1
+
2
+
+

Built with Julia 1.11.4 and

+ +
+ + +``` + diff --git a/examples/Project.toml b/examples/Project.toml new file mode 100644 index 000000000..223c37c04 --- /dev/null +++ b/examples/Project.toml @@ -0,0 +1,2 @@ +[deps] +PlutoStaticHTML = "359b1769-a58e-495b-9770-312e911026ad" diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 000000000..1a53cdbca --- /dev/null +++ b/examples/README.md @@ -0,0 +1,38 @@ +# Examples and Tutorials + +This directory contains the source code for the examples and tutorials of this package. +These are written using [Pluto.jl](https://plutojl.org/), and can be run as scripts or through Pluto itself. + +## Building the documentation + +As these examples can take substantial resources to build, they are not included in the automated documentation build. +To build the documentation, you can run the following command: + +```bash +julia examples/make.jl +``` + +This should generate static HTML files in the `docs/examples` directory, which are then included in the documentation pages. +By default, examples that haven't changed since the last build are not re-run. + +Note that Pluto uses its own package management system, which will use the latest registered version of this package. +This ensures the examples are always reproducible by themselves. +Howeer, this also means that when registering a new version of this package, the next step is to re-run the examples to ensure that they are up-to-date, and build a new version of the documentation. + +Alternatively, we can decide to manually keep a local environment for the examples by using `examples/Project.toml` and including the following block: + +```julia +begin + import Pkg + # activate the shared project environment + Pkg.activate(Base.current_project()) + # ensure latest version of PEPSKit is installed + Pkg.dev(joinpath(@__DIR__, "..")) + Pkg.instantiate() + + # other packages + using ... +end +``` + +For more information, see [Pluto.jl's documentation](https://plutojl.org/en/docs/packages-advanced/) diff --git a/examples/make.jl b/examples/make.jl new file mode 100644 index 000000000..0b10b96f6 --- /dev/null +++ b/examples/make.jl @@ -0,0 +1,24 @@ +using Pkg +Pkg.activate(@__DIR__) +Pkg.resolve() +Pkg.instantiate() + +using PlutoStaticHTML + +const NOTEBOOK_DIR = joinpath(@__DIR__, "notebooks") +const OUTPUT_DIR = joinpath(@__DIR__, "..", "docs", "src", "examples") + +@info "Building notebooks in $NOTEBOOK_DIR" +oopts = OutputOptions(; append_build_context=true) +output_format = documenter_output +bopts = BuildOptions(NOTEBOOK_DIR; output_format, previous_dir=OUTPUT_DIR) +build_notebooks(bopts, oopts) + +@info "Copying markdown files" +for file in readdir(NOTEBOOK_DIR) + _, ext = splitext(file) + if ext == ".md" + @debug "Copying $file" + mv(joinpath(NOTEBOOK_DIR, file), joinpath(OUTPUT_DIR, file); force=true) + end +end diff --git a/examples/notebooks/notebook.jl b/examples/notebooks/notebook.jl new file mode 100644 index 000000000..815e60c00 --- /dev/null +++ b/examples/notebooks/notebook.jl @@ -0,0 +1,19 @@ +### A Pluto.jl notebook ### +# v0.20.4 + +using Markdown +using InteractiveUtils + +# ╔═╡ c883b618-0593-11f0-176c-f56c237bc8ed +md""" +# Example + +This is an example notebook to show that everything is working +""" + +# ╔═╡ 85a7b5f7-e5ca-4b36-aaa9-ebc5215c8cbe +1 + 1 + +# ╔═╡ Cell order: +# ╠═c883b618-0593-11f0-176c-f56c237bc8ed +# ╠═85a7b5f7-e5ca-4b36-aaa9-ebc5215c8cbe From 8b23dc0803aeb0461652334e82e6c9bade0893fb Mon Sep 17 00:00:00 2001 From: Lukas Devos Date: Thu, 20 Mar 2025 11:17:22 -0400 Subject: [PATCH 006/113] Add preview docs action Nothing to see here, this definitely worked first attempt - attempt II - attempt III - Attempt whatever - yaml is a great language --- .github/workflows/PR_comment.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/PR_comment.yml diff --git a/.github/workflows/PR_comment.yml b/.github/workflows/PR_comment.yml new file mode 100644 index 000000000..ae43f219c --- /dev/null +++ b/.github/workflows/PR_comment.yml @@ -0,0 +1,17 @@ +name: Docs preview comment +on: + pull_request: + types: [labeled] + +permissions: + pull-requests: write +jobs: + pr_comment: + runs-on: ubuntu-latest + steps: + - name: Create PR comment + if: github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name && github.event.label.name == 'documentation' + uses: thollander/actions-comment-pull-request@v3 + with: + message: 'After the build completes, the updated documentation will be available [here](https://quantumkithub.github.io/PEPSKit.jl/previews/PR${{ github.event.number }}/)' + comment-tag: 'preview-doc' From 0e526b2780d7e22bffce517a9edbbc5e29221c29 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 21 Mar 2025 11:21:48 +0100 Subject: [PATCH 007/113] Add `@extref`s --- docs/make.jl | 1 + src/Defaults.jl | 18 +++++++++--------- .../fixed_point_differentiation.jl | 6 +++--- src/utility/svd.jl | 6 +++--- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 40fa913ce..c9d72de44 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -28,6 +28,7 @@ links = InterLinks( # "MPSKitModels" => "https://quantumkithub.github.io/MPSKitModels.jl/", # "Zygote" => "https://fluxml.ai/Zygote.jl/stable/", "ChainRulesCore" => "https://juliadiff.org/ChainRulesCore.jl/stable/", + "OhMyThreads" => "https://juliafolds2.github.io/OhMyThreads.jl/stable/", ) # explicitly set math engine diff --git a/src/Defaults.jl b/src/Defaults.jl index 72189c5c4..404362cdf 100644 --- a/src/Defaults.jl +++ b/src/Defaults.jl @@ -31,15 +31,15 @@ Module containing default algorithm parameter values and arguments. * `svd_rrule_verbosity=$(Defaults.svd_rrule_verbosity)` : SVD gradient output verbosity. * `svd_rrule_alg=:$(Defaults.svd_rrule_alg)` : Reverse-rule algorithm for the SVD gradient. - `:tsvd`: Uses TensorKit's reverse-rule for `tsvd` which doesn't solve any linear problem and instead requires access to the full SVD, see [TensorKit](https://github.com/Jutho/TensorKit.jl/blob/f9cddcf97f8d001888a26f4dce7408d5c6e2228f/ext/TensorKitChainRulesCoreExt/factorizations.jl#L3) - - `:gmres`: GMRES iterative linear solver, see the [KrylovKit docs](https://jutho.github.io/KrylovKit.jl/stable/man/algorithms/#KrylovKit.GMRES) for details - - `:bicgstab`: BiCGStab iterative linear solver, see the [KrylovKit docs](https://jutho.github.io/KrylovKit.jl/stable/man/algorithms/#KrylovKit.BiCGStab) for details - - `:arnoldi`: Arnoldi Krylov algorithm, see the [KrylovKit docs](https://jutho.github.io/KrylovKit.jl/stable/man/algorithms/#KrylovKit.Arnoldi) for details + - `:gmres`: GMRES iterative linear solver, see [`KrylovKit.GMRES`](@extref) for details + - `:bicgstab`: BiCGStab iterative linear solver, see the [`KrylovKit.GMRES`](@extref) for details + - `:arnoldi`: Arnoldi Krylov algorithm, see the [`KrylovKit.Arnoldi`](@extref) for details ## Projectors * `projector_alg=:$(Defaults.projector_alg)` : Default variant of the CTMRG projector algorithm. - - `halfinfinite`: Projection via SVDs of half-infinite (two enlarged corners) CTMRG environments. - - `fullinfinite`: Projection via SVDs of full-infinite (all four enlarged corners) CTMRG environments. + - `:halfinfinite`: Projection via SVDs of half-infinite (two enlarged corners) CTMRG environments. + - `:fullinfinite`: Projection via SVDs of full-infinite (all four enlarged corners) CTMRG environments. * `projector_verbosity=$(Defaults.projector_verbosity)` : Projector output information verbosity. ## Fixed-point gradient @@ -48,10 +48,10 @@ Module containing default algorithm parameter values and arguments. * `gradient_maxiter=$(Defaults.gradient_maxiter)` : Maximal number of iterations for computing the CTMRG fixed-point gradient. * `gradient_verbosity=$(Defaults.gradient_verbosity)` : Gradient output information verbosity. * `gradient_linsolver=:$(Defaults.gradient_linsolver)` : Default linear solver for the `LinSolver` gradient algorithm. - - `:gmres` : GMRES iterative linear solver, see the [KrylovKit docs](https://jutho.github.io/KrylovKit.jl/stable/man/algorithms/#KrylovKit.GMRES) for details - - `:bicgstab` : BiCGStab iterative linear solver, see the [KrylovKit docs](https://jutho.github.io/KrylovKit.jl/stable/man/algorithms/#KrylovKit.BiCGStab) for details + - `:gmres` : GMRES iterative linear solver, see [`KrylovKit.GMRES`](@extref) for details + - `:bicgstab` : BiCGStab iterative linear solver, see [`KrylovKit.BiCGStab`](@extref) for details * `gradient_eigsolver=:$(Defaults.gradient_eigsolver)` : Default eigensolver for the `EigSolver` gradient algorithm. - - `:arnoldi` : Arnoldi Krylov algorithm, see the [KrylovKit docs](https://jutho.github.io/KrylovKit.jl/stable/man/algorithms/#KrylovKit.Arnoldi) for details + - `:arnoldi` : Arnoldi Krylov algorithm, see [`KrylovKit.Arnoldi`](@extref) for details * `gradient_eigsolver_eager=$(Defaults.gradient_eigsolver_eager)` : Enables `EigSolver` algorithm to finish before the full Krylov dimension is reached. * `gradient_iterscheme=:$(Defaults.gradient_iterscheme)` : Scheme for differentiating one CTMRG iteration. - `:fixed` : the differentiated CTMRG iteration uses a pre-computed SVD with a fixed set of gauges @@ -143,7 +143,7 @@ or equivalently with set_scheduler!(:static; ntasks=4, chunking=true) ``` For a detailed description of all schedulers and their keyword arguments consult the -[`OhMyThreads` documentation](https://juliafolds2.github.io/OhMyThreads.jl/stable/refs/api/#Schedulers). +[`OhMyThreads.Schedulers.Scheduler`](@extref) documentation. If no `scheduler` is passed and only kwargs are provided, the `DynamicScheduler` constructor is used with the provided kwargs. diff --git a/src/algorithms/optimization/fixed_point_differentiation.jl b/src/algorithms/optimization/fixed_point_differentiation.jl index d6243d949..00d7340fa 100644 --- a/src/algorithms/optimization/fixed_point_differentiation.jl +++ b/src/algorithms/optimization/fixed_point_differentiation.jl @@ -132,8 +132,8 @@ problem using iterative solvers. - `:fixed` : the differentiated CTMRG iteration uses a pre-computed SVD with a fixed set of gauges - `:diffgauge` : the differentiated iteration consists of a CTMRG iteration and a subsequent gauge-fixing step such that the gauge-fixing procedure is differentiated as well * `solver_alg::Union{KrylovKit.LinearSolver,NamedTuple}=(; alg::Symbol=:$(Defaults.gradient_linsolver)` : Linear solver algorithm which, if supplied directly as a `KrylovKit.LinearSolver` overrides the above specified `tol`, `maxiter` and `verbosity`. Alternatively, it can be supplied via a `NamedTuple` where `alg` can be one of the following: - - `:gmres` : GMRES iterative linear solver, see the [KrylovKit docs](https://jutho.github.io/KrylovKit.jl/stable/man/algorithms/#KrylovKit.GMRES) for details - - `:bicgstab` : BiCGStab iterative linear solver, see the [KrylovKit docs](https://jutho.github.io/KrylovKit.jl/stable/man/algorithms/#KrylovKit.BiCGStab) for details + - `:gmres` : GMRES iterative linear solver, see [`KrylovKit.GMRES`](@extref) for details + - `:bicgstab` : BiCGStab iterative linear solver, see [`KrylovKit.BiCGStab`](@extref) for details """ struct LinSolver{F} <: GradMode{F} solver_alg::KrylovKit.LinearSolver @@ -158,7 +158,7 @@ problem as an eigenvalue problem. - `:fixed` : the differentiated CTMRG iteration uses a pre-computed SVD with a fixed set of gauges - `:diffgauge` : the differentiated iteration consists of a CTMRG iteration and a subsequent gauge-fixing step such that the gauge-fixing procedure is differentiated as well * `solver_alg::Union{KrylovKit.KrylovAlgorithm,NamedTuple}=(; alg=:$(Defaults.gradient_eigsolver)` : Eigen solver algorithm which, if supplied directly as a `KrylovKit.KrylovAlgorithm` overrides the above specified `tol`, `maxiter` and `verbosity`. Alternatively, it can be supplied via a `NamedTuple` where `alg` can be one of the following: - - `:arnoldi` : Arnoldi Krylov algorithm, see the [KrylovKit docs](https://jutho.github.io/KrylovKit.jl/stable/man/algorithms/#KrylovKit.Arnoldi) for details + - `:arnoldi` : Arnoldi Krylov algorithm, see [`KrylovKit.Arnoldi`](@extref) for details """ struct EigSolver{F} <: GradMode{F} solver_alg::KrylovKit.KrylovAlgorithm diff --git a/src/utility/svd.jl b/src/utility/svd.jl index 61243fdb6..280bb2f77 100644 --- a/src/utility/svd.jl +++ b/src/utility/svd.jl @@ -29,9 +29,9 @@ removes the divergences from the adjoint. - `:iterative`: Iterative SVD only computing the specifed number of singular values and vectors, see [`IterSVD`](@ref) * `rrule_alg::Union{Algorithm,NamedTuple}=(; alg::Symbol=$(Defaults.svd_rrule_alg))`: Reverse-rule algorithm for differentiating the SVD. Can be supplied by an `Algorithm` instance directly or as a `NamedTuple` where `alg` is one of the following: - `:tsvd`: Uses TensorKit's reverse-rule for `tsvd` which doesn't solve any linear problem and instead requires access to the full SVD, see [TensorKit](https://github.com/Jutho/TensorKit.jl/blob/f9cddcf97f8d001888a26f4dce7408d5c6e2228f/ext/TensorKitChainRulesCoreExt/factorizations.jl#L3) - - `:gmres`: GMRES iterative linear solver, see the [KrylovKit docs](https://jutho.github.io/KrylovKit.jl/stable/man/algorithms/#KrylovKit.GMRES) for details - - `:bicgstab`: BiCGStab iterative linear solver, see the [KrylovKit docs](https://jutho.github.io/KrylovKit.jl/stable/man/algorithms/#KrylovKit.BiCGStab) for details - - `:arnoldi`: Arnoldi Krylov algorithm, see the [KrylovKit docs](https://jutho.github.io/KrylovKit.jl/stable/man/algorithms/#KrylovKit.Arnoldi) for details + - `:gmres`: GMRES iterative linear solver, see [`KrylovKit.GMRES`](@extref) for details + - `:bicgstab`: BiCGStab iterative linear solver, see [`KrylovKit.BiCGStab`](@extref) for details + - `:arnoldi`: Arnoldi Krylov algorithm, see [`KrylovKit.Arnoldi`](@extref) for details * `broadening=nothing`: Broadening of singular value differences to stabilize the SVD gradient. Currently not implemented. """ struct SVDAdjoint{F,R,B} From cde7e17f86d671b57c128835f1bfe8d7746c08b3 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 21 Mar 2025 12:25:19 +0100 Subject: [PATCH 008/113] Update docstrings with DocStringExtensions (part 1) --- Project.toml | 2 + src/PEPSKit.jl | 1 + .../contractions/bondenv/als_solve.jl | 18 ++ .../contractions/ctmrg_contractions.jl | 160 +++++++++++------- 4 files changed, 116 insertions(+), 65 deletions(-) diff --git a/Project.toml b/Project.toml index 7b06d2456..03facd61c 100644 --- a/Project.toml +++ b/Project.toml @@ -7,6 +7,7 @@ version = "0.4.2" Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" Compat = "34da2185-b29b-5c13-b0c7-acf172513d20" +DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000" KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" @@ -27,6 +28,7 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" Accessors = "0.1" ChainRulesCore = "1.0" Compat = "3.46, 4.2" +DocStringExtensions = "0.9.3" FiniteDifferences = "0.12" KrylovKit = "0.9.5" LinearAlgebra = "1" diff --git a/src/PEPSKit.jl b/src/PEPSKit.jl index 09004f92b..4c5d3ceb6 100644 --- a/src/PEPSKit.jl +++ b/src/PEPSKit.jl @@ -11,6 +11,7 @@ import MPSKit: leading_boundary, loginit!, logiter!, logfinish!, logcancel! using MPSKitModels using FiniteDifferences using OhMyThreads: tmap +using DocStringExtensions include("Defaults.jl") # Include first to allow for docstring interpolation with Defaults values diff --git a/src/algorithms/contractions/bondenv/als_solve.jl b/src/algorithms/contractions/bondenv/als_solve.jl index 486bb3407..1bc06b9d9 100644 --- a/src/algorithms/contractions/bondenv/als_solve.jl +++ b/src/algorithms/contractions/bondenv/als_solve.jl @@ -4,6 +4,8 @@ the fast full update article Physical Review B 92, 035142 (2015) =# """ +$(SIGNATURES) + Construct the tensor ``` ┌-----------------------------------┐ @@ -26,6 +28,8 @@ function _tensor_Ra( end """ +$(SIGNATURES) + Construct the tensor ``` ┌-----------------------------------┐ @@ -48,6 +52,8 @@ function _tensor_Sa( end """ +$(SIGNATURES) + Construct the tensor ``` ┌-----------------------------------┐ @@ -70,6 +76,8 @@ function _tensor_Rb( end """ +$(SIGNATURES) + Construct the tensor ``` ┌-----------------------------------┐ @@ -92,6 +100,8 @@ function _tensor_Sb( end """ +$(SIGNATURES) + Calculate the inner product ``` ┌--------------------------------┐ @@ -114,6 +124,8 @@ function inner_prod( end """ +$(SIGNATURES) + Calculate the fidelity between two evolution steps ``` |⟨a1,b1|a2,b2⟩|^2 @@ -131,6 +143,8 @@ function fidelity( end """ +$(SIGNATURES) + Contract the axis between `a` and `b` tensors ``` -- DX - a - D - b - DY -- @@ -150,6 +164,8 @@ function _combine_ab( end """ +$(SIGNATURES) + Calculate the cost function ``` f(a,b) = ‖ |a1,b1⟩ - |a2,b2⟩ ‖^2 @@ -166,6 +182,8 @@ function cost_function_als( end """ +$(SIGNATURES) + Solve the equations `Rx x = Sx` (x = a, b) with initial guess `x0` ``` ┌---------------------------┐ diff --git a/src/algorithms/contractions/ctmrg_contractions.jl b/src/algorithms/contractions/ctmrg_contractions.jl index c031f6849..e08c681d1 100644 --- a/src/algorithms/contractions/ctmrg_contractions.jl +++ b/src/algorithms/contractions/ctmrg_contractions.jl @@ -7,8 +7,7 @@ const CTMRGCornerTensor{T,S} = AbstractTensorMap{T,S,1,1} # ---------------------------- """ - enlarge_northwest_corner((row, col), env, network::InfiniteSquareNetwork{O}) - enlarge_northwest_corner(E_west, C_northwest, E_north, A::O) +$(SIGNATURES) Contract the enlarged northwest corner of the CTMRG environment, either by specifying the coordinates, environments and network, or by directly providing the tensors. @@ -44,8 +43,7 @@ function enlarge_northwest_corner( end """ - enlarge_northeast_corner((row, col), env, network::InfiniteSquareNetwork{O}) - enlarge_northeast_corner(E_north, C_northeast, E_east, A::O) +$(SIGNATURES) Contract the enlarged northeast corner of the CTMRG environment, either by specifying the coordinates, environments and network, or by directly providing the tensors. @@ -81,8 +79,7 @@ function enlarge_northeast_corner( end """ - enlarge_southeast_corner((row, col), env, network::InfiniteSquareNetwork{O}) - enlarge_southeast_corner(E_east, C_southeast, E_south, A::O) +$(SIGNATURES) Contract the enlarged southeast corner of the CTMRG environment, either by specifying the coordinates, environments and network, or by directly providing the tensors. @@ -118,8 +115,7 @@ function enlarge_southeast_corner( end """ - enlarge_southwest_corner((row, col), env, network::InfiniteSquareNetwork{O}) - enlarge_southwest_corner(E_south, C_southwest, E_west, A::O) +$(SIGNATURES) Contract the enlarged southwest corner of the CTMRG environment, either by specifying the coordinates, environments and network, or by directly providing the tensors. @@ -158,7 +154,7 @@ end # ---------------------- """ - left_projector(E_1, C, E_2, V, isqS, A) +$(SIGNATURES) Contract the CTMRG left projector with the higher-dimensional subspace facing to the left. @@ -190,7 +186,7 @@ function left_projector(E_1, C, E_2, V, isqS, A::PFTensor) end """ - right_projector(E_1, C, E_2, U, isqS, A) +$(SIGNATURES) Contract the CTMRG right projector with the higher-dimensional subspace facing to the right. @@ -222,7 +218,7 @@ function right_projector(E_1, C, E_2, U, isqS, A::PFTensor) end """ - contract_projectors(U, S, V, Q, Q_next) +$(SIGNATURES) Compute projectors based on a SVD of `Q * Q_next`, where the inverse square root `isqS` of the singular values is computed. @@ -249,10 +245,10 @@ function contract_projectors(U, S, V, Q, Q_next) end """ - half_infinite_environment(quadrant1::AbstractTensorMap{T,S,3,3}, quadrant2::AbstractTensorMap{T,S,N,N}) - half_infinite_environment(C_1, C_2, E_1, E_2, E_3, E_4, A_1::P, A_2::P) - half_infinite_environment(C_1, C_2, E_1, E_2, E_3, E_4, x, A_1::P, A_2::P) - half_infinite_environment(x, C_1, C_2, E_1, E_2, E_3, E_4, A_1::P, A_2::P) + half_infinite_environment(quadrant1, quadrant2) + half_infinite_environment(C_1, C_2, E_1, E_2, E_3, E_4, A_1, A_2) + half_infinite_environment(C_1, C_2, E_1, E_2, E_3, E_4, x, A_1, A_2) + half_infinite_environment(x, C_1, C_2, E_1, E_2, E_3, E_4, A_1, A_2) Contract two quadrants (enlarged corners) to form a half-infinite environment. @@ -380,18 +376,11 @@ function half_infinite_environment( end """ - full_infinite_environment( - quadrant1::T, quadrant2::T, quadrant3::T, quadrant4::T - ) where {T<:AbstractTensorMap{<:Number,<:ElementarySpace,N,N}} - function full_infinite_environment( - half1::T, half2::T - ) where {T<:AbstractTensorMap{<:Number,<:ElementarySpace,N,N}} - full_infinite_environment(C_1, C_2, C_3, C_4, E_1, E_2, E_3, E_4, E_5, E_6, E_7, E_8, - A_1::P, A_2::P, A_3::P, A_4::P) - full_infinite_environment(C_1, C_2, E_1, E_2, E_3, E_4, x, - A_1::P, A_2::P, A_3::P, A_4::P) - full_infinite_environment(x, C_1, C_2, E_1, E_2, E_3, E_4, - A_1::P, A_2::P, A_3::P, A_4::P) + full_infinite_environment(quadrant1, quadrant2, quadrant3, quadrant4) + full_infinite_environment(half1, half2) + full_infinite_environment(C_1, C_2, C_3, C_4, E_1, E_2, E_3, E_4, E_5, E_6, E_7, E_8, A_1, A_2, A_3, A_4) + full_infinite_environment(C_1, C_2, E_1, E_2, E_3, E_4, x, A_1, A_2, A_3, A_4) + full_infinite_environment(x, C_1, C_2, E_1, E_2, E_3, E_4, A_1, A_2, A_3, A_4) Contract four quadrants (enlarged corners) to form a full-infinite environment. @@ -740,8 +729,7 @@ end # corners """ - renormalize_corner(quadrant::AbstractTensorMap{T,S,3,3}, P_left, P_right) - renormalize_corner(quadrant::AbstractTensorMap{T,S,2,2}, P_left, P_right) +$(SIGNATURES) Apply projectors to each side of a quadrant. @@ -782,11 +770,21 @@ Apply projectors to each side of a quadrant. end """ - renormalize_northwest_corner((row, col), enlarged_env::CTMRGEnv, P_left, P_right) - renormalize_northwest_corner(quadrant::AbstractTensorMap{T,S,N,N}, P_left, P_right) where {T,S,N} - renormalize_northwest_corner(E_west, C_northwest, E_north, P_left, P_right, A::O) + renormalize_northwest_corner((row, col), enlarged_env, P_left, P_right) + renormalize_northwest_corner(quadrant, P_left, P_right) + renormalize_northwest_corner(E_west, C_northwest, E_north, P_left, P_right, A) Apply `renormalize_corner` to the enlarged northwest corner. + +``` + |~~~~~~~~| -- |~~~~~~| + |quadrant| |P_left| -- + |~~~~~~~~| -- |~~~~~~| + | | + [P_right] + | +``` + Alternatively, provide the constituent tensors and perform the complete contraction. ``` @@ -835,11 +833,21 @@ function renormalize_northwest_corner( end """ - renormalize_northeast_corner((row, col), enlarged_env::CTMRGEnv, P_left, P_right) - renormalize_northeast_corner(quadrant::AbstractTensorMap{T,S,N,N}, P_left, P_right) where {T,S,N} - renormalize_northeast_corner(E_north, C_northeast, E_east, P_left, P_right, A::O) + renormalize_northeast_corner((row, col), enlarged_env, P_left, P_right) + renormalize_northeast_corner(quadrant, P_left, P_right) + renormalize_northeast_corner(E_north, C_northeast, E_east, P_left, P_right, A) Apply `renormalize_corner` to the enlarged northeast corner. + +``` + |~~~~~~~| -- |~~~~~~~~| + -- |P_right| |quadrant| + |~~~~~~~| -- |~~~~~~~~| + | | + [P_left] + | +``` + Alternatively, provide the constituent tensors and perform the complete contraction. ``` @@ -890,11 +898,21 @@ function renormalize_northeast_corner( end """ - renormalize_southeast_corner((row, col), enlarged_env::CTMRGEnv, P_left, P_right) - renormalize_southeast_corner(quadrant::AbstractTensorMap{T,S,N,N}, P_left, P_right) where {T,S,N} - renormalize_southeast_corner(E_east, C_southeast, E_south, P_left, P_right, A::O) + renormalize_southeast_corner((row, col), enlarged_env, P_left, P_right) + renormalize_southeast_corner(quadrant, P_left, P_right) + renormalize_southeast_corner(E_east, C_southeast, E_south, P_left, P_right, A) Apply `renormalize_corner` to the enlarged southeast corner. + +``` + | + [P_right] + | | + |~~~~~~| -- |~~~~~~~~| + -- |P_left| |quadrant| + |~~~~~~| -- |~~~~~~~~| +``` + Alternatively, provide the constituent tensors and perform the complete contraction. ``` @@ -943,20 +961,30 @@ function renormalize_southeast_corner( end """ - renormalize_southwest_corner((row, col), enlarged_env::CTMRGEnv, P_left, P_right) - renormalize_southwest_corner(quadrant::AbstractTensorMap{T,S,N,N}, P_left, P_right) where {T,S,N} - renormalize_southwest_corner(E_south, C_southwest, E_west, P_left, P_right, A::O) + renormalize_southwest_corner((row, col), enlarged_env, P_left, P_right) + renormalize_southwest_corner(quadrant, P_left, P_right) + renormalize_southwest_corner(E_south, C_southwest, E_west, P_left, P_right, A) Apply `renormalize_corner` to the enlarged southwest corner. + +``` + | + [P_left] + | | + |~~~~~~~~| -- |~~~~~~| + |quadrant| |P_left| -- + |~~~~~~~~| -- |~~~~~~| +``` + Alternatively, provide the constituent tensors and perform the complete contraction. ``` | - [~~~~P_right~~~~~] + [~~~~~P_left~~~~~] | | - E_west -- A -- |~~~~~~| - | | |P_left| -- - C_southwest -- E_south -- |~~~~~~| + E_west -- A -- |~~~~~~~| + | | |P_right| -- + C_southwest -- E_south -- |~~~~~~~| ``` """ function renormalize_southwest_corner((row, col), enlarged_env, P_left, P_right) @@ -997,6 +1025,7 @@ end """ renormalize_bottom_corner((r, c), env, projectors) + renormalize_bottom_corner(C_southwest, E_south, P_bottom) Apply bottom projector to southwest corner and south edge. ``` @@ -1036,7 +1065,8 @@ end end """ - renormalize_top_corner((row, col), env::CTMRGEnv, projectors) + renormalize_top_corner((row, col), env, projectors) + renormalize_top_corner(C_northwest, E_north, P_top) Apply top projector to northwest corner and north edge. ``` @@ -1260,7 +1290,7 @@ end # corners """ - fix_gauge_corner(corner, σ_in, σ_out) +$(SIGNATURES) Multiply corner tensor with incoming and outgoing gauge signs. @@ -1279,7 +1309,7 @@ function fix_gauge_corner( end """ - fix_gauge_northwest_corner((row, col), env, signs) +$(SIGNATURES) Apply `fix_gauge_corner` to the northwest corner with appropriate row and column indices. """ @@ -1292,7 +1322,7 @@ function fix_gauge_northwest_corner((row, col), env::CTMRGEnv, signs) end """ - fix_gauge_northeast_corner((row, col), env, signs) +$(SIGNATURES) Apply `fix_gauge_corner` to the northeast corner with appropriate row and column indices. """ @@ -1305,7 +1335,7 @@ function fix_gauge_northeast_corner((row, col), env::CTMRGEnv, signs) end """ - fix_gauge_southeast_corner((row, col), env, signs) +$(SIGNATURES) Apply `fix_gauge_corner` to the southeast corner with appropriate row and column indices. """ @@ -1318,7 +1348,7 @@ function fix_gauge_southeast_corner((row, col), env::CTMRGEnv, signs) end """ - fix_gauge_southwest_corner((row, col), env, signs) +$(SIGNATURES) Apply `fix_gauge_corner` to the southwest corner with appropriate row and column indices. """ @@ -1333,7 +1363,7 @@ end # edges """ - fix_gauge_edge(edge, σ_in, σ_out) +$(SIGNATURES) Multiply edge tensor with incoming and outgoing gauge signs. @@ -1361,7 +1391,7 @@ Multiply edge tensor with incoming and outgoing gauge signs. end """ - fix_gauge_north_edge((row, col), env, signs) +$(SIGNATURES) Apply `fix_gauge_edge` to the north edge with appropriate row and column indices. """ @@ -1374,7 +1404,7 @@ function fix_gauge_north_edge((row, col), env::CTMRGEnv, signs) end """ - fix_gauge_east_edge((row, col), env, signs) +$(SIGNATURES) Apply `fix_gauge_edge` to the east edge with appropriate row and column indices. """ @@ -1385,7 +1415,7 @@ function fix_gauge_east_edge((row, col), env::CTMRGEnv, signs) end """ - fix_gauge_south_edge((row, col), env, signs) +$(SIGNATURES) Apply `fix_gauge_edge` to the south edge with appropriate row and column indices. """ @@ -1398,7 +1428,7 @@ function fix_gauge_south_edge((row, col), env::CTMRGEnv, signs) end """ - fix_gauge_south_edge((row, col), env, signs) +$(SIGNATURES) Apply `fix_gauge_edge` to the west edge with appropriate row and column indices. """ @@ -1411,7 +1441,7 @@ end # left singular vectors """ - fix_gauge_north_left_vecs((row, col), U, signs) +$(SIGNATURES) Multiply north left singular vectors with gauge signs from the right. """ @@ -1420,7 +1450,7 @@ function fix_gauge_north_left_vecs((row, col), U, signs) end """ - fix_gauge_east_left_vecs((row, col), U, signs) +$(SIGNATURES) Multiply east left singular vectors with gauge signs from the right. """ @@ -1429,7 +1459,7 @@ function fix_gauge_east_left_vecs((row, col), U, signs) end """ - fix_gauge_south_left_vecs((row, col), U, signs) +$(SIGNATURES) Multiply south left singular vectors with gauge signs from the right. """ @@ -1438,7 +1468,7 @@ function fix_gauge_south_left_vecs((row, col), U, signs) end """ - fix_gauge_west_left_vecs((row, col), U, signs) +$(SIGNATURES) Multiply west left singular vectors with gauge signs from the right. """ @@ -1449,7 +1479,7 @@ end # right singular vectors """ - fix_gauge_north_right_vecs((row, col), V, signs) +$(SIGNATURES) Multiply north right singular vectors with gauge signs from the left. """ @@ -1458,7 +1488,7 @@ function fix_gauge_north_right_vecs((row, col), V, signs) end """ - fix_gauge_east_right_vecs((row, col), V, signs) +$(SIGNATURES) Multiply east right singular vectors with gauge signs from the left. """ @@ -1467,7 +1497,7 @@ function fix_gauge_east_right_vecs((row, col), V, signs) end """ - fix_gauge_south_right_vecs((row, col), V, signs) +$(SIGNATURES) Multiply south right singular vectors with gauge signs from the left. """ @@ -1476,7 +1506,7 @@ function fix_gauge_south_right_vecs((row, col), V, signs) end """ - fix_gauge_west((row, col), V, signs) +$(SIGNATURES) Multiply west right singular vectors with gauge signs from the left. """ @@ -1675,7 +1705,7 @@ function _pepo_domain_projector_expr( end # -# Contractions +# PEPO Contractions # ## Site contraction From 800a5c681f71e34bb2e66d86da903bebe40240cc Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 21 Mar 2025 14:55:48 +0100 Subject: [PATCH 009/113] Fix sparse left_and_right_projector call error --- src/algorithms/ctmrg/sparse_environments.jl | 33 ++++++++++----------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/algorithms/ctmrg/sparse_environments.jl b/src/algorithms/ctmrg/sparse_environments.jl index bf0f8d70f..0a5077149 100644 --- a/src/algorithms/ctmrg/sparse_environments.jl +++ b/src/algorithms/ctmrg/sparse_environments.jl @@ -3,9 +3,17 @@ # -------------------------------------------------------- """ - struct EnlargedCorner{TC,TE,TA} +$(TYPEDEF) Enlarged CTMRG corner tensor storage. + +## Constructors + + EnlargedCorner(network::InfiniteSquareNetwork, env, coordinates) + +Construct an enlarged corner with the correct row and column indices based on the given +`coordinates` which are of the form `(dir, row, col)`. + """ struct EnlargedCorner{TC,TE,TA} C::TC @@ -13,13 +21,6 @@ struct EnlargedCorner{TC,TE,TA} E_2::TE A::TA end - -""" - EnlargedCorner(network::InfiniteSquareNetwork, env, coordinates) - -Construct an enlarged corner with the correct row and column indices based on the given -`coordinates` which are of the form `(dir, row, col)`. -""" function EnlargedCorner(network::InfiniteSquareNetwork, env, coordinates) dir, r, c = coordinates if dir == NORTHWEST @@ -54,7 +55,7 @@ function EnlargedCorner(network::InfiniteSquareNetwork, env, coordinates) end """ - TensorKit.TensorMap(Q::EnlargedCorner, dir::Int) +$(TYPEDSIGNATURES) Instantiate enlarged corner as `TensorMap` where `dir` selects the correct contraction direction, i.e. the way the environment and PEPS tensors connect. @@ -92,10 +93,8 @@ end # Compute left and right projectors sparsely without constructing enlarged corners explicitly function left_and_right_projector(U, S, V, Q::EnlargedCorner, Q_next::EnlargedCorner) isqS = sdiag_pow(S, -0.5) - P_left = left_projector(Q.E_1, Q.C, Q.E_2, V, isqS, Q.ket, Q.bra) - P_right = right_projector( - Q_next.E_1, Q_next.C, Q_next.E_2, U, isqS, Q_next.ket, Q_next.bra - ) + P_left = left_projector(Q.E_1, Q.C, Q.E_2, V, isqS, Q.A) + P_right = right_projector(Q_next.E_1, Q_next.C, Q_next.E_2, U, isqS, Q_next.A) return P_left, P_right end @@ -104,7 +103,7 @@ end # -------------------------------- """ - struct HalfInfiniteEnv{C,E,A,A′} +$(TYPEDEF) Half-infinite CTMRG environment tensor storage. """ @@ -134,7 +133,7 @@ function HalfInfiniteEnv(quadrant1::EnlargedCorner, quadrant2::EnlargedCorner) end """ - TensorKit.TensorMap(env::HalfInfiniteEnv) +$(TYPEDSIGNATURES) Instantiate half-infinite environment as `TensorMap` explicitly. """ @@ -183,7 +182,7 @@ end # -------------------------------- """ - struct FullInfiniteEnv{TC,TE,TA} +$(TYPEDEF) Full-infinite CTMRG environment tensor storage. """ @@ -231,7 +230,7 @@ function FullInfiniteEnv( end """ - TensorKit.TensorMap(env::FullInfiniteEnv) +$(TYPEDSIGNATURES) Instantiate full-infinite environment as `TensorMap` explicitly. """ From 41ebbc63d8ab7ca5e3ef18051715813bfa489150 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 21 Mar 2025 15:29:07 +0100 Subject: [PATCH 010/113] Update docstrings with DocStringExtensions (part 2) --- src/algorithms/contractions/localoperator.jl | 12 +++- src/algorithms/ctmrg/ctmrg.jl | 48 +++++++++++---- src/algorithms/ctmrg/gaugefix.jl | 12 +++- src/algorithms/ctmrg/projectors.jl | 34 ++++++++--- src/algorithms/ctmrg/sequential.jl | 14 +++-- src/algorithms/ctmrg/simultaneous.jl | 14 +++-- src/algorithms/ctmrg/sparse_environments.jl | 25 ++++++-- .../fixed_point_differentiation.jl | 59 +++++++++++++++---- .../optimization/peps_optimization.jl | 27 +++++---- src/operators/localoperator.jl | 30 ++++------ 10 files changed, 199 insertions(+), 76 deletions(-) diff --git a/src/algorithms/contractions/localoperator.jl b/src/algorithms/contractions/localoperator.jl index 3889819d6..c04cb8443 100644 --- a/src/algorithms/contractions/localoperator.jl +++ b/src/algorithms/contractions/localoperator.jl @@ -19,9 +19,13 @@ virtuallabel(args...) = tensorlabel(:D, args...) physicallabel(args...) = tensorlabel(:d, args...) """ - contract_local_operator(inds, O, peps, env) +$(SIGNATURES) Contract a local operator `O` on the PEPS `peps` at the indices `inds` using the environment `env`. + +This works by generating the appropriate contraction on a rectangular patch with its corners +specified by `inds`. The `peps` is contracted with `O` from above and below, and the PEPS-operator +sandwich is surrounded with the appropriate environment tensors. """ function contract_local_operator( inds::NTuple{N,CartesianIndex{2}}, @@ -214,9 +218,13 @@ end end """ - contract_local_norm(inds, peps, env) +$(SIGNATURES) Contract a local norm of the PEPS `peps` around indices `inds`. + +This works analogously to [`contract_local_operator`](@ref) by generating the contraction +on a rectangular patch based on `inds` but replacing the operator with an identity such +that the PEPS norm is computed. (Note that this is not the physical norm of the state.) """ function contract_local_norm( inds::NTuple{N,CartesianIndex{2}}, ket::InfinitePEPS, bra::InfinitePEPS, env::CTMRGEnv diff --git a/src/algorithms/ctmrg/ctmrg.jl b/src/algorithms/ctmrg/ctmrg.jl index 8fcceff10..43a9eb9fc 100644 --- a/src/algorithms/ctmrg/ctmrg.jl +++ b/src/algorithms/ctmrg/ctmrg.jl @@ -1,5 +1,5 @@ """ - CTMRGAlgorithm +$(TYPEDEF) Abstract super type for the corner transfer matrix renormalization group (CTMRG) algorithm for contracting infinite PEPS. @@ -8,6 +8,11 @@ abstract type CTMRGAlgorithm end const CTMRG_SYMBOLS = IdDict{Symbol,Type{<:CTMRGAlgorithm}}() +""" + CTMRGAlgorithm(; kwargs...) + +Keyword argument parser returning the appropriate `CTMRGAlgorithm` algorithm struct. +""" function CTMRGAlgorithm(; alg=Defaults.ctmrg_alg, tol=Defaults.ctmrg_tol, @@ -74,8 +79,29 @@ supplied via the keyword arguments or directly as an [`CTMRGAlgorithm`](@ref) st - `:truncbelow` : Additionally supply singular value cutoff `η`; truncate such that every retained singular value is larger than `η` * `svd_alg::Union{<:SVDAdjoint,NamedTuple}` : SVD algorithm for computing projectors. See also [`SVDAdjoint`](@ref). By default, a reverse-rule tolerance of `tol=1e1tol` where the `krylovdim` is adapted to the `env₀` environment dimension. * `projector_alg::Symbol=:$(Defaults.projector_alg)` : Variant of the projector algorithm. See also [`ProjectorAlgorithm`](@ref). - - `halfinfinite`: Projection via SVDs of half-infinite (two enlarged corners) CTMRG environments. - - `fullinfinite`: Projection via SVDs of full-infinite (all four enlarged corners) CTMRG environments. + - `:halfinfinite` : Projection via SVDs of half-infinite (two enlarged corners) CTMRG environments. + - `:fullinfinite` : Projection via SVDs of full-infinite (all four enlarged corners) CTMRG environments. + +## Return values + +The CTMRG routine returns the final CTMRG environment as well as an information `NamedTuple` +containing the following fields: + +* `truncation_error` : Last (maximal) SVD truncation error of the CTMRG projectors. +* `condition_number` : Last (maximal) condition number of the enlarged CTMRG environment + +In case the `alg` is a `SimultaneousCTMRG`, the last SVD will also be returned: + +* `U` : Last unit cell of left singular vectors. +* `S` : Last unit cell of singular values. +* `V` : Last unit cell of right singular vectors. + +If, in addition, the specified SVD algorithm computes the full, untruncated SVD, the full +set of vectors and values will be returned as well: + +* `U_full` : Last unit cell of all left singular vectors. +* `S_full` : Last unit cell of all singular values. +* `V_full` : Last unit cell of all right singular vectors. """ function leading_boundary(env₀::CTMRGEnv, network::InfiniteSquareNetwork; kwargs...) alg = select_algorithm(leading_boundary, env₀; kwargs...) @@ -134,13 +160,15 @@ end @non_differentiable ctmrg_logfinish!(args...) @non_differentiable ctmrg_logcancel!(args...) -#= -In order to compute an error measure, we compare the singular values of the current iteration with the previous one. -However, when the virtual spaces change, this comparison is not directly possible. -Instead, we project both tensors into the smaller space and then compare the difference. +# TODO: we might want to consider embedding the smaller tensor into the larger space and then compute the difference +""" + _singular_value_distance((S₁, S₂)) -TODO: we might want to consider embedding the smaller tensor into the larger space and then compute the difference -=# +Compute the singular value distance as an error measure, e.g. for CTMRG iterations. +To that end, the singular values of the current iteration `S₁` are compared with the +previous one `S₂`. When the virtual spaces change, this comparison is not directly possible +such that both tensors are projected into the smaller space and then subtracted. +""" function _singular_value_distance((S₁, S₂)) V₁ = space(S₁, 1) V₂ = space(S₂, 1) @@ -156,7 +184,7 @@ end """ calc_convergence(env, CS_old, TS_old) - calc_convergence(env_new::CTMRGEnv, env_old::CTMRGEnv) + calc_convergence(env_new, env_old) Given a new environment `env`, compute the maximal singular value distance. This determined either from the previous corner and edge singular values diff --git a/src/algorithms/ctmrg/gaugefix.jl b/src/algorithms/ctmrg/gaugefix.jl index 96d783393..af9eec742 100644 --- a/src/algorithms/ctmrg/gaugefix.jl +++ b/src/algorithms/ctmrg/gaugefix.jl @@ -1,5 +1,5 @@ """ - gauge_fix(envprev::CTMRGEnv{C,T}, envfinal::CTMRGEnv{C,T}) where {C,T} +$(SIGNATURES) Fix the gauge of `envfinal` based on the previous environment `envprev`. This assumes that the `envfinal` is the result of one CTMRG iteration on `envprev`. @@ -139,7 +139,13 @@ function fix_relative_phases( return U_fixed, V_fixed end -# Fix global phases of corners and edges via dot product (to ensure compatibility with symm. tensors) +""" +$(SIGNATURES) + +Fix global multiplicative phase of the environment tensors. To that end, the dot products +between all corners and all edges are computed to obtain the global phase which is then +divided out. +""" function fix_global_phases(envprev::CTMRGEnv, envfix::CTMRGEnv) cornersgfix = map(zip(envprev.corners, envfix.corners)) do (Cprev, Cfix) φ = dot(Cprev, Cfix) @@ -156,7 +162,7 @@ end calc_elementwise_convergence(envfinal, envfix; atol=1e-6) Check if the element-wise difference of the corner and edge tensors of the final and fixed -CTMRG environments are below some tolerance. +CTMRG environments are below `atol` and return the maximal difference. """ function calc_elementwise_convergence(envfinal::CTMRGEnv, envfix::CTMRGEnv; atol::Real=1e-6) ΔC = envfinal.corners .- envfix.corners diff --git a/src/algorithms/ctmrg/projectors.jl b/src/algorithms/ctmrg/projectors.jl index 8c02868a4..0a79fa7e5 100644 --- a/src/algorithms/ctmrg/projectors.jl +++ b/src/algorithms/ctmrg/projectors.jl @@ -1,5 +1,5 @@ """ - ProjectorAlgorithm +$(TYPEDEF) Abstract super type for all CTMRG projector algorithms. """ @@ -7,6 +7,11 @@ abstract type ProjectorAlgorithm end const PROJECTOR_SYMBOLS = IdDict{Symbol,Type{<:ProjectorAlgorithm}}() +""" + ProjectorAlgorithm(; kwargs...) + +Keyword argument parser returning the appropriate `ProjectorAlgorithm` algorithm struct. +""" function ProjectorAlgorithm(; alg=Defaults.projector_alg, svd_alg=(;), @@ -74,13 +79,19 @@ function truncation_scheme(alg::ProjectorAlgorithm, edge) end """ - struct HalfInfiniteProjector{S,T} <: ProjectorAlgorithm - HalfInfiniteProjector(; kwargs...) - +$(TYPEDEF) Projector algorithm implementing projectors from SVDing the half-infinite CTMRG environment. -## Keyword arguments +## Fields + +$(TYPEDFIELDS) + +## Constructors + + HalfInfiniteProjector(; kwargs...) + +Construct the half-infinite projector algorithm based on the following keyword arguments: * `svd_alg::Union{<:SVDAdjoint,NamedTuple}=SVDAdjoint()` : SVD algorithm including the reverse rule. See [`SVDAdjoint`](@ref). * `trscheme::Union{TruncationScheme,NamedTuple}=(; alg::Symbol=:$(Defaults.trscheme))` : Truncation scheme for the projector computation, which controls the resulting virtual spaces. Here, `alg` can be one of the following: @@ -106,12 +117,19 @@ end PROJECTOR_SYMBOLS[:halfinfinite] = HalfInfiniteProjector """ - struct FullInfiniteProjector{S,T} <: ProjectorAlgorithm - FullInfiniteProjector(; kwargs...) +$(TYPEDEF) Projector algorithm implementing projectors from SVDing the full 4x4 CTMRG environment. -## Keyword arguments +## Fields + +$(TYPEDFIELDS) + +## Constructors + + FullInfiniteProjector(; kwargs...) + +Construct the full-infinite projector algorithm based on the following keyword arguments: * `svd_alg::Union{<:SVDAdjoint,NamedTuple}=SVDAdjoint()` : SVD algorithm including the reverse rule. See [`SVDAdjoint`](@ref). * `trscheme::Union{TruncationScheme,NamedTuple}=(; alg::Symbol=:$(Defaults.trscheme))` : Truncation scheme for the projector computation, which controls the resulting virtual spaces. Here, `alg` can be one of the following: diff --git a/src/algorithms/ctmrg/sequential.jl b/src/algorithms/ctmrg/sequential.jl index 649dffb89..ef36f6868 100644 --- a/src/algorithms/ctmrg/sequential.jl +++ b/src/algorithms/ctmrg/sequential.jl @@ -1,13 +1,19 @@ """ struct SequentialCTMRG <: CTMRGAlgorithm - SequentialCTMRG(; kwargs...) CTMRG algorithm where the expansions and renormalization is performed sequentially column-wise. This is implemented as a growing and projecting step to the left, followed by a clockwise rotation (performed four times). -## Keyword arguments +## Fields + +$(TYPEDFIELDS) + +## Constructors + + SequentialCTMRG(; kwargs...) +Construct a sequential CTMRG algorithm struct based on keyword arguments. For a full description, see [`leading_boundary`](@ref). The supported keywords are: * `tol::Real=$(Defaults.ctmrg_tol)` @@ -32,7 +38,7 @@ end CTMRG_SYMBOLS[:sequential] = SequentialCTMRG """ - ctmrg_leftmove(col::Int, network, env::CTMRGEnv, alg::SequentialCTMRG) +$(TYPEDSIGNATURES) Perform sequential CTMRG left move on the `col`-th column. """ @@ -110,7 +116,7 @@ function sequential_projectors( end """ - renormalize_sequentially(col::Int, projectors, network, env) +$(TYPEDSIGNATURES) Renormalize one column of the CTMRG environment. """ diff --git a/src/algorithms/ctmrg/simultaneous.jl b/src/algorithms/ctmrg/simultaneous.jl index 6bb0e64ea..76a37bffe 100644 --- a/src/algorithms/ctmrg/simultaneous.jl +++ b/src/algorithms/ctmrg/simultaneous.jl @@ -1,12 +1,18 @@ """ - struct SimultaneousCTMRG <: CTMRGAlgorithm - SimultaneousCTMRG(; kwargs...) +$(TYPEDEF) CTMRG algorithm where all sides are grown and renormalized at the same time. In particular, the projectors are applied to the corners from two sides simultaneously. -## Keyword arguments +## Fields + +$(TYPEDFIELDS) + +## Constructors + + SimultaneousCTMRG(; kwargs...) +Construct a simultaneous CTMRG algorithm struct based on keyword arguments. For a full description, see [`leading_boundary`](@ref). The supported keywords are: * `tol::Real=$(Defaults.ctmrg_tol)` @@ -99,7 +105,7 @@ function simultaneous_projectors( end """ - renormalize_simultaneously(enlarged_corners, projectors, network, env) +$(SIGNATURES) Renormalize all enlarged corners and edges simultaneously. """ diff --git a/src/algorithms/ctmrg/sparse_environments.jl b/src/algorithms/ctmrg/sparse_environments.jl index 0a5077149..f45b7f429 100644 --- a/src/algorithms/ctmrg/sparse_environments.jl +++ b/src/algorithms/ctmrg/sparse_environments.jl @@ -106,6 +106,16 @@ end $(TYPEDEF) Half-infinite CTMRG environment tensor storage. + +## Fields + +$(FIELDS) + +## Constructors + + HalfInfiniteEnv(quadrant1::EnlargedCorner, quadrant2::EnlargedCorner) + +Construct sparse half-infinite environment based on two sparse enlarged corners (quadrants). """ struct HalfInfiniteEnv{TC,TE,TA} # TODO: subtype as AbstractTensorMap once TensorKit is updated C_1::TC @@ -117,8 +127,6 @@ struct HalfInfiniteEnv{TC,TE,TA} # TODO: subtype as AbstractTensorMap once Tens A_1::TA A_2::TA end - -# Construct environment from two enlarged corners function HalfInfiniteEnv(quadrant1::EnlargedCorner, quadrant2::EnlargedCorner) return HalfInfiniteEnv( quadrant1.C, @@ -185,6 +193,17 @@ end $(TYPEDEF) Full-infinite CTMRG environment tensor storage. + +## Fields + +$(FIELDS) + +## Constructors + FullInfiniteEnv( + quadrant1::E, quadrant2::E, quadrant3::E, quadrant4::E + ) where {E<:EnlargedCorner} + +Construct sparse full-infinite environment based on four sparse enlarged corners (quadrants). """ struct FullInfiniteEnv{TC,TE,TA} # TODO: subtype as AbstractTensorMap once TensorKit is updated C_1::TC @@ -204,8 +223,6 @@ struct FullInfiniteEnv{TC,TE,TA} # TODO: subtype as AbstractTensorMap once Tens A_3::TA A_4::TA end - -# Construct environment from two enlarged corners function FullInfiniteEnv( quadrant1::E, quadrant2::E, quadrant3::E, quadrant4::E ) where {E<:EnlargedCorner} diff --git a/src/algorithms/optimization/fixed_point_differentiation.jl b/src/algorithms/optimization/fixed_point_differentiation.jl index 00d7340fa..6eaf9e64b 100644 --- a/src/algorithms/optimization/fixed_point_differentiation.jl +++ b/src/algorithms/optimization/fixed_point_differentiation.jl @@ -8,6 +8,11 @@ const EIGSOLVER_SOLVER_SYMBOLS = IdDict{Symbol,Type{<:KrylovKit.KrylovAlgorithm} :arnoldi => Arnoldi ) +""" + GradMode(; kwargs...) + +Keyword argument parser returning the appropriate `GradMode` algorithm struct. +""" function GradMode(; alg=Defaults.gradient_alg, tol=Defaults.gradient_tol, @@ -63,12 +68,19 @@ end iterscheme(::GradMode{F}) where {F} = F """ - struct GeomSum <: GradMode{iterscheme} - GeomSum(; kwargs...) +$(TYPEDEF) Gradient mode for CTMRG using explicit evaluation of the geometric sum. -## Keyword arguments +## Fields + +$(TYPEDFIELDS) + +## Constructor + + GeomSum(; kwargs...) + +Construct the `GeomSum` algorithm struct based on the following keyword arguments: * `tol::Real=$(Defaults.gradient_tol)` : Convergence tolerance for the difference of norms of two consecutive summands in the geometric sum. * `maxiter::Int=$(Defaults.gradient_maxiter)` : Maximal number of gradient iterations. @@ -90,12 +102,19 @@ GeomSum(; kwargs...) = GradMode(; alg=:geomsum, kwargs...) GRADIENT_MODE_SYMBOLS[:geomsum] = GeomSum """ - struct ManualIter <: GradMode{iterscheme} - ManualIter(; kwargs...) +$(TYPEDEF) Gradient mode for CTMRG using manual iteration to solve the linear problem. -## Keyword arguments +## Fields + +$(TYPEDFIELDS) + +## Constructors + + ManualIter(; kwargs...) + +Construct the `ManualIter` algorithm struct based on the following keyword arguments: * `tol::Real=$(Defaults.gradient_tol)` : Convergence tolerance for the norm difference of two consecutive `dx` contributions. * `maxiter::Int=$(Defaults.gradient_maxiter)` : Maximal number of gradient iterations. @@ -117,13 +136,20 @@ ManualIter(; kwargs...) = GradMode(; alg=:manualiter, kwargs...) GRADIENT_MODE_SYMBOLS[:manualiter] = ManualIter """ - struct LinSolver <: GradMode{iterscheme} - LinSolver(; kwargs...) +$(TYPEDEF) Gradient mode wrapper around `KrylovKit.LinearSolver` for solving the gradient linear problem using iterative solvers. -## Keyword arguments +## Fields + +$(TYPEDFIELDS) + +## Constructors + + LinSolver(; kwargs...) + +Construct the `LinSolver` algorithm struct based on the following keyword arguments: * `tol::Real=$(Defaults.gradient_tol)` : Convergence tolerance of the linear solver. * `maxiter::Int=$(Defaults.gradient_maxiter)` : Maximal number of solver iterations. @@ -143,13 +169,20 @@ LinSolver(; kwargs...) = GradMode(; alg=:linsolver, kwargs...) GRADIENT_MODE_SYMBOLS[:linsolver] = LinSolver """ - struct EigSolver <: GradMode{iterscheme} - EigSolver(; kwargs...) +$(TYPEDEF) Gradient mode wrapper around `KrylovKit.KrylovAlgorithm` for solving the gradient linear problem as an eigenvalue problem. -## Keyword arguments +## Fields + +$(TYPEDFIELDS) + +## Constructors + + EigSolver(; kwargs...) + +Construct the `EigSolver` algorithm struct based on the following keyword arguments: * `tol::Real=$(Defaults.gradient_tol)` : Convergence tolerance of the eigen solver. * `maxiter::Int=$(Defaults.gradient_maxiter)` : Maximal number of solver iterations. @@ -279,7 +312,7 @@ end @doc """ fpgrad(∂F∂x, ∂f∂x, ∂f∂A, y0, alg) -Compute the gradient of the cost function for CTMRG by solving the following equation: +Compute the gradient of the CTMRG fixed point by solving the following equation: dx = ∑ₙ (∂f∂x)ⁿ ∂f∂A dA = (1 - ∂f∂x)⁻¹ ∂f∂A dA diff --git a/src/algorithms/optimization/peps_optimization.jl b/src/algorithms/optimization/peps_optimization.jl index 8ddc88a18..0f6e5c025 100644 --- a/src/algorithms/optimization/peps_optimization.jl +++ b/src/algorithms/optimization/peps_optimization.jl @@ -1,16 +1,24 @@ """ - struct PEPSOptimize{G} - PEPSOptimize(; kwargs...) +$(TYPEDEF) Algorithm struct for PEPS ground-state optimization using AD. See [`fixedpoint`](@ref) for details. -## Keyword arguments +## Fields -* `boundary_alg::Union{NamedTuple,<:CTMRGAlgorithm}` : Supply boundary algorithm parameters using either a `NamedTuple` of keyword arguments or a `CTMRGAlgorithm` directly. See [`leading_boundary`](@ref) for a description of all possible keyword arguments. -* `gradient_alg::Union{NamedTuple,Nothing,<:GradMode}` : Supply gradient algorithm parameters using either a `NamedTuple` of keyword arguments, `nothing`, or a `GradMode` directly. See [`fixedpoint`](@ref) for a description of all possible keyword arguments. -* `optimizer_alg::Union{NamedTuple,<:OptimKit.OptimizationAlgorithm}` : Supply optimizer algorithm parameters using either a `NamedTuple` of keyword arguments, or a `OptimKit.OptimizationAlgorithm` directly. See [`fixedpoint`](@ref) for a description of all possible keyword arguments. -* `reuse_env::Bool=$(Defaults.reuse_env)` : If `true`, the current optimization step is initialized on the previous environment, otherwise a random environment is used. -* `symmetrization::Union{Nothing,SymmetrizationStyle}=nothing` : Accepts `nothing` or a `SymmetrizationStyle`, in which case the PEPS and PEPS gradient are symmetrized after each optimization iteration. +$(TYPEDFIELDS) + +## Constructors + + PEPSOptimize(; kwargs...) + +Construct a PEPS optimization algorithm struct based on keyword arguments. +For a full description, see [`fixedpoint`](@ref). The supported keywords are: + +* `boundary_alg::Union{NamedTuple,<:CTMRGAlgorithm}` +* `gradient_alg::Union{NamedTuple,Nothing,<:GradMode}` +* `optimizer_alg::Union{NamedTuple,<:OptimKit.OptimizationAlgorithm}` +* `reuse_env::Bool=$(Defaults.reuse_env)` +* `symmetrization::Union{Nothing,SymmetrizationStyle}=nothing` """ struct PEPSOptimize{G} boundary_alg::CTMRGAlgorithm @@ -95,8 +103,7 @@ end """ fixedpoint(operator, peps₀::InfinitePEPS, env₀::CTMRGEnv; kwargs...) # expert version: - fixedpoint(operator, peps₀::InfinitePEPS, env₀::CTMRGEnv, alg::PEPSOptimize; - finalize!=OptimKit._finalize!) + fixedpoint(operator, peps₀::InfinitePEPS, env₀::CTMRGEnv, alg::PEPSOptimize; finalize!=OptimKit._finalize!) Find the fixed point of `operator` (i.e. the ground state) starting from `peps₀` according to the supplied optimization parameters. The initial environment `env₀` serves as an diff --git a/src/operators/localoperator.jl b/src/operators/localoperator.jl index fd520cc2f..5605b1bdc 100644 --- a/src/operators/localoperator.jl +++ b/src/operators/localoperator.jl @@ -1,22 +1,22 @@ # Hamiltonian consisting of local terms # ------------------------------------- """ - struct LocalOperator{T<:Tuple,S} +$(TYPEDEF) A sum of local operators acting on a lattice. The lattice is stored as a matrix of vector spaces, and the terms are stored as a tuple of pairs of indices and operators. -# Fields +## Fields - `lattice::Matrix{S}`: The lattice on which the operator acts. - `terms::T`: The terms of the operator, stored as a tuple of pairs of indices and operators. -# Constructors +## Constructors LocalOperator(lattice::Matrix{S}, terms::Pair...) LocalOperator{T,S}(lattice::Matrix{S}, terms::T) where {T,S} # expert mode -# Examples +## Examples ```julia lattice = fill(ℂ^2, 1, 1) # single-site unitcell @@ -113,9 +113,7 @@ Base.:-(O1::LocalOperator, O2::LocalOperator) = O1 + (-O2) # ---------------------- """ - _mirror_antidiag_site( - site::S, (Nrow, Ncol)::NTuple{2,Int} - ) where {S<:Union{CartesianIndex{2},NTuple{2,Int}}} +$(SIGNATURES) Get the position of `site` after reflection about the anti-diagonal line. """ @@ -127,9 +125,7 @@ function _mirror_antidiag_site( end """ - _rotr90_site( - site::S, (Nrow, Ncol)::NTuple{2,Int} - ) where {S<:Union{CartesianIndex{2},NTuple{2,Int}}} +$(SIGNATURES) Get the position of `site` after clockwise (right) rotation by 90 degrees. """ @@ -141,9 +137,7 @@ function _rotr90_site( end """ - _rotl90_site( - site::S, (Nrow, Ncol)::NTuple{2,Int} - ) where {S<:Union{CartesianIndex{2},NTuple{2,Int}}} +$(SIGNATURES) Get the position of `site` after counter-clockwise (left) rotation by 90 degrees. """ @@ -155,9 +149,7 @@ function _rotl90_site( end """ - _rot180_site( - site::S, (Nrow, Ncol)::NTuple{2,Int} - ) where {S<:Union{CartesianIndex{2},NTuple{2,Int}}} +$(SIGNATURES) Get the position of `site` after rotation by 180 degrees. """ @@ -169,7 +161,7 @@ function _rot180_site( end """ - mirror_antidiag(H::LocalOperator) +$(TYPEDSIGNATURES) Mirror a `LocalOperator` across the anti-diagonal axis of its lattice. """ @@ -235,6 +227,8 @@ TensorKit.sectortype(::Type{<:LocalOperator{T,S}}) where {T,S} = sectortype(S) end """ +$(SIGNATURES) + Fuse identities on auxiliary physical spaces into a given operator. """ function _fuse_ids(op::AbstractTensorMap{T,S,N,N}, Ps::NTuple{N,S}) where {T,S,N} @@ -247,7 +241,7 @@ function _fuse_ids(op::AbstractTensorMap{T,S,N,N}, Ps::NTuple{N,S}) where {T,S,N end """ - MPSKit.add_physical_charge(H::LocalOperator, charges::AbstractMatrix{<:Sector}) where {S} +$(TYPEDSIGNATURES) Change the spaces of a `LocalOperator` by fusing in an auxiliary charge on every site, according to a given matrix of 'auxiliary' physical charges. From 4fbc1ffa8990e9dbab704c96d9af2ee22d9cbc9f Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 21 Mar 2025 17:47:51 +0100 Subject: [PATCH 011/113] Correct SVD naming convention --- src/utility/util.jl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/utility/util.jl b/src/utility/util.jl index d87df34e9..545235ba4 100644 --- a/src/utility/util.jl +++ b/src/utility/util.jl @@ -28,7 +28,7 @@ end # iterator over each coordinates """ - eachcoordinate(x, dirs=1:4) + eachcoordinate(x, [dirs=1:4]) Enumerate all (dir, row, col) pairs. """ @@ -89,17 +89,17 @@ function ChainRulesCore.rrule( end """ - absorb_s(u::AbstractTensorMap, s::DiagonalTensorMap, vh::AbstractTensorMap) + absorb_s(U::AbstractTensorMap, S::DiagonalTensorMap, V::AbstractTensorMap) -Given `tsvd` result `u`, `s` and `vh`, absorb singular values `s` into `u` and `vh` by: +Given `tsvd` result `U`, `S` and `V`, absorb singular values `S` into `U` and `V` by: ``` - u -> u * sqrt(s), vh -> sqrt(s) * vh + U -> U * sqrt(S), V -> sqrt(S) * V ``` """ -function absorb_s(u::AbstractTensorMap, s::DiagonalTensorMap, vh::AbstractTensorMap) - @assert !isdual(space(s, 1)) - sqrt_s = sdiag_pow(s, 0.5) - return u * sqrt_s, sqrt_s * vh +function absorb_s(U::AbstractTensorMap, S::DiagonalTensorMap, V::AbstractTensorMap) + @assert !isdual(space(S, 1)) + sqrt_S = sdiag_pow(S, 0.5) + return U * sqrt_S, sqrt_S * V end # Check whether diagonals contain degenerate values up to absolute or relative tolerance From ff9bd15690eaa25be7de0459b52a1c28c3aa9720 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 21 Mar 2025 17:57:06 +0100 Subject: [PATCH 012/113] Update docstrings with DocStringExtensions (part 3) --- src/algorithms/ctmrg/ctmrg.jl | 4 +- src/algorithms/ctmrg/sequential.jl | 4 +- src/algorithms/ctmrg/sparse_environments.jl | 6 +- .../optimization/peps_optimization.jl | 12 ++-- src/algorithms/time_evolution/evoltools.jl | 13 +++- src/algorithms/time_evolution/simpleupdate.jl | 17 +++-- src/algorithms/truncation/bond_truncation.jl | 22 ++++-- .../truncation/fullenv_truncation.jl | 39 ++++++++--- .../truncation/truncationschemes.jl | 9 ++- src/environments/ctmrg_environments.jl | 35 +++++++--- src/networks/infinitesquarenetwork.jl | 6 +- src/networks/tensors.jl | 4 +- src/operators/infinitepepo.jl | 19 ++++-- src/operators/lattices/squarelattice.jl | 12 +++- src/operators/localoperator.jl | 4 +- src/operators/models.jl | 8 +-- src/states/infinitepartitionfunction.jl | 18 ++++- src/states/infinitepeps.jl | 25 +++++-- src/states/infiniteweightpeps.jl | 68 +++++++++++-------- src/utility/diffable_threads.jl | 2 +- src/utility/retractions.jl | 4 +- src/utility/rotations.jl | 2 +- src/utility/svd.jl | 57 ++++++++++------ src/utility/symmetrization.jl | 8 +-- 24 files changed, 273 insertions(+), 125 deletions(-) diff --git a/src/algorithms/ctmrg/ctmrg.jl b/src/algorithms/ctmrg/ctmrg.jl index 43a9eb9fc..0c688f3be 100644 --- a/src/algorithms/ctmrg/ctmrg.jl +++ b/src/algorithms/ctmrg/ctmrg.jl @@ -44,7 +44,7 @@ Perform a single CTMRG iteration in which all directions are being grown and ren function ctmrg_iteration(network, env, alg::CTMRGAlgorithm) end """ - leading_boundary(env₀, network; kwargs...) + leading_boundary(env₀, network; kwargs...) -> env, info # expert version: leading_boundary(env₀, network, alg::CTMRGAlgorithm) @@ -88,7 +88,7 @@ The CTMRG routine returns the final CTMRG environment as well as an information containing the following fields: * `truncation_error` : Last (maximal) SVD truncation error of the CTMRG projectors. -* `condition_number` : Last (maximal) condition number of the enlarged CTMRG environment +* `condition_number` : Last (maximal) condition number of the enlarged CTMRG environment. In case the `alg` is a `SimultaneousCTMRG`, the last SVD will also be returned: diff --git a/src/algorithms/ctmrg/sequential.jl b/src/algorithms/ctmrg/sequential.jl index ef36f6868..6925192f4 100644 --- a/src/algorithms/ctmrg/sequential.jl +++ b/src/algorithms/ctmrg/sequential.jl @@ -38,7 +38,7 @@ end CTMRG_SYMBOLS[:sequential] = SequentialCTMRG """ -$(TYPEDSIGNATURES) + ctmrg_leftmove(col::Int, network, env::CTMRGEnv, alg::SequentialCTMRG) Perform sequential CTMRG left move on the `col`-th column. """ @@ -116,7 +116,7 @@ function sequential_projectors( end """ -$(TYPEDSIGNATURES) + renormalize_sequentially(col::Int, projectors, network, env) Renormalize one column of the CTMRG environment. """ diff --git a/src/algorithms/ctmrg/sparse_environments.jl b/src/algorithms/ctmrg/sparse_environments.jl index f45b7f429..2601aaec2 100644 --- a/src/algorithms/ctmrg/sparse_environments.jl +++ b/src/algorithms/ctmrg/sparse_environments.jl @@ -55,7 +55,7 @@ function EnlargedCorner(network::InfiniteSquareNetwork, env, coordinates) end """ -$(TYPEDSIGNATURES) + TensorMap(Q::EnlargedCorner, dir::Int) Instantiate enlarged corner as `TensorMap` where `dir` selects the correct contraction direction, i.e. the way the environment and PEPS tensors connect. @@ -141,7 +141,7 @@ function HalfInfiniteEnv(quadrant1::EnlargedCorner, quadrant2::EnlargedCorner) end """ -$(TYPEDSIGNATURES) + TensorMap(env::HalfInfiniteEnv) Instantiate half-infinite environment as `TensorMap` explicitly. """ @@ -247,7 +247,7 @@ function FullInfiniteEnv( end """ -$(TYPEDSIGNATURES) + TensorMap(env::FullInfiniteEnv) Instantiate full-infinite environment as `TensorMap` explicitly. """ diff --git a/src/algorithms/optimization/peps_optimization.jl b/src/algorithms/optimization/peps_optimization.jl index 0f6e5c025..35a1094d1 100644 --- a/src/algorithms/optimization/peps_optimization.jl +++ b/src/algorithms/optimization/peps_optimization.jl @@ -101,7 +101,7 @@ function _OptimizationAlgorithm(; end """ - fixedpoint(operator, peps₀::InfinitePEPS, env₀::CTMRGEnv; kwargs...) + fixedpoint(operator, peps₀::InfinitePEPS, env₀::CTMRGEnv; kwargs...) -> peps_final, env_final, cost_final, info # expert version: fixedpoint(operator, peps₀::InfinitePEPS, env₀::CTMRGEnv, alg::PEPSOptimize; finalize!=OptimKit._finalize!) @@ -231,7 +231,7 @@ function fixedpoint( peps₀ = peps_normalize(peps₀) # optimize operator cost function - (peps_final, env_final), cost, ∂cost, numfg, convergence_history = optimize( + (peps_final, env_final), cost_final, ∂cost, numfg, convergence_history = optimize( (peps₀, env₀), alg.optimizer_alg; retract, @@ -271,7 +271,7 @@ function fixedpoint( gradnorms_unitcell, times, ) - return peps_final, env_final, cost, info + return peps_final, env_final, cost_final, info end """ @@ -286,7 +286,7 @@ function peps_normalize(A::InfinitePEPS) end """ - peps_retract(x, η, α) +$(SIGNATURES) Performs a norm-preserving retraction of an infinite PEPS `A = x[1]` along `η` with step size `α`, giving a new PEPS `A´`, @@ -311,7 +311,7 @@ function peps_retract(x, η, α) end """ - peps_transport!(ξ, x, η, α, x′) +$(SIGNATURES) Transports a direction at `A = x[1]` to a valid direction at `A´ = x´[1]` corresponding to the norm-preserving retraction of `A` along `η` with step size `α`. In particular, starting @@ -340,7 +340,7 @@ end real_inner(_, η₁, η₂) = real(dot(η₁, η₂)) """ - symmetrize_retract_and_finalize!(symm::SymmetrizationStyle) + symmetrize_retract_and_finalize!(symm::SymmetrizationStyle, [retract, finalize!]) Return the `retract` and `finalize!` function for symmetrizing the `peps` and `grad` tensors. """ diff --git a/src/algorithms/time_evolution/evoltools.jl b/src/algorithms/time_evolution/evoltools.jl index 6ff3e8487..4f00148fb 100644 --- a/src/algorithms/time_evolution/evoltools.jl +++ b/src/algorithms/time_evolution/evoltools.jl @@ -13,7 +13,12 @@ function get_gate(dt::Float64, H::LocalOperator) end """ - is_equivalent(bond1::NTuple{2,CartesianIndex{2}}, bond2::NTuple{2,CartesianIndex{2}}, (Nrow, Ncol)::NTuple{2,Int}) + is_equivalent( + bond1::NTuple{2,CartesianIndex{2}}, + bond2::NTuple{2,CartesianIndex{2}}, + (Nrow, Ncol)::NTuple{2,Int}, + ) + Check if two 2-site bonds are related by a (periodic) lattice translation. """ @@ -51,6 +56,8 @@ function get_gateterm(gate::LocalOperator, bond::NTuple{2,CartesianIndex{2}}) end """ +$(SIGNATURES) + Use QR decomposition on two tensors connected by a bond to get the reduced tensors ``` @@ -81,6 +88,8 @@ function _qr_bond(A::PEPSTensor, B::PEPSTensor) end """ +$(SIGNATURES) + Reconstruct the tensors connected by a bond from their QR results obtained from `_qr_bond` ``` @@ -98,6 +107,8 @@ function _qr_bond_undo(X::PEPSOrth, a::AbstractTensorMap, b::AbstractTensorMap, end """ +$(SIGNATURES) + Apply 2-site `gate` on the reduced matrices `a`, `b` ``` -1← a -← 3 -← b ← -4 diff --git a/src/algorithms/time_evolution/simpleupdate.jl b/src/algorithms/time_evolution/simpleupdate.jl index d27fd91ea..9dfcc31f6 100644 --- a/src/algorithms/time_evolution/simpleupdate.jl +++ b/src/algorithms/time_evolution/simpleupdate.jl @@ -1,8 +1,12 @@ """ - struct SimpleUpdate +$(TYPEDEF) Algorithm struct for simple update (SU) of infinite PEPS with bond weights. Each SU run is converged when the singular value difference becomes smaller than `tol`. + +## Fields + +$(TYPEDFIELDS) """ struct SimpleUpdate dt::Float64 @@ -13,8 +17,7 @@ end # TODO: add kwarg constructor and SU Defaults """ -_su_bondx!(row::Int, col::Int, gate::AbstractTensorMap{T,S,2,2}, - peps::InfiniteWeightPEPS, alg::SimpleUpdate) where {S<:ElementarySpace} +$(SIGNATURES) Simple update of the x-bond `peps.weights[1,r,c]`. @@ -114,10 +117,10 @@ function su_iter( end """ - simpleupdate(peps::InfiniteWeightPEPS, ham::LocalOperator, alg::SimpleUpdate; + simpleupdate(peps::InfiniteWeightPEPS, H::LocalOperator, alg::SimpleUpdate; bipartite::Bool=false, check_interval::Int=500) -Perform simple update with nearest neighbor Hamiltonian `ham`, where the evolution +Perform simple update with nearest neighbor Hamiltonian `H`, where the evolution information is printed every `check_interval` steps. If `bipartite == true` (for square lattice), a unit cell size of `(2, 2)` is assumed, @@ -126,7 +129,7 @@ as well as tensors and x/y weights which are the same across the diagonals, i.e. """ function simpleupdate( peps::InfiniteWeightPEPS, - ham::LocalOperator, + H::LocalOperator, alg::SimpleUpdate; bipartite::Bool=false, check_interval::Int=500, @@ -137,7 +140,7 @@ function simpleupdate( @assert Nr == Nc == 2 end # exponentiating the 2-site Hamiltonian gate - gate = get_gate(alg.dt, ham) + gate = get_gate(alg.dt, H) wtdiff = 1.0 wts0 = deepcopy(peps.weights) for count in 1:(alg.maxiter) diff --git a/src/algorithms/truncation/bond_truncation.jl b/src/algorithms/truncation/bond_truncation.jl index 0d32973c9..40f413074 100644 --- a/src/algorithms/truncation/bond_truncation.jl +++ b/src/algorithms/truncation/bond_truncation.jl @@ -1,12 +1,22 @@ """ - ALSTruncation +$(TYPEDEF) Algorithm struct for the alternating least square (ALS) optimization of a bond. -- `trscheme::Bool`: SVD truncation scheme when initilizing the truncated tensors connected by the bond. -- `maxiter::Int`: Maximal number of ALS iterations. -- `tol::Float64`: ALS converges when fidelity change between two FET iterations is smaller than `tol`. -- `check_interval::Int`: Set number of iterations to print information. Output is suppressed when `check_interval <= 0`. +## Fields + +$(TYPEDFIELDS) + +## Constructors + + ALSTruncation(; kwargs...) + +The truncation algorithm can be constructed from the following keyword arguments: + +* `trscheme::TensorKit.TruncationScheme`: SVD truncation scheme when initilizing the truncated tensors connected by the bond. +* `maxiter::Int=50` : Maximal number of ALS iterations. +* `tol::Float64=1e-15` : ALS converges when fidelity change between two FET iterations is smaller than `tol`. +* `check_interval::Int=0` : Set number of iterations to print information. Output is suppressed when `check_interval <= 0`. """ @kwdef struct ALSTruncation trscheme::TensorKit.TruncationScheme @@ -29,7 +39,7 @@ function _als_message( end """ - bond_truncate(a::AbstractTensorMap{T,S,2,1}, b::AbstractTensorMap{T,S,1,2}, benv::BondEnv{T,S}, alg) where {T<:Number,S<:ElementarySpace} + bond_truncate(a::AbstractTensorMap{T,S,2,1}, b::AbstractTensorMap{T,S,1,2}, benv::BondEnv{T,S}, alg) -> U, S, V, info After time-evolving the reduced tensors `a` and `b` connected by a bond, truncate the bond dimension using the bond environment tensor `benv`. diff --git a/src/algorithms/truncation/fullenv_truncation.jl b/src/algorithms/truncation/fullenv_truncation.jl index 6c107bbab..7ec10f296 100644 --- a/src/algorithms/truncation/fullenv_truncation.jl +++ b/src/algorithms/truncation/fullenv_truncation.jl @@ -1,13 +1,23 @@ """ - FullEnvTruncation +$(TYPEDEF) Algorithm struct for the full environment truncation (FET). -- `trscheme::Bool`: SVD truncation scheme when optimizing the new bond matrix. -- `maxiter::Int`: Maximal number of FET iterations. -- `tol::Float64`: FET converges when fidelity change between two FET iterations is smaller than `tol`. -- `trunc_init::Bool`: Controls whether the initialization of the new bond matrix is obtained from truncated SVD of the old bond matrix. -- `check_interval::Int`: Set number of iterations to print information. Output is suppressed when `check_interval <= 0`. +## Fields + +$(TYPEDFIELDS) + +## Constructors + + FullEnvTruncation(; kwargs...) + +The truncation algorithm can be constructed from the following keyword arguments: + +* `trscheme::TensorKit.TruncationScheme` : SVD truncation scheme when optimizing the new bond matrix. +* `maxiter::Int=50` : Maximal number of FET iterations. +* `tol::Float64=1e-15` : FET converges when fidelity change between two FET iterations is smaller than `tol`. +* `trunc_init::Bool=true` : Controls whether the initialization of the new bond matrix is obtained from truncated SVD of the old bond matrix. +* `check_interval::Int=0` : Set number of iterations to print information. Output is suppressed when `check_interval <= 0`. """ @kwdef struct FullEnvTruncation trscheme::TensorKit.TruncationScheme @@ -18,6 +28,8 @@ Algorithm struct for the full environment truncation (FET). end """ +$(SIGNATURES) + Given the bond environment `benv`, calculate the inner product between two states specified by the bond matrices `b1`, `b2` ``` @@ -38,6 +50,8 @@ function inner_prod( end """ +$(SIGNATURES) + Given the bond environment `benv`, calculate the fidelity between two states specified by the bond matrices `b1`, `b2` ``` @@ -52,6 +66,8 @@ function fidelity( end """ +$(SIGNATURES) + Apply a twist to domain or codomain indices that correspond to dual spaces """ function _linearmap_twist!(t::AbstractTensorMap) @@ -72,7 +88,7 @@ function _fet_message( end """ - fullenv_truncate(benv::BondEnv{T,S}, b0::AbstractTensorMap{T,S,1,1}, alg::FullEnvTruncation) where {T<:Number,S<:ElementarySpace} + fullenv_truncate(benv::BondEnv{T,S}, b0::AbstractTensorMap{T,S,1,1}, alg::FullEnvTruncation) -> U, S, V, info The full environment truncation algorithm (Physical Review B 98, 085155 (2018)). @@ -190,9 +206,14 @@ Then the bond matrix `u s v†` is updated by SVD: - l ← v† - ==> - u ← s ← v† - ``` -## Returns +## Return values + +Returns the SVD result of the new bond matrix `U`, `S`, `V`, as well as an information +`NamedTuple` containing the following fields: -The SVD result of the new bond matrix `u`, `s`, `vh`. +* `fid` : Last fidelity. +* `Δfid` : Last fidelity difference. +* `Δs` : Last singular value difference. """ function fullenv_truncate( b0::AbstractTensorMap{T,S,1,1}, benv::BondEnv{T,S}, alg::FullEnvTruncation diff --git a/src/algorithms/truncation/truncationschemes.jl b/src/algorithms/truncation/truncationschemes.jl index dfd7a3400..be311ecdd 100644 --- a/src/algorithms/truncation/truncationschemes.jl +++ b/src/algorithms/truncation/truncationschemes.jl @@ -1,5 +1,5 @@ """ - struct FixedSpaceTruncation <: TensorKit.TruncationScheme +$(TYPEDEF) CTMRG specific truncation scheme for `tsvd` which keeps the bond space on which the SVD is performed fixed. Since different environment directions and unit cell entries might @@ -15,7 +15,12 @@ const TRUNCATION_SCHEME_SYMBOLS = IdDict{Symbol,Type{<:TruncationScheme}}( :truncspace => TensorKit.TruncationSpace, :truncbelow => TensorKit.TruncationCutoff, ) -# Should be TruncationScheme but piracy + +""" + _TruncationScheme(; kwargs...) + +Keyword argument parser returning the appropriate `TruncationScheme` algorithm struct. +""" function _TruncationScheme(; alg=Defaults.trscheme, η=nothing) # replace Symbol with TruncationScheme type haskey(TRUNCATION_SCHEME_SYMBOLS, alg) || diff --git a/src/environments/ctmrg_environments.jl b/src/environments/ctmrg_environments.jl index 4d7620c61..422956f88 100644 --- a/src/environments/ctmrg_environments.jl +++ b/src/environments/ctmrg_environments.jl @@ -1,5 +1,5 @@ """ - struct CTMRGEnv{C,T} +$(TYPEDEF) Corner transfer-matrix environment containing unit-cell arrays of corner and edge tensors. The last two indices of the arrays correspond to the row and column indices of the unit @@ -20,9 +20,25 @@ Here `P` represents an effective local constituent tensor. This can either be a rank-4 tensor, a pair of PEPS tensors, or a stack of PEPS-PEPO-PEPS tensors depending on the network being contracted. -# Fields -- `corners::Array{C,3}`: Array of corner tensors. -- `edges::Array{T,3}`: Array of edge tensors. +## Fields + +$(TYPEDFIELDS) + +## Constructors + + CTMRGEnv( + [f=randn, T=ComplexF64], Ds_north::A, Ds_east::A, chis_north::B, [chis_east::B], [chis_south::B], [chis_west::B] + ) where {A<:AbstractMatrix{<:SpaceLike}, B<:AbstractMatrix{<:ElementarySpaceLike}} + CTMRGEnv( + [f=randn, T=ComplexF64], D_north::P, D_east::P, chi_north::S, [chi_east::S], [chi_south::S], [chi_west::S]; + unitcell::Tuple{Int,Int}=(1, 1), + ) where {P<:ProductSpaceLike,S<:ElementarySpaceLike} + CTMRGEnv( + [f=randn, T=ComplexF64], network::InfiniteSquareNetwork, chis_north::A, [chis_east::A], [chis_south::A], [chis_west::A] + ) where {A<:AbstractMatrix{<:ElementarySpaceLike}}} + CTMRGEnv( + [f=randn, T=ComplexF64,] network::InfiniteSquareNetwork, chi_north::S, [chi_east::S], [chi_south::S], [chi_west::S], + ) where {S<:ElementarySpaceLike} """ struct CTMRGEnv{C,T} corners::Array{C,3} @@ -58,7 +74,7 @@ end """ CTMRGEnv( - [f=randn, ComplexF64], Ds_north::A, Ds_east::A, chis_north::B, [chis_east::B], [chis_south::B], [chis_west::B] + [f=randn, T=ComplexF64], Ds_north::A, Ds_east::A, chis_north::B, [chis_east::B], [chis_south::B], [chis_west::B] ) where {A<:AbstractMatrix{<:SpaceLike}, B<:AbstractMatrix{<:ElementarySpaceLike}} Construct a CTMRG environment by specifying matrices of north and east virtual spaces of the @@ -158,7 +174,8 @@ end """ CTMRGEnv( - [f=randn, ComplexF64], D_north::P, D_east::P, chi_north::S, [chi_east::S], [chi_south::S], [chi_west::S]; unitcell::Tuple{Int,Int}=(1, 1), + [f=randn, T=ComplexF64], D_north::P, D_east::P, chi_north::S, [chi_east::S], [chi_south::S], [chi_west::S]; + unitcell::Tuple{Int,Int}=(1, 1), ) where {P<:ProductSpaceLike,S<:ElementarySpaceLike} Construct a CTMRG environment by specifying the north and east virtual spaces of the @@ -178,7 +195,7 @@ function CTMRGEnv( chi_south::S=chi_north, chi_west::S=chi_north; unitcell::Tuple{Int,Int}=(1, 1), -) where {P<:ProductSpaceLike,S<:Union{Int,ElementarySpace}} +) where {P<:ProductSpaceLike,S<:ElementarySpaceLike} return CTMRGEnv( randn, ComplexF64, @@ -200,7 +217,7 @@ function CTMRGEnv( chi_south::S=chi_north, chi_west::S=chi_north; unitcell::Tuple{Int,Int}=(1, 1), -) where {P<:ProductSpaceLike,S<:Union{Int,ElementarySpace}} +) where {P<:ProductSpaceLike,S<:ElementarySpaceLike} return CTMRGEnv( f, T, @@ -283,7 +300,7 @@ end """ CTMRGEnv( - peps::InfiniteSquareNetwork, chi_north::S, [chi_east::S], [chi_south::S], [chi_west::S], + [f=randn, T=ComplexF64,] network::InfiniteSquareNetwork, chi_north::S, [chi_east::S], [chi_south::S], [chi_west::S], ) where {S<:ElementarySpaceLike} Construct a CTMRG environment by specifying a corresponding diff --git a/src/networks/infinitesquarenetwork.jl b/src/networks/infinitesquarenetwork.jl index 503688eac..ac7f14312 100644 --- a/src/networks/infinitesquarenetwork.jl +++ b/src/networks/infinitesquarenetwork.jl @@ -1,7 +1,11 @@ """ - InfiniteSquareNetwork{O} +$(TYPEDEF) Contractible square network. Wraps a matrix of 'rank-4-tensor-like' objects. + +## Fields + +$(TYPEDFIELDS) """ struct InfiniteSquareNetwork{O} A::Matrix{O} diff --git a/src/networks/tensors.jl b/src/networks/tensors.jl index 7a597dfba..813cc5303 100644 --- a/src/networks/tensors.jl +++ b/src/networks/tensors.jl @@ -57,9 +57,7 @@ const PEPSTensor{S<:ElementarySpace} = AbstractTensorMap{<:Any,S,1,4} """ PEPSTensor(f, ::Type{T}, Pspace::S, Nspace::S, - [Espace::S], [Sspace::S], [Wspace::S]) where {T,S<:ElementarySpace} - PEPSTensor(f, ::Type{T}, Pspace::Int, Nspace::Int, - [Espace::Int], [Sspace::Int], [Wspace::Int]) where {T} + [Espace::S], [Sspace::S], [Wspace::S]) where {T,S<:Union{Int,ElementarySpace}} Construct a PEPS tensor based on the physical, north, east, west and south spaces. Alternatively, only the space dimensions can be provided and ℂ is assumed as the field. diff --git a/src/operators/infinitepepo.jl b/src/operators/infinitepepo.jl index d8cb2766b..66568ca6e 100644 --- a/src/operators/infinitepepo.jl +++ b/src/operators/infinitepepo.jl @@ -2,6 +2,17 @@ struct InfinitePEPO{T<:PEPOTensor} Represents an infinite projected entangled-pair operator (PEPO) on a 3D cubic lattice. + +## Fields + +$(TYPEDFIELDS) + +## Constructors + + InfinitePEPO(A::AbstractArray{T, 3}) + InfinitePEPO([f=randn, T=ComplexF64,] Pspaces, Nspaces, Espaces) + InfinitePEPO(A::PEPOTensor; unitcell=(1, 1, 1)) + InfinitePEPO([f=randn, T=ComplexF64,] Pspace::S, Nspace::S, [Espace::S]; unitcell=(1,1,1)) where {S<:ElementarySpace} """ struct InfinitePEPO{T<:PEPOTensor} A::Array{T,3} @@ -39,7 +50,7 @@ function InfinitePEPO(A::AbstractArray{T,3}) where {T<:PEPOTensor} end """ - InfinitePEPO(f=randn, T=ComplexF64, Pspaces, Nspaces, Espaces) + InfinitePEPO([f=randn, T=ComplexF64,] Pspaces, Nspaces, Espaces) Allow users to pass in arrays of spaces. """ @@ -79,16 +90,16 @@ function InfinitePEPO( end """ - InfinitePEPO(A; unitcell=(1, 1, 1)) + InfinitePEPO(A::PEPOTensor; unitcell=(1, 1, 1)) -Create an InfinitePEPO by specifying a tensor and unit cell. +Create an InfinitePEPO by specifying a tensor which is repeated across the unit cell. """ function InfinitePEPO(A::T; unitcell::Tuple{Int,Int,Int}=(1, 1, 1)) where {T<:PEPOTensor} return InfinitePEPO(fill(A, unitcell)) end """ - InfinitePEPO(f=randn, T=ComplexF64, Pspace, Nspace, [Espace]; unitcell=(1,1,1)) + InfinitePEPO([f=randn, T=ComplexF64,] Pspace::S, Nspace::S, [Espace::S]; unitcell=(1,1,1)) where {S<:ElementarySpace} Create an InfinitePEPO by specifying its spaces and unit cell. """ diff --git a/src/operators/lattices/squarelattice.jl b/src/operators/lattices/squarelattice.jl index a2f3d9b5e..e72b63b49 100644 --- a/src/operators/lattices/squarelattice.jl +++ b/src/operators/lattices/squarelattice.jl @@ -1,7 +1,17 @@ """ - InfiniteSquare(Nrows::Integer=1, Ncols::Integer=1) +$(TYPEDEF) Infinite square lattice with a unit cell of size `(Nrows, Ncols)`. + +## Fields + +$(TYPEDFIELDS) + +## Constructor + + InfiniteSquare([Nrows=1, Ncols=1]) + +By default, an infinite square with a (1, 1)-unitcell is constructed. """ struct InfiniteSquare <: AbstractLattice{2} Nrows::Int diff --git a/src/operators/localoperator.jl b/src/operators/localoperator.jl index 5605b1bdc..01bfc496a 100644 --- a/src/operators/localoperator.jl +++ b/src/operators/localoperator.jl @@ -161,7 +161,7 @@ function _rot180_site( end """ -$(TYPEDSIGNATURES) + mirror_antidiag(H::LocalOperator) Mirror a `LocalOperator` across the anti-diagonal axis of its lattice. """ @@ -241,7 +241,7 @@ function _fuse_ids(op::AbstractTensorMap{T,S,N,N}, Ps::NTuple{N,S}) where {T,S,N end """ -$(TYPEDSIGNATURES) + add_physical_charge(H::LocalOperator, charges::AbstractMatrix{<:Sector}) Change the spaces of a `LocalOperator` by fusing in an auxiliary charge on every site, according to a given matrix of 'auxiliary' physical charges. diff --git a/src/operators/models.jl b/src/operators/models.jl index 69038461c..43200e422 100644 --- a/src/operators/models.jl +++ b/src/operators/models.jl @@ -1,9 +1,7 @@ ## Model Hamiltonians # ------------------- """ - nearest_neighbour_hamiltonian( - lattice::Matrix{S}, h::AbstractTensorMap{T,S,2,2} - ) where {S,T} + nearest_neighbour_hamiltonian(lattice::Matrix{S}, h::AbstractTensorMap{T,S,2,2}) where {S,T} Create a nearest neighbor `LocalOperator` by specifying the 2-site interaction term `h` which acts both in horizontal and vertical direction. @@ -76,7 +74,7 @@ function MPSKitModels.heisenberg_XXZ( end """ - j1_j2([elt::Type{T}], [symm::Type{S}], [lattice::InfiniteSquare]; + j1_j2([elt::Type{T}, symm::Type{S},] lattice::InfiniteSquare; J1=1.0, J2=1.0, spin=1//2, sublattice=true) Square lattice J₁-J₂ model. The `sublattice` kwarg enables a single site unit cell via a @@ -109,7 +107,7 @@ function j1_j2( end """ - pwave_superconductor(::Type{T}=ComplexF64; t=1, μ=2, Δ=1, unitcell=(1, 1)) + pwave_superconductor([T=ComplexF64,] lattice::InfiniteSquare; t=1, μ=2, Δ=1, unitcell=(1, 1)) Square lattice p-wave superconductor model. """ diff --git a/src/states/infinitepartitionfunction.jl b/src/states/infinitepartitionfunction.jl index c5ca3ff3d..864c8b89b 100644 --- a/src/states/infinitepartitionfunction.jl +++ b/src/states/infinitepartitionfunction.jl @@ -2,6 +2,18 @@ struct InfinitePartitionFunction{T<:PartitionFunctionTensor} Represents an infinite partition function on a 2D square lattice. + +## Fields + +$(TYPEDFIELDS) + +## Constructors + + InfinitePartitionFunction(A::AbstractMatrix{T}) + InfinitePartitionFunction( + [f=randn, T=ComplexF64,] Pspaces::A, Nspaces::A, [Espaces::A] + ) where {A<:AbstractMatrix{<:Union{Int,ElementarySpace}}} + InfinitePartitionFunction(A::PartitionFunctionTensor; unitcell=(1, 1)) """ struct InfinitePartitionFunction{T<:PartitionFunctionTensor} A::Matrix{T} @@ -38,7 +50,7 @@ end """ InfinitePartitionFunction( - f=randn, T=ComplexF64, Pspaces::A, Nspaces::A, [Espaces::A] + [f=randn, T=ComplexF64,] Pspaces::A, Nspaces::A, [Espaces::A] ) where {A<:AbstractMatrix{<:Union{Int,ElementarySpace}}} Create an `InfinitePartitionFunction` by specifying the physical, north virtual and east virtual spaces @@ -93,7 +105,9 @@ function InfinitePartitionFunction( end """ - InfinitePartitionFunction(f=randn, T=ComplexF64, Pspace, Nspace, [Espace]; unitcell=(1,1)) + InfinitePartitionFunction( + [f=randn, T=ComplexF64,] Pspace::S, Nspace::S, [Espace::S]; unitcell=(1,1) + ) where {S<:ElementarySpaceLike} Create an InfinitePartitionFunction by specifying its physical, north and east spaces and unit cell. Spaces can be specified either via `Int` or via `ElementarySpace`. diff --git a/src/states/infinitepeps.jl b/src/states/infinitepeps.jl index ce95de962..6bce6860b 100644 --- a/src/states/infinitepeps.jl +++ b/src/states/infinitepeps.jl @@ -2,6 +2,17 @@ struct InfinitePEPS{T<:PEPSTensor} Represents an infinite projected entangled-pair state on a 2D square lattice. + +## Fields + +$(TYPEDFIELDS) + +## Constructors + + InfinitePEPS(A::AbstractMatrix{T}) + InfinitePEPS([f=randn, T=ComplexF64,] Pspaces::A, Nspaces::A, [Espaces::A]) where {A<:AbstractMatrix{<:Union{Int,ElementarySpace}}} + InfinitePEPS(A::PEPSTensor; unitcell=(1, 1)) + InfinitePEPS([f=randn, T=ComplexF64,] Pspace, Nspace, [Espace]; unitcell=(1,1)) """ struct InfinitePEPS{T<:PEPSTensor} A::Matrix{T} @@ -35,9 +46,7 @@ function InfinitePEPS(A::AbstractMatrix{<:PEPSTensor}) end """ - InfinitePEPS( - f=randn, T=ComplexF64, Pspaces::A, Nspaces::A, [Espaces::A] - ) where {A<:AbstractMatrix{<:Union{Int,ElementarySpace}}} + InfinitePEPS([f=randn, T=ComplexF64,] Pspaces::A, Nspaces::A, [Espaces::A]) where {A<:AbstractMatrix{<:Union{Int,ElementarySpace}}} Create an `InfinitePEPS` by specifying the physical, north virtual and east virtual spaces of the PEPS tensor at each site in the unit cell as a matrix. Each individual space can be @@ -65,7 +74,7 @@ function InfinitePEPS( end """ - InfinitePEPS(A; unitcell=(1, 1)) + InfinitePEPS(A::PEPSTensor; unitcell=(1, 1)) Create an `InfinitePEPS` by specifying a tensor and unit cell. @@ -89,7 +98,7 @@ function InfinitePEPS(A::T; unitcell::Tuple{Int,Int}=(1, 1)) where {T<:PEPSTenso end """ - InfinitePEPS(f=randn, T=ComplexF64, Pspace, Nspace, [Espace]; unitcell=(1,1)) + InfinitePEPS([f=randn, T=ComplexF64,] Pspace, Nspace, [Espace]; unitcell=(1,1)) Create an InfinitePEPS by specifying its physical, north and east spaces and unit cell. Spaces can be specified either via `Int` or via `ElementarySpace`. @@ -201,6 +210,12 @@ end ## FiniteDifferences vectorization +""" + to_vec(A::InfinitePEPS) -> vec, state_from_vec + +Vectorize an `InfinitePEPS` into a vector of real numbers. A vectorized infinite PEPS can +retrieved again as an `InfinitePEPS` by application of the `state_from_vec` map. +""" function FiniteDifferences.to_vec(A::InfinitePEPS) vec, back = FiniteDifferences.to_vec(unitcell(A)) function state_from_vec(vec) diff --git a/src/states/infiniteweightpeps.jl b/src/states/infiniteweightpeps.jl index c0d67494e..04a829017 100644 --- a/src/states/infiniteweightpeps.jl +++ b/src/states/infiniteweightpeps.jl @@ -10,8 +10,15 @@ const PEPSWeight{T,S} = AbstractTensorMap{T,S,1,1} """ struct SUWeight{E<:PEPSWeight} -Schmidt bond weights used in simple/cluster update. -Weight elements are always real. +Schmidt bond weights used in simple/cluster update. Weight elements are always real. + +## Fields + +$(TYPEDFIELDS) + +## Constructors + + SUWeight(wts_mats::AbstractMatrix{E}...) where {E<:PEPSWeight} """ struct SUWeight{E<:PEPSWeight} data::Array{E,3} @@ -54,6 +61,16 @@ end Represents an infinite projected entangled-pair state on a 2D square lattice consisting of vertex tensors and bond weights. + +## Fields + +$(TYPEDFIELDS) + +## Constructors + + InfiniteWeightPEPS(vertices::Matrix{T}, weight_mats::Matrix{E}...) where {T<:PEPSTensor,E<:PEPSWeight} + InfiniteWeightPEPS([f=randn, T=ComplexF64,] Pspaces::M, Nspaces::M, [Espaces::M]) where {M<:AbstractMatrix{<:Union{Int,ElementarySpace}}} + InfiniteWeightPEPS([f=randn, T=ComplexF64,] Pspace::S, Nspace::S, Espace::S=Nspace; unitcell::Tuple{Int,Int}=(1, 1)) where {S<:ElementarySpace} """ struct InfiniteWeightPEPS{T<:PEPSTensor,E<:PEPSWeight} vertices::Matrix{T} @@ -81,9 +98,7 @@ struct InfiniteWeightPEPS{T<:PEPSTensor,E<:PEPSWeight} end """ - InfiniteWeightPEPS( - vertices::Matrix{T}, weight_mats::Matrix{E}... - ) where {T<:PEPSTensor,E<:PEPSWeight} + InfiniteWeightPEPS(vertices::Matrix{T}, weight_mats::Matrix{E}...) where {T<:PEPSTensor,E<:PEPSWeight} Create an InfiniteWeightPEPS from matrices of vertex tensors, and separate matrices of weights on each type of bond at all locations in the unit cell. @@ -95,9 +110,7 @@ function InfiniteWeightPEPS( end """ - InfiniteWeightPEPS( - f=randn, T=ComplexF64, Pspaces::M, Nspaces::M, [Espaces::M] - ) where {M<:AbstractMatrix{<:Union{Int,ElementarySpace}}} + InfiniteWeightPEPS([f=randn, T=ComplexF64,] Pspaces::M, Nspaces::M, [Espaces::M]) where {M<:AbstractMatrix{<:Union{Int,ElementarySpace}}} Create an InfiniteWeightPEPS by specifying the physical, north virtual and east virtual spaces of the PEPS vertex tensor at each site in the unit cell as a matrix. @@ -122,14 +135,15 @@ function InfiniteWeightPEPS( end """ - InfiniteWeightPEPS( - f, T, Pspace::S, Nspace::S, Espace::S=Nspace; unitcell::Tuple{Int,Int}=(1, 1) - ) where {S<:ElementarySpace} + InfiniteWeightPEPS([f=randn, T=ComplexF64,] Pspace::S, Nspace::S, Espace::S=Nspace; unitcell::Tuple{Int,Int}=(1, 1)) where {S<:ElementarySpace} Create an InfiniteWeightPEPS by specifying its physical, north and east spaces (as `ElementarySpace`s) and unit cell size. Use `T` to specify the element type of the vertex tensors. Bond weights are initialized as identity matrices of element type `Float64`. """ +function InfiniteWeightPEPS(Pspaces::S, Nspaces::S, Espaces::S) where {S<:ElementarySpace} + return InfiniteWeightPEPS(randn, ComplexF64, Pspaces, Nspaces, Espaces) +end function InfiniteWeightPEPS( f, T, Pspace::S, Nspace::S, Espace::S=Nspace; unitcell::Tuple{Int,Int}=(1, 1) ) where {S<:ElementarySpace} @@ -187,12 +201,10 @@ function _absorb_weights( end """ - absorb_weight(t::PEPSTensor, row::Int, col::Int, ax::Int, weights::SUWeight; - sqrtwt::Bool=false, invwt::Bool=false) + absorb_weight(t::PEPSTensor, row::Int, col::Int, ax::Int, weights::SUWeight; sqrtwt::Bool=false, invwt::Bool=false) -Absorb or remove environment weight on an axis of vertex tensor `t` -known to be located at position (`row`, `col`) in the unit cell. -Weights around the tensor at `(row, col)` are +Absorb or remove environment weight on an axis of vertex tensor `t` known to be located at +position (`row`, `col`) in the unit cell. Weights around the tensor at `(row, col)` are ``` ↓ [2,r,c] @@ -203,19 +215,21 @@ Weights around the tensor at `(row, col)` are ↓ ``` -# Arguments -- `t::T`: The vertex tensor to which the weight will be absorbed. The first axis of `t` should be the physical axis. -- `row::Int`: The row index specifying the position in the tensor network. -- `col::Int`: The column index specifying the position in the tensor network. -- `ax::Int`: The axis into which the weight is absorbed, taking values from 1 to 4, standing for north, east, south, west respectively. -- `weights::SUWeight`: The weight object to absorb into the tensor. -- `sqrtwt::Bool=false` (optional): If `true`, the square root of the weight is absorbed. -- `invwt::Bool=false` (optional): If `true`, the inverse of the weight is absorbed. +## Arguments + +- `t::T` : The vertex tensor to which the weight will be absorbed. The first axis of `t` should be the physical axis. +- `row::Int` : The row index specifying the position in the tensor network. +- `col::Int` : The column index specifying the position in the tensor network. +- `ax::Int` : The axis into which the weight is absorbed, taking values from 1 to 4, standing for north, east, south, west respectively. +- `weights::SUWeight` : The weight object to absorb into the tensor. + +## Keyword arguments + +- `sqrtwt::Bool=false` : If `true`, the square root of the weight is absorbed. +- `invwt::Bool=false` : If `true`, the inverse of the weight is absorbed. -# Details -The optional kwargs `sqrtwt` and `invwt` allow taking the square root or the inverse of the weight before absorption. +## Examples -# Examples ```julia # Absorb the weight into the north axis of tensor at position (2, 3) absorb_weight(t, 2, 3, 1, weights) diff --git a/src/utility/diffable_threads.jl b/src/utility/diffable_threads.jl index c03937d98..7dbdc37bd 100644 --- a/src/utility/diffable_threads.jl +++ b/src/utility/diffable_threads.jl @@ -1,7 +1,7 @@ """ dtmap(args...; kwargs...) -Differentiable wrapper around `OhMyThreads.tmap`. +Differentiable wrapper around [`OhMyThreads.tmap`](@extref). All calls of `dtmap` inside of PEPSKit use the threading scheduler stored inside `Defaults.scheduler` which can be modified using `set_scheduler!`. diff --git a/src/utility/retractions.jl b/src/utility/retractions.jl index 67286a285..fe4aee991 100644 --- a/src/utility/retractions.jl +++ b/src/utility/retractions.jl @@ -3,7 +3,7 @@ Utilities for preserving the norm of (VectorInterface-compliant) vectors during =# """ - norm_preserving_retract(A, η, α) +$(SIGNATURES) Performs a norm-preserving retraction of vector `A` along the direction `η` with step size `α`, giving a new vector `A´`, @@ -33,7 +33,7 @@ function norm_preserving_retract(A, η, α) end """ - norm_preserving_transport!(ξ, A, η, α, A′) +$(SIGNATURES) Transports a direction `ξ` at `A` to a valid direction at `A´` corresponding to the norm-preserving retraction of `A` along `η` with step size `α`. In particular, starting diff --git a/src/utility/rotations.jl b/src/utility/rotations.jl index d83d43568..57f0e0393 100644 --- a/src/utility/rotations.jl +++ b/src/utility/rotations.jl @@ -9,7 +9,7 @@ const SOUTHEAST = 3 const SOUTHWEST = 4 """ - rotate_north(t, dir) +$(SIGNATURES) Rotate the `dir` direction of `t` to face north by successive applications of `rotl90`. """ diff --git a/src/utility/svd.jl b/src/utility/svd.jl index 280bb2f77..519102b5a 100644 --- a/src/utility/svd.jl +++ b/src/utility/svd.jl @@ -13,26 +13,33 @@ const TensorKitCRCExt = Base.get_extension(TensorKit, :TensorKitChainRulesCoreEx const KrylovKitCRCExt = Base.get_extension(KrylovKit, :KrylovKitChainRulesCoreExt) """ - struct SVDAdjoint - SVDAdjoint(; kwargs...) +$(TYPEDEF) Wrapper for a SVD algorithm `fwd_alg` with a defined reverse rule `rrule_alg`. If `isnothing(rrule_alg)`, Zygote differentiates the forward call automatically. In case of degenerate singular values, one might need a `broadening` scheme which removes the divergences from the adjoint. -## Keyword arguments +## Fields + +$(TYPEDFIELDS) + +## Constructors + + SVDAdjoint(; kwargs...) + +Construct a `SVDAdjoint` algorithm struct based on the following keyword arguments: * `fwd_alg::Union{Algorithm,NamedTuple}=(; alg::Symbol=$(Defaults.svd_fwd_alg))`: SVD algorithm of the forward pass which can either be passed as an `Algorithm` instance or a `NamedTuple` where `alg` is one of the following: - - `:sdd`: TensorKit's wrapper for LAPACK's `_gesdd` - - `:svd`: TensorKit's wrapper for LAPACK's `_gesvd` - - `:iterative`: Iterative SVD only computing the specifed number of singular values and vectors, see [`IterSVD`](@ref) + - `:sdd` : TensorKit's wrapper for LAPACK's `_gesdd` + - `:svd` : TensorKit's wrapper for LAPACK's `_gesvd` + - `:iterative` : Iterative SVD only computing the specifed number of singular values and vectors, see [`IterSVD`](@ref) * `rrule_alg::Union{Algorithm,NamedTuple}=(; alg::Symbol=$(Defaults.svd_rrule_alg))`: Reverse-rule algorithm for differentiating the SVD. Can be supplied by an `Algorithm` instance directly or as a `NamedTuple` where `alg` is one of the following: - - `:tsvd`: Uses TensorKit's reverse-rule for `tsvd` which doesn't solve any linear problem and instead requires access to the full SVD, see [TensorKit](https://github.com/Jutho/TensorKit.jl/blob/f9cddcf97f8d001888a26f4dce7408d5c6e2228f/ext/TensorKitChainRulesCoreExt/factorizations.jl#L3) - - `:gmres`: GMRES iterative linear solver, see [`KrylovKit.GMRES`](@extref) for details - - `:bicgstab`: BiCGStab iterative linear solver, see [`KrylovKit.BiCGStab`](@extref) for details - - `:arnoldi`: Arnoldi Krylov algorithm, see [`KrylovKit.Arnoldi`](@extref) for details -* `broadening=nothing`: Broadening of singular value differences to stabilize the SVD gradient. Currently not implemented. + - `:tsvd` : Uses TensorKit's reverse-rule for `tsvd` which doesn't solve any linear problem and instead requires access to the full SVD, see [TensorKit](https://github.com/Jutho/TensorKit.jl/blob/f9cddcf97f8d001888a26f4dce7408d5c6e2228f/ext/TensorKitChainRulesCoreExt/factorizations.jl#L3) + - `:gmres` : GMRES iterative linear solver, see [`KrylovKit.GMRES`](@extref) for details + - `:bicgstab` : BiCGStab iterative linear solver, see [`KrylovKit.BiCGStab`](@extref) for details + - `:arnoldi` : Arnoldi Krylov algorithm, see [`KrylovKit.Arnoldi`](@extref) for details +* `broadening=nothing` : Broadening of singular value differences to stabilize the SVD gradient. Currently not implemented. """ struct SVDAdjoint{F,R,B} fwd_alg::F @@ -99,7 +106,7 @@ function SVDAdjoint(; fwd_alg=(;), rrule_alg=(;), broadening=nothing) end """ - PEPSKit.tsvd(t, alg; trunc=notrunc(), p=2) + PEPSKit.tsvd(t, alg::SVDAdjoint; trunc=notrunc(), p=2) Wrapper around `TensorKit.tsvd` which dispatches on the `alg` argument. This is needed since a custom adjoint for `PEPSKit.tsvd` may be defined, @@ -119,7 +126,6 @@ end ## Forward algorithms -# TODO: add `LinearAlgebra.cond` to TensorKit # Compute condition number smax / smin for diagonal singular value TensorMap function _condition_number(S::AbstractTensorMap) smax = maximum(first ∘ last, blocks(S)) @@ -158,12 +164,16 @@ function _tsvd!( end """ - struct FixedSVD +$(TYPEDEF) SVD struct containing a pre-computed decomposition or even multiple ones. Additionally, it can contain the untruncated full decomposition as well. The call to `tsvd` just returns the pre-computed U, S and V. In the reverse pass, the SVD adjoint is computed with these exact U, S, and V and, potentially, the full decompositions if the adjoints needs access to them. + +## Fields + +$(TYPEDFIELDS) """ struct FixedSVD{Ut,St,Vt,Utf,Stf,Vtf} U::Ut @@ -196,8 +206,7 @@ function _tsvd!(_, alg::FixedSVD, ::TruncationScheme, ::Real) end """ - struct IterSVD(; alg=KrylovKit.GKL(), fallback_threshold = Inf, start_vector=random_start_vector) - IterSVD(; kwargs...) +$(TYPEDEF) Iterative SVD solver based on KrylovKit's GKL algorithm, adapted to (symmetric) tensors. The number of targeted singular values is set via the `TruncationSpace` in `ProjectorAlg`. @@ -205,11 +214,19 @@ In particular, this make it possible to specify the targeted singular values blo In case the symmetry block is too small as compared to the number of singular values, or the iterative SVD didn't converge, the algorithm falls back to a dense SVD. -## Keyword arguments +## Fields + +$(TYPEDFIELDS) + +## Constructors + + IterSVD(; kwargs...) + +Construct an `IterSVD` algorithm struct based on the following keyword arguments: -* `alg::KrlovKit.GKL=KrylovKit.GKL(; tol=1e-14, krylovdim=25)`: GKL algorithm struct for block-wise iterative SVD. -* `fallback_threshold::Float64=Inf`: Threshold for `howmany / minimum(size(block))` above which (if the block is too small) the algorithm falls back to TensorKit's dense SVD. -* `start_vector=random_start_vector`: Function providing the initial vector for the iterative SVD algorithm. +* `alg::KrylovKit.GKL=KrylovKit.GKL(; tol=1e-14, krylovdim=25)` : GKL algorithm struct for block-wise iterative SVD. +* `fallback_threshold::Float64=Inf` : Threshold for `howmany / minimum(size(block))` above which (if the block is too small) the algorithm falls back to TensorKit's dense SVD. +* `start_vector=random_start_vector` : Function providing the initial vector for the iterative SVD algorithm. """ @kwdef struct IterSVD alg::KrylovKit.GKL = KrylovKit.GKL(; tol=1e-14, krylovdim=25) diff --git a/src/utility/symmetrization.jl b/src/utility/symmetrization.jl index 1f53f9303..5bde3ea92 100644 --- a/src/utility/symmetrization.jl +++ b/src/utility/symmetrization.jl @@ -1,28 +1,28 @@ abstract type SymmetrizationStyle end """ - struct ReflectDepth <: SymmetrizationStyle +$(TYPEDEF) Reflection symmmetrization along the horizontal axis, such that north and south are mirrored. """ struct ReflectDepth <: SymmetrizationStyle end """ - struct ReflectWidth <: SymmetrizationStyle +$(TYPEDEF) Reflection symmmetrization along the vertical axis, such that east and west are mirrored. """ struct ReflectWidth <: SymmetrizationStyle end """ - struct Rotate <: SymmetrizationStyle +$(TYPEDEF) Rotation symmmetrization leaving the object invariant under π/2 rotations. """ struct Rotate <: SymmetrizationStyle end """ - struct RotateReflect <: SymmetrizationStyle +$(TYPEDEF) Full reflection and rotation symmmetrization, such that reflection along the horizontal and vertical axis as well as π/2 rotations leave the object invariant. From 067ee1162c91bfd7981dbafba436074c86c73eb0 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 21 Mar 2025 18:04:15 +0100 Subject: [PATCH 013/113] Add FullEnvTruncation reference --- docs/src/assets/pepskit.bib | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/src/assets/pepskit.bib b/docs/src/assets/pepskit.bib index 461591fed..ff7c6d60f 100644 --- a/docs/src/assets/pepskit.bib +++ b/docs/src/assets/pepskit.bib @@ -9,4 +9,19 @@ @article{francuz_stable_2025 pages = {013237}, publisher = {American Physical Society}, doi = {10.1103/PhysRevResearch.7.013237} -} \ No newline at end of file +} + +@article{evenbly_gauge_2018, + title = {Gauge fixing, canonical forms, and optimal truncations in tensor networks with closed loops}, + author = {Evenbly, Glen}, + journal = {Phys. Rev. B}, + volume = {98}, + issue = {8}, + pages = {085155}, + numpages = {11}, + year = {2018}, + month = {Aug}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.98.085155}, + url = {https://link.aps.org/doi/10.1103/PhysRevB.98.085155} +} From efb20dd37c97ef50792ea3d8f4b0d8d236e646a0 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 21 Mar 2025 18:04:33 +0100 Subject: [PATCH 014/113] Actually add reference --- src/algorithms/truncation/fullenv_truncation.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/algorithms/truncation/fullenv_truncation.jl b/src/algorithms/truncation/fullenv_truncation.jl index 7ec10f296..5687134b2 100644 --- a/src/algorithms/truncation/fullenv_truncation.jl +++ b/src/algorithms/truncation/fullenv_truncation.jl @@ -18,6 +18,10 @@ The truncation algorithm can be constructed from the following keyword arguments * `tol::Float64=1e-15` : FET converges when fidelity change between two FET iterations is smaller than `tol`. * `trunc_init::Bool=true` : Controls whether the initialization of the new bond matrix is obtained from truncated SVD of the old bond matrix. * `check_interval::Int=0` : Set number of iterations to print information. Output is suppressed when `check_interval <= 0`. + +## References + +* [Glen Evenbly, Phys. Rev. B 98, 085155 (2018)](@cite evenbly_gauge_2018). """ @kwdef struct FullEnvTruncation trscheme::TensorKit.TruncationScheme @@ -90,7 +94,7 @@ end """ fullenv_truncate(benv::BondEnv{T,S}, b0::AbstractTensorMap{T,S,1,1}, alg::FullEnvTruncation) -> U, S, V, info -The full environment truncation algorithm (Physical Review B 98, 085155 (2018)). +Perform full environment truncation algorithm on `benv`. Given a fixed state `|b0⟩` with bond matrix `b0` and the corresponding positive-definite bond environment `benv`, From deaceddb46c1eadf4d95194552b1e213ad17d2cf Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 21 Mar 2025 18:07:13 +0100 Subject: [PATCH 015/113] Remove OhMyThreads InterLinks --- docs/make.jl | 1 - src/Defaults.jl | 2 +- src/utility/diffable_threads.jl | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index c9d72de44..40fa913ce 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -28,7 +28,6 @@ links = InterLinks( # "MPSKitModels" => "https://quantumkithub.github.io/MPSKitModels.jl/", # "Zygote" => "https://fluxml.ai/Zygote.jl/stable/", "ChainRulesCore" => "https://juliadiff.org/ChainRulesCore.jl/stable/", - "OhMyThreads" => "https://juliafolds2.github.io/OhMyThreads.jl/stable/", ) # explicitly set math engine diff --git a/src/Defaults.jl b/src/Defaults.jl index 404362cdf..8aa30afe1 100644 --- a/src/Defaults.jl +++ b/src/Defaults.jl @@ -143,7 +143,7 @@ or equivalently with set_scheduler!(:static; ntasks=4, chunking=true) ``` For a detailed description of all schedulers and their keyword arguments consult the -[`OhMyThreads.Schedulers.Scheduler`](@extref) documentation. +[OhMyThreads](https://juliafolds2.github.io/OhMyThreads.jl/stable/refs/api/#OhMyThreads.Schedulers.Scheduler) documentation. If no `scheduler` is passed and only kwargs are provided, the `DynamicScheduler` constructor is used with the provided kwargs. diff --git a/src/utility/diffable_threads.jl b/src/utility/diffable_threads.jl index 7dbdc37bd..b01375482 100644 --- a/src/utility/diffable_threads.jl +++ b/src/utility/diffable_threads.jl @@ -1,7 +1,7 @@ """ dtmap(args...; kwargs...) -Differentiable wrapper around [`OhMyThreads.tmap`](@extref). +Differentiable wrapper around [OhMyThreads.tmap]. All calls of `dtmap` inside of PEPSKit use the threading scheduler stored inside `Defaults.scheduler` which can be modified using `set_scheduler!`. From 716d45b6b67c19f48aeff3cc5a217a77b0ed55ea Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Wed, 26 Mar 2025 10:36:32 +0100 Subject: [PATCH 016/113] Fix docstring typo --- src/algorithms/optimization/fixed_point_differentiation.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/optimization/fixed_point_differentiation.jl b/src/algorithms/optimization/fixed_point_differentiation.jl index 6eaf9e64b..8b7a42d97 100644 --- a/src/algorithms/optimization/fixed_point_differentiation.jl +++ b/src/algorithms/optimization/fixed_point_differentiation.jl @@ -76,7 +76,7 @@ Gradient mode for CTMRG using explicit evaluation of the geometric sum. $(TYPEDFIELDS) -## Constructor +## Constructors GeomSum(; kwargs...) From 3003bb3e8bd596bc2849844b928666664d37ec2b Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 10 Apr 2025 16:21:40 +0200 Subject: [PATCH 017/113] Update README and docs index --- README.md | 43 ++++++++++++++++++++----------------- docs/src/index.md | 54 ++++++++++++++++++++++++++++++++++------------- 2 files changed, 63 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 67193c29a..9de4d0675 100644 --- a/README.md +++ b/README.md @@ -30,35 +30,40 @@ The package can be installed through the Julia general registry, via the package pkg> add PEPSKit ``` +## Key features + +- Construction and manipulation of infinite projected entangled-pair states (PEPS) +- Contraction of infinite PEPS using the corner transfer matrix renormalization group (CTMRG) and variational uniform matrix product states (VUMPS) +- Native support for symmetric tensors through [TensorKit](https://github.com/Jutho/TensorKit.jl), including fermionic tensors +- PEPS optimization using automatic differentiation (AD) provided through [Zygote](https://fluxml.ai/Zygote.jl/stable/) +- Imaginary time evolution algorithms +- Support for PEPS with generic unit cells +- Support for classical 2D partition functions and projected entangled-pair operators (PEPOs) +- Easy to implement custom states, operators and algorithms + ## 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: +For example, in order to obtain the ground state of the 2D Heisenberg model, we can use the following code: ```julia -using TensorKit, PEPSKit, KrylovKit, OptimKit +using TensorKit, PEPSKit # construct the Hamiltonian H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1) # sublattice rotation to obtain single-site unit cell -# choose the bond dimensions +# configure the parameters D = 2 -chi = 20 - -# configure the algorithm parameters -boundary_alg = (; - alg=:simultaneous, tol=1e-10, verbosity=2, trscheme=(; alg=:truncdim, η=chi) -) -optimizer_alg = (; alg=:lbfgs, tol=1e-4, verbosity=3) -gradient_alg = (; alg=:linsolver) -reuse_env = true - -# and find the ground state -state = InfinitePEPS(2, D) -env0, = leading_boundary(CTMRGEnv(state, ComplexSpace(chi)), state; boundary_alg...) -peps, env, E, = fixedpoint( - H, state, env0; boundary_alg, optimizer_alg, gradient_alg, reuse_env -) +χ = 20 +ctmrg_tol = 1e-10 +grad_tol = 1e-4 + +# initialize a PEPS and CTMRG environment +peps₀ = InfinitePEPS(2, D) +env₀, = leading_boundary(CTMRGEnv(peps₀, ComplexSpace(χ)), peps₀; tol=ctmrg_tol) + +# ground state search +peps, env, E, = fixedpoint(H, peps₀, env₀; tol=grad_tol, boundary_alg=(; tol=ctmrg_tol)) @show E # -0.6625... ``` diff --git a/docs/src/index.md b/docs/src/index.md index e6a6face6..d92a0e199 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -12,32 +12,56 @@ The package can be installed through the Julia general registry, via the package pkg> add PEPSKit ``` +## Key features + +- Construction and manipulation of infinite projected entangled-pair states (PEPS) +- Contraction of infinite PEPS using the corner transfer matrix renormalization group (CTMRG) and variational uniform matrix product states (VUMPS) +- Native support for symmetric tensors through [TensorKit](https://github.com/Jutho/TensorKit.jl), including fermionic tensors +- PEPS optimization using automatic differentiation (AD) provided through [Zygote](https://fluxml.ai/Zygote.jl/stable/) +- Imaginary time evolution algorithms +- Support for PEPS with generic unit cells +- Support for classical 2D partition functions and projected entangled-pair operators (PEPOs) +- Easy to implement custom states, operators and algorithms + ## 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: +For example, in order to obtain the ground state of the 2D Heisenberg model, we can use the following code: ```julia -using TensorKit, PEPSKit, KrylovKit, OptimKit +using TensorKit, PEPSKit -# constructing the Hamiltonian: +# construct the Hamiltonian H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1) # sublattice rotation to obtain single-site unit cell -# configuring the parameters +# configure the parameters D = 2 -chi = 20 -ctm_alg = SimultaneousCTMRG(; tol=1e-10, trscheme=truncdim(chi)) -opt_alg = PEPSOptimize(; - boundary_alg=ctm_alg, - optimizer_alg=LBFGS(4; maxiter=100, gradtol=1e-4, verbosity=3), - gradient_alg=LinSolver(), - reuse_env=true, -) +χ = 20 +ctmrg_tol = 1e-10 +grad_tol = 1e-4 + +# initialize a PEPS and CTMRG environment +peps₀ = InfinitePEPS(2, D) +env₀, = leading_boundary(CTMRGEnv(peps₀, ComplexSpace(χ)), peps₀; tol=ctmrg_tol) # ground state search -state = InfinitePEPS(2, D) -ctm, = leading_boundary(CTMRGEnv(state, ComplexSpace(chi)), state, ctm_alg) -peps, env, E, = fixedpoint(H, state, ctm, opt_alg) +peps, env, E, = fixedpoint(H, peps₀, env₀; tol=grad_tol, boundary_alg=(; tol=ctmrg_tol)) @show E # -0.6625... ``` + +## Table of contents + +A detailed rundown of PEPSKit's features can be found in the [Manual](@ref) section, including: + +```@contents +Pages = ["man/intro.md"] +Depth = 1 +``` + +Additionally, we provide a list of commented example notebooks in the [Examples](@ref) section: + +```@contents +Pages = ["examples/notebook.md"] +Depth = 1 +``` From 33e0cc69d3768a0237c390cef609106606709d66 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 10 Apr 2025 17:10:52 +0200 Subject: [PATCH 018/113] Add rough outline for Manual section --- docs/make.jl | 10 +++++++++- docs/src/index.md | 2 +- docs/src/man/environments.md | 4 ++++ docs/src/man/intro.md | 1 - docs/src/man/multi_threading.md | 4 ++++ docs/src/man/operators.md | 4 ++++ docs/src/man/peps_optimization.md | 4 ++++ docs/src/man/precompilation.md | 1 + docs/src/man/states.md | 4 ++++ docs/src/man/symmetries.md | 4 ++++ 10 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 docs/src/man/environments.md delete mode 100644 docs/src/man/intro.md create mode 100644 docs/src/man/multi_threading.md create mode 100644 docs/src/man/operators.md create mode 100644 docs/src/man/peps_optimization.md create mode 100644 docs/src/man/precompilation.md create mode 100644 docs/src/man/states.md create mode 100644 docs/src/man/symmetries.md diff --git a/docs/make.jl b/docs/make.jl index 40fa913ce..81083bf1e 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -52,7 +52,15 @@ makedocs(; ), pages=[ "Home" => "index.md", - "Manual" => "man/intro.md", + "Manual" => [ + "states.md", + "environments.md", + "operators.md", + "peps_optimization.md", + "symmetries.md", + "multi_threading.md", + "precompilation.md", + ], "Examples" => examples, "Library" => "lib/lib.md", "References" => "references.md", diff --git a/docs/src/index.md b/docs/src/index.md index d92a0e199..afa5ea0a1 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -55,7 +55,7 @@ peps, env, E, = fixedpoint(H, peps₀, env₀; tol=grad_tol, boundary_alg=(; tol A detailed rundown of PEPSKit's features can be found in the [Manual](@ref) section, including: ```@contents -Pages = ["man/intro.md"] +Pages = ["man/states.md", "man/environments.md", "man/operators.md", "man/peps_optimization.md", "man/symmetries.md", "man/multi_threading.md", "man/precompilation.md"] Depth = 1 ``` diff --git a/docs/src/man/environments.md b/docs/src/man/environments.md new file mode 100644 index 000000000..485cd75e4 --- /dev/null +++ b/docs/src/man/environments.md @@ -0,0 +1,4 @@ +# Environments + +!!! note + This section is still under construction. \ No newline at end of file diff --git a/docs/src/man/intro.md b/docs/src/man/intro.md deleted file mode 100644 index fcc39fe6d..000000000 --- a/docs/src/man/intro.md +++ /dev/null @@ -1 +0,0 @@ -Coming soon. \ No newline at end of file diff --git a/docs/src/man/multi_threading.md b/docs/src/man/multi_threading.md new file mode 100644 index 000000000..52e5e57be --- /dev/null +++ b/docs/src/man/multi_threading.md @@ -0,0 +1,4 @@ +# Multi-threading + +!!! note + This section is still under construction. diff --git a/docs/src/man/operators.md b/docs/src/man/operators.md new file mode 100644 index 000000000..0098ec494 --- /dev/null +++ b/docs/src/man/operators.md @@ -0,0 +1,4 @@ +# Operators + +!!! note + This section is still under construction. diff --git a/docs/src/man/peps_optimization.md b/docs/src/man/peps_optimization.md new file mode 100644 index 000000000..78511bb76 --- /dev/null +++ b/docs/src/man/peps_optimization.md @@ -0,0 +1,4 @@ +# PEPS optimization + +!!! note + This section is still under construction. \ No newline at end of file diff --git a/docs/src/man/precompilation.md b/docs/src/man/precompilation.md new file mode 100644 index 000000000..93dfebd0e --- /dev/null +++ b/docs/src/man/precompilation.md @@ -0,0 +1 @@ +# Precompilation using PrecompileTools.jl diff --git a/docs/src/man/states.md b/docs/src/man/states.md new file mode 100644 index 000000000..e062e0f53 --- /dev/null +++ b/docs/src/man/states.md @@ -0,0 +1,4 @@ +# States + +!!! note + This section is still under construction. diff --git a/docs/src/man/symmetries.md b/docs/src/man/symmetries.md new file mode 100644 index 000000000..fdafecc93 --- /dev/null +++ b/docs/src/man/symmetries.md @@ -0,0 +1,4 @@ +# Symmetric and fermionic tensors + +!!! note + This section is still under construction. \ No newline at end of file From f0bd9a301b13d283f47466f38e60da3e4bdbaee6 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 10 Apr 2025 17:57:55 +0200 Subject: [PATCH 019/113] Add PrecompileTools manual section --- docs/src/man/precompilation.md | 114 +++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) diff --git a/docs/src/man/precompilation.md b/docs/src/man/precompilation.md index 93dfebd0e..7ce7cc62f 100644 --- a/docs/src/man/precompilation.md +++ b/docs/src/man/precompilation.md @@ -1 +1,115 @@ # Precompilation using PrecompileTools.jl + +For certain PEPSKit applications, the "time to first execution" (TTFX) can be quite long. +If frequent recompilation is required this can become a significant time sink. +Especially in simulations involving AD code, the precompilation times of Zygote tend to be particularly bad. + +Fortunately, there is an easy way out using [PrecompileTools](https://julialang.github.io/PrecompileTools.jl/stable/). +By writing a precompilation script that executes and precompiles a toy problem which is suited to one's personal problem, one can cut down significantly on the TTFX. +To see how that works in the context of PEPSKit, we will closely follow the PrecompileTools [docs](https://julialang.github.io/PrecompileTools.jl/stable/#Tutorial:-local-%22Startup%22-packages). + +Let's say we have a project where we want to speed up the TTFX, located in a project environment called `YourProject`. +Inside that project folder, we generate a `Startup` module which will contain the toy problem that we want to precompile: + +``` +(YourProject) pkg> generate Startup + Generating project Startup: + Startup/Project.toml + Startup/src/Startup.jl + +(YourProject) pkg> dev ./Startup + Resolving package versions... + Updating `/YourProject/Project.toml` + [e9c42744] + Startup v0.1.0 `Startup` + Updating `/tmp/Project1/Manifest.toml` + [e9c42744] + Startup v0.1.0 `Startup` + +(YourProject) pkg> activate Startup/ + Activating project at `/YourProject/Startup` + +(Startup) pkg> add PrecompileTools YourPackages... +``` + +The `Startup` module should depend on `PrecompileTools` as well as all the packages (`YourPackages...`) that are required to run the precompilation toy problem. +Next, we edit the `Startup/src/Startup.jl` file and add to it all the code which we want PrecompileTools to compile. +We will here provide a basic example featuring Zygote AD code on various algorithmic combinations: + +```julia +module Startup + +using Random +using TensorKit, KrylovKit, OptimKit +using ChainRulesCore, Zygote +using MPSKit, MPSKitModels +using PEPSKit +using PrecompileTools + +@setup_workload begin + t₀ = time_ns() + Random.seed!(20918352394) + + # Hyperparameters + Dbond = 2 + χenv = 4 + gradtol = 1e-3 + maxiter = 4 + verbosity = -1 + H = heisenberg_XYZ(InfiniteSquare()) + + # Algorithmic settings + ctmrg_algs = [ + SimultaneousCTMRG(; maxiter, projector_alg=:halfinfinite, verbosity), + SequentialCTMRG(; maxiter, projector_alg=:halfinfinite, verbosity), + ] + gradient_algs = [ + LinSolver(; solver_alg=BiCGStab(; tol=gradtol), iterscheme=:fixed), + LinSolver(; solver_alg=BiCGStab(; tol=gradtol), iterscheme=:diffgauge), + EigSolver(; solver_alg=Arnoldi(; tol=gradtol, eager=true), iterscheme=:fixed), + ] + + # Initialize OhMyThreads scheduler (precompilation occurs before __init__ call) + set_scheduler!() + + @compile_workload begin + # Initialize PEPS and environments with different unit cells, number types and symmetries + @info "Precompiling workload: initializing PEPSs and environments" + peps = InfinitePEPS(randn, ComplexF64, ComplexSpace(Dbond), ComplexSpace(Dbond)) + + env, = leading_boundary(CTMRGEnv(peps, ComplexSpace(χenv)), peps; verbosity) + + # CTMRG + @info "Precompiling workload: CTMRG leading_boundary" + for ctmrg_alg in ctmrg_algs + leading_boundary(env, peps, ctmrg_alg) + end + + # Differentiate CTMRG leading_boundary + @info "Precompiling workload: backpropagation of leading_boundary" + for alg_rrule in gradient_algs + Zygote.withgradient(peps) do ψ + env′, = PEPSKit.hook_pullback( + leading_boundary, env, ψ, SimultaneousCTMRG(; verbosity); alg_rrule + ) + return cost_function(ψ, env′, H) + end + end + + # Optimize via fixedpoint using LBFGS + @info "Precompiling workload: LBFGS fixedpoint optimization" + fixedpoint(H, peps, env, opt_alg; tol=gradtol, maxiter, verbosity) + + # Compute correlation length + @info "Precompiling workload: correlation_length" + correlation_length(peps, env) + end + + duration = round((time_ns() - t₀) * 1e-9 / 60; digits=2) # minutes + @info "Precompiling workload: finished after $duration min" +end + +end +``` + +Finally, activate `YourProject` again - where we want to benefit from the shortened execution times - and run `using Startup`. +That way, all packages will be loaded with their precompiled code. +Of course, we may also have multiple start-up routines where the precompiled code is tailored towards the needs of the respective projects. From 252d167e7dfb43781a997a2a8599166ac87d11cc Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 11 Apr 2025 10:36:58 +0200 Subject: [PATCH 020/113] Fix manual file paths --- docs/make.jl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 81083bf1e..c0408eef3 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -53,13 +53,13 @@ makedocs(; pages=[ "Home" => "index.md", "Manual" => [ - "states.md", - "environments.md", - "operators.md", - "peps_optimization.md", - "symmetries.md", - "multi_threading.md", - "precompilation.md", + "man/states.md", + "man/environments.md", + "man/operators.md", + "man/peps_optimization.md", + "man/symmetries.md", + "man/multi_threading.md", + "man/precompilation.md", ], "Examples" => examples, "Library" => "lib/lib.md", From 6e9db6aa48c8424a6480103a5514cdcf9fc63457 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 11 Apr 2025 15:10:59 +0200 Subject: [PATCH 021/113] Fix optimizer verbosity in `fixedpoint` algorithm selector --- src/algorithms/select_algorithm.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/select_algorithm.jl b/src/algorithms/select_algorithm.jl index b4cec2cca..5b1007117 100644 --- a/src/algorithms/select_algorithm.jl +++ b/src/algorithms/select_algorithm.jl @@ -43,7 +43,7 @@ function select_algorithm( # adjust optimizer tol and verbosity if optimizer_alg isa NamedTuple - defaults = (; tol, verbosity=verbosity ≤ 1 ? -1 : 3) + defaults = (; tol, verbosity=verbosity < 1 ? -1 : 3) optimizer_alg = merge(defaults, optimizer_alg) end From 880e8096cde2f46ae15aeb0b2a0ed043242ef955 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 11 Apr 2025 15:47:10 +0200 Subject: [PATCH 022/113] Add Heisenberg example notebook --- docs/src/assets/pepskit.bib | 14 + docs/src/index.md | 4 +- examples/notebooks/heisenberg.jl | 924 +++++++++++++++++++++++++++++++ 3 files changed, 941 insertions(+), 1 deletion(-) create mode 100644 examples/notebooks/heisenberg.jl diff --git a/docs/src/assets/pepskit.bib b/docs/src/assets/pepskit.bib index ff7c6d60f..e9255f51b 100644 --- a/docs/src/assets/pepskit.bib +++ b/docs/src/assets/pepskit.bib @@ -25,3 +25,17 @@ @article{evenbly_gauge_2018 doi = {10.1103/PhysRevB.98.085155}, url = {https://link.aps.org/doi/10.1103/PhysRevB.98.085155} } + +@article{sandvik_computational_2011, + author = {Sandvik, Anders W.}, + title = {Computational Studies of Quantum Spin Systems}, + journal = {AIP Conference Proceedings}, + volume = {1297}, + number = {1}, + pages = {135-338}, + year = {2010}, + month = {11}, + issn = {0094-243X}, + doi = {10.1063/1.3518900}, + url = {https://doi.org/10.1063/1.3518900} +} diff --git a/docs/src/index.md b/docs/src/index.md index afa5ea0a1..d71739823 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -32,7 +32,7 @@ For example, in order to obtain the ground state of the 2D Heisenberg model, we using TensorKit, PEPSKit # construct the Hamiltonian -H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1) # sublattice rotation to obtain single-site unit cell +H = heisenberg_XYZ(InfiniteSquare()) # configure the parameters D = 2 @@ -50,6 +50,8 @@ peps, env, E, = fixedpoint(H, peps₀, env₀; tol=grad_tol, boundary_alg=(; tol @show E # -0.6625... ``` +For a more in-depth explanation of this simple example, check the [ ](@ref) notebook or consult the Manual pages. + ## Table of contents A detailed rundown of PEPSKit's features can be found in the [Manual](@ref) section, including: diff --git a/examples/notebooks/heisenberg.jl b/examples/notebooks/heisenberg.jl new file mode 100644 index 000000000..128e95440 --- /dev/null +++ b/examples/notebooks/heisenberg.jl @@ -0,0 +1,924 @@ +### A Pluto.jl notebook ### +# v0.20.5 + +using Markdown +using InteractiveUtils + +# ╔═╡ 7da39574-7c05-492e-abf9-10b9e8f1dda9 +using TensorKit, PEPSKit + +# ╔═╡ ff6fa2f1-841d-42c6-acd9-b5f4cf6b7c76 +md""" +# Optimizing the 2D Heisenberg model + +In this example we want to provide a basic rundown of PEPSKit's optimization workflow for PEPS. To that end, we will consider the two-dimensional Heisenberg model on a square lattice + +```math +H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j +``` + +Here, we want to set ``J_x=J_y=J_z=1`` where the Heisenberg model is in the antiferromagnetic regime. Due to the bipartite sublattice structure of antiferromagnetic order one needs a PEPS ansatz with a ``2 \times 2`` unit cell. This can be circumvented by performing a unitary sublattice rotation on all B-sites resulting in a change of parameters to ``(J_x, J_y, J_z)=(-1, 1, -1)``. This gives us a unitarily equivalent Hamiltonian (with the same spectrum) with a ground state on a single-site unit cell. + +Let us get started by importing `TensorKit` and `PEPSKit`, and creating the Heisenberg Hamiltonian on an infinite square lattice: +""" + +# ╔═╡ 758d7f1a-b62f-400d-bf71-25410a7ce9c5 +H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1); + +# ╔═╡ 945f9d02-322b-47f0-85b2-f229e4d8c4d9 +md""" +Next, we set the simulation parameters. During optimization, the PEPS will be contracted using CTMRG and the PEPS gradient will be computed by differentiating through the CTMRG routine using AD. Since the algorithmic stack that implements this is rather elaborate, the amount of settings one can configure is also quite large. +To reduce this complexity, PEPSKit defaults to (presumably) reasonable settings which also dynamically adapts to the user-specified parameters. + +First, we set the bond dimension `Dbond` of the virtual PEPS indices and the environment dimension `χenv` of the virtual corner and transfer matrix indices. +""" + +# ╔═╡ f87c548e-a8ff-4b21-b9a0-5ae06c1b7adb +Dbond = 2; + +# ╔═╡ b40e0dbd-7136-4211-863d-3f489606a86c +χenv = 16; + +# ╔═╡ 2e7b56ff-df31-48a3-91e9-a621bb545baa +md""" +To configure the CTMRG algorithm, we create a `NamedTuple` containing different keyword arguments. To see a description of all arguments, see the docstring of [`leading_boundary`](@ref). Here, we want to converge the CTMRG environments up to a specific tolerance and during the CTMRG run keep all index dimensions fixed: +""" + +# ╔═╡ 1f6330da-b1f5-4472-80f2-b19ff3c09e36 +boundary_alg = (; tol=1e-10, trscheme=(; alg=:fixedspace)); + +# ╔═╡ 4f800808-aa72-46e3-ad6e-13c9852d8cd1 +md""" +Let us also configure the optimizer algorithm. We are going to optimize the PEPS using the L-BFGS optimizer from [OptimKit](https://github.com/Jutho/OptimKit.jl). Again, we specify the convergence tolerance (for the gradient norm) as well as the maximal number of iterations and the BFGS memory size (which is used to approximate the Hessian): +""" + +# ╔═╡ ec9157cb-2402-487d-a394-f237a9b8e056 +optimizer_alg = (; alg=:lbfgs, tol=1e-4, maxiter=100, lbfgs_memory=16); + +# ╔═╡ d52a7418-6f4e-4ed3-80c8-a2b8f60fe664 +md""" +Additionally, during optimization, we want to reuse the previous CTMRG environment to initialize the CTMRG run of the current optimization step: +""" + +# ╔═╡ 0d6e6de5-2f75-466a-8367-a9d802897c6e +reuse_env = true; + +# ╔═╡ 65057067-de67-44ce-9882-c08101ebee6b +md""" +And to control the output information, we set the `verbosity`: +""" + +# ╔═╡ 17deff8d-2f8f-4ce0-9bb6-d2b91b1c26a0 +verbosity = 1; + +# ╔═╡ a60fd81d-a540-496f-9507-7e155aa83f86 +md""" +Next, we initialize a random PEPS which will be used as an initial guess for the optimization. To get a PEPS with physical dimension 2 (since we have a spin-1/2 Hamiltonian) with complex-valued random Gaussian entries, we set: +""" + +# ╔═╡ c6af4fba-0b13-4c8c-971b-8955a34d16ae +peps₀ = InfinitePEPS(randn, ComplexF64, 2, Dbond); + +# ╔═╡ 1ba303c2-bd63-45c3-afcf-899f0660d363 +md""" +The last thing we need before we can start the optimization is an initial CTMRG environment. Typically, a random environment which we converge on `peps₀` serves as a good starting point: +""" + +# ╔═╡ 5aad67ec-7880-4688-ba2c-c567a0236a8a +env_random = CTMRGEnv(randn, ComplexF64, peps₀, ℂ^χenv); + +# ╔═╡ d74c45d4-31af-4e0a-8401-7e0003f90d99 +env₀, info_ctmrg = leading_boundary(env_random, peps₀; boundary_alg...); + +# ╔═╡ c8aa2838-8d6d-44b3-9c2a-302ab42aa1f9 +md""" +Besides the converged environment, `leading_boundary` also returns a `NamedTuple` of informational quantities such as the last (maximal) SVD truncation error: +""" + +# ╔═╡ 4c55e732-88e4-4327-9e43-ac40abd6bb63 +info_ctmrg.truncation_error + +# ╔═╡ 72a1eb41-30f2-4844-a934-eede6c3daf83 +md""" +Finally, we can start the optimization by calling `fixedpoint` on `H` with our settings for the boundary (CTMRG) algorithm and the optimizer: +""" + +# ╔═╡ cd246b3e-3172-4f22-ad67-9d3d5a5c0464 +peps, env, E, info_opt = fixedpoint( + H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity +); + +# ╔═╡ 96b429c0-25fe-411d-a016-7677819357af +md""" +Let's compare the optimized energy against an accurate Quantum Monte Carlo estimate by [Sandvik](@cite sandvik_computational_2011), where the energy per site was found to be ``E_{\text{ref}}=−0.6694421``. From our simple optimization we find: +""" + +# ╔═╡ 33174988-02f2-487f-a635-e40d35c120af +@show E; + +# ╔═╡ d57df214-05c1-428a-a45b-2876a582fb4f +md""" +While this energy is in the right ballpark, there is still quite some deviation from the accurate reference energy. This, however, can be attributed to the small bond dimension - an optimization with larger bond dimension would approach this value much more closely. + +A more reasonable comparison would be against another finite bond dimension PEPS simulation. For example, Juraj Hasik's data from ``J_1\text{-}J_2`` [PEPS simulations](https://github.com/jurajHasik/j1j2_ipeps_states/blob/main/single-site_pg-C4v-A1/j20.0/state_1s_A1_j20.0_D2_chi_opt48.dat) yields ``E_{D=2,\chi=16}=-0.660231\dots`` which is more in line with what we find here. +""" + +# ╔═╡ 7d743eb9-7969-486c-8d3b-f9b7cc78ba67 +md""" +In practice, in order to obtain an accurate and variational energy estimate, one would need to compute multiple energies at different environment dimensions and extrapolate in, e.g., the correlation length or the second gap of the transfer matrix spectrum. For that, we would need the `correlation_length` function, which computes the horizontal and vertical correlation lengths and transfer matrix spectra for all unit cell coordinates: +""" + +# ╔═╡ e1e3388e-4e0d-44ed-a7e0-1b04627406f1 +ξ_h, ξ_v, λ_h, λ_v = correlation_length(peps, env); + +# ╔═╡ 65b8dd1c-e09c-450b-8fa6-9718de1d79da +@show ξ_h ξ_v; + +# ╔═╡ 00000000-0000-0000-0000-000000000001 +PLUTO_PROJECT_TOML_CONTENTS = """ +[deps] +PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" +TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" + +[compat] +PEPSKit = "~0.5.0" +TensorKit = "~0.14.5" +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000002 +PLUTO_MANIFEST_TOML_CONTENTS = """ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.11.4" +manifest_format = "2.0" +project_hash = "95aa59c2c683c0e05c9f9d2d9af2d0980a4c8689" + +[[deps.AbstractFFTs]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.5.0" + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + AbstractFFTsTestExt = "Test" + + [deps.AbstractFFTs.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.Accessors]] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] +git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" +uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +version = "0.1.42" + + [deps.Accessors.extensions] + AxisKeysExt = "AxisKeys" + IntervalSetsExt = "IntervalSets" + LinearAlgebraExt = "LinearAlgebra" + StaticArraysExt = "StaticArrays" + StructArraysExt = "StructArrays" + TestExt = "Test" + UnitfulExt = "Unitful" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[[deps.Adapt]] +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "4.3.0" +weakdeps = ["SparseArrays", "StaticArrays"] + + [deps.Adapt.extensions] + AdaptSparseArraysExt = "SparseArrays" + AdaptStaticArraysExt = "StaticArrays" + +[[deps.ArrayLayouts]] +deps = ["FillArrays", "LinearAlgebra"] +git-tree-sha1 = "4e25216b8fea1908a0ce0f5d87368587899f75be" +uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.ArrayLayouts.extensions] + ArrayLayoutsSparseArraysExt = "SparseArrays" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" + +[[deps.BangBang]] +deps = ["Accessors", "ConstructionBase", "InitialValues", "LinearAlgebra"] +git-tree-sha1 = "26f41e1df02c330c4fa1e98d4aa2168fdafc9b1f" +uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" +version = "0.4.4" + + [deps.BangBang.extensions] + BangBangChainRulesCoreExt = "ChainRulesCore" + BangBangDataFramesExt = "DataFrames" + BangBangStaticArraysExt = "StaticArrays" + BangBangStructArraysExt = "StructArrays" + BangBangTablesExt = "Tables" + BangBangTypedTablesExt = "TypedTables" + + [deps.BangBang.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" + TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" + +[[deps.BlockArrays]] +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] +git-tree-sha1 = "f29a91240c147f107a8f66eb9ae631358fab35c9" +uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" +version = "1.6.0" + + [deps.BlockArrays.extensions] + BlockArraysAdaptExt = "Adapt" + BlockArraysBandedMatricesExt = "BandedMatrices" + + [deps.BlockArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + +[[deps.BlockTensorKit]] +deps = ["BlockArrays", "Compat", "LinearAlgebra", "Random", "Strided", "TensorKit", "TensorOperations", "TupleTools", "VectorInterface"] +git-tree-sha1 = "e0d455f2998aca33747def4f384c1aff5e3278de" +uuid = "5f87ffc2-9cf1-4a46-8172-465d160bd8cd" +version = "0.1.6" + +[[deps.ChainRules]] +deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "SparseInverseSubset", "Statistics", "StructArrays", "SuiteSparse"] +git-tree-sha1 = "a975ae558af61a2a48720a6271661bf2621e0f4e" +uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" +version = "1.72.3" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra"] +git-tree-sha1 = "1713c74e00545bfe14605d2a2be1712de8fbcb58" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.25.1" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" + +[[deps.ChunkSplitters]] +git-tree-sha1 = "63a3903063d035260f0f6eab00f517471c5dc784" +uuid = "ae650224-84b6-46f8-82ea-d812ca08434e" +version = "3.1.2" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.1" + +[[deps.Compat]] +deps = ["TOML", "UUIDs"] +git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.16.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "1.1.1+0" + +[[deps.CompositionsBase]] +git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" + +[[deps.ConstructionBase]] +git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.5.8" + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseLinearAlgebraExt = "LinearAlgebra" + ConstructionBaseStaticArraysExt = "StaticArrays" + + [deps.ConstructionBase.weakdeps] + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.DataAPI]] +git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.16.0" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" + +[[deps.DiffResults]] +deps = ["StaticArraysCore"] +git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.1.0" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.15.1" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" + +[[deps.DocStringExtensions]] +git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.4" + +[[deps.FillArrays]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "1.13.0" + + [deps.FillArrays.extensions] + FillArraysPDMatsExt = "PDMats" + FillArraysSparseArraysExt = "SparseArrays" + FillArraysStatisticsExt = "Statistics" + + [deps.FillArrays.weakdeps] + PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.FiniteDifferences]] +deps = ["ChainRulesCore", "LinearAlgebra", "Printf", "Random", "Richardson", "SparseArrays", "StaticArrays"] +git-tree-sha1 = "06d76c780d657729cf20821fb5832c6cc4dfd0b5" +uuid = "26cc04aa-876d-5657-8c51-4c34ba976000" +version = "0.12.32" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "1.0.1" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" + +[[deps.GPUArraysCore]] +deps = ["Adapt"] +git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" +uuid = "46192b85-c4d5-4398-a991-12ede77f4527" +version = "0.2.0" + +[[deps.HalfIntegers]] +git-tree-sha1 = "9c3149243abb5bc0bad0431d6c4fcac0f4443c7c" +uuid = "f0d1745a-41c9-11e9-1dd9-e5d34d218721" +version = "1.6.0" + +[[deps.HashArrayMappedTries]] +git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae" +uuid = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" +version = "0.2.0" + +[[deps.IRTools]] +deps = ["InteractiveUtils", "MacroTools"] +git-tree-sha1 = "950c3717af761bc3ff906c2e8e52bd83390b6ec2" +uuid = "7869d1d1-7146-5819-86e3-90919afe41df" +version = "0.4.14" + +[[deps.InitialValues]] +git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" +uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" +version = "0.3.1" + +[[deps.IntegerMathUtils]] +git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" +uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" +version = "0.1.2" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" + +[[deps.InverseFunctions]] +git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.17" + + [deps.InverseFunctions.extensions] + InverseFunctionsDatesExt = "Dates" + InverseFunctionsTestExt = "Test" + + [deps.InverseFunctions.weakdeps] + Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.2.4" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.7.0" + +[[deps.KrylovKit]] +deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"] +git-tree-sha1 = "38477816f8db29956ea591feb3086d9edabf6f38" +uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" +version = "0.9.5" +weakdeps = ["ChainRulesCore"] + + [deps.KrylovKit.extensions] + KrylovKitChainRulesCoreExt = "ChainRulesCore" + +[[deps.LRUCache]] +git-tree-sha1 = "5519b95a490ff5fe629c4a7aa3b3dfc9160498b3" +uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" +version = "1.6.2" +weakdeps = ["Serialization"] + + [deps.LRUCache.extensions] + SerializationExt = ["Serialization"] + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.11.0" + +[[deps.LogExpFunctions]] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.29" + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" + + [deps.LogExpFunctions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" + +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "1.0.3" + +[[deps.MPSKit]] +deps = ["Accessors", "BlockTensorKit", "Compat", "DocStringExtensions", "HalfIntegers", "KrylovKit", "LinearAlgebra", "LoggingExtras", "OhMyThreads", "OptimKit", "Printf", "Random", "RecipesBase", "TensorKit", "TensorKitManifolds", "TensorOperations", "VectorInterface"] +git-tree-sha1 = "588bef90e9672431efda1b686e8d477b621b2118" +uuid = "bb1c41ca-d63c-52ed-829e-0820dda26502" +version = "0.12.6" + +[[deps.MPSKitModels]] +deps = ["LinearAlgebra", "MPSKit", "MacroTools", "PrecompileTools", "TensorKit", "TensorOperations", "TupleTools"] +git-tree-sha1 = "d658f13d6b1c08304344faede50bebcc4f574b6f" +uuid = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" +version = "0.4.0" + +[[deps.MacroTools]] +git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.15" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.1.3" + +[[deps.OhMyThreads]] +deps = ["BangBang", "ChunkSplitters", "StableTasks", "TaskLocalValues"] +git-tree-sha1 = "5f81bdb937fd857bac9548fa8ab9390a06864bb5" +uuid = "67456a42-1dca-4109-a031-0a68de7e3ad5" +version = "0.7.0" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.27+1" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+4" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.6+0" + +[[deps.OptimKit]] +deps = ["LinearAlgebra", "Printf", "ScopedValues", "VectorInterface"] +git-tree-sha1 = "b0163ac202bc03aeb15f0e55002e544e74965534" +uuid = "77e91f04-9b3b-57a6-a776-40b61faaebe0" +version = "0.4.0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.8.0" + +[[deps.PEPSKit]] +deps = ["Accessors", "ChainRulesCore", "Compat", "FiniteDifferences", "KrylovKit", "LinearAlgebra", "LoggingExtras", "MPSKit", "MPSKitModels", "OhMyThreads", "OptimKit", "Printf", "Random", "Statistics", "TensorKit", "TensorOperations", "VectorInterface", "Zygote"] +git-tree-sha1 = "12c42d39d9c67070d5783cbd7ebb54ab957c6a09" +uuid = "52969e89-939e-4361-9b68-9bc7cde4bdeb" +version = "0.5.0" + +[[deps.PackageExtensionCompat]] +git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" +uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" +version = "1.0.2" +weakdeps = ["Requires", "TOML"] + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.2.1" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.4.3" + +[[deps.Primes]] +deps = ["IntegerMathUtils"] +git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" +uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" +version = "0.5.7" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" +version = "1.11.0" + +[[deps.PtrArrays]] +git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" +uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" +version = "1.3.0" + +[[deps.Random]] +deps = ["SHA"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" + +[[deps.RationalRoots]] +git-tree-sha1 = "e5f5db699187a4810fda9181b34250deeedafd81" +uuid = "308eb6b3-cc68-5ff3-9e97-c3c4da4fa681" +version = "0.2.1" + +[[deps.RealDot]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" +uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" +version = "0.1.0" + +[[deps.RecipesBase]] +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.4" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.1" + +[[deps.Richardson]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "48f038bfd83344065434089c2a79417f38715c41" +uuid = "708f8203-808e-40c0-ba2d-98a6953ed40d" +version = "1.4.2" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.ScopedValues]] +deps = ["HashArrayMappedTries", "Logging"] +git-tree-sha1 = "1147f140b4c8ddab224c94efa9569fc23d63ab44" +uuid = "7e506255-f358-4e82-b7e4-beb19740aa63" +version = "1.3.0" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" + +[[deps.SparseArrays]] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.11.0" + +[[deps.SparseInverseSubset]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "52962839426b75b3021296f7df242e40ecfc0852" +uuid = "dc90abb0-5640-4711-901d-7e5b23a2fada" +version = "0.1.2" + +[[deps.SpecialFunctions]] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "64cca0c26b4f31ba18f13f6c12af7c85f478cfde" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.5.0" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" + +[[deps.StableTasks]] +git-tree-sha1 = "c4f6610f85cb965bee5bfafa64cbeeda55a4e0b2" +uuid = "91464d47-22a1-43fe-8b7f-2d57ee82463f" +version = "0.1.7" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] +git-tree-sha1 = "0feb6b9031bd5c51f9072393eb5ab3efd31bf9e4" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.9.13" +weakdeps = ["ChainRulesCore", "Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" + StaticArraysStatisticsExt = "Statistics" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.4.3" + +[[deps.Statistics]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] + +[[deps.Strided]] +deps = ["LinearAlgebra", "StridedViews", "TupleTools"] +git-tree-sha1 = "4a1128f5237b5d0170d934a2eb4fa7a273639c9f" +uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" +version = "2.3.0" + +[[deps.StridedViews]] +deps = ["LinearAlgebra", "PackageExtensionCompat"] +git-tree-sha1 = "425158c52aa58d42593be6861befadf8b2541e9b" +uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" +version = "0.4.1" + + [deps.StridedViews.extensions] + StridedViewsCUDAExt = "CUDA" + StridedViewsPtrArraysExt = "PtrArrays" + + [deps.StridedViews.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + PtrArrays = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" + +[[deps.StructArrays]] +deps = ["ConstructionBase", "DataAPI", "Tables"] +git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.7.1" + + [deps.StructArrays.extensions] + StructArraysAdaptExt = "Adapt" + StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"] + StructArraysLinearAlgebraExt = "LinearAlgebra" + StructArraysSparseArraysExt = "SparseArrays" + StructArraysStaticArraysExt = "StaticArrays" + + [deps.StructArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.7.0+0" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.3" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.12.0" + +[[deps.TaskLocalValues]] +git-tree-sha1 = "d155450e6dff2a8bc2fcb81dcb194bd98b0aeb46" +uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" +version = "0.1.2" + +[[deps.TensorKit]] +deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "Random", "SparseArrays", "Strided", "TensorKitSectors", "TensorOperations", "TupleTools", "VectorInterface"] +git-tree-sha1 = "4a09ea843d18b7256f710f1188414433dcf0b7db" +uuid = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" +version = "0.14.5" +weakdeps = ["ChainRulesCore", "FiniteDifferences"] + + [deps.TensorKit.extensions] + TensorKitChainRulesCoreExt = "ChainRulesCore" + TensorKitFiniteDifferencesExt = "FiniteDifferences" + +[[deps.TensorKitManifolds]] +deps = ["LinearAlgebra", "TensorKit"] +git-tree-sha1 = "94530ac4691795834e2efacb2d31d37571dad52f" +uuid = "11fa318c-39cb-4a83-b1ed-cdc7ba1e3684" +version = "0.7.2" + +[[deps.TensorKitSectors]] +deps = ["HalfIntegers", "LinearAlgebra", "TensorOperations", "WignerSymbols"] +git-tree-sha1 = "fd15110964416b3ac3e7d1d212b0260e4629e536" +uuid = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f" +version = "0.1.4" + +[[deps.TensorOperations]] +deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Preferences", "PtrArrays", "Strided", "StridedViews", "TupleTools", "VectorInterface"] +git-tree-sha1 = "c7458aad3d855e892e2cae208a793a5fceee2406" +uuid = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" +version = "5.2.0" + + [deps.TensorOperations.extensions] + TensorOperationsBumperExt = "Bumper" + TensorOperationsChainRulesCoreExt = "ChainRulesCore" + TensorOperationscuTENSORExt = ["cuTENSOR", "CUDA"] + + [deps.TensorOperations.weakdeps] + Bumper = "8ce10254-0962-460f-a3d8-1f77fea1446e" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1" + +[[deps.TupleTools]] +git-tree-sha1 = "41e43b9dc950775eac654b9f845c839cd2f1821e" +uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" +version = "1.6.0" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" + +[[deps.VectorInterface]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9166406dedd38c111a6574e9814be83d267f8aec" +uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8" +version = "0.5.0" + +[[deps.WignerSymbols]] +deps = ["HalfIntegers", "LRUCache", "Primes", "RationalRoots"] +git-tree-sha1 = "960e5f708871c1d9a28a7f1dbcaf4e0ee34ee960" +uuid = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" +version = "2.0.0" + +[[deps.Zygote]] +deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] +git-tree-sha1 = "207d714f3514b0d564e3a08f9e9f753bf6566c2d" +uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" +version = "0.7.6" + + [deps.Zygote.extensions] + ZygoteAtomExt = "Atom" + ZygoteColorsExt = "Colors" + ZygoteDistancesExt = "Distances" + ZygoteTrackerExt = "Tracker" + + [deps.Zygote.weakdeps] + Atom = "c52e3926-4ff0-5f6e-af25-54175e0327b1" + Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" + Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.ZygoteRules]] +deps = ["ChainRulesCore", "MacroTools"] +git-tree-sha1 = "434b3de333c75fc446aa0d19fc394edafd07ab08" +uuid = "700de1a5-db45-46bc-99cf-38207098b444" +version = "0.2.7" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.11.0+0" +""" + +# ╔═╡ Cell order: +# ╟─ff6fa2f1-841d-42c6-acd9-b5f4cf6b7c76 +# ╠═7da39574-7c05-492e-abf9-10b9e8f1dda9 +# ╠═758d7f1a-b62f-400d-bf71-25410a7ce9c5 +# ╟─945f9d02-322b-47f0-85b2-f229e4d8c4d9 +# ╠═f87c548e-a8ff-4b21-b9a0-5ae06c1b7adb +# ╠═b40e0dbd-7136-4211-863d-3f489606a86c +# ╟─2e7b56ff-df31-48a3-91e9-a621bb545baa +# ╠═1f6330da-b1f5-4472-80f2-b19ff3c09e36 +# ╟─4f800808-aa72-46e3-ad6e-13c9852d8cd1 +# ╠═ec9157cb-2402-487d-a394-f237a9b8e056 +# ╟─d52a7418-6f4e-4ed3-80c8-a2b8f60fe664 +# ╠═0d6e6de5-2f75-466a-8367-a9d802897c6e +# ╟─65057067-de67-44ce-9882-c08101ebee6b +# ╠═17deff8d-2f8f-4ce0-9bb6-d2b91b1c26a0 +# ╟─a60fd81d-a540-496f-9507-7e155aa83f86 +# ╠═c6af4fba-0b13-4c8c-971b-8955a34d16ae +# ╟─1ba303c2-bd63-45c3-afcf-899f0660d363 +# ╠═5aad67ec-7880-4688-ba2c-c567a0236a8a +# ╠═d74c45d4-31af-4e0a-8401-7e0003f90d99 +# ╟─c8aa2838-8d6d-44b3-9c2a-302ab42aa1f9 +# ╠═4c55e732-88e4-4327-9e43-ac40abd6bb63 +# ╟─72a1eb41-30f2-4844-a934-eede6c3daf83 +# ╠═cd246b3e-3172-4f22-ad67-9d3d5a5c0464 +# ╟─96b429c0-25fe-411d-a016-7677819357af +# ╠═33174988-02f2-487f-a635-e40d35c120af +# ╟─d57df214-05c1-428a-a45b-2876a582fb4f +# ╟─7d743eb9-7969-486c-8d3b-f9b7cc78ba67 +# ╠═e1e3388e-4e0d-44ed-a7e0-1b04627406f1 +# ╠═65b8dd1c-e09c-450b-8fa6-9718de1d79da +# ╟─00000000-0000-0000-0000-000000000001 +# ╟─00000000-0000-0000-0000-000000000002 From b708f047510e626dad39549674e84f9ad7c6fb0d Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 11 Apr 2025 16:18:26 +0200 Subject: [PATCH 023/113] Update Heisenberg notebook and example --- examples/heisenberg.jl | 42 ++++++++++++-------------------- examples/notebooks/heisenberg.jl | 27 +++++++++++++++++--- 2 files changed, 39 insertions(+), 30 deletions(-) diff --git a/examples/heisenberg.jl b/examples/heisenberg.jl index 04394feb1..b6ecc52ee 100644 --- a/examples/heisenberg.jl +++ b/examples/heisenberg.jl @@ -1,31 +1,19 @@ -using LinearAlgebra -using TensorKit, OptimKit -using PEPSKit, KrylovKit +using Random; Random.seed!(2394823948) +using TensorKit, PEPSKit -# Square lattice Heisenberg Hamiltonian -# We use the parameters (J₁, J₂, J₃) = (-1, 1, -1) by default to capture -# the ground state in a single-site unit cell. This can be seen from -# sublattice rotating H from parameters (1, 1, 1) to (-1, 1, -1). -H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1) +# square lattice Heisenberg Hamiltonian, sublattice rotated to fit on a single-site unit cell +H = heisenberg_XYZ(InfiniteSquare()) -# Parameters -χbond = 2 -χenv = 20 -ctm_alg = SimultaneousCTMRG(; tol=1e-10, verbosity=2) -opt_alg = PEPSOptimize(; - boundary_alg=ctm_alg, - optimizer_alg=LBFGS(4; maxiter=100, gradtol=1e-4, verbosity=3), - gradient_alg=LinSolver(; solver_alg=GMRES(; tol=1e-6, maxiter=100)), - reuse_env=true, -) +# parameters and algorithms +Dbond = 2 +χenv = 16 +boundary_alg = (; tol=1e-10, trscheme=(; alg=:fixedspace)) +optimizer_alg = (; alg=:lbfgs, tol=1e-4, maxiter=100, lbfgs_memory=16) -# Ground state search -# We initialize a random PEPS with bond dimension χbond and from that converge -# a CTMRG environment with dimension χenv on the environment bonds before -# starting the optimization. The ground-state energy should approximately approach -# E/N = −0.6694421, which is a QMC estimate from https://arxiv.org/abs/1101.3281. -# Of course there is a noticable bias for small χbond and χenv. -ψ₀ = InfinitePEPS(2, χbond) -env₀, = leading_boundary(CTMRGEnv(ψ₀, ℂ^χenv), ψ₀, ctm_alg) -peps, env, E, = fixedpoint(H, ψ, env₀, opt_alg₀) +# initialize PEPS and environment +peps₀ = InfinitePEPS(2, Dbond) +env₀, = leading_boundary(CTMRGEnv(peps₀, ℂ^χenv), peps₀; boundary_alg...) + +# ground state search +peps, env, E, = fixedpoint(H, peps₀, env₀; boundary_alg, optimizer_alg, verbosity=1) @show E diff --git a/examples/notebooks/heisenberg.jl b/examples/notebooks/heisenberg.jl index 128e95440..ef7940d58 100644 --- a/examples/notebooks/heisenberg.jl +++ b/examples/notebooks/heisenberg.jl @@ -7,6 +7,9 @@ using InteractiveUtils # ╔═╡ 7da39574-7c05-492e-abf9-10b9e8f1dda9 using TensorKit, PEPSKit +# ╔═╡ 3e2bcf54-39f4-4147-9023-0744ee0b4009 +using Random; Random.seed!(123456789) + # ╔═╡ ff6fa2f1-841d-42c6-acd9-b5f4cf6b7c76 md""" # Optimizing the 2D Heisenberg model @@ -22,6 +25,11 @@ Here, we want to set ``J_x=J_y=J_z=1`` where the Heisenberg model is in the anti Let us get started by importing `TensorKit` and `PEPSKit`, and creating the Heisenberg Hamiltonian on an infinite square lattice: """ +# ╔═╡ d806d7b2-f25b-48d0-87e7-48acfbc93678 +md""" +We also want to fix the random seed of this example to make it deterministic: +""" + # ╔═╡ 758d7f1a-b62f-400d-bf71-25410a7ce9c5 H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1); @@ -96,7 +104,7 @@ Besides the converged environment, `leading_boundary` also returns a `NamedTuple """ # ╔═╡ 4c55e732-88e4-4327-9e43-ac40abd6bb63 -info_ctmrg.truncation_error +@show info_ctmrg.truncation_error; # ╔═╡ 72a1eb41-30f2-4844-a934-eede6c3daf83 md""" @@ -108,9 +116,17 @@ peps, env, E, info_opt = fixedpoint( H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity ); +# ╔═╡ 9647daa9-c730-4185-bd11-6a54a0ded025 +md""" +Note that `fixedpoint` returns the final optimized PEPS, the last converged environment, the final energy estimate as well as a `NamedTuple` of diagnostics. This allows us to, e.g., analyze the number of cost function calls or the history of gradient norms to evaluate the convergence rate: +""" + +# ╔═╡ c467848b-20ff-454e-b15b-00345ce6f29c +@show info_opt.fg_evaluations info_opt.gradnorms[1:10:end]; + # ╔═╡ 96b429c0-25fe-411d-a016-7677819357af md""" -Let's compare the optimized energy against an accurate Quantum Monte Carlo estimate by [Sandvik](@cite sandvik_computational_2011), where the energy per site was found to be ``E_{\text{ref}}=−0.6694421``. From our simple optimization we find: +Let's now compare the optimized energy against an accurate Quantum Monte Carlo estimate by [Sandvik](@cite sandvik_computational_2011), where the energy per site was found to be ``E_{\text{ref}}=−0.6694421``. From our simple optimization we find: """ # ╔═╡ 33174988-02f2-487f-a635-e40d35c120af @@ -138,6 +154,7 @@ In practice, in order to obtain an accurate and variational energy estimate, one PLUTO_PROJECT_TOML_CONTENTS = """ [deps] PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" [compat] @@ -151,7 +168,7 @@ PLUTO_MANIFEST_TOML_CONTENTS = """ julia_version = "1.11.4" manifest_format = "2.0" -project_hash = "95aa59c2c683c0e05c9f9d2d9af2d0980a4c8689" +project_hash = "79f58b0126713df51e6c54bffa8c6c88c0809a34" [[deps.AbstractFFTs]] deps = ["LinearAlgebra"] @@ -893,6 +910,8 @@ version = "5.11.0+0" # ╔═╡ Cell order: # ╟─ff6fa2f1-841d-42c6-acd9-b5f4cf6b7c76 # ╠═7da39574-7c05-492e-abf9-10b9e8f1dda9 +# ╟─d806d7b2-f25b-48d0-87e7-48acfbc93678 +# ╠═3e2bcf54-39f4-4147-9023-0744ee0b4009 # ╠═758d7f1a-b62f-400d-bf71-25410a7ce9c5 # ╟─945f9d02-322b-47f0-85b2-f229e4d8c4d9 # ╠═f87c548e-a8ff-4b21-b9a0-5ae06c1b7adb @@ -914,6 +933,8 @@ version = "5.11.0+0" # ╠═4c55e732-88e4-4327-9e43-ac40abd6bb63 # ╟─72a1eb41-30f2-4844-a934-eede6c3daf83 # ╠═cd246b3e-3172-4f22-ad67-9d3d5a5c0464 +# ╟─9647daa9-c730-4185-bd11-6a54a0ded025 +# ╠═c467848b-20ff-454e-b15b-00345ce6f29c # ╟─96b429c0-25fe-411d-a016-7677819357af # ╠═33174988-02f2-487f-a635-e40d35c120af # ╟─d57df214-05c1-428a-a45b-2876a582fb4f From b2a355814e787086ea2a5a9f8c9ca32bda207423 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 11 Apr 2025 17:12:44 +0200 Subject: [PATCH 024/113] Fix LocalOperator tuple index bug --- src/operators/localoperator.jl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/operators/localoperator.jl b/src/operators/localoperator.jl index 01bfc496a..22bdce765 100644 --- a/src/operators/localoperator.jl +++ b/src/operators/localoperator.jl @@ -14,7 +14,7 @@ and the terms are stored as a tuple of pairs of indices and operators. ## Constructors LocalOperator(lattice::Matrix{S}, terms::Pair...) - LocalOperator{T,S}(lattice::Matrix{S}, terms::T) where {T,S} # expert mode + LocalOperator{T,S}(lattice::Matrix{S}, terms::T) where {T,S} ## Examples @@ -31,9 +31,11 @@ struct LocalOperator{T<:Tuple,S} # Check if the indices of the operator are valid with themselves and the lattice for (inds, operator) in terms @assert operator isa AbstractTensorMap + @assert eltype(inds) <: CartesianIndex @assert numout(operator) == numin(operator) == length(inds) @assert spacetype(operator) == S + for i in 1:length(inds) @assert space(operator, i) == plattice[inds[i]] end @@ -52,7 +54,12 @@ function LocalOperator( relevant_terms = [] for inds in unique(allinds) operator = sum(alloperators[findall(==(inds), allinds)]) - norm(operator) > atol && push!(relevant_terms, inds => operator) + cinds = if !(eltype(inds) <: CartesianIndex) # force indices to be CartesianIndices + map(CartesianIndex, inds) + else + inds + end + norm(operator) > atol && push!(relevant_terms, cinds => operator) end terms_tuple = Tuple(relevant_terms) From afcd7739cc65d70b7f9122464faa7185f4c198c6 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 11 Apr 2025 17:15:40 +0200 Subject: [PATCH 025/113] Include observable evaluation in Heisenberg notebook --- examples/notebooks/heisenberg.jl | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/examples/notebooks/heisenberg.jl b/examples/notebooks/heisenberg.jl index ef7940d58..e24c977df 100644 --- a/examples/notebooks/heisenberg.jl +++ b/examples/notebooks/heisenberg.jl @@ -150,6 +150,30 @@ In practice, in order to obtain an accurate and variational energy estimate, one # ╔═╡ 65b8dd1c-e09c-450b-8fa6-9718de1d79da @show ξ_h ξ_v; +# ╔═╡ 585f04e3-b2ad-441b-aef8-f5e46e351335 +md""" +As a last thing, we want to see how we can compute expectation values of observables, given the optimized PEPS and its CTMRG environment. To compute, e.g., the magnetization, we first need to define the observable: +""" + +# ╔═╡ b62b44a2-8fb1-4d72-9657-ab68b91c5171 +σ_z = TensorMap([1.0 0.0; 0.0 -1.0], ℂ^2, ℂ^2) + +# ╔═╡ 72f3e01f-f2d7-4e1f-8241-331b3f0d8789 +md""" +In order to be able to contract it with the PEPS and environment, we define need to define a `LocalOperator` and specify on which physical spaces and sites the observable acts. That way, the PEPS-environment-operator contraction gets automatically generated (also works for multi-site operators!). See the [`LocalOperator`](@ref) docstring for more details. The magnetization is just a single-site observable, so we have: +""" + +# ╔═╡ 8d31b900-5841-4979-b2db-0abbadcc347c +M = LocalOperator(fill(ℂ^2, 1, 1), (CartesianIndex(1, 1),) => σ_z); + +# ╔═╡ 06a32163-887e-4eb5-960c-e153735f5f59 +md""" +To evaluate the expecation value, we call: +""" + +# ╔═╡ ff85c322-f16c-41e2-823a-95f194e6ad72 +@show expectation_value(peps, M, env); + # ╔═╡ 00000000-0000-0000-0000-000000000001 PLUTO_PROJECT_TOML_CONTENTS = """ [deps] @@ -941,5 +965,11 @@ version = "5.11.0+0" # ╟─7d743eb9-7969-486c-8d3b-f9b7cc78ba67 # ╠═e1e3388e-4e0d-44ed-a7e0-1b04627406f1 # ╠═65b8dd1c-e09c-450b-8fa6-9718de1d79da +# ╟─585f04e3-b2ad-441b-aef8-f5e46e351335 +# ╠═b62b44a2-8fb1-4d72-9657-ab68b91c5171 +# ╟─72f3e01f-f2d7-4e1f-8241-331b3f0d8789 +# ╠═8d31b900-5841-4979-b2db-0abbadcc347c +# ╟─06a32163-887e-4eb5-960c-e153735f5f59 +# ╠═ff85c322-f16c-41e2-823a-95f194e6ad72 # ╟─00000000-0000-0000-0000-000000000001 # ╟─00000000-0000-0000-0000-000000000002 From ef2d77c055965200bde5a4a75a750f1a6bc14296 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 11 Apr 2025 17:40:39 +0200 Subject: [PATCH 026/113] Update Heisenberg notebook and formatting --- examples/heisenberg.jl | 3 ++- examples/notebooks/heisenberg.jl | 32 +++++++++++++++++++++++--------- src/operators/localoperator.jl | 1 - 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/examples/heisenberg.jl b/examples/heisenberg.jl index b6ecc52ee..da2733881 100644 --- a/examples/heisenberg.jl +++ b/examples/heisenberg.jl @@ -1,5 +1,6 @@ -using Random; Random.seed!(2394823948) +using Random using TensorKit, PEPSKit +Random.seed!(2394823948) # square lattice Heisenberg Hamiltonian, sublattice rotated to fit on a single-site unit cell H = heisenberg_XYZ(InfiniteSquare()) diff --git a/examples/notebooks/heisenberg.jl b/examples/notebooks/heisenberg.jl index e24c977df..7ae5b564d 100644 --- a/examples/notebooks/heisenberg.jl +++ b/examples/notebooks/heisenberg.jl @@ -4,12 +4,12 @@ using Markdown using InteractiveUtils +# ╔═╡ 0c1fc02f-fd78-47d3-82c2-1c261472f61e +using Random + # ╔═╡ 7da39574-7c05-492e-abf9-10b9e8f1dda9 using TensorKit, PEPSKit -# ╔═╡ 3e2bcf54-39f4-4147-9023-0744ee0b4009 -using Random; Random.seed!(123456789) - # ╔═╡ ff6fa2f1-841d-42c6-acd9-b5f4cf6b7c76 md""" # Optimizing the 2D Heisenberg model @@ -21,13 +21,24 @@ H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S ``` Here, we want to set ``J_x=J_y=J_z=1`` where the Heisenberg model is in the antiferromagnetic regime. Due to the bipartite sublattice structure of antiferromagnetic order one needs a PEPS ansatz with a ``2 \times 2`` unit cell. This can be circumvented by performing a unitary sublattice rotation on all B-sites resulting in a change of parameters to ``(J_x, J_y, J_z)=(-1, 1, -1)``. This gives us a unitarily equivalent Hamiltonian (with the same spectrum) with a ground state on a single-site unit cell. - -Let us get started by importing `TensorKit` and `PEPSKit`, and creating the Heisenberg Hamiltonian on an infinite square lattice: """ # ╔═╡ d806d7b2-f25b-48d0-87e7-48acfbc93678 md""" -We also want to fix the random seed of this example to make it deterministic: +Let us get started by fixing the random seed of this example to make it deterministic: +""" + +# ╔═╡ ba0e9dc8-1641-4c85-896d-2d335094ecc2 +Random.seed!(123456789); + +# ╔═╡ d463e7d9-499f-4689-bf04-260cef0af6ce +md""" +We're going to need only two packages: `TensorKit`, since we use that for all the underlying tensor operations, and `PEPSKit` itself. So let us import these: +""" + +# ╔═╡ d42f7ddd-eb20-4441-b7e7-38b1d4996084 +md""" +To create the sublattice rotated Heisenberg Hamiltonian on an infinite square lattice, we use: """ # ╔═╡ 758d7f1a-b62f-400d-bf71-25410a7ce9c5 @@ -113,7 +124,7 @@ Finally, we can start the optimization by calling `fixedpoint` on `H` with our s # ╔═╡ cd246b3e-3172-4f22-ad67-9d3d5a5c0464 peps, env, E, info_opt = fixedpoint( - H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity + H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity ); # ╔═╡ 9647daa9-c730-4185-bd11-6a54a0ded025 @@ -933,9 +944,12 @@ version = "5.11.0+0" # ╔═╡ Cell order: # ╟─ff6fa2f1-841d-42c6-acd9-b5f4cf6b7c76 -# ╠═7da39574-7c05-492e-abf9-10b9e8f1dda9 # ╟─d806d7b2-f25b-48d0-87e7-48acfbc93678 -# ╠═3e2bcf54-39f4-4147-9023-0744ee0b4009 +# ╠═0c1fc02f-fd78-47d3-82c2-1c261472f61e +# ╠═ba0e9dc8-1641-4c85-896d-2d335094ecc2 +# ╟─d463e7d9-499f-4689-bf04-260cef0af6ce +# ╠═7da39574-7c05-492e-abf9-10b9e8f1dda9 +# ╟─d42f7ddd-eb20-4441-b7e7-38b1d4996084 # ╠═758d7f1a-b62f-400d-bf71-25410a7ce9c5 # ╟─945f9d02-322b-47f0-85b2-f229e4d8c4d9 # ╠═f87c548e-a8ff-4b21-b9a0-5ae06c1b7adb diff --git a/src/operators/localoperator.jl b/src/operators/localoperator.jl index 22bdce765..c56d1496a 100644 --- a/src/operators/localoperator.jl +++ b/src/operators/localoperator.jl @@ -35,7 +35,6 @@ struct LocalOperator{T<:Tuple,S} @assert numout(operator) == numin(operator) == length(inds) @assert spacetype(operator) == S - for i in 1:length(inds) @assert space(operator, i) == plattice[inds[i]] end From d32d7506a7dcd48882c3b17c4526e1025920ab7d Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 11 Apr 2025 17:50:11 +0200 Subject: [PATCH 027/113] Fix crossref --- docs/src/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index d71739823..ae49235e3 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -50,11 +50,11 @@ peps, env, E, = fixedpoint(H, peps₀, env₀; tol=grad_tol, boundary_alg=(; tol @show E # -0.6625... ``` -For a more in-depth explanation of this simple example, check the [ ](@ref) notebook or consult the Manual pages. +For a more in-depth explanation of this simple example, check the [Optimizing the 2D Heisenberg model](@ref) notebook or consult the Manual pages. ## Table of contents -A detailed rundown of PEPSKit's features can be found in the [Manual](@ref) section, including: +A detailed rundown of PEPSKit's features can be found in the Manual section, including: ```@contents Pages = ["man/states.md", "man/environments.md", "man/operators.md", "man/peps_optimization.md", "man/symmetries.md", "man/multi_threading.md", "man/precompilation.md"] From 10d1154e68371514c9e2e0a295f062d379f91080 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Mon, 14 Apr 2025 10:42:35 +0200 Subject: [PATCH 028/113] Fix more crossreferences --- docs/src/examples/index.md | 3 ++- docs/src/index.md | 9 ++------- examples/notebooks/heisenberg.jl | 4 ++-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/docs/src/examples/index.md b/docs/src/examples/index.md index f33fdb82b..3274a3738 100644 --- a/docs/src/examples/index.md +++ b/docs/src/examples/index.md @@ -1 +1,2 @@ -For now, refer to the [examples folder](https://github.com/QuantumKitHub/PEPSKit.jl/tree/master/examples) on GitHub. \ No newline at end of file +# [Examples](@id examples_index) + diff --git a/docs/src/index.md b/docs/src/index.md index ae49235e3..19083eafd 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -50,7 +50,7 @@ peps, env, E, = fixedpoint(H, peps₀, env₀; tol=grad_tol, boundary_alg=(; tol @show E # -0.6625... ``` -For a more in-depth explanation of this simple example, check the [Optimizing the 2D Heisenberg model](@ref) notebook or consult the Manual pages. +For a more in-depth explanation of this simple example, check the Examples or consult the Manual pages. ## Table of contents @@ -61,9 +61,4 @@ Pages = ["man/states.md", "man/environments.md", "man/operators.md", "man/peps_o Depth = 1 ``` -Additionally, we provide a list of commented example notebooks in the [Examples](@ref) section: - -```@contents -Pages = ["examples/notebook.md"] -Depth = 1 -``` +Additionally, we provide a list of commented example notebooks in the [Examples](@ref examples_index) section. diff --git a/examples/notebooks/heisenberg.jl b/examples/notebooks/heisenberg.jl index 7ae5b564d..ff3496a59 100644 --- a/examples/notebooks/heisenberg.jl +++ b/examples/notebooks/heisenberg.jl @@ -12,7 +12,7 @@ using TensorKit, PEPSKit # ╔═╡ ff6fa2f1-841d-42c6-acd9-b5f4cf6b7c76 md""" -# Optimizing the 2D Heisenberg model +# [Optimizing the 2D Heisenberg model](@id examples_heisenberg) In this example we want to provide a basic rundown of PEPSKit's optimization workflow for PEPS. To that end, we will consider the two-dimensional Heisenberg model on a square lattice @@ -124,7 +124,7 @@ Finally, we can start the optimization by calling `fixedpoint` on `H` with our s # ╔═╡ cd246b3e-3172-4f22-ad67-9d3d5a5c0464 peps, env, E, info_opt = fixedpoint( - H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity + H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity ); # ╔═╡ 9647daa9-c730-4185-bd11-6a54a0ded025 From 1a91b3f884e8fc6e9f57667f1307a9dd8daadd37 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Mon, 14 Apr 2025 15:34:21 +0200 Subject: [PATCH 029/113] Add VUMPS notebook example --- docs/make.jl | 5 +- docs/src/assets/pepskit.bib | 15 +++ docs/src/examples/heisenberg.md | 170 +++++++++++++++++++++++++++++++ docs/src/examples/index.md | 2 - docs/src/examples/notebook.md | 43 -------- examples/README.md | 2 +- examples/boundary_mps.jl | 23 +++-- examples/notebooks/heisenberg.jl | 20 ++-- examples/notebooks/notebook.jl | 19 ---- 9 files changed, 221 insertions(+), 78 deletions(-) create mode 100644 docs/src/examples/heisenberg.md delete mode 100644 docs/src/examples/index.md delete mode 100644 docs/src/examples/notebook.md delete mode 100644 examples/notebooks/notebook.jl diff --git a/docs/make.jl b/docs/make.jl index c0408eef3..2fe17b08a 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -42,7 +42,10 @@ mathengine = MathJax3( ), ) -examples = ["Notebook Example" => "examples/notebook.md"] +examples = [ + "Examples" => "examples/index.md", + "Optimizing the 2D Heisenberg model" => "examples/heisenberg.md", +] makedocs(; modules=[PEPSKit], diff --git a/docs/src/assets/pepskit.bib b/docs/src/assets/pepskit.bib index e9255f51b..b29039e65 100644 --- a/docs/src/assets/pepskit.bib +++ b/docs/src/assets/pepskit.bib @@ -39,3 +39,18 @@ @article{sandvik_computational_2011 doi = {10.1063/1.3518900}, url = {https://doi.org/10.1063/1.3518900} } + +@article{vanderstraeten_residual_2018, + title = {Residual entropies for three-dimensional frustrated spin systems with tensor networks}, + author = {Vanderstraeten, Laurens and Vanhecke, Bram and Verstraete, Frank}, + journal = {Phys. Rev. E}, + volume = {98}, + issue = {4}, + pages = {042145}, + numpages = {8}, + year = {2018}, + month = {Oct}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevE.98.042145}, + url = {https://link.aps.org/doi/10.1103/PhysRevE.98.042145} +} diff --git a/docs/src/examples/heisenberg.md b/docs/src/examples/heisenberg.md new file mode 100644 index 000000000..3c1553d92 --- /dev/null +++ b/docs/src/examples/heisenberg.md @@ -0,0 +1,170 @@ +```@raw html + + + + + +

Optimizing the 2D Heisenberg model

In this example we want to provide a basic rundown of PEPSKit's optimization workflow for PEPS. To that end, we will consider the two-dimensional Heisenberg model on a square lattice

$$H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j$$

Here, we want to set \(J_x=J_y=J_z=1\) where the Heisenberg model is in the antiferromagnetic regime. Due to the bipartite sublattice structure of antiferromagnetic order one needs a PEPS ansatz with a \(2 \times 2\) unit cell. This can be circumvented by performing a unitary sublattice rotation on all B-sites resulting in a change of parameters to \((J_x, J_y, J_z)=(-1, 1, -1)\). This gives us a unitarily equivalent Hamiltonian (with the same spectrum) with a ground state on a single-site unit cell.

+ + +

Let us get started by fixing the random seed of this example to make it deterministic:

+ +
using Random
+ + +
Random.seed!(123456789);
+ + + +

We're going to need only two packages: TensorKit, since we use that for all the underlying tensor operations, and PEPSKit itself. So let us import these:

+ +
using TensorKit, PEPSKit
+ + + +

To create the sublattice rotated Heisenberg Hamiltonian on an infinite square lattice, we use:

+ +
H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1);
+ + + +

Next, we set the simulation parameters. During optimization, the PEPS will be contracted using CTMRG and the PEPS gradient will be computed by differentiating through the CTMRG routine using AD. Since the algorithmic stack that implements this is rather elaborate, the amount of settings one can configure is also quite large. To reduce this complexity, PEPSKit defaults to (presumably) reasonable settings which also dynamically adapts to the user-specified parameters.

First, we set the bond dimension Dbond of the virtual PEPS indices and the environment dimension χenv of the virtual corner and transfer matrix indices.

+ +
Dbond = 2;
+ + +
χenv = 16;
+ + + +

To configure the CTMRG algorithm, we create a NamedTuple containing different keyword arguments. To see a description of all arguments, see the docstring of leading_boundary. Here, we want to converge the CTMRG environments up to a specific tolerance and during the CTMRG run keep all index dimensions fixed:

+ +
boundary_alg = (; tol=1e-10, trscheme=(; alg=:fixedspace));
+ + + +

Let us also configure the optimizer algorithm. We are going to optimize the PEPS using the L-BFGS optimizer from OptimKit. Again, we specify the convergence tolerance (for the gradient norm) as well as the maximal number of iterations and the BFGS memory size (which is used to approximate the Hessian):

+ +
optimizer_alg = (; alg=:lbfgs, tol=1e-4, maxiter=100, lbfgs_memory=16);
+ + + +

Additionally, during optimization, we want to reuse the previous CTMRG environment to initialize the CTMRG run of the current optimization step:

+ +
reuse_env = true;
+ + + +

And to control the output information, we set the verbosity:

+ +
verbosity = 1;
+ + + +

Next, we initialize a random PEPS which will be used as an initial guess for the optimization. To get a PEPS with physical dimension 2 (since we have a spin-1/2 Hamiltonian) with complex-valued random Gaussian entries, we set:

+ +
peps₀ = InfinitePEPS(randn, ComplexF64, 2, Dbond);
+ + + +

The last thing we need before we can start the optimization is an initial CTMRG environment. Typically, a random environment which we converge on peps₀ serves as a good starting point:

+ +
env_random = CTMRGEnv(randn, ComplexF64, peps₀, ℂ^χenv);
+ + +
env₀, info_ctmrg = leading_boundary(env_random, peps₀; boundary_alg...);
+ + + +

Besides the converged environment, leading_boundary also returns a NamedTuple of informational quantities such as the last (maximal) SVD truncation error:

+ +
@show info_ctmrg.truncation_error;
+ + + +

Finally, we can start the optimization by calling fixedpoint on H with our settings for the boundary (CTMRG) algorithm and the optimizer:

+ +
peps, env, E, info_opt = fixedpoint(
+    H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity
+);
+ + + +

Note that fixedpoint returns the final optimized PEPS, the last converged environment, the final energy estimate as well as a NamedTuple of diagnostics. This allows us to, e.g., analyze the number of cost function calls or the history of gradient norms to evaluate the convergence rate:

+ +
@show info_opt.fg_evaluations info_opt.gradnorms[1:10:end];
+ + + +

Let's now compare the optimized energy against an accurate Quantum Monte Carlo estimate by Sandvik, where the energy per site was found to be \(E_{\text{ref}}=−0.6694421\). From our simple optimization we find:

+ +
@show E;
+ + + +

While this energy is in the right ballpark, there is still quite some deviation from the accurate reference energy. This, however, can be attributed to the small bond dimension - an optimization with larger bond dimension would approach this value much more closely.

A more reasonable comparison would be against another finite bond dimension PEPS simulation. For example, Juraj Hasik's data from \(J_1\text{-}J_2\)PEPS simulations yields \(E_{D=2,\chi=16}=-0.660231\dots\) which is more in line with what we find here.

+ + +

In practice, in order to obtain an accurate and variational energy estimate, one would need to compute multiple energies at different environment dimensions and extrapolate in, e.g., the correlation length or the second gap of the transfer matrix spectrum. For that, we would need the correlation_length function, which computes the horizontal and vertical correlation lengths and transfer matrix spectra for all unit cell coordinates:

+ +
ξ_h, ξ_v, λ_h, λ_v = correlation_length(peps, env);
+ + +
@show ξ_h ξ_v;
+ + + +

As a last thing, we want to see how we can compute expectation values of observables, given the optimized PEPS and its CTMRG environment. To compute, e.g., the magnetization, we first need to define the observable:

+ +
σ_z = TensorMap([1.0 0.0; 0.0 -1.0], ℂ^2, ℂ^2)
+
TensorMap(ℂ^2 ← ℂ^2):
+ 1.0   0.0
+ 0.0  -1.0
+
+ + +

In order to be able to contract it with the PEPS and environment, we define need to define a LocalOperator and specify on which physical spaces and sites the observable acts. That way, the PEPS-environment-operator contraction gets automatically generated (also works for multi-site operators!). See the LocalOperator docstring for more details. The magnetization is just a single-site observable, so we have:

+ +
M = LocalOperator(fill(ℂ^2, 1, 1), (CartesianIndex(1, 1),) => σ_z);
+ + + +

To evaluate the expecation value, we call:

+ +
@show expectation_value(peps, M, env);
+ +
+

Built with Julia 1.11.4 and

+PEPSKit 0.5.0
+Random 1.11.0
+TensorKit 0.14.5 +
+ + +``` + diff --git a/docs/src/examples/index.md b/docs/src/examples/index.md deleted file mode 100644 index 3274a3738..000000000 --- a/docs/src/examples/index.md +++ /dev/null @@ -1,2 +0,0 @@ -# [Examples](@id examples_index) - diff --git a/docs/src/examples/notebook.md b/docs/src/examples/notebook.md deleted file mode 100644 index caad41876..000000000 --- a/docs/src/examples/notebook.md +++ /dev/null @@ -1,43 +0,0 @@ -```@raw html - - - - - -

Example

This is an example notebook to show that everything is working

- -
1 + 1
-
2
-
-

Built with Julia 1.11.4 and

- -
- - -``` - diff --git a/examples/README.md b/examples/README.md index 1a53cdbca..8039cdd3c 100644 --- a/examples/README.md +++ b/examples/README.md @@ -17,7 +17,7 @@ By default, examples that haven't changed since the last build are not re-run. Note that Pluto uses its own package management system, which will use the latest registered version of this package. This ensures the examples are always reproducible by themselves. -Howeer, this also means that when registering a new version of this package, the next step is to re-run the examples to ensure that they are up-to-date, and build a new version of the documentation. +However, this also means that when registering a new version of this package, the next step is to re-run the examples to ensure that they are up-to-date, and build a new version of the documentation. Alternatively, we can decide to manually keep a local environment for the examples by using `examples/Project.toml` and including the following block: diff --git a/examples/boundary_mps.jl b/examples/boundary_mps.jl index 1f8ccbbb3..f74a7bf84 100644 --- a/examples/boundary_mps.jl +++ b/examples/boundary_mps.jl @@ -1,10 +1,7 @@ using Random -using PEPSKit +Random.seed!(29384293742893) using TensorKit -using MPSKit -using LinearAlgebra - -include("ising_pepo.jl") +using PEPSKit, MPSKit # This example demonstrates some boundary-MPS methods for working with 2D projected # entangled-pair states and operators. @@ -12,7 +9,6 @@ include("ising_pepo.jl") ## Computing a PEPS norm # We start by initializing a random initial infinite PEPS -Random.seed!(29384293742893) peps = InfinitePEPS(ComplexSpace(2), ComplexSpace(2)) # To compute its norm, we start by constructing the transfer operator corresponding to @@ -73,6 +69,21 @@ N2´ = abs(norm(peps2, ctm2)) # function of 3D classical ising model with our random PEPS from before and evaluate # . +function ising_pepo(beta; unitcell=(1, 1, 1)) + t = ComplexF64[exp(beta) exp(-beta); exp(-beta) exp(beta)] + q = sqrt(t) + + O = zeros(2, 2, 2, 2, 2, 2) + O[1, 1, 1, 1, 1, 1] = 1 + O[2, 2, 2, 2, 2, 2] = 1 + @tensor o[-1 -2; -3 -4 -5 -6] := + O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] + + O = TensorMap(o, ℂ^2 ⊗ (ℂ^2)' ← ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)') + + return InfinitePEPO(O; unitcell) +end + pepo = ising_pepo(1) T3 = InfiniteTransferPEPO(peps, pepo, 1, 1) diff --git a/examples/notebooks/heisenberg.jl b/examples/notebooks/heisenberg.jl index ff3496a59..fb7f8ff2d 100644 --- a/examples/notebooks/heisenberg.jl +++ b/examples/notebooks/heisenberg.jl @@ -12,7 +12,7 @@ using TensorKit, PEPSKit # ╔═╡ ff6fa2f1-841d-42c6-acd9-b5f4cf6b7c76 md""" -# [Optimizing the 2D Heisenberg model](@id examples_heisenberg) +# Optimizing the 2D Heisenberg model In this example we want to provide a basic rundown of PEPSKit's optimization workflow for PEPS. To that end, we will consider the two-dimensional Heisenberg model on a square lattice @@ -115,7 +115,7 @@ Besides the converged environment, `leading_boundary` also returns a `NamedTuple """ # ╔═╡ 4c55e732-88e4-4327-9e43-ac40abd6bb63 -@show info_ctmrg.truncation_error; +info_ctmrg.truncation_error # ╔═╡ 72a1eb41-30f2-4844-a934-eede6c3daf83 md""" @@ -133,7 +133,10 @@ Note that `fixedpoint` returns the final optimized PEPS, the last converged envi """ # ╔═╡ c467848b-20ff-454e-b15b-00345ce6f29c -@show info_opt.fg_evaluations info_opt.gradnorms[1:10:end]; +@show info_opt.fg_evaluations + +# ╔═╡ c7edf6a8-f743-47dc-bba4-bd9522bb6664 +@show info_opt.gradnorms[1:10:end] # ╔═╡ 96b429c0-25fe-411d-a016-7677819357af md""" @@ -141,7 +144,7 @@ Let's now compare the optimized energy against an accurate Quantum Monte Carlo e """ # ╔═╡ 33174988-02f2-487f-a635-e40d35c120af -@show E; +@show E # ╔═╡ d57df214-05c1-428a-a45b-2876a582fb4f md""" @@ -159,7 +162,10 @@ In practice, in order to obtain an accurate and variational energy estimate, one ξ_h, ξ_v, λ_h, λ_v = correlation_length(peps, env); # ╔═╡ 65b8dd1c-e09c-450b-8fa6-9718de1d79da -@show ξ_h ξ_v; +@show ξ_h + +# ╔═╡ e032acf0-06dd-4b32-b41f-ea007aa07dfb +@show ξ_v # ╔═╡ 585f04e3-b2ad-441b-aef8-f5e46e351335 md""" @@ -183,7 +189,7 @@ To evaluate the expecation value, we call: """ # ╔═╡ ff85c322-f16c-41e2-823a-95f194e6ad72 -@show expectation_value(peps, M, env); +@show expectation_value(peps, M, env) # ╔═╡ 00000000-0000-0000-0000-000000000001 PLUTO_PROJECT_TOML_CONTENTS = """ @@ -973,12 +979,14 @@ version = "5.11.0+0" # ╠═cd246b3e-3172-4f22-ad67-9d3d5a5c0464 # ╟─9647daa9-c730-4185-bd11-6a54a0ded025 # ╠═c467848b-20ff-454e-b15b-00345ce6f29c +# ╠═c7edf6a8-f743-47dc-bba4-bd9522bb6664 # ╟─96b429c0-25fe-411d-a016-7677819357af # ╠═33174988-02f2-487f-a635-e40d35c120af # ╟─d57df214-05c1-428a-a45b-2876a582fb4f # ╟─7d743eb9-7969-486c-8d3b-f9b7cc78ba67 # ╠═e1e3388e-4e0d-44ed-a7e0-1b04627406f1 # ╠═65b8dd1c-e09c-450b-8fa6-9718de1d79da +# ╠═e032acf0-06dd-4b32-b41f-ea007aa07dfb # ╟─585f04e3-b2ad-441b-aef8-f5e46e351335 # ╠═b62b44a2-8fb1-4d72-9657-ab68b91c5171 # ╟─72f3e01f-f2d7-4e1f-8241-331b3f0d8789 diff --git a/examples/notebooks/notebook.jl b/examples/notebooks/notebook.jl deleted file mode 100644 index 815e60c00..000000000 --- a/examples/notebooks/notebook.jl +++ /dev/null @@ -1,19 +0,0 @@ -### A Pluto.jl notebook ### -# v0.20.4 - -using Markdown -using InteractiveUtils - -# ╔═╡ c883b618-0593-11f0-176c-f56c237bc8ed -md""" -# Example - -This is an example notebook to show that everything is working -""" - -# ╔═╡ 85a7b5f7-e5ca-4b36-aaa9-ebc5215c8cbe -1 + 1 - -# ╔═╡ Cell order: -# ╠═c883b618-0593-11f0-176c-f56c237bc8ed -# ╠═85a7b5f7-e5ca-4b36-aaa9-ebc5215c8cbe From c0b2a0ae0da234f6e0cfd5d25ef89f8217142ca6 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Mon, 14 Apr 2025 15:54:57 +0200 Subject: [PATCH 030/113] Render complete bibliography (since example notebooks can't cite directly) --- docs/src/references.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/references.md b/docs/src/references.md index 78f29bc41..da17eb062 100644 --- a/docs/src/references.md +++ b/docs/src/references.md @@ -1,4 +1,5 @@ # References ```@bibliography +* ``` From 3bc17ad858d691762b4226b92ab11fc2d695ed36 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Mon, 14 Apr 2025 15:55:14 +0200 Subject: [PATCH 031/113] Remove old Heisenberg and boundary MPS scripts --- docs/src/examples/boundary_mps.md | 177 ++++++ docs/src/examples/heisenberg.md | 32 +- examples/boundary_mps.jl | 97 --- examples/heisenberg.jl | 20 - examples/ising_pepo.jl | 23 - examples/notebooks/boundary_mps.jl | 974 +++++++++++++++++++++++++++++ 6 files changed, 1174 insertions(+), 149 deletions(-) create mode 100644 docs/src/examples/boundary_mps.md delete mode 100644 examples/boundary_mps.jl delete mode 100644 examples/heisenberg.jl delete mode 100644 examples/ising_pepo.jl create mode 100644 examples/notebooks/boundary_mps.jl diff --git a/docs/src/examples/boundary_mps.md b/docs/src/examples/boundary_mps.md new file mode 100644 index 000000000..5f8e46440 --- /dev/null +++ b/docs/src/examples/boundary_mps.md @@ -0,0 +1,177 @@ +```@raw html + + + + + +

Boundary MPS contractions using VUMPS and PEPOs

Instead of using CTMRG to contract an infinite PEPS, one can also use an boundary MPSs ansatz to contract the infinite network. In particular, we will here use VUMPS to do so.

Before we start, we'll fix the random seed for reproducability:

+ +
using Random
+ + +
Random.seed!(29384293742893);
+ + + +

Besides TensorKit and PEPSKit, we here also need MPSKit which implements the VUMPS algorithm as well as the required MPS operations:

+ +
using TensorKit, PEPSKit, MPSKit
+ + + +``` +## Computing a PEPS norm +```@raw html +
+

We start by initializing a random initial infinite PEPS:

+ +
peps₀ = InfinitePEPS(ComplexSpace(2), ComplexSpace(2));
+ + + +

To compute its norm, we need to construct the transfer operator corresponding to the partition function representing the overlap \(\langle \psi_\text{PEPS} | \psi_\text{PEPS} \rangle\):

+ +
transfer = InfiniteTransferPEPS(peps₀, 1, 1);
+ + + +

We then find its leading boundary MPS fixed point, where the corresponding eigenvalue encodes the norm of the state. To that end, let us first we build an initial guess for the boundary MPS, choosing a bond dimension of 20:

+ +
mps₀ = initializeMPS(transfer, [ComplexSpace(20)]);
+ + + +

Note that this will just construct a MPS with random Gaussian entries based on the virtual spaces of the supplied transfer operator. Of course, one might come up with a better initial guess (leading to better convergence) depending on the application. To find the leading boundary MPS fixed point, we call leading_boundary using the VUMPS algorithm from MPSKit:

+ +
mps, env, ϵ = leading_boundary(mps₀, transfer, VUMPS(; verbosity=2));
+ + + +

The norm of the state per unit cell is then given by the expectation value \(\langle \psi_\text{MPS} | \mathbb{T} | \psi_\text{MPS} \rangle\):

+ +
norm_vumps = abs(prod(expectation_value(mps, transfer)));
+ + + +

This can be compared to the result obtained using CTMRG, where we see that the results match:

+ +
env_ctmrg, = leading_boundary(CTMRGEnv(peps₀, ComplexSpace(20)), peps₀; verbosity=2);
+ + +
norm_ctmrg = abs(norm(peps₀, env_ctmrg));
+ + +
@show abs(norm_vumps - norm_ctmrg) / norm_vumps
+
3.1316590722294163e-7
+ + +``` +## Working with unit cells +```@raw html +
+

For PEPS with non-trivial unit cells, the principle is exactly the same. The only difference is that now the transfer operator of the PEPS norm partition function has multiple lines, each of which can be represented by an InfiniteTransferPEPS object. Such a multi-line transfer operator is represented by a MultilineTransferPEPS object. In this case, the boundary MPS is an MultilineMPS object, which should be initialized by specifying a virtual space for each site in the partition function unit cell.

First, we construct a PEPS with a \(2 \times 2\) unit cell using the unitcell keyword argument and then define the corresponding transfer PEPS:

+ +
peps₀_2x2 = InfinitePEPS(ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2));
+ + +
transfer_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1);
+ + + +

Now, the procedure is the same as before: We compute the norm once using VUMPS, once using CTMRG and then compare.

+ +
begin
+    mps₀_2x2 = initializeMPS(transfer_2x2, fill(ComplexSpace(20), 2, 2))
+    mps_2x2, = leading_boundary(mps₀_2x2, transfer_2x2, VUMPS(; verbosity=2))
+    norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, transfer_2x2)))
+
+    env_ctmrg_2x2, = leading_boundary(
+        CTMRGEnv(peps₀_2x2, ComplexSpace(20)), peps₀_2x2; verbosity=2 
+    )
+    norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2))
+    
+    @show abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps
+end
+
0.046417037097529805
+ + +

Again, the results are compatible. Note that for larger unit cells and non-Hermitian PEPS the VUMPS algorithm may become unstable, in which case the CTMRG algorithm is recommended.

Contracting PEPO overlaps

Using exactly the same machinery, we can contract partition functions which encode the expectation value of a PEPO for a given PEPS state. As an example, we can consider the overlap of the PEPO correponding to the partition function of 3D classical Ising model with our random PEPS from before and evaluate the overlap \(\langle \psi_\text{PEPS} | O_\text{PEPO} | \psi_\text{PEPS} \rangle\).

The classical Ising PEPO is defined as follows:

+ +
function ising_pepo(β; unitcell=(1, 1, 1))
+    t = ComplexF64[exp(β) exp(-β); exp(-β) exp(β)]
+    q = sqrt(t)
+
+    O = zeros(2, 2, 2, 2, 2, 2)
+    O[1, 1, 1, 1, 1, 1] = 1
+    O[2, 2, 2, 2, 2, 2] = 1
+    @tensor o[-1 -2; -3 -4 -5 -6] :=
+        O[1 2; 3 4 5 6] * 
+        q[-1; 1] *
+        q[-2; 2] *
+        q[-3; 3] *
+        q[-4; 4] *
+        q[-5; 5] *
+        q[-6; 6]
+    O = TensorMap(o, ℂ^2 ⊗ (ℂ^2)' ← ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')
+
+    return InfinitePEPO(O; unitcell)
+end;
+ + + +

To evaluate the overlap, we instantiate the PEPO and the corresponding InfiniteTransferPEPO in the right direction, on the right row of the partition function (trivial here):

+ +
pepo = ising_pepo(1);
+ + +
transfer_pepo = InfiniteTransferPEPO(peps₀, pepo, 1, 1);
+ + + +

As before, we converge the boundary MPS using VUMPS and then compute the expectation value:

+ +
begin
+    mps₀_pepo = initializeMPS(transfer_pepo, [ComplexSpace(20)])
+    mps_pepo, = leading_boundary(mps₀_pepo, transfer_pepo, VUMPS(; verbosity=2))
+    @show abs(prod(expectation_value(mps_pepo, transfer_pepo)))
+end
+
102.19789137363612
+ + +

These objects and routines can be used to optimize PEPS fixed points of 3D partition functions, see for example Vanderstraeten et al.

+
+

Built with Julia 1.11.4 and

+MPSKit 0.12.6
+PEPSKit 0.5.0
+Random 1.11.0
+TensorKit 0.14.5 +
+ + +``` + diff --git a/docs/src/examples/heisenberg.md b/docs/src/examples/heisenberg.md index 3c1553d92..9d190bac4 100644 --- a/docs/src/examples/heisenberg.md +++ b/docs/src/examples/heisenberg.md @@ -25,7 +25,7 @@ @@ -103,8 +103,8 @@

Besides the converged environment, leading_boundary also returns a NamedTuple of informational quantities such as the last (maximal) SVD truncation error:

-
@show info_ctmrg.truncation_error;
- +
info_ctmrg.truncation_error
+
0.0006867970261442056

Finally, we can start the optimization by calling fixedpoint on H with our settings for the boundary (CTMRG) algorithm and the optimizer:

@@ -117,14 +117,23 @@

Note that fixedpoint returns the final optimized PEPS, the last converged environment, the final energy estimate as well as a NamedTuple of diagnostics. This allows us to, e.g., analyze the number of cost function calls or the history of gradient norms to evaluate the convergence rate:

-
@show info_opt.fg_evaluations info_opt.gradnorms[1:10:end];
+
@show info_opt.fg_evaluations
+
63
+
@show info_opt.gradnorms[1:10:end]
+
6-element Vector{Float64}:
+ 1.925483778590241
+ 0.02781261725705649
+ 0.020509459841048863
+ 0.010080016245646474
+ 0.0025318500192082712
+ 0.00023065410662933191

Let's now compare the optimized energy against an accurate Quantum Monte Carlo estimate by Sandvik, where the energy per site was found to be \(E_{\text{ref}}=−0.6694421\). From our simple optimization we find:

-
@show E;
- +
@show E
+
-0.6625142864955051

While this energy is in the right ballpark, there is still quite some deviation from the accurate reference energy. This, however, can be attributed to the small bond dimension - an optimization with larger bond dimension would approach this value much more closely.

A more reasonable comparison would be against another finite bond dimension PEPS simulation. For example, Juraj Hasik's data from \(J_1\text{-}J_2\)PEPS simulations yields \(E_{D=2,\chi=16}=-0.660231\dots\) which is more in line with what we find here.

@@ -135,8 +144,13 @@
ξ_h, ξ_v, λ_h, λ_v = correlation_length(peps, env);
-
@show ξ_h ξ_v;
+
@show ξ_h
+
1-element Vector{Float64}:
+ 1.0345812166069706
+
@show ξ_v
+
1-element Vector{Float64}:
+ 1.0245031504625688

As a last thing, we want to see how we can compute expectation values of observables, given the optimized PEPS and its CTMRG environment. To compute, e.g., the magnetization, we first need to define the observable:

@@ -156,8 +170,8 @@

To evaluate the expecation value, we call:

-
@show expectation_value(peps, M, env);
- +
@show expectation_value(peps, M, env)
+
-0.7563968615093396 - 4.608071982475297e-16im

Built with Julia 1.11.4 and

PEPSKit 0.5.0
diff --git a/examples/boundary_mps.jl b/examples/boundary_mps.jl deleted file mode 100644 index f74a7bf84..000000000 --- a/examples/boundary_mps.jl +++ /dev/null @@ -1,97 +0,0 @@ -using Random -Random.seed!(29384293742893) -using TensorKit -using PEPSKit, MPSKit - -# This example demonstrates some boundary-MPS methods for working with 2D projected -# entangled-pair states and operators. - -## Computing a PEPS norm - -# We start by initializing a random initial infinite PEPS -peps = InfinitePEPS(ComplexSpace(2), ComplexSpace(2)) - -# To compute its norm, we start by constructing the transfer operator corresponding to -# the partition function representing the overlap -T = InfiniteTransferPEPS(peps, 1, 1) - -# We then find its leading boundary MPS fixed point, where the corresponding eigenvalue -# encodes the norm of the state - -# Fist we build an initial guess for the boundary MPS, choosing a bond dimension of 20 -mps = PEPSKit.initializeMPS(T, [ComplexSpace(20)]) - -# We then find the leading boundary MPS fixed point using the VUMPS algorithm -mps, env, ϵ = leading_boundary(mps, T, VUMPS()) - -# The norm of the state per unit cell is then given by the expectation value -N = abs(prod(expectation_value(mps, T))) - -# This can be compared to the result obtained using the CTMRG algorithm -ctm, = leading_boundary( - peps, SimultaneousCTMRG(; verbosity=1), CTMRGEnv(peps, ComplexSpace(20)) -) -N´ = abs(norm(peps, ctm)) - -@show abs(N - N´) / N - -## Working with unit cells - -# For PEPS with non-trivial unit cells, the principle is exactly the same. -# The only difference is that now the transfer operator of the PEPS norm partition function -# has multiple lines, each of which can be represented by an `InfiniteTransferPEPS` object. -# Such a multi-line transfer operator is represented by a `MultilineTransferPEPS` object. -# In this case, the boundary MPS is an `MultilineMPS` object, which should be initialized -# by specifying a virtual space for each site in the partition function unit cell. - -peps2 = InfinitePEPS(ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2)) -T2 = PEPSKit.MultilineTransferPEPS(peps2, 1) - -mps2 = PEPSKit.initializeMPS(T2, fill(ComplexSpace(20), 2, 2)) -mps2, env2, ϵ = leading_boundary(mps2, T2, VUMPS()) -N2 = abs(prod(expectation_value(mps2, T2))) - -ctm2, = leading_boundary( - peps2, SimultaneousCTMRG(; verbosity=1), CTMRGEnv(peps2, ComplexSpace(20)) -) -N2´ = abs(norm(peps2, ctm2)) - -@show abs(N2 - N2´) / N2 - -# Note that for larger unit cells and non-Hermitian PEPS the VUMPS algorithm may become -# unstable, in which case the CTMRG algorithm is recommended. - -## Contracting PEPO overlaps - -# Using exactly the same machinery, we can contract partition functions which encode the -# expectation value of a PEPO for a given PEPS state. -# As an example, we can consider the overlap of the PEPO correponding to the partition -# function of 3D classical ising model with our random PEPS from before and evaluate -# . - -function ising_pepo(beta; unitcell=(1, 1, 1)) - t = ComplexF64[exp(beta) exp(-beta); exp(-beta) exp(beta)] - q = sqrt(t) - - O = zeros(2, 2, 2, 2, 2, 2) - O[1, 1, 1, 1, 1, 1] = 1 - O[2, 2, 2, 2, 2, 2] = 1 - @tensor o[-1 -2; -3 -4 -5 -6] := - O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] - - O = TensorMap(o, ℂ^2 ⊗ (ℂ^2)' ← ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)') - - return InfinitePEPO(O; unitcell) -end - -pepo = ising_pepo(1) -T3 = InfiniteTransferPEPO(peps, pepo, 1, 1) - -mps3 = PEPSKit.initializeMPS(T3, [ComplexSpace(20)]) -mps3, env3, ϵ = leading_boundary(mps3, T3, VUMPS()) -@show N3 = abs(prod(expectation_value(mps3, T3))) - -# These objects and routines can be used to optimize PEPS fixed points of 3D partition -# functions, see for example https://arxiv.org/abs/1805.10598 - -nothing diff --git a/examples/heisenberg.jl b/examples/heisenberg.jl deleted file mode 100644 index da2733881..000000000 --- a/examples/heisenberg.jl +++ /dev/null @@ -1,20 +0,0 @@ -using Random -using TensorKit, PEPSKit -Random.seed!(2394823948) - -# square lattice Heisenberg Hamiltonian, sublattice rotated to fit on a single-site unit cell -H = heisenberg_XYZ(InfiniteSquare()) - -# parameters and algorithms -Dbond = 2 -χenv = 16 -boundary_alg = (; tol=1e-10, trscheme=(; alg=:fixedspace)) -optimizer_alg = (; alg=:lbfgs, tol=1e-4, maxiter=100, lbfgs_memory=16) - -# initialize PEPS and environment -peps₀ = InfinitePEPS(2, Dbond) -env₀, = leading_boundary(CTMRGEnv(peps₀, ℂ^χenv), peps₀; boundary_alg...) - -# ground state search -peps, env, E, = fixedpoint(H, peps₀, env₀; boundary_alg, optimizer_alg, verbosity=1) -@show E diff --git a/examples/ising_pepo.jl b/examples/ising_pepo.jl deleted file mode 100644 index 4936e602f..000000000 --- a/examples/ising_pepo.jl +++ /dev/null @@ -1,23 +0,0 @@ -using TensorOperations -using TensorKit - -""" - ising_pepo(beta; unitcell=(1, 1, 1)) - -Return the PEPO tensor for partition function of the 3D classical Ising model at inverse -temperature `beta`. -""" -function ising_pepo(beta; unitcell=(1, 1, 1)) - t = ComplexF64[exp(beta) exp(-beta); exp(-beta) exp(beta)] - q = sqrt(t) - - O = zeros(2, 2, 2, 2, 2, 2) - O[1, 1, 1, 1, 1, 1] = 1 - O[2, 2, 2, 2, 2, 2] = 1 - @tensor o[-1 -2; -3 -4 -5 -6] := - O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] - - O = TensorMap(o, ℂ^2 ⊗ (ℂ^2)' ← ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)') - - return InfinitePEPO(O; unitcell) -end diff --git a/examples/notebooks/boundary_mps.jl b/examples/notebooks/boundary_mps.jl new file mode 100644 index 000000000..04217098b --- /dev/null +++ b/examples/notebooks/boundary_mps.jl @@ -0,0 +1,974 @@ +### A Pluto.jl notebook ### +# v0.20.5 + +using Markdown +using InteractiveUtils + +# ╔═╡ ba89666b-25ff-432c-a661-7fb4a111f075 +using Random + +# ╔═╡ b859e9b7-2573-47cb-b626-bf6515d74a02 +using TensorKit, PEPSKit, MPSKit + +# ╔═╡ a225cdc1-5a75-4e61-af51-226e05fc1243 +md""" +# Boundary MPS contractions using VUMPS and PEPOs + +Instead of using CTMRG to contract an infinite PEPS, one can also use an boundary MPSs ansatz to contract the infinite network. In particular, we will here use VUMPS to do so. + +Before we start, we'll fix the random seed for reproducability: +""" + +# ╔═╡ 687f9c44-3c79-4bef-9ab3-647c4cdc866f +Random.seed!(29384293742893); + +# ╔═╡ d211a23c-9bf6-4d9d-b0ff-386d6c9e38f4 +md""" +Besides `TensorKit` and `PEPSKit`, we here also need [`MPSKit`](https://quantumkithub.github.io/MPSKit.jl/stable/) which implements the VUMPS algorithm as well as the required MPS operations: +""" + +# ╔═╡ db11c7b7-0a45-43ba-8d50-66e7fb616145 +md""" +## Computing a PEPS norm + +We start by initializing a random initial infinite PEPS: +""" + +# ╔═╡ de769e61-4e2e-4954-8d26-33b5078a6a4c +peps₀ = InfinitePEPS(ComplexSpace(2), ComplexSpace(2)); + +# ╔═╡ 8a517a82-a63a-4ef6-95bc-0603163f05b7 +md""" +To compute its norm, we need to construct the transfer operator corresponding to +the partition function representing the overlap ``\langle \psi_\text{PEPS} | \psi_\text{PEPS} \rangle``: +""" + +# ╔═╡ 42a6c723-268f-4c21-97c3-77887ef0504e +transfer = InfiniteTransferPEPS(peps₀, 1, 1); + +# ╔═╡ bdf74a84-d072-4275-9214-75aa650028c2 +md""" +We then find its leading boundary MPS fixed point, where the corresponding eigenvalue encodes the norm of the state. To that end, let us first we build an initial guess for the boundary MPS, choosing a bond dimension of 20: +""" + +# ╔═╡ 079e54e7-e68d-4e77-b3a7-a61dce3311ed +mps₀ = initializeMPS(transfer, [ComplexSpace(20)]); + +# ╔═╡ bc347368-d374-4ab2-bfdd-90e8084f3aec +md""" +Note that this will just construct a MPS with random Gaussian entries based on the virtual spaces of the supplied transfer operator. Of course, one might come up with a better initial guess (leading to better convergence) depending on the application. To find the leading boundary MPS fixed point, we call `leading_boundary` using the VUMPS algorithm from MPSKit: +""" + +# ╔═╡ a01f3061-e9d8-42b9-ba7c-876d7fa084fe +mps, env, ϵ = leading_boundary(mps₀, transfer, VUMPS(; verbosity=2)); + +# ╔═╡ 608035ff-4eb1-42f5-8cf7-b39f2f38f36f +md""" +The norm of the state per unit cell is then given by the expectation value ``\langle \psi_\text{MPS} | \mathbb{T} | \psi_\text{MPS} \rangle``: +""" + +# ╔═╡ 8b61ea7b-403a-45f0-9735-379c9d9e53ac +norm_vumps = abs(prod(expectation_value(mps, transfer))); + +# ╔═╡ fc489a1d-f986-4040-b83d-112db70d5476 +md""" +This can be compared to the result obtained using CTMRG, where we see that the results match: +""" + +# ╔═╡ 94705e00-6ca3-459e-bde5-7e314d99c9e8 +env_ctmrg, = leading_boundary(CTMRGEnv(peps₀, ComplexSpace(20)), peps₀; verbosity=2); + +# ╔═╡ 049d7f58-f0ec-451a-b9b5-626fbba42a05 +norm_ctmrg = abs(norm(peps₀, env_ctmrg)); + +# ╔═╡ 74952677-a067-4e33-a3e2-388daaac0f14 +@show abs(norm_vumps - norm_ctmrg) / norm_vumps + +# ╔═╡ 797daa20-4167-4e36-a3e8-591596e22cfa +md""" +## Working with unit cells + +For PEPS with non-trivial unit cells, the principle is exactly the same. The only difference is that now the transfer operator of the PEPS norm partition function has multiple lines, each of which can be represented by an `InfiniteTransferPEPS` object. Such a multi-line transfer operator is represented by a `MultilineTransferPEPS` object. In this case, the boundary MPS is an `MultilineMPS` object, which should be initialized by specifying a virtual space for each site in the partition function unit cell. + +First, we construct a PEPS with a ``2 \times 2`` unit cell using the `unitcell` keyword argument and then define the corresponding transfer PEPS: +""" + +# ╔═╡ dfcfa6c5-db10-4a70-bf37-ef82ce819263 +peps₀_2x2 = InfinitePEPS(ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2)); + +# ╔═╡ 1b98d6e0-ed32-4aeb-ac04-19a048df2e0b +transfer_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1); + +# ╔═╡ b9d95f67-dc4a-43db-aa13-80e49060b306 +md""" +Now, the procedure is the same as before: We compute the norm once using VUMPS, once using CTMRG and then compare. +""" + +# ╔═╡ 1ea74726-b2b5-4519-9768-b1be95aee454 +begin + mps₀_2x2 = initializeMPS(transfer_2x2, fill(ComplexSpace(20), 2, 2)) + mps_2x2, = leading_boundary(mps₀_2x2, transfer_2x2, VUMPS(; verbosity=2)) + norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, transfer_2x2))) + + env_ctmrg_2x2, = leading_boundary( + CTMRGEnv(peps₀_2x2, ComplexSpace(20)), peps₀_2x2; verbosity=2 + ) + norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2)) + + @show abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps +end + +# ╔═╡ eb529a9d-0d31-4c50-8a1d-135c94dccb35 +md""" +Again, the results are compatible. Note that for larger unit cells and non-Hermitian PEPS the VUMPS algorithm may become unstable, in which case the CTMRG algorithm is recommended. + +## Contracting PEPO overlaps + +Using exactly the same machinery, we can contract partition functions which encode the expectation value of a PEPO for a given PEPS state. As an example, we can consider the overlap of the PEPO correponding to the partition function of 3D classical Ising model with our random PEPS from before and evaluate the overlap ``\langle \psi_\text{PEPS} | O_\text{PEPO} | \psi_\text{PEPS} \rangle``. + +The classical Ising PEPO is defined as follows: +""" + +# ╔═╡ ba5a3c16-cd8a-4f49-9af4-d2bcea0c7fc5 +function ising_pepo(β; unitcell=(1, 1, 1)) + t = ComplexF64[exp(β) exp(-β); exp(-β) exp(β)] + q = sqrt(t) + + O = zeros(2, 2, 2, 2, 2, 2) + O[1, 1, 1, 1, 1, 1] = 1 + O[2, 2, 2, 2, 2, 2] = 1 + @tensor o[-1 -2; -3 -4 -5 -6] := + O[1 2; 3 4 5 6] * + q[-1; 1] * + q[-2; 2] * + q[-3; 3] * + q[-4; 4] * + q[-5; 5] * + q[-6; 6] + O = TensorMap(o, ℂ^2 ⊗ (ℂ^2)' ← ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)') + + return InfinitePEPO(O; unitcell) +end; + +# ╔═╡ 4ce07126-926d-4698-823c-25c36ff9f6eb +md""" +To evaluate the overlap, we instantiate the PEPO and the corresponding `InfiniteTransferPEPO` in the right direction, on the right row of the partition function (trivial here): +""" + +# ╔═╡ cae6ce02-fd27-4ae3-bb0c-4bb53f48ca38 +pepo = ising_pepo(1); + +# ╔═╡ 63083f5c-1881-4577-a5c0-a5db4778832a +transfer_pepo = InfiniteTransferPEPO(peps₀, pepo, 1, 1); + +# ╔═╡ 2e21289d-9347-4b0c-80ef-18c02e5cbba8 +md""" +As before, we converge the boundary MPS using VUMPS and then compute the expectation value: +""" + +# ╔═╡ 9e632086-1913-11f0-0b0c-3344cc3a50e4 +begin + mps₀_pepo = initializeMPS(transfer_pepo, [ComplexSpace(20)]) + mps_pepo, = leading_boundary(mps₀_pepo, transfer_pepo, VUMPS(; verbosity=2)) + @show abs(prod(expectation_value(mps_pepo, transfer_pepo))) +end + +# ╔═╡ adae68cb-1d76-430f-b5b5-3bdf5834823f +md""" +These objects and routines can be used to optimize PEPS fixed points of 3D partition functions, see for example [Vanderstraeten et al.](@cite vanderstraeten_residual_2018) +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000001 +PLUTO_PROJECT_TOML_CONTENTS = """ +[deps] +MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502" +PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" + +[compat] +MPSKit = "~0.12.6" +PEPSKit = "~0.5.0" +TensorKit = "~0.14.5" +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000002 +PLUTO_MANIFEST_TOML_CONTENTS = """ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.11.4" +manifest_format = "2.0" +project_hash = "c70e6e86b5621a8e0ee82a182ffe7c3e8712cf1e" + +[[deps.AbstractFFTs]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.5.0" + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + AbstractFFTsTestExt = "Test" + + [deps.AbstractFFTs.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.Accessors]] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] +git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" +uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +version = "0.1.42" + + [deps.Accessors.extensions] + AxisKeysExt = "AxisKeys" + IntervalSetsExt = "IntervalSets" + LinearAlgebraExt = "LinearAlgebra" + StaticArraysExt = "StaticArrays" + StructArraysExt = "StructArrays" + TestExt = "Test" + UnitfulExt = "Unitful" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[[deps.Adapt]] +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "4.3.0" +weakdeps = ["SparseArrays", "StaticArrays"] + + [deps.Adapt.extensions] + AdaptSparseArraysExt = "SparseArrays" + AdaptStaticArraysExt = "StaticArrays" + +[[deps.ArrayLayouts]] +deps = ["FillArrays", "LinearAlgebra"] +git-tree-sha1 = "4e25216b8fea1908a0ce0f5d87368587899f75be" +uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.ArrayLayouts.extensions] + ArrayLayoutsSparseArraysExt = "SparseArrays" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" + +[[deps.BangBang]] +deps = ["Accessors", "ConstructionBase", "InitialValues", "LinearAlgebra"] +git-tree-sha1 = "26f41e1df02c330c4fa1e98d4aa2168fdafc9b1f" +uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" +version = "0.4.4" + + [deps.BangBang.extensions] + BangBangChainRulesCoreExt = "ChainRulesCore" + BangBangDataFramesExt = "DataFrames" + BangBangStaticArraysExt = "StaticArrays" + BangBangStructArraysExt = "StructArrays" + BangBangTablesExt = "Tables" + BangBangTypedTablesExt = "TypedTables" + + [deps.BangBang.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" + TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" + +[[deps.BlockArrays]] +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] +git-tree-sha1 = "df1746706459aa184ed3424b240a917b89d67b60" +uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" +version = "1.6.1" + + [deps.BlockArrays.extensions] + BlockArraysAdaptExt = "Adapt" + BlockArraysBandedMatricesExt = "BandedMatrices" + + [deps.BlockArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + +[[deps.BlockTensorKit]] +deps = ["BlockArrays", "Compat", "LinearAlgebra", "Random", "Strided", "TensorKit", "TensorOperations", "TupleTools", "VectorInterface"] +git-tree-sha1 = "e0d455f2998aca33747def4f384c1aff5e3278de" +uuid = "5f87ffc2-9cf1-4a46-8172-465d160bd8cd" +version = "0.1.6" + +[[deps.ChainRules]] +deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "SparseInverseSubset", "Statistics", "StructArrays", "SuiteSparse"] +git-tree-sha1 = "a975ae558af61a2a48720a6271661bf2621e0f4e" +uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" +version = "1.72.3" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra"] +git-tree-sha1 = "1713c74e00545bfe14605d2a2be1712de8fbcb58" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.25.1" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" + +[[deps.ChunkSplitters]] +git-tree-sha1 = "63a3903063d035260f0f6eab00f517471c5dc784" +uuid = "ae650224-84b6-46f8-82ea-d812ca08434e" +version = "3.1.2" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.1" + +[[deps.Compat]] +deps = ["TOML", "UUIDs"] +git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.16.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "1.1.1+0" + +[[deps.CompositionsBase]] +git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" + +[[deps.ConstructionBase]] +git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.5.8" + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseLinearAlgebraExt = "LinearAlgebra" + ConstructionBaseStaticArraysExt = "StaticArrays" + + [deps.ConstructionBase.weakdeps] + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.DataAPI]] +git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.16.0" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" + +[[deps.DiffResults]] +deps = ["StaticArraysCore"] +git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.1.0" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.15.1" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" + +[[deps.DocStringExtensions]] +git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.4" + +[[deps.FillArrays]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "1.13.0" + + [deps.FillArrays.extensions] + FillArraysPDMatsExt = "PDMats" + FillArraysSparseArraysExt = "SparseArrays" + FillArraysStatisticsExt = "Statistics" + + [deps.FillArrays.weakdeps] + PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.FiniteDifferences]] +deps = ["ChainRulesCore", "LinearAlgebra", "Printf", "Random", "Richardson", "SparseArrays", "StaticArrays"] +git-tree-sha1 = "06d76c780d657729cf20821fb5832c6cc4dfd0b5" +uuid = "26cc04aa-876d-5657-8c51-4c34ba976000" +version = "0.12.32" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "1.0.1" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" + +[[deps.GPUArraysCore]] +deps = ["Adapt"] +git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" +uuid = "46192b85-c4d5-4398-a991-12ede77f4527" +version = "0.2.0" + +[[deps.HalfIntegers]] +git-tree-sha1 = "9c3149243abb5bc0bad0431d6c4fcac0f4443c7c" +uuid = "f0d1745a-41c9-11e9-1dd9-e5d34d218721" +version = "1.6.0" + +[[deps.HashArrayMappedTries]] +git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae" +uuid = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" +version = "0.2.0" + +[[deps.IRTools]] +deps = ["InteractiveUtils", "MacroTools"] +git-tree-sha1 = "950c3717af761bc3ff906c2e8e52bd83390b6ec2" +uuid = "7869d1d1-7146-5819-86e3-90919afe41df" +version = "0.4.14" + +[[deps.InitialValues]] +git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" +uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" +version = "0.3.1" + +[[deps.IntegerMathUtils]] +git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" +uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" +version = "0.1.2" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" + +[[deps.InverseFunctions]] +git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.17" + + [deps.InverseFunctions.extensions] + InverseFunctionsDatesExt = "Dates" + InverseFunctionsTestExt = "Test" + + [deps.InverseFunctions.weakdeps] + Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.2.4" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.7.0" + +[[deps.KrylovKit]] +deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"] +git-tree-sha1 = "38477816f8db29956ea591feb3086d9edabf6f38" +uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" +version = "0.9.5" +weakdeps = ["ChainRulesCore"] + + [deps.KrylovKit.extensions] + KrylovKitChainRulesCoreExt = "ChainRulesCore" + +[[deps.LRUCache]] +git-tree-sha1 = "5519b95a490ff5fe629c4a7aa3b3dfc9160498b3" +uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" +version = "1.6.2" +weakdeps = ["Serialization"] + + [deps.LRUCache.extensions] + SerializationExt = ["Serialization"] + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.11.0" + +[[deps.LogExpFunctions]] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.29" + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" + + [deps.LogExpFunctions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" + +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "1.0.3" + +[[deps.MPSKit]] +deps = ["Accessors", "BlockTensorKit", "Compat", "DocStringExtensions", "HalfIntegers", "KrylovKit", "LinearAlgebra", "LoggingExtras", "OhMyThreads", "OptimKit", "Printf", "Random", "RecipesBase", "TensorKit", "TensorKitManifolds", "TensorOperations", "VectorInterface"] +git-tree-sha1 = "588bef90e9672431efda1b686e8d477b621b2118" +uuid = "bb1c41ca-d63c-52ed-829e-0820dda26502" +version = "0.12.6" + +[[deps.MPSKitModels]] +deps = ["LinearAlgebra", "MPSKit", "MacroTools", "PrecompileTools", "TensorKit", "TensorOperations", "TupleTools"] +git-tree-sha1 = "d658f13d6b1c08304344faede50bebcc4f574b6f" +uuid = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" +version = "0.4.0" + +[[deps.MacroTools]] +git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.15" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.1.3" + +[[deps.OhMyThreads]] +deps = ["BangBang", "ChunkSplitters", "StableTasks", "TaskLocalValues"] +git-tree-sha1 = "5f81bdb937fd857bac9548fa8ab9390a06864bb5" +uuid = "67456a42-1dca-4109-a031-0a68de7e3ad5" +version = "0.7.0" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.27+1" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+4" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.6+0" + +[[deps.OptimKit]] +deps = ["LinearAlgebra", "Printf", "ScopedValues", "VectorInterface"] +git-tree-sha1 = "b0163ac202bc03aeb15f0e55002e544e74965534" +uuid = "77e91f04-9b3b-57a6-a776-40b61faaebe0" +version = "0.4.0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.8.0" + +[[deps.PEPSKit]] +deps = ["Accessors", "ChainRulesCore", "Compat", "FiniteDifferences", "KrylovKit", "LinearAlgebra", "LoggingExtras", "MPSKit", "MPSKitModels", "OhMyThreads", "OptimKit", "Printf", "Random", "Statistics", "TensorKit", "TensorOperations", "VectorInterface", "Zygote"] +git-tree-sha1 = "12c42d39d9c67070d5783cbd7ebb54ab957c6a09" +uuid = "52969e89-939e-4361-9b68-9bc7cde4bdeb" +version = "0.5.0" + +[[deps.PackageExtensionCompat]] +git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" +uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" +version = "1.0.2" +weakdeps = ["Requires", "TOML"] + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.2.1" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.4.3" + +[[deps.Primes]] +deps = ["IntegerMathUtils"] +git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" +uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" +version = "0.5.7" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" +version = "1.11.0" + +[[deps.PtrArrays]] +git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" +uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" +version = "1.3.0" + +[[deps.Random]] +deps = ["SHA"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" + +[[deps.RationalRoots]] +git-tree-sha1 = "e5f5db699187a4810fda9181b34250deeedafd81" +uuid = "308eb6b3-cc68-5ff3-9e97-c3c4da4fa681" +version = "0.2.1" + +[[deps.RealDot]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" +uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" +version = "0.1.0" + +[[deps.RecipesBase]] +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.4" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.1" + +[[deps.Richardson]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "48f038bfd83344065434089c2a79417f38715c41" +uuid = "708f8203-808e-40c0-ba2d-98a6953ed40d" +version = "1.4.2" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.ScopedValues]] +deps = ["HashArrayMappedTries", "Logging"] +git-tree-sha1 = "1147f140b4c8ddab224c94efa9569fc23d63ab44" +uuid = "7e506255-f358-4e82-b7e4-beb19740aa63" +version = "1.3.0" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" + +[[deps.SparseArrays]] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.11.0" + +[[deps.SparseInverseSubset]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "52962839426b75b3021296f7df242e40ecfc0852" +uuid = "dc90abb0-5640-4711-901d-7e5b23a2fada" +version = "0.1.2" + +[[deps.SpecialFunctions]] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "64cca0c26b4f31ba18f13f6c12af7c85f478cfde" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.5.0" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" + +[[deps.StableTasks]] +git-tree-sha1 = "c4f6610f85cb965bee5bfafa64cbeeda55a4e0b2" +uuid = "91464d47-22a1-43fe-8b7f-2d57ee82463f" +version = "0.1.7" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] +git-tree-sha1 = "0feb6b9031bd5c51f9072393eb5ab3efd31bf9e4" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.9.13" +weakdeps = ["ChainRulesCore", "Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" + StaticArraysStatisticsExt = "Statistics" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.4.3" + +[[deps.Statistics]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] + +[[deps.Strided]] +deps = ["LinearAlgebra", "StridedViews", "TupleTools"] +git-tree-sha1 = "4a1128f5237b5d0170d934a2eb4fa7a273639c9f" +uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" +version = "2.3.0" + +[[deps.StridedViews]] +deps = ["LinearAlgebra", "PackageExtensionCompat"] +git-tree-sha1 = "425158c52aa58d42593be6861befadf8b2541e9b" +uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" +version = "0.4.1" + + [deps.StridedViews.extensions] + StridedViewsCUDAExt = "CUDA" + StridedViewsPtrArraysExt = "PtrArrays" + + [deps.StridedViews.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + PtrArrays = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" + +[[deps.StructArrays]] +deps = ["ConstructionBase", "DataAPI", "Tables"] +git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.7.1" + + [deps.StructArrays.extensions] + StructArraysAdaptExt = "Adapt" + StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"] + StructArraysLinearAlgebraExt = "LinearAlgebra" + StructArraysSparseArraysExt = "SparseArrays" + StructArraysStaticArraysExt = "StaticArrays" + + [deps.StructArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.7.0+0" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.3" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.12.0" + +[[deps.TaskLocalValues]] +git-tree-sha1 = "d155450e6dff2a8bc2fcb81dcb194bd98b0aeb46" +uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" +version = "0.1.2" + +[[deps.TensorKit]] +deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "Random", "SparseArrays", "Strided", "TensorKitSectors", "TensorOperations", "TupleTools", "VectorInterface"] +git-tree-sha1 = "4a09ea843d18b7256f710f1188414433dcf0b7db" +uuid = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" +version = "0.14.5" +weakdeps = ["ChainRulesCore", "FiniteDifferences"] + + [deps.TensorKit.extensions] + TensorKitChainRulesCoreExt = "ChainRulesCore" + TensorKitFiniteDifferencesExt = "FiniteDifferences" + +[[deps.TensorKitManifolds]] +deps = ["LinearAlgebra", "TensorKit"] +git-tree-sha1 = "94530ac4691795834e2efacb2d31d37571dad52f" +uuid = "11fa318c-39cb-4a83-b1ed-cdc7ba1e3684" +version = "0.7.2" + +[[deps.TensorKitSectors]] +deps = ["HalfIntegers", "LinearAlgebra", "TensorOperations", "WignerSymbols"] +git-tree-sha1 = "fd15110964416b3ac3e7d1d212b0260e4629e536" +uuid = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f" +version = "0.1.4" + +[[deps.TensorOperations]] +deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Preferences", "PtrArrays", "Strided", "StridedViews", "TupleTools", "VectorInterface"] +git-tree-sha1 = "c7458aad3d855e892e2cae208a793a5fceee2406" +uuid = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" +version = "5.2.0" + + [deps.TensorOperations.extensions] + TensorOperationsBumperExt = "Bumper" + TensorOperationsChainRulesCoreExt = "ChainRulesCore" + TensorOperationscuTENSORExt = ["cuTENSOR", "CUDA"] + + [deps.TensorOperations.weakdeps] + Bumper = "8ce10254-0962-460f-a3d8-1f77fea1446e" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1" + +[[deps.TupleTools]] +git-tree-sha1 = "41e43b9dc950775eac654b9f845c839cd2f1821e" +uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" +version = "1.6.0" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" + +[[deps.VectorInterface]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9166406dedd38c111a6574e9814be83d267f8aec" +uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8" +version = "0.5.0" + +[[deps.WignerSymbols]] +deps = ["HalfIntegers", "LRUCache", "Primes", "RationalRoots"] +git-tree-sha1 = "960e5f708871c1d9a28a7f1dbcaf4e0ee34ee960" +uuid = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" +version = "2.0.0" + +[[deps.Zygote]] +deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] +git-tree-sha1 = "207d714f3514b0d564e3a08f9e9f753bf6566c2d" +uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" +version = "0.7.6" + + [deps.Zygote.extensions] + ZygoteAtomExt = "Atom" + ZygoteColorsExt = "Colors" + ZygoteDistancesExt = "Distances" + ZygoteTrackerExt = "Tracker" + + [deps.Zygote.weakdeps] + Atom = "c52e3926-4ff0-5f6e-af25-54175e0327b1" + Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" + Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.ZygoteRules]] +deps = ["ChainRulesCore", "MacroTools"] +git-tree-sha1 = "434b3de333c75fc446aa0d19fc394edafd07ab08" +uuid = "700de1a5-db45-46bc-99cf-38207098b444" +version = "0.2.7" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.11.0+0" +""" + +# ╔═╡ Cell order: +# ╠═a225cdc1-5a75-4e61-af51-226e05fc1243 +# ╠═ba89666b-25ff-432c-a661-7fb4a111f075 +# ╠═687f9c44-3c79-4bef-9ab3-647c4cdc866f +# ╠═d211a23c-9bf6-4d9d-b0ff-386d6c9e38f4 +# ╠═b859e9b7-2573-47cb-b626-bf6515d74a02 +# ╠═db11c7b7-0a45-43ba-8d50-66e7fb616145 +# ╠═de769e61-4e2e-4954-8d26-33b5078a6a4c +# ╠═8a517a82-a63a-4ef6-95bc-0603163f05b7 +# ╠═42a6c723-268f-4c21-97c3-77887ef0504e +# ╠═bdf74a84-d072-4275-9214-75aa650028c2 +# ╠═079e54e7-e68d-4e77-b3a7-a61dce3311ed +# ╠═bc347368-d374-4ab2-bfdd-90e8084f3aec +# ╠═a01f3061-e9d8-42b9-ba7c-876d7fa084fe +# ╠═608035ff-4eb1-42f5-8cf7-b39f2f38f36f +# ╠═8b61ea7b-403a-45f0-9735-379c9d9e53ac +# ╠═fc489a1d-f986-4040-b83d-112db70d5476 +# ╠═94705e00-6ca3-459e-bde5-7e314d99c9e8 +# ╠═049d7f58-f0ec-451a-b9b5-626fbba42a05 +# ╠═74952677-a067-4e33-a3e2-388daaac0f14 +# ╠═797daa20-4167-4e36-a3e8-591596e22cfa +# ╠═dfcfa6c5-db10-4a70-bf37-ef82ce819263 +# ╠═1b98d6e0-ed32-4aeb-ac04-19a048df2e0b +# ╠═b9d95f67-dc4a-43db-aa13-80e49060b306 +# ╠═1ea74726-b2b5-4519-9768-b1be95aee454 +# ╠═eb529a9d-0d31-4c50-8a1d-135c94dccb35 +# ╠═ba5a3c16-cd8a-4f49-9af4-d2bcea0c7fc5 +# ╠═4ce07126-926d-4698-823c-25c36ff9f6eb +# ╠═cae6ce02-fd27-4ae3-bb0c-4bb53f48ca38 +# ╠═63083f5c-1881-4577-a5c0-a5db4778832a +# ╠═2e21289d-9347-4b0c-80ef-18c02e5cbba8 +# ╠═9e632086-1913-11f0-0b0c-3344cc3a50e4 +# ╠═adae68cb-1d76-430f-b5b5-3bdf5834823f +# ╟─00000000-0000-0000-0000-000000000001 +# ╟─00000000-0000-0000-0000-000000000002 From 4e8fb94c5116fd4d699413e7c6a13245e3943f85 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Mon, 14 Apr 2025 16:08:46 +0200 Subject: [PATCH 032/113] Add boundary MPS example to make file --- docs/make.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/make.jl b/docs/make.jl index 2fe17b08a..bbde0763b 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -43,8 +43,8 @@ mathengine = MathJax3( ) examples = [ - "Examples" => "examples/index.md", "Optimizing the 2D Heisenberg model" => "examples/heisenberg.md", + "Boundary MPS contractions using VUMPS and PEPOs" => "examples/boundary_mps.md" ] makedocs(; From a9581371fc738b80f2294e82e11748b6b1d0ddac Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Mon, 14 Apr 2025 19:36:43 +0200 Subject: [PATCH 033/113] Add Bose Hubbard notebook --- examples/notebooks/bose_hubbard.jl | 945 +++++++++++++++++++++++++++++ 1 file changed, 945 insertions(+) create mode 100644 examples/notebooks/bose_hubbard.jl diff --git a/examples/notebooks/bose_hubbard.jl b/examples/notebooks/bose_hubbard.jl new file mode 100644 index 000000000..808295a4d --- /dev/null +++ b/examples/notebooks/bose_hubbard.jl @@ -0,0 +1,945 @@ +### A Pluto.jl notebook ### +# v0.20.5 + +using Markdown +using InteractiveUtils + +# ╔═╡ ef170a00-e0bf-4d5e-9ee3-ed2ce0061a24 +using Random + +# ╔═╡ 69f9cf1d-28b0-4357-bd2a-4894993e3be8 +using TensorKit, PEPSKit + +# ╔═╡ 10cc8e99-035d-4240-9b7b-7ab500a81783 +using MPSKit: add_physical_charge + +# ╔═╡ 0cfaf704-76fd-4e3b-8f77-c6e3d0e8af51 +md""" +# Optimizing the ``U(1)``-symmetric Bose-Hubbard model + +This example demonstrates the simulation of the two-dimensional Bose-Hubbard model. In particular, the point will be to showcase the use of internal symmetries and finite particle densities in PEPS ground state searches. As we will see, incorporating symmetries into the simulation consists of initializing a symmetric Hamiltonian, PEPS state and CTM environment - made possible through TensorKit. + +But first let's seed the RNG and import the required modules: +""" + +# ╔═╡ cc5c1119-5976-4a24-bfba-50fc20719cf5 +Random.seed!(2928528935); + +# ╔═╡ 67e1786e-af9a-4fe7-a3a5-642a1004f036 +md""" +## Defining the model + +We will construct the Bose-Hubbard model Hamiltonian through the [`bose_hubbard_model` function from MPSKitModels.jl](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.bose_hubbard_model), as reexported by PEPSKit. We'll simulate the model in its Mott-insulating phase where the ratio ``U/t`` is large, since in this phase we expect the ground state to be well approximated by a PEPS with a manifest global ``U(1)`` symmetry. Furthermore, we'll impose a cutoff at 2 bosons per site, set the chemical potential to zero and use a simple 1x1 unit cell: +""" + +# ╔═╡ 6011ff02-c309-4472-a030-08a6c9b9aceb +t = 1.0; + +# ╔═╡ 4a4adb42-61ea-40f3-9abb-26efb31a5c52 +U = 30.0; + +# ╔═╡ 2fac3a67-a5b2-4480-ab4b-e079a4d2e0b8 +cutoff = 2; + +# ╔═╡ fb90ff97-d3c8-410a-8b77-18c9318df8e1 +mu = 0.0; + +# ╔═╡ f00ba536-db79-42d4-9a34-fc51f05565d4 +lattice = InfiniteSquare(1, 1); + +# ╔═╡ 6e90b4fd-2a88-49dc-ae2b-81a0a2c88c5e +md""" +Next, we impose an explicit global U(1) symmetry as well as a fixed particle number density in our simulations. We can do this by setting the `symmetry` argument of the Hamiltonian constructor to `U1Irrep` and passing one as the particle number density keyword argument `n`: +""" + +# ╔═╡ f1005bd4-6133-43c5-abf0-8a1cae27ea58 +symmetry = U1Irrep; + +# ╔═╡ 83748684-d959-4fd4-b374-5ae1a686056c +n = 1; + +# ╔═╡ 91e67ff3-0b1e-4e1d-9c40-2a08df0faa52 +md""" +So let's instantiate the symmetric Hamiltonian: +""" + +# ╔═╡ 5fca8dcd-ab29-49d0-a605-8a5c1499eb65 +H = bose_hubbard_model(ComplexF64, symmetry, lattice; cutoff, t, U, n) + +# ╔═╡ f66ae429-5775-4485-b90a-0276fa1669f4 +md""" +Before we continue, it might be interesting to inspect the corresponding lattice physical spaces: +""" + +# ╔═╡ 2d4f1c7f-9fd1-43c4-8d29-8f155216c56e +physical_spaces = H.lattice + +# ╔═╡ b4617dac-204e-4f34-be4f-e7462110b796 +md""" +Note that the physical space contains ``U(1)`` charges -1, 0 and +1. Indeed, imposing a particle number density of +1 corresponds to shifting the physical charges by -1 to 're-center' the physical charges around the desired density. When we do this with a cutoff of two bosons per site, i.e. starting from ``U(1)`` charges 0, 1 and 2 on the physical level, we indeed get the observed charges. + +## Characterizing the virtual spaces + +When running PEPS simulations with explicit internal symmetries, specifying the structure of the virtual spaces of the PEPS and its environment becomes a bit more involved. For the environment, one could in principle allow the virtual space to be chosen dynamically during the boundary contraction using CTMRG by using a truncation scheme that allows for this (e.g. using alg=:truncdim or alg=:truncbelow to truncate to a fixed total bond dimension or singular value cutoff respectively). For the PEPS virtual space however, the structure has to be specified before the optimization. + +While there are a host of techniques to do this in an informed way (e.g. starting from a simple update result), here we just specify the virtual space manually. Since we're dealing with a model at unit filling our physical space only contains integer ``U(1)`` irreps. Therefore, we'll build our PEPS and environment spaces using integer U(1) irreps centered around the zero charge. +""" + +# ╔═╡ f9d5c380-9424-4358-b2d7-eccd5c42992e +V_peps = U1Space(0 => 2, 1 => 1, -1 => 1); + +# ╔═╡ 786bc842-39a7-425d-a261-c635b97b8208 +V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2); + +# ╔═╡ 4d6bccd3-7854-4d9b-8638-89b5a6bf41e1 +md""" +## Finding the ground state + +Having defined our Hamiltonian and spaces, it is just a matter of plugging this into the optimization framework in the usual way to find the ground state. So, we first specify all algorithms and their tolerances: +""" + +# ╔═╡ 34b6c407-5816-4714-8d7c-3c53f64007ad +boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)); + +# ╔═╡ 42bf7d5d-526c-4630-9eb6-a065155884c3 +gradient_alg = (; tol=1e-6, maxiter=10, alg=:eigsolver, iterscheme=:diffgauge); + +# ╔═╡ 56fc7eb6-6a9c-4152-a5a0-34f8b484f6c8 +optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=200, ls_maxiter=2, ls_maxfg=2); + +# ╔═╡ 8ea51b8c-afdb-4b59-93a8-f66d5ab4d6da +md""" +!!! note + Taking CTMRG gradients and optimizing symmetric tensors tends to be more problematic than with dense tensors. In particular, this means that one frequently needs to tweak the `gradient_alg` and `optimizer_alg` settings. There rarely is a general-purpose set of settings which will always work, so instead one has to adjust the simulation settings for each specific application. + +Keep in mind that the PEPS is constructed from a unit cell of spaces, so we have to make a matrix of `V_peps` spaces: +""" + +# ╔═╡ daf88312-1c74-4ba8-b8eb-69d5c0b2d834 +virtual_spaces = fill(V_peps, size(lattice)...); + +# ╔═╡ f9bb4230-1741-49cf-8557-eac8fd264548 +peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces); + +# ╔═╡ 6b1b770a-2b96-4600-9ba9-9c526b1b3cae +env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); + +# ╔═╡ 1bf2305b-9c25-4ec9-bc2c-f418c4b4caee +md""" +And at last, we optimize (which might take a bit): +""" + +# ╔═╡ 50596cfc-bdc2-45e0-a346-60ac2f627806 +peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg); + +# ╔═╡ a6341a9e-c92a-4539-8516-ef9b2de0165e +@show E + +# ╔═╡ d9361e24-475f-48f6-9a64-99e00f19a190 +md""" +We can compare our PEPS result to the energy obtained using a cylinder-MPS calculation using a cylinder circumference of ``L_y = 7`` and a bond dimension of 446, which yields ``E = -0.273284888``: +""" + +# ╔═╡ db097785-1f22-4367-a83d-6addf8f1ad84 +E_ref -0.273284888; + +# ╔═╡ ca4c87e4-194e-11f0-0793-357226f85565 +@show (E - E_ref) / E_ref + +# ╔═╡ 00000000-0000-0000-0000-000000000001 +PLUTO_PROJECT_TOML_CONTENTS = """ +[deps] +MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502" +PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" + +[compat] +MPSKit = "~0.12.6" +PEPSKit = "~0.5.0" +TensorKit = "~0.14.5" +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000002 +PLUTO_MANIFEST_TOML_CONTENTS = """ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.11.4" +manifest_format = "2.0" +project_hash = "c70e6e86b5621a8e0ee82a182ffe7c3e8712cf1e" + +[[deps.AbstractFFTs]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.5.0" + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + AbstractFFTsTestExt = "Test" + + [deps.AbstractFFTs.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.Accessors]] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] +git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" +uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +version = "0.1.42" + + [deps.Accessors.extensions] + AxisKeysExt = "AxisKeys" + IntervalSetsExt = "IntervalSets" + LinearAlgebraExt = "LinearAlgebra" + StaticArraysExt = "StaticArrays" + StructArraysExt = "StructArrays" + TestExt = "Test" + UnitfulExt = "Unitful" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[[deps.Adapt]] +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "4.3.0" +weakdeps = ["SparseArrays", "StaticArrays"] + + [deps.Adapt.extensions] + AdaptSparseArraysExt = "SparseArrays" + AdaptStaticArraysExt = "StaticArrays" + +[[deps.ArrayLayouts]] +deps = ["FillArrays", "LinearAlgebra"] +git-tree-sha1 = "4e25216b8fea1908a0ce0f5d87368587899f75be" +uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.ArrayLayouts.extensions] + ArrayLayoutsSparseArraysExt = "SparseArrays" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" + +[[deps.BangBang]] +deps = ["Accessors", "ConstructionBase", "InitialValues", "LinearAlgebra"] +git-tree-sha1 = "26f41e1df02c330c4fa1e98d4aa2168fdafc9b1f" +uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" +version = "0.4.4" + + [deps.BangBang.extensions] + BangBangChainRulesCoreExt = "ChainRulesCore" + BangBangDataFramesExt = "DataFrames" + BangBangStaticArraysExt = "StaticArrays" + BangBangStructArraysExt = "StructArrays" + BangBangTablesExt = "Tables" + BangBangTypedTablesExt = "TypedTables" + + [deps.BangBang.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" + TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" + +[[deps.BlockArrays]] +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] +git-tree-sha1 = "df1746706459aa184ed3424b240a917b89d67b60" +uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" +version = "1.6.1" + + [deps.BlockArrays.extensions] + BlockArraysAdaptExt = "Adapt" + BlockArraysBandedMatricesExt = "BandedMatrices" + + [deps.BlockArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + +[[deps.BlockTensorKit]] +deps = ["BlockArrays", "Compat", "LinearAlgebra", "Random", "Strided", "TensorKit", "TensorOperations", "TupleTools", "VectorInterface"] +git-tree-sha1 = "e0d455f2998aca33747def4f384c1aff5e3278de" +uuid = "5f87ffc2-9cf1-4a46-8172-465d160bd8cd" +version = "0.1.6" + +[[deps.ChainRules]] +deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "SparseInverseSubset", "Statistics", "StructArrays", "SuiteSparse"] +git-tree-sha1 = "a975ae558af61a2a48720a6271661bf2621e0f4e" +uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" +version = "1.72.3" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra"] +git-tree-sha1 = "1713c74e00545bfe14605d2a2be1712de8fbcb58" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.25.1" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" + +[[deps.ChunkSplitters]] +git-tree-sha1 = "63a3903063d035260f0f6eab00f517471c5dc784" +uuid = "ae650224-84b6-46f8-82ea-d812ca08434e" +version = "3.1.2" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.1" + +[[deps.Compat]] +deps = ["TOML", "UUIDs"] +git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.16.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "1.1.1+0" + +[[deps.CompositionsBase]] +git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" + +[[deps.ConstructionBase]] +git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.5.8" + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseLinearAlgebraExt = "LinearAlgebra" + ConstructionBaseStaticArraysExt = "StaticArrays" + + [deps.ConstructionBase.weakdeps] + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.DataAPI]] +git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.16.0" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" + +[[deps.DiffResults]] +deps = ["StaticArraysCore"] +git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.1.0" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.15.1" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" + +[[deps.DocStringExtensions]] +git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.4" + +[[deps.FillArrays]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "1.13.0" + + [deps.FillArrays.extensions] + FillArraysPDMatsExt = "PDMats" + FillArraysSparseArraysExt = "SparseArrays" + FillArraysStatisticsExt = "Statistics" + + [deps.FillArrays.weakdeps] + PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.FiniteDifferences]] +deps = ["ChainRulesCore", "LinearAlgebra", "Printf", "Random", "Richardson", "SparseArrays", "StaticArrays"] +git-tree-sha1 = "06d76c780d657729cf20821fb5832c6cc4dfd0b5" +uuid = "26cc04aa-876d-5657-8c51-4c34ba976000" +version = "0.12.32" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "1.0.1" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" + +[[deps.GPUArraysCore]] +deps = ["Adapt"] +git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" +uuid = "46192b85-c4d5-4398-a991-12ede77f4527" +version = "0.2.0" + +[[deps.HalfIntegers]] +git-tree-sha1 = "9c3149243abb5bc0bad0431d6c4fcac0f4443c7c" +uuid = "f0d1745a-41c9-11e9-1dd9-e5d34d218721" +version = "1.6.0" + +[[deps.HashArrayMappedTries]] +git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae" +uuid = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" +version = "0.2.0" + +[[deps.IRTools]] +deps = ["InteractiveUtils", "MacroTools"] +git-tree-sha1 = "950c3717af761bc3ff906c2e8e52bd83390b6ec2" +uuid = "7869d1d1-7146-5819-86e3-90919afe41df" +version = "0.4.14" + +[[deps.InitialValues]] +git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" +uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" +version = "0.3.1" + +[[deps.IntegerMathUtils]] +git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" +uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" +version = "0.1.2" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" + +[[deps.InverseFunctions]] +git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.17" + + [deps.InverseFunctions.extensions] + InverseFunctionsDatesExt = "Dates" + InverseFunctionsTestExt = "Test" + + [deps.InverseFunctions.weakdeps] + Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.2.4" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.7.0" + +[[deps.KrylovKit]] +deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"] +git-tree-sha1 = "38477816f8db29956ea591feb3086d9edabf6f38" +uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" +version = "0.9.5" +weakdeps = ["ChainRulesCore"] + + [deps.KrylovKit.extensions] + KrylovKitChainRulesCoreExt = "ChainRulesCore" + +[[deps.LRUCache]] +git-tree-sha1 = "5519b95a490ff5fe629c4a7aa3b3dfc9160498b3" +uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" +version = "1.6.2" +weakdeps = ["Serialization"] + + [deps.LRUCache.extensions] + SerializationExt = ["Serialization"] + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.11.0" + +[[deps.LogExpFunctions]] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.29" + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" + + [deps.LogExpFunctions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" + +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "1.0.3" + +[[deps.MPSKit]] +deps = ["Accessors", "BlockTensorKit", "Compat", "DocStringExtensions", "HalfIntegers", "KrylovKit", "LinearAlgebra", "LoggingExtras", "OhMyThreads", "OptimKit", "Printf", "Random", "RecipesBase", "TensorKit", "TensorKitManifolds", "TensorOperations", "VectorInterface"] +git-tree-sha1 = "588bef90e9672431efda1b686e8d477b621b2118" +uuid = "bb1c41ca-d63c-52ed-829e-0820dda26502" +version = "0.12.6" + +[[deps.MPSKitModels]] +deps = ["LinearAlgebra", "MPSKit", "MacroTools", "PrecompileTools", "TensorKit", "TensorOperations", "TupleTools"] +git-tree-sha1 = "d658f13d6b1c08304344faede50bebcc4f574b6f" +uuid = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" +version = "0.4.0" + +[[deps.MacroTools]] +git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.15" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.1.3" + +[[deps.OhMyThreads]] +deps = ["BangBang", "ChunkSplitters", "StableTasks", "TaskLocalValues"] +git-tree-sha1 = "5f81bdb937fd857bac9548fa8ab9390a06864bb5" +uuid = "67456a42-1dca-4109-a031-0a68de7e3ad5" +version = "0.7.0" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.27+1" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+4" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.6+0" + +[[deps.OptimKit]] +deps = ["LinearAlgebra", "Printf", "ScopedValues", "VectorInterface"] +git-tree-sha1 = "b0163ac202bc03aeb15f0e55002e544e74965534" +uuid = "77e91f04-9b3b-57a6-a776-40b61faaebe0" +version = "0.4.0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.8.0" + +[[deps.PEPSKit]] +deps = ["Accessors", "ChainRulesCore", "Compat", "FiniteDifferences", "KrylovKit", "LinearAlgebra", "LoggingExtras", "MPSKit", "MPSKitModels", "OhMyThreads", "OptimKit", "Printf", "Random", "Statistics", "TensorKit", "TensorOperations", "VectorInterface", "Zygote"] +git-tree-sha1 = "12c42d39d9c67070d5783cbd7ebb54ab957c6a09" +uuid = "52969e89-939e-4361-9b68-9bc7cde4bdeb" +version = "0.5.0" + +[[deps.PackageExtensionCompat]] +git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" +uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" +version = "1.0.2" +weakdeps = ["Requires", "TOML"] + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.2.1" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.4.3" + +[[deps.Primes]] +deps = ["IntegerMathUtils"] +git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" +uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" +version = "0.5.7" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" +version = "1.11.0" + +[[deps.PtrArrays]] +git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" +uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" +version = "1.3.0" + +[[deps.Random]] +deps = ["SHA"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" + +[[deps.RationalRoots]] +git-tree-sha1 = "e5f5db699187a4810fda9181b34250deeedafd81" +uuid = "308eb6b3-cc68-5ff3-9e97-c3c4da4fa681" +version = "0.2.1" + +[[deps.RealDot]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" +uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" +version = "0.1.0" + +[[deps.RecipesBase]] +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.4" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.1" + +[[deps.Richardson]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "48f038bfd83344065434089c2a79417f38715c41" +uuid = "708f8203-808e-40c0-ba2d-98a6953ed40d" +version = "1.4.2" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.ScopedValues]] +deps = ["HashArrayMappedTries", "Logging"] +git-tree-sha1 = "1147f140b4c8ddab224c94efa9569fc23d63ab44" +uuid = "7e506255-f358-4e82-b7e4-beb19740aa63" +version = "1.3.0" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" + +[[deps.SparseArrays]] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.11.0" + +[[deps.SparseInverseSubset]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "52962839426b75b3021296f7df242e40ecfc0852" +uuid = "dc90abb0-5640-4711-901d-7e5b23a2fada" +version = "0.1.2" + +[[deps.SpecialFunctions]] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "64cca0c26b4f31ba18f13f6c12af7c85f478cfde" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.5.0" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" + +[[deps.StableTasks]] +git-tree-sha1 = "c4f6610f85cb965bee5bfafa64cbeeda55a4e0b2" +uuid = "91464d47-22a1-43fe-8b7f-2d57ee82463f" +version = "0.1.7" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] +git-tree-sha1 = "0feb6b9031bd5c51f9072393eb5ab3efd31bf9e4" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.9.13" +weakdeps = ["ChainRulesCore", "Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" + StaticArraysStatisticsExt = "Statistics" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.4.3" + +[[deps.Statistics]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] + +[[deps.Strided]] +deps = ["LinearAlgebra", "StridedViews", "TupleTools"] +git-tree-sha1 = "4a1128f5237b5d0170d934a2eb4fa7a273639c9f" +uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" +version = "2.3.0" + +[[deps.StridedViews]] +deps = ["LinearAlgebra", "PackageExtensionCompat"] +git-tree-sha1 = "425158c52aa58d42593be6861befadf8b2541e9b" +uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" +version = "0.4.1" + + [deps.StridedViews.extensions] + StridedViewsCUDAExt = "CUDA" + StridedViewsPtrArraysExt = "PtrArrays" + + [deps.StridedViews.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + PtrArrays = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" + +[[deps.StructArrays]] +deps = ["ConstructionBase", "DataAPI", "Tables"] +git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.7.1" + + [deps.StructArrays.extensions] + StructArraysAdaptExt = "Adapt" + StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"] + StructArraysLinearAlgebraExt = "LinearAlgebra" + StructArraysSparseArraysExt = "SparseArrays" + StructArraysStaticArraysExt = "StaticArrays" + + [deps.StructArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.7.0+0" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.3" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.12.0" + +[[deps.TaskLocalValues]] +git-tree-sha1 = "d155450e6dff2a8bc2fcb81dcb194bd98b0aeb46" +uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" +version = "0.1.2" + +[[deps.TensorKit]] +deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "Random", "SparseArrays", "Strided", "TensorKitSectors", "TensorOperations", "TupleTools", "VectorInterface"] +git-tree-sha1 = "4a09ea843d18b7256f710f1188414433dcf0b7db" +uuid = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" +version = "0.14.5" +weakdeps = ["ChainRulesCore", "FiniteDifferences"] + + [deps.TensorKit.extensions] + TensorKitChainRulesCoreExt = "ChainRulesCore" + TensorKitFiniteDifferencesExt = "FiniteDifferences" + +[[deps.TensorKitManifolds]] +deps = ["LinearAlgebra", "TensorKit"] +git-tree-sha1 = "94530ac4691795834e2efacb2d31d37571dad52f" +uuid = "11fa318c-39cb-4a83-b1ed-cdc7ba1e3684" +version = "0.7.2" + +[[deps.TensorKitSectors]] +deps = ["HalfIntegers", "LinearAlgebra", "TensorOperations", "WignerSymbols"] +git-tree-sha1 = "fd15110964416b3ac3e7d1d212b0260e4629e536" +uuid = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f" +version = "0.1.4" + +[[deps.TensorOperations]] +deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Preferences", "PtrArrays", "Strided", "StridedViews", "TupleTools", "VectorInterface"] +git-tree-sha1 = "c7458aad3d855e892e2cae208a793a5fceee2406" +uuid = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" +version = "5.2.0" + + [deps.TensorOperations.extensions] + TensorOperationsBumperExt = "Bumper" + TensorOperationsChainRulesCoreExt = "ChainRulesCore" + TensorOperationscuTENSORExt = ["cuTENSOR", "CUDA"] + + [deps.TensorOperations.weakdeps] + Bumper = "8ce10254-0962-460f-a3d8-1f77fea1446e" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1" + +[[deps.TupleTools]] +git-tree-sha1 = "41e43b9dc950775eac654b9f845c839cd2f1821e" +uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" +version = "1.6.0" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" + +[[deps.VectorInterface]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9166406dedd38c111a6574e9814be83d267f8aec" +uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8" +version = "0.5.0" + +[[deps.WignerSymbols]] +deps = ["HalfIntegers", "LRUCache", "Primes", "RationalRoots"] +git-tree-sha1 = "960e5f708871c1d9a28a7f1dbcaf4e0ee34ee960" +uuid = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" +version = "2.0.0" + +[[deps.Zygote]] +deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] +git-tree-sha1 = "207d714f3514b0d564e3a08f9e9f753bf6566c2d" +uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" +version = "0.7.6" + + [deps.Zygote.extensions] + ZygoteAtomExt = "Atom" + ZygoteColorsExt = "Colors" + ZygoteDistancesExt = "Distances" + ZygoteTrackerExt = "Tracker" + + [deps.Zygote.weakdeps] + Atom = "c52e3926-4ff0-5f6e-af25-54175e0327b1" + Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" + Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.ZygoteRules]] +deps = ["ChainRulesCore", "MacroTools"] +git-tree-sha1 = "434b3de333c75fc446aa0d19fc394edafd07ab08" +uuid = "700de1a5-db45-46bc-99cf-38207098b444" +version = "0.2.7" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.11.0+0" +""" + +# ╔═╡ Cell order: +# ╠═0cfaf704-76fd-4e3b-8f77-c6e3d0e8af51 +# ╠═ef170a00-e0bf-4d5e-9ee3-ed2ce0061a24 +# ╠═cc5c1119-5976-4a24-bfba-50fc20719cf5 +# ╠═69f9cf1d-28b0-4357-bd2a-4894993e3be8 +# ╠═10cc8e99-035d-4240-9b7b-7ab500a81783 +# ╠═67e1786e-af9a-4fe7-a3a5-642a1004f036 +# ╠═6011ff02-c309-4472-a030-08a6c9b9aceb +# ╠═4a4adb42-61ea-40f3-9abb-26efb31a5c52 +# ╠═2fac3a67-a5b2-4480-ab4b-e079a4d2e0b8 +# ╠═fb90ff97-d3c8-410a-8b77-18c9318df8e1 +# ╠═f00ba536-db79-42d4-9a34-fc51f05565d4 +# ╠═6e90b4fd-2a88-49dc-ae2b-81a0a2c88c5e +# ╠═f1005bd4-6133-43c5-abf0-8a1cae27ea58 +# ╠═83748684-d959-4fd4-b374-5ae1a686056c +# ╠═91e67ff3-0b1e-4e1d-9c40-2a08df0faa52 +# ╠═5fca8dcd-ab29-49d0-a605-8a5c1499eb65 +# ╠═f66ae429-5775-4485-b90a-0276fa1669f4 +# ╠═2d4f1c7f-9fd1-43c4-8d29-8f155216c56e +# ╠═b4617dac-204e-4f34-be4f-e7462110b796 +# ╠═f9d5c380-9424-4358-b2d7-eccd5c42992e +# ╠═786bc842-39a7-425d-a261-c635b97b8208 +# ╠═4d6bccd3-7854-4d9b-8638-89b5a6bf41e1 +# ╠═34b6c407-5816-4714-8d7c-3c53f64007ad +# ╠═42bf7d5d-526c-4630-9eb6-a065155884c3 +# ╠═56fc7eb6-6a9c-4152-a5a0-34f8b484f6c8 +# ╠═8ea51b8c-afdb-4b59-93a8-f66d5ab4d6da +# ╠═daf88312-1c74-4ba8-b8eb-69d5c0b2d834 +# ╠═f9bb4230-1741-49cf-8557-eac8fd264548 +# ╠═6b1b770a-2b96-4600-9ba9-9c526b1b3cae +# ╠═1bf2305b-9c25-4ec9-bc2c-f418c4b4caee +# ╠═50596cfc-bdc2-45e0-a346-60ac2f627806 +# ╠═a6341a9e-c92a-4539-8516-ef9b2de0165e +# ╠═d9361e24-475f-48f6-9a64-99e00f19a190 +# ╠═db097785-1f22-4367-a83d-6addf8f1ad84 +# ╠═ca4c87e4-194e-11f0-0793-357226f85565 +# ╟─00000000-0000-0000-0000-000000000001 +# ╟─00000000-0000-0000-0000-000000000002 From f7db632d2dd873bb7581070f5d4ad484b32af35d Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Mon, 14 Apr 2025 19:36:52 +0200 Subject: [PATCH 034/113] Add XXZ notebook --- examples/notebooks/xxz.jl | 932 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 932 insertions(+) create mode 100644 examples/notebooks/xxz.jl diff --git a/examples/notebooks/xxz.jl b/examples/notebooks/xxz.jl new file mode 100644 index 000000000..f98bdf6d7 --- /dev/null +++ b/examples/notebooks/xxz.jl @@ -0,0 +1,932 @@ +### A Pluto.jl notebook ### +# v0.20.5 + +using Markdown +using InteractiveUtils + +# ╔═╡ dbe8239a-f481-4681-95bc-ed464560a13b +using Random + +# ╔═╡ 8c88c236-43da-497b-b083-dcb9ee7888a2 +using TensorKit, PEPSKit + +# ╔═╡ c115b454-1fa8-47b5-a510-b4be607dd8ba +using MPSKit: add_physical_charge + +# ╔═╡ 118fb1e5-dce5-4eaf-9d85-7a2365409091 +md""" +# Néel order in the U(1)-symmetric XXZ model + +Here, we want to look at a special case of the Heisenberg model, where the ``x`` and ``y`` couplings are equal, called the XXZ model + +```math +H_0 = J \big(\sum_{\langle i, j \rangle} S_i^x S_j^x + S_i^y S_j^y + \Delta S_i^z S_j^z \big) . +``` + +For appropriate ``\Delta``, the model enters an antiferromagnetic phase (Néel order) which we will force by adding staggered magnetic charges to ``H_0``. Furthermore, since the XXZ Hamiltonian obeys a ``U(1)`` symmetry, we will make use of that and work with ``U(1)``-symmetric PEPS and CTMRG environments. For simplicity, we will consider spin-``1/2`` operators. + +But first, let's make this example deterministic and import the required packages: +""" + +# ╔═╡ a43c4ba1-af3d-41a6-b3ea-e1c78f1fe461 +Random.seed!(2928528935); + +# ╔═╡ 2bec4073-864c-444b-a06d-aac1d7bdd9f7 +md""" +## Constructing the model + +Let us define the XXZ Hamiltonian with the parameters +""" + +# ╔═╡ c633965b-82b7-4bb4-8a45-52a34ccc6a84 +J, Delta, spin = 1.0, 1.0, 1//2; + +# ╔═╡ b6f2d6f7-4be6-4067-ae4b-5f318531574b +md""" +with ``U(1)``-symmetric tensors +""" + +# ╔═╡ 43857112-b6d5-4da8-9e5a-f55d48e5006a +symmetry = U1Irrep; + +# ╔═╡ 08d95080-b23c-4dbd-bc47-6f7f5de53662 +md""" +on a ``2 \times 2`` unit cell: +""" + +# ╔═╡ 4d3f9e11-ec65-4187-a610-f38c5780506c +lattice = InfiniteSquare(2, 2); + +# ╔═╡ eb2f129c-0169-4185-a878-4944a3d1fd4d +H₀ = heisenberg_XXZ(ComplexF64, symmetry, lattice; J, Delta, spin); + +# ╔═╡ a18b57e6-15dc-4147-a327-50c957ad96ca +md""" +This ensures that our PEPS ansatz can support the bipartite Néel order. As discussed above, we encode the Néel order directly in the ansatz by adding staggered auxiliary physical charges: +""" + +# ╔═╡ f61f0b2f-da31-43c8-8d5e-6cb690b4d9ae +S_aux = [ + U1Irrep(-1//2) U1Irrep(1//2) + U1Irrep(1//2) U1Irrep(-1//2) +]; + +# ╔═╡ 7a257773-171b-4191-8011-f96f8754c571 +H = add_physical_charge(H₀, S_aux); + +# ╔═╡ 2dbf8595-a3b9-4836-a90f-335d7000cbd6 +md""" +## Specifying the symmetric virtual spaces + +Before we create an initial PEPS and CTM environment, we need to think about which symmetric spaces we need to construct. Since we want to exploit the global ``U(1)`` symmetry of the model, we will use TensorKit's `U1Space`s where we specify dimensions for each symmetry sector: +""" + +# ╔═╡ 95aabe91-9be6-4fa1-8ee7-24c01f500f88 +V_peps = U1Space(0 => 2, 1 => 1, -1 => 1); + +# ╔═╡ f3528aa8-ef8d-4579-bdf5-95fedf9fdd08 +V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2); + +# ╔═╡ 08213456-9a3f-44ed-99f3-11dff12cda9a +md""" +The physical PEPS spaaces we will extract from the Hamiltonian `LocalOperator`: +""" + +# ╔═╡ dc9c03ce-d620-4874-8e5b-e4d64758fc09 +virtual_spaces = fill(V_peps, size(lattice)...); + +# ╔═╡ 1088908b-fe26-4471-93ba-a8f4766582e3 +physical_spaces = H.lattice; + +# ╔═╡ b41e515b-8ba7-4cf6-8502-ed7cdd2a1e04 +md""" +## Ground state search + +From this point onwards it's business as usual: Create an initial PEPS and environment (using the symmetric spaces), specify the algorithmic parameters and optimize: +""" + +# ╔═╡ 710db80f-468c-43a8-9899-cca2c95935e0 +boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)); + +# ╔═╡ b4f46884-100a-4208-83d1-9ea11fd10e2f +gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge); + +# ╔═╡ 341f420e-ffbe-41b1-836b-75046c4ee62a +optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2); + +# ╔═╡ 7e3822b5-a1e7-4a2b-a6db-caa80004dfca +peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces); + +# ╔═╡ d75423c9-0c97-4711-97d1-5a812cd63c51 +env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); + +# ╔═╡ d05a10e1-33b5-4c46-9f39-8604b12087fb +md""" +Finally, we can optimize the PEPS with respect to the XXZ Hamiltonian. Note that the optimization might take a while since precompilation of symmetric AD code takes longer and because symmetric tensors do create a bit of overhead (which does pay off at larger bond and environment dimensions): +""" + +# ╔═╡ 642ab5a8-193a-11f0-01d7-3172b0c1a5c0 +peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg); + +# ╔═╡ d7d2e27d-01dc-4c3c-9ce9-6ac06581ec87 +@show E + +# ╔═╡ 8e7cc822-d193-4757-b54e-a21e2ba1009b +md""" +Note that for the specified parameters ``J=\Delta=1``, we simulated the same Hamiltonian as in the [Heisenberg example](). In that example, with a non-symmetric ``D=2`` PEPS simulation, we reached a ground-state energy of around ``E_\text{D=2} = -0.6625\dots``. Again comparing against +[Sandvik's](@cite sandvik_computational_2011) accurate QMC estimate ``E_{\text{ref}}=−0.6694421``, we see that we already got closer to the reference energy. +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000001 +PLUTO_PROJECT_TOML_CONTENTS = """ +[deps] +MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502" +PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" + +[compat] +MPSKit = "~0.12.6" +PEPSKit = "~0.5.0" +TensorKit = "~0.14.5" +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000002 +PLUTO_MANIFEST_TOML_CONTENTS = """ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.11.4" +manifest_format = "2.0" +project_hash = "c70e6e86b5621a8e0ee82a182ffe7c3e8712cf1e" + +[[deps.AbstractFFTs]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.5.0" + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + AbstractFFTsTestExt = "Test" + + [deps.AbstractFFTs.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.Accessors]] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] +git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" +uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +version = "0.1.42" + + [deps.Accessors.extensions] + AxisKeysExt = "AxisKeys" + IntervalSetsExt = "IntervalSets" + LinearAlgebraExt = "LinearAlgebra" + StaticArraysExt = "StaticArrays" + StructArraysExt = "StructArrays" + TestExt = "Test" + UnitfulExt = "Unitful" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[[deps.Adapt]] +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "4.3.0" +weakdeps = ["SparseArrays", "StaticArrays"] + + [deps.Adapt.extensions] + AdaptSparseArraysExt = "SparseArrays" + AdaptStaticArraysExt = "StaticArrays" + +[[deps.ArrayLayouts]] +deps = ["FillArrays", "LinearAlgebra"] +git-tree-sha1 = "4e25216b8fea1908a0ce0f5d87368587899f75be" +uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.ArrayLayouts.extensions] + ArrayLayoutsSparseArraysExt = "SparseArrays" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" + +[[deps.BangBang]] +deps = ["Accessors", "ConstructionBase", "InitialValues", "LinearAlgebra"] +git-tree-sha1 = "26f41e1df02c330c4fa1e98d4aa2168fdafc9b1f" +uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" +version = "0.4.4" + + [deps.BangBang.extensions] + BangBangChainRulesCoreExt = "ChainRulesCore" + BangBangDataFramesExt = "DataFrames" + BangBangStaticArraysExt = "StaticArrays" + BangBangStructArraysExt = "StructArrays" + BangBangTablesExt = "Tables" + BangBangTypedTablesExt = "TypedTables" + + [deps.BangBang.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" + TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" + +[[deps.BlockArrays]] +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] +git-tree-sha1 = "df1746706459aa184ed3424b240a917b89d67b60" +uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" +version = "1.6.1" + + [deps.BlockArrays.extensions] + BlockArraysAdaptExt = "Adapt" + BlockArraysBandedMatricesExt = "BandedMatrices" + + [deps.BlockArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + +[[deps.BlockTensorKit]] +deps = ["BlockArrays", "Compat", "LinearAlgebra", "Random", "Strided", "TensorKit", "TensorOperations", "TupleTools", "VectorInterface"] +git-tree-sha1 = "e0d455f2998aca33747def4f384c1aff5e3278de" +uuid = "5f87ffc2-9cf1-4a46-8172-465d160bd8cd" +version = "0.1.6" + +[[deps.ChainRules]] +deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "SparseInverseSubset", "Statistics", "StructArrays", "SuiteSparse"] +git-tree-sha1 = "a975ae558af61a2a48720a6271661bf2621e0f4e" +uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" +version = "1.72.3" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra"] +git-tree-sha1 = "1713c74e00545bfe14605d2a2be1712de8fbcb58" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.25.1" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" + +[[deps.ChunkSplitters]] +git-tree-sha1 = "63a3903063d035260f0f6eab00f517471c5dc784" +uuid = "ae650224-84b6-46f8-82ea-d812ca08434e" +version = "3.1.2" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.1" + +[[deps.Compat]] +deps = ["TOML", "UUIDs"] +git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.16.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "1.1.1+0" + +[[deps.CompositionsBase]] +git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" + +[[deps.ConstructionBase]] +git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.5.8" + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseLinearAlgebraExt = "LinearAlgebra" + ConstructionBaseStaticArraysExt = "StaticArrays" + + [deps.ConstructionBase.weakdeps] + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.DataAPI]] +git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.16.0" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" + +[[deps.DiffResults]] +deps = ["StaticArraysCore"] +git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.1.0" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.15.1" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" + +[[deps.DocStringExtensions]] +git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.4" + +[[deps.FillArrays]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "1.13.0" + + [deps.FillArrays.extensions] + FillArraysPDMatsExt = "PDMats" + FillArraysSparseArraysExt = "SparseArrays" + FillArraysStatisticsExt = "Statistics" + + [deps.FillArrays.weakdeps] + PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.FiniteDifferences]] +deps = ["ChainRulesCore", "LinearAlgebra", "Printf", "Random", "Richardson", "SparseArrays", "StaticArrays"] +git-tree-sha1 = "06d76c780d657729cf20821fb5832c6cc4dfd0b5" +uuid = "26cc04aa-876d-5657-8c51-4c34ba976000" +version = "0.12.32" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "1.0.1" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" + +[[deps.GPUArraysCore]] +deps = ["Adapt"] +git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" +uuid = "46192b85-c4d5-4398-a991-12ede77f4527" +version = "0.2.0" + +[[deps.HalfIntegers]] +git-tree-sha1 = "9c3149243abb5bc0bad0431d6c4fcac0f4443c7c" +uuid = "f0d1745a-41c9-11e9-1dd9-e5d34d218721" +version = "1.6.0" + +[[deps.HashArrayMappedTries]] +git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae" +uuid = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" +version = "0.2.0" + +[[deps.IRTools]] +deps = ["InteractiveUtils", "MacroTools"] +git-tree-sha1 = "950c3717af761bc3ff906c2e8e52bd83390b6ec2" +uuid = "7869d1d1-7146-5819-86e3-90919afe41df" +version = "0.4.14" + +[[deps.InitialValues]] +git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" +uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" +version = "0.3.1" + +[[deps.IntegerMathUtils]] +git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" +uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" +version = "0.1.2" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" + +[[deps.InverseFunctions]] +git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.17" + + [deps.InverseFunctions.extensions] + InverseFunctionsDatesExt = "Dates" + InverseFunctionsTestExt = "Test" + + [deps.InverseFunctions.weakdeps] + Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.2.4" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.7.0" + +[[deps.KrylovKit]] +deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"] +git-tree-sha1 = "38477816f8db29956ea591feb3086d9edabf6f38" +uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" +version = "0.9.5" +weakdeps = ["ChainRulesCore"] + + [deps.KrylovKit.extensions] + KrylovKitChainRulesCoreExt = "ChainRulesCore" + +[[deps.LRUCache]] +git-tree-sha1 = "5519b95a490ff5fe629c4a7aa3b3dfc9160498b3" +uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" +version = "1.6.2" +weakdeps = ["Serialization"] + + [deps.LRUCache.extensions] + SerializationExt = ["Serialization"] + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.11.0" + +[[deps.LogExpFunctions]] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.29" + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" + + [deps.LogExpFunctions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" + +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "1.0.3" + +[[deps.MPSKit]] +deps = ["Accessors", "BlockTensorKit", "Compat", "DocStringExtensions", "HalfIntegers", "KrylovKit", "LinearAlgebra", "LoggingExtras", "OhMyThreads", "OptimKit", "Printf", "Random", "RecipesBase", "TensorKit", "TensorKitManifolds", "TensorOperations", "VectorInterface"] +git-tree-sha1 = "588bef90e9672431efda1b686e8d477b621b2118" +uuid = "bb1c41ca-d63c-52ed-829e-0820dda26502" +version = "0.12.6" + +[[deps.MPSKitModels]] +deps = ["LinearAlgebra", "MPSKit", "MacroTools", "PrecompileTools", "TensorKit", "TensorOperations", "TupleTools"] +git-tree-sha1 = "d658f13d6b1c08304344faede50bebcc4f574b6f" +uuid = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" +version = "0.4.0" + +[[deps.MacroTools]] +git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.15" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.1.3" + +[[deps.OhMyThreads]] +deps = ["BangBang", "ChunkSplitters", "StableTasks", "TaskLocalValues"] +git-tree-sha1 = "5f81bdb937fd857bac9548fa8ab9390a06864bb5" +uuid = "67456a42-1dca-4109-a031-0a68de7e3ad5" +version = "0.7.0" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.27+1" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+4" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.6+0" + +[[deps.OptimKit]] +deps = ["LinearAlgebra", "Printf", "ScopedValues", "VectorInterface"] +git-tree-sha1 = "b0163ac202bc03aeb15f0e55002e544e74965534" +uuid = "77e91f04-9b3b-57a6-a776-40b61faaebe0" +version = "0.4.0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.8.0" + +[[deps.PEPSKit]] +deps = ["Accessors", "ChainRulesCore", "Compat", "FiniteDifferences", "KrylovKit", "LinearAlgebra", "LoggingExtras", "MPSKit", "MPSKitModels", "OhMyThreads", "OptimKit", "Printf", "Random", "Statistics", "TensorKit", "TensorOperations", "VectorInterface", "Zygote"] +git-tree-sha1 = "12c42d39d9c67070d5783cbd7ebb54ab957c6a09" +uuid = "52969e89-939e-4361-9b68-9bc7cde4bdeb" +version = "0.5.0" + +[[deps.PackageExtensionCompat]] +git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" +uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" +version = "1.0.2" +weakdeps = ["Requires", "TOML"] + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.2.1" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.4.3" + +[[deps.Primes]] +deps = ["IntegerMathUtils"] +git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" +uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" +version = "0.5.7" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" +version = "1.11.0" + +[[deps.PtrArrays]] +git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" +uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" +version = "1.3.0" + +[[deps.Random]] +deps = ["SHA"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" + +[[deps.RationalRoots]] +git-tree-sha1 = "e5f5db699187a4810fda9181b34250deeedafd81" +uuid = "308eb6b3-cc68-5ff3-9e97-c3c4da4fa681" +version = "0.2.1" + +[[deps.RealDot]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" +uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" +version = "0.1.0" + +[[deps.RecipesBase]] +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.4" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.1" + +[[deps.Richardson]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "48f038bfd83344065434089c2a79417f38715c41" +uuid = "708f8203-808e-40c0-ba2d-98a6953ed40d" +version = "1.4.2" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.ScopedValues]] +deps = ["HashArrayMappedTries", "Logging"] +git-tree-sha1 = "1147f140b4c8ddab224c94efa9569fc23d63ab44" +uuid = "7e506255-f358-4e82-b7e4-beb19740aa63" +version = "1.3.0" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" + +[[deps.SparseArrays]] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.11.0" + +[[deps.SparseInverseSubset]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "52962839426b75b3021296f7df242e40ecfc0852" +uuid = "dc90abb0-5640-4711-901d-7e5b23a2fada" +version = "0.1.2" + +[[deps.SpecialFunctions]] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "64cca0c26b4f31ba18f13f6c12af7c85f478cfde" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.5.0" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" + +[[deps.StableTasks]] +git-tree-sha1 = "c4f6610f85cb965bee5bfafa64cbeeda55a4e0b2" +uuid = "91464d47-22a1-43fe-8b7f-2d57ee82463f" +version = "0.1.7" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] +git-tree-sha1 = "0feb6b9031bd5c51f9072393eb5ab3efd31bf9e4" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.9.13" +weakdeps = ["ChainRulesCore", "Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" + StaticArraysStatisticsExt = "Statistics" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.4.3" + +[[deps.Statistics]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] + +[[deps.Strided]] +deps = ["LinearAlgebra", "StridedViews", "TupleTools"] +git-tree-sha1 = "4a1128f5237b5d0170d934a2eb4fa7a273639c9f" +uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" +version = "2.3.0" + +[[deps.StridedViews]] +deps = ["LinearAlgebra", "PackageExtensionCompat"] +git-tree-sha1 = "425158c52aa58d42593be6861befadf8b2541e9b" +uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" +version = "0.4.1" + + [deps.StridedViews.extensions] + StridedViewsCUDAExt = "CUDA" + StridedViewsPtrArraysExt = "PtrArrays" + + [deps.StridedViews.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + PtrArrays = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" + +[[deps.StructArrays]] +deps = ["ConstructionBase", "DataAPI", "Tables"] +git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.7.1" + + [deps.StructArrays.extensions] + StructArraysAdaptExt = "Adapt" + StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"] + StructArraysLinearAlgebraExt = "LinearAlgebra" + StructArraysSparseArraysExt = "SparseArrays" + StructArraysStaticArraysExt = "StaticArrays" + + [deps.StructArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.7.0+0" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.3" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.12.0" + +[[deps.TaskLocalValues]] +git-tree-sha1 = "d155450e6dff2a8bc2fcb81dcb194bd98b0aeb46" +uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" +version = "0.1.2" + +[[deps.TensorKit]] +deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "Random", "SparseArrays", "Strided", "TensorKitSectors", "TensorOperations", "TupleTools", "VectorInterface"] +git-tree-sha1 = "4a09ea843d18b7256f710f1188414433dcf0b7db" +uuid = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" +version = "0.14.5" +weakdeps = ["ChainRulesCore", "FiniteDifferences"] + + [deps.TensorKit.extensions] + TensorKitChainRulesCoreExt = "ChainRulesCore" + TensorKitFiniteDifferencesExt = "FiniteDifferences" + +[[deps.TensorKitManifolds]] +deps = ["LinearAlgebra", "TensorKit"] +git-tree-sha1 = "94530ac4691795834e2efacb2d31d37571dad52f" +uuid = "11fa318c-39cb-4a83-b1ed-cdc7ba1e3684" +version = "0.7.2" + +[[deps.TensorKitSectors]] +deps = ["HalfIntegers", "LinearAlgebra", "TensorOperations", "WignerSymbols"] +git-tree-sha1 = "fd15110964416b3ac3e7d1d212b0260e4629e536" +uuid = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f" +version = "0.1.4" + +[[deps.TensorOperations]] +deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Preferences", "PtrArrays", "Strided", "StridedViews", "TupleTools", "VectorInterface"] +git-tree-sha1 = "c7458aad3d855e892e2cae208a793a5fceee2406" +uuid = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" +version = "5.2.0" + + [deps.TensorOperations.extensions] + TensorOperationsBumperExt = "Bumper" + TensorOperationsChainRulesCoreExt = "ChainRulesCore" + TensorOperationscuTENSORExt = ["cuTENSOR", "CUDA"] + + [deps.TensorOperations.weakdeps] + Bumper = "8ce10254-0962-460f-a3d8-1f77fea1446e" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1" + +[[deps.TupleTools]] +git-tree-sha1 = "41e43b9dc950775eac654b9f845c839cd2f1821e" +uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" +version = "1.6.0" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" + +[[deps.VectorInterface]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9166406dedd38c111a6574e9814be83d267f8aec" +uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8" +version = "0.5.0" + +[[deps.WignerSymbols]] +deps = ["HalfIntegers", "LRUCache", "Primes", "RationalRoots"] +git-tree-sha1 = "960e5f708871c1d9a28a7f1dbcaf4e0ee34ee960" +uuid = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" +version = "2.0.0" + +[[deps.Zygote]] +deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] +git-tree-sha1 = "207d714f3514b0d564e3a08f9e9f753bf6566c2d" +uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" +version = "0.7.6" + + [deps.Zygote.extensions] + ZygoteAtomExt = "Atom" + ZygoteColorsExt = "Colors" + ZygoteDistancesExt = "Distances" + ZygoteTrackerExt = "Tracker" + + [deps.Zygote.weakdeps] + Atom = "c52e3926-4ff0-5f6e-af25-54175e0327b1" + Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" + Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.ZygoteRules]] +deps = ["ChainRulesCore", "MacroTools"] +git-tree-sha1 = "434b3de333c75fc446aa0d19fc394edafd07ab08" +uuid = "700de1a5-db45-46bc-99cf-38207098b444" +version = "0.2.7" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.11.0+0" +""" + +# ╔═╡ Cell order: +# ╠═118fb1e5-dce5-4eaf-9d85-7a2365409091 +# ╠═dbe8239a-f481-4681-95bc-ed464560a13b +# ╠═a43c4ba1-af3d-41a6-b3ea-e1c78f1fe461 +# ╠═8c88c236-43da-497b-b083-dcb9ee7888a2 +# ╠═c115b454-1fa8-47b5-a510-b4be607dd8ba +# ╠═2bec4073-864c-444b-a06d-aac1d7bdd9f7 +# ╠═c633965b-82b7-4bb4-8a45-52a34ccc6a84 +# ╠═b6f2d6f7-4be6-4067-ae4b-5f318531574b +# ╠═43857112-b6d5-4da8-9e5a-f55d48e5006a +# ╠═08d95080-b23c-4dbd-bc47-6f7f5de53662 +# ╠═4d3f9e11-ec65-4187-a610-f38c5780506c +# ╠═eb2f129c-0169-4185-a878-4944a3d1fd4d +# ╠═a18b57e6-15dc-4147-a327-50c957ad96ca +# ╠═f61f0b2f-da31-43c8-8d5e-6cb690b4d9ae +# ╠═7a257773-171b-4191-8011-f96f8754c571 +# ╠═2dbf8595-a3b9-4836-a90f-335d7000cbd6 +# ╠═95aabe91-9be6-4fa1-8ee7-24c01f500f88 +# ╠═f3528aa8-ef8d-4579-bdf5-95fedf9fdd08 +# ╠═08213456-9a3f-44ed-99f3-11dff12cda9a +# ╠═dc9c03ce-d620-4874-8e5b-e4d64758fc09 +# ╠═1088908b-fe26-4471-93ba-a8f4766582e3 +# ╠═b41e515b-8ba7-4cf6-8502-ed7cdd2a1e04 +# ╠═710db80f-468c-43a8-9899-cca2c95935e0 +# ╠═b4f46884-100a-4208-83d1-9ea11fd10e2f +# ╠═341f420e-ffbe-41b1-836b-75046c4ee62a +# ╠═7e3822b5-a1e7-4a2b-a6db-caa80004dfca +# ╠═d75423c9-0c97-4711-97d1-5a812cd63c51 +# ╠═d05a10e1-33b5-4c46-9f39-8604b12087fb +# ╠═642ab5a8-193a-11f0-01d7-3172b0c1a5c0 +# ╠═d7d2e27d-01dc-4c3c-9ce9-6ac06581ec87 +# ╠═8e7cc822-d193-4757-b54e-a21e2ba1009b +# ╟─00000000-0000-0000-0000-000000000001 +# ╟─00000000-0000-0000-0000-000000000002 From 4b3de7a6fee7c1122db23b2aa7195e964579d545 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Mon, 14 Apr 2025 19:47:16 +0200 Subject: [PATCH 035/113] Add sections to notebooks and add to examples --- docs/make.jl | 4 +++- docs/src/index.md | 2 +- examples/notebooks/bose_hubbard.jl | 2 +- examples/notebooks/boundary_mps.jl | 34 ++++++++++++------------------ examples/notebooks/heisenberg.jl | 28 ++++++++++++++++-------- 5 files changed, 38 insertions(+), 32 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index bbde0763b..f903addbe 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -44,7 +44,9 @@ mathengine = MathJax3( examples = [ "Optimizing the 2D Heisenberg model" => "examples/heisenberg.md", - "Boundary MPS contractions using VUMPS and PEPOs" => "examples/boundary_mps.md" + "Boundary MPS contractions using VUMPS and PEPOs" => "examples/boundary_mps.md", + "Optimizing the U(1)-symmetric Bose-Hubbard model" => "examples/bose_hubbard.md", + "Néel order in the U(1)-symmetric XXZ model" => "examples/xxz.md", ] makedocs(; diff --git a/docs/src/index.md b/docs/src/index.md index 19083eafd..ee6971691 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -61,4 +61,4 @@ Pages = ["man/states.md", "man/environments.md", "man/operators.md", "man/peps_o Depth = 1 ``` -Additionally, we provide a list of commented example notebooks in the [Examples](@ref examples_index) section. +Additionally, we provide a list of commented example notebooks in the Examples section. diff --git a/examples/notebooks/bose_hubbard.jl b/examples/notebooks/bose_hubbard.jl index 808295a4d..6b94b1bfc 100644 --- a/examples/notebooks/bose_hubbard.jl +++ b/examples/notebooks/bose_hubbard.jl @@ -141,7 +141,7 @@ We can compare our PEPS result to the energy obtained using a cylinder-MPS calcu """ # ╔═╡ db097785-1f22-4367-a83d-6addf8f1ad84 -E_ref -0.273284888; +E_ref - 0.273284888; # ╔═╡ ca4c87e4-194e-11f0-0793-357226f85565 @show (E - E_ref) / E_ref diff --git a/examples/notebooks/boundary_mps.jl b/examples/notebooks/boundary_mps.jl index 04217098b..86a25991e 100644 --- a/examples/notebooks/boundary_mps.jl +++ b/examples/notebooks/boundary_mps.jl @@ -106,16 +106,16 @@ Now, the procedure is the same as before: We compute the norm once using VUMPS, # ╔═╡ 1ea74726-b2b5-4519-9768-b1be95aee454 begin - mps₀_2x2 = initializeMPS(transfer_2x2, fill(ComplexSpace(20), 2, 2)) - mps_2x2, = leading_boundary(mps₀_2x2, transfer_2x2, VUMPS(; verbosity=2)) - norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, transfer_2x2))) - - env_ctmrg_2x2, = leading_boundary( - CTMRGEnv(peps₀_2x2, ComplexSpace(20)), peps₀_2x2; verbosity=2 - ) - norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2)) - - @show abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps + mps₀_2x2 = initializeMPS(transfer_2x2, fill(ComplexSpace(20), 2, 2)) + mps_2x2, = leading_boundary(mps₀_2x2, transfer_2x2, VUMPS(; verbosity=2)) + norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, transfer_2x2))) + + env_ctmrg_2x2, = leading_boundary( + CTMRGEnv(peps₀_2x2, ComplexSpace(20)), peps₀_2x2; verbosity=2 + ) + norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2)) + + @show abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps end # ╔═╡ eb529a9d-0d31-4c50-8a1d-135c94dccb35 @@ -138,13 +138,7 @@ function ising_pepo(β; unitcell=(1, 1, 1)) O[1, 1, 1, 1, 1, 1] = 1 O[2, 2, 2, 2, 2, 2] = 1 @tensor o[-1 -2; -3 -4 -5 -6] := - O[1 2; 3 4 5 6] * - q[-1; 1] * - q[-2; 2] * - q[-3; 3] * - q[-4; 4] * - q[-5; 5] * - q[-6; 6] + O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] O = TensorMap(o, ℂ^2 ⊗ (ℂ^2)' ← ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)') return InfinitePEPO(O; unitcell) @@ -168,9 +162,9 @@ As before, we converge the boundary MPS using VUMPS and then compute the expecta # ╔═╡ 9e632086-1913-11f0-0b0c-3344cc3a50e4 begin - mps₀_pepo = initializeMPS(transfer_pepo, [ComplexSpace(20)]) - mps_pepo, = leading_boundary(mps₀_pepo, transfer_pepo, VUMPS(; verbosity=2)) - @show abs(prod(expectation_value(mps_pepo, transfer_pepo))) + mps₀_pepo = initializeMPS(transfer_pepo, [ComplexSpace(20)]) + mps_pepo, = leading_boundary(mps₀_pepo, transfer_pepo, VUMPS(; verbosity=2)) + @show abs(prod(expectation_value(mps_pepo, transfer_pepo))) end # ╔═╡ adae68cb-1d76-430f-b5b5-3bdf5834823f diff --git a/examples/notebooks/heisenberg.jl b/examples/notebooks/heisenberg.jl index fb7f8ff2d..194c7a6b6 100644 --- a/examples/notebooks/heisenberg.jl +++ b/examples/notebooks/heisenberg.jl @@ -38,7 +38,9 @@ We're going to need only two packages: `TensorKit`, since we use that for all th # ╔═╡ d42f7ddd-eb20-4441-b7e7-38b1d4996084 md""" -To create the sublattice rotated Heisenberg Hamiltonian on an infinite square lattice, we use: +## Defining the Heisenberg Hamiltonian + +To create the sublattice rotated Heisenberg Hamiltonian on an infinite square lattice, we use the `heisenberg_XYZ` method from [MPSKitModels](https://quantumkithub.github.io/MPSKitModels.jl/dev/) which is redefined for the `InfiniteSquare` and reexported in PEPSKit: """ # ╔═╡ 758d7f1a-b62f-400d-bf71-25410a7ce9c5 @@ -46,6 +48,8 @@ H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1); # ╔═╡ 945f9d02-322b-47f0-85b2-f229e4d8c4d9 md""" +## Setting up the algorithms and initial guesses + Next, we set the simulation parameters. During optimization, the PEPS will be contracted using CTMRG and the PEPS gradient will be computed by differentiating through the CTMRG routine using AD. Since the algorithmic stack that implements this is rather elaborate, the amount of settings one can configure is also quite large. To reduce this complexity, PEPSKit defaults to (presumably) reasonable settings which also dynamically adapts to the user-specified parameters. @@ -119,12 +123,14 @@ info_ctmrg.truncation_error # ╔═╡ 72a1eb41-30f2-4844-a934-eede6c3daf83 md""" -Finally, we can start the optimization by calling `fixedpoint` on `H` with our settings for the boundary (CTMRG) algorithm and the optimizer: +## Ground state search + +Finally, we can start the optimization by calling `fixedpoint` on `H` with our settings for the boundary (CTMRG) algorithm and the optimizer. This might take a while (especially the precompilation of AD code in this case): """ # ╔═╡ cd246b3e-3172-4f22-ad67-9d3d5a5c0464 peps, env, E, info_opt = fixedpoint( - H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity + H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity ); # ╔═╡ 9647daa9-c730-4185-bd11-6a54a0ded025 @@ -155,6 +161,8 @@ A more reasonable comparison would be against another finite bond dimension PEPS # ╔═╡ 7d743eb9-7969-486c-8d3b-f9b7cc78ba67 md""" +## Compute the correlation lengths and transfer matrix spectra + In practice, in order to obtain an accurate and variational energy estimate, one would need to compute multiple energies at different environment dimensions and extrapolate in, e.g., the correlation length or the second gap of the transfer matrix spectrum. For that, we would need the `correlation_length` function, which computes the horizontal and vertical correlation lengths and transfer matrix spectra for all unit cell coordinates: """ @@ -169,6 +177,8 @@ In practice, in order to obtain an accurate and variational energy estimate, one # ╔═╡ 585f04e3-b2ad-441b-aef8-f5e46e351335 md""" +## Computing observables + As a last thing, we want to see how we can compute expectation values of observables, given the optimized PEPS and its CTMRG environment. To compute, e.g., the magnetization, we first need to define the observable: """ @@ -955,9 +965,9 @@ version = "5.11.0+0" # ╠═ba0e9dc8-1641-4c85-896d-2d335094ecc2 # ╟─d463e7d9-499f-4689-bf04-260cef0af6ce # ╠═7da39574-7c05-492e-abf9-10b9e8f1dda9 -# ╟─d42f7ddd-eb20-4441-b7e7-38b1d4996084 +# ╠═d42f7ddd-eb20-4441-b7e7-38b1d4996084 # ╠═758d7f1a-b62f-400d-bf71-25410a7ce9c5 -# ╟─945f9d02-322b-47f0-85b2-f229e4d8c4d9 +# ╠═945f9d02-322b-47f0-85b2-f229e4d8c4d9 # ╠═f87c548e-a8ff-4b21-b9a0-5ae06c1b7adb # ╠═b40e0dbd-7136-4211-863d-3f489606a86c # ╟─2e7b56ff-df31-48a3-91e9-a621bb545baa @@ -975,19 +985,19 @@ version = "5.11.0+0" # ╠═d74c45d4-31af-4e0a-8401-7e0003f90d99 # ╟─c8aa2838-8d6d-44b3-9c2a-302ab42aa1f9 # ╠═4c55e732-88e4-4327-9e43-ac40abd6bb63 -# ╟─72a1eb41-30f2-4844-a934-eede6c3daf83 +# ╠═72a1eb41-30f2-4844-a934-eede6c3daf83 # ╠═cd246b3e-3172-4f22-ad67-9d3d5a5c0464 # ╟─9647daa9-c730-4185-bd11-6a54a0ded025 # ╠═c467848b-20ff-454e-b15b-00345ce6f29c # ╠═c7edf6a8-f743-47dc-bba4-bd9522bb6664 -# ╟─96b429c0-25fe-411d-a016-7677819357af +# ╠═96b429c0-25fe-411d-a016-7677819357af # ╠═33174988-02f2-487f-a635-e40d35c120af # ╟─d57df214-05c1-428a-a45b-2876a582fb4f -# ╟─7d743eb9-7969-486c-8d3b-f9b7cc78ba67 +# ╠═7d743eb9-7969-486c-8d3b-f9b7cc78ba67 # ╠═e1e3388e-4e0d-44ed-a7e0-1b04627406f1 # ╠═65b8dd1c-e09c-450b-8fa6-9718de1d79da # ╠═e032acf0-06dd-4b32-b41f-ea007aa07dfb -# ╟─585f04e3-b2ad-441b-aef8-f5e46e351335 +# ╠═585f04e3-b2ad-441b-aef8-f5e46e351335 # ╠═b62b44a2-8fb1-4d72-9657-ab68b91c5171 # ╟─72f3e01f-f2d7-4e1f-8241-331b3f0d8789 # ╠═8d31b900-5841-4979-b2db-0abbadcc347c From 5c524dffd60ea430c901b272f43dfd2eca93973e Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Tue, 15 Apr 2025 14:34:59 +0200 Subject: [PATCH 036/113] Add rendered note examples --- docs/make.jl | 4 +- docs/src/assets/pepskit.bib | 15 ++ docs/src/examples/bose_hubbard.md | 277 +++++++++++++++++++++++++++++ docs/src/examples/boundary_mps.md | 20 +-- docs/src/examples/heisenberg.md | 61 +++++-- docs/src/examples/xxz.md | 148 +++++++++++++++ examples/bose_hubbard.jl | 99 ----------- examples/notebooks/bose_hubbard.jl | 6 +- examples/notebooks/xxz.jl | 2 +- 9 files changed, 497 insertions(+), 135 deletions(-) create mode 100644 docs/src/examples/bose_hubbard.md create mode 100644 docs/src/examples/xxz.md delete mode 100644 examples/bose_hubbard.jl diff --git a/docs/make.jl b/docs/make.jl index f903addbe..22cb5336c 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -45,8 +45,8 @@ mathengine = MathJax3( examples = [ "Optimizing the 2D Heisenberg model" => "examples/heisenberg.md", "Boundary MPS contractions using VUMPS and PEPOs" => "examples/boundary_mps.md", - "Optimizing the U(1)-symmetric Bose-Hubbard model" => "examples/bose_hubbard.md", - "Néel order in the U(1)-symmetric XXZ model" => "examples/xxz.md", + "Optimizing the ``U(1)``-symmetric Bose-Hubbard model" => "examples/bose_hubbard.md", + "Néel order in the ``U(1)``-symmetric XXZ model" => "examples/xxz.md", ] makedocs(; diff --git a/docs/src/assets/pepskit.bib b/docs/src/assets/pepskit.bib index b29039e65..9bbf6e11e 100644 --- a/docs/src/assets/pepskit.bib +++ b/docs/src/assets/pepskit.bib @@ -54,3 +54,18 @@ @article{vanderstraeten_residual_2018 doi = {10.1103/PhysRevE.98.042145}, url = {https://link.aps.org/doi/10.1103/PhysRevE.98.042145} } + +@article{mingpu_benchmark_2016, + title = {Benchmark study of the two-dimensional Hubbard model with auxiliary-field quantum Monte Carlo method}, + author = {Qin, Mingpu and Shi, Hao and Zhang, Shiwei}, + journal = {Phys. Rev. B}, + volume = {94}, + issue = {8}, + pages = {085103}, + numpages = {12}, + year = {2016}, + month = {Aug}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.94.085103}, + url = {https://link.aps.org/doi/10.1103/PhysRevB.94.085103} +} diff --git a/docs/src/examples/bose_hubbard.md b/docs/src/examples/bose_hubbard.md new file mode 100644 index 000000000..354b6b55f --- /dev/null +++ b/docs/src/examples/bose_hubbard.md @@ -0,0 +1,277 @@ +```@raw html + + + + + +

Optimizing the \(U(1)\)-symmetric Bose-Hubbard model

This example demonstrates the simulation of the two-dimensional Bose-Hubbard model. In particular, the point will be to showcase the use of internal symmetries and finite particle densities in PEPS ground state searches. As we will see, incorporating symmetries into the simulation consists of initializing a symmetric Hamiltonian, PEPS state and CTM environment - made possible through TensorKit.

But first let's seed the RNG and import the required modules:

+ +
using Random
+ + +
Random.seed!(2928528935);
+ + +
using TensorKit, PEPSKit
+ + +
using MPSKit: add_physical_charge
+ + + +``` +## Defining the model +```@raw html +
+

We will construct the Bose-Hubbard model Hamiltonian through the bose_hubbard_model function from MPSKitModels.jl, as reexported by PEPSKit. We'll simulate the model in its Mott-insulating phase where the ratio \(U/t\) is large, since in this phase we expect the ground state to be well approximated by a PEPS with a manifest global \(U(1)\) symmetry. Furthermore, we'll impose a cutoff at 2 bosons per site, set the chemical potential to zero and use a simple 1x1 unit cell:

+ +
t = 1.0;
+ + +
U = 30.0;
+ + +
cutoff = 2;
+ + +
mu = 0.0;
+ + +
lattice = InfiniteSquare(1, 1);
+ + + +

Next, we impose an explicit global U(1) symmetry as well as a fixed particle number density in our simulations. We can do this by setting the symmetry argument of the Hamiltonian constructor to U1Irrep and passing one as the particle number density keyword argument n:

+ +
symmetry = U1Irrep;
+ + +
n = 1;
+ + + +

So let's instantiate the symmetric Hamiltonian:

+ +
H = bose_hubbard_model(ComplexF64, symmetry, lattice; cutoff, t, U, n)
+
LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 2, 2, Vector{ComplexF64}}}, Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 2, 2, Vector{ComplexF64}}}, Pair{Tuple{CartesianIndex{2}}, TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 1, 1, Vector{ComplexF64}}}}, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}}(GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}[Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1);;], ((CartesianIndex(1, 1), CartesianIndex(1, 2)) => TensorMap((Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1) ⊗ Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1)) ← (Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1) ⊗ Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1))):
+* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)):
+[:, :, 1, 1] =
+ -1.4142135623730951 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)):
+[:, :, 1, 1] =
+ -1.4142135623730951 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)):
+[:, :, 1, 1] =
+ -1.4142135623730951 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)):
+[:, :, 1, 1] =
+ -1.4142135623730951 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](0)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](0)):
+[:, :, 1, 1] =
+ -2.0000000000000004 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](1)):
+[:, :, 1, 1] =
+ -2.0000000000000004 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](1)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](0)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](0)):
+[:, :, 1, 1] =
+ -1.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](-1)):
+[:, :, 1, 1] =
+ -1.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](-1)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](1)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](-1)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+, (CartesianIndex(1, 1), CartesianIndex(2, 1)) => TensorMap((Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1) ⊗ Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1)) ← (Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1) ⊗ Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1))):
+* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)):
+[:, :, 1, 1] =
+ -1.4142135623730951 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)):
+[:, :, 1, 1] =
+ -1.4142135623730951 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)):
+[:, :, 1, 1] =
+ -1.4142135623730951 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)):
+[:, :, 1, 1] =
+ -1.4142135623730951 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](0)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](0)):
+[:, :, 1, 1] =
+ -2.0000000000000004 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](1)):
+[:, :, 1, 1] =
+ -2.0000000000000004 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](1)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](0)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](0)):
+[:, :, 1, 1] =
+ -1.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](-1)):
+[:, :, 1, 1] =
+ -1.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](-1)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](1)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](-1)):
+[:, :, 1, 1] =
+ 0.0 + 0.0im
+, (CartesianIndex(1, 1),) => TensorMap(Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1) ← Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1)):
+* Data for sector (Irrep[TensorKitSectors.U₁](0),) ← (Irrep[TensorKitSectors.U₁](0),):
+ 0.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](1),) ← (Irrep[TensorKitSectors.U₁](1),):
+ 30.0 + 0.0im
+* Data for sector (Irrep[TensorKitSectors.U₁](-1),) ← (Irrep[TensorKitSectors.U₁](-1),):
+ 0.0 + 0.0im
+))
+ + +

Before we continue, it might be interesting to inspect the corresponding lattice physical spaces:

+ +
physical_spaces = H.lattice
+
1×1 Matrix{GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}}:
+ Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1)
+ + +

Note that the physical space contains \(U(1)\) charges -1, 0 and +1. Indeed, imposing a particle number density of +1 corresponds to shifting the physical charges by -1 to 're-center' the physical charges around the desired density. When we do this with a cutoff of two bosons per site, i.e. starting from \(U(1)\) charges 0, 1 and 2 on the physical level, we indeed get the observed charges.

Characterizing the virtual spaces

When running PEPS simulations with explicit internal symmetries, specifying the structure of the virtual spaces of the PEPS and its environment becomes a bit more involved. For the environment, one could in principle allow the virtual space to be chosen dynamically during the boundary contraction using CTMRG by using a truncation scheme that allows for this (e.g. using alg=:truncdim or alg=:truncbelow to truncate to a fixed total bond dimension or singular value cutoff respectively). For the PEPS virtual space however, the structure has to be specified before the optimization.

While there are a host of techniques to do this in an informed way (e.g. starting from a simple update result), here we just specify the virtual space manually. Since we're dealing with a model at unit filling our physical space only contains integer \(U(1)\) irreps. Therefore, we'll build our PEPS and environment spaces using integer U(1) irreps centered around the zero charge.

+ +
V_peps = U1Space(0 => 2, 1 => 1, -1 => 1);
+ + +
V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2);
+ + + +``` +## Finding the ground state +```@raw html +
+

Having defined our Hamiltonian and spaces, it is just a matter of plugging this into the optimization framework in the usual way to find the ground state. So, we first specify all algorithms and their tolerances:

+ +
boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace));
+ + +
gradient_alg = (; tol=1e-6, maxiter=10, alg=:eigsolver, iterscheme=:diffgauge);
+ + +
optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=200, ls_maxiter=2, ls_maxfg=2);
+ + + +
Note

Taking CTMRG gradients and optimizing symmetric tensors tends to be more problematic than with dense tensors. In particular, this means that one frequently needs to tweak the gradient_alg and optimizer_alg settings. There rarely is a general-purpose set of settings which will always work, so instead one has to adjust the simulation settings for each specific application.

Keep in mind that the PEPS is constructed from a unit cell of spaces, so we have to make a matrix of V_peps spaces:

+ +
virtual_spaces = fill(V_peps, size(lattice)...);
+ + +
peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces);
+ + +
env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...);
+ + + +

And at last, we optimize (which might take a bit):

+ +
peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg);
+ + +
@show E
+
-0.2732668319499373
+ + +

We can compare our PEPS result to the energy obtained using a cylinder-MPS calculation using a cylinder circumference of \(L_y = 7\) and a bond dimension of 446, which yields \(E = -0.273284888\):

+ +
E_ref = -0.273284888;
+ + +
@show (E - E_ref) / E_ref
+
-6.607043000021378e-5
+
+

Built with Julia 1.11.4 and

+MPSKit 0.12.6
+PEPSKit 0.5.0
+Random 1.11.0
+TensorKit 0.14.5 +
+ + +``` + diff --git a/docs/src/examples/boundary_mps.md b/docs/src/examples/boundary_mps.md index 5f8e46440..462426fb8 100644 --- a/docs/src/examples/boundary_mps.md +++ b/docs/src/examples/boundary_mps.md @@ -25,7 +25,7 @@ @@ -87,7 +87,7 @@
@show abs(norm_vumps - norm_ctmrg) / norm_vumps
-
3.1316590722294163e-7
+
3.358035242498026e-6
``` @@ -111,13 +111,13 @@ norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, transfer_2x2))) env_ctmrg_2x2, = leading_boundary( - CTMRGEnv(peps₀_2x2, ComplexSpace(20)), peps₀_2x2; verbosity=2 + CTMRGEnv(peps₀_2x2, ComplexSpace(20)), peps₀_2x2; verbosity=2 ) norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2)) - + @show abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps end -
0.046417037097529805
+
0.0070857615042805

Again, the results are compatible. Note that for larger unit cells and non-Hermitian PEPS the VUMPS algorithm may become unstable, in which case the CTMRG algorithm is recommended.

Contracting PEPO overlaps

Using exactly the same machinery, we can contract partition functions which encode the expectation value of a PEPO for a given PEPS state. As an example, we can consider the overlap of the PEPO correponding to the partition function of 3D classical Ising model with our random PEPS from before and evaluate the overlap \(\langle \psi_\text{PEPS} | O_\text{PEPO} | \psi_\text{PEPS} \rangle\).

The classical Ising PEPO is defined as follows:

@@ -130,13 +130,7 @@ end O[1, 1, 1, 1, 1, 1] = 1 O[2, 2, 2, 2, 2, 2] = 1 @tensor o[-1 -2; -3 -4 -5 -6] := - O[1 2; 3 4 5 6] * - q[-1; 1] * - q[-2; 2] * - q[-3; 3] * - q[-4; 4] * - q[-5; 5] * - q[-6; 6] + O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] O = TensorMap(o, ℂ^2 ⊗ (ℂ^2)' ← ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)') return InfinitePEPO(O; unitcell) @@ -160,7 +154,7 @@ end; mps_pepo, = leading_boundary(mps₀_pepo, transfer_pepo, VUMPS(; verbosity=2)) @show abs(prod(expectation_value(mps_pepo, transfer_pepo))) end -
102.19789137363612
+
95.58715017531645

These objects and routines can be used to optimize PEPS fixed points of 3D partition functions, see for example Vanderstraeten et al.

diff --git a/docs/src/examples/heisenberg.md b/docs/src/examples/heisenberg.md index 9d190bac4..18f078718 100644 --- a/docs/src/examples/heisenberg.md +++ b/docs/src/examples/heisenberg.md @@ -25,7 +25,7 @@ @@ -47,13 +47,21 @@ -

To create the sublattice rotated Heisenberg Hamiltonian on an infinite square lattice, we use:

+``` +## Defining the Heisenberg Hamiltonian +```@raw html +
+

To create the sublattice rotated Heisenberg Hamiltonian on an infinite square lattice, we use the heisenberg_XYZ method from MPSKitModels which is redefined for the InfiniteSquare and reexported in PEPSKit:

H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1);
-

Next, we set the simulation parameters. During optimization, the PEPS will be contracted using CTMRG and the PEPS gradient will be computed by differentiating through the CTMRG routine using AD. Since the algorithmic stack that implements this is rather elaborate, the amount of settings one can configure is also quite large. To reduce this complexity, PEPSKit defaults to (presumably) reasonable settings which also dynamically adapts to the user-specified parameters.

First, we set the bond dimension Dbond of the virtual PEPS indices and the environment dimension χenv of the virtual corner and transfer matrix indices.

+``` +## Setting up the algorithms and initial guesses +```@raw html +
+

Next, we set the simulation parameters. During optimization, the PEPS will be contracted using CTMRG and the PEPS gradient will be computed by differentiating through the CTMRG routine using AD. Since the algorithmic stack that implements this is rather elaborate, the amount of settings one can configure is also quite large. To reduce this complexity, PEPSKit defaults to (presumably) reasonable settings which also dynamically adapts to the user-specified parameters.

First, we set the bond dimension Dbond of the virtual PEPS indices and the environment dimension χenv of the virtual corner and transfer matrix indices.

Dbond = 2;
@@ -104,10 +112,14 @@

Besides the converged environment, leading_boundary also returns a NamedTuple of informational quantities such as the last (maximal) SVD truncation error:

info_ctmrg.truncation_error
-
0.0006867970261442056
+
0.0017266955527366114
-

Finally, we can start the optimization by calling fixedpoint on H with our settings for the boundary (CTMRG) algorithm and the optimizer:

+``` +## Ground state search +```@raw html +
+

Finally, we can start the optimization by calling fixedpoint on H with our settings for the boundary (CTMRG) algorithm and the optimizer. This might take a while (especially the precompilation of AD code in this case):

peps, env, E, info_opt = fixedpoint(
     H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity
@@ -118,42 +130,53 @@
 

Note that fixedpoint returns the final optimized PEPS, the last converged environment, the final energy estimate as well as a NamedTuple of diagnostics. This allows us to, e.g., analyze the number of cost function calls or the history of gradient norms to evaluate the convergence rate:

@show info_opt.fg_evaluations
-
63
+
95
@show info_opt.gradnorms[1:10:end]
-
6-element Vector{Float64}:
- 1.925483778590241
- 0.02781261725705649
- 0.020509459841048863
- 0.010080016245646474
- 0.0025318500192082712
- 0.00023065410662933191
+
9-element Vector{Float64}:
+ 1.5288545029023473
+ 0.42745931621092037
+ 0.04712909560745584
+ 0.02455989405793848
+ 0.012403251650572806
+ 0.003187578031911067
+ 0.001660979743126857
+ 0.0008591829333440263
+ 0.0003360213833815268

Let's now compare the optimized energy against an accurate Quantum Monte Carlo estimate by Sandvik, where the energy per site was found to be \(E_{\text{ref}}=−0.6694421\). From our simple optimization we find:

@show E
-
-0.6625142864955051
+
-0.6625142760601819

While this energy is in the right ballpark, there is still quite some deviation from the accurate reference energy. This, however, can be attributed to the small bond dimension - an optimization with larger bond dimension would approach this value much more closely.

A more reasonable comparison would be against another finite bond dimension PEPS simulation. For example, Juraj Hasik's data from \(J_1\text{-}J_2\)PEPS simulations yields \(E_{D=2,\chi=16}=-0.660231\dots\) which is more in line with what we find here.

-

In practice, in order to obtain an accurate and variational energy estimate, one would need to compute multiple energies at different environment dimensions and extrapolate in, e.g., the correlation length or the second gap of the transfer matrix spectrum. For that, we would need the correlation_length function, which computes the horizontal and vertical correlation lengths and transfer matrix spectra for all unit cell coordinates:

+``` +## Compute the correlation lengths and transfer matrix spectra +```@raw html +
+

In practice, in order to obtain an accurate and variational energy estimate, one would need to compute multiple energies at different environment dimensions and extrapolate in, e.g., the correlation length or the second gap of the transfer matrix spectrum. For that, we would need the correlation_length function, which computes the horizontal and vertical correlation lengths and transfer matrix spectra for all unit cell coordinates:

ξ_h, ξ_v, λ_h, λ_v = correlation_length(peps, env);
@show ξ_h
1-element Vector{Float64}:
- 1.0345812166069706
+ 1.0344958386399636
@show ξ_v
1-element Vector{Float64}:
- 1.0245031504625688
+ 1.0240547254030574 -

As a last thing, we want to see how we can compute expectation values of observables, given the optimized PEPS and its CTMRG environment. To compute, e.g., the magnetization, we first need to define the observable:

+``` +## Computing observables +```@raw html +
+

As a last thing, we want to see how we can compute expectation values of observables, given the optimized PEPS and its CTMRG environment. To compute, e.g., the magnetization, we first need to define the observable:

σ_z = TensorMap([1.0 0.0; 0.0 -1.0], ℂ^2, ℂ^2)
TensorMap(ℂ^2 ← ℂ^2):
@@ -171,7 +194,7 @@
 

To evaluate the expecation value, we call:

@show expectation_value(peps, M, env)
-
-0.7563968615093396 - 4.608071982475297e-16im
+
0.5956380763180077 - 2.7776452606652597e-16im

Built with Julia 1.11.4 and

PEPSKit 0.5.0
diff --git a/docs/src/examples/xxz.md b/docs/src/examples/xxz.md new file mode 100644 index 000000000..66115c904 --- /dev/null +++ b/docs/src/examples/xxz.md @@ -0,0 +1,148 @@ +```@raw html + + + + + +

Néel order in the U(1)-symmetric XXZ model

Here, we want to look at a special case of the Heisenberg model, where the \(x\) and \(y\) couplings are equal, called the XXZ model

$$H_0 = J \big(\sum_{\langle i, j \rangle} S_i^x S_j^x + S_i^y S_j^y + \Delta S_i^z S_j^z \big) .$$

For appropriate \(\Delta\), the model enters an antiferromagnetic phase (Néel order) which we will force by adding staggered magnetic charges to \(H_0\). Furthermore, since the XXZ Hamiltonian obeys a \(U(1)\) symmetry, we will make use of that and work with \(U(1)\)-symmetric PEPS and CTMRG environments. For simplicity, we will consider spin-\(1/2\) operators.

But first, let's make this example deterministic and import the required packages:

+ +
using Random
+ + +
Random.seed!(2928528935);
+ + +
using TensorKit, PEPSKit
+ + +
using MPSKit: add_physical_charge
+ + + +``` +## Constructing the model +```@raw html +
+

Let us define the XXZ Hamiltonian with the parameters

+ +
J, Delta, spin = 1.0, 1.0, 1//2;
+ + + +

with \(U(1)\)-symmetric tensors

+ +
symmetry = U1Irrep;
+ + + +

on a \(2 \times 2\) unit cell:

+ +
lattice = InfiniteSquare(2, 2);
+ + +
H₀ = heisenberg_XXZ(ComplexF64, symmetry, lattice; J, Delta, spin);
+ + + +

This ensures that our PEPS ansatz can support the bipartite Néel order. As discussed above, we encode the Néel order directly in the ansatz by adding staggered auxiliary physical charges:

+ +
S_aux = [
+    U1Irrep(-1//2) U1Irrep(1//2)
+    U1Irrep(1//2) U1Irrep(-1//2)
+];
+ + +
H = add_physical_charge(H₀, S_aux);
+ + + +``` +## Specifying the symmetric virtual spaces +```@raw html +
+

Before we create an initial PEPS and CTM environment, we need to think about which symmetric spaces we need to construct. Since we want to exploit the global \(U(1)\) symmetry of the model, we will use TensorKit's U1Spaces where we specify dimensions for each symmetry sector:

+ +
V_peps = U1Space(0 => 2, 1 => 1, -1 => 1);
+ + +
V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2);
+ + + +

From the virtual spaces, we will need to construct a unit cell (a matrix) of spaces which will be supplied to the PEPS constructor. The same is true for the physical spaces, which we will just extract from the Hamiltonian LocalOperator:

+ +
virtual_spaces = fill(V_peps, size(lattice)...);
+ + +
physical_spaces = H.lattice;
+ + + +``` +## Ground state search +```@raw html +
+

From this point onwards it's business as usual: Create an initial PEPS and environment (using the symmetric spaces), specify the algorithmic parameters and optimize:

+ +
boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace));
+ + +
gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge);
+ + +
optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2);
+ + +
peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces);
+ + +
env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...);
+ + + +

Finally, we can optimize the PEPS with respect to the XXZ Hamiltonian. Note that the optimization might take a while since precompilation of symmetric AD code takes longer and because symmetric tensors do create a bit of overhead (which does pay off at larger bond and environment dimensions):

+ +
peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg);
+ + +
@show E
+
-0.6689439877742164
+ + +

Note that for the specified parameters \(J=\Delta=1\), we simulated the same Hamiltonian as in the Heisenberg example. In that example, with a non-symmetric \(D=2\) PEPS simulation, we reached a ground-state energy of around \(E_\text{D=2} = -0.6625\dots\). Again comparing against Sandvik's accurate QMC estimate \(E_{\text{ref}}=−0.6694421\), we see that we already got closer to the reference energy.

+
+

Built with Julia 1.11.4 and

+MPSKit 0.12.6
+PEPSKit 0.5.0
+Random 1.11.0
+TensorKit 0.14.5 +
+ + +``` + diff --git a/examples/bose_hubbard.jl b/examples/bose_hubbard.jl deleted file mode 100644 index 941cbca55..000000000 --- a/examples/bose_hubbard.jl +++ /dev/null @@ -1,99 +0,0 @@ -using Test -using Random -using PEPSKit -using TensorKit -using KrylovKit -using OptimKit - -using MPSKit: add_physical_charge - -# This example demonstrates the simulation of the two-dimensional Bose-Hubbard model using -# PEPSKit.jl. In particular, it showcases the use of internal symmetries and finite particle -# densities in PEPS simulations. - -## Defining the model - -# We will construct the Bose-Hubbard model Hamiltonian through the -# [`bose_hubbard_model` function from MPSKitModels.jl](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.bose_hubbard_model), -# as reexported by PEPSKit.jl. We'll simulate the model in its Mott-insulating phase -# where the ratio U/t is large, since in this phase we expect the ground state to be well -# approximated by a PEPS with a manifest global U(1) symmetry. Furthermore, we'll impose -# a cutoff at 2 bosons per site, set the chemical potential to zero and use a simple 1x1 -# unit cell. - -t = 1.0 -U = 30.0 -cutoff = 2 -mu = 0.0 -lattice = InfiniteSquare(1, 1) - -# We'll impose an explicit global U(1) symmetry as well as a fixed particle number density -# in our simulations. We can do this by setting the `symmetry` keyword argument to `U1Irrep` -# and passing one as the particle number density keyword argument `n`. - -symmetry = U1Irrep -n = 1 - -# We can then construct the Hamiltonian, and inspect the corresponding lattice of physical -# spaces. - -H = bose_hubbard_model(ComplexF64, symmetry, lattice; cutoff, t, U, n) -Pspaces = H.lattice - -# Note that the physical space contains U(1) charges -1, 0 and +1. Indeed, imposing a -# particle number density of +1 corresponds to shifting the physical charges by -1 to -# 're-center' the physical charges around the desired density. When we do this with a cutoff -# of two bosons per site, i.e. starting from U(1) charges 0, 1 and 2 on the physical level, -# we indeed get the observed charges. - -## Characterizing the virtual spaces - -# When running PEPS simulations with explicit internal symmetries, specifying the structure -# of the virtual spaces of the PEPS and its environment becomes a bit more involved. For the -# environment, one could in principle allow the virtual space to be chosen dynamically -# during the boundary contraction using CTMRG by using a truncation scheme that allows for -# this (e.g. using alg=:truncdim or alg=:truncbelow to truncate to a fixed total bond -# dimension or singular value cutoff respectively). For the PEPS virtual space however, the -# structure has to be specified before the optimization. - -# While there are a host of techniques to do this in an informed way (e.g. starting from -# a simple update result), here we just specify the virtual space manually. Since we're -# dealing with a model at unit filling our physical space only contains integer U(1) irreps. -# Therefore, we'll build our PEPS and environment spaces using integer U(1) irreps centered -# around the zero charge. - -Vpeps = U1Space(0 => 2, 1 => 1, -1 => 1) -Venv = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2) - -## Finding the ground state - -# Having defined our Hamiltonian and spaces, it is just a matter of pluggin this into the -# optimization framework in the usual way to find the ground state. - -# specify algorithms and tolerances -boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)) -gradient_alg = (; tol=1e-6, maxiter=10, alg=:eigsolver, iterscheme=:diffgauge) -optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=200, ls_maxiter=2, ls_maxfg=2) -reuse_env = true - -# initialize state -Nspaces = fill(Vpeps, size(lattice)...) -Espaces = fill(Vpeps, size(lattice)...) -Random.seed!(2928528935) # for reproducibility -ψ₀ = InfinitePEPS(randn, ComplexF64, Pspaces, Nspaces, Espaces) -env₀ = CTMRGEnv(ψ₀, Venv) -env₀, = leading_boundary(env₀, ψ₀; boundary_alg...) - -# optimize -ψ, env, E, info = fixedpoint( - H, ψ₀, env₀; boundary_alg, gradient_alg, optimizer_alg, reuse_env -) - -## Check the result - -# We can compare our PEPS result to the energy obtained using a cylinder-MPS calculation -# using a cylinder circumference of Ly = 7 and a bond dimension of 446, which yields -# E = -0.273284888 - -E_ref = -0.273284888 -@test E ≈ E_ref rtol = 1e-3 diff --git a/examples/notebooks/bose_hubbard.jl b/examples/notebooks/bose_hubbard.jl index 6b94b1bfc..549dbd0dd 100644 --- a/examples/notebooks/bose_hubbard.jl +++ b/examples/notebooks/bose_hubbard.jl @@ -77,7 +77,10 @@ physical_spaces = H.lattice # ╔═╡ b4617dac-204e-4f34-be4f-e7462110b796 md""" Note that the physical space contains ``U(1)`` charges -1, 0 and +1. Indeed, imposing a particle number density of +1 corresponds to shifting the physical charges by -1 to 're-center' the physical charges around the desired density. When we do this with a cutoff of two bosons per site, i.e. starting from ``U(1)`` charges 0, 1 and 2 on the physical level, we indeed get the observed charges. +""" +# ╔═╡ d67195b6-558e-47ca-8cc1-cfbef2448165 +md""" ## Characterizing the virtual spaces When running PEPS simulations with explicit internal symmetries, specifying the structure of the virtual spaces of the PEPS and its environment becomes a bit more involved. For the environment, one could in principle allow the virtual space to be chosen dynamically during the boundary contraction using CTMRG by using a truncation scheme that allows for this (e.g. using alg=:truncdim or alg=:truncbelow to truncate to a fixed total bond dimension or singular value cutoff respectively). For the PEPS virtual space however, the structure has to be specified before the optimization. @@ -141,7 +144,7 @@ We can compare our PEPS result to the energy obtained using a cylinder-MPS calcu """ # ╔═╡ db097785-1f22-4367-a83d-6addf8f1ad84 -E_ref - 0.273284888; +E_ref = -0.273284888; # ╔═╡ ca4c87e4-194e-11f0-0793-357226f85565 @show (E - E_ref) / E_ref @@ -925,6 +928,7 @@ version = "5.11.0+0" # ╠═f66ae429-5775-4485-b90a-0276fa1669f4 # ╠═2d4f1c7f-9fd1-43c4-8d29-8f155216c56e # ╠═b4617dac-204e-4f34-be4f-e7462110b796 +# ╠═d67195b6-558e-47ca-8cc1-cfbef2448165 # ╠═f9d5c380-9424-4358-b2d7-eccd5c42992e # ╠═786bc842-39a7-425d-a261-c635b97b8208 # ╠═4d6bccd3-7854-4d9b-8638-89b5a6bf41e1 diff --git a/examples/notebooks/xxz.jl b/examples/notebooks/xxz.jl index f98bdf6d7..e66e85010 100644 --- a/examples/notebooks/xxz.jl +++ b/examples/notebooks/xxz.jl @@ -89,7 +89,7 @@ V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2); # ╔═╡ 08213456-9a3f-44ed-99f3-11dff12cda9a md""" -The physical PEPS spaaces we will extract from the Hamiltonian `LocalOperator`: +From the virtual spaces, we will need to construct a unit cell (a matrix) of spaces which will be supplied to the PEPS constructor. The same is true for the physical spaces, which we will just extract from the Hamiltonian `LocalOperator`: """ # ╔═╡ dc9c03ce-d620-4874-8e5b-e4d64758fc09 From 740bd0400ad1ec2880cb514395483facc6550e2f Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Tue, 15 Apr 2025 20:13:46 +0200 Subject: [PATCH 037/113] Add Hubbard SU example notebook --- examples/notebooks/hubbard_su.jl | 952 +++++++++++++++++++++++++++++++ 1 file changed, 952 insertions(+) create mode 100644 examples/notebooks/hubbard_su.jl diff --git a/examples/notebooks/hubbard_su.jl b/examples/notebooks/hubbard_su.jl new file mode 100644 index 000000000..904a93791 --- /dev/null +++ b/examples/notebooks/hubbard_su.jl @@ -0,0 +1,952 @@ +### A Pluto.jl notebook ### +# v0.20.5 + +using Markdown +using InteractiveUtils + +# ╔═╡ 4aff432e-e8a9-441f-8c72-ba3609d99eba +using Random + +# ╔═╡ 4f49c108-6b3c-4d6a-a99f-90922ab8e114 +using TensorKit, PEPSKit + +# ╔═╡ ba26b46c-4ccd-426b-a3c7-c71c5051f390 +md""" +# Hubbard model imaginary time evolution using simple update + +Once again, we consider the Hubbard model but this time we obtain the ground-state PEPS by imaginary time evoluation. In particular, we'll use the [`SimpleUpdate`](@ref) algorithm. As a reminder, we define the Hubbard model as + +```math +H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- + c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i +``` + +with ``\sigma \in \{\uparrow,\downarrow\}`` and ``n_{i,\sigma} = c_{i,\sigma}^+ c_{i,\sigma}^-``. + +Let's get started by seeding the RNG and importing the required modules: +""" + +# ╔═╡ b1bcace2-28ff-4475-acb2-3ef8e9ca7033 +Random.seed!(1298351928); + +# ╔═╡ 1a979cdf-711e-414b-8566-c23638e760d2 +md""" +## Defining the Hamiltonian + +First, we define the Hubbard model at ``t=1`` hopping and ``U=6`` using `Trivial` sectors for the particle and spin symmetries: +""" + +# ╔═╡ 452bf333-e3fd-450f-8f6a-0ef42586a03f +t, U = 1, 6; + +# ╔═╡ aa4e6383-999d-4b1d-9fca-a053b7a9debf +md""" +## Running the simple update algorithm + +Next, we'll specify the virtual PEPS bond dimension and define the fermionic physical and virtual spaces. For the PEPS ansatz we choose a ``2 \times 2`` unit cell: +""" + +# ╔═╡ 59d49b04-4ea8-4bc1-b308-56dbb3b5e3d4 +Dbond = 8; + +# ╔═╡ cd7499dc-32b3-41ca-a369-a8c7dcce8d88 +physical_space = Vect[fℤ₂](0 => 2, 1 => 2); + +# ╔═╡ 5e046ae3-747e-40c5-9f35-59ced565de50 +virtual_space = Vect[fℤ₂](0 => Dbond / 2, 1 => Dbond / 2); + +# ╔═╡ 6224ad78-cf6c-444e-976a-1a0d1bb6c261 +Nr, Nc = 2, 2; + +# ╔═╡ 156d773c-96c3-4fb2-a111-71eddddfa33b +H = hubbard_model(Float64, Trivial, Trivial, InfiniteSquare(Nr, Nc); t, U, mu=U / 2); + +# ╔═╡ f1a13a5d-c7c0-4fd9-8a42-06826d04a406 +md""" +The simple update algorithm evolves an infinite PEPS with weights on the virtual bonds, so we here need to intialize an [`InfiniteWeightPEPS`](@ref). By default, the bond weights will be identity. Note that we here use tensors with real `Float64` entries: +""" + +# ╔═╡ d0bb6199-6e09-41cb-bc0c-a552aedc5443 +wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, virtual_space; unitcell=(Nr, Nc)); + +# ╔═╡ 51df2d55-e51f-41cf-8fd0-bd58ca85c977 +md""" +Before starting the simple update routine, we normalize the vertex tensors: +""" + +# ╔═╡ 30053016-35f6-49d9-a574-4f53eb702200 +for ind in CartesianIndices(wpeps.vertices) + wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf) +end; + +# ╔═╡ ada2d1a4-f7d2-4424-bc57-490556a7c4d1 +md""" +Let's set algorithm parameters: The plan is to successively decrease the time interval of the Trotter-Suzuki as well as the convergence tolerance such that we obtain a more accurate result at each iteration. To run the simple update, we call `simpleupdate` where we use the keyword `bipartite=false` - meaning that we use the full ``2 \times 2`` unit cell without assuming a bipartite structure. Thus, we can start evolving: +""" + +# ╔═╡ 2e9699be-2d90-46e3-ab47-7f75deddcc22 +dts = [1e-2, 1e-3, 4e-4, 1e-4]; + +# ╔═╡ 444fc05e-28a3-47af-a328-5d332004f465 +tols = [1e-6, 1e-8, 1e-8, 1e-8]; + +# ╔═╡ 76d89b68-5356-490f-96f4-ec2704fdf8ff +maxiter = 20000; + +# ╔═╡ da7fe8eb-7edc-40b5-909e-39c19ae8fece +begin + wpeps_su = wpeps + for (n, (dt, tol)) in enumerate(zip(dts, tols)) + trscheme = truncerr(1e-10) & truncdim(Dbond) + alg = SimpleUpdate(dt, tol, maxiter, trscheme) + global wpeps_su, = simpleupdate(wpeps_su, H, alg; bipartite=false) + end +end; + +# ╔═╡ 9e3b3df0-c0f7-4a26-b425-fe9015c6e99f +md""" +To obtain the evolved `InfiniteWeightPEPS` as an actual PEPS without weights on the bonds, we can just call the following constructor: +""" + +# ╔═╡ 671286d1-7eee-413e-8ed2-f3c140ff9999 +peps = InfinitePEPS(wpeps_su); + +# ╔═╡ c1de88b7-f054-4063-86b6-ae234b4c4b0d +md""" +## Computing the ground-state energy + +In order to compute the energy expectation value with evolved PEPS, we need to converge a CTMRG environment on it. We first converge an environment with a small enviroment dimension and then use that to initialize another run with bigger environment dimension. We'll use `trscheme=truncdim(χ)` for that such that the dimension is increased during the second CTMRG run: +""" + +# ╔═╡ 5d2c06fd-a954-4b4b-a442-1322ea5eb5a3 +χenv₀, χenv = 6, 20; + +# ╔═╡ 5f6f179c-6d44-4316-9e7f-ff25bfc0f95d +env_space = Vect[fℤ₂](0 => χenv₀ / 2, 1 => χenv₀ / 2); + +# ╔═╡ be0441c5-394e-4812-aa44-5d1e8565723e +begin + env = CTMRGEnv(rand, Float64, peps, env_space); + for χ in [χenv₀, χenv] + global env, = leading_boundary(env, peps; alg=:sequential, tol=1e-5, trscheme=truncdim(χ)) + end +end; + +# ╔═╡ 487caef7-ceda-41ba-82ee-3d3dc0058162 +md""" +We measure the energy by computing the `H` expectation value, where we have to make sure to normalize to obtain the energy per site: +""" + +# ╔═╡ 474d4eb6-3d1a-4816-879f-a50e40f7fe9b +E = expectation_value(peps, H, env) / (Nr * Nc); + +# ╔═╡ c439d59e-2643-4532-89f3-3dcf92e0c49f +@show E + +# ╔═╡ 5a0064cf-2ad4-4d2c-818f-e90ca9a1b82d +md""" +Finally, we can compare the obtained ground-state energy against the literature, namely the QMC estimates from [Qin et al.](@cite qin_benchmark_2016). We find that the result generally agree: +""" + +# ╔═╡ ce6851d5-3cba-4393-9ca3-a5f49c5d0dde +Es_exact = Dict(0 => -1.62, 2 => -0.176, 4 => 0.8603, 6 => -0.6567, 8 => -0.5243); + +# ╔═╡ 6a17a167-5a49-40a7-9308-6bc687ce935e +E_exact = Es_exact[U] - U / 2; + +# ╔═╡ 36427835-e43f-4458-b600-bbbc75cf22a7 +@show (E - E_exact) / E_exact + +# ╔═╡ 00000000-0000-0000-0000-000000000001 +PLUTO_PROJECT_TOML_CONTENTS = """ +[deps] +PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" + +[compat] +PEPSKit = "~0.5.0" +TensorKit = "~0.14.5" +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000002 +PLUTO_MANIFEST_TOML_CONTENTS = """ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.11.4" +manifest_format = "2.0" +project_hash = "79f58b0126713df51e6c54bffa8c6c88c0809a34" + +[[deps.AbstractFFTs]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.5.0" + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + AbstractFFTsTestExt = "Test" + + [deps.AbstractFFTs.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.Accessors]] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] +git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" +uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +version = "0.1.42" + + [deps.Accessors.extensions] + AxisKeysExt = "AxisKeys" + IntervalSetsExt = "IntervalSets" + LinearAlgebraExt = "LinearAlgebra" + StaticArraysExt = "StaticArrays" + StructArraysExt = "StructArrays" + TestExt = "Test" + UnitfulExt = "Unitful" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[[deps.Adapt]] +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "4.3.0" +weakdeps = ["SparseArrays", "StaticArrays"] + + [deps.Adapt.extensions] + AdaptSparseArraysExt = "SparseArrays" + AdaptStaticArraysExt = "StaticArrays" + +[[deps.ArrayLayouts]] +deps = ["FillArrays", "LinearAlgebra"] +git-tree-sha1 = "4e25216b8fea1908a0ce0f5d87368587899f75be" +uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.ArrayLayouts.extensions] + ArrayLayoutsSparseArraysExt = "SparseArrays" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" + +[[deps.BangBang]] +deps = ["Accessors", "ConstructionBase", "InitialValues", "LinearAlgebra"] +git-tree-sha1 = "26f41e1df02c330c4fa1e98d4aa2168fdafc9b1f" +uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" +version = "0.4.4" + + [deps.BangBang.extensions] + BangBangChainRulesCoreExt = "ChainRulesCore" + BangBangDataFramesExt = "DataFrames" + BangBangStaticArraysExt = "StaticArrays" + BangBangStructArraysExt = "StructArrays" + BangBangTablesExt = "Tables" + BangBangTypedTablesExt = "TypedTables" + + [deps.BangBang.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" + TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" + +[[deps.BlockArrays]] +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] +git-tree-sha1 = "df1746706459aa184ed3424b240a917b89d67b60" +uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" +version = "1.6.1" + + [deps.BlockArrays.extensions] + BlockArraysAdaptExt = "Adapt" + BlockArraysBandedMatricesExt = "BandedMatrices" + + [deps.BlockArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + +[[deps.BlockTensorKit]] +deps = ["BlockArrays", "Compat", "LinearAlgebra", "Random", "Strided", "TensorKit", "TensorOperations", "TupleTools", "VectorInterface"] +git-tree-sha1 = "e0d455f2998aca33747def4f384c1aff5e3278de" +uuid = "5f87ffc2-9cf1-4a46-8172-465d160bd8cd" +version = "0.1.6" + +[[deps.ChainRules]] +deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "SparseInverseSubset", "Statistics", "StructArrays", "SuiteSparse"] +git-tree-sha1 = "a975ae558af61a2a48720a6271661bf2621e0f4e" +uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" +version = "1.72.3" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra"] +git-tree-sha1 = "1713c74e00545bfe14605d2a2be1712de8fbcb58" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.25.1" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" + +[[deps.ChunkSplitters]] +git-tree-sha1 = "63a3903063d035260f0f6eab00f517471c5dc784" +uuid = "ae650224-84b6-46f8-82ea-d812ca08434e" +version = "3.1.2" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.1" + +[[deps.Compat]] +deps = ["TOML", "UUIDs"] +git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.16.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "1.1.1+0" + +[[deps.CompositionsBase]] +git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" + +[[deps.ConstructionBase]] +git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.5.8" + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseLinearAlgebraExt = "LinearAlgebra" + ConstructionBaseStaticArraysExt = "StaticArrays" + + [deps.ConstructionBase.weakdeps] + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.DataAPI]] +git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.16.0" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" + +[[deps.DiffResults]] +deps = ["StaticArraysCore"] +git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.1.0" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.15.1" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" + +[[deps.DocStringExtensions]] +git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.4" + +[[deps.FillArrays]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "1.13.0" + + [deps.FillArrays.extensions] + FillArraysPDMatsExt = "PDMats" + FillArraysSparseArraysExt = "SparseArrays" + FillArraysStatisticsExt = "Statistics" + + [deps.FillArrays.weakdeps] + PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.FiniteDifferences]] +deps = ["ChainRulesCore", "LinearAlgebra", "Printf", "Random", "Richardson", "SparseArrays", "StaticArrays"] +git-tree-sha1 = "06d76c780d657729cf20821fb5832c6cc4dfd0b5" +uuid = "26cc04aa-876d-5657-8c51-4c34ba976000" +version = "0.12.32" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "1.0.1" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" + +[[deps.GPUArraysCore]] +deps = ["Adapt"] +git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" +uuid = "46192b85-c4d5-4398-a991-12ede77f4527" +version = "0.2.0" + +[[deps.HalfIntegers]] +git-tree-sha1 = "9c3149243abb5bc0bad0431d6c4fcac0f4443c7c" +uuid = "f0d1745a-41c9-11e9-1dd9-e5d34d218721" +version = "1.6.0" + +[[deps.HashArrayMappedTries]] +git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae" +uuid = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" +version = "0.2.0" + +[[deps.IRTools]] +deps = ["InteractiveUtils", "MacroTools"] +git-tree-sha1 = "950c3717af761bc3ff906c2e8e52bd83390b6ec2" +uuid = "7869d1d1-7146-5819-86e3-90919afe41df" +version = "0.4.14" + +[[deps.InitialValues]] +git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" +uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" +version = "0.3.1" + +[[deps.IntegerMathUtils]] +git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" +uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" +version = "0.1.2" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" + +[[deps.InverseFunctions]] +git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.17" + + [deps.InverseFunctions.extensions] + InverseFunctionsDatesExt = "Dates" + InverseFunctionsTestExt = "Test" + + [deps.InverseFunctions.weakdeps] + Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.2.4" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.7.0" + +[[deps.KrylovKit]] +deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"] +git-tree-sha1 = "38477816f8db29956ea591feb3086d9edabf6f38" +uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" +version = "0.9.5" +weakdeps = ["ChainRulesCore"] + + [deps.KrylovKit.extensions] + KrylovKitChainRulesCoreExt = "ChainRulesCore" + +[[deps.LRUCache]] +git-tree-sha1 = "5519b95a490ff5fe629c4a7aa3b3dfc9160498b3" +uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" +version = "1.6.2" +weakdeps = ["Serialization"] + + [deps.LRUCache.extensions] + SerializationExt = ["Serialization"] + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.11.0" + +[[deps.LogExpFunctions]] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.29" + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" + + [deps.LogExpFunctions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" + +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "1.0.3" + +[[deps.MPSKit]] +deps = ["Accessors", "BlockTensorKit", "Compat", "DocStringExtensions", "HalfIntegers", "KrylovKit", "LinearAlgebra", "LoggingExtras", "OhMyThreads", "OptimKit", "Printf", "Random", "RecipesBase", "TensorKit", "TensorKitManifolds", "TensorOperations", "VectorInterface"] +git-tree-sha1 = "588bef90e9672431efda1b686e8d477b621b2118" +uuid = "bb1c41ca-d63c-52ed-829e-0820dda26502" +version = "0.12.6" + +[[deps.MPSKitModels]] +deps = ["LinearAlgebra", "MPSKit", "MacroTools", "PrecompileTools", "TensorKit", "TensorOperations", "TupleTools"] +git-tree-sha1 = "d658f13d6b1c08304344faede50bebcc4f574b6f" +uuid = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" +version = "0.4.0" + +[[deps.MacroTools]] +git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.15" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.1.3" + +[[deps.OhMyThreads]] +deps = ["BangBang", "ChunkSplitters", "StableTasks", "TaskLocalValues"] +git-tree-sha1 = "5f81bdb937fd857bac9548fa8ab9390a06864bb5" +uuid = "67456a42-1dca-4109-a031-0a68de7e3ad5" +version = "0.7.0" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.27+1" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+4" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.6+0" + +[[deps.OptimKit]] +deps = ["LinearAlgebra", "Printf", "ScopedValues", "VectorInterface"] +git-tree-sha1 = "b0163ac202bc03aeb15f0e55002e544e74965534" +uuid = "77e91f04-9b3b-57a6-a776-40b61faaebe0" +version = "0.4.0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.8.0" + +[[deps.PEPSKit]] +deps = ["Accessors", "ChainRulesCore", "Compat", "FiniteDifferences", "KrylovKit", "LinearAlgebra", "LoggingExtras", "MPSKit", "MPSKitModels", "OhMyThreads", "OptimKit", "Printf", "Random", "Statistics", "TensorKit", "TensorOperations", "VectorInterface", "Zygote"] +git-tree-sha1 = "12c42d39d9c67070d5783cbd7ebb54ab957c6a09" +uuid = "52969e89-939e-4361-9b68-9bc7cde4bdeb" +version = "0.5.0" + +[[deps.PackageExtensionCompat]] +git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" +uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" +version = "1.0.2" +weakdeps = ["Requires", "TOML"] + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.2.1" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.4.3" + +[[deps.Primes]] +deps = ["IntegerMathUtils"] +git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" +uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" +version = "0.5.7" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" +version = "1.11.0" + +[[deps.PtrArrays]] +git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" +uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" +version = "1.3.0" + +[[deps.Random]] +deps = ["SHA"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" + +[[deps.RationalRoots]] +git-tree-sha1 = "e5f5db699187a4810fda9181b34250deeedafd81" +uuid = "308eb6b3-cc68-5ff3-9e97-c3c4da4fa681" +version = "0.2.1" + +[[deps.RealDot]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" +uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" +version = "0.1.0" + +[[deps.RecipesBase]] +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.4" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.1" + +[[deps.Richardson]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "48f038bfd83344065434089c2a79417f38715c41" +uuid = "708f8203-808e-40c0-ba2d-98a6953ed40d" +version = "1.4.2" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.ScopedValues]] +deps = ["HashArrayMappedTries", "Logging"] +git-tree-sha1 = "1147f140b4c8ddab224c94efa9569fc23d63ab44" +uuid = "7e506255-f358-4e82-b7e4-beb19740aa63" +version = "1.3.0" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" + +[[deps.SparseArrays]] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.11.0" + +[[deps.SparseInverseSubset]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "52962839426b75b3021296f7df242e40ecfc0852" +uuid = "dc90abb0-5640-4711-901d-7e5b23a2fada" +version = "0.1.2" + +[[deps.SpecialFunctions]] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "64cca0c26b4f31ba18f13f6c12af7c85f478cfde" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.5.0" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" + +[[deps.StableTasks]] +git-tree-sha1 = "c4f6610f85cb965bee5bfafa64cbeeda55a4e0b2" +uuid = "91464d47-22a1-43fe-8b7f-2d57ee82463f" +version = "0.1.7" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] +git-tree-sha1 = "0feb6b9031bd5c51f9072393eb5ab3efd31bf9e4" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.9.13" +weakdeps = ["ChainRulesCore", "Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" + StaticArraysStatisticsExt = "Statistics" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.4.3" + +[[deps.Statistics]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] + +[[deps.Strided]] +deps = ["LinearAlgebra", "StridedViews", "TupleTools"] +git-tree-sha1 = "4a1128f5237b5d0170d934a2eb4fa7a273639c9f" +uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" +version = "2.3.0" + +[[deps.StridedViews]] +deps = ["LinearAlgebra", "PackageExtensionCompat"] +git-tree-sha1 = "425158c52aa58d42593be6861befadf8b2541e9b" +uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" +version = "0.4.1" + + [deps.StridedViews.extensions] + StridedViewsCUDAExt = "CUDA" + StridedViewsPtrArraysExt = "PtrArrays" + + [deps.StridedViews.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + PtrArrays = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" + +[[deps.StructArrays]] +deps = ["ConstructionBase", "DataAPI", "Tables"] +git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.7.1" + + [deps.StructArrays.extensions] + StructArraysAdaptExt = "Adapt" + StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"] + StructArraysLinearAlgebraExt = "LinearAlgebra" + StructArraysSparseArraysExt = "SparseArrays" + StructArraysStaticArraysExt = "StaticArrays" + + [deps.StructArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.7.0+0" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.3" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.12.0" + +[[deps.TaskLocalValues]] +git-tree-sha1 = "d155450e6dff2a8bc2fcb81dcb194bd98b0aeb46" +uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" +version = "0.1.2" + +[[deps.TensorKit]] +deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "Random", "SparseArrays", "Strided", "TensorKitSectors", "TensorOperations", "TupleTools", "VectorInterface"] +git-tree-sha1 = "4a09ea843d18b7256f710f1188414433dcf0b7db" +uuid = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" +version = "0.14.5" +weakdeps = ["ChainRulesCore", "FiniteDifferences"] + + [deps.TensorKit.extensions] + TensorKitChainRulesCoreExt = "ChainRulesCore" + TensorKitFiniteDifferencesExt = "FiniteDifferences" + +[[deps.TensorKitManifolds]] +deps = ["LinearAlgebra", "TensorKit"] +git-tree-sha1 = "94530ac4691795834e2efacb2d31d37571dad52f" +uuid = "11fa318c-39cb-4a83-b1ed-cdc7ba1e3684" +version = "0.7.2" + +[[deps.TensorKitSectors]] +deps = ["HalfIntegers", "LinearAlgebra", "TensorOperations", "WignerSymbols"] +git-tree-sha1 = "fd15110964416b3ac3e7d1d212b0260e4629e536" +uuid = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f" +version = "0.1.4" + +[[deps.TensorOperations]] +deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Preferences", "PtrArrays", "Strided", "StridedViews", "TupleTools", "VectorInterface"] +git-tree-sha1 = "c7458aad3d855e892e2cae208a793a5fceee2406" +uuid = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" +version = "5.2.0" + + [deps.TensorOperations.extensions] + TensorOperationsBumperExt = "Bumper" + TensorOperationsChainRulesCoreExt = "ChainRulesCore" + TensorOperationscuTENSORExt = ["cuTENSOR", "CUDA"] + + [deps.TensorOperations.weakdeps] + Bumper = "8ce10254-0962-460f-a3d8-1f77fea1446e" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1" + +[[deps.TupleTools]] +git-tree-sha1 = "41e43b9dc950775eac654b9f845c839cd2f1821e" +uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" +version = "1.6.0" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" + +[[deps.VectorInterface]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9166406dedd38c111a6574e9814be83d267f8aec" +uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8" +version = "0.5.0" + +[[deps.WignerSymbols]] +deps = ["HalfIntegers", "LRUCache", "Primes", "RationalRoots"] +git-tree-sha1 = "960e5f708871c1d9a28a7f1dbcaf4e0ee34ee960" +uuid = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" +version = "2.0.0" + +[[deps.Zygote]] +deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] +git-tree-sha1 = "207d714f3514b0d564e3a08f9e9f753bf6566c2d" +uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" +version = "0.7.6" + + [deps.Zygote.extensions] + ZygoteAtomExt = "Atom" + ZygoteColorsExt = "Colors" + ZygoteDistancesExt = "Distances" + ZygoteTrackerExt = "Tracker" + + [deps.Zygote.weakdeps] + Atom = "c52e3926-4ff0-5f6e-af25-54175e0327b1" + Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" + Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.ZygoteRules]] +deps = ["ChainRulesCore", "MacroTools"] +git-tree-sha1 = "434b3de333c75fc446aa0d19fc394edafd07ab08" +uuid = "700de1a5-db45-46bc-99cf-38207098b444" +version = "0.2.7" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.11.0+0" +""" + +# ╔═╡ Cell order: +# ╠═ba26b46c-4ccd-426b-a3c7-c71c5051f390 +# ╠═4aff432e-e8a9-441f-8c72-ba3609d99eba +# ╠═b1bcace2-28ff-4475-acb2-3ef8e9ca7033 +# ╠═4f49c108-6b3c-4d6a-a99f-90922ab8e114 +# ╠═1a979cdf-711e-414b-8566-c23638e760d2 +# ╠═452bf333-e3fd-450f-8f6a-0ef42586a03f +# ╠═156d773c-96c3-4fb2-a111-71eddddfa33b +# ╠═aa4e6383-999d-4b1d-9fca-a053b7a9debf +# ╠═59d49b04-4ea8-4bc1-b308-56dbb3b5e3d4 +# ╠═cd7499dc-32b3-41ca-a369-a8c7dcce8d88 +# ╠═5e046ae3-747e-40c5-9f35-59ced565de50 +# ╠═6224ad78-cf6c-444e-976a-1a0d1bb6c261 +# ╠═f1a13a5d-c7c0-4fd9-8a42-06826d04a406 +# ╠═d0bb6199-6e09-41cb-bc0c-a552aedc5443 +# ╠═51df2d55-e51f-41cf-8fd0-bd58ca85c977 +# ╠═30053016-35f6-49d9-a574-4f53eb702200 +# ╠═ada2d1a4-f7d2-4424-bc57-490556a7c4d1 +# ╠═2e9699be-2d90-46e3-ab47-7f75deddcc22 +# ╠═444fc05e-28a3-47af-a328-5d332004f465 +# ╠═76d89b68-5356-490f-96f4-ec2704fdf8ff +# ╠═da7fe8eb-7edc-40b5-909e-39c19ae8fece +# ╠═9e3b3df0-c0f7-4a26-b425-fe9015c6e99f +# ╠═671286d1-7eee-413e-8ed2-f3c140ff9999 +# ╠═c1de88b7-f054-4063-86b6-ae234b4c4b0d +# ╠═5d2c06fd-a954-4b4b-a442-1322ea5eb5a3 +# ╠═5f6f179c-6d44-4316-9e7f-ff25bfc0f95d +# ╠═be0441c5-394e-4812-aa44-5d1e8565723e +# ╠═487caef7-ceda-41ba-82ee-3d3dc0058162 +# ╠═474d4eb6-3d1a-4816-879f-a50e40f7fe9b +# ╠═c439d59e-2643-4532-89f3-3dcf92e0c49f +# ╠═5a0064cf-2ad4-4d2c-818f-e90ca9a1b82d +# ╠═ce6851d5-3cba-4393-9ca3-a5f49c5d0dde +# ╠═6a17a167-5a49-40a7-9308-6bc687ce935e +# ╠═36427835-e43f-4458-b600-bbbc75cf22a7 +# ╟─00000000-0000-0000-0000-000000000001 +# ╟─00000000-0000-0000-0000-000000000002 From 8ed31c102de6e53edbb3609b25263c16d9c36df7 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Tue, 15 Apr 2025 20:14:13 +0200 Subject: [PATCH 038/113] Remove old examples and update bibliography --- docs/make.jl | 1 + docs/src/assets/pepskit.bib | 2 +- examples/fermi_hubbard.jl | 57 -- examples/hubbard_su.jl | 58 -- examples/notebooks/bose_hubbard.jl | 2 +- examples/notebooks/fermi_hubbard.jl | 944 ++++++++++++++++++++++++++++ examples/xxz.jl | 52 -- 7 files changed, 947 insertions(+), 169 deletions(-) delete mode 100644 examples/fermi_hubbard.jl delete mode 100644 examples/hubbard_su.jl create mode 100644 examples/notebooks/fermi_hubbard.jl delete mode 100644 examples/xxz.jl diff --git a/docs/make.jl b/docs/make.jl index 22cb5336c..33a9c713f 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -47,6 +47,7 @@ examples = [ "Boundary MPS contractions using VUMPS and PEPOs" => "examples/boundary_mps.md", "Optimizing the ``U(1)``-symmetric Bose-Hubbard model" => "examples/bose_hubbard.md", "Néel order in the ``U(1)``-symmetric XXZ model" => "examples/xxz.md", + "Fermi-Hubbard model with ``f\\mathbb{Z}_2 \\boxtimes U(1)`` symmetry at large ``U`` and half-filling" => "examples/fermi_hubbard.jl", ] makedocs(; diff --git a/docs/src/assets/pepskit.bib b/docs/src/assets/pepskit.bib index 9bbf6e11e..396c79858 100644 --- a/docs/src/assets/pepskit.bib +++ b/docs/src/assets/pepskit.bib @@ -55,7 +55,7 @@ @article{vanderstraeten_residual_2018 url = {https://link.aps.org/doi/10.1103/PhysRevE.98.042145} } -@article{mingpu_benchmark_2016, +@article{qin_benchmark_2016, title = {Benchmark study of the two-dimensional Hubbard model with auxiliary-field quantum Monte Carlo method}, author = {Qin, Mingpu and Shi, Hao and Zhang, Shiwei}, journal = {Phys. Rev. B}, diff --git a/examples/fermi_hubbard.jl b/examples/fermi_hubbard.jl deleted file mode 100644 index 165301ef3..000000000 --- a/examples/fermi_hubbard.jl +++ /dev/null @@ -1,57 +0,0 @@ -using Test -using Random -using PEPSKit -using TensorKit -using KrylovKit -using OptimKit - -using MPSKit: add_physical_charge - -## The Fermi-Hubbard model with fℤ₂ ⊠ U1 symmetry, at large U and half filling - -# reference: https://www.osti.gov/servlets/purl/1565498 -# energy should end up at E_ref ≈ 4 * -0.5244140625 = -2.09765625, but takes a lot of time -E_ref = -2.0 - -# parameters -t = 1.0 -U = 8.0 -lattice = InfiniteSquare(2, 2) -fermion = fℤ₂ -particle_symmetry = U1Irrep -spin_symmetry = Trivial -S = fermion ⊠ particle_symmetry # symmetry sector - -# spaces -D = 1 -Vpeps = Vect[S]((0, 0) => 2 * D, (1, 1) => D, (1, -1) => D) -χ = 1 -Venv = Vect[S]( - (0, 0) => 4 * χ, (1, -1) => 2 * χ, (1, 1) => 2 * χ, (0, 2) => χ, (0, -2) => χ -) -Saux = S((1, -1)) # impose half filling - -# algorithms -boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)) -gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge) -optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2) -reuse_env = true - -# Hamiltonian -H0 = hubbard_model(ComplexF64, particle_symmetry, spin_symmetry, lattice; t, U) -H = add_physical_charge(H0, fill(Saux, size(H0.lattice)...)) -Pspaces = H.lattice - -# initialize state -Nspaces = fill(Vpeps, size(lattice)...) -Espaces = fill(Vpeps, size(lattice)...) -Random.seed!(2928528937) -ψ₀ = InfinitePEPS(randn, ComplexF64, Pspaces, Nspaces, Espaces) -env₀ = CTMRGEnv(ψ₀, Venv) -env₀, = leading_boundary(env₀, ψ₀; boundary_alg...) - -# optimize -ψ, env, E, info = fixedpoint( - H, ψ₀, env₀; boundary_alg, gradient_alg, optimizer_alg, reuse_env -) -@test E < E_ref diff --git a/examples/hubbard_su.jl b/examples/hubbard_su.jl deleted file mode 100644 index 699a49dba..000000000 --- a/examples/hubbard_su.jl +++ /dev/null @@ -1,58 +0,0 @@ -using Test -using Random -using PEPSKit -using TensorKit - -# random initialization of 2x2 iPEPS with weights and CTMRGEnv (using real numbers) -Dbond, symm = 8, Trivial -Nr, Nc = 2, 2 -Random.seed!(10) -if symm == Trivial - Pspace = Vect[fℤ₂](0 => 2, 1 => 2) - Vspace = Vect[fℤ₂](0 => Dbond / 2, 1 => Dbond / 2) -else - error("Not implemented") -end -peps = InfiniteWeightPEPS(rand, Float64, Pspace, Vspace; unitcell=(Nr, Nc)) - -# normalize vertex tensors -for ind in CartesianIndices(peps.vertices) - peps.vertices[ind] /= norm(peps.vertices[ind], Inf) -end - -# Hubbard model Hamiltonian at half-filling -t, U = 1, 6 -ham = hubbard_model(Float64, Trivial, Trivial, InfiniteSquare(Nr, Nc); t, U, mu=U / 2) - -# simple update -dts = [1e-2, 1e-3, 4e-4, 1e-4] -tols = [1e-6, 1e-8, 1e-8, 1e-8] -maxiter = 20000 -for (n, (dt, tol)) in enumerate(zip(dts, tols)) - trscheme = truncerr(1e-10) & truncdim(Dbond) - alg = SimpleUpdate(dt, tol, maxiter, trscheme) - global peps, = simpleupdate(peps, ham, alg; bipartite=false) -end - -# absorb weight into site tensors -peps = InfinitePEPS(peps) - -# CTMRG -χenv0, χenv = 6, 20 -Espace = Vect[fℤ₂](0 => χenv0 / 2, 1 => χenv0 / 2) -env = CTMRGEnv(randn, Float64, peps, Espace) -for χ in [χenv0, χenv] - env, = leading_boundary(env, peps; alg=:sequential, maxiter=300, tol=1e-7) -end - -# Benchmark values of the ground state energy from -# Qin, M., Shi, H., & Zhang, S. (2016). Benchmark study of the two-dimensional Hubbard -# model with auxiliary-field quantum Monte Carlo method. Physical Review B, 94(8), 085103. -Es_exact = Dict(0 => -1.62, 2 => -0.176, 4 => 0.8603, 6 => -0.6567, 8 => -0.5243) -E_exact = Es_exact[U] - U / 2 - -# measure energy -E = cost_function(peps, env, ham) / (Nr * Nc) -@info "Energy = $E" -@info "Benchmark energy = $E_exact" -@test isapprox(E, E_exact; atol=5e-2) diff --git a/examples/notebooks/bose_hubbard.jl b/examples/notebooks/bose_hubbard.jl index 549dbd0dd..298ca6089 100644 --- a/examples/notebooks/bose_hubbard.jl +++ b/examples/notebooks/bose_hubbard.jl @@ -29,7 +29,7 @@ Random.seed!(2928528935); md""" ## Defining the model -We will construct the Bose-Hubbard model Hamiltonian through the [`bose_hubbard_model` function from MPSKitModels.jl](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.bose_hubbard_model), as reexported by PEPSKit. We'll simulate the model in its Mott-insulating phase where the ratio ``U/t`` is large, since in this phase we expect the ground state to be well approximated by a PEPS with a manifest global ``U(1)`` symmetry. Furthermore, we'll impose a cutoff at 2 bosons per site, set the chemical potential to zero and use a simple 1x1 unit cell: +We will construct the Bose-Hubbard model Hamiltonian through the [`bose_hubbard_model` function from MPSKitModels](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.bose_hubbard_model), as reexported by PEPSKit. We'll simulate the model in its Mott-insulating phase where the ratio ``U/t`` is large, since in this phase we expect the ground state to be well approximated by a PEPS with a manifest global ``U(1)`` symmetry. Furthermore, we'll impose a cutoff at 2 bosons per site, set the chemical potential to zero and use a simple 1x1 unit cell: """ # ╔═╡ 6011ff02-c309-4472-a030-08a6c9b9aceb diff --git a/examples/notebooks/fermi_hubbard.jl b/examples/notebooks/fermi_hubbard.jl new file mode 100644 index 000000000..61703a8cf --- /dev/null +++ b/examples/notebooks/fermi_hubbard.jl @@ -0,0 +1,944 @@ +### A Pluto.jl notebook ### +# v0.20.5 + +using Markdown +using InteractiveUtils + +# ╔═╡ e37d4924-e7ec-47b6-abd2-729e3736ca0a +using Random + +# ╔═╡ ca35aca6-fd69-4a08-9cde-34e2570e1cca +using TensorKit, PEPSKit + +# ╔═╡ 88782296-e160-4633-bca9-e3becc1012a2 +using MPSKit: add_physical_charge + +# ╔═╡ 596482a0-61c1-45d2-9c3b-d65f78c8b280 +md""" +# Fermi-Hubbard model with ``f\mathbb{Z}_2 \boxtimes U(1)`` symmetry, at large ``U`` and half-filling + +In this example, we will demonstrate how to handle fermionic PEPS tensors and how to optimize them. To that end, we consider the two-dimensional Hubbard model + +```math +H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- + c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i +``` + +where ``\sigma \in \{\uparrow,\downarrow\}`` and ``n_{i,\sigma} = c_{i,\sigma}^+ c_{i,\sigma}^-`` is the fermionic number operator. As in previous examples, using fermionic degrees of freedom is a matter of creating tensors with the right symmetry sectors - the rest of the simulation workflow remains the same. + +First though, we make the example deterministic by seeding the RNG, and we make our imports: +""" + +# ╔═╡ f6caf5ba-2777-46bb-9795-29f960894d6c +Random.seed!(2928528937); + +# ╔═╡ d8403224-d288-4ddc-b587-2c3d4e824090 +md""" +## Defining the fermionic Hamiltonian + +Let us start by fixing the parameters of the Hubbard model. We're going to use a hopping of ``t=1`` and a large ``U=8`` on a ``2 \times 2`` unit cell: +""" + +# ╔═╡ c53436e1-97eb-4371-853a-48071bfdb2ac +t = 1.0; + +# ╔═╡ 07accc9f-a371-4c7c-a31b-304d89447250 +U = 8.0; + +# ╔═╡ b7c9d9ca-3ff5-4808-8dfc-c6c71ea0143e +lattice = InfiniteSquare(2, 2); + +# ╔═╡ 07089315-c37b-4bd7-bf48-de2e6b5cc5c5 +md""" +In order to create fermionic tensors, one needs to define symmetry sectors using TensorKit's [`FermionParity`](@extref). Not only do we want use fermion parity but we also want our particles to exploit the global ``U(1)`` symmetry. The combined product sector can be obtained using the [Deligne product](https://jutho.github.io/TensorKit.jl/stable/lib/sectors/#TensorKitSectors.deligneproduct-Tuple{Sector,%20Sector}), called through `⊠` which is obtained by typing `\boxtimes+TAB`. We will not impose any extra spin symmetry, so we have: +""" + +# ╔═╡ e770f01b-7e23-45b4-a460-ad237a778f47 +fermion = fℤ₂; + +# ╔═╡ 8f072cdb-7872-445b-bbab-949a17cda272 +particle_symmetry = U1Irrep; + +# ╔═╡ 72276f14-447f-4ddf-b06c-a2432be93b59 +spin_symmetry = Trivial; + +# ╔═╡ 6644b0cf-c7c6-4c25-a5c5-ef2a826e5b90 +S = fermion ⊠ particle_symmetry; + +# ╔═╡ 77c04811-60d6-4c93-9083-e17dba8c61d2 +md""" +The next step is defining graded virtual PEPS and environment spaces using `S`. Here we also use the symmetry sector to impose half-filling. That is all we need to define the Hubbard Hamiltonian: +""" + +# ╔═╡ 679cc5c6-0121-43d4-8179-8cbe1084215e +D, χ = 1, 1; + +# ╔═╡ 1560d618-c782-4d12-9817-b66a01435c72 +V_peps = Vect[S]((0, 0) => 2 * D, (1, 1) => D, (1, -1) => D); + +# ╔═╡ 5a2ee7f3-e73b-42ba-8743-09f152921fda +V_env = Vect[S]( + (0, 0) => 4 * χ, (1, -1) => 2 * χ, (1, 1) => 2 * χ, (0, 2) => χ, (0, -2) => χ +); + +# ╔═╡ d8b05a5f-bc86-4678-8595-bb296f86f28a +S_aux = S((1, -1)); + +# ╔═╡ 8daa6402-82d7-4a7c-85a1-295fbbc5a9e1 +H₀ = hubbard_model(ComplexF64, particle_symmetry, spin_symmetry, lattice; t, U); + +# ╔═╡ c6604da5-7125-4370-8824-578362ae16a2 +H = add_physical_charge(H₀, fill(S_aux, size(H₀.lattice)...)); + +# ╔═╡ 37c1c825-c6b5-4a4f-902b-b3299869dcc1 +md""" +## Finding the ground state + +Again, the procedure of ground state optimization is very similar to before. First, we define all algorithmic parameters: +""" + +# ╔═╡ f09bd4cf-d41d-4c15-943f-a9315aa3d8e3 +boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)); + +# ╔═╡ b1db3cbb-aef4-4ffb-8fcc-cc5948247299 +gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge); + +# ╔═╡ cd49f55e-94a7-481e-8287-1e80a0f4034f +optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2); + +# ╔═╡ 7f59f1d9-b7db-4ee6-a99d-7999a83d6a53 +md""" +Second, we initialize a PEPS state and environment (which we converge) constructed from symmetric physical and virtual spaces: +""" + +# ╔═╡ 0b8154c9-9638-4c9e-8f40-ab73b667ffb1 +physical_spaces = H.lattice; + +# ╔═╡ 40bb6832-e12d-4341-8d12-defc54d79145 +virtual_spaces = fill(V_peps, size(lattice)...); + +# ╔═╡ 378bcccd-3803-4754-928d-a437fe457e9f +peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces); + +# ╔═╡ 1a70d171-4087-4f1d-8ba7-41a178c8f80b +env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); + +# ╔═╡ 63230dd6-98c5-44b0-b0a4-d7bb51e44445 +md""" +And third, we start the ground state search (this does take quite long): +""" + +# ╔═╡ 6081ea87-09a4-4b52-96fc-753cb94a5d36 +peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg); + +# ╔═╡ 69c92f0b-3598-4f92-8475-52f4eee2c03c +@show E + +# ╔═╡ a872f393-fbd9-432a-aabc-ddd33f33f450 +md""" +Finally, let's compare the obtained energy against a reference energy from a QMC study by [Qin et al.](@cite qin_benchmark_2016). At our parameters they obtain an energy of ``E_\text{ref} \approx 4 \times -0.5244140625 = -2.09765625`` (the factor 4 comes from the ``2 x 2`` unit cell that we use here). Thus, we find: +""" + +# ╔═╡ 8d8baa3a-df5b-45e0-be1f-56f6dcd99ff7 +E_ref = -2.09765625; + +# ╔═╡ d5e10a13-402d-4995-9594-b4e3623a87ce +@show (E - E_ref) / E_ref + +# ╔═╡ 00000000-0000-0000-0000-000000000001 +PLUTO_PROJECT_TOML_CONTENTS = """ +[deps] +MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502" +PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" + +[compat] +MPSKit = "~0.12.6" +PEPSKit = "~0.5.0" +TensorKit = "~0.14.5" +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000002 +PLUTO_MANIFEST_TOML_CONTENTS = """ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.11.4" +manifest_format = "2.0" +project_hash = "c70e6e86b5621a8e0ee82a182ffe7c3e8712cf1e" + +[[deps.AbstractFFTs]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.5.0" + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + AbstractFFTsTestExt = "Test" + + [deps.AbstractFFTs.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.Accessors]] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] +git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" +uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +version = "0.1.42" + + [deps.Accessors.extensions] + AxisKeysExt = "AxisKeys" + IntervalSetsExt = "IntervalSets" + LinearAlgebraExt = "LinearAlgebra" + StaticArraysExt = "StaticArrays" + StructArraysExt = "StructArrays" + TestExt = "Test" + UnitfulExt = "Unitful" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[[deps.Adapt]] +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "4.3.0" +weakdeps = ["SparseArrays", "StaticArrays"] + + [deps.Adapt.extensions] + AdaptSparseArraysExt = "SparseArrays" + AdaptStaticArraysExt = "StaticArrays" + +[[deps.ArrayLayouts]] +deps = ["FillArrays", "LinearAlgebra"] +git-tree-sha1 = "4e25216b8fea1908a0ce0f5d87368587899f75be" +uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.ArrayLayouts.extensions] + ArrayLayoutsSparseArraysExt = "SparseArrays" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" + +[[deps.BangBang]] +deps = ["Accessors", "ConstructionBase", "InitialValues", "LinearAlgebra"] +git-tree-sha1 = "26f41e1df02c330c4fa1e98d4aa2168fdafc9b1f" +uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" +version = "0.4.4" + + [deps.BangBang.extensions] + BangBangChainRulesCoreExt = "ChainRulesCore" + BangBangDataFramesExt = "DataFrames" + BangBangStaticArraysExt = "StaticArrays" + BangBangStructArraysExt = "StructArrays" + BangBangTablesExt = "Tables" + BangBangTypedTablesExt = "TypedTables" + + [deps.BangBang.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" + TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" + +[[deps.BlockArrays]] +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] +git-tree-sha1 = "df1746706459aa184ed3424b240a917b89d67b60" +uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" +version = "1.6.1" + + [deps.BlockArrays.extensions] + BlockArraysAdaptExt = "Adapt" + BlockArraysBandedMatricesExt = "BandedMatrices" + + [deps.BlockArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + +[[deps.BlockTensorKit]] +deps = ["BlockArrays", "Compat", "LinearAlgebra", "Random", "Strided", "TensorKit", "TensorOperations", "TupleTools", "VectorInterface"] +git-tree-sha1 = "e0d455f2998aca33747def4f384c1aff5e3278de" +uuid = "5f87ffc2-9cf1-4a46-8172-465d160bd8cd" +version = "0.1.6" + +[[deps.ChainRules]] +deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "SparseInverseSubset", "Statistics", "StructArrays", "SuiteSparse"] +git-tree-sha1 = "a975ae558af61a2a48720a6271661bf2621e0f4e" +uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" +version = "1.72.3" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra"] +git-tree-sha1 = "1713c74e00545bfe14605d2a2be1712de8fbcb58" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.25.1" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" + +[[deps.ChunkSplitters]] +git-tree-sha1 = "63a3903063d035260f0f6eab00f517471c5dc784" +uuid = "ae650224-84b6-46f8-82ea-d812ca08434e" +version = "3.1.2" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.1" + +[[deps.Compat]] +deps = ["TOML", "UUIDs"] +git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.16.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "1.1.1+0" + +[[deps.CompositionsBase]] +git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" + +[[deps.ConstructionBase]] +git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.5.8" + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseLinearAlgebraExt = "LinearAlgebra" + ConstructionBaseStaticArraysExt = "StaticArrays" + + [deps.ConstructionBase.weakdeps] + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.DataAPI]] +git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.16.0" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" + +[[deps.DiffResults]] +deps = ["StaticArraysCore"] +git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.1.0" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.15.1" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" + +[[deps.DocStringExtensions]] +git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.4" + +[[deps.FillArrays]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "1.13.0" + + [deps.FillArrays.extensions] + FillArraysPDMatsExt = "PDMats" + FillArraysSparseArraysExt = "SparseArrays" + FillArraysStatisticsExt = "Statistics" + + [deps.FillArrays.weakdeps] + PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.FiniteDifferences]] +deps = ["ChainRulesCore", "LinearAlgebra", "Printf", "Random", "Richardson", "SparseArrays", "StaticArrays"] +git-tree-sha1 = "06d76c780d657729cf20821fb5832c6cc4dfd0b5" +uuid = "26cc04aa-876d-5657-8c51-4c34ba976000" +version = "0.12.32" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "1.0.1" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" + +[[deps.GPUArraysCore]] +deps = ["Adapt"] +git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" +uuid = "46192b85-c4d5-4398-a991-12ede77f4527" +version = "0.2.0" + +[[deps.HalfIntegers]] +git-tree-sha1 = "9c3149243abb5bc0bad0431d6c4fcac0f4443c7c" +uuid = "f0d1745a-41c9-11e9-1dd9-e5d34d218721" +version = "1.6.0" + +[[deps.HashArrayMappedTries]] +git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae" +uuid = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" +version = "0.2.0" + +[[deps.IRTools]] +deps = ["InteractiveUtils", "MacroTools"] +git-tree-sha1 = "950c3717af761bc3ff906c2e8e52bd83390b6ec2" +uuid = "7869d1d1-7146-5819-86e3-90919afe41df" +version = "0.4.14" + +[[deps.InitialValues]] +git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" +uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" +version = "0.3.1" + +[[deps.IntegerMathUtils]] +git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" +uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" +version = "0.1.2" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" + +[[deps.InverseFunctions]] +git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.17" + + [deps.InverseFunctions.extensions] + InverseFunctionsDatesExt = "Dates" + InverseFunctionsTestExt = "Test" + + [deps.InverseFunctions.weakdeps] + Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.2.4" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.7.0" + +[[deps.KrylovKit]] +deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"] +git-tree-sha1 = "38477816f8db29956ea591feb3086d9edabf6f38" +uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" +version = "0.9.5" +weakdeps = ["ChainRulesCore"] + + [deps.KrylovKit.extensions] + KrylovKitChainRulesCoreExt = "ChainRulesCore" + +[[deps.LRUCache]] +git-tree-sha1 = "5519b95a490ff5fe629c4a7aa3b3dfc9160498b3" +uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" +version = "1.6.2" +weakdeps = ["Serialization"] + + [deps.LRUCache.extensions] + SerializationExt = ["Serialization"] + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.11.0" + +[[deps.LogExpFunctions]] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.29" + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" + + [deps.LogExpFunctions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" + +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "1.0.3" + +[[deps.MPSKit]] +deps = ["Accessors", "BlockTensorKit", "Compat", "DocStringExtensions", "HalfIntegers", "KrylovKit", "LinearAlgebra", "LoggingExtras", "OhMyThreads", "OptimKit", "Printf", "Random", "RecipesBase", "TensorKit", "TensorKitManifolds", "TensorOperations", "VectorInterface"] +git-tree-sha1 = "588bef90e9672431efda1b686e8d477b621b2118" +uuid = "bb1c41ca-d63c-52ed-829e-0820dda26502" +version = "0.12.6" + +[[deps.MPSKitModels]] +deps = ["LinearAlgebra", "MPSKit", "MacroTools", "PrecompileTools", "TensorKit", "TensorOperations", "TupleTools"] +git-tree-sha1 = "d658f13d6b1c08304344faede50bebcc4f574b6f" +uuid = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" +version = "0.4.0" + +[[deps.MacroTools]] +git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.15" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.1.3" + +[[deps.OhMyThreads]] +deps = ["BangBang", "ChunkSplitters", "StableTasks", "TaskLocalValues"] +git-tree-sha1 = "5f81bdb937fd857bac9548fa8ab9390a06864bb5" +uuid = "67456a42-1dca-4109-a031-0a68de7e3ad5" +version = "0.7.0" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.27+1" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+4" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.6+0" + +[[deps.OptimKit]] +deps = ["LinearAlgebra", "Printf", "ScopedValues", "VectorInterface"] +git-tree-sha1 = "b0163ac202bc03aeb15f0e55002e544e74965534" +uuid = "77e91f04-9b3b-57a6-a776-40b61faaebe0" +version = "0.4.0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.8.0" + +[[deps.PEPSKit]] +deps = ["Accessors", "ChainRulesCore", "Compat", "FiniteDifferences", "KrylovKit", "LinearAlgebra", "LoggingExtras", "MPSKit", "MPSKitModels", "OhMyThreads", "OptimKit", "Printf", "Random", "Statistics", "TensorKit", "TensorOperations", "VectorInterface", "Zygote"] +git-tree-sha1 = "12c42d39d9c67070d5783cbd7ebb54ab957c6a09" +uuid = "52969e89-939e-4361-9b68-9bc7cde4bdeb" +version = "0.5.0" + +[[deps.PackageExtensionCompat]] +git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" +uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" +version = "1.0.2" +weakdeps = ["Requires", "TOML"] + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.2.1" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.4.3" + +[[deps.Primes]] +deps = ["IntegerMathUtils"] +git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" +uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" +version = "0.5.7" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" +version = "1.11.0" + +[[deps.PtrArrays]] +git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" +uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" +version = "1.3.0" + +[[deps.Random]] +deps = ["SHA"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" + +[[deps.RationalRoots]] +git-tree-sha1 = "e5f5db699187a4810fda9181b34250deeedafd81" +uuid = "308eb6b3-cc68-5ff3-9e97-c3c4da4fa681" +version = "0.2.1" + +[[deps.RealDot]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" +uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" +version = "0.1.0" + +[[deps.RecipesBase]] +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.4" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.1" + +[[deps.Richardson]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "48f038bfd83344065434089c2a79417f38715c41" +uuid = "708f8203-808e-40c0-ba2d-98a6953ed40d" +version = "1.4.2" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.ScopedValues]] +deps = ["HashArrayMappedTries", "Logging"] +git-tree-sha1 = "1147f140b4c8ddab224c94efa9569fc23d63ab44" +uuid = "7e506255-f358-4e82-b7e4-beb19740aa63" +version = "1.3.0" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" + +[[deps.SparseArrays]] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.11.0" + +[[deps.SparseInverseSubset]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "52962839426b75b3021296f7df242e40ecfc0852" +uuid = "dc90abb0-5640-4711-901d-7e5b23a2fada" +version = "0.1.2" + +[[deps.SpecialFunctions]] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "64cca0c26b4f31ba18f13f6c12af7c85f478cfde" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.5.0" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" + +[[deps.StableTasks]] +git-tree-sha1 = "c4f6610f85cb965bee5bfafa64cbeeda55a4e0b2" +uuid = "91464d47-22a1-43fe-8b7f-2d57ee82463f" +version = "0.1.7" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] +git-tree-sha1 = "0feb6b9031bd5c51f9072393eb5ab3efd31bf9e4" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.9.13" +weakdeps = ["ChainRulesCore", "Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" + StaticArraysStatisticsExt = "Statistics" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.4.3" + +[[deps.Statistics]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] + +[[deps.Strided]] +deps = ["LinearAlgebra", "StridedViews", "TupleTools"] +git-tree-sha1 = "4a1128f5237b5d0170d934a2eb4fa7a273639c9f" +uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" +version = "2.3.0" + +[[deps.StridedViews]] +deps = ["LinearAlgebra", "PackageExtensionCompat"] +git-tree-sha1 = "425158c52aa58d42593be6861befadf8b2541e9b" +uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" +version = "0.4.1" + + [deps.StridedViews.extensions] + StridedViewsCUDAExt = "CUDA" + StridedViewsPtrArraysExt = "PtrArrays" + + [deps.StridedViews.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + PtrArrays = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" + +[[deps.StructArrays]] +deps = ["ConstructionBase", "DataAPI", "Tables"] +git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.7.1" + + [deps.StructArrays.extensions] + StructArraysAdaptExt = "Adapt" + StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"] + StructArraysLinearAlgebraExt = "LinearAlgebra" + StructArraysSparseArraysExt = "SparseArrays" + StructArraysStaticArraysExt = "StaticArrays" + + [deps.StructArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.7.0+0" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.3" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.12.0" + +[[deps.TaskLocalValues]] +git-tree-sha1 = "d155450e6dff2a8bc2fcb81dcb194bd98b0aeb46" +uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" +version = "0.1.2" + +[[deps.TensorKit]] +deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "Random", "SparseArrays", "Strided", "TensorKitSectors", "TensorOperations", "TupleTools", "VectorInterface"] +git-tree-sha1 = "4a09ea843d18b7256f710f1188414433dcf0b7db" +uuid = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" +version = "0.14.5" +weakdeps = ["ChainRulesCore", "FiniteDifferences"] + + [deps.TensorKit.extensions] + TensorKitChainRulesCoreExt = "ChainRulesCore" + TensorKitFiniteDifferencesExt = "FiniteDifferences" + +[[deps.TensorKitManifolds]] +deps = ["LinearAlgebra", "TensorKit"] +git-tree-sha1 = "94530ac4691795834e2efacb2d31d37571dad52f" +uuid = "11fa318c-39cb-4a83-b1ed-cdc7ba1e3684" +version = "0.7.2" + +[[deps.TensorKitSectors]] +deps = ["HalfIntegers", "LinearAlgebra", "TensorOperations", "WignerSymbols"] +git-tree-sha1 = "fd15110964416b3ac3e7d1d212b0260e4629e536" +uuid = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f" +version = "0.1.4" + +[[deps.TensorOperations]] +deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Preferences", "PtrArrays", "Strided", "StridedViews", "TupleTools", "VectorInterface"] +git-tree-sha1 = "c7458aad3d855e892e2cae208a793a5fceee2406" +uuid = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" +version = "5.2.0" + + [deps.TensorOperations.extensions] + TensorOperationsBumperExt = "Bumper" + TensorOperationsChainRulesCoreExt = "ChainRulesCore" + TensorOperationscuTENSORExt = ["cuTENSOR", "CUDA"] + + [deps.TensorOperations.weakdeps] + Bumper = "8ce10254-0962-460f-a3d8-1f77fea1446e" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1" + +[[deps.TupleTools]] +git-tree-sha1 = "41e43b9dc950775eac654b9f845c839cd2f1821e" +uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" +version = "1.6.0" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" + +[[deps.VectorInterface]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9166406dedd38c111a6574e9814be83d267f8aec" +uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8" +version = "0.5.0" + +[[deps.WignerSymbols]] +deps = ["HalfIntegers", "LRUCache", "Primes", "RationalRoots"] +git-tree-sha1 = "960e5f708871c1d9a28a7f1dbcaf4e0ee34ee960" +uuid = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" +version = "2.0.0" + +[[deps.Zygote]] +deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] +git-tree-sha1 = "207d714f3514b0d564e3a08f9e9f753bf6566c2d" +uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" +version = "0.7.6" + + [deps.Zygote.extensions] + ZygoteAtomExt = "Atom" + ZygoteColorsExt = "Colors" + ZygoteDistancesExt = "Distances" + ZygoteTrackerExt = "Tracker" + + [deps.Zygote.weakdeps] + Atom = "c52e3926-4ff0-5f6e-af25-54175e0327b1" + Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" + Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.ZygoteRules]] +deps = ["ChainRulesCore", "MacroTools"] +git-tree-sha1 = "434b3de333c75fc446aa0d19fc394edafd07ab08" +uuid = "700de1a5-db45-46bc-99cf-38207098b444" +version = "0.2.7" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.11.0+0" +""" + +# ╔═╡ Cell order: +# ╠═596482a0-61c1-45d2-9c3b-d65f78c8b280 +# ╠═e37d4924-e7ec-47b6-abd2-729e3736ca0a +# ╠═f6caf5ba-2777-46bb-9795-29f960894d6c +# ╠═ca35aca6-fd69-4a08-9cde-34e2570e1cca +# ╠═88782296-e160-4633-bca9-e3becc1012a2 +# ╠═d8403224-d288-4ddc-b587-2c3d4e824090 +# ╠═c53436e1-97eb-4371-853a-48071bfdb2ac +# ╠═07accc9f-a371-4c7c-a31b-304d89447250 +# ╠═b7c9d9ca-3ff5-4808-8dfc-c6c71ea0143e +# ╠═07089315-c37b-4bd7-bf48-de2e6b5cc5c5 +# ╠═e770f01b-7e23-45b4-a460-ad237a778f47 +# ╠═8f072cdb-7872-445b-bbab-949a17cda272 +# ╠═72276f14-447f-4ddf-b06c-a2432be93b59 +# ╠═6644b0cf-c7c6-4c25-a5c5-ef2a826e5b90 +# ╠═77c04811-60d6-4c93-9083-e17dba8c61d2 +# ╠═679cc5c6-0121-43d4-8179-8cbe1084215e +# ╠═1560d618-c782-4d12-9817-b66a01435c72 +# ╠═5a2ee7f3-e73b-42ba-8743-09f152921fda +# ╠═d8b05a5f-bc86-4678-8595-bb296f86f28a +# ╠═8daa6402-82d7-4a7c-85a1-295fbbc5a9e1 +# ╠═c6604da5-7125-4370-8824-578362ae16a2 +# ╠═37c1c825-c6b5-4a4f-902b-b3299869dcc1 +# ╠═f09bd4cf-d41d-4c15-943f-a9315aa3d8e3 +# ╠═b1db3cbb-aef4-4ffb-8fcc-cc5948247299 +# ╠═cd49f55e-94a7-481e-8287-1e80a0f4034f +# ╠═7f59f1d9-b7db-4ee6-a99d-7999a83d6a53 +# ╠═0b8154c9-9638-4c9e-8f40-ab73b667ffb1 +# ╠═40bb6832-e12d-4341-8d12-defc54d79145 +# ╠═378bcccd-3803-4754-928d-a437fe457e9f +# ╠═1a70d171-4087-4f1d-8ba7-41a178c8f80b +# ╠═63230dd6-98c5-44b0-b0a4-d7bb51e44445 +# ╠═6081ea87-09a4-4b52-96fc-753cb94a5d36 +# ╠═69c92f0b-3598-4f92-8475-52f4eee2c03c +# ╠═a872f393-fbd9-432a-aabc-ddd33f33f450 +# ╠═8d8baa3a-df5b-45e0-be1f-56f6dcd99ff7 +# ╠═d5e10a13-402d-4995-9594-b4e3623a87ce +# ╟─00000000-0000-0000-0000-000000000001 +# ╟─00000000-0000-0000-0000-000000000002 diff --git a/examples/xxz.jl b/examples/xxz.jl deleted file mode 100644 index c32b108e7..000000000 --- a/examples/xxz.jl +++ /dev/null @@ -1,52 +0,0 @@ -using Test -using Random -using PEPSKit -using TensorKit -using KrylovKit -using OptimKit - -using MPSKit: add_physical_charge - -## Néel order in the XXZ model - -# parameters -J = 1.0 -Delta = 1.0 -spin = 1//2 -symmetry = U1Irrep -lattice = InfiniteSquare(2, 2) - -# spaces -Vpeps = U1Space(0 => 2, 1 => 1, -1 => 1) -Venv = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2) -# staggered auxiliary physical charges -> encode Néel order directly in the ansatz -Saux = [ - U1Irrep(-1//2) U1Irrep(1//2) - U1Irrep(1//2) U1Irrep(-1//2) -] - -# algorithms -boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)) -gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge) -optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2) -reuse_env = true - -# Hamiltonian -H0 = heisenberg_XXZ(ComplexF64, symmetry, lattice; J, Delta, spin) -H = add_physical_charge(H0, Saux) -Pspaces = H.lattice - -# initialize state -Nspaces = fill(Vpeps, size(lattice)...) -Espaces = fill(Vpeps, size(lattice)...) -Random.seed!(2928528935) -ψ₀ = InfinitePEPS(randn, ComplexF64, Pspaces, Nspaces, Espaces) -env₀ = CTMRGEnv(ψ₀, Venv) -env₀, = leading_boundary(env₀, ψ₀; boundary_alg...) - -# optimize -ψ, env, E, info = fixedpoint( - H, ψ₀, env₀; boundary_alg, gradient_alg, optimizer_alg, reuse_env -) -@test E < -0.666 -# ends up at E = -0.669..., but takes a while From fc3a20bc000e2db8ffdbffff0ab28039b4c17038 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Tue, 15 Apr 2025 20:18:19 +0200 Subject: [PATCH 039/113] Format and decrease max_concurrent_runs to 1 --- examples/make.jl | 4 +++- examples/notebooks/fermi_hubbard.jl | 2 +- examples/notebooks/hubbard_su.jl | 22 ++++++++++++---------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/examples/make.jl b/examples/make.jl index 0b10b96f6..c2a26dabb 100644 --- a/examples/make.jl +++ b/examples/make.jl @@ -11,7 +11,9 @@ const OUTPUT_DIR = joinpath(@__DIR__, "..", "docs", "src", "examples") @info "Building notebooks in $NOTEBOOK_DIR" oopts = OutputOptions(; append_build_context=true) output_format = documenter_output -bopts = BuildOptions(NOTEBOOK_DIR; output_format, previous_dir=OUTPUT_DIR) +bopts = BuildOptions( + NOTEBOOK_DIR; output_format, previous_dir=OUTPUT_DIR, max_concurrent_runs=1 +) build_notebooks(bopts, oopts) @info "Copying markdown files" diff --git a/examples/notebooks/fermi_hubbard.jl b/examples/notebooks/fermi_hubbard.jl index 61703a8cf..4329a7154 100644 --- a/examples/notebooks/fermi_hubbard.jl +++ b/examples/notebooks/fermi_hubbard.jl @@ -128,7 +128,7 @@ And third, we start the ground state search (this does take quite long): """ # ╔═╡ 6081ea87-09a4-4b52-96fc-753cb94a5d36 -peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg); +peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg); # ╔═╡ 69c92f0b-3598-4f92-8475-52f4eee2c03c @show E diff --git a/examples/notebooks/hubbard_su.jl b/examples/notebooks/hubbard_su.jl index 904a93791..c069659cb 100644 --- a/examples/notebooks/hubbard_su.jl +++ b/examples/notebooks/hubbard_su.jl @@ -94,12 +94,12 @@ maxiter = 20000; # ╔═╡ da7fe8eb-7edc-40b5-909e-39c19ae8fece begin - wpeps_su = wpeps - for (n, (dt, tol)) in enumerate(zip(dts, tols)) - trscheme = truncerr(1e-10) & truncdim(Dbond) - alg = SimpleUpdate(dt, tol, maxiter, trscheme) - global wpeps_su, = simpleupdate(wpeps_su, H, alg; bipartite=false) - end + wpeps_su = wpeps + for (n, (dt, tol)) in enumerate(zip(dts, tols)) + trscheme = truncerr(1e-10) & truncdim(Dbond) + alg = SimpleUpdate(dt, tol, maxiter, trscheme) + global wpeps_su, = simpleupdate(wpeps_su, H, alg; bipartite=false) + end end; # ╔═╡ 9e3b3df0-c0f7-4a26-b425-fe9015c6e99f @@ -125,10 +125,12 @@ env_space = Vect[fℤ₂](0 => χenv₀ / 2, 1 => χenv₀ / 2); # ╔═╡ be0441c5-394e-4812-aa44-5d1e8565723e begin - env = CTMRGEnv(rand, Float64, peps, env_space); - for χ in [χenv₀, χenv] - global env, = leading_boundary(env, peps; alg=:sequential, tol=1e-5, trscheme=truncdim(χ)) - end + env = CTMRGEnv(rand, Float64, peps, env_space) + for χ in [χenv₀, χenv] + global env, = leading_boundary( + env, peps; alg=:sequential, tol=1e-5, trscheme=truncdim(χ) + ) + end end; # ╔═╡ 487caef7-ceda-41ba-82ee-3d3dc0058162 From b7dc7144ada3cc1afb1cb598e14fd80ec0336d6f Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Wed, 16 Apr 2025 09:55:16 +0200 Subject: [PATCH 040/113] Add updated rendered notebooks --- docs/src/examples/bose_hubbard.md | 17 ++- docs/src/examples/fermi_hubbard.md | 158 +++++++++++++++++++++++++++ docs/src/examples/hubbard_su.md | 169 +++++++++++++++++++++++++++++ 3 files changed, 339 insertions(+), 5 deletions(-) create mode 100644 docs/src/examples/fermi_hubbard.md create mode 100644 docs/src/examples/hubbard_su.md diff --git a/docs/src/examples/bose_hubbard.md b/docs/src/examples/bose_hubbard.md index 354b6b55f..98402c594 100644 --- a/docs/src/examples/bose_hubbard.md +++ b/docs/src/examples/bose_hubbard.md @@ -25,7 +25,7 @@ @@ -48,7 +48,7 @@ ## Defining the model ```@raw html
-

We will construct the Bose-Hubbard model Hamiltonian through the bose_hubbard_model function from MPSKitModels.jl, as reexported by PEPSKit. We'll simulate the model in its Mott-insulating phase where the ratio \(U/t\) is large, since in this phase we expect the ground state to be well approximated by a PEPS with a manifest global \(U(1)\) symmetry. Furthermore, we'll impose a cutoff at 2 bosons per site, set the chemical potential to zero and use a simple 1x1 unit cell:

+

We will construct the Bose-Hubbard model Hamiltonian through the bose_hubbard_model function from MPSKitModels, as reexported by PEPSKit. We'll simulate the model in its Mott-insulating phase where the ratio \(U/t\) is large, since in this phase we expect the ground state to be well approximated by a PEPS with a manifest global \(U(1)\) symmetry. Furthermore, we'll impose a cutoff at 2 bosons per site, set the chemical potential to zero and use a simple 1x1 unit cell:

t = 1.0;
@@ -211,7 +211,14 @@ Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1)
-

Note that the physical space contains \(U(1)\) charges -1, 0 and +1. Indeed, imposing a particle number density of +1 corresponds to shifting the physical charges by -1 to 're-center' the physical charges around the desired density. When we do this with a cutoff of two bosons per site, i.e. starting from \(U(1)\) charges 0, 1 and 2 on the physical level, we indeed get the observed charges.

Characterizing the virtual spaces

When running PEPS simulations with explicit internal symmetries, specifying the structure of the virtual spaces of the PEPS and its environment becomes a bit more involved. For the environment, one could in principle allow the virtual space to be chosen dynamically during the boundary contraction using CTMRG by using a truncation scheme that allows for this (e.g. using alg=:truncdim or alg=:truncbelow to truncate to a fixed total bond dimension or singular value cutoff respectively). For the PEPS virtual space however, the structure has to be specified before the optimization.

While there are a host of techniques to do this in an informed way (e.g. starting from a simple update result), here we just specify the virtual space manually. Since we're dealing with a model at unit filling our physical space only contains integer \(U(1)\) irreps. Therefore, we'll build our PEPS and environment spaces using integer U(1) irreps centered around the zero charge.

+

Note that the physical space contains \(U(1)\) charges -1, 0 and +1. Indeed, imposing a particle number density of +1 corresponds to shifting the physical charges by -1 to 're-center' the physical charges around the desired density. When we do this with a cutoff of two bosons per site, i.e. starting from \(U(1)\) charges 0, 1 and 2 on the physical level, we indeed get the observed charges.

+ + +``` +## Characterizing the virtual spaces +```@raw html +
+

When running PEPS simulations with explicit internal symmetries, specifying the structure of the virtual spaces of the PEPS and its environment becomes a bit more involved. For the environment, one could in principle allow the virtual space to be chosen dynamically during the boundary contraction using CTMRG by using a truncation scheme that allows for this (e.g. using alg=:truncdim or alg=:truncbelow to truncate to a fixed total bond dimension or singular value cutoff respectively). For the PEPS virtual space however, the structure has to be specified before the optimization.

While there are a host of techniques to do this in an informed way (e.g. starting from a simple update result), here we just specify the virtual space manually. Since we're dealing with a model at unit filling our physical space only contains integer \(U(1)\) irreps. Therefore, we'll build our PEPS and environment spaces using integer U(1) irreps centered around the zero charge.

V_peps = U1Space(0 => 2, 1 => 1, -1 => 1);
@@ -254,7 +261,7 @@
@show E
-
-0.2732668319499373
+
-0.27326633532690786

We can compare our PEPS result to the energy obtained using a cylinder-MPS calculation using a cylinder circumference of \(L_y = 7\) and a bond dimension of 446, which yields \(E = -0.273284888\):

@@ -263,7 +270,7 @@
@show (E - E_ref) / E_ref
-
-6.607043000021378e-5
+
-6.788766560755672e-5

Built with Julia 1.11.4 and

MPSKit 0.12.6
diff --git a/docs/src/examples/fermi_hubbard.md b/docs/src/examples/fermi_hubbard.md new file mode 100644 index 000000000..4c16e274d --- /dev/null +++ b/docs/src/examples/fermi_hubbard.md @@ -0,0 +1,158 @@ +```@raw html + + + + + +

Fermi-Hubbard model with \(f\mathbb{Z}_2 \boxtimes U(1)\) symmetry, at large \(U\) and half-filling

In this example, we will demonstrate how to handle fermionic PEPS tensors and how to optimize them. To that end, we consider the two-dimensional Hubbard model

$$H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- + c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i$$

where \(\sigma \in \{\uparrow,\downarrow\}\) and \(n_{i,\sigma} = c_{i,\sigma}^+ c_{i,\sigma}^-\) is the fermionic number operator. As in previous examples, using fermionic degrees of freedom is a matter of creating tensors with the right symmetry sectors - the rest of the simulation workflow remains the same.

First though, we make the example deterministic by seeding the RNG, and we make our imports:

+ +
using Random
+ + +
Random.seed!(2928528937);
+ + +
using TensorKit, PEPSKit
+ + +
using MPSKit: add_physical_charge
+ + + +``` +## Defining the fermionic Hamiltonian +```@raw html +
+

Let us start by fixing the parameters of the Hubbard model. We're going to use a hopping of \(t=1\) and a large \(U=8\) on a \(2 \times 2\) unit cell:

+ +
t = 1.0;
+ + +
U = 8.0;
+ + +
lattice = InfiniteSquare(2, 2);
+ + + +

In order to create fermionic tensors, one needs to define symmetry sectors using TensorKit's FermionParity. Not only do we want use fermion parity but we also want our particles to exploit the global \(U(1)\) symmetry. The combined product sector can be obtained using the Deligne product, called through which is obtained by typing \boxtimes+TAB. We will not impose any extra spin symmetry, so we have:

+ +
fermion = fℤ₂;
+ + +
particle_symmetry = U1Irrep;
+ + +
spin_symmetry = Trivial;
+ + +
S = fermion ⊠ particle_symmetry;
+ + + +

The next step is defining graded virtual PEPS and environment spaces using S. Here we also use the symmetry sector to impose half-filling. That is all we need to define the Hubbard Hamiltonian:

+ +
D, χ = 1, 1;
+ + +
V_peps = Vect[S]((0, 0) => 2 * D, (1, 1) => D, (1, -1) => D);
+ + +
V_env = Vect[S](
+    (0, 0) => 4 * χ, (1, -1) => 2 * χ, (1, 1) => 2 * χ, (0, 2) => χ, (0, -2) => χ
+);
+ + +
S_aux = S((1, -1));
+ + +
H₀ = hubbard_model(ComplexF64, particle_symmetry, spin_symmetry, lattice; t, U);
+ + +
H = add_physical_charge(H₀, fill(S_aux, size(H₀.lattice)...));
+ + + +``` +## Finding the ground state +```@raw html +
+

Again, the procedure of ground state optimization is very similar to before. First, we define all algorithmic parameters:

+ +
boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace));
+ + +
gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge);
+ + +
optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2);
+ + + +

Second, we initialize a PEPS state and environment (which we converge) constructed from symmetric physical and virtual spaces:

+ +
physical_spaces = H.lattice;
+ + +
virtual_spaces = fill(V_peps, size(lattice)...);
+ + +
peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces);
+ + +
env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...);
+ + + +

And third, we start the ground state search (this does take quite long):

+ +
peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg);
+ + +
@show E
+
-0.5519574280641669
+ + +

Finally, let's compare the obtained energy against a reference energy from a QMC study by Qin et al.. At our parameters they obtain an energy of \(E_\text{ref} \approx 4 \times -0.5244140625 = -2.09765625\) (the factor 4 comes from the \(2 x 2\) unit cell that we use here). Thus, we find:

+ +
E_ref = -2.09765625;
+ + +
@show (E - E_ref) / E_ref
+
-0.7368694570122407
+
+

Built with Julia 1.11.4 and

+MPSKit 0.12.6
+PEPSKit 0.5.0
+Random 1.11.0
+TensorKit 0.14.5 +
+ + +``` + diff --git a/docs/src/examples/hubbard_su.md b/docs/src/examples/hubbard_su.md new file mode 100644 index 000000000..082c69543 --- /dev/null +++ b/docs/src/examples/hubbard_su.md @@ -0,0 +1,169 @@ +```@raw html + + + + + +

Hubbard model imaginary time evolution using simple update

Once again, we consider the Hubbard model but this time we obtain the ground-state PEPS by imaginary time evoluation. In particular, we'll use the SimpleUpdate algorithm. As a reminder, we define the Hubbard model as

$$H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- + c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i$$

with \(\sigma \in \{\uparrow,\downarrow\}\) and \(n_{i,\sigma} = c_{i,\sigma}^+ c_{i,\sigma}^-\).

Let's get started by seeding the RNG and importing the required modules:

+ +
using Random
+ + +
Random.seed!(1298351928);
+ + +
using TensorKit, PEPSKit
+ + + +``` +## Defining the Hamiltonian +```@raw html +
+

First, we define the Hubbard model at \(t=1\) hopping and \(U=6\) using Trivial sectors for the particle and spin symmetries:

+ +
t, U = 1, 6;
+ + +
H = hubbard_model(Float64, Trivial, Trivial, InfiniteSquare(Nr, Nc); t, U, mu=U / 2);
+ + + +``` +## Running the simple update algorithm +```@raw html +
+

Next, we'll specify the virtual PEPS bond dimension and define the fermionic physical and virtual spaces. For the PEPS ansatz we choose a \(2 \times 2\) unit cell:

+ +
Dbond = 8;
+ + +
physical_space = Vect[fℤ₂](0 => 2, 1 => 2);
+ + +
virtual_space = Vect[fℤ₂](0 => Dbond / 2, 1 => Dbond / 2);
+ + +
Nr, Nc = 2, 2;
+ + + +

The simple update algorithm evolves an infinite PEPS with weights on the virtual bonds, so we here need to intialize an InfiniteWeightPEPS. By default, the bond weights will be identity. Note that we here use tensors with real Float64 entries:

+ +
wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, virtual_space; unitcell=(Nr, Nc));
+ + + +

Before starting the simple update routine, we normalize the vertex tensors:

+ +
for ind in CartesianIndices(wpeps.vertices)
+    wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf)
+end;
+ + + +

Let's set algorithm parameters: The plan is to successively decrease the time interval of the Trotter-Suzuki as well as the convergence tolerance such that we obtain a more accurate result at each iteration. To run the simple update, we call simpleupdate where we use the keyword bipartite=false - meaning that we use the full \(2 \times 2\) unit cell without assuming a bipartite structure. Thus, we can start evolving:

+ +
dts = [1e-2, 1e-3, 4e-4, 1e-4];
+ + +
tols = [1e-6, 1e-8, 1e-8, 1e-8];
+ + +
maxiter = 20000;
+ + +
begin
+    wpeps_su = wpeps
+    for (n, (dt, tol)) in enumerate(zip(dts, tols))
+        trscheme = truncerr(1e-10) & truncdim(Dbond)
+        alg = SimpleUpdate(dt, tol, maxiter, trscheme)
+        global wpeps_su, = simpleupdate(wpeps_su, H, alg; bipartite=false)
+    end
+end;
+ + + +

To obtain the evolved InfiniteWeightPEPS as an actual PEPS without weights on the bonds, we can just call the following constructor:

+ +
peps = InfinitePEPS(wpeps_su);
+ + + +``` +## Computing the ground-state energy +```@raw html +
+

In order to compute the energy expectation value with evolved PEPS, we need to converge a CTMRG environment on it. We first converge an environment with a small enviroment dimension and then use that to initialize another run with bigger environment dimension. We'll use trscheme=truncdim(χ) for that such that the dimension is increased during the second CTMRG run:

+ +
χenv₀, χenv = 6, 20;
+ + +
env_space = Vect[fℤ₂](0 => χenv₀ / 2, 1 => χenv₀ / 2);
+ + +
begin
+    env = CTMRGEnv(rand, Float64, peps, env_space)
+    for χ in [χenv₀, χenv]
+        global env, = leading_boundary(
+            env, peps; alg=:sequential, tol=1e-5, trscheme=truncdim(χ)
+        )
+    end
+end;
+ + + +

We measure the energy by computing the H expectation value, where we have to make sure to normalize to obtain the energy per site:

+ +
E = expectation_value(peps, H, env) / (Nr * Nc);
+ + +
@show E
+
-3.6513224945235674
+ + +

Finally, we can compare the obtained ground-state energy against the literature, namely the QMC estimates from Qin et al.. We find that the result generally agree:

+ +
Es_exact = Dict(0 => -1.62, 2 => -0.176, 4 => 0.8603, 6 => -0.6567, 8 => -0.5243);
+ + +
E_exact = Es_exact[U] - U / 2;
+ + +
@show (E - E_exact) / E_exact
+
-0.001470589732937472
+
+

Built with Julia 1.11.4 and

+PEPSKit 0.5.0
+Random 1.11.0
+TensorKit 0.14.5 +
+ + +``` + From b88715289433aff899dee06afdcdb603817f6d5d Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Wed, 16 Apr 2025 09:56:18 +0200 Subject: [PATCH 041/113] Fix make example typo --- docs/make.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/make.jl b/docs/make.jl index 33a9c713f..e15c73e9e 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -47,7 +47,7 @@ examples = [ "Boundary MPS contractions using VUMPS and PEPOs" => "examples/boundary_mps.md", "Optimizing the ``U(1)``-symmetric Bose-Hubbard model" => "examples/bose_hubbard.md", "Néel order in the ``U(1)``-symmetric XXZ model" => "examples/xxz.md", - "Fermi-Hubbard model with ``f\\mathbb{Z}_2 \\boxtimes U(1)`` symmetry at large ``U`` and half-filling" => "examples/fermi_hubbard.jl", + "Fermi-Hubbard model with ``f\\mathbb{Z}_2 \\boxtimes U(1)`` symmetry at large ``U`` and half-filling" => "examples/fermi_hubbard.md", ] makedocs(; From b09bd276e5bff82d366a8adbdba9b5d80e4665fc Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Wed, 16 Apr 2025 10:10:32 +0200 Subject: [PATCH 042/113] Add Hubbard SU example to make file --- docs/make.jl | 1 + examples/notebooks/bose_hubbard.jl | 2 +- examples/notebooks/fermi_hubbard.jl | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index e15c73e9e..e18067ca4 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -48,6 +48,7 @@ examples = [ "Optimizing the ``U(1)``-symmetric Bose-Hubbard model" => "examples/bose_hubbard.md", "Néel order in the ``U(1)``-symmetric XXZ model" => "examples/xxz.md", "Fermi-Hubbard model with ``f\\mathbb{Z}_2 \\boxtimes U(1)`` symmetry at large ``U`` and half-filling" => "examples/fermi_hubbard.md", + "Hubbard model imaginary time evolution using simple update" => "examples/hubbard_su.md", ] makedocs(; diff --git a/examples/notebooks/bose_hubbard.jl b/examples/notebooks/bose_hubbard.jl index 298ca6089..c535daad0 100644 --- a/examples/notebooks/bose_hubbard.jl +++ b/examples/notebooks/bose_hubbard.jl @@ -64,7 +64,7 @@ So let's instantiate the symmetric Hamiltonian: """ # ╔═╡ 5fca8dcd-ab29-49d0-a605-8a5c1499eb65 -H = bose_hubbard_model(ComplexF64, symmetry, lattice; cutoff, t, U, n) +H = bose_hubbard_model(ComplexF64, symmetry, lattice; cutoff, t, U, n); # ╔═╡ f66ae429-5775-4485-b90a-0276fa1669f4 md""" diff --git a/examples/notebooks/fermi_hubbard.jl b/examples/notebooks/fermi_hubbard.jl index 4329a7154..a42b767d0 100644 --- a/examples/notebooks/fermi_hubbard.jl +++ b/examples/notebooks/fermi_hubbard.jl @@ -135,7 +135,7 @@ peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, # ╔═╡ a872f393-fbd9-432a-aabc-ddd33f33f450 md""" -Finally, let's compare the obtained energy against a reference energy from a QMC study by [Qin et al.](@cite qin_benchmark_2016). At our parameters they obtain an energy of ``E_\text{ref} \approx 4 \times -0.5244140625 = -2.09765625`` (the factor 4 comes from the ``2 x 2`` unit cell that we use here). Thus, we find: +Finally, let's compare the obtained energy against a reference energy from a QMC study by [Qin et al.](@cite qin_benchmark_2016). With the parameters specified above, they obtain an energy of ``E_\text{ref} \approx 4 \times -0.5244140625 = -2.09765625`` (the factor 4 comes from the ``2 \times 2`` unit cell that we use here). Thus, we find: """ # ╔═╡ 8d8baa3a-df5b-45e0-be1f-56f6dcd99ff7 From fb69fd85f02ce322c12d6e970f4346351548d94d Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Wed, 16 Apr 2025 10:31:38 +0200 Subject: [PATCH 043/113] Move bose_hubbard.jl test to test/examples --- examples/notebooks/bose_hubbard.jl | 2 +- test/{ => examples}/bose_hubbard.jl | 0 test/runtests.jl | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename test/{ => examples}/bose_hubbard.jl (100%) diff --git a/examples/notebooks/bose_hubbard.jl b/examples/notebooks/bose_hubbard.jl index c535daad0..97770a0ee 100644 --- a/examples/notebooks/bose_hubbard.jl +++ b/examples/notebooks/bose_hubbard.jl @@ -113,7 +113,7 @@ optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=200, ls_maxiter=2, # ╔═╡ 8ea51b8c-afdb-4b59-93a8-f66d5ab4d6da md""" !!! note - Taking CTMRG gradients and optimizing symmetric tensors tends to be more problematic than with dense tensors. In particular, this means that one frequently needs to tweak the `gradient_alg` and `optimizer_alg` settings. There rarely is a general-purpose set of settings which will always work, so instead one has to adjust the simulation settings for each specific application. + Taking CTMRG gradients and optimizing symmetric tensors tends to be more problematic than with dense tensors. In particular, this means that one frequently needs to tweak the `boundary_alg`, `gradient_alg` and `optimizer_alg` settings. There rarely is a general-purpose set of settings which will always work, so instead one has to adjust the simulation settings for each specific application. For example, it might help to switch between the CTMRG flavors `alg=:simultaneous` and `alg=:sequential` to improve convergence. The evaluation of the CTMRG gradient can be instable, so there it is advised to try the different `iterscheme=:diffgauge` and `iterscheme=:fixed` schemes as well as different `alg` keywords. Of course the tolerances of the algorithms and their subalgorithms also have to be compatible. For more details on the available options, see the [`fixedpoint`](@ref) docstring. Keep in mind that the PEPS is constructed from a unit cell of spaces, so we have to make a matrix of `V_peps` spaces: """ diff --git a/test/bose_hubbard.jl b/test/examples/bose_hubbard.jl similarity index 100% rename from test/bose_hubbard.jl rename to test/examples/bose_hubbard.jl diff --git a/test/runtests.jl b/test/runtests.jl index 037e03bfb..58593ab0f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -76,7 +76,7 @@ end include("examples/pwave.jl") end @time @safetestset "U1-symmetric Bose-Hubbard model" begin - include("bose_hubbard.jl") + include("examples/bose_hubbard.jl") end end end From b92efa9810e15705f2b626cff7e47a7fbf20c057 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Wed, 16 Apr 2025 16:04:55 +0200 Subject: [PATCH 044/113] Add rendered notebook examples --- docs/src/examples/bose_hubbard.md | 135 +-- docs/src/examples/fermi_hubbard.md | 8 +- docs/src/examples/ising_partition_function.md | 185 ++++ .../notebooks/ising_partition_function.jl | 973 ++++++++++++++++++ 4 files changed, 1168 insertions(+), 133 deletions(-) create mode 100644 docs/src/examples/ising_partition_function.md create mode 100644 examples/notebooks/ising_partition_function.jl diff --git a/docs/src/examples/bose_hubbard.md b/docs/src/examples/bose_hubbard.md index 98402c594..61f51dce5 100644 --- a/docs/src/examples/bose_hubbard.md +++ b/docs/src/examples/bose_hubbard.md @@ -25,7 +25,7 @@ @@ -77,131 +77,8 @@

So let's instantiate the symmetric Hamiltonian:

-
H = bose_hubbard_model(ComplexF64, symmetry, lattice; cutoff, t, U, n)
-
LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 2, 2, Vector{ComplexF64}}}, Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 2, 2, Vector{ComplexF64}}}, Pair{Tuple{CartesianIndex{2}}, TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 1, 1, Vector{ComplexF64}}}}, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}}(GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}[Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1);;], ((CartesianIndex(1, 1), CartesianIndex(1, 2)) => TensorMap((Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1) ⊗ Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1)) ← (Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1) ⊗ Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1))):
-* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)):
-[:, :, 1, 1] =
- -1.4142135623730951 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)):
-[:, :, 1, 1] =
- -1.4142135623730951 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)):
-[:, :, 1, 1] =
- -1.4142135623730951 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)):
-[:, :, 1, 1] =
- -1.4142135623730951 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](0)):
-[:, :, 1, 1] =
- -2.0000000000000004 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](1)):
-[:, :, 1, 1] =
- -2.0000000000000004 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](0)):
-[:, :, 1, 1] =
- -1.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](-1)):
-[:, :, 1, 1] =
- -1.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](-1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](-1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-, (CartesianIndex(1, 1), CartesianIndex(2, 1)) => TensorMap((Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1) ⊗ Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1)) ← (Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1) ⊗ Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1))):
-* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)):
-[:, :, 1, 1] =
- -1.4142135623730951 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)):
-[:, :, 1, 1] =
- -1.4142135623730951 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)):
-[:, :, 1, 1] =
- -1.4142135623730951 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)):
-[:, :, 1, 1] =
- -1.4142135623730951 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](-1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](0)):
-[:, :, 1, 1] =
- -2.0000000000000004 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](1)):
-[:, :, 1, 1] =
- -2.0000000000000004 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](0)):
-[:, :, 1, 1] =
- -1.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](0)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](-1)):
-[:, :, 1, 1] =
- -1.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](0), Irrep[TensorKitSectors.U₁](-1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](1)) ← (Irrep[TensorKitSectors.U₁](1), Irrep[TensorKitSectors.U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](-1)) ← (Irrep[TensorKitSectors.U₁](-1), Irrep[TensorKitSectors.U₁](-1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-, (CartesianIndex(1, 1),) => TensorMap(Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1) ← Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1)):
-* Data for sector (Irrep[TensorKitSectors.U₁](0),) ← (Irrep[TensorKitSectors.U₁](0),):
- 0.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](1),) ← (Irrep[TensorKitSectors.U₁](1),):
- 30.0 + 0.0im
-* Data for sector (Irrep[TensorKitSectors.U₁](-1),) ← (Irrep[TensorKitSectors.U₁](-1),):
- 0.0 + 0.0im
-))
+
H = bose_hubbard_model(ComplexF64, symmetry, lattice; cutoff, t, U, n);
+

Before we continue, it might be interesting to inspect the corresponding lattice physical spaces:

@@ -243,7 +120,7 @@ -
Note

Taking CTMRG gradients and optimizing symmetric tensors tends to be more problematic than with dense tensors. In particular, this means that one frequently needs to tweak the gradient_alg and optimizer_alg settings. There rarely is a general-purpose set of settings which will always work, so instead one has to adjust the simulation settings for each specific application.

Keep in mind that the PEPS is constructed from a unit cell of spaces, so we have to make a matrix of V_peps spaces:

+
Note

Taking CTMRG gradients and optimizing symmetric tensors tends to be more problematic than with dense tensors. In particular, this means that one frequently needs to tweak the boundary_alg, gradient_alg and optimizer_alg settings. There rarely is a general-purpose set of settings which will always work, so instead one has to adjust the simulation settings for each specific application. For example, it might help to switch between the CTMRG flavors alg=:simultaneous and alg=:sequential to improve convergence. The evaluation of the CTMRG gradient can be instable, so there it is advised to try the different iterscheme=:diffgauge and iterscheme=:fixed schemes as well as different alg keywords. Of course the tolerances of the algorithms and their subalgorithms also have to be compatible. For more details on the available options, see the fixedpoint docstring.

Keep in mind that the PEPS is constructed from a unit cell of spaces, so we have to make a matrix of V_peps spaces:

virtual_spaces = fill(V_peps, size(lattice)...);
@@ -261,7 +138,7 @@
@show E
-
-0.27326633532690786
+
-0.026480205618883625

We can compare our PEPS result to the energy obtained using a cylinder-MPS calculation using a cylinder circumference of \(L_y = 7\) and a bond dimension of 446, which yields \(E = -0.273284888\):

@@ -270,7 +147,7 @@
@show (E - E_ref) / E_ref
-
-6.788766560755672e-5
+
-0.9031040252072642

Built with Julia 1.11.4 and

MPSKit 0.12.6
diff --git a/docs/src/examples/fermi_hubbard.md b/docs/src/examples/fermi_hubbard.md index 4c16e274d..1644565b7 100644 --- a/docs/src/examples/fermi_hubbard.md +++ b/docs/src/examples/fermi_hubbard.md @@ -25,7 +25,7 @@ @@ -135,16 +135,16 @@
@show E
-
-0.5519574280641669
+
7.041937580964341
-

Finally, let's compare the obtained energy against a reference energy from a QMC study by Qin et al.. At our parameters they obtain an energy of \(E_\text{ref} \approx 4 \times -0.5244140625 = -2.09765625\) (the factor 4 comes from the \(2 x 2\) unit cell that we use here). Thus, we find:

+

Finally, let's compare the obtained energy against a reference energy from a QMC study by Qin et al.. With the parameters specified above, they obtain an energy of \(E_\text{ref} \approx 4 \times -0.5244140625 = -2.09765625\) (the factor 4 comes from the \(2 \times 2\) unit cell that we use here). Thus, we find:

E_ref = -2.09765625;
@show (E - E_ref) / E_ref
-
-0.7368694570122407
+
-4.3570503179271345

Built with Julia 1.11.4 and

MPSKit 0.12.6
diff --git a/docs/src/examples/ising_partition_function.md b/docs/src/examples/ising_partition_function.md new file mode 100644 index 000000000..4f1bc2af6 --- /dev/null +++ b/docs/src/examples/ising_partition_function.md @@ -0,0 +1,185 @@ +```@raw html + + + + + +

2D classical Ising partition function using CTMRG

All previous examples dealt with quantum systems, describing their states by InfinitePEPS that can be contracted using CTMRG or VUMPS techniques. Here, we shift our focus towards classical physics and consider the 2D classical Ising model with the partition function

$$\mathcal{Z}(\beta) = \sum_{\{s\}} \exp(-\beta H(s)) \text{ with } H(s) = -J \sum_{\langle i, j \rangle} s_i s_j .$$

The idea is to encode the partition function into an infinite square lattice of rank-4 tensors which can then be contracted using CTMRG. These rank-4 tensors are represented by InfinitePartitionFunction states, as we will see.

But first, let's seed the RNG and import all required modules:

+ +
using Random
+ + +
Random.seed!(234923);
+ + +
using LinearAlgebra, TensorKit, PEPSKit, QuadGK
+ + + +``` +## Defining the partition function +```@raw html +
+

The first step is to define the rank-4 tensor that, when contracted on a square lattice, evaluates to the partition function value at a given \(\beta\). Since we later want to compute the magnetization and energy, we define the appropriate rank-4 tensors as well:

+ +
function classical_ising(; beta=log(1 + sqrt(2)) / 2, J=1.0)
+    K = beta * J
+
+    # Boltzmann weights
+    t = ComplexF64[exp(K) exp(-K); exp(-K) exp(K)]
+    r = eigen(t)
+    nt = r.vectors * sqrt(Diagonal(r.values)) * r.vectors
+
+    # local partition function tensor
+    O = zeros(2, 2, 2, 2)
+    O[1, 1, 1, 1] = 1
+    O[2, 2, 2, 2] = 1
+    @tensor o[-1 -2; -3 -4] := O[3 4; 2 1] * nt[-3; 3] * nt[-4; 4] * nt[-2; 2] * nt[-1; 1]
+
+    # magnetization tensor
+    M = copy(O)
+    M[2, 2, 2, 2] *= -1
+    @tensor m[-1 -2; -3 -4] := M[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * nt[-3; 3] * nt[-4; 4]
+
+    # bond interaction tensor and energy-per-site tensor
+    e = ComplexF64[-J J; J -J] .* nt
+    @tensor e_hor[-1 -2; -3 -4] :=
+        O[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * nt[-3; 3] * e[-4; 4]
+    @tensor e_vert[-1 -2; -3 -4] :=
+        O[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * e[-3; 3] * nt[-4; 4]
+    e = e_hor + e_vert
+
+    # fixed tensor map space for all three
+    TMS = ℂ^2 ⊗ ℂ^2 ← ℂ^2 ⊗ ℂ^2
+
+    return TensorMap(o, TMS), TensorMap(m, TMS), TensorMap(e, TMS)
+end;
+ + + +

So let's initialize these tensors at inverse temperature \(\beta=0.6\) and construct the corresponding InfinitePartitionFunction:

+ +
beta = 0.6;
+ + +
O, M, E = classical_ising(; beta);
+ + +
Z = InfinitePartitionFunction(O);
+ + + +``` +## Contracting the partition function +```@raw html +
+

Next, we can contract the partition function as per usual by constructing a CTMRGEnv and calling leading_boundary:

+ +
χenv = 20;
+ + +
env₀ = CTMRGEnv(Z, χenv);
+ + +
env, = leading_boundary(env₀, Z; tol=1e-8, maxiter=500);
+ + + +

Note that CTMRG environments for partition functions differ from the PEPS environments only by the edge tensors - instead of two legs connecting the edges and the PEPS-PEPS sandwich, there is only one leg connecting the edges and the partition function tensor:

+ +
space.(env.edges)
+
4×1×1 Array{TensorMapSpace{ComplexSpace, 2, 1}, 3}:
+[:, :, 1] =
+ (ℂ^20 ⊗ ℂ^2) ← ℂ^20
+ (ℂ^20 ⊗ ℂ^2) ← ℂ^20
+ (ℂ^20 ⊗ (ℂ^2)') ← ℂ^20
+ (ℂ^20 ⊗ (ℂ^2)') ← ℂ^20
+ + +

To compute the value of the partition function, we have to contract Z with the converged environment using network_value. Additionally, we will compute the magnetization and energy (per site), again using expectation_value but this time also specifying the index in the unit cell, where we want to insert the local tensor:

+ +
λ = network_value(Z, env);
+ + +
m = expectation_value(Z, (1, 1) => M, env);
+ + +
e = expectation_value(Z, (1, 1) => E, env);
+ + + +``` +## Comparing against the exact Onsager solution +```@raw html +
+

In order to assess our results, we will compare against the exact Onsager solution. To that end, we compute the exact free energy, magnetization and energy per site (where quadgk performs the integral from \(0\) to \(\pi/2\)):

+ +
function classical_ising_exact(; beta=log(1 + sqrt(2)) / 2, J=1.0)
+    K = beta * J
+
+    k = 1 / sinh(2 * K)^2
+    F = quadgk(
+        theta -> log(cosh(2 * K)^2 + 1 / k * sqrt(1 + k^2 - 2 * k * cos(2 * theta))), 0, pi
+    )[1]
+    f = -1 / beta * (log(2) / 2 + 1 / (2 * pi) * F)
+
+    m = 1 - (sinh(2 * K))^(-4) > 0 ? (1 - (sinh(2 * K))^(-4))^(1 / 8) : 0
+
+    E = quadgk(theta -> 1 / sqrt(1 - (4 * k) * (1 + k)^(-2) * sin(theta)^2), 0, pi / 2)[1]
+    e = -J * cosh(2 * K) / sinh(2 * K) * (1 + 2 / pi * (2 * tanh(2 * K)^2 - 1) * E)
+
+    return f, m, e
+end;
+ + +
f_exact, m_exact, e_exact = classical_ising_exact(; beta);
+ + + +

And indeed, we do find agreement between the exact and CTMRG values (keeping in mind that energy accuracy is limited by the environment dimension and the lack of proper extrapolation):

+ +
@show (-log(λ) / beta - f_exact) / f_exact
+
-1.1009271732942546e-15 + 1.7075080586064297e-16im
+ +
@show (abs(m) - abs(m_exact)) / abs(m_exact)
+
0.0
+ +
@show (e - e_exact) / e_exact # accuracy limited by bond dimension and maxiter
+
-0.02373206809909008 - 6.466073768041896e-17im
+
+

Built with Julia 1.11.4 and

+LinearAlgebra 1.11.0
+PEPSKit 0.5.0
+QuadGK 2.11.2
+Random 1.11.0
+TensorKit 0.14.5 +
+ + +``` + diff --git a/examples/notebooks/ising_partition_function.jl b/examples/notebooks/ising_partition_function.jl new file mode 100644 index 000000000..76e60ef39 --- /dev/null +++ b/examples/notebooks/ising_partition_function.jl @@ -0,0 +1,973 @@ +### A Pluto.jl notebook ### +# v0.20.5 + +using Markdown +using InteractiveUtils + +# ╔═╡ 801e31ee-0207-4ceb-be8b-7326097cd5f8 +using Random + +# ╔═╡ 0e110dfa-d1fa-4e00-8955-440bc8333f2e +using LinearAlgebra, TensorKit, PEPSKit, QuadGK + +# ╔═╡ c48b528a-6334-4639-9d86-7447a62722a7 +md""" +# 2D classical Ising partition function using CTMRG + +All previous examples dealt with quantum systems, describing their states by `InfinitePEPS` that can be contracted using CTMRG or VUMPS techniques. Here, we shift our focus towards classical physics and consider the 2D classical Ising model with the partition function + +```math +\mathcal{Z}(\beta) = \sum_{\{s\}} \exp(-\beta H(s)) \text{ with } H(s) = -J \sum_{\langle i, j \rangle} s_i s_j . +``` + +The idea is to encode the partition function into an infinite square lattice of rank-4 tensors which can then be contracted using CTMRG. These rank-4 tensors are represented by [`InfinitePartitionFunction`](@ref) states, as we will see. + +But first, let's seed the RNG and import all required modules: +""" + +# ╔═╡ 8294ffc6-6e61-4f00-85d4-0bbf46abc1d1 +Random.seed!(234923); + +# ╔═╡ e9a89299-420b-4d69-8783-6227e87f3156 +md""" +## Defining the partition function + +The first step is to define the rank-4 tensor that, when contracted on a square lattice, evaluates to the partition function value at a given ``\beta``. Since we later want to compute the magnetization and energy, we define the appropriate rank-4 tensors as well: +""" + +# ╔═╡ cef9e388-3f2a-4bc9-9510-f4a8333ea7b8 +function classical_ising(; beta=log(1 + sqrt(2)) / 2, J=1.0) + K = beta * J + + # Boltzmann weights + t = ComplexF64[exp(K) exp(-K); exp(-K) exp(K)] + r = eigen(t) + nt = r.vectors * sqrt(Diagonal(r.values)) * r.vectors + + # local partition function tensor + O = zeros(2, 2, 2, 2) + O[1, 1, 1, 1] = 1 + O[2, 2, 2, 2] = 1 + @tensor o[-1 -2; -3 -4] := O[3 4; 2 1] * nt[-3; 3] * nt[-4; 4] * nt[-2; 2] * nt[-1; 1] + + # magnetization tensor + M = copy(O) + M[2, 2, 2, 2] *= -1 + @tensor m[-1 -2; -3 -4] := M[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * nt[-3; 3] * nt[-4; 4] + + # bond interaction tensor and energy-per-site tensor + e = ComplexF64[-J J; J -J] .* nt + @tensor e_hor[-1 -2; -3 -4] := + O[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * nt[-3; 3] * e[-4; 4] + @tensor e_vert[-1 -2; -3 -4] := + O[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * e[-3; 3] * nt[-4; 4] + e = e_hor + e_vert + + # fixed tensor map space for all three + TMS = ℂ^2 ⊗ ℂ^2 ← ℂ^2 ⊗ ℂ^2 + + return TensorMap(o, TMS), TensorMap(m, TMS), TensorMap(e, TMS) +end; + +# ╔═╡ 22970727-5426-400d-9fae-37ab85046cc4 +md""" +So let's initialize these tensors at inverse temperature ``\beta=0.6`` and construct the corresponding `InfinitePartitionFunction`: +""" + +# ╔═╡ 43bebcf1-7dde-4c72-9cfa-4d229c53d624 +beta = 0.6; + +# ╔═╡ f2e44974-de37-4bc4-a4d1-42fa2f144233 +O, M, E = classical_ising(; beta); + +# ╔═╡ e38a0809-5adc-4b32-895e-83005a12d022 +Z = InfinitePartitionFunction(O); + +# ╔═╡ 0fb5ff79-89d1-4dc2-8902-cbef6082bd48 +md""" +## Contracting the partition function + +Next, we can contract the partition function as per usual by constructing a `CTMRGEnv` and calling `leading_boundary`: +""" + +# ╔═╡ c14d1429-8ea2-454e-973d-7380385fdb76 +χenv = 20; + +# ╔═╡ 9957dd70-45e3-4714-8467-bb9f5587056c +env₀ = CTMRGEnv(Z, χenv); + +# ╔═╡ 32a3820b-b23f-49e0-9b6f-20be53d4dd14 +env, = leading_boundary(env₀, Z; tol=1e-8, maxiter=500); + +# ╔═╡ 23761bb7-f167-4c29-b68e-7aa4be83c258 +md""" +Note that CTMRG environments for partition functions differ from the PEPS environments only by the edge tensors - instead of two legs connecting the edges and the PEPS-PEPS sandwich, there is only one leg connecting the edges and the partition function tensor: +""" + +# ╔═╡ a49b029e-e822-40ff-8a0d-6e7d3d38c2e3 +space.(env.edges) + +# ╔═╡ 5f4e8cc6-dc0a-4018-a2ef-8eda2379121e +md""" +To compute the value of the partition function, we have to contract `Z` with the converged environment using [`network_value`](@ref). Additionally, we will compute the magnetization and energy (per site), again using [`expectation_value`](@ref) but this time also specifying the index in the unit cell, where we want to insert the local tensor: +""" + +# ╔═╡ 56a7688d-2219-4cf1-a5e6-de6052be6325 +λ = network_value(Z, env); + +# ╔═╡ 01905c11-725e-4367-983e-3e505288d787 +m = expectation_value(Z, (1, 1) => M, env); + +# ╔═╡ a2b54391-1f02-4fcb-a193-f655ac70210c +e = expectation_value(Z, (1, 1) => E, env); + +# ╔═╡ 2195b7db-910e-4988-99b6-3daa17d30821 +md""" +## Comparing against the exact Onsager solution + +In order to assess our results, we will compare against the [exact Onsager solution](https://en.wikipedia.org/wiki/Square_lattice_Ising_model#Exact_solution). To that end, we compute the exact free energy, magnetization and energy per site (where `quadgk` performs the integral from ``0`` to ``\pi/2``): +""" + +# ╔═╡ 80946864-1461-482e-b86b-41edbb1f573a +function classical_ising_exact(; beta=log(1 + sqrt(2)) / 2, J=1.0) + K = beta * J + + k = 1 / sinh(2 * K)^2 + F = quadgk( + theta -> log(cosh(2 * K)^2 + 1 / k * sqrt(1 + k^2 - 2 * k * cos(2 * theta))), 0, pi + )[1] + f = -1 / beta * (log(2) / 2 + 1 / (2 * pi) * F) + + m = 1 - (sinh(2 * K))^(-4) > 0 ? (1 - (sinh(2 * K))^(-4))^(1 / 8) : 0 + + E = quadgk(theta -> 1 / sqrt(1 - (4 * k) * (1 + k)^(-2) * sin(theta)^2), 0, pi / 2)[1] + e = -J * cosh(2 * K) / sinh(2 * K) * (1 + 2 / pi * (2 * tanh(2 * K)^2 - 1) * E) + + return f, m, e +end; + +# ╔═╡ a330f090-a6de-4ded-9f19-ab290f9266f1 +f_exact, m_exact, e_exact = classical_ising_exact(; beta); + +# ╔═╡ fc26fcd0-3508-49e1-b804-8dcca4a452e3 +md""" +And indeed, we do find agreement between the exact and CTMRG values (keeping in mind that energy accuracy is limited by the environment dimension and the lack of proper extrapolation): +""" + +# ╔═╡ 6aa5c314-35e8-4200-9e50-875460e59553 +@show (-log(λ) / beta - f_exact) / f_exact + +# ╔═╡ 77c8e924-526a-4f51-b2df-e160fd6530e7 +@show (abs(m) - abs(m_exact)) / abs(m_exact) + +# ╔═╡ d8845d3c-1a9d-11f0-27c9-d379139ebccc +@show (e - e_exact) / e_exact # accuracy limited by bond dimension and maxiter + +# ╔═╡ 00000000-0000-0000-0000-000000000001 +PLUTO_PROJECT_TOML_CONTENTS = """ +[deps] +LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" +QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" + +[compat] +PEPSKit = "~0.5.0" +QuadGK = "~2.11.2" +TensorKit = "~0.14.5" +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000002 +PLUTO_MANIFEST_TOML_CONTENTS = """ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.11.4" +manifest_format = "2.0" +project_hash = "0f5d8f2e954df1ae29d19d3c3ee4ca9cffdd18ac" + +[[deps.AbstractFFTs]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.5.0" + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + AbstractFFTsTestExt = "Test" + + [deps.AbstractFFTs.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.Accessors]] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] +git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" +uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +version = "0.1.42" + + [deps.Accessors.extensions] + AxisKeysExt = "AxisKeys" + IntervalSetsExt = "IntervalSets" + LinearAlgebraExt = "LinearAlgebra" + StaticArraysExt = "StaticArrays" + StructArraysExt = "StructArrays" + TestExt = "Test" + UnitfulExt = "Unitful" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[[deps.Adapt]] +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "4.3.0" +weakdeps = ["SparseArrays", "StaticArrays"] + + [deps.Adapt.extensions] + AdaptSparseArraysExt = "SparseArrays" + AdaptStaticArraysExt = "StaticArrays" + +[[deps.ArrayLayouts]] +deps = ["FillArrays", "LinearAlgebra"] +git-tree-sha1 = "4e25216b8fea1908a0ce0f5d87368587899f75be" +uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.ArrayLayouts.extensions] + ArrayLayoutsSparseArraysExt = "SparseArrays" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" + +[[deps.BangBang]] +deps = ["Accessors", "ConstructionBase", "InitialValues", "LinearAlgebra"] +git-tree-sha1 = "26f41e1df02c330c4fa1e98d4aa2168fdafc9b1f" +uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" +version = "0.4.4" + + [deps.BangBang.extensions] + BangBangChainRulesCoreExt = "ChainRulesCore" + BangBangDataFramesExt = "DataFrames" + BangBangStaticArraysExt = "StaticArrays" + BangBangStructArraysExt = "StructArrays" + BangBangTablesExt = "Tables" + BangBangTypedTablesExt = "TypedTables" + + [deps.BangBang.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" + TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" + +[[deps.BlockArrays]] +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] +git-tree-sha1 = "df1746706459aa184ed3424b240a917b89d67b60" +uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" +version = "1.6.1" + + [deps.BlockArrays.extensions] + BlockArraysAdaptExt = "Adapt" + BlockArraysBandedMatricesExt = "BandedMatrices" + + [deps.BlockArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + +[[deps.BlockTensorKit]] +deps = ["BlockArrays", "Compat", "LinearAlgebra", "Random", "Strided", "TensorKit", "TensorOperations", "TupleTools", "VectorInterface"] +git-tree-sha1 = "e0d455f2998aca33747def4f384c1aff5e3278de" +uuid = "5f87ffc2-9cf1-4a46-8172-465d160bd8cd" +version = "0.1.6" + +[[deps.ChainRules]] +deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "SparseInverseSubset", "Statistics", "StructArrays", "SuiteSparse"] +git-tree-sha1 = "a975ae558af61a2a48720a6271661bf2621e0f4e" +uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" +version = "1.72.3" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra"] +git-tree-sha1 = "1713c74e00545bfe14605d2a2be1712de8fbcb58" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.25.1" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" + +[[deps.ChunkSplitters]] +git-tree-sha1 = "63a3903063d035260f0f6eab00f517471c5dc784" +uuid = "ae650224-84b6-46f8-82ea-d812ca08434e" +version = "3.1.2" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.1" + +[[deps.Compat]] +deps = ["TOML", "UUIDs"] +git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.16.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "1.1.1+0" + +[[deps.CompositionsBase]] +git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" + +[[deps.ConstructionBase]] +git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.5.8" + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseLinearAlgebraExt = "LinearAlgebra" + ConstructionBaseStaticArraysExt = "StaticArrays" + + [deps.ConstructionBase.weakdeps] + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.DataAPI]] +git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.16.0" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "4e1fe97fdaed23e9dc21d4d664bea76b65fc50a0" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.22" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" + +[[deps.DiffResults]] +deps = ["StaticArraysCore"] +git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.1.0" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.15.1" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" + +[[deps.DocStringExtensions]] +git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.4" + +[[deps.FillArrays]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "1.13.0" + + [deps.FillArrays.extensions] + FillArraysPDMatsExt = "PDMats" + FillArraysSparseArraysExt = "SparseArrays" + FillArraysStatisticsExt = "Statistics" + + [deps.FillArrays.weakdeps] + PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.FiniteDifferences]] +deps = ["ChainRulesCore", "LinearAlgebra", "Printf", "Random", "Richardson", "SparseArrays", "StaticArrays"] +git-tree-sha1 = "06d76c780d657729cf20821fb5832c6cc4dfd0b5" +uuid = "26cc04aa-876d-5657-8c51-4c34ba976000" +version = "0.12.32" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "1.0.1" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" + +[[deps.GPUArraysCore]] +deps = ["Adapt"] +git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" +uuid = "46192b85-c4d5-4398-a991-12ede77f4527" +version = "0.2.0" + +[[deps.HalfIntegers]] +git-tree-sha1 = "9c3149243abb5bc0bad0431d6c4fcac0f4443c7c" +uuid = "f0d1745a-41c9-11e9-1dd9-e5d34d218721" +version = "1.6.0" + +[[deps.HashArrayMappedTries]] +git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae" +uuid = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" +version = "0.2.0" + +[[deps.IRTools]] +deps = ["InteractiveUtils", "MacroTools"] +git-tree-sha1 = "950c3717af761bc3ff906c2e8e52bd83390b6ec2" +uuid = "7869d1d1-7146-5819-86e3-90919afe41df" +version = "0.4.14" + +[[deps.InitialValues]] +git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" +uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" +version = "0.3.1" + +[[deps.IntegerMathUtils]] +git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" +uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" +version = "0.1.2" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" + +[[deps.InverseFunctions]] +git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.17" + + [deps.InverseFunctions.extensions] + InverseFunctionsDatesExt = "Dates" + InverseFunctionsTestExt = "Test" + + [deps.InverseFunctions.weakdeps] + Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.2.4" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.7.0" + +[[deps.KrylovKit]] +deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"] +git-tree-sha1 = "38477816f8db29956ea591feb3086d9edabf6f38" +uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" +version = "0.9.5" +weakdeps = ["ChainRulesCore"] + + [deps.KrylovKit.extensions] + KrylovKitChainRulesCoreExt = "ChainRulesCore" + +[[deps.LRUCache]] +git-tree-sha1 = "5519b95a490ff5fe629c4a7aa3b3dfc9160498b3" +uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" +version = "1.6.2" +weakdeps = ["Serialization"] + + [deps.LRUCache.extensions] + SerializationExt = ["Serialization"] + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.11.0" + +[[deps.LogExpFunctions]] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.29" + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" + + [deps.LogExpFunctions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" + +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "1.0.3" + +[[deps.MPSKit]] +deps = ["Accessors", "BlockTensorKit", "Compat", "DocStringExtensions", "HalfIntegers", "KrylovKit", "LinearAlgebra", "LoggingExtras", "OhMyThreads", "OptimKit", "Printf", "Random", "RecipesBase", "TensorKit", "TensorKitManifolds", "TensorOperations", "VectorInterface"] +git-tree-sha1 = "588bef90e9672431efda1b686e8d477b621b2118" +uuid = "bb1c41ca-d63c-52ed-829e-0820dda26502" +version = "0.12.6" + +[[deps.MPSKitModels]] +deps = ["LinearAlgebra", "MPSKit", "MacroTools", "PrecompileTools", "TensorKit", "TensorOperations", "TupleTools"] +git-tree-sha1 = "d658f13d6b1c08304344faede50bebcc4f574b6f" +uuid = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" +version = "0.4.0" + +[[deps.MacroTools]] +git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.15" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.1.3" + +[[deps.OhMyThreads]] +deps = ["BangBang", "ChunkSplitters", "StableTasks", "TaskLocalValues"] +git-tree-sha1 = "5f81bdb937fd857bac9548fa8ab9390a06864bb5" +uuid = "67456a42-1dca-4109-a031-0a68de7e3ad5" +version = "0.7.0" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.27+1" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+4" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.6+0" + +[[deps.OptimKit]] +deps = ["LinearAlgebra", "Printf", "ScopedValues", "VectorInterface"] +git-tree-sha1 = "b0163ac202bc03aeb15f0e55002e544e74965534" +uuid = "77e91f04-9b3b-57a6-a776-40b61faaebe0" +version = "0.4.0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.8.0" + +[[deps.PEPSKit]] +deps = ["Accessors", "ChainRulesCore", "Compat", "FiniteDifferences", "KrylovKit", "LinearAlgebra", "LoggingExtras", "MPSKit", "MPSKitModels", "OhMyThreads", "OptimKit", "Printf", "Random", "Statistics", "TensorKit", "TensorOperations", "VectorInterface", "Zygote"] +git-tree-sha1 = "12c42d39d9c67070d5783cbd7ebb54ab957c6a09" +uuid = "52969e89-939e-4361-9b68-9bc7cde4bdeb" +version = "0.5.0" + +[[deps.PackageExtensionCompat]] +git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" +uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" +version = "1.0.2" +weakdeps = ["Requires", "TOML"] + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.2.1" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.4.3" + +[[deps.Primes]] +deps = ["IntegerMathUtils"] +git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" +uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" +version = "0.5.7" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" +version = "1.11.0" + +[[deps.PtrArrays]] +git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" +uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" +version = "1.3.0" + +[[deps.QuadGK]] +deps = ["DataStructures", "LinearAlgebra"] +git-tree-sha1 = "9da16da70037ba9d701192e27befedefb91ec284" +uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +version = "2.11.2" + + [deps.QuadGK.extensions] + QuadGKEnzymeExt = "Enzyme" + + [deps.QuadGK.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + +[[deps.Random]] +deps = ["SHA"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" + +[[deps.RationalRoots]] +git-tree-sha1 = "e5f5db699187a4810fda9181b34250deeedafd81" +uuid = "308eb6b3-cc68-5ff3-9e97-c3c4da4fa681" +version = "0.2.1" + +[[deps.RealDot]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" +uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" +version = "0.1.0" + +[[deps.RecipesBase]] +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.4" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.1" + +[[deps.Richardson]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "48f038bfd83344065434089c2a79417f38715c41" +uuid = "708f8203-808e-40c0-ba2d-98a6953ed40d" +version = "1.4.2" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.ScopedValues]] +deps = ["HashArrayMappedTries", "Logging"] +git-tree-sha1 = "1147f140b4c8ddab224c94efa9569fc23d63ab44" +uuid = "7e506255-f358-4e82-b7e4-beb19740aa63" +version = "1.3.0" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" + +[[deps.SparseArrays]] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.11.0" + +[[deps.SparseInverseSubset]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "52962839426b75b3021296f7df242e40ecfc0852" +uuid = "dc90abb0-5640-4711-901d-7e5b23a2fada" +version = "0.1.2" + +[[deps.SpecialFunctions]] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "64cca0c26b4f31ba18f13f6c12af7c85f478cfde" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.5.0" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" + +[[deps.StableTasks]] +git-tree-sha1 = "c4f6610f85cb965bee5bfafa64cbeeda55a4e0b2" +uuid = "91464d47-22a1-43fe-8b7f-2d57ee82463f" +version = "0.1.7" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] +git-tree-sha1 = "0feb6b9031bd5c51f9072393eb5ab3efd31bf9e4" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.9.13" +weakdeps = ["ChainRulesCore", "Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" + StaticArraysStatisticsExt = "Statistics" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.4.3" + +[[deps.Statistics]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] + +[[deps.Strided]] +deps = ["LinearAlgebra", "StridedViews", "TupleTools"] +git-tree-sha1 = "4a1128f5237b5d0170d934a2eb4fa7a273639c9f" +uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" +version = "2.3.0" + +[[deps.StridedViews]] +deps = ["LinearAlgebra", "PackageExtensionCompat"] +git-tree-sha1 = "425158c52aa58d42593be6861befadf8b2541e9b" +uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" +version = "0.4.1" + + [deps.StridedViews.extensions] + StridedViewsCUDAExt = "CUDA" + StridedViewsPtrArraysExt = "PtrArrays" + + [deps.StridedViews.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + PtrArrays = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" + +[[deps.StructArrays]] +deps = ["ConstructionBase", "DataAPI", "Tables"] +git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.7.1" + + [deps.StructArrays.extensions] + StructArraysAdaptExt = "Adapt" + StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"] + StructArraysLinearAlgebraExt = "LinearAlgebra" + StructArraysSparseArraysExt = "SparseArrays" + StructArraysStaticArraysExt = "StaticArrays" + + [deps.StructArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.7.0+0" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.3" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.12.0" + +[[deps.TaskLocalValues]] +git-tree-sha1 = "d155450e6dff2a8bc2fcb81dcb194bd98b0aeb46" +uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" +version = "0.1.2" + +[[deps.TensorKit]] +deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "Random", "SparseArrays", "Strided", "TensorKitSectors", "TensorOperations", "TupleTools", "VectorInterface"] +git-tree-sha1 = "4a09ea843d18b7256f710f1188414433dcf0b7db" +uuid = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" +version = "0.14.5" +weakdeps = ["ChainRulesCore", "FiniteDifferences"] + + [deps.TensorKit.extensions] + TensorKitChainRulesCoreExt = "ChainRulesCore" + TensorKitFiniteDifferencesExt = "FiniteDifferences" + +[[deps.TensorKitManifolds]] +deps = ["LinearAlgebra", "TensorKit"] +git-tree-sha1 = "94530ac4691795834e2efacb2d31d37571dad52f" +uuid = "11fa318c-39cb-4a83-b1ed-cdc7ba1e3684" +version = "0.7.2" + +[[deps.TensorKitSectors]] +deps = ["HalfIntegers", "LinearAlgebra", "TensorOperations", "WignerSymbols"] +git-tree-sha1 = "fd15110964416b3ac3e7d1d212b0260e4629e536" +uuid = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f" +version = "0.1.4" + +[[deps.TensorOperations]] +deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Preferences", "PtrArrays", "Strided", "StridedViews", "TupleTools", "VectorInterface"] +git-tree-sha1 = "c7458aad3d855e892e2cae208a793a5fceee2406" +uuid = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" +version = "5.2.0" + + [deps.TensorOperations.extensions] + TensorOperationsBumperExt = "Bumper" + TensorOperationsChainRulesCoreExt = "ChainRulesCore" + TensorOperationscuTENSORExt = ["cuTENSOR", "CUDA"] + + [deps.TensorOperations.weakdeps] + Bumper = "8ce10254-0962-460f-a3d8-1f77fea1446e" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1" + +[[deps.TupleTools]] +git-tree-sha1 = "41e43b9dc950775eac654b9f845c839cd2f1821e" +uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" +version = "1.6.0" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" + +[[deps.VectorInterface]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9166406dedd38c111a6574e9814be83d267f8aec" +uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8" +version = "0.5.0" + +[[deps.WignerSymbols]] +deps = ["HalfIntegers", "LRUCache", "Primes", "RationalRoots"] +git-tree-sha1 = "960e5f708871c1d9a28a7f1dbcaf4e0ee34ee960" +uuid = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" +version = "2.0.0" + +[[deps.Zygote]] +deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] +git-tree-sha1 = "207d714f3514b0d564e3a08f9e9f753bf6566c2d" +uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" +version = "0.7.6" + + [deps.Zygote.extensions] + ZygoteAtomExt = "Atom" + ZygoteColorsExt = "Colors" + ZygoteDistancesExt = "Distances" + ZygoteTrackerExt = "Tracker" + + [deps.Zygote.weakdeps] + Atom = "c52e3926-4ff0-5f6e-af25-54175e0327b1" + Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" + Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.ZygoteRules]] +deps = ["ChainRulesCore", "MacroTools"] +git-tree-sha1 = "434b3de333c75fc446aa0d19fc394edafd07ab08" +uuid = "700de1a5-db45-46bc-99cf-38207098b444" +version = "0.2.7" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.11.0+0" +""" + +# ╔═╡ Cell order: +# ╠═c48b528a-6334-4639-9d86-7447a62722a7 +# ╠═801e31ee-0207-4ceb-be8b-7326097cd5f8 +# ╠═8294ffc6-6e61-4f00-85d4-0bbf46abc1d1 +# ╠═0e110dfa-d1fa-4e00-8955-440bc8333f2e +# ╠═e9a89299-420b-4d69-8783-6227e87f3156 +# ╠═cef9e388-3f2a-4bc9-9510-f4a8333ea7b8 +# ╠═22970727-5426-400d-9fae-37ab85046cc4 +# ╠═43bebcf1-7dde-4c72-9cfa-4d229c53d624 +# ╠═f2e44974-de37-4bc4-a4d1-42fa2f144233 +# ╠═e38a0809-5adc-4b32-895e-83005a12d022 +# ╠═0fb5ff79-89d1-4dc2-8902-cbef6082bd48 +# ╠═c14d1429-8ea2-454e-973d-7380385fdb76 +# ╠═9957dd70-45e3-4714-8467-bb9f5587056c +# ╠═32a3820b-b23f-49e0-9b6f-20be53d4dd14 +# ╠═23761bb7-f167-4c29-b68e-7aa4be83c258 +# ╠═a49b029e-e822-40ff-8a0d-6e7d3d38c2e3 +# ╠═5f4e8cc6-dc0a-4018-a2ef-8eda2379121e +# ╠═56a7688d-2219-4cf1-a5e6-de6052be6325 +# ╠═01905c11-725e-4367-983e-3e505288d787 +# ╠═a2b54391-1f02-4fcb-a193-f655ac70210c +# ╠═2195b7db-910e-4988-99b6-3daa17d30821 +# ╠═80946864-1461-482e-b86b-41edbb1f573a +# ╠═a330f090-a6de-4ded-9f19-ab290f9266f1 +# ╠═fc26fcd0-3508-49e1-b804-8dcca4a452e3 +# ╠═6aa5c314-35e8-4200-9e50-875460e59553 +# ╠═77c8e924-526a-4f51-b2df-e160fd6530e7 +# ╠═d8845d3c-1a9d-11f0-27c9-d379139ebccc +# ╟─00000000-0000-0000-0000-000000000001 +# ╟─00000000-0000-0000-0000-000000000002 From dc2a8a0bcc880c92f92068de69959b7beea0bafe Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 17 Apr 2025 11:59:03 +0200 Subject: [PATCH 045/113] Replace Pluto by MPSKit's Literate example docs infrastructure --- docs/make.jl | 14 +- docs/src/examples/bose_hubbard.md | 161 -------------- docs/src/examples/boundary_mps.md | 171 --------------- docs/src/examples/fermi_hubbard.md | 158 ------------- docs/src/examples/heisenberg.md | 207 ------------------ docs/src/examples/hubbard_su.md | 169 -------------- docs/src/examples/ising_partition_function.md | 185 ---------------- docs/src/examples/xxz.md | 148 ------------- .../{notebooks => 1.heisenberg}/heisenberg.jl | 10 - .../boundary_mps.jl | 0 .../bose_hubbard.jl | 0 examples/{notebooks => 4.xxz}/xxz.jl | 0 .../fermi_hubbard.jl | 0 .../{notebooks => 6.hubbard_su}/hubbard_su.jl | 0 .../heis_tools.jl | 0 .../simpleupdate.jl | 0 .../ising_partition_function.jl | 0 examples/Project.toml | 8 +- examples/README.md | 43 ++-- examples/make.jl | 112 ++++++++-- 20 files changed, 113 insertions(+), 1273 deletions(-) delete mode 100644 docs/src/examples/bose_hubbard.md delete mode 100644 docs/src/examples/boundary_mps.md delete mode 100644 docs/src/examples/fermi_hubbard.md delete mode 100644 docs/src/examples/heisenberg.md delete mode 100644 docs/src/examples/hubbard_su.md delete mode 100644 docs/src/examples/ising_partition_function.md delete mode 100644 docs/src/examples/xxz.md rename examples/{notebooks => 1.heisenberg}/heisenberg.jl (99%) rename examples/{notebooks => 2.boundary_mps}/boundary_mps.jl (100%) rename examples/{notebooks => 3.bose_hubbard}/bose_hubbard.jl (100%) rename examples/{notebooks => 4.xxz}/xxz.jl (100%) rename examples/{notebooks => 5.fermi_hubbard}/fermi_hubbard.jl (100%) rename examples/{notebooks => 6.hubbard_su}/hubbard_su.jl (100%) rename examples/{heisenberg_evol => 7.heisenberg_su}/heis_tools.jl (100%) rename examples/{heisenberg_evol => 7.heisenberg_su}/simpleupdate.jl (100%) rename examples/{notebooks => 8.ising_partition_function}/ising_partition_function.jl (100%) diff --git a/docs/make.jl b/docs/make.jl index e18067ca4..757451337 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -42,14 +42,10 @@ mathengine = MathJax3( ), ) -examples = [ - "Optimizing the 2D Heisenberg model" => "examples/heisenberg.md", - "Boundary MPS contractions using VUMPS and PEPOs" => "examples/boundary_mps.md", - "Optimizing the ``U(1)``-symmetric Bose-Hubbard model" => "examples/bose_hubbard.md", - "Néel order in the ``U(1)``-symmetric XXZ model" => "examples/xxz.md", - "Fermi-Hubbard model with ``f\\mathbb{Z}_2 \\boxtimes U(1)`` symmetry at large ``U`` and half-filling" => "examples/fermi_hubbard.md", - "Hubbard model imaginary time evolution using simple update" => "examples/hubbard_su.md", -] +# built examples target directories +example_pages = map(readdir(joinpath(@__DIR__, "src", "examples"))) do dir + return joinpath("examples", dir, "index.md") +end makedocs(; modules=[PEPSKit], @@ -68,7 +64,7 @@ makedocs(; "man/multi_threading.md", "man/precompilation.md", ], - "Examples" => examples, + "Examples" => example_pages, "Library" => "lib/lib.md", "References" => "references.md", ], diff --git a/docs/src/examples/bose_hubbard.md b/docs/src/examples/bose_hubbard.md deleted file mode 100644 index 61f51dce5..000000000 --- a/docs/src/examples/bose_hubbard.md +++ /dev/null @@ -1,161 +0,0 @@ -```@raw html - - - - - -

Optimizing the \(U(1)\)-symmetric Bose-Hubbard model

This example demonstrates the simulation of the two-dimensional Bose-Hubbard model. In particular, the point will be to showcase the use of internal symmetries and finite particle densities in PEPS ground state searches. As we will see, incorporating symmetries into the simulation consists of initializing a symmetric Hamiltonian, PEPS state and CTM environment - made possible through TensorKit.

But first let's seed the RNG and import the required modules:

- -
using Random
- - -
Random.seed!(2928528935);
- - -
using TensorKit, PEPSKit
- - -
using MPSKit: add_physical_charge
- - - -``` -## Defining the model -```@raw html -
-

We will construct the Bose-Hubbard model Hamiltonian through the bose_hubbard_model function from MPSKitModels, as reexported by PEPSKit. We'll simulate the model in its Mott-insulating phase where the ratio \(U/t\) is large, since in this phase we expect the ground state to be well approximated by a PEPS with a manifest global \(U(1)\) symmetry. Furthermore, we'll impose a cutoff at 2 bosons per site, set the chemical potential to zero and use a simple 1x1 unit cell:

- -
t = 1.0;
- - -
U = 30.0;
- - -
cutoff = 2;
- - -
mu = 0.0;
- - -
lattice = InfiniteSquare(1, 1);
- - - -

Next, we impose an explicit global U(1) symmetry as well as a fixed particle number density in our simulations. We can do this by setting the symmetry argument of the Hamiltonian constructor to U1Irrep and passing one as the particle number density keyword argument n:

- -
symmetry = U1Irrep;
- - -
n = 1;
- - - -

So let's instantiate the symmetric Hamiltonian:

- -
H = bose_hubbard_model(ComplexF64, symmetry, lattice; cutoff, t, U, n);
- - - -

Before we continue, it might be interesting to inspect the corresponding lattice physical spaces:

- -
physical_spaces = H.lattice
-
1×1 Matrix{GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}}:
- Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1)
- - -

Note that the physical space contains \(U(1)\) charges -1, 0 and +1. Indeed, imposing a particle number density of +1 corresponds to shifting the physical charges by -1 to 're-center' the physical charges around the desired density. When we do this with a cutoff of two bosons per site, i.e. starting from \(U(1)\) charges 0, 1 and 2 on the physical level, we indeed get the observed charges.

- - -``` -## Characterizing the virtual spaces -```@raw html -
-

When running PEPS simulations with explicit internal symmetries, specifying the structure of the virtual spaces of the PEPS and its environment becomes a bit more involved. For the environment, one could in principle allow the virtual space to be chosen dynamically during the boundary contraction using CTMRG by using a truncation scheme that allows for this (e.g. using alg=:truncdim or alg=:truncbelow to truncate to a fixed total bond dimension or singular value cutoff respectively). For the PEPS virtual space however, the structure has to be specified before the optimization.

While there are a host of techniques to do this in an informed way (e.g. starting from a simple update result), here we just specify the virtual space manually. Since we're dealing with a model at unit filling our physical space only contains integer \(U(1)\) irreps. Therefore, we'll build our PEPS and environment spaces using integer U(1) irreps centered around the zero charge.

- -
V_peps = U1Space(0 => 2, 1 => 1, -1 => 1);
- - -
V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2);
- - - -``` -## Finding the ground state -```@raw html -
-

Having defined our Hamiltonian and spaces, it is just a matter of plugging this into the optimization framework in the usual way to find the ground state. So, we first specify all algorithms and their tolerances:

- -
boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace));
- - -
gradient_alg = (; tol=1e-6, maxiter=10, alg=:eigsolver, iterscheme=:diffgauge);
- - -
optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=200, ls_maxiter=2, ls_maxfg=2);
- - - -
Note

Taking CTMRG gradients and optimizing symmetric tensors tends to be more problematic than with dense tensors. In particular, this means that one frequently needs to tweak the boundary_alg, gradient_alg and optimizer_alg settings. There rarely is a general-purpose set of settings which will always work, so instead one has to adjust the simulation settings for each specific application. For example, it might help to switch between the CTMRG flavors alg=:simultaneous and alg=:sequential to improve convergence. The evaluation of the CTMRG gradient can be instable, so there it is advised to try the different iterscheme=:diffgauge and iterscheme=:fixed schemes as well as different alg keywords. Of course the tolerances of the algorithms and their subalgorithms also have to be compatible. For more details on the available options, see the fixedpoint docstring.

Keep in mind that the PEPS is constructed from a unit cell of spaces, so we have to make a matrix of V_peps spaces:

- -
virtual_spaces = fill(V_peps, size(lattice)...);
- - -
peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces);
- - -
env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...);
- - - -

And at last, we optimize (which might take a bit):

- -
peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg);
- - -
@show E
-
-0.026480205618883625
- - -

We can compare our PEPS result to the energy obtained using a cylinder-MPS calculation using a cylinder circumference of \(L_y = 7\) and a bond dimension of 446, which yields \(E = -0.273284888\):

- -
E_ref = -0.273284888;
- - -
@show (E - E_ref) / E_ref
-
-0.9031040252072642
-
-

Built with Julia 1.11.4 and

-MPSKit 0.12.6
-PEPSKit 0.5.0
-Random 1.11.0
-TensorKit 0.14.5 -
- - -``` - diff --git a/docs/src/examples/boundary_mps.md b/docs/src/examples/boundary_mps.md deleted file mode 100644 index 462426fb8..000000000 --- a/docs/src/examples/boundary_mps.md +++ /dev/null @@ -1,171 +0,0 @@ -```@raw html - - - - - -

Boundary MPS contractions using VUMPS and PEPOs

Instead of using CTMRG to contract an infinite PEPS, one can also use an boundary MPSs ansatz to contract the infinite network. In particular, we will here use VUMPS to do so.

Before we start, we'll fix the random seed for reproducability:

- -
using Random
- - -
Random.seed!(29384293742893);
- - - -

Besides TensorKit and PEPSKit, we here also need MPSKit which implements the VUMPS algorithm as well as the required MPS operations:

- -
using TensorKit, PEPSKit, MPSKit
- - - -``` -## Computing a PEPS norm -```@raw html -
-

We start by initializing a random initial infinite PEPS:

- -
peps₀ = InfinitePEPS(ComplexSpace(2), ComplexSpace(2));
- - - -

To compute its norm, we need to construct the transfer operator corresponding to the partition function representing the overlap \(\langle \psi_\text{PEPS} | \psi_\text{PEPS} \rangle\):

- -
transfer = InfiniteTransferPEPS(peps₀, 1, 1);
- - - -

We then find its leading boundary MPS fixed point, where the corresponding eigenvalue encodes the norm of the state. To that end, let us first we build an initial guess for the boundary MPS, choosing a bond dimension of 20:

- -
mps₀ = initializeMPS(transfer, [ComplexSpace(20)]);
- - - -

Note that this will just construct a MPS with random Gaussian entries based on the virtual spaces of the supplied transfer operator. Of course, one might come up with a better initial guess (leading to better convergence) depending on the application. To find the leading boundary MPS fixed point, we call leading_boundary using the VUMPS algorithm from MPSKit:

- -
mps, env, ϵ = leading_boundary(mps₀, transfer, VUMPS(; verbosity=2));
- - - -

The norm of the state per unit cell is then given by the expectation value \(\langle \psi_\text{MPS} | \mathbb{T} | \psi_\text{MPS} \rangle\):

- -
norm_vumps = abs(prod(expectation_value(mps, transfer)));
- - - -

This can be compared to the result obtained using CTMRG, where we see that the results match:

- -
env_ctmrg, = leading_boundary(CTMRGEnv(peps₀, ComplexSpace(20)), peps₀; verbosity=2);
- - -
norm_ctmrg = abs(norm(peps₀, env_ctmrg));
- - -
@show abs(norm_vumps - norm_ctmrg) / norm_vumps
-
3.358035242498026e-6
- - -``` -## Working with unit cells -```@raw html -
-

For PEPS with non-trivial unit cells, the principle is exactly the same. The only difference is that now the transfer operator of the PEPS norm partition function has multiple lines, each of which can be represented by an InfiniteTransferPEPS object. Such a multi-line transfer operator is represented by a MultilineTransferPEPS object. In this case, the boundary MPS is an MultilineMPS object, which should be initialized by specifying a virtual space for each site in the partition function unit cell.

First, we construct a PEPS with a \(2 \times 2\) unit cell using the unitcell keyword argument and then define the corresponding transfer PEPS:

- -
peps₀_2x2 = InfinitePEPS(ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2));
- - -
transfer_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1);
- - - -

Now, the procedure is the same as before: We compute the norm once using VUMPS, once using CTMRG and then compare.

- -
begin
-    mps₀_2x2 = initializeMPS(transfer_2x2, fill(ComplexSpace(20), 2, 2))
-    mps_2x2, = leading_boundary(mps₀_2x2, transfer_2x2, VUMPS(; verbosity=2))
-    norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, transfer_2x2)))
-
-    env_ctmrg_2x2, = leading_boundary(
-        CTMRGEnv(peps₀_2x2, ComplexSpace(20)), peps₀_2x2; verbosity=2
-    )
-    norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2))
-
-    @show abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps
-end
-
0.0070857615042805
- - -

Again, the results are compatible. Note that for larger unit cells and non-Hermitian PEPS the VUMPS algorithm may become unstable, in which case the CTMRG algorithm is recommended.

Contracting PEPO overlaps

Using exactly the same machinery, we can contract partition functions which encode the expectation value of a PEPO for a given PEPS state. As an example, we can consider the overlap of the PEPO correponding to the partition function of 3D classical Ising model with our random PEPS from before and evaluate the overlap \(\langle \psi_\text{PEPS} | O_\text{PEPO} | \psi_\text{PEPS} \rangle\).

The classical Ising PEPO is defined as follows:

- -
function ising_pepo(β; unitcell=(1, 1, 1))
-    t = ComplexF64[exp(β) exp(-β); exp(-β) exp(β)]
-    q = sqrt(t)
-
-    O = zeros(2, 2, 2, 2, 2, 2)
-    O[1, 1, 1, 1, 1, 1] = 1
-    O[2, 2, 2, 2, 2, 2] = 1
-    @tensor o[-1 -2; -3 -4 -5 -6] :=
-        O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6]
-    O = TensorMap(o, ℂ^2 ⊗ (ℂ^2)' ← ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')
-
-    return InfinitePEPO(O; unitcell)
-end;
- - - -

To evaluate the overlap, we instantiate the PEPO and the corresponding InfiniteTransferPEPO in the right direction, on the right row of the partition function (trivial here):

- -
pepo = ising_pepo(1);
- - -
transfer_pepo = InfiniteTransferPEPO(peps₀, pepo, 1, 1);
- - - -

As before, we converge the boundary MPS using VUMPS and then compute the expectation value:

- -
begin
-    mps₀_pepo = initializeMPS(transfer_pepo, [ComplexSpace(20)])
-    mps_pepo, = leading_boundary(mps₀_pepo, transfer_pepo, VUMPS(; verbosity=2))
-    @show abs(prod(expectation_value(mps_pepo, transfer_pepo)))
-end
-
95.58715017531645
- - -

These objects and routines can be used to optimize PEPS fixed points of 3D partition functions, see for example Vanderstraeten et al.

-
-

Built with Julia 1.11.4 and

-MPSKit 0.12.6
-PEPSKit 0.5.0
-Random 1.11.0
-TensorKit 0.14.5 -
- - -``` - diff --git a/docs/src/examples/fermi_hubbard.md b/docs/src/examples/fermi_hubbard.md deleted file mode 100644 index 1644565b7..000000000 --- a/docs/src/examples/fermi_hubbard.md +++ /dev/null @@ -1,158 +0,0 @@ -```@raw html - - - - - -

Fermi-Hubbard model with \(f\mathbb{Z}_2 \boxtimes U(1)\) symmetry, at large \(U\) and half-filling

In this example, we will demonstrate how to handle fermionic PEPS tensors and how to optimize them. To that end, we consider the two-dimensional Hubbard model

$$H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- + c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i$$

where \(\sigma \in \{\uparrow,\downarrow\}\) and \(n_{i,\sigma} = c_{i,\sigma}^+ c_{i,\sigma}^-\) is the fermionic number operator. As in previous examples, using fermionic degrees of freedom is a matter of creating tensors with the right symmetry sectors - the rest of the simulation workflow remains the same.

First though, we make the example deterministic by seeding the RNG, and we make our imports:

- -
using Random
- - -
Random.seed!(2928528937);
- - -
using TensorKit, PEPSKit
- - -
using MPSKit: add_physical_charge
- - - -``` -## Defining the fermionic Hamiltonian -```@raw html -
-

Let us start by fixing the parameters of the Hubbard model. We're going to use a hopping of \(t=1\) and a large \(U=8\) on a \(2 \times 2\) unit cell:

- -
t = 1.0;
- - -
U = 8.0;
- - -
lattice = InfiniteSquare(2, 2);
- - - -

In order to create fermionic tensors, one needs to define symmetry sectors using TensorKit's FermionParity. Not only do we want use fermion parity but we also want our particles to exploit the global \(U(1)\) symmetry. The combined product sector can be obtained using the Deligne product, called through which is obtained by typing \boxtimes+TAB. We will not impose any extra spin symmetry, so we have:

- -
fermion = fℤ₂;
- - -
particle_symmetry = U1Irrep;
- - -
spin_symmetry = Trivial;
- - -
S = fermion ⊠ particle_symmetry;
- - - -

The next step is defining graded virtual PEPS and environment spaces using S. Here we also use the symmetry sector to impose half-filling. That is all we need to define the Hubbard Hamiltonian:

- -
D, χ = 1, 1;
- - -
V_peps = Vect[S]((0, 0) => 2 * D, (1, 1) => D, (1, -1) => D);
- - -
V_env = Vect[S](
-    (0, 0) => 4 * χ, (1, -1) => 2 * χ, (1, 1) => 2 * χ, (0, 2) => χ, (0, -2) => χ
-);
- - -
S_aux = S((1, -1));
- - -
H₀ = hubbard_model(ComplexF64, particle_symmetry, spin_symmetry, lattice; t, U);
- - -
H = add_physical_charge(H₀, fill(S_aux, size(H₀.lattice)...));
- - - -``` -## Finding the ground state -```@raw html -
-

Again, the procedure of ground state optimization is very similar to before. First, we define all algorithmic parameters:

- -
boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace));
- - -
gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge);
- - -
optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2);
- - - -

Second, we initialize a PEPS state and environment (which we converge) constructed from symmetric physical and virtual spaces:

- -
physical_spaces = H.lattice;
- - -
virtual_spaces = fill(V_peps, size(lattice)...);
- - -
peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces);
- - -
env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...);
- - - -

And third, we start the ground state search (this does take quite long):

- -
peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg);
- - -
@show E
-
7.041937580964341
- - -

Finally, let's compare the obtained energy against a reference energy from a QMC study by Qin et al.. With the parameters specified above, they obtain an energy of \(E_\text{ref} \approx 4 \times -0.5244140625 = -2.09765625\) (the factor 4 comes from the \(2 \times 2\) unit cell that we use here). Thus, we find:

- -
E_ref = -2.09765625;
- - -
@show (E - E_ref) / E_ref
-
-4.3570503179271345
-
-

Built with Julia 1.11.4 and

-MPSKit 0.12.6
-PEPSKit 0.5.0
-Random 1.11.0
-TensorKit 0.14.5 -
- - -``` - diff --git a/docs/src/examples/heisenberg.md b/docs/src/examples/heisenberg.md deleted file mode 100644 index 18f078718..000000000 --- a/docs/src/examples/heisenberg.md +++ /dev/null @@ -1,207 +0,0 @@ -```@raw html - - - - - -

Optimizing the 2D Heisenberg model

In this example we want to provide a basic rundown of PEPSKit's optimization workflow for PEPS. To that end, we will consider the two-dimensional Heisenberg model on a square lattice

$$H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j$$

Here, we want to set \(J_x=J_y=J_z=1\) where the Heisenberg model is in the antiferromagnetic regime. Due to the bipartite sublattice structure of antiferromagnetic order one needs a PEPS ansatz with a \(2 \times 2\) unit cell. This can be circumvented by performing a unitary sublattice rotation on all B-sites resulting in a change of parameters to \((J_x, J_y, J_z)=(-1, 1, -1)\). This gives us a unitarily equivalent Hamiltonian (with the same spectrum) with a ground state on a single-site unit cell.

- - -

Let us get started by fixing the random seed of this example to make it deterministic:

- -
using Random
- - -
Random.seed!(123456789);
- - - -

We're going to need only two packages: TensorKit, since we use that for all the underlying tensor operations, and PEPSKit itself. So let us import these:

- -
using TensorKit, PEPSKit
- - - -``` -## Defining the Heisenberg Hamiltonian -```@raw html -
-

To create the sublattice rotated Heisenberg Hamiltonian on an infinite square lattice, we use the heisenberg_XYZ method from MPSKitModels which is redefined for the InfiniteSquare and reexported in PEPSKit:

- -
H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1);
- - - -``` -## Setting up the algorithms and initial guesses -```@raw html -
-

Next, we set the simulation parameters. During optimization, the PEPS will be contracted using CTMRG and the PEPS gradient will be computed by differentiating through the CTMRG routine using AD. Since the algorithmic stack that implements this is rather elaborate, the amount of settings one can configure is also quite large. To reduce this complexity, PEPSKit defaults to (presumably) reasonable settings which also dynamically adapts to the user-specified parameters.

First, we set the bond dimension Dbond of the virtual PEPS indices and the environment dimension χenv of the virtual corner and transfer matrix indices.

- -
Dbond = 2;
- - -
χenv = 16;
- - - -

To configure the CTMRG algorithm, we create a NamedTuple containing different keyword arguments. To see a description of all arguments, see the docstring of leading_boundary. Here, we want to converge the CTMRG environments up to a specific tolerance and during the CTMRG run keep all index dimensions fixed:

- -
boundary_alg = (; tol=1e-10, trscheme=(; alg=:fixedspace));
- - - -

Let us also configure the optimizer algorithm. We are going to optimize the PEPS using the L-BFGS optimizer from OptimKit. Again, we specify the convergence tolerance (for the gradient norm) as well as the maximal number of iterations and the BFGS memory size (which is used to approximate the Hessian):

- -
optimizer_alg = (; alg=:lbfgs, tol=1e-4, maxiter=100, lbfgs_memory=16);
- - - -

Additionally, during optimization, we want to reuse the previous CTMRG environment to initialize the CTMRG run of the current optimization step:

- -
reuse_env = true;
- - - -

And to control the output information, we set the verbosity:

- -
verbosity = 1;
- - - -

Next, we initialize a random PEPS which will be used as an initial guess for the optimization. To get a PEPS with physical dimension 2 (since we have a spin-1/2 Hamiltonian) with complex-valued random Gaussian entries, we set:

- -
peps₀ = InfinitePEPS(randn, ComplexF64, 2, Dbond);
- - - -

The last thing we need before we can start the optimization is an initial CTMRG environment. Typically, a random environment which we converge on peps₀ serves as a good starting point:

- -
env_random = CTMRGEnv(randn, ComplexF64, peps₀, ℂ^χenv);
- - -
env₀, info_ctmrg = leading_boundary(env_random, peps₀; boundary_alg...);
- - - -

Besides the converged environment, leading_boundary also returns a NamedTuple of informational quantities such as the last (maximal) SVD truncation error:

- -
info_ctmrg.truncation_error
-
0.0017266955527366114
- - -``` -## Ground state search -```@raw html -
-

Finally, we can start the optimization by calling fixedpoint on H with our settings for the boundary (CTMRG) algorithm and the optimizer. This might take a while (especially the precompilation of AD code in this case):

- -
peps, env, E, info_opt = fixedpoint(
-    H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity
-);
- - - -

Note that fixedpoint returns the final optimized PEPS, the last converged environment, the final energy estimate as well as a NamedTuple of diagnostics. This allows us to, e.g., analyze the number of cost function calls or the history of gradient norms to evaluate the convergence rate:

- -
@show info_opt.fg_evaluations
-
95
- -
@show info_opt.gradnorms[1:10:end]
-
9-element Vector{Float64}:
- 1.5288545029023473
- 0.42745931621092037
- 0.04712909560745584
- 0.02455989405793848
- 0.012403251650572806
- 0.003187578031911067
- 0.001660979743126857
- 0.0008591829333440263
- 0.0003360213833815268
- - -

Let's now compare the optimized energy against an accurate Quantum Monte Carlo estimate by Sandvik, where the energy per site was found to be \(E_{\text{ref}}=−0.6694421\). From our simple optimization we find:

- -
@show E
-
-0.6625142760601819
- - -

While this energy is in the right ballpark, there is still quite some deviation from the accurate reference energy. This, however, can be attributed to the small bond dimension - an optimization with larger bond dimension would approach this value much more closely.

A more reasonable comparison would be against another finite bond dimension PEPS simulation. For example, Juraj Hasik's data from \(J_1\text{-}J_2\)PEPS simulations yields \(E_{D=2,\chi=16}=-0.660231\dots\) which is more in line with what we find here.

- - -``` -## Compute the correlation lengths and transfer matrix spectra -```@raw html -
-

In practice, in order to obtain an accurate and variational energy estimate, one would need to compute multiple energies at different environment dimensions and extrapolate in, e.g., the correlation length or the second gap of the transfer matrix spectrum. For that, we would need the correlation_length function, which computes the horizontal and vertical correlation lengths and transfer matrix spectra for all unit cell coordinates:

- -
ξ_h, ξ_v, λ_h, λ_v = correlation_length(peps, env);
- - -
@show ξ_h
-
1-element Vector{Float64}:
- 1.0344958386399636
- -
@show ξ_v
-
1-element Vector{Float64}:
- 1.0240547254030574
- - -``` -## Computing observables -```@raw html -
-

As a last thing, we want to see how we can compute expectation values of observables, given the optimized PEPS and its CTMRG environment. To compute, e.g., the magnetization, we first need to define the observable:

- -
σ_z = TensorMap([1.0 0.0; 0.0 -1.0], ℂ^2, ℂ^2)
-
TensorMap(ℂ^2 ← ℂ^2):
- 1.0   0.0
- 0.0  -1.0
-
- - -

In order to be able to contract it with the PEPS and environment, we define need to define a LocalOperator and specify on which physical spaces and sites the observable acts. That way, the PEPS-environment-operator contraction gets automatically generated (also works for multi-site operators!). See the LocalOperator docstring for more details. The magnetization is just a single-site observable, so we have:

- -
M = LocalOperator(fill(ℂ^2, 1, 1), (CartesianIndex(1, 1),) => σ_z);
- - - -

To evaluate the expecation value, we call:

- -
@show expectation_value(peps, M, env)
-
0.5956380763180077 - 2.7776452606652597e-16im
-
-

Built with Julia 1.11.4 and

-PEPSKit 0.5.0
-Random 1.11.0
-TensorKit 0.14.5 -
- - -``` - diff --git a/docs/src/examples/hubbard_su.md b/docs/src/examples/hubbard_su.md deleted file mode 100644 index 082c69543..000000000 --- a/docs/src/examples/hubbard_su.md +++ /dev/null @@ -1,169 +0,0 @@ -```@raw html - - - - - -

Hubbard model imaginary time evolution using simple update

Once again, we consider the Hubbard model but this time we obtain the ground-state PEPS by imaginary time evoluation. In particular, we'll use the SimpleUpdate algorithm. As a reminder, we define the Hubbard model as

$$H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- + c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i$$

with \(\sigma \in \{\uparrow,\downarrow\}\) and \(n_{i,\sigma} = c_{i,\sigma}^+ c_{i,\sigma}^-\).

Let's get started by seeding the RNG and importing the required modules:

- -
using Random
- - -
Random.seed!(1298351928);
- - -
using TensorKit, PEPSKit
- - - -``` -## Defining the Hamiltonian -```@raw html -
-

First, we define the Hubbard model at \(t=1\) hopping and \(U=6\) using Trivial sectors for the particle and spin symmetries:

- -
t, U = 1, 6;
- - -
H = hubbard_model(Float64, Trivial, Trivial, InfiniteSquare(Nr, Nc); t, U, mu=U / 2);
- - - -``` -## Running the simple update algorithm -```@raw html -
-

Next, we'll specify the virtual PEPS bond dimension and define the fermionic physical and virtual spaces. For the PEPS ansatz we choose a \(2 \times 2\) unit cell:

- -
Dbond = 8;
- - -
physical_space = Vect[fℤ₂](0 => 2, 1 => 2);
- - -
virtual_space = Vect[fℤ₂](0 => Dbond / 2, 1 => Dbond / 2);
- - -
Nr, Nc = 2, 2;
- - - -

The simple update algorithm evolves an infinite PEPS with weights on the virtual bonds, so we here need to intialize an InfiniteWeightPEPS. By default, the bond weights will be identity. Note that we here use tensors with real Float64 entries:

- -
wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, virtual_space; unitcell=(Nr, Nc));
- - - -

Before starting the simple update routine, we normalize the vertex tensors:

- -
for ind in CartesianIndices(wpeps.vertices)
-    wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf)
-end;
- - - -

Let's set algorithm parameters: The plan is to successively decrease the time interval of the Trotter-Suzuki as well as the convergence tolerance such that we obtain a more accurate result at each iteration. To run the simple update, we call simpleupdate where we use the keyword bipartite=false - meaning that we use the full \(2 \times 2\) unit cell without assuming a bipartite structure. Thus, we can start evolving:

- -
dts = [1e-2, 1e-3, 4e-4, 1e-4];
- - -
tols = [1e-6, 1e-8, 1e-8, 1e-8];
- - -
maxiter = 20000;
- - -
begin
-    wpeps_su = wpeps
-    for (n, (dt, tol)) in enumerate(zip(dts, tols))
-        trscheme = truncerr(1e-10) & truncdim(Dbond)
-        alg = SimpleUpdate(dt, tol, maxiter, trscheme)
-        global wpeps_su, = simpleupdate(wpeps_su, H, alg; bipartite=false)
-    end
-end;
- - - -

To obtain the evolved InfiniteWeightPEPS as an actual PEPS without weights on the bonds, we can just call the following constructor:

- -
peps = InfinitePEPS(wpeps_su);
- - - -``` -## Computing the ground-state energy -```@raw html -
-

In order to compute the energy expectation value with evolved PEPS, we need to converge a CTMRG environment on it. We first converge an environment with a small enviroment dimension and then use that to initialize another run with bigger environment dimension. We'll use trscheme=truncdim(χ) for that such that the dimension is increased during the second CTMRG run:

- -
χenv₀, χenv = 6, 20;
- - -
env_space = Vect[fℤ₂](0 => χenv₀ / 2, 1 => χenv₀ / 2);
- - -
begin
-    env = CTMRGEnv(rand, Float64, peps, env_space)
-    for χ in [χenv₀, χenv]
-        global env, = leading_boundary(
-            env, peps; alg=:sequential, tol=1e-5, trscheme=truncdim(χ)
-        )
-    end
-end;
- - - -

We measure the energy by computing the H expectation value, where we have to make sure to normalize to obtain the energy per site:

- -
E = expectation_value(peps, H, env) / (Nr * Nc);
- - -
@show E
-
-3.6513224945235674
- - -

Finally, we can compare the obtained ground-state energy against the literature, namely the QMC estimates from Qin et al.. We find that the result generally agree:

- -
Es_exact = Dict(0 => -1.62, 2 => -0.176, 4 => 0.8603, 6 => -0.6567, 8 => -0.5243);
- - -
E_exact = Es_exact[U] - U / 2;
- - -
@show (E - E_exact) / E_exact
-
-0.001470589732937472
-
-

Built with Julia 1.11.4 and

-PEPSKit 0.5.0
-Random 1.11.0
-TensorKit 0.14.5 -
- - -``` - diff --git a/docs/src/examples/ising_partition_function.md b/docs/src/examples/ising_partition_function.md deleted file mode 100644 index 4f1bc2af6..000000000 --- a/docs/src/examples/ising_partition_function.md +++ /dev/null @@ -1,185 +0,0 @@ -```@raw html - - - - - -

2D classical Ising partition function using CTMRG

All previous examples dealt with quantum systems, describing their states by InfinitePEPS that can be contracted using CTMRG or VUMPS techniques. Here, we shift our focus towards classical physics and consider the 2D classical Ising model with the partition function

$$\mathcal{Z}(\beta) = \sum_{\{s\}} \exp(-\beta H(s)) \text{ with } H(s) = -J \sum_{\langle i, j \rangle} s_i s_j .$$

The idea is to encode the partition function into an infinite square lattice of rank-4 tensors which can then be contracted using CTMRG. These rank-4 tensors are represented by InfinitePartitionFunction states, as we will see.

But first, let's seed the RNG and import all required modules:

- -
using Random
- - -
Random.seed!(234923);
- - -
using LinearAlgebra, TensorKit, PEPSKit, QuadGK
- - - -``` -## Defining the partition function -```@raw html -
-

The first step is to define the rank-4 tensor that, when contracted on a square lattice, evaluates to the partition function value at a given \(\beta\). Since we later want to compute the magnetization and energy, we define the appropriate rank-4 tensors as well:

- -
function classical_ising(; beta=log(1 + sqrt(2)) / 2, J=1.0)
-    K = beta * J
-
-    # Boltzmann weights
-    t = ComplexF64[exp(K) exp(-K); exp(-K) exp(K)]
-    r = eigen(t)
-    nt = r.vectors * sqrt(Diagonal(r.values)) * r.vectors
-
-    # local partition function tensor
-    O = zeros(2, 2, 2, 2)
-    O[1, 1, 1, 1] = 1
-    O[2, 2, 2, 2] = 1
-    @tensor o[-1 -2; -3 -4] := O[3 4; 2 1] * nt[-3; 3] * nt[-4; 4] * nt[-2; 2] * nt[-1; 1]
-
-    # magnetization tensor
-    M = copy(O)
-    M[2, 2, 2, 2] *= -1
-    @tensor m[-1 -2; -3 -4] := M[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * nt[-3; 3] * nt[-4; 4]
-
-    # bond interaction tensor and energy-per-site tensor
-    e = ComplexF64[-J J; J -J] .* nt
-    @tensor e_hor[-1 -2; -3 -4] :=
-        O[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * nt[-3; 3] * e[-4; 4]
-    @tensor e_vert[-1 -2; -3 -4] :=
-        O[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * e[-3; 3] * nt[-4; 4]
-    e = e_hor + e_vert
-
-    # fixed tensor map space for all three
-    TMS = ℂ^2 ⊗ ℂ^2 ← ℂ^2 ⊗ ℂ^2
-
-    return TensorMap(o, TMS), TensorMap(m, TMS), TensorMap(e, TMS)
-end;
- - - -

So let's initialize these tensors at inverse temperature \(\beta=0.6\) and construct the corresponding InfinitePartitionFunction:

- -
beta = 0.6;
- - -
O, M, E = classical_ising(; beta);
- - -
Z = InfinitePartitionFunction(O);
- - - -``` -## Contracting the partition function -```@raw html -
-

Next, we can contract the partition function as per usual by constructing a CTMRGEnv and calling leading_boundary:

- -
χenv = 20;
- - -
env₀ = CTMRGEnv(Z, χenv);
- - -
env, = leading_boundary(env₀, Z; tol=1e-8, maxiter=500);
- - - -

Note that CTMRG environments for partition functions differ from the PEPS environments only by the edge tensors - instead of two legs connecting the edges and the PEPS-PEPS sandwich, there is only one leg connecting the edges and the partition function tensor:

- -
space.(env.edges)
-
4×1×1 Array{TensorMapSpace{ComplexSpace, 2, 1}, 3}:
-[:, :, 1] =
- (ℂ^20 ⊗ ℂ^2) ← ℂ^20
- (ℂ^20 ⊗ ℂ^2) ← ℂ^20
- (ℂ^20 ⊗ (ℂ^2)') ← ℂ^20
- (ℂ^20 ⊗ (ℂ^2)') ← ℂ^20
- - -

To compute the value of the partition function, we have to contract Z with the converged environment using network_value. Additionally, we will compute the magnetization and energy (per site), again using expectation_value but this time also specifying the index in the unit cell, where we want to insert the local tensor:

- -
λ = network_value(Z, env);
- - -
m = expectation_value(Z, (1, 1) => M, env);
- - -
e = expectation_value(Z, (1, 1) => E, env);
- - - -``` -## Comparing against the exact Onsager solution -```@raw html -
-

In order to assess our results, we will compare against the exact Onsager solution. To that end, we compute the exact free energy, magnetization and energy per site (where quadgk performs the integral from \(0\) to \(\pi/2\)):

- -
function classical_ising_exact(; beta=log(1 + sqrt(2)) / 2, J=1.0)
-    K = beta * J
-
-    k = 1 / sinh(2 * K)^2
-    F = quadgk(
-        theta -> log(cosh(2 * K)^2 + 1 / k * sqrt(1 + k^2 - 2 * k * cos(2 * theta))), 0, pi
-    )[1]
-    f = -1 / beta * (log(2) / 2 + 1 / (2 * pi) * F)
-
-    m = 1 - (sinh(2 * K))^(-4) > 0 ? (1 - (sinh(2 * K))^(-4))^(1 / 8) : 0
-
-    E = quadgk(theta -> 1 / sqrt(1 - (4 * k) * (1 + k)^(-2) * sin(theta)^2), 0, pi / 2)[1]
-    e = -J * cosh(2 * K) / sinh(2 * K) * (1 + 2 / pi * (2 * tanh(2 * K)^2 - 1) * E)
-
-    return f, m, e
-end;
- - -
f_exact, m_exact, e_exact = classical_ising_exact(; beta);
- - - -

And indeed, we do find agreement between the exact and CTMRG values (keeping in mind that energy accuracy is limited by the environment dimension and the lack of proper extrapolation):

- -
@show (-log(λ) / beta - f_exact) / f_exact
-
-1.1009271732942546e-15 + 1.7075080586064297e-16im
- -
@show (abs(m) - abs(m_exact)) / abs(m_exact)
-
0.0
- -
@show (e - e_exact) / e_exact # accuracy limited by bond dimension and maxiter
-
-0.02373206809909008 - 6.466073768041896e-17im
-
-

Built with Julia 1.11.4 and

-LinearAlgebra 1.11.0
-PEPSKit 0.5.0
-QuadGK 2.11.2
-Random 1.11.0
-TensorKit 0.14.5 -
- - -``` - diff --git a/docs/src/examples/xxz.md b/docs/src/examples/xxz.md deleted file mode 100644 index 66115c904..000000000 --- a/docs/src/examples/xxz.md +++ /dev/null @@ -1,148 +0,0 @@ -```@raw html - - - - - -

Néel order in the U(1)-symmetric XXZ model

Here, we want to look at a special case of the Heisenberg model, where the \(x\) and \(y\) couplings are equal, called the XXZ model

$$H_0 = J \big(\sum_{\langle i, j \rangle} S_i^x S_j^x + S_i^y S_j^y + \Delta S_i^z S_j^z \big) .$$

For appropriate \(\Delta\), the model enters an antiferromagnetic phase (Néel order) which we will force by adding staggered magnetic charges to \(H_0\). Furthermore, since the XXZ Hamiltonian obeys a \(U(1)\) symmetry, we will make use of that and work with \(U(1)\)-symmetric PEPS and CTMRG environments. For simplicity, we will consider spin-\(1/2\) operators.

But first, let's make this example deterministic and import the required packages:

- -
using Random
- - -
Random.seed!(2928528935);
- - -
using TensorKit, PEPSKit
- - -
using MPSKit: add_physical_charge
- - - -``` -## Constructing the model -```@raw html -
-

Let us define the XXZ Hamiltonian with the parameters

- -
J, Delta, spin = 1.0, 1.0, 1//2;
- - - -

with \(U(1)\)-symmetric tensors

- -
symmetry = U1Irrep;
- - - -

on a \(2 \times 2\) unit cell:

- -
lattice = InfiniteSquare(2, 2);
- - -
H₀ = heisenberg_XXZ(ComplexF64, symmetry, lattice; J, Delta, spin);
- - - -

This ensures that our PEPS ansatz can support the bipartite Néel order. As discussed above, we encode the Néel order directly in the ansatz by adding staggered auxiliary physical charges:

- -
S_aux = [
-    U1Irrep(-1//2) U1Irrep(1//2)
-    U1Irrep(1//2) U1Irrep(-1//2)
-];
- - -
H = add_physical_charge(H₀, S_aux);
- - - -``` -## Specifying the symmetric virtual spaces -```@raw html -
-

Before we create an initial PEPS and CTM environment, we need to think about which symmetric spaces we need to construct. Since we want to exploit the global \(U(1)\) symmetry of the model, we will use TensorKit's U1Spaces where we specify dimensions for each symmetry sector:

- -
V_peps = U1Space(0 => 2, 1 => 1, -1 => 1);
- - -
V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2);
- - - -

From the virtual spaces, we will need to construct a unit cell (a matrix) of spaces which will be supplied to the PEPS constructor. The same is true for the physical spaces, which we will just extract from the Hamiltonian LocalOperator:

- -
virtual_spaces = fill(V_peps, size(lattice)...);
- - -
physical_spaces = H.lattice;
- - - -``` -## Ground state search -```@raw html -
-

From this point onwards it's business as usual: Create an initial PEPS and environment (using the symmetric spaces), specify the algorithmic parameters and optimize:

- -
boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace));
- - -
gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge);
- - -
optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2);
- - -
peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces);
- - -
env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...);
- - - -

Finally, we can optimize the PEPS with respect to the XXZ Hamiltonian. Note that the optimization might take a while since precompilation of symmetric AD code takes longer and because symmetric tensors do create a bit of overhead (which does pay off at larger bond and environment dimensions):

- -
peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg);
- - -
@show E
-
-0.6689439877742164
- - -

Note that for the specified parameters \(J=\Delta=1\), we simulated the same Hamiltonian as in the Heisenberg example. In that example, with a non-symmetric \(D=2\) PEPS simulation, we reached a ground-state energy of around \(E_\text{D=2} = -0.6625\dots\). Again comparing against Sandvik's accurate QMC estimate \(E_{\text{ref}}=−0.6694421\), we see that we already got closer to the reference energy.

-
-

Built with Julia 1.11.4 and

-MPSKit 0.12.6
-PEPSKit 0.5.0
-Random 1.11.0
-TensorKit 0.14.5 -
- - -``` - diff --git a/examples/notebooks/heisenberg.jl b/examples/1.heisenberg/heisenberg.jl similarity index 99% rename from examples/notebooks/heisenberg.jl rename to examples/1.heisenberg/heisenberg.jl index 194c7a6b6..b4259da40 100644 --- a/examples/notebooks/heisenberg.jl +++ b/examples/1.heisenberg/heisenberg.jl @@ -1,16 +1,6 @@ -### A Pluto.jl notebook ### -# v0.20.5 - -using Markdown -using InteractiveUtils - -# ╔═╡ 0c1fc02f-fd78-47d3-82c2-1c261472f61e using Random - -# ╔═╡ 7da39574-7c05-492e-abf9-10b9e8f1dda9 using TensorKit, PEPSKit -# ╔═╡ ff6fa2f1-841d-42c6-acd9-b5f4cf6b7c76 md""" # Optimizing the 2D Heisenberg model diff --git a/examples/notebooks/boundary_mps.jl b/examples/2.boundary_mps/boundary_mps.jl similarity index 100% rename from examples/notebooks/boundary_mps.jl rename to examples/2.boundary_mps/boundary_mps.jl diff --git a/examples/notebooks/bose_hubbard.jl b/examples/3.bose_hubbard/bose_hubbard.jl similarity index 100% rename from examples/notebooks/bose_hubbard.jl rename to examples/3.bose_hubbard/bose_hubbard.jl diff --git a/examples/notebooks/xxz.jl b/examples/4.xxz/xxz.jl similarity index 100% rename from examples/notebooks/xxz.jl rename to examples/4.xxz/xxz.jl diff --git a/examples/notebooks/fermi_hubbard.jl b/examples/5.fermi_hubbard/fermi_hubbard.jl similarity index 100% rename from examples/notebooks/fermi_hubbard.jl rename to examples/5.fermi_hubbard/fermi_hubbard.jl diff --git a/examples/notebooks/hubbard_su.jl b/examples/6.hubbard_su/hubbard_su.jl similarity index 100% rename from examples/notebooks/hubbard_su.jl rename to examples/6.hubbard_su/hubbard_su.jl diff --git a/examples/heisenberg_evol/heis_tools.jl b/examples/7.heisenberg_su/heis_tools.jl similarity index 100% rename from examples/heisenberg_evol/heis_tools.jl rename to examples/7.heisenberg_su/heis_tools.jl diff --git a/examples/heisenberg_evol/simpleupdate.jl b/examples/7.heisenberg_su/simpleupdate.jl similarity index 100% rename from examples/heisenberg_evol/simpleupdate.jl rename to examples/7.heisenberg_su/simpleupdate.jl diff --git a/examples/notebooks/ising_partition_function.jl b/examples/8.ising_partition_function/ising_partition_function.jl similarity index 100% rename from examples/notebooks/ising_partition_function.jl rename to examples/8.ising_partition_function/ising_partition_function.jl diff --git a/examples/Project.toml b/examples/Project.toml index 223c37c04..11aa8ec3e 100644 --- a/examples/Project.toml +++ b/examples/Project.toml @@ -1,2 +1,8 @@ [deps] -PlutoStaticHTML = "359b1769-a58e-495b-9770-312e911026ad" +LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" +MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502" +PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" +QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" diff --git a/examples/README.md b/examples/README.md index 8039cdd3c..ce148b16e 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,38 +1,21 @@ -# Examples and Tutorials +# Examples -This directory contains the source code for the examples and tutorials of this package. -These are written using [Pluto.jl](https://plutojl.org/), and can be run as scripts or through Pluto itself. +This folder contains the examples and tutorials of this package. The files can be run as +scripts and are embedded into the docs using [Literate.jl](https://fredrikekre.github.io/Literate.jl/v2/). ## Building the documentation -As these examples can take substantial resources to build, they are not included in the automated documentation build. -To build the documentation, you can run the following command: +The example files have to be built and updated manually. In order to trigger the file +generation, run: -```bash -julia examples/make.jl -``` +``julia examples/make.jl` -This should generate static HTML files in the `docs/examples` directory, which are then included in the documentation pages. -By default, examples that haven't changed since the last build are not re-run. +By default, this will only generate files when the input file has not changed. This is +achieved by keeping a checksum of the `main.jl` file in each example in a `cache.toml`. +Total recompilation can be achieved by deleting this file, or alternatively you can just +delete the entries for which you wish to generate new files. -Note that Pluto uses its own package management system, which will use the latest registered version of this package. -This ensures the examples are always reproducible by themselves. -However, this also means that when registering a new version of this package, the next step is to re-run the examples to ensure that they are up-to-date, and build a new version of the documentation. +## Contributing -Alternatively, we can decide to manually keep a local environment for the examples by using `examples/Project.toml` and including the following block: - -```julia -begin - import Pkg - # activate the shared project environment - Pkg.activate(Base.current_project()) - # ensure latest version of PEPSKit is installed - Pkg.dev(joinpath(@__DIR__, "..")) - Pkg.instantiate() - - # other packages - using ... -end -``` - -For more information, see [Pluto.jl's documentation](https://plutojl.org/en/docs/packages-advanced/) +Contributions are welcome! Please open an issue or a pull request if you have any questions +or suggestions. diff --git a/examples/make.jl b/examples/make.jl index c2a26dabb..beb73f4e5 100644 --- a/examples/make.jl +++ b/examples/make.jl @@ -1,26 +1,90 @@ -using Pkg -Pkg.activate(@__DIR__) -Pkg.resolve() -Pkg.instantiate() - -using PlutoStaticHTML - -const NOTEBOOK_DIR = joinpath(@__DIR__, "notebooks") -const OUTPUT_DIR = joinpath(@__DIR__, "..", "docs", "src", "examples") - -@info "Building notebooks in $NOTEBOOK_DIR" -oopts = OutputOptions(; append_build_context=true) -output_format = documenter_output -bopts = BuildOptions( - NOTEBOOK_DIR; output_format, previous_dir=OUTPUT_DIR, max_concurrent_runs=1 -) -build_notebooks(bopts, oopts) - -@info "Copying markdown files" -for file in readdir(NOTEBOOK_DIR) - _, ext = splitext(file) - if ext == ".md" - @debug "Copying $file" - mv(joinpath(NOTEBOOK_DIR, file), joinpath(OUTPUT_DIR, file); force=true) +# if examples is not the current active environment, switch to it +if Base.active_project() != joinpath(@__DIR__, "Project.toml") + using Pkg + Pkg.activate(@__DIR__) + Pkg.develop(PackageSpec(; path=(@__DIR__) * "/../")) + Pkg.resolve() + Pkg.instantiate() +end + +using PEPSKit +using Literate +using TOML, SHA + +# ---------------------------------------------------------------------------------------- # +# Caching +# ---------------------------------------------------------------------------------------- # + +const CACHEFILE = joinpath(@__DIR__, "Cache.toml") + +getcache() = isfile(CACHEFILE) ? TOML.parsefile(CACHEFILE) : Dict{String,Any}() + +function iscached(root, name) + cache = getcache() + return haskey(cache, root) && + haskey(cache[root], name) && + cache[root][name] == checksum(root, name) +end + +function setcached(root, name) + cache = getcache() + if haskey(cache, root) + cache[root][name] = checksum(root, name) + else + cache[root] = Dict{String,Any}(name => checksum(root, name)) + end + return open(f -> TOML.print(f, cache), CACHEFILE, "w") +end + +checksum(root, name) = bytes2hex(sha256(joinpath(@__DIR__, root, name, "main.jl"))) + +# ---------------------------------------------------------------------------------------- # +# Building +# ---------------------------------------------------------------------------------------- # + +attach_notebook_badge(root, name) = str -> attach_notebook_badge(root, name, str) +function attach_notebook_badge(root, name, str) + mybinder_badge_url = "https://mybinder.org/badge_logo.svg" + nbviewer_badge_url = "https://img.shields.io/badge/show-nbviewer-579ACA.svg" + download_badge_url = "https://img.shields.io/badge/download-project-orange" + mybinder = "[![]($mybinder_badge_url)](@__BINDER_ROOT_URL__/examples/$root/$name/main.ipynb)" + nbviewer = "[![]($nbviewer_badge_url)](@__NBVIEWER_ROOT_URL__/examples/$root/$name/main.ipynb)" + download = "[![]($download_badge_url)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/$root/$name)" + + markdown_only(x) = "#md # " * x + return join(map(markdown_only, (mybinder, nbviewer, download)), "\n") * "\n\n" * str +end + +function build_example(root, name) + source_dir = joinpath(@__DIR__, "..", "examples", root, name) + source_file = joinpath(source_dir, "main.jl") + target_dir = joinpath(@__DIR__, "..", "docs", "src", "examples", root, name) + + if !iscached(root, name) + Literate.markdown(source_file, target_dir; execute=true, name="index", + preprocess=attach_notebook_badge(root, name), mdstrings=true, + nbviewer_root_url="https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev", + binder_root_url="https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev", + credits=false, + repo_root_url="https://github.com/QuantumKitHub/PEPSKit.jl") + Literate.notebook(source_file, target_dir; execute=false, name="main", + preprocess=str -> replace(str, r"(? "\$"), + mdstrings=true, credits=false) + + foreach(filter(!=("main.jl"), readdir(source_dir))) do f + return cp(joinpath(source_dir, f), joinpath(target_dir, f); force=true) + end + setcached(root, name) end end + +function build(root="./") + examples = readdir(joinpath(@__DIR__, root)) + return map(ex -> build_example(root, ex), examples) +end + +# ---------------------------------------------------------------------------------------- # +# Scripts +# ---------------------------------------------------------------------------------------- # + +build() From 5465c558847767c51860c9d69af156318ff98cc4 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 17 Apr 2025 16:24:10 +0200 Subject: [PATCH 046/113] Convert example notebooks to Literate example scripts --- docs/src/assets/pepskit.bib | 15 + docs/src/index.md | 2 +- examples/1.heisenberg/heisenberg.jl | 997 ------------------ examples/1.heisenberg/main.jl | 185 ++++ examples/2.boundary_mps/boundary_mps.jl | 968 ----------------- examples/2.boundary_mps/main.jl | 154 +++ examples/3.bose_hubbard/bose_hubbard.jl | 949 ----------------- examples/3.bose_hubbard/main.jl | 130 +++ examples/4.xxz/main.jl | 97 ++ examples/4.xxz/xxz.jl | 932 ---------------- examples/5.fermi_hubbard/fermi_hubbard.jl | 944 ----------------- examples/5.fermi_hubbard/main.jl | 102 ++ examples/6.hubbard_su/hubbard_su.jl | 954 ----------------- examples/6.hubbard_su/main.jl | 121 +++ .../ising_partition_function.jl | 973 ----------------- examples/8.ising_partition_function/main.jl | 143 +++ examples/README.md | 4 +- examples/make.jl | 30 +- 18 files changed, 972 insertions(+), 6728 deletions(-) delete mode 100644 examples/1.heisenberg/heisenberg.jl create mode 100644 examples/1.heisenberg/main.jl delete mode 100644 examples/2.boundary_mps/boundary_mps.jl create mode 100644 examples/2.boundary_mps/main.jl delete mode 100644 examples/3.bose_hubbard/bose_hubbard.jl create mode 100644 examples/3.bose_hubbard/main.jl create mode 100644 examples/4.xxz/main.jl delete mode 100644 examples/4.xxz/xxz.jl delete mode 100644 examples/5.fermi_hubbard/fermi_hubbard.jl create mode 100644 examples/5.fermi_hubbard/main.jl delete mode 100644 examples/6.hubbard_su/hubbard_su.jl create mode 100644 examples/6.hubbard_su/main.jl delete mode 100644 examples/8.ising_partition_function/ising_partition_function.jl create mode 100644 examples/8.ising_partition_function/main.jl diff --git a/docs/src/assets/pepskit.bib b/docs/src/assets/pepskit.bib index 396c79858..c890cc9a9 100644 --- a/docs/src/assets/pepskit.bib +++ b/docs/src/assets/pepskit.bib @@ -69,3 +69,18 @@ @article{qin_benchmark_2016 doi = {10.1103/PhysRevB.94.085103}, url = {https://link.aps.org/doi/10.1103/PhysRevB.94.085103} } + +@article{corboz_variational_2016, + title = {Variational optimization with infinite projected entangled-pair states}, + author = {Corboz, Philippe}, + journal = {Phys. Rev. B}, + volume = {94}, + issue = {3}, + pages = {035133}, + numpages = {11}, + year = {2016}, + month = {Jul}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.94.035133}, + url = {https://link.aps.org/doi/10.1103/PhysRevB.94.035133} +} diff --git a/docs/src/index.md b/docs/src/index.md index ee6971691..852929ec1 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -50,7 +50,7 @@ peps, env, E, = fixedpoint(H, peps₀, env₀; tol=grad_tol, boundary_alg=(; tol @show E # -0.6625... ``` -For a more in-depth explanation of this simple example, check the Examples or consult the Manual pages. +For a more in-depth explanation of this simple example, check the [Optimizing the 2D Heisenberg model](@ref examples_heisenberg) tutorial or consult the Manual pages. ## Table of contents diff --git a/examples/1.heisenberg/heisenberg.jl b/examples/1.heisenberg/heisenberg.jl deleted file mode 100644 index b4259da40..000000000 --- a/examples/1.heisenberg/heisenberg.jl +++ /dev/null @@ -1,997 +0,0 @@ -using Random -using TensorKit, PEPSKit - -md""" -# Optimizing the 2D Heisenberg model - -In this example we want to provide a basic rundown of PEPSKit's optimization workflow for PEPS. To that end, we will consider the two-dimensional Heisenberg model on a square lattice - -```math -H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j -``` - -Here, we want to set ``J_x=J_y=J_z=1`` where the Heisenberg model is in the antiferromagnetic regime. Due to the bipartite sublattice structure of antiferromagnetic order one needs a PEPS ansatz with a ``2 \times 2`` unit cell. This can be circumvented by performing a unitary sublattice rotation on all B-sites resulting in a change of parameters to ``(J_x, J_y, J_z)=(-1, 1, -1)``. This gives us a unitarily equivalent Hamiltonian (with the same spectrum) with a ground state on a single-site unit cell. -""" - -# ╔═╡ d806d7b2-f25b-48d0-87e7-48acfbc93678 -md""" -Let us get started by fixing the random seed of this example to make it deterministic: -""" - -# ╔═╡ ba0e9dc8-1641-4c85-896d-2d335094ecc2 -Random.seed!(123456789); - -# ╔═╡ d463e7d9-499f-4689-bf04-260cef0af6ce -md""" -We're going to need only two packages: `TensorKit`, since we use that for all the underlying tensor operations, and `PEPSKit` itself. So let us import these: -""" - -# ╔═╡ d42f7ddd-eb20-4441-b7e7-38b1d4996084 -md""" -## Defining the Heisenberg Hamiltonian - -To create the sublattice rotated Heisenberg Hamiltonian on an infinite square lattice, we use the `heisenberg_XYZ` method from [MPSKitModels](https://quantumkithub.github.io/MPSKitModels.jl/dev/) which is redefined for the `InfiniteSquare` and reexported in PEPSKit: -""" - -# ╔═╡ 758d7f1a-b62f-400d-bf71-25410a7ce9c5 -H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1); - -# ╔═╡ 945f9d02-322b-47f0-85b2-f229e4d8c4d9 -md""" -## Setting up the algorithms and initial guesses - -Next, we set the simulation parameters. During optimization, the PEPS will be contracted using CTMRG and the PEPS gradient will be computed by differentiating through the CTMRG routine using AD. Since the algorithmic stack that implements this is rather elaborate, the amount of settings one can configure is also quite large. -To reduce this complexity, PEPSKit defaults to (presumably) reasonable settings which also dynamically adapts to the user-specified parameters. - -First, we set the bond dimension `Dbond` of the virtual PEPS indices and the environment dimension `χenv` of the virtual corner and transfer matrix indices. -""" - -# ╔═╡ f87c548e-a8ff-4b21-b9a0-5ae06c1b7adb -Dbond = 2; - -# ╔═╡ b40e0dbd-7136-4211-863d-3f489606a86c -χenv = 16; - -# ╔═╡ 2e7b56ff-df31-48a3-91e9-a621bb545baa -md""" -To configure the CTMRG algorithm, we create a `NamedTuple` containing different keyword arguments. To see a description of all arguments, see the docstring of [`leading_boundary`](@ref). Here, we want to converge the CTMRG environments up to a specific tolerance and during the CTMRG run keep all index dimensions fixed: -""" - -# ╔═╡ 1f6330da-b1f5-4472-80f2-b19ff3c09e36 -boundary_alg = (; tol=1e-10, trscheme=(; alg=:fixedspace)); - -# ╔═╡ 4f800808-aa72-46e3-ad6e-13c9852d8cd1 -md""" -Let us also configure the optimizer algorithm. We are going to optimize the PEPS using the L-BFGS optimizer from [OptimKit](https://github.com/Jutho/OptimKit.jl). Again, we specify the convergence tolerance (for the gradient norm) as well as the maximal number of iterations and the BFGS memory size (which is used to approximate the Hessian): -""" - -# ╔═╡ ec9157cb-2402-487d-a394-f237a9b8e056 -optimizer_alg = (; alg=:lbfgs, tol=1e-4, maxiter=100, lbfgs_memory=16); - -# ╔═╡ d52a7418-6f4e-4ed3-80c8-a2b8f60fe664 -md""" -Additionally, during optimization, we want to reuse the previous CTMRG environment to initialize the CTMRG run of the current optimization step: -""" - -# ╔═╡ 0d6e6de5-2f75-466a-8367-a9d802897c6e -reuse_env = true; - -# ╔═╡ 65057067-de67-44ce-9882-c08101ebee6b -md""" -And to control the output information, we set the `verbosity`: -""" - -# ╔═╡ 17deff8d-2f8f-4ce0-9bb6-d2b91b1c26a0 -verbosity = 1; - -# ╔═╡ a60fd81d-a540-496f-9507-7e155aa83f86 -md""" -Next, we initialize a random PEPS which will be used as an initial guess for the optimization. To get a PEPS with physical dimension 2 (since we have a spin-1/2 Hamiltonian) with complex-valued random Gaussian entries, we set: -""" - -# ╔═╡ c6af4fba-0b13-4c8c-971b-8955a34d16ae -peps₀ = InfinitePEPS(randn, ComplexF64, 2, Dbond); - -# ╔═╡ 1ba303c2-bd63-45c3-afcf-899f0660d363 -md""" -The last thing we need before we can start the optimization is an initial CTMRG environment. Typically, a random environment which we converge on `peps₀` serves as a good starting point: -""" - -# ╔═╡ 5aad67ec-7880-4688-ba2c-c567a0236a8a -env_random = CTMRGEnv(randn, ComplexF64, peps₀, ℂ^χenv); - -# ╔═╡ d74c45d4-31af-4e0a-8401-7e0003f90d99 -env₀, info_ctmrg = leading_boundary(env_random, peps₀; boundary_alg...); - -# ╔═╡ c8aa2838-8d6d-44b3-9c2a-302ab42aa1f9 -md""" -Besides the converged environment, `leading_boundary` also returns a `NamedTuple` of informational quantities such as the last (maximal) SVD truncation error: -""" - -# ╔═╡ 4c55e732-88e4-4327-9e43-ac40abd6bb63 -info_ctmrg.truncation_error - -# ╔═╡ 72a1eb41-30f2-4844-a934-eede6c3daf83 -md""" -## Ground state search - -Finally, we can start the optimization by calling `fixedpoint` on `H` with our settings for the boundary (CTMRG) algorithm and the optimizer. This might take a while (especially the precompilation of AD code in this case): -""" - -# ╔═╡ cd246b3e-3172-4f22-ad67-9d3d5a5c0464 -peps, env, E, info_opt = fixedpoint( - H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity -); - -# ╔═╡ 9647daa9-c730-4185-bd11-6a54a0ded025 -md""" -Note that `fixedpoint` returns the final optimized PEPS, the last converged environment, the final energy estimate as well as a `NamedTuple` of diagnostics. This allows us to, e.g., analyze the number of cost function calls or the history of gradient norms to evaluate the convergence rate: -""" - -# ╔═╡ c467848b-20ff-454e-b15b-00345ce6f29c -@show info_opt.fg_evaluations - -# ╔═╡ c7edf6a8-f743-47dc-bba4-bd9522bb6664 -@show info_opt.gradnorms[1:10:end] - -# ╔═╡ 96b429c0-25fe-411d-a016-7677819357af -md""" -Let's now compare the optimized energy against an accurate Quantum Monte Carlo estimate by [Sandvik](@cite sandvik_computational_2011), where the energy per site was found to be ``E_{\text{ref}}=−0.6694421``. From our simple optimization we find: -""" - -# ╔═╡ 33174988-02f2-487f-a635-e40d35c120af -@show E - -# ╔═╡ d57df214-05c1-428a-a45b-2876a582fb4f -md""" -While this energy is in the right ballpark, there is still quite some deviation from the accurate reference energy. This, however, can be attributed to the small bond dimension - an optimization with larger bond dimension would approach this value much more closely. - -A more reasonable comparison would be against another finite bond dimension PEPS simulation. For example, Juraj Hasik's data from ``J_1\text{-}J_2`` [PEPS simulations](https://github.com/jurajHasik/j1j2_ipeps_states/blob/main/single-site_pg-C4v-A1/j20.0/state_1s_A1_j20.0_D2_chi_opt48.dat) yields ``E_{D=2,\chi=16}=-0.660231\dots`` which is more in line with what we find here. -""" - -# ╔═╡ 7d743eb9-7969-486c-8d3b-f9b7cc78ba67 -md""" -## Compute the correlation lengths and transfer matrix spectra - -In practice, in order to obtain an accurate and variational energy estimate, one would need to compute multiple energies at different environment dimensions and extrapolate in, e.g., the correlation length or the second gap of the transfer matrix spectrum. For that, we would need the `correlation_length` function, which computes the horizontal and vertical correlation lengths and transfer matrix spectra for all unit cell coordinates: -""" - -# ╔═╡ e1e3388e-4e0d-44ed-a7e0-1b04627406f1 -ξ_h, ξ_v, λ_h, λ_v = correlation_length(peps, env); - -# ╔═╡ 65b8dd1c-e09c-450b-8fa6-9718de1d79da -@show ξ_h - -# ╔═╡ e032acf0-06dd-4b32-b41f-ea007aa07dfb -@show ξ_v - -# ╔═╡ 585f04e3-b2ad-441b-aef8-f5e46e351335 -md""" -## Computing observables - -As a last thing, we want to see how we can compute expectation values of observables, given the optimized PEPS and its CTMRG environment. To compute, e.g., the magnetization, we first need to define the observable: -""" - -# ╔═╡ b62b44a2-8fb1-4d72-9657-ab68b91c5171 -σ_z = TensorMap([1.0 0.0; 0.0 -1.0], ℂ^2, ℂ^2) - -# ╔═╡ 72f3e01f-f2d7-4e1f-8241-331b3f0d8789 -md""" -In order to be able to contract it with the PEPS and environment, we define need to define a `LocalOperator` and specify on which physical spaces and sites the observable acts. That way, the PEPS-environment-operator contraction gets automatically generated (also works for multi-site operators!). See the [`LocalOperator`](@ref) docstring for more details. The magnetization is just a single-site observable, so we have: -""" - -# ╔═╡ 8d31b900-5841-4979-b2db-0abbadcc347c -M = LocalOperator(fill(ℂ^2, 1, 1), (CartesianIndex(1, 1),) => σ_z); - -# ╔═╡ 06a32163-887e-4eb5-960c-e153735f5f59 -md""" -To evaluate the expecation value, we call: -""" - -# ╔═╡ ff85c322-f16c-41e2-823a-95f194e6ad72 -@show expectation_value(peps, M, env) - -# ╔═╡ 00000000-0000-0000-0000-000000000001 -PLUTO_PROJECT_TOML_CONTENTS = """ -[deps] -PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" -Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" - -[compat] -PEPSKit = "~0.5.0" -TensorKit = "~0.14.5" -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000002 -PLUTO_MANIFEST_TOML_CONTENTS = """ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.11.4" -manifest_format = "2.0" -project_hash = "79f58b0126713df51e6c54bffa8c6c88c0809a34" - -[[deps.AbstractFFTs]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" -uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" -version = "1.5.0" - - [deps.AbstractFFTs.extensions] - AbstractFFTsChainRulesCoreExt = "ChainRulesCore" - AbstractFFTsTestExt = "Test" - - [deps.AbstractFFTs.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] -git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" -uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" -version = "0.1.42" - - [deps.Accessors.extensions] - AxisKeysExt = "AxisKeys" - IntervalSetsExt = "IntervalSets" - LinearAlgebraExt = "LinearAlgebra" - StaticArraysExt = "StaticArrays" - StructArraysExt = "StructArrays" - TestExt = "Test" - UnitfulExt = "Unitful" - - [deps.Accessors.weakdeps] - AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - -[[deps.Adapt]] -deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" -uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.3.0" -weakdeps = ["SparseArrays", "StaticArrays"] - - [deps.Adapt.extensions] - AdaptSparseArraysExt = "SparseArrays" - AdaptStaticArraysExt = "StaticArrays" - -[[deps.ArrayLayouts]] -deps = ["FillArrays", "LinearAlgebra"] -git-tree-sha1 = "4e25216b8fea1908a0ce0f5d87368587899f75be" -uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.ArrayLayouts.extensions] - ArrayLayoutsSparseArraysExt = "SparseArrays" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -version = "1.11.0" - -[[deps.BangBang]] -deps = ["Accessors", "ConstructionBase", "InitialValues", "LinearAlgebra"] -git-tree-sha1 = "26f41e1df02c330c4fa1e98d4aa2168fdafc9b1f" -uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" -version = "0.4.4" - - [deps.BangBang.extensions] - BangBangChainRulesCoreExt = "ChainRulesCore" - BangBangDataFramesExt = "DataFrames" - BangBangStaticArraysExt = "StaticArrays" - BangBangStructArraysExt = "StructArrays" - BangBangTablesExt = "Tables" - BangBangTypedTablesExt = "TypedTables" - - [deps.BangBang.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" - TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -version = "1.11.0" - -[[deps.BlockArrays]] -deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "f29a91240c147f107a8f66eb9ae631358fab35c9" -uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -version = "1.6.0" - - [deps.BlockArrays.extensions] - BlockArraysAdaptExt = "Adapt" - BlockArraysBandedMatricesExt = "BandedMatrices" - - [deps.BlockArrays.weakdeps] - Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - -[[deps.BlockTensorKit]] -deps = ["BlockArrays", "Compat", "LinearAlgebra", "Random", "Strided", "TensorKit", "TensorOperations", "TupleTools", "VectorInterface"] -git-tree-sha1 = "e0d455f2998aca33747def4f384c1aff5e3278de" -uuid = "5f87ffc2-9cf1-4a46-8172-465d160bd8cd" -version = "0.1.6" - -[[deps.ChainRules]] -deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "SparseInverseSubset", "Statistics", "StructArrays", "SuiteSparse"] -git-tree-sha1 = "a975ae558af61a2a48720a6271661bf2621e0f4e" -uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" -version = "1.72.3" - -[[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "1713c74e00545bfe14605d2a2be1712de8fbcb58" -uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.25.1" -weakdeps = ["SparseArrays"] - - [deps.ChainRulesCore.extensions] - ChainRulesCoreSparseArraysExt = "SparseArrays" - -[[deps.ChunkSplitters]] -git-tree-sha1 = "63a3903063d035260f0f6eab00f517471c5dc784" -uuid = "ae650224-84b6-46f8-82ea-d812ca08434e" -version = "3.1.2" - -[[deps.CommonSubexpressions]] -deps = ["MacroTools"] -git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" -uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.1" - -[[deps.Compat]] -deps = ["TOML", "UUIDs"] -git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.16.0" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.1.1+0" - -[[deps.CompositionsBase]] -git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" -uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" -version = "0.1.2" -weakdeps = ["InverseFunctions"] - - [deps.CompositionsBase.extensions] - CompositionsBaseInverseFunctionsExt = "InverseFunctions" - -[[deps.ConstructionBase]] -git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" -uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.8" - - [deps.ConstructionBase.extensions] - ConstructionBaseIntervalSetsExt = "IntervalSets" - ConstructionBaseLinearAlgebraExt = "LinearAlgebra" - ConstructionBaseStaticArraysExt = "StaticArrays" - - [deps.ConstructionBase.weakdeps] - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.DataAPI]] -git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" -uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.16.0" - -[[deps.DataValueInterfaces]] -git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" -uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" -version = "1.0.0" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -version = "1.11.0" - -[[deps.DiffResults]] -deps = ["StaticArraysCore"] -git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" -uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" -version = "1.1.0" - -[[deps.DiffRules]] -deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] -git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" -uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.15.1" - -[[deps.Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" -version = "1.11.0" - -[[deps.DocStringExtensions]] -git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.4" - -[[deps.FillArrays]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" -uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.13.0" - - [deps.FillArrays.extensions] - FillArraysPDMatsExt = "PDMats" - FillArraysSparseArraysExt = "SparseArrays" - FillArraysStatisticsExt = "Statistics" - - [deps.FillArrays.weakdeps] - PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[deps.FiniteDifferences]] -deps = ["ChainRulesCore", "LinearAlgebra", "Printf", "Random", "Richardson", "SparseArrays", "StaticArrays"] -git-tree-sha1 = "06d76c780d657729cf20821fb5832c6cc4dfd0b5" -uuid = "26cc04aa-876d-5657-8c51-4c34ba976000" -version = "0.12.32" - -[[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" -uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "1.0.1" -weakdeps = ["StaticArrays"] - - [deps.ForwardDiff.extensions] - ForwardDiffStaticArraysExt = "StaticArrays" - -[[deps.GPUArraysCore]] -deps = ["Adapt"] -git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" -uuid = "46192b85-c4d5-4398-a991-12ede77f4527" -version = "0.2.0" - -[[deps.HalfIntegers]] -git-tree-sha1 = "9c3149243abb5bc0bad0431d6c4fcac0f4443c7c" -uuid = "f0d1745a-41c9-11e9-1dd9-e5d34d218721" -version = "1.6.0" - -[[deps.HashArrayMappedTries]] -git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae" -uuid = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" -version = "0.2.0" - -[[deps.IRTools]] -deps = ["InteractiveUtils", "MacroTools"] -git-tree-sha1 = "950c3717af761bc3ff906c2e8e52bd83390b6ec2" -uuid = "7869d1d1-7146-5819-86e3-90919afe41df" -version = "0.4.14" - -[[deps.InitialValues]] -git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" -uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" -version = "0.3.1" - -[[deps.IntegerMathUtils]] -git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" -uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" -version = "0.1.2" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -version = "1.11.0" - -[[deps.InverseFunctions]] -git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" -uuid = "3587e190-3f89-42d0-90ee-14403ec27112" -version = "0.1.17" - - [deps.InverseFunctions.extensions] - InverseFunctionsDatesExt = "Dates" - InverseFunctionsTestExt = "Test" - - [deps.InverseFunctions.weakdeps] - Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.IrrationalConstants]] -git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" -uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.4" - -[[deps.IteratorInterfaceExtensions]] -git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" -uuid = "82899510-4779-5014-852e-03e436cf321d" -version = "1.0.0" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.7.0" - -[[deps.KrylovKit]] -deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"] -git-tree-sha1 = "38477816f8db29956ea591feb3086d9edabf6f38" -uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" -version = "0.9.5" -weakdeps = ["ChainRulesCore"] - - [deps.KrylovKit.extensions] - KrylovKitChainRulesCoreExt = "ChainRulesCore" - -[[deps.LRUCache]] -git-tree-sha1 = "5519b95a490ff5fe629c4a7aa3b3dfc9160498b3" -uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" -version = "1.6.2" -weakdeps = ["Serialization"] - - [deps.LRUCache.extensions] - SerializationExt = ["Serialization"] - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -version = "1.11.0" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.11.0" - -[[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" -uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.29" - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" - - [deps.LogExpFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -version = "1.11.0" - -[[deps.LoggingExtras]] -deps = ["Dates", "Logging"] -git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" -uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.0.3" - -[[deps.MPSKit]] -deps = ["Accessors", "BlockTensorKit", "Compat", "DocStringExtensions", "HalfIntegers", "KrylovKit", "LinearAlgebra", "LoggingExtras", "OhMyThreads", "OptimKit", "Printf", "Random", "RecipesBase", "TensorKit", "TensorKitManifolds", "TensorOperations", "VectorInterface"] -git-tree-sha1 = "588bef90e9672431efda1b686e8d477b621b2118" -uuid = "bb1c41ca-d63c-52ed-829e-0820dda26502" -version = "0.12.6" - -[[deps.MPSKitModels]] -deps = ["LinearAlgebra", "MPSKit", "MacroTools", "PrecompileTools", "TensorKit", "TensorOperations", "TupleTools"] -git-tree-sha1 = "d658f13d6b1c08304344faede50bebcc4f574b6f" -uuid = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" -version = "0.4.0" - -[[deps.MacroTools]] -git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.15" - -[[deps.Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -version = "1.11.0" - -[[deps.NaNMath]] -deps = ["OpenLibm_jll"] -git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.1.3" - -[[deps.OhMyThreads]] -deps = ["BangBang", "ChunkSplitters", "StableTasks", "TaskLocalValues"] -git-tree-sha1 = "5f81bdb937fd857bac9548fa8ab9390a06864bb5" -uuid = "67456a42-1dca-4109-a031-0a68de7e3ad5" -version = "0.7.0" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.27+1" - -[[deps.OpenLibm_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+4" - -[[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.6+0" - -[[deps.OptimKit]] -deps = ["LinearAlgebra", "Printf", "ScopedValues", "VectorInterface"] -git-tree-sha1 = "b0163ac202bc03aeb15f0e55002e544e74965534" -uuid = "77e91f04-9b3b-57a6-a776-40b61faaebe0" -version = "0.4.0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.8.0" - -[[deps.PEPSKit]] -deps = ["Accessors", "ChainRulesCore", "Compat", "FiniteDifferences", "KrylovKit", "LinearAlgebra", "LoggingExtras", "MPSKit", "MPSKitModels", "OhMyThreads", "OptimKit", "Printf", "Random", "Statistics", "TensorKit", "TensorOperations", "VectorInterface", "Zygote"] -git-tree-sha1 = "12c42d39d9c67070d5783cbd7ebb54ab957c6a09" -uuid = "52969e89-939e-4361-9b68-9bc7cde4bdeb" -version = "0.5.0" - -[[deps.PackageExtensionCompat]] -git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" -uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" -version = "1.0.2" -weakdeps = ["Requires", "TOML"] - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.2.1" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.3" - -[[deps.Primes]] -deps = ["IntegerMathUtils"] -git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" -uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" -version = "0.5.7" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -version = "1.11.0" - -[[deps.PtrArrays]] -git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" -uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" -version = "1.3.0" - -[[deps.Random]] -deps = ["SHA"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -version = "1.11.0" - -[[deps.RationalRoots]] -git-tree-sha1 = "e5f5db699187a4810fda9181b34250deeedafd81" -uuid = "308eb6b3-cc68-5ff3-9e97-c3c4da4fa681" -version = "0.2.1" - -[[deps.RealDot]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" -uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" -version = "0.1.0" - -[[deps.RecipesBase]] -deps = ["PrecompileTools"] -git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.3.4" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.1" - -[[deps.Richardson]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "48f038bfd83344065434089c2a79417f38715c41" -uuid = "708f8203-808e-40c0-ba2d-98a6953ed40d" -version = "1.4.2" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.ScopedValues]] -deps = ["HashArrayMappedTries", "Logging"] -git-tree-sha1 = "1147f140b4c8ddab224c94efa9569fc23d63ab44" -uuid = "7e506255-f358-4e82-b7e4-beb19740aa63" -version = "1.3.0" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -version = "1.11.0" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -version = "1.11.0" - -[[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.11.0" - -[[deps.SparseInverseSubset]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "52962839426b75b3021296f7df242e40ecfc0852" -uuid = "dc90abb0-5640-4711-901d-7e5b23a2fada" -version = "0.1.2" - -[[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "64cca0c26b4f31ba18f13f6c12af7c85f478cfde" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.5.0" -weakdeps = ["ChainRulesCore"] - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" - -[[deps.StableTasks]] -git-tree-sha1 = "c4f6610f85cb965bee5bfafa64cbeeda55a4e0b2" -uuid = "91464d47-22a1-43fe-8b7f-2d57ee82463f" -version = "0.1.7" - -[[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "0feb6b9031bd5c51f9072393eb5ab3efd31bf9e4" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.13" -weakdeps = ["ChainRulesCore", "Statistics"] - - [deps.StaticArrays.extensions] - StaticArraysChainRulesCoreExt = "ChainRulesCore" - StaticArraysStatisticsExt = "Statistics" - -[[deps.StaticArraysCore]] -git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" -uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.3" - -[[deps.Statistics]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.Statistics.extensions] - SparseArraysExt = ["SparseArrays"] - -[[deps.Strided]] -deps = ["LinearAlgebra", "StridedViews", "TupleTools"] -git-tree-sha1 = "4a1128f5237b5d0170d934a2eb4fa7a273639c9f" -uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" -version = "2.3.0" - -[[deps.StridedViews]] -deps = ["LinearAlgebra", "PackageExtensionCompat"] -git-tree-sha1 = "425158c52aa58d42593be6861befadf8b2541e9b" -uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" -version = "0.4.1" - - [deps.StridedViews.extensions] - StridedViewsCUDAExt = "CUDA" - StridedViewsPtrArraysExt = "PtrArrays" - - [deps.StridedViews.weakdeps] - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - PtrArrays = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" - -[[deps.StructArrays]] -deps = ["ConstructionBase", "DataAPI", "Tables"] -git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" -uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" -version = "0.7.1" - - [deps.StructArrays.extensions] - StructArraysAdaptExt = "Adapt" - StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"] - StructArraysLinearAlgebraExt = "LinearAlgebra" - StructArraysSparseArraysExt = "SparseArrays" - StructArraysStaticArraysExt = "StaticArrays" - - [deps.StructArrays.weakdeps] - Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" - GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" - KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.SuiteSparse]] -deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] -uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" - -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.7.0+0" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[deps.TableTraits]] -deps = ["IteratorInterfaceExtensions"] -git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" -uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" -version = "1.0.1" - -[[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" -uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.12.0" - -[[deps.TaskLocalValues]] -git-tree-sha1 = "d155450e6dff2a8bc2fcb81dcb194bd98b0aeb46" -uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" -version = "0.1.2" - -[[deps.TensorKit]] -deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "Random", "SparseArrays", "Strided", "TensorKitSectors", "TensorOperations", "TupleTools", "VectorInterface"] -git-tree-sha1 = "4a09ea843d18b7256f710f1188414433dcf0b7db" -uuid = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" -version = "0.14.5" -weakdeps = ["ChainRulesCore", "FiniteDifferences"] - - [deps.TensorKit.extensions] - TensorKitChainRulesCoreExt = "ChainRulesCore" - TensorKitFiniteDifferencesExt = "FiniteDifferences" - -[[deps.TensorKitManifolds]] -deps = ["LinearAlgebra", "TensorKit"] -git-tree-sha1 = "94530ac4691795834e2efacb2d31d37571dad52f" -uuid = "11fa318c-39cb-4a83-b1ed-cdc7ba1e3684" -version = "0.7.2" - -[[deps.TensorKitSectors]] -deps = ["HalfIntegers", "LinearAlgebra", "TensorOperations", "WignerSymbols"] -git-tree-sha1 = "fd15110964416b3ac3e7d1d212b0260e4629e536" -uuid = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f" -version = "0.1.4" - -[[deps.TensorOperations]] -deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Preferences", "PtrArrays", "Strided", "StridedViews", "TupleTools", "VectorInterface"] -git-tree-sha1 = "c7458aad3d855e892e2cae208a793a5fceee2406" -uuid = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" -version = "5.2.0" - - [deps.TensorOperations.extensions] - TensorOperationsBumperExt = "Bumper" - TensorOperationsChainRulesCoreExt = "ChainRulesCore" - TensorOperationscuTENSORExt = ["cuTENSOR", "CUDA"] - - [deps.TensorOperations.weakdeps] - Bumper = "8ce10254-0962-460f-a3d8-1f77fea1446e" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1" - -[[deps.TupleTools]] -git-tree-sha1 = "41e43b9dc950775eac654b9f845c839cd2f1821e" -uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" -version = "1.6.0" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -version = "1.11.0" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -version = "1.11.0" - -[[deps.VectorInterface]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9166406dedd38c111a6574e9814be83d267f8aec" -uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8" -version = "0.5.0" - -[[deps.WignerSymbols]] -deps = ["HalfIntegers", "LRUCache", "Primes", "RationalRoots"] -git-tree-sha1 = "960e5f708871c1d9a28a7f1dbcaf4e0ee34ee960" -uuid = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" -version = "2.0.0" - -[[deps.Zygote]] -deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] -git-tree-sha1 = "207d714f3514b0d564e3a08f9e9f753bf6566c2d" -uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" -version = "0.7.6" - - [deps.Zygote.extensions] - ZygoteAtomExt = "Atom" - ZygoteColorsExt = "Colors" - ZygoteDistancesExt = "Distances" - ZygoteTrackerExt = "Tracker" - - [deps.Zygote.weakdeps] - Atom = "c52e3926-4ff0-5f6e-af25-54175e0327b1" - Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" - Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.ZygoteRules]] -deps = ["ChainRulesCore", "MacroTools"] -git-tree-sha1 = "434b3de333c75fc446aa0d19fc394edafd07ab08" -uuid = "700de1a5-db45-46bc-99cf-38207098b444" -version = "0.2.7" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.11.0+0" -""" - -# ╔═╡ Cell order: -# ╟─ff6fa2f1-841d-42c6-acd9-b5f4cf6b7c76 -# ╟─d806d7b2-f25b-48d0-87e7-48acfbc93678 -# ╠═0c1fc02f-fd78-47d3-82c2-1c261472f61e -# ╠═ba0e9dc8-1641-4c85-896d-2d335094ecc2 -# ╟─d463e7d9-499f-4689-bf04-260cef0af6ce -# ╠═7da39574-7c05-492e-abf9-10b9e8f1dda9 -# ╠═d42f7ddd-eb20-4441-b7e7-38b1d4996084 -# ╠═758d7f1a-b62f-400d-bf71-25410a7ce9c5 -# ╠═945f9d02-322b-47f0-85b2-f229e4d8c4d9 -# ╠═f87c548e-a8ff-4b21-b9a0-5ae06c1b7adb -# ╠═b40e0dbd-7136-4211-863d-3f489606a86c -# ╟─2e7b56ff-df31-48a3-91e9-a621bb545baa -# ╠═1f6330da-b1f5-4472-80f2-b19ff3c09e36 -# ╟─4f800808-aa72-46e3-ad6e-13c9852d8cd1 -# ╠═ec9157cb-2402-487d-a394-f237a9b8e056 -# ╟─d52a7418-6f4e-4ed3-80c8-a2b8f60fe664 -# ╠═0d6e6de5-2f75-466a-8367-a9d802897c6e -# ╟─65057067-de67-44ce-9882-c08101ebee6b -# ╠═17deff8d-2f8f-4ce0-9bb6-d2b91b1c26a0 -# ╟─a60fd81d-a540-496f-9507-7e155aa83f86 -# ╠═c6af4fba-0b13-4c8c-971b-8955a34d16ae -# ╟─1ba303c2-bd63-45c3-afcf-899f0660d363 -# ╠═5aad67ec-7880-4688-ba2c-c567a0236a8a -# ╠═d74c45d4-31af-4e0a-8401-7e0003f90d99 -# ╟─c8aa2838-8d6d-44b3-9c2a-302ab42aa1f9 -# ╠═4c55e732-88e4-4327-9e43-ac40abd6bb63 -# ╠═72a1eb41-30f2-4844-a934-eede6c3daf83 -# ╠═cd246b3e-3172-4f22-ad67-9d3d5a5c0464 -# ╟─9647daa9-c730-4185-bd11-6a54a0ded025 -# ╠═c467848b-20ff-454e-b15b-00345ce6f29c -# ╠═c7edf6a8-f743-47dc-bba4-bd9522bb6664 -# ╠═96b429c0-25fe-411d-a016-7677819357af -# ╠═33174988-02f2-487f-a635-e40d35c120af -# ╟─d57df214-05c1-428a-a45b-2876a582fb4f -# ╠═7d743eb9-7969-486c-8d3b-f9b7cc78ba67 -# ╠═e1e3388e-4e0d-44ed-a7e0-1b04627406f1 -# ╠═65b8dd1c-e09c-450b-8fa6-9718de1d79da -# ╠═e032acf0-06dd-4b32-b41f-ea007aa07dfb -# ╠═585f04e3-b2ad-441b-aef8-f5e46e351335 -# ╠═b62b44a2-8fb1-4d72-9657-ab68b91c5171 -# ╟─72f3e01f-f2d7-4e1f-8241-331b3f0d8789 -# ╠═8d31b900-5841-4979-b2db-0abbadcc347c -# ╟─06a32163-887e-4eb5-960c-e153735f5f59 -# ╠═ff85c322-f16c-41e2-823a-95f194e6ad72 -# ╟─00000000-0000-0000-0000-000000000001 -# ╟─00000000-0000-0000-0000-000000000002 diff --git a/examples/1.heisenberg/main.jl b/examples/1.heisenberg/main.jl new file mode 100644 index 000000000..796bc25d3 --- /dev/null +++ b/examples/1.heisenberg/main.jl @@ -0,0 +1,185 @@ +using Markdown +md""" +# [Optimizing the 2D Heisenberg model](@id examples_heisenberg) + +In this example we want to provide a basic rundown of PEPSKit's optimization workflow for +PEPS. To that end, we will consider the two-dimensional Heisenberg model on a square lattice + +```math +H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j +``` + +Here, we want to set $J_x=J_y=J_z=1$ where the Heisenberg model is in the antiferromagnetic +regime. Due to the bipartite sublattice structure of antiferromagnetic order one needs a +PEPS ansatz with a $2 \times 2$ unit cell. This can be circumvented by performing a unitary +sublattice rotation on all B-sites resulting in a change of parameters to +$(J_x, J_y, J_z)=(-1, 1, -1)$. This gives us a unitarily equivalent Hamiltonian (with the +same spectrum) with a ground state on a single-site unit cell. + +Let us get started by fixing the random seed of this example to make it deterministic: +""" + +using Random +Random.seed!(123456789); + +md""" +We're going to need only two packages: `TensorKit`, since we use that for all the underlying +tensor operations, and `PEPSKit` itself. So let us import these: +""" + +using TensorKit, PEPSKit + +md""" +## Defining the Heisenberg Hamiltonian + +To create the sublattice rotated Heisenberg Hamiltonian on an infinite square lattice, we use +the `heisenberg_XYZ` method from [MPSKitModels](https://quantumkithub.github.io/MPSKitModels.jl/dev/) +which is redefined for the `InfiniteSquare` and reexported in PEPSKit: +""" + +H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1) + +md""" +## Setting up the algorithms and initial guesses + +Next, we set the simulation parameters. During optimization, the PEPS will be contracted +using CTMRG and the PEPS gradient will be computed by differentiating through the CTMRG +routine using AD. Since the algorithmic stack that implements this is rather elaborate, +the amount of settings one can configure is also quite large. To reduce this complexity, +PEPSKit defaults to (presumably) reasonable settings which also dynamically adapts to the +user-specified parameters. + +First, we set the bond dimension `Dbond` of the virtual PEPS indices and the environment +dimension `χenv` of the virtual corner and transfer matrix indices. +""" + +Dbond = 2 +χenv = 16; + +md""" +To configure the CTMRG algorithm, we create a `NamedTuple` containing different keyword +arguments. To see a description of all arguments, see the docstring of +[`leading_boundary`](@ref). Here, we want to converge the CTMRG environments up to a +specific tolerance and during the CTMRG run keep all index dimensions fixed: +""" + +boundary_alg = (; tol=1e-10, trscheme=(; alg=:fixedspace)); + +md""" +Let us also configure the optimizer algorithm. We are going to optimize the PEPS using the +L-BFGS optimizer from [OptimKit](https://github.com/Jutho/OptimKit.jl). Again, we specify +the convergence tolerance (for the gradient norm) as well as the maximal number of iterations +and the BFGS memory size (which is used to approximate the Hessian): +""" + +optimizer_alg = (; alg=:lbfgs, tol=1e-4, maxiter=100, lbfgs_memory=16); + +md""" +Additionally, during optimization, we want to reuse the previous CTMRG environment to +initialize the CTMRG run of the current optimization step using the `reuse_env` argument. +And to control the output information, we set the `verbosity`: +""" + +reuse_env = true +verbosity = 1; + +md""" +Next, we initialize a random PEPS which will be used as an initial guess for the +optimization. To get a PEPS with physical dimension 2 (since we have a spin-1/2 Hamiltonian) +with complex-valued random Gaussian entries, we set: +""" + +peps₀ = InfinitePEPS(randn, ComplexF64, 2, Dbond) + +md""" +The last thing we need before we can start the optimization is an initial CTMRG environment. +Typically, a random environment which we converge on `peps₀` serves as a good starting point. +To contract a PEPS starting from an environment using CTMRG, we call [`leading_boundary`](@ref): +""" + +env_random = CTMRGEnv(randn, ComplexF64, peps₀, ℂ^χenv); +env₀, info_ctmrg = leading_boundary(env_random, peps₀; boundary_alg...); + +md""" +Besides the converged environment, `leading_boundary` also returns a `NamedTuple` of +informational quantities such as the last (maximal) SVD truncation error: +""" + +@show info_ctmrg.truncation_error; + +md""" +## Ground state search + +Finally, we can start the optimization by calling [`fixedpoint`](@ref) on `H` with our +settings for the boundary (CTMRG) algorithm and the optimizer. This might take a while +(especially the precompilation of AD code in this case): +""" + +peps, env, E, info_opt = fixedpoint( + H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity +); + +md""" +Note that `fixedpoint` returns the final optimized PEPS, the last converged environment, +the final energy estimate as well as a `NamedTuple` of diagnostics. This allows us to, e.g., +analyze the number of cost function calls or the history of gradient norms to evaluate +the convergence rate: +""" + +@show info_opt.fg_evaluations info_opt.gradnorms[1:10:end]; + +md""" +Let's now compare the optimized energy against an accurate Quantum Monte Carlo estimate by +[Sandvik](@cite sandvik_computational_2011), where the energy per site was found to be +$E_{\text{ref}}=−0.6694421$. From our simple optimization we find: +""" + +@show E; + +md""" +While this energy is in the right ballpark, there is still quite some deviation from the +accurate reference energy. This, however, can be attributed to the small bond dimension - an +optimization with larger bond dimension would approach this value much more closely. + +A more reasonable comparison would be against another finite bond dimension PEPS simulation. +For example, Juraj Hasik's data from $J_1\text{-}J_2$ +[PEPS simulations](https://github.com/jurajHasik/j1j2_ipeps_states/blob/main/single-site_pg-C4v-A1/j20.0/state_1s_A1_j20.0_D2_chi_opt48.dat) +yields $E_{D=2,\chi=16}=-0.660231\dots$ which is more in line with what we find here. + +## Compute the correlation lengths and transfer matrix spectra + +In practice, in order to obtain an accurate and variational energy estimate, one would need +to compute multiple energies at different environment dimensions and extrapolate in, e.g., +the correlation length or the second gap of the transfer matrix spectrum. For that, we would +need the [`correlation_length`](@ref) function, which computes the horizontal and vertical +correlation lengths and transfer matrix spectra for all unit cell coordinates: +""" + +ξ_h, ξ_v, λ_h, λ_v = correlation_length(peps, env) +@show ξ_h ξ_v; + +md""" +## Computing observables + +As a last thing, we want to see how we can compute expectation values of observables, given +the optimized PEPS and its CTMRG environment. To compute, e.g., the magnetization, we first +need to define the observable as a `TensorMap`: +""" + +σ_z = TensorMap([1.0 0.0; 0.0 -1.0], ℂ^2, ℂ^2) + +md""" +In order to be able to contract it with the PEPS and environment, we define need to define a +`LocalOperator` and specify on which physical spaces and sites the observable acts. That way, +the PEPS-environment-operator contraction gets automatically generated (also works for +multi-site operators!). See the [`LocalOperator`](@ref) docstring for more details. +The magnetization is just a single-site observable, so we have: +""" + +M = LocalOperator(fill(ℂ^2, 1, 1), (CartesianIndex(1, 1),) => σ_z) + +md""" +Finally, to evaluate the expecation value on the `LocalOperator`, we call: +""" + +@show expectation_value(peps, M, env); diff --git a/examples/2.boundary_mps/boundary_mps.jl b/examples/2.boundary_mps/boundary_mps.jl deleted file mode 100644 index 86a25991e..000000000 --- a/examples/2.boundary_mps/boundary_mps.jl +++ /dev/null @@ -1,968 +0,0 @@ -### A Pluto.jl notebook ### -# v0.20.5 - -using Markdown -using InteractiveUtils - -# ╔═╡ ba89666b-25ff-432c-a661-7fb4a111f075 -using Random - -# ╔═╡ b859e9b7-2573-47cb-b626-bf6515d74a02 -using TensorKit, PEPSKit, MPSKit - -# ╔═╡ a225cdc1-5a75-4e61-af51-226e05fc1243 -md""" -# Boundary MPS contractions using VUMPS and PEPOs - -Instead of using CTMRG to contract an infinite PEPS, one can also use an boundary MPSs ansatz to contract the infinite network. In particular, we will here use VUMPS to do so. - -Before we start, we'll fix the random seed for reproducability: -""" - -# ╔═╡ 687f9c44-3c79-4bef-9ab3-647c4cdc866f -Random.seed!(29384293742893); - -# ╔═╡ d211a23c-9bf6-4d9d-b0ff-386d6c9e38f4 -md""" -Besides `TensorKit` and `PEPSKit`, we here also need [`MPSKit`](https://quantumkithub.github.io/MPSKit.jl/stable/) which implements the VUMPS algorithm as well as the required MPS operations: -""" - -# ╔═╡ db11c7b7-0a45-43ba-8d50-66e7fb616145 -md""" -## Computing a PEPS norm - -We start by initializing a random initial infinite PEPS: -""" - -# ╔═╡ de769e61-4e2e-4954-8d26-33b5078a6a4c -peps₀ = InfinitePEPS(ComplexSpace(2), ComplexSpace(2)); - -# ╔═╡ 8a517a82-a63a-4ef6-95bc-0603163f05b7 -md""" -To compute its norm, we need to construct the transfer operator corresponding to -the partition function representing the overlap ``\langle \psi_\text{PEPS} | \psi_\text{PEPS} \rangle``: -""" - -# ╔═╡ 42a6c723-268f-4c21-97c3-77887ef0504e -transfer = InfiniteTransferPEPS(peps₀, 1, 1); - -# ╔═╡ bdf74a84-d072-4275-9214-75aa650028c2 -md""" -We then find its leading boundary MPS fixed point, where the corresponding eigenvalue encodes the norm of the state. To that end, let us first we build an initial guess for the boundary MPS, choosing a bond dimension of 20: -""" - -# ╔═╡ 079e54e7-e68d-4e77-b3a7-a61dce3311ed -mps₀ = initializeMPS(transfer, [ComplexSpace(20)]); - -# ╔═╡ bc347368-d374-4ab2-bfdd-90e8084f3aec -md""" -Note that this will just construct a MPS with random Gaussian entries based on the virtual spaces of the supplied transfer operator. Of course, one might come up with a better initial guess (leading to better convergence) depending on the application. To find the leading boundary MPS fixed point, we call `leading_boundary` using the VUMPS algorithm from MPSKit: -""" - -# ╔═╡ a01f3061-e9d8-42b9-ba7c-876d7fa084fe -mps, env, ϵ = leading_boundary(mps₀, transfer, VUMPS(; verbosity=2)); - -# ╔═╡ 608035ff-4eb1-42f5-8cf7-b39f2f38f36f -md""" -The norm of the state per unit cell is then given by the expectation value ``\langle \psi_\text{MPS} | \mathbb{T} | \psi_\text{MPS} \rangle``: -""" - -# ╔═╡ 8b61ea7b-403a-45f0-9735-379c9d9e53ac -norm_vumps = abs(prod(expectation_value(mps, transfer))); - -# ╔═╡ fc489a1d-f986-4040-b83d-112db70d5476 -md""" -This can be compared to the result obtained using CTMRG, where we see that the results match: -""" - -# ╔═╡ 94705e00-6ca3-459e-bde5-7e314d99c9e8 -env_ctmrg, = leading_boundary(CTMRGEnv(peps₀, ComplexSpace(20)), peps₀; verbosity=2); - -# ╔═╡ 049d7f58-f0ec-451a-b9b5-626fbba42a05 -norm_ctmrg = abs(norm(peps₀, env_ctmrg)); - -# ╔═╡ 74952677-a067-4e33-a3e2-388daaac0f14 -@show abs(norm_vumps - norm_ctmrg) / norm_vumps - -# ╔═╡ 797daa20-4167-4e36-a3e8-591596e22cfa -md""" -## Working with unit cells - -For PEPS with non-trivial unit cells, the principle is exactly the same. The only difference is that now the transfer operator of the PEPS norm partition function has multiple lines, each of which can be represented by an `InfiniteTransferPEPS` object. Such a multi-line transfer operator is represented by a `MultilineTransferPEPS` object. In this case, the boundary MPS is an `MultilineMPS` object, which should be initialized by specifying a virtual space for each site in the partition function unit cell. - -First, we construct a PEPS with a ``2 \times 2`` unit cell using the `unitcell` keyword argument and then define the corresponding transfer PEPS: -""" - -# ╔═╡ dfcfa6c5-db10-4a70-bf37-ef82ce819263 -peps₀_2x2 = InfinitePEPS(ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2)); - -# ╔═╡ 1b98d6e0-ed32-4aeb-ac04-19a048df2e0b -transfer_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1); - -# ╔═╡ b9d95f67-dc4a-43db-aa13-80e49060b306 -md""" -Now, the procedure is the same as before: We compute the norm once using VUMPS, once using CTMRG and then compare. -""" - -# ╔═╡ 1ea74726-b2b5-4519-9768-b1be95aee454 -begin - mps₀_2x2 = initializeMPS(transfer_2x2, fill(ComplexSpace(20), 2, 2)) - mps_2x2, = leading_boundary(mps₀_2x2, transfer_2x2, VUMPS(; verbosity=2)) - norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, transfer_2x2))) - - env_ctmrg_2x2, = leading_boundary( - CTMRGEnv(peps₀_2x2, ComplexSpace(20)), peps₀_2x2; verbosity=2 - ) - norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2)) - - @show abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps -end - -# ╔═╡ eb529a9d-0d31-4c50-8a1d-135c94dccb35 -md""" -Again, the results are compatible. Note that for larger unit cells and non-Hermitian PEPS the VUMPS algorithm may become unstable, in which case the CTMRG algorithm is recommended. - -## Contracting PEPO overlaps - -Using exactly the same machinery, we can contract partition functions which encode the expectation value of a PEPO for a given PEPS state. As an example, we can consider the overlap of the PEPO correponding to the partition function of 3D classical Ising model with our random PEPS from before and evaluate the overlap ``\langle \psi_\text{PEPS} | O_\text{PEPO} | \psi_\text{PEPS} \rangle``. - -The classical Ising PEPO is defined as follows: -""" - -# ╔═╡ ba5a3c16-cd8a-4f49-9af4-d2bcea0c7fc5 -function ising_pepo(β; unitcell=(1, 1, 1)) - t = ComplexF64[exp(β) exp(-β); exp(-β) exp(β)] - q = sqrt(t) - - O = zeros(2, 2, 2, 2, 2, 2) - O[1, 1, 1, 1, 1, 1] = 1 - O[2, 2, 2, 2, 2, 2] = 1 - @tensor o[-1 -2; -3 -4 -5 -6] := - O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] - O = TensorMap(o, ℂ^2 ⊗ (ℂ^2)' ← ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)') - - return InfinitePEPO(O; unitcell) -end; - -# ╔═╡ 4ce07126-926d-4698-823c-25c36ff9f6eb -md""" -To evaluate the overlap, we instantiate the PEPO and the corresponding `InfiniteTransferPEPO` in the right direction, on the right row of the partition function (trivial here): -""" - -# ╔═╡ cae6ce02-fd27-4ae3-bb0c-4bb53f48ca38 -pepo = ising_pepo(1); - -# ╔═╡ 63083f5c-1881-4577-a5c0-a5db4778832a -transfer_pepo = InfiniteTransferPEPO(peps₀, pepo, 1, 1); - -# ╔═╡ 2e21289d-9347-4b0c-80ef-18c02e5cbba8 -md""" -As before, we converge the boundary MPS using VUMPS and then compute the expectation value: -""" - -# ╔═╡ 9e632086-1913-11f0-0b0c-3344cc3a50e4 -begin - mps₀_pepo = initializeMPS(transfer_pepo, [ComplexSpace(20)]) - mps_pepo, = leading_boundary(mps₀_pepo, transfer_pepo, VUMPS(; verbosity=2)) - @show abs(prod(expectation_value(mps_pepo, transfer_pepo))) -end - -# ╔═╡ adae68cb-1d76-430f-b5b5-3bdf5834823f -md""" -These objects and routines can be used to optimize PEPS fixed points of 3D partition functions, see for example [Vanderstraeten et al.](@cite vanderstraeten_residual_2018) -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000001 -PLUTO_PROJECT_TOML_CONTENTS = """ -[deps] -MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502" -PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" -Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" - -[compat] -MPSKit = "~0.12.6" -PEPSKit = "~0.5.0" -TensorKit = "~0.14.5" -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000002 -PLUTO_MANIFEST_TOML_CONTENTS = """ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.11.4" -manifest_format = "2.0" -project_hash = "c70e6e86b5621a8e0ee82a182ffe7c3e8712cf1e" - -[[deps.AbstractFFTs]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" -uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" -version = "1.5.0" - - [deps.AbstractFFTs.extensions] - AbstractFFTsChainRulesCoreExt = "ChainRulesCore" - AbstractFFTsTestExt = "Test" - - [deps.AbstractFFTs.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] -git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" -uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" -version = "0.1.42" - - [deps.Accessors.extensions] - AxisKeysExt = "AxisKeys" - IntervalSetsExt = "IntervalSets" - LinearAlgebraExt = "LinearAlgebra" - StaticArraysExt = "StaticArrays" - StructArraysExt = "StructArrays" - TestExt = "Test" - UnitfulExt = "Unitful" - - [deps.Accessors.weakdeps] - AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - -[[deps.Adapt]] -deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" -uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.3.0" -weakdeps = ["SparseArrays", "StaticArrays"] - - [deps.Adapt.extensions] - AdaptSparseArraysExt = "SparseArrays" - AdaptStaticArraysExt = "StaticArrays" - -[[deps.ArrayLayouts]] -deps = ["FillArrays", "LinearAlgebra"] -git-tree-sha1 = "4e25216b8fea1908a0ce0f5d87368587899f75be" -uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.ArrayLayouts.extensions] - ArrayLayoutsSparseArraysExt = "SparseArrays" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -version = "1.11.0" - -[[deps.BangBang]] -deps = ["Accessors", "ConstructionBase", "InitialValues", "LinearAlgebra"] -git-tree-sha1 = "26f41e1df02c330c4fa1e98d4aa2168fdafc9b1f" -uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" -version = "0.4.4" - - [deps.BangBang.extensions] - BangBangChainRulesCoreExt = "ChainRulesCore" - BangBangDataFramesExt = "DataFrames" - BangBangStaticArraysExt = "StaticArrays" - BangBangStructArraysExt = "StructArrays" - BangBangTablesExt = "Tables" - BangBangTypedTablesExt = "TypedTables" - - [deps.BangBang.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" - TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -version = "1.11.0" - -[[deps.BlockArrays]] -deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "df1746706459aa184ed3424b240a917b89d67b60" -uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -version = "1.6.1" - - [deps.BlockArrays.extensions] - BlockArraysAdaptExt = "Adapt" - BlockArraysBandedMatricesExt = "BandedMatrices" - - [deps.BlockArrays.weakdeps] - Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - -[[deps.BlockTensorKit]] -deps = ["BlockArrays", "Compat", "LinearAlgebra", "Random", "Strided", "TensorKit", "TensorOperations", "TupleTools", "VectorInterface"] -git-tree-sha1 = "e0d455f2998aca33747def4f384c1aff5e3278de" -uuid = "5f87ffc2-9cf1-4a46-8172-465d160bd8cd" -version = "0.1.6" - -[[deps.ChainRules]] -deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "SparseInverseSubset", "Statistics", "StructArrays", "SuiteSparse"] -git-tree-sha1 = "a975ae558af61a2a48720a6271661bf2621e0f4e" -uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" -version = "1.72.3" - -[[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "1713c74e00545bfe14605d2a2be1712de8fbcb58" -uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.25.1" -weakdeps = ["SparseArrays"] - - [deps.ChainRulesCore.extensions] - ChainRulesCoreSparseArraysExt = "SparseArrays" - -[[deps.ChunkSplitters]] -git-tree-sha1 = "63a3903063d035260f0f6eab00f517471c5dc784" -uuid = "ae650224-84b6-46f8-82ea-d812ca08434e" -version = "3.1.2" - -[[deps.CommonSubexpressions]] -deps = ["MacroTools"] -git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" -uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.1" - -[[deps.Compat]] -deps = ["TOML", "UUIDs"] -git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.16.0" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.1.1+0" - -[[deps.CompositionsBase]] -git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" -uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" -version = "0.1.2" -weakdeps = ["InverseFunctions"] - - [deps.CompositionsBase.extensions] - CompositionsBaseInverseFunctionsExt = "InverseFunctions" - -[[deps.ConstructionBase]] -git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" -uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.8" - - [deps.ConstructionBase.extensions] - ConstructionBaseIntervalSetsExt = "IntervalSets" - ConstructionBaseLinearAlgebraExt = "LinearAlgebra" - ConstructionBaseStaticArraysExt = "StaticArrays" - - [deps.ConstructionBase.weakdeps] - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.DataAPI]] -git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" -uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.16.0" - -[[deps.DataValueInterfaces]] -git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" -uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" -version = "1.0.0" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -version = "1.11.0" - -[[deps.DiffResults]] -deps = ["StaticArraysCore"] -git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" -uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" -version = "1.1.0" - -[[deps.DiffRules]] -deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] -git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" -uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.15.1" - -[[deps.Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" -version = "1.11.0" - -[[deps.DocStringExtensions]] -git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.4" - -[[deps.FillArrays]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" -uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.13.0" - - [deps.FillArrays.extensions] - FillArraysPDMatsExt = "PDMats" - FillArraysSparseArraysExt = "SparseArrays" - FillArraysStatisticsExt = "Statistics" - - [deps.FillArrays.weakdeps] - PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[deps.FiniteDifferences]] -deps = ["ChainRulesCore", "LinearAlgebra", "Printf", "Random", "Richardson", "SparseArrays", "StaticArrays"] -git-tree-sha1 = "06d76c780d657729cf20821fb5832c6cc4dfd0b5" -uuid = "26cc04aa-876d-5657-8c51-4c34ba976000" -version = "0.12.32" - -[[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" -uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "1.0.1" -weakdeps = ["StaticArrays"] - - [deps.ForwardDiff.extensions] - ForwardDiffStaticArraysExt = "StaticArrays" - -[[deps.GPUArraysCore]] -deps = ["Adapt"] -git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" -uuid = "46192b85-c4d5-4398-a991-12ede77f4527" -version = "0.2.0" - -[[deps.HalfIntegers]] -git-tree-sha1 = "9c3149243abb5bc0bad0431d6c4fcac0f4443c7c" -uuid = "f0d1745a-41c9-11e9-1dd9-e5d34d218721" -version = "1.6.0" - -[[deps.HashArrayMappedTries]] -git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae" -uuid = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" -version = "0.2.0" - -[[deps.IRTools]] -deps = ["InteractiveUtils", "MacroTools"] -git-tree-sha1 = "950c3717af761bc3ff906c2e8e52bd83390b6ec2" -uuid = "7869d1d1-7146-5819-86e3-90919afe41df" -version = "0.4.14" - -[[deps.InitialValues]] -git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" -uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" -version = "0.3.1" - -[[deps.IntegerMathUtils]] -git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" -uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" -version = "0.1.2" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -version = "1.11.0" - -[[deps.InverseFunctions]] -git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" -uuid = "3587e190-3f89-42d0-90ee-14403ec27112" -version = "0.1.17" - - [deps.InverseFunctions.extensions] - InverseFunctionsDatesExt = "Dates" - InverseFunctionsTestExt = "Test" - - [deps.InverseFunctions.weakdeps] - Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.IrrationalConstants]] -git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" -uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.4" - -[[deps.IteratorInterfaceExtensions]] -git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" -uuid = "82899510-4779-5014-852e-03e436cf321d" -version = "1.0.0" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.7.0" - -[[deps.KrylovKit]] -deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"] -git-tree-sha1 = "38477816f8db29956ea591feb3086d9edabf6f38" -uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" -version = "0.9.5" -weakdeps = ["ChainRulesCore"] - - [deps.KrylovKit.extensions] - KrylovKitChainRulesCoreExt = "ChainRulesCore" - -[[deps.LRUCache]] -git-tree-sha1 = "5519b95a490ff5fe629c4a7aa3b3dfc9160498b3" -uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" -version = "1.6.2" -weakdeps = ["Serialization"] - - [deps.LRUCache.extensions] - SerializationExt = ["Serialization"] - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -version = "1.11.0" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.11.0" - -[[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" -uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.29" - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" - - [deps.LogExpFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -version = "1.11.0" - -[[deps.LoggingExtras]] -deps = ["Dates", "Logging"] -git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" -uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.0.3" - -[[deps.MPSKit]] -deps = ["Accessors", "BlockTensorKit", "Compat", "DocStringExtensions", "HalfIntegers", "KrylovKit", "LinearAlgebra", "LoggingExtras", "OhMyThreads", "OptimKit", "Printf", "Random", "RecipesBase", "TensorKit", "TensorKitManifolds", "TensorOperations", "VectorInterface"] -git-tree-sha1 = "588bef90e9672431efda1b686e8d477b621b2118" -uuid = "bb1c41ca-d63c-52ed-829e-0820dda26502" -version = "0.12.6" - -[[deps.MPSKitModels]] -deps = ["LinearAlgebra", "MPSKit", "MacroTools", "PrecompileTools", "TensorKit", "TensorOperations", "TupleTools"] -git-tree-sha1 = "d658f13d6b1c08304344faede50bebcc4f574b6f" -uuid = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" -version = "0.4.0" - -[[deps.MacroTools]] -git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.15" - -[[deps.Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -version = "1.11.0" - -[[deps.NaNMath]] -deps = ["OpenLibm_jll"] -git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.1.3" - -[[deps.OhMyThreads]] -deps = ["BangBang", "ChunkSplitters", "StableTasks", "TaskLocalValues"] -git-tree-sha1 = "5f81bdb937fd857bac9548fa8ab9390a06864bb5" -uuid = "67456a42-1dca-4109-a031-0a68de7e3ad5" -version = "0.7.0" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.27+1" - -[[deps.OpenLibm_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+4" - -[[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.6+0" - -[[deps.OptimKit]] -deps = ["LinearAlgebra", "Printf", "ScopedValues", "VectorInterface"] -git-tree-sha1 = "b0163ac202bc03aeb15f0e55002e544e74965534" -uuid = "77e91f04-9b3b-57a6-a776-40b61faaebe0" -version = "0.4.0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.8.0" - -[[deps.PEPSKit]] -deps = ["Accessors", "ChainRulesCore", "Compat", "FiniteDifferences", "KrylovKit", "LinearAlgebra", "LoggingExtras", "MPSKit", "MPSKitModels", "OhMyThreads", "OptimKit", "Printf", "Random", "Statistics", "TensorKit", "TensorOperations", "VectorInterface", "Zygote"] -git-tree-sha1 = "12c42d39d9c67070d5783cbd7ebb54ab957c6a09" -uuid = "52969e89-939e-4361-9b68-9bc7cde4bdeb" -version = "0.5.0" - -[[deps.PackageExtensionCompat]] -git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" -uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" -version = "1.0.2" -weakdeps = ["Requires", "TOML"] - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.2.1" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.3" - -[[deps.Primes]] -deps = ["IntegerMathUtils"] -git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" -uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" -version = "0.5.7" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -version = "1.11.0" - -[[deps.PtrArrays]] -git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" -uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" -version = "1.3.0" - -[[deps.Random]] -deps = ["SHA"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -version = "1.11.0" - -[[deps.RationalRoots]] -git-tree-sha1 = "e5f5db699187a4810fda9181b34250deeedafd81" -uuid = "308eb6b3-cc68-5ff3-9e97-c3c4da4fa681" -version = "0.2.1" - -[[deps.RealDot]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" -uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" -version = "0.1.0" - -[[deps.RecipesBase]] -deps = ["PrecompileTools"] -git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.3.4" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.1" - -[[deps.Richardson]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "48f038bfd83344065434089c2a79417f38715c41" -uuid = "708f8203-808e-40c0-ba2d-98a6953ed40d" -version = "1.4.2" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.ScopedValues]] -deps = ["HashArrayMappedTries", "Logging"] -git-tree-sha1 = "1147f140b4c8ddab224c94efa9569fc23d63ab44" -uuid = "7e506255-f358-4e82-b7e4-beb19740aa63" -version = "1.3.0" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -version = "1.11.0" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -version = "1.11.0" - -[[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.11.0" - -[[deps.SparseInverseSubset]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "52962839426b75b3021296f7df242e40ecfc0852" -uuid = "dc90abb0-5640-4711-901d-7e5b23a2fada" -version = "0.1.2" - -[[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "64cca0c26b4f31ba18f13f6c12af7c85f478cfde" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.5.0" -weakdeps = ["ChainRulesCore"] - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" - -[[deps.StableTasks]] -git-tree-sha1 = "c4f6610f85cb965bee5bfafa64cbeeda55a4e0b2" -uuid = "91464d47-22a1-43fe-8b7f-2d57ee82463f" -version = "0.1.7" - -[[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "0feb6b9031bd5c51f9072393eb5ab3efd31bf9e4" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.13" -weakdeps = ["ChainRulesCore", "Statistics"] - - [deps.StaticArrays.extensions] - StaticArraysChainRulesCoreExt = "ChainRulesCore" - StaticArraysStatisticsExt = "Statistics" - -[[deps.StaticArraysCore]] -git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" -uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.3" - -[[deps.Statistics]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.Statistics.extensions] - SparseArraysExt = ["SparseArrays"] - -[[deps.Strided]] -deps = ["LinearAlgebra", "StridedViews", "TupleTools"] -git-tree-sha1 = "4a1128f5237b5d0170d934a2eb4fa7a273639c9f" -uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" -version = "2.3.0" - -[[deps.StridedViews]] -deps = ["LinearAlgebra", "PackageExtensionCompat"] -git-tree-sha1 = "425158c52aa58d42593be6861befadf8b2541e9b" -uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" -version = "0.4.1" - - [deps.StridedViews.extensions] - StridedViewsCUDAExt = "CUDA" - StridedViewsPtrArraysExt = "PtrArrays" - - [deps.StridedViews.weakdeps] - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - PtrArrays = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" - -[[deps.StructArrays]] -deps = ["ConstructionBase", "DataAPI", "Tables"] -git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" -uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" -version = "0.7.1" - - [deps.StructArrays.extensions] - StructArraysAdaptExt = "Adapt" - StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"] - StructArraysLinearAlgebraExt = "LinearAlgebra" - StructArraysSparseArraysExt = "SparseArrays" - StructArraysStaticArraysExt = "StaticArrays" - - [deps.StructArrays.weakdeps] - Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" - GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" - KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.SuiteSparse]] -deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] -uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" - -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.7.0+0" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[deps.TableTraits]] -deps = ["IteratorInterfaceExtensions"] -git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" -uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" -version = "1.0.1" - -[[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" -uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.12.0" - -[[deps.TaskLocalValues]] -git-tree-sha1 = "d155450e6dff2a8bc2fcb81dcb194bd98b0aeb46" -uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" -version = "0.1.2" - -[[deps.TensorKit]] -deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "Random", "SparseArrays", "Strided", "TensorKitSectors", "TensorOperations", "TupleTools", "VectorInterface"] -git-tree-sha1 = "4a09ea843d18b7256f710f1188414433dcf0b7db" -uuid = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" -version = "0.14.5" -weakdeps = ["ChainRulesCore", "FiniteDifferences"] - - [deps.TensorKit.extensions] - TensorKitChainRulesCoreExt = "ChainRulesCore" - TensorKitFiniteDifferencesExt = "FiniteDifferences" - -[[deps.TensorKitManifolds]] -deps = ["LinearAlgebra", "TensorKit"] -git-tree-sha1 = "94530ac4691795834e2efacb2d31d37571dad52f" -uuid = "11fa318c-39cb-4a83-b1ed-cdc7ba1e3684" -version = "0.7.2" - -[[deps.TensorKitSectors]] -deps = ["HalfIntegers", "LinearAlgebra", "TensorOperations", "WignerSymbols"] -git-tree-sha1 = "fd15110964416b3ac3e7d1d212b0260e4629e536" -uuid = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f" -version = "0.1.4" - -[[deps.TensorOperations]] -deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Preferences", "PtrArrays", "Strided", "StridedViews", "TupleTools", "VectorInterface"] -git-tree-sha1 = "c7458aad3d855e892e2cae208a793a5fceee2406" -uuid = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" -version = "5.2.0" - - [deps.TensorOperations.extensions] - TensorOperationsBumperExt = "Bumper" - TensorOperationsChainRulesCoreExt = "ChainRulesCore" - TensorOperationscuTENSORExt = ["cuTENSOR", "CUDA"] - - [deps.TensorOperations.weakdeps] - Bumper = "8ce10254-0962-460f-a3d8-1f77fea1446e" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1" - -[[deps.TupleTools]] -git-tree-sha1 = "41e43b9dc950775eac654b9f845c839cd2f1821e" -uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" -version = "1.6.0" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -version = "1.11.0" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -version = "1.11.0" - -[[deps.VectorInterface]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9166406dedd38c111a6574e9814be83d267f8aec" -uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8" -version = "0.5.0" - -[[deps.WignerSymbols]] -deps = ["HalfIntegers", "LRUCache", "Primes", "RationalRoots"] -git-tree-sha1 = "960e5f708871c1d9a28a7f1dbcaf4e0ee34ee960" -uuid = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" -version = "2.0.0" - -[[deps.Zygote]] -deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] -git-tree-sha1 = "207d714f3514b0d564e3a08f9e9f753bf6566c2d" -uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" -version = "0.7.6" - - [deps.Zygote.extensions] - ZygoteAtomExt = "Atom" - ZygoteColorsExt = "Colors" - ZygoteDistancesExt = "Distances" - ZygoteTrackerExt = "Tracker" - - [deps.Zygote.weakdeps] - Atom = "c52e3926-4ff0-5f6e-af25-54175e0327b1" - Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" - Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.ZygoteRules]] -deps = ["ChainRulesCore", "MacroTools"] -git-tree-sha1 = "434b3de333c75fc446aa0d19fc394edafd07ab08" -uuid = "700de1a5-db45-46bc-99cf-38207098b444" -version = "0.2.7" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.11.0+0" -""" - -# ╔═╡ Cell order: -# ╠═a225cdc1-5a75-4e61-af51-226e05fc1243 -# ╠═ba89666b-25ff-432c-a661-7fb4a111f075 -# ╠═687f9c44-3c79-4bef-9ab3-647c4cdc866f -# ╠═d211a23c-9bf6-4d9d-b0ff-386d6c9e38f4 -# ╠═b859e9b7-2573-47cb-b626-bf6515d74a02 -# ╠═db11c7b7-0a45-43ba-8d50-66e7fb616145 -# ╠═de769e61-4e2e-4954-8d26-33b5078a6a4c -# ╠═8a517a82-a63a-4ef6-95bc-0603163f05b7 -# ╠═42a6c723-268f-4c21-97c3-77887ef0504e -# ╠═bdf74a84-d072-4275-9214-75aa650028c2 -# ╠═079e54e7-e68d-4e77-b3a7-a61dce3311ed -# ╠═bc347368-d374-4ab2-bfdd-90e8084f3aec -# ╠═a01f3061-e9d8-42b9-ba7c-876d7fa084fe -# ╠═608035ff-4eb1-42f5-8cf7-b39f2f38f36f -# ╠═8b61ea7b-403a-45f0-9735-379c9d9e53ac -# ╠═fc489a1d-f986-4040-b83d-112db70d5476 -# ╠═94705e00-6ca3-459e-bde5-7e314d99c9e8 -# ╠═049d7f58-f0ec-451a-b9b5-626fbba42a05 -# ╠═74952677-a067-4e33-a3e2-388daaac0f14 -# ╠═797daa20-4167-4e36-a3e8-591596e22cfa -# ╠═dfcfa6c5-db10-4a70-bf37-ef82ce819263 -# ╠═1b98d6e0-ed32-4aeb-ac04-19a048df2e0b -# ╠═b9d95f67-dc4a-43db-aa13-80e49060b306 -# ╠═1ea74726-b2b5-4519-9768-b1be95aee454 -# ╠═eb529a9d-0d31-4c50-8a1d-135c94dccb35 -# ╠═ba5a3c16-cd8a-4f49-9af4-d2bcea0c7fc5 -# ╠═4ce07126-926d-4698-823c-25c36ff9f6eb -# ╠═cae6ce02-fd27-4ae3-bb0c-4bb53f48ca38 -# ╠═63083f5c-1881-4577-a5c0-a5db4778832a -# ╠═2e21289d-9347-4b0c-80ef-18c02e5cbba8 -# ╠═9e632086-1913-11f0-0b0c-3344cc3a50e4 -# ╠═adae68cb-1d76-430f-b5b5-3bdf5834823f -# ╟─00000000-0000-0000-0000-000000000001 -# ╟─00000000-0000-0000-0000-000000000002 diff --git a/examples/2.boundary_mps/main.jl b/examples/2.boundary_mps/main.jl new file mode 100644 index 000000000..8d1cc2763 --- /dev/null +++ b/examples/2.boundary_mps/main.jl @@ -0,0 +1,154 @@ +using Markdown +md""" +# Boundary MPS contractions using VUMPS and PEPOs + +Instead of using CTMRG to contract an infinite PEPS, one can also use an boundary MPSs +ansatz to contract the infinite network. In particular, we will here use VUMPS to do so. + +Before we start, we'll fix the random seed for reproducability: +""" + +using Random +Random.seed!(29384293742893); + +md""" +Besides `TensorKit` and `PEPSKit`, we here also need [`MPSKit`](https://quantumkithub.github.io/MPSKit.jl/stable/) +which implements the VUMPS algorithm as well as the required MPS operations: +""" + +using TensorKit, PEPSKit, MPSKit + +md""" +## Computing a PEPS norm + +We start by initializing a random initial infinite PEPS: +""" + +peps₀ = InfinitePEPS(ComplexSpace(2), ComplexSpace(2)) + +md""" +To compute its norm, we need to construct the transfer operator corresponding to +the partition function representing the overlap $\langle \psi_\text{PEPS} | \psi_\text{PEPS} \rangle$: +""" + +transfer = InfiniteTransferPEPS(peps₀, 1, 1) + +md""" +We then find its leading boundary MPS fixed point, where the corresponding eigenvalue +encodes the norm of the state. To that end, let us first we build an initial guess for the +boundary MPS, choosing a bond dimension of 20: +""" + +mps₀ = initializeMPS(transfer, [ComplexSpace(20)]) + +md""" +Note that this will just construct a MPS with random Gaussian entries based on the virtual +spaces of the supplied transfer operator. Of course, one might come up with a better initial +guess (leading to better convergence) depending on the application. To find the leading +boundary MPS fixed point, we call [`leading_boundary`](@ref) using the [VUMPS](@extref) +algorithm from MPSKit. Note that, by default, `leading_boundary` uses CTMRG where the +settings are supplied as keyword arguments, so in the present case we need to supply the +VUMPS algorithm struct explicitly: +""" + +mps, env, ϵ = leading_boundary(mps₀, transfer, VUMPS(; tol=1e-6, verbosity=2)); + +md""" +The norm of the state per unit cell is then given by the expectation value +$\langle \psi_\text{MPS} | \mathbb{T} | \psi_\text{MPS} \rangle$: +""" + +norm_vumps = abs(prod(expectation_value(mps, transfer))) + +md""" +This can be compared to the result obtained using CTMRG, where we see that the results match: +""" + +env_ctmrg, = leading_boundary( + CTMRGEnv(peps₀, ComplexSpace(20)), peps₀; tol=1e-6, verbosity=2 +) +norm_ctmrg = abs(norm(peps₀, env_ctmrg)) +@show abs(norm_vumps - norm_ctmrg) / norm_vumps; + +md""" +## Working with unit cells + +For PEPS with non-trivial unit cells, the principle is exactly the same. The only difference +is that now the transfer operator of the PEPS norm partition function has multiple lines, +each of which can be represented by an [`InfiniteTransferPEPS`](@ref) object. Such a +multi-line transfer operator is represented by a `MultilineTransferPEPS` object. In this +case, the boundary MPS is an [`MultilineMPS`](@extref) object, which should be initialized +by specifying a virtual space for each site in the partition function unit cell. + +First, we construct a PEPS with a $2 \times 2$ unit cell using the `unitcell` keyword +argument and then define the corresponding transfer PEPS: +""" + +peps₀_2x2 = InfinitePEPS(ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2)) +transfer_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1); + +md""" +Now, the procedure is the same as before: We compute the norm once using VUMPS, once using CTMRG and then compare. +""" + +mps₀_2x2 = initializeMPS(transfer_2x2, fill(ComplexSpace(20), 2, 2)) +mps_2x2, = leading_boundary(mps₀_2x2, transfer_2x2, VUMPS(; tol=1e-6, verbosity=2)) +norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, transfer_2x2))) + +env_ctmrg_2x2, = leading_boundary( + CTMRGEnv(peps₀_2x2, ComplexSpace(20)), peps₀_2x2; tol=1e-6, verbosity=2 +) +norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2)) + +@show abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps + +md""" +Again, the results are compatible. Note that for larger unit cells and non-Hermitian PEPS +the VUMPS algorithm may become unstable, in which case the CTMRG algorithm is recommended. + +## Contracting PEPO overlaps + +Using exactly the same machinery, we can contract partition functions which encode the +expectation value of a PEPO for a given PEPS state. As an example, we can consider the +overlap of the PEPO correponding to the partition function of 3D classical Ising model with +our random PEPS from before and evaluate the overlap +$\langle \psi_\text{PEPS} | O_\text{PEPO} | \psi_\text{PEPS} \rangle$. + +The classical Ising PEPO is defined as follows: +""" + +function ising_pepo(β; unitcell=(1, 1, 1)) + t = ComplexF64[exp(β) exp(-β); exp(-β) exp(β)] + q = sqrt(t) + + O = zeros(2, 2, 2, 2, 2, 2) + O[1, 1, 1, 1, 1, 1] = 1 + O[2, 2, 2, 2, 2, 2] = 1 + @tensor o[-1 -2; -3 -4 -5 -6] := + O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] + O = TensorMap(o, ℂ^2 ⊗ (ℂ^2)' ← ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)') + + return InfinitePEPO(O; unitcell) +end; + +md""" +To evaluate the overlap, we instantiate the PEPO and the corresponding [`InfiniteTransferPEPO`](@ref) +in the right direction, on the right row of the partition function (trivial here): +""" + +pepo = ising_pepo(1) +transfer_pepo = InfiniteTransferPEPO(peps₀, pepo, 1, 1) + +md""" +As before, we converge the boundary MPS using VUMPS and then compute the expectation value: +""" + +mps₀_pepo = initializeMPS(transfer_pepo, [ComplexSpace(20)]) +mps_pepo, = leading_boundary(mps₀_pepo, transfer_pepo, VUMPS(; tol=1e-6, verbosity=2)) +norm_pepo = abs(prod(expectation_value(mps_pepo, transfer_pepo))); +@show norm_pepo; + +md""" +These objects and routines can be used to optimize PEPS fixed points of 3D partition +functions, see for example [Vanderstraeten et al.](@cite vanderstraeten_residual_2018) +""" diff --git a/examples/3.bose_hubbard/bose_hubbard.jl b/examples/3.bose_hubbard/bose_hubbard.jl deleted file mode 100644 index 97770a0ee..000000000 --- a/examples/3.bose_hubbard/bose_hubbard.jl +++ /dev/null @@ -1,949 +0,0 @@ -### A Pluto.jl notebook ### -# v0.20.5 - -using Markdown -using InteractiveUtils - -# ╔═╡ ef170a00-e0bf-4d5e-9ee3-ed2ce0061a24 -using Random - -# ╔═╡ 69f9cf1d-28b0-4357-bd2a-4894993e3be8 -using TensorKit, PEPSKit - -# ╔═╡ 10cc8e99-035d-4240-9b7b-7ab500a81783 -using MPSKit: add_physical_charge - -# ╔═╡ 0cfaf704-76fd-4e3b-8f77-c6e3d0e8af51 -md""" -# Optimizing the ``U(1)``-symmetric Bose-Hubbard model - -This example demonstrates the simulation of the two-dimensional Bose-Hubbard model. In particular, the point will be to showcase the use of internal symmetries and finite particle densities in PEPS ground state searches. As we will see, incorporating symmetries into the simulation consists of initializing a symmetric Hamiltonian, PEPS state and CTM environment - made possible through TensorKit. - -But first let's seed the RNG and import the required modules: -""" - -# ╔═╡ cc5c1119-5976-4a24-bfba-50fc20719cf5 -Random.seed!(2928528935); - -# ╔═╡ 67e1786e-af9a-4fe7-a3a5-642a1004f036 -md""" -## Defining the model - -We will construct the Bose-Hubbard model Hamiltonian through the [`bose_hubbard_model` function from MPSKitModels](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.bose_hubbard_model), as reexported by PEPSKit. We'll simulate the model in its Mott-insulating phase where the ratio ``U/t`` is large, since in this phase we expect the ground state to be well approximated by a PEPS with a manifest global ``U(1)`` symmetry. Furthermore, we'll impose a cutoff at 2 bosons per site, set the chemical potential to zero and use a simple 1x1 unit cell: -""" - -# ╔═╡ 6011ff02-c309-4472-a030-08a6c9b9aceb -t = 1.0; - -# ╔═╡ 4a4adb42-61ea-40f3-9abb-26efb31a5c52 -U = 30.0; - -# ╔═╡ 2fac3a67-a5b2-4480-ab4b-e079a4d2e0b8 -cutoff = 2; - -# ╔═╡ fb90ff97-d3c8-410a-8b77-18c9318df8e1 -mu = 0.0; - -# ╔═╡ f00ba536-db79-42d4-9a34-fc51f05565d4 -lattice = InfiniteSquare(1, 1); - -# ╔═╡ 6e90b4fd-2a88-49dc-ae2b-81a0a2c88c5e -md""" -Next, we impose an explicit global U(1) symmetry as well as a fixed particle number density in our simulations. We can do this by setting the `symmetry` argument of the Hamiltonian constructor to `U1Irrep` and passing one as the particle number density keyword argument `n`: -""" - -# ╔═╡ f1005bd4-6133-43c5-abf0-8a1cae27ea58 -symmetry = U1Irrep; - -# ╔═╡ 83748684-d959-4fd4-b374-5ae1a686056c -n = 1; - -# ╔═╡ 91e67ff3-0b1e-4e1d-9c40-2a08df0faa52 -md""" -So let's instantiate the symmetric Hamiltonian: -""" - -# ╔═╡ 5fca8dcd-ab29-49d0-a605-8a5c1499eb65 -H = bose_hubbard_model(ComplexF64, symmetry, lattice; cutoff, t, U, n); - -# ╔═╡ f66ae429-5775-4485-b90a-0276fa1669f4 -md""" -Before we continue, it might be interesting to inspect the corresponding lattice physical spaces: -""" - -# ╔═╡ 2d4f1c7f-9fd1-43c4-8d29-8f155216c56e -physical_spaces = H.lattice - -# ╔═╡ b4617dac-204e-4f34-be4f-e7462110b796 -md""" -Note that the physical space contains ``U(1)`` charges -1, 0 and +1. Indeed, imposing a particle number density of +1 corresponds to shifting the physical charges by -1 to 're-center' the physical charges around the desired density. When we do this with a cutoff of two bosons per site, i.e. starting from ``U(1)`` charges 0, 1 and 2 on the physical level, we indeed get the observed charges. -""" - -# ╔═╡ d67195b6-558e-47ca-8cc1-cfbef2448165 -md""" -## Characterizing the virtual spaces - -When running PEPS simulations with explicit internal symmetries, specifying the structure of the virtual spaces of the PEPS and its environment becomes a bit more involved. For the environment, one could in principle allow the virtual space to be chosen dynamically during the boundary contraction using CTMRG by using a truncation scheme that allows for this (e.g. using alg=:truncdim or alg=:truncbelow to truncate to a fixed total bond dimension or singular value cutoff respectively). For the PEPS virtual space however, the structure has to be specified before the optimization. - -While there are a host of techniques to do this in an informed way (e.g. starting from a simple update result), here we just specify the virtual space manually. Since we're dealing with a model at unit filling our physical space only contains integer ``U(1)`` irreps. Therefore, we'll build our PEPS and environment spaces using integer U(1) irreps centered around the zero charge. -""" - -# ╔═╡ f9d5c380-9424-4358-b2d7-eccd5c42992e -V_peps = U1Space(0 => 2, 1 => 1, -1 => 1); - -# ╔═╡ 786bc842-39a7-425d-a261-c635b97b8208 -V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2); - -# ╔═╡ 4d6bccd3-7854-4d9b-8638-89b5a6bf41e1 -md""" -## Finding the ground state - -Having defined our Hamiltonian and spaces, it is just a matter of plugging this into the optimization framework in the usual way to find the ground state. So, we first specify all algorithms and their tolerances: -""" - -# ╔═╡ 34b6c407-5816-4714-8d7c-3c53f64007ad -boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)); - -# ╔═╡ 42bf7d5d-526c-4630-9eb6-a065155884c3 -gradient_alg = (; tol=1e-6, maxiter=10, alg=:eigsolver, iterscheme=:diffgauge); - -# ╔═╡ 56fc7eb6-6a9c-4152-a5a0-34f8b484f6c8 -optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=200, ls_maxiter=2, ls_maxfg=2); - -# ╔═╡ 8ea51b8c-afdb-4b59-93a8-f66d5ab4d6da -md""" -!!! note - Taking CTMRG gradients and optimizing symmetric tensors tends to be more problematic than with dense tensors. In particular, this means that one frequently needs to tweak the `boundary_alg`, `gradient_alg` and `optimizer_alg` settings. There rarely is a general-purpose set of settings which will always work, so instead one has to adjust the simulation settings for each specific application. For example, it might help to switch between the CTMRG flavors `alg=:simultaneous` and `alg=:sequential` to improve convergence. The evaluation of the CTMRG gradient can be instable, so there it is advised to try the different `iterscheme=:diffgauge` and `iterscheme=:fixed` schemes as well as different `alg` keywords. Of course the tolerances of the algorithms and their subalgorithms also have to be compatible. For more details on the available options, see the [`fixedpoint`](@ref) docstring. - -Keep in mind that the PEPS is constructed from a unit cell of spaces, so we have to make a matrix of `V_peps` spaces: -""" - -# ╔═╡ daf88312-1c74-4ba8-b8eb-69d5c0b2d834 -virtual_spaces = fill(V_peps, size(lattice)...); - -# ╔═╡ f9bb4230-1741-49cf-8557-eac8fd264548 -peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces); - -# ╔═╡ 6b1b770a-2b96-4600-9ba9-9c526b1b3cae -env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); - -# ╔═╡ 1bf2305b-9c25-4ec9-bc2c-f418c4b4caee -md""" -And at last, we optimize (which might take a bit): -""" - -# ╔═╡ 50596cfc-bdc2-45e0-a346-60ac2f627806 -peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg); - -# ╔═╡ a6341a9e-c92a-4539-8516-ef9b2de0165e -@show E - -# ╔═╡ d9361e24-475f-48f6-9a64-99e00f19a190 -md""" -We can compare our PEPS result to the energy obtained using a cylinder-MPS calculation using a cylinder circumference of ``L_y = 7`` and a bond dimension of 446, which yields ``E = -0.273284888``: -""" - -# ╔═╡ db097785-1f22-4367-a83d-6addf8f1ad84 -E_ref = -0.273284888; - -# ╔═╡ ca4c87e4-194e-11f0-0793-357226f85565 -@show (E - E_ref) / E_ref - -# ╔═╡ 00000000-0000-0000-0000-000000000001 -PLUTO_PROJECT_TOML_CONTENTS = """ -[deps] -MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502" -PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" -Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" - -[compat] -MPSKit = "~0.12.6" -PEPSKit = "~0.5.0" -TensorKit = "~0.14.5" -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000002 -PLUTO_MANIFEST_TOML_CONTENTS = """ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.11.4" -manifest_format = "2.0" -project_hash = "c70e6e86b5621a8e0ee82a182ffe7c3e8712cf1e" - -[[deps.AbstractFFTs]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" -uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" -version = "1.5.0" - - [deps.AbstractFFTs.extensions] - AbstractFFTsChainRulesCoreExt = "ChainRulesCore" - AbstractFFTsTestExt = "Test" - - [deps.AbstractFFTs.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] -git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" -uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" -version = "0.1.42" - - [deps.Accessors.extensions] - AxisKeysExt = "AxisKeys" - IntervalSetsExt = "IntervalSets" - LinearAlgebraExt = "LinearAlgebra" - StaticArraysExt = "StaticArrays" - StructArraysExt = "StructArrays" - TestExt = "Test" - UnitfulExt = "Unitful" - - [deps.Accessors.weakdeps] - AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - -[[deps.Adapt]] -deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" -uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.3.0" -weakdeps = ["SparseArrays", "StaticArrays"] - - [deps.Adapt.extensions] - AdaptSparseArraysExt = "SparseArrays" - AdaptStaticArraysExt = "StaticArrays" - -[[deps.ArrayLayouts]] -deps = ["FillArrays", "LinearAlgebra"] -git-tree-sha1 = "4e25216b8fea1908a0ce0f5d87368587899f75be" -uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.ArrayLayouts.extensions] - ArrayLayoutsSparseArraysExt = "SparseArrays" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -version = "1.11.0" - -[[deps.BangBang]] -deps = ["Accessors", "ConstructionBase", "InitialValues", "LinearAlgebra"] -git-tree-sha1 = "26f41e1df02c330c4fa1e98d4aa2168fdafc9b1f" -uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" -version = "0.4.4" - - [deps.BangBang.extensions] - BangBangChainRulesCoreExt = "ChainRulesCore" - BangBangDataFramesExt = "DataFrames" - BangBangStaticArraysExt = "StaticArrays" - BangBangStructArraysExt = "StructArrays" - BangBangTablesExt = "Tables" - BangBangTypedTablesExt = "TypedTables" - - [deps.BangBang.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" - TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -version = "1.11.0" - -[[deps.BlockArrays]] -deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "df1746706459aa184ed3424b240a917b89d67b60" -uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -version = "1.6.1" - - [deps.BlockArrays.extensions] - BlockArraysAdaptExt = "Adapt" - BlockArraysBandedMatricesExt = "BandedMatrices" - - [deps.BlockArrays.weakdeps] - Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - -[[deps.BlockTensorKit]] -deps = ["BlockArrays", "Compat", "LinearAlgebra", "Random", "Strided", "TensorKit", "TensorOperations", "TupleTools", "VectorInterface"] -git-tree-sha1 = "e0d455f2998aca33747def4f384c1aff5e3278de" -uuid = "5f87ffc2-9cf1-4a46-8172-465d160bd8cd" -version = "0.1.6" - -[[deps.ChainRules]] -deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "SparseInverseSubset", "Statistics", "StructArrays", "SuiteSparse"] -git-tree-sha1 = "a975ae558af61a2a48720a6271661bf2621e0f4e" -uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" -version = "1.72.3" - -[[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "1713c74e00545bfe14605d2a2be1712de8fbcb58" -uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.25.1" -weakdeps = ["SparseArrays"] - - [deps.ChainRulesCore.extensions] - ChainRulesCoreSparseArraysExt = "SparseArrays" - -[[deps.ChunkSplitters]] -git-tree-sha1 = "63a3903063d035260f0f6eab00f517471c5dc784" -uuid = "ae650224-84b6-46f8-82ea-d812ca08434e" -version = "3.1.2" - -[[deps.CommonSubexpressions]] -deps = ["MacroTools"] -git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" -uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.1" - -[[deps.Compat]] -deps = ["TOML", "UUIDs"] -git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.16.0" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.1.1+0" - -[[deps.CompositionsBase]] -git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" -uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" -version = "0.1.2" -weakdeps = ["InverseFunctions"] - - [deps.CompositionsBase.extensions] - CompositionsBaseInverseFunctionsExt = "InverseFunctions" - -[[deps.ConstructionBase]] -git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" -uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.8" - - [deps.ConstructionBase.extensions] - ConstructionBaseIntervalSetsExt = "IntervalSets" - ConstructionBaseLinearAlgebraExt = "LinearAlgebra" - ConstructionBaseStaticArraysExt = "StaticArrays" - - [deps.ConstructionBase.weakdeps] - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.DataAPI]] -git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" -uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.16.0" - -[[deps.DataValueInterfaces]] -git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" -uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" -version = "1.0.0" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -version = "1.11.0" - -[[deps.DiffResults]] -deps = ["StaticArraysCore"] -git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" -uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" -version = "1.1.0" - -[[deps.DiffRules]] -deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] -git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" -uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.15.1" - -[[deps.Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" -version = "1.11.0" - -[[deps.DocStringExtensions]] -git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.4" - -[[deps.FillArrays]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" -uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.13.0" - - [deps.FillArrays.extensions] - FillArraysPDMatsExt = "PDMats" - FillArraysSparseArraysExt = "SparseArrays" - FillArraysStatisticsExt = "Statistics" - - [deps.FillArrays.weakdeps] - PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[deps.FiniteDifferences]] -deps = ["ChainRulesCore", "LinearAlgebra", "Printf", "Random", "Richardson", "SparseArrays", "StaticArrays"] -git-tree-sha1 = "06d76c780d657729cf20821fb5832c6cc4dfd0b5" -uuid = "26cc04aa-876d-5657-8c51-4c34ba976000" -version = "0.12.32" - -[[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" -uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "1.0.1" -weakdeps = ["StaticArrays"] - - [deps.ForwardDiff.extensions] - ForwardDiffStaticArraysExt = "StaticArrays" - -[[deps.GPUArraysCore]] -deps = ["Adapt"] -git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" -uuid = "46192b85-c4d5-4398-a991-12ede77f4527" -version = "0.2.0" - -[[deps.HalfIntegers]] -git-tree-sha1 = "9c3149243abb5bc0bad0431d6c4fcac0f4443c7c" -uuid = "f0d1745a-41c9-11e9-1dd9-e5d34d218721" -version = "1.6.0" - -[[deps.HashArrayMappedTries]] -git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae" -uuid = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" -version = "0.2.0" - -[[deps.IRTools]] -deps = ["InteractiveUtils", "MacroTools"] -git-tree-sha1 = "950c3717af761bc3ff906c2e8e52bd83390b6ec2" -uuid = "7869d1d1-7146-5819-86e3-90919afe41df" -version = "0.4.14" - -[[deps.InitialValues]] -git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" -uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" -version = "0.3.1" - -[[deps.IntegerMathUtils]] -git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" -uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" -version = "0.1.2" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -version = "1.11.0" - -[[deps.InverseFunctions]] -git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" -uuid = "3587e190-3f89-42d0-90ee-14403ec27112" -version = "0.1.17" - - [deps.InverseFunctions.extensions] - InverseFunctionsDatesExt = "Dates" - InverseFunctionsTestExt = "Test" - - [deps.InverseFunctions.weakdeps] - Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.IrrationalConstants]] -git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" -uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.4" - -[[deps.IteratorInterfaceExtensions]] -git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" -uuid = "82899510-4779-5014-852e-03e436cf321d" -version = "1.0.0" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.7.0" - -[[deps.KrylovKit]] -deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"] -git-tree-sha1 = "38477816f8db29956ea591feb3086d9edabf6f38" -uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" -version = "0.9.5" -weakdeps = ["ChainRulesCore"] - - [deps.KrylovKit.extensions] - KrylovKitChainRulesCoreExt = "ChainRulesCore" - -[[deps.LRUCache]] -git-tree-sha1 = "5519b95a490ff5fe629c4a7aa3b3dfc9160498b3" -uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" -version = "1.6.2" -weakdeps = ["Serialization"] - - [deps.LRUCache.extensions] - SerializationExt = ["Serialization"] - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -version = "1.11.0" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.11.0" - -[[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" -uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.29" - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" - - [deps.LogExpFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -version = "1.11.0" - -[[deps.LoggingExtras]] -deps = ["Dates", "Logging"] -git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" -uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.0.3" - -[[deps.MPSKit]] -deps = ["Accessors", "BlockTensorKit", "Compat", "DocStringExtensions", "HalfIntegers", "KrylovKit", "LinearAlgebra", "LoggingExtras", "OhMyThreads", "OptimKit", "Printf", "Random", "RecipesBase", "TensorKit", "TensorKitManifolds", "TensorOperations", "VectorInterface"] -git-tree-sha1 = "588bef90e9672431efda1b686e8d477b621b2118" -uuid = "bb1c41ca-d63c-52ed-829e-0820dda26502" -version = "0.12.6" - -[[deps.MPSKitModels]] -deps = ["LinearAlgebra", "MPSKit", "MacroTools", "PrecompileTools", "TensorKit", "TensorOperations", "TupleTools"] -git-tree-sha1 = "d658f13d6b1c08304344faede50bebcc4f574b6f" -uuid = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" -version = "0.4.0" - -[[deps.MacroTools]] -git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.15" - -[[deps.Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -version = "1.11.0" - -[[deps.NaNMath]] -deps = ["OpenLibm_jll"] -git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.1.3" - -[[deps.OhMyThreads]] -deps = ["BangBang", "ChunkSplitters", "StableTasks", "TaskLocalValues"] -git-tree-sha1 = "5f81bdb937fd857bac9548fa8ab9390a06864bb5" -uuid = "67456a42-1dca-4109-a031-0a68de7e3ad5" -version = "0.7.0" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.27+1" - -[[deps.OpenLibm_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+4" - -[[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.6+0" - -[[deps.OptimKit]] -deps = ["LinearAlgebra", "Printf", "ScopedValues", "VectorInterface"] -git-tree-sha1 = "b0163ac202bc03aeb15f0e55002e544e74965534" -uuid = "77e91f04-9b3b-57a6-a776-40b61faaebe0" -version = "0.4.0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.8.0" - -[[deps.PEPSKit]] -deps = ["Accessors", "ChainRulesCore", "Compat", "FiniteDifferences", "KrylovKit", "LinearAlgebra", "LoggingExtras", "MPSKit", "MPSKitModels", "OhMyThreads", "OptimKit", "Printf", "Random", "Statistics", "TensorKit", "TensorOperations", "VectorInterface", "Zygote"] -git-tree-sha1 = "12c42d39d9c67070d5783cbd7ebb54ab957c6a09" -uuid = "52969e89-939e-4361-9b68-9bc7cde4bdeb" -version = "0.5.0" - -[[deps.PackageExtensionCompat]] -git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" -uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" -version = "1.0.2" -weakdeps = ["Requires", "TOML"] - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.2.1" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.3" - -[[deps.Primes]] -deps = ["IntegerMathUtils"] -git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" -uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" -version = "0.5.7" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -version = "1.11.0" - -[[deps.PtrArrays]] -git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" -uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" -version = "1.3.0" - -[[deps.Random]] -deps = ["SHA"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -version = "1.11.0" - -[[deps.RationalRoots]] -git-tree-sha1 = "e5f5db699187a4810fda9181b34250deeedafd81" -uuid = "308eb6b3-cc68-5ff3-9e97-c3c4da4fa681" -version = "0.2.1" - -[[deps.RealDot]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" -uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" -version = "0.1.0" - -[[deps.RecipesBase]] -deps = ["PrecompileTools"] -git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.3.4" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.1" - -[[deps.Richardson]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "48f038bfd83344065434089c2a79417f38715c41" -uuid = "708f8203-808e-40c0-ba2d-98a6953ed40d" -version = "1.4.2" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.ScopedValues]] -deps = ["HashArrayMappedTries", "Logging"] -git-tree-sha1 = "1147f140b4c8ddab224c94efa9569fc23d63ab44" -uuid = "7e506255-f358-4e82-b7e4-beb19740aa63" -version = "1.3.0" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -version = "1.11.0" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -version = "1.11.0" - -[[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.11.0" - -[[deps.SparseInverseSubset]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "52962839426b75b3021296f7df242e40ecfc0852" -uuid = "dc90abb0-5640-4711-901d-7e5b23a2fada" -version = "0.1.2" - -[[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "64cca0c26b4f31ba18f13f6c12af7c85f478cfde" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.5.0" -weakdeps = ["ChainRulesCore"] - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" - -[[deps.StableTasks]] -git-tree-sha1 = "c4f6610f85cb965bee5bfafa64cbeeda55a4e0b2" -uuid = "91464d47-22a1-43fe-8b7f-2d57ee82463f" -version = "0.1.7" - -[[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "0feb6b9031bd5c51f9072393eb5ab3efd31bf9e4" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.13" -weakdeps = ["ChainRulesCore", "Statistics"] - - [deps.StaticArrays.extensions] - StaticArraysChainRulesCoreExt = "ChainRulesCore" - StaticArraysStatisticsExt = "Statistics" - -[[deps.StaticArraysCore]] -git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" -uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.3" - -[[deps.Statistics]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.Statistics.extensions] - SparseArraysExt = ["SparseArrays"] - -[[deps.Strided]] -deps = ["LinearAlgebra", "StridedViews", "TupleTools"] -git-tree-sha1 = "4a1128f5237b5d0170d934a2eb4fa7a273639c9f" -uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" -version = "2.3.0" - -[[deps.StridedViews]] -deps = ["LinearAlgebra", "PackageExtensionCompat"] -git-tree-sha1 = "425158c52aa58d42593be6861befadf8b2541e9b" -uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" -version = "0.4.1" - - [deps.StridedViews.extensions] - StridedViewsCUDAExt = "CUDA" - StridedViewsPtrArraysExt = "PtrArrays" - - [deps.StridedViews.weakdeps] - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - PtrArrays = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" - -[[deps.StructArrays]] -deps = ["ConstructionBase", "DataAPI", "Tables"] -git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" -uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" -version = "0.7.1" - - [deps.StructArrays.extensions] - StructArraysAdaptExt = "Adapt" - StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"] - StructArraysLinearAlgebraExt = "LinearAlgebra" - StructArraysSparseArraysExt = "SparseArrays" - StructArraysStaticArraysExt = "StaticArrays" - - [deps.StructArrays.weakdeps] - Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" - GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" - KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.SuiteSparse]] -deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] -uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" - -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.7.0+0" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[deps.TableTraits]] -deps = ["IteratorInterfaceExtensions"] -git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" -uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" -version = "1.0.1" - -[[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" -uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.12.0" - -[[deps.TaskLocalValues]] -git-tree-sha1 = "d155450e6dff2a8bc2fcb81dcb194bd98b0aeb46" -uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" -version = "0.1.2" - -[[deps.TensorKit]] -deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "Random", "SparseArrays", "Strided", "TensorKitSectors", "TensorOperations", "TupleTools", "VectorInterface"] -git-tree-sha1 = "4a09ea843d18b7256f710f1188414433dcf0b7db" -uuid = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" -version = "0.14.5" -weakdeps = ["ChainRulesCore", "FiniteDifferences"] - - [deps.TensorKit.extensions] - TensorKitChainRulesCoreExt = "ChainRulesCore" - TensorKitFiniteDifferencesExt = "FiniteDifferences" - -[[deps.TensorKitManifolds]] -deps = ["LinearAlgebra", "TensorKit"] -git-tree-sha1 = "94530ac4691795834e2efacb2d31d37571dad52f" -uuid = "11fa318c-39cb-4a83-b1ed-cdc7ba1e3684" -version = "0.7.2" - -[[deps.TensorKitSectors]] -deps = ["HalfIntegers", "LinearAlgebra", "TensorOperations", "WignerSymbols"] -git-tree-sha1 = "fd15110964416b3ac3e7d1d212b0260e4629e536" -uuid = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f" -version = "0.1.4" - -[[deps.TensorOperations]] -deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Preferences", "PtrArrays", "Strided", "StridedViews", "TupleTools", "VectorInterface"] -git-tree-sha1 = "c7458aad3d855e892e2cae208a793a5fceee2406" -uuid = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" -version = "5.2.0" - - [deps.TensorOperations.extensions] - TensorOperationsBumperExt = "Bumper" - TensorOperationsChainRulesCoreExt = "ChainRulesCore" - TensorOperationscuTENSORExt = ["cuTENSOR", "CUDA"] - - [deps.TensorOperations.weakdeps] - Bumper = "8ce10254-0962-460f-a3d8-1f77fea1446e" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1" - -[[deps.TupleTools]] -git-tree-sha1 = "41e43b9dc950775eac654b9f845c839cd2f1821e" -uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" -version = "1.6.0" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -version = "1.11.0" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -version = "1.11.0" - -[[deps.VectorInterface]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9166406dedd38c111a6574e9814be83d267f8aec" -uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8" -version = "0.5.0" - -[[deps.WignerSymbols]] -deps = ["HalfIntegers", "LRUCache", "Primes", "RationalRoots"] -git-tree-sha1 = "960e5f708871c1d9a28a7f1dbcaf4e0ee34ee960" -uuid = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" -version = "2.0.0" - -[[deps.Zygote]] -deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] -git-tree-sha1 = "207d714f3514b0d564e3a08f9e9f753bf6566c2d" -uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" -version = "0.7.6" - - [deps.Zygote.extensions] - ZygoteAtomExt = "Atom" - ZygoteColorsExt = "Colors" - ZygoteDistancesExt = "Distances" - ZygoteTrackerExt = "Tracker" - - [deps.Zygote.weakdeps] - Atom = "c52e3926-4ff0-5f6e-af25-54175e0327b1" - Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" - Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.ZygoteRules]] -deps = ["ChainRulesCore", "MacroTools"] -git-tree-sha1 = "434b3de333c75fc446aa0d19fc394edafd07ab08" -uuid = "700de1a5-db45-46bc-99cf-38207098b444" -version = "0.2.7" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.11.0+0" -""" - -# ╔═╡ Cell order: -# ╠═0cfaf704-76fd-4e3b-8f77-c6e3d0e8af51 -# ╠═ef170a00-e0bf-4d5e-9ee3-ed2ce0061a24 -# ╠═cc5c1119-5976-4a24-bfba-50fc20719cf5 -# ╠═69f9cf1d-28b0-4357-bd2a-4894993e3be8 -# ╠═10cc8e99-035d-4240-9b7b-7ab500a81783 -# ╠═67e1786e-af9a-4fe7-a3a5-642a1004f036 -# ╠═6011ff02-c309-4472-a030-08a6c9b9aceb -# ╠═4a4adb42-61ea-40f3-9abb-26efb31a5c52 -# ╠═2fac3a67-a5b2-4480-ab4b-e079a4d2e0b8 -# ╠═fb90ff97-d3c8-410a-8b77-18c9318df8e1 -# ╠═f00ba536-db79-42d4-9a34-fc51f05565d4 -# ╠═6e90b4fd-2a88-49dc-ae2b-81a0a2c88c5e -# ╠═f1005bd4-6133-43c5-abf0-8a1cae27ea58 -# ╠═83748684-d959-4fd4-b374-5ae1a686056c -# ╠═91e67ff3-0b1e-4e1d-9c40-2a08df0faa52 -# ╠═5fca8dcd-ab29-49d0-a605-8a5c1499eb65 -# ╠═f66ae429-5775-4485-b90a-0276fa1669f4 -# ╠═2d4f1c7f-9fd1-43c4-8d29-8f155216c56e -# ╠═b4617dac-204e-4f34-be4f-e7462110b796 -# ╠═d67195b6-558e-47ca-8cc1-cfbef2448165 -# ╠═f9d5c380-9424-4358-b2d7-eccd5c42992e -# ╠═786bc842-39a7-425d-a261-c635b97b8208 -# ╠═4d6bccd3-7854-4d9b-8638-89b5a6bf41e1 -# ╠═34b6c407-5816-4714-8d7c-3c53f64007ad -# ╠═42bf7d5d-526c-4630-9eb6-a065155884c3 -# ╠═56fc7eb6-6a9c-4152-a5a0-34f8b484f6c8 -# ╠═8ea51b8c-afdb-4b59-93a8-f66d5ab4d6da -# ╠═daf88312-1c74-4ba8-b8eb-69d5c0b2d834 -# ╠═f9bb4230-1741-49cf-8557-eac8fd264548 -# ╠═6b1b770a-2b96-4600-9ba9-9c526b1b3cae -# ╠═1bf2305b-9c25-4ec9-bc2c-f418c4b4caee -# ╠═50596cfc-bdc2-45e0-a346-60ac2f627806 -# ╠═a6341a9e-c92a-4539-8516-ef9b2de0165e -# ╠═d9361e24-475f-48f6-9a64-99e00f19a190 -# ╠═db097785-1f22-4367-a83d-6addf8f1ad84 -# ╠═ca4c87e4-194e-11f0-0793-357226f85565 -# ╟─00000000-0000-0000-0000-000000000001 -# ╟─00000000-0000-0000-0000-000000000002 diff --git a/examples/3.bose_hubbard/main.jl b/examples/3.bose_hubbard/main.jl new file mode 100644 index 000000000..3d7c32152 --- /dev/null +++ b/examples/3.bose_hubbard/main.jl @@ -0,0 +1,130 @@ +using Markdown +md""" +# Optimizing the $U(1)$-symmetric Bose-Hubbard model + +This example demonstrates the simulation of the two-dimensional Bose-Hubbard model. In +particular, the point will be to showcase the use of internal symmetries and finite +particle densities in PEPS ground state searches. As we will see, incorporating symmetries +into the simulation consists of initializing a symmetric Hamiltonian, PEPS state and CTM +environment - made possible through TensorKit. + +But first let's seed the RNG and import the required modules: +""" + +using Random +using TensorKit, PEPSKit +using MPSKit: add_physical_charge +Random.seed!(2928528935); + +md""" +## Defining the model + +We will construct the Bose-Hubbard model Hamiltonian through the +[`bose_hubbard_model`](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.bose_hubbard_model), +function from MPSKitModels as reexported by PEPSKit. We'll simulate the model in its +Mott-insulating phase where the ratio $U/t$ is large, since in this phase we expect the +ground state to be well approximated by a PEPS with a manifest global $U(1)$ symmetry. +Furthermore, we'll impose a cutoff at 2 bosons per site, set the chemical potential to zero +and use a simple $1 \times 1$ unit cell: +""" + +t = 1.0 +U = 30.0 +cutoff = 2 +mu = 0.0 +lattice = InfiniteSquare(1, 1); + +md""" +Next, we impose an explicit global $U(1)$ symmetry as well as a fixed particle number +density in our simulations. We can do this by setting the `symmetry` argument of the +Hamiltonian constructor to `U1Irrep` and passing one as the particle number density +keyword argument `n`: +""" + +symmetry = U1Irrep +n = 1 +H = bose_hubbard_model(ComplexF64, symmetry, lattice; cutoff, t, U, n); + +md""" +Before we continue, it might be interesting to inspect the corresponding lattice physical +spaces (which is here just a $1 \times 1$ matrix due to the single-site unit cell): +""" + +physical_spaces = H.lattice + +md""" +Note that the physical space contains $U(1)$ charges -1, 0 and +1. Indeed, imposing a +particle number density of +1 corresponds to shifting the physical charges by -1 to +'re-center' the physical charges around the desired density. When we do this with a cutoff +of two bosons per site, i.e. starting from $U(1)$ charges 0, 1 and 2 on the physical level, +we indeed get the observed charges. + +## Characterizing the virtual spaces + +When running PEPS simulations with explicit internal symmetries, specifying the structure of +the virtual spaces of the PEPS and its environment becomes a bit more involved. For the +environment, one could in principle allow the virtual space to be chosen dynamically during +the boundary contraction using CTMRG by using a truncation scheme that allows for this +(e.g. using `alg=:truncdim` or `alg=:truncbelow` to truncate to a fixed total bond dimension +or singular value cutoff respectively). For the PEPS virtual space however, the structure +has to be specified before the optimization. + +While there are a host of techniques to do this in an informed way (e.g. starting from a +simple update result), here we just specify the virtual space manually. Since we're dealing +with a model at unit filling our physical space only contains integer $U(1)$ irreps. +Therefore, we'll build our PEPS and environment spaces using integer $U(1)$ irreps centered +around the zero charge: +""" + +V_peps = U1Space(0 => 2, 1 => 1, -1 => 1) +V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2); + +md""" +## Finding the ground state + +Having defined our Hamiltonian and spaces, it is just a matter of plugging this into the +optimization framework in the usual way to find the ground state. So, we first specify all +algorithms and their tolerances: +""" + +boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)) +gradient_alg = (; tol=1e-6, maxiter=10, alg=:eigsolver, iterscheme=:diffgauge) +optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=200, ls_maxiter=2, ls_maxfg=2); + +md""" +!!! note + Taking CTMRG gradients and optimizing symmetric tensors tends to be more problematic + than with dense tensors. In particular, this means that one frequently needs to tweak + the `boundary_alg`, `gradient_alg` and `optimizer_alg` settings. There rarely is a + general-purpose set of settings which will always work, so instead one has to adjust + the simulation settings for each specific application. For example, it might help to + switch between the CTMRG flavors `alg=:simultaneous` and `alg=:sequential` to + improve convergence. The evaluation of the CTMRG gradient can be instable, so there it + is advised to try the different `iterscheme=:diffgauge` and `iterscheme=:fixed` schemes + as well as different `alg` keywords. Of course the tolerances of the algorithms and + their subalgorithms also have to be compatible. For more details on the available + options, see the [`fixedpoint`](@ref) docstring. + +Keep in mind that the PEPS is constructed from a unit cell of spaces, so we have to make a +matrix of `V_peps` spaces: +""" + +virtual_spaces = fill(V_peps, size(lattice)...) +peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) +env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); + +md""" +And at last, we optimize (which might take a bit): +""" + +peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg) +@show E; + +md""" +We can compare our PEPS result to the energy obtained using a cylinder-MPS calculation +using a cylinder circumference of $L_y = 7$ and a bond dimension of 446, which yields +$E = -0.273284888$: +""" + +E_ref = -0.273284888 +@show (E - E_ref) / E_ref; diff --git a/examples/4.xxz/main.jl b/examples/4.xxz/main.jl new file mode 100644 index 000000000..c161cafea --- /dev/null +++ b/examples/4.xxz/main.jl @@ -0,0 +1,97 @@ +using Markdown +md""" +# Néel order in the U(1)-symmetric XXZ model + +Here, we want to look at a special case of the Heisenberg model, where the $x$ and $y$ +couplings are equal, called the XXZ model + +```math +H_0 = J \big(\sum_{\langle i, j \rangle} S_i^x S_j^x + S_i^y S_j^y + \Delta S_i^z S_j^z \big) . +``` + +For appropriate $\Delta$, the model enters an antiferromagnetic phase (Néel order) which we +will force by adding staggered magnetic charges to ``H_0``. Furthermore, since the XXZ +Hamiltonian obeys a $U(1)$ symmetry, we will make use of that and work with $U(1)$-symmetric +PEPS and CTMRG environments. For simplicity, we will consider spin-$1/2$ operators. + +But first, let's make this example deterministic and import the required packages: +""" + +using Random +using TensorKit, PEPSKit +using MPSKit: add_physical_charge +Random.seed!(2928528935); + +md""" +## Constructing the model + +Let us define the $U(1)$-symmetric XXZ Hamiltonian on a $2 \times 2$ unit cell with the +parameters: +""" + +J = 1.0 +Delta = 1.0 +spin = 1//2 +symmetry = U1Irrep +lattice = InfiniteSquare(2, 2) +H₀ = heisenberg_XXZ(ComplexF64, symmetry, lattice; J, Delta, spin); + +md""" +This ensures that our PEPS ansatz can support the bipartite Néel order. As discussed above, +we encode the Néel order directly in the ansatz by adding staggered auxiliary physical +charges: +""" + +S_aux = [ + U1Irrep(-1//2) U1Irrep(1//2) + U1Irrep(1//2) U1Irrep(-1//2) +] +H = add_physical_charge(H₀, S_aux); + +md""" +## Specifying the symmetric virtual spaces + +Before we create an initial PEPS and CTM environment, we need to think about which +symmetric spaces we need to construct. Since we want to exploit the global $U(1)$ symmetry +of the model, we will use TensorKit's `U1Space`s where we specify dimensions for each +symmetry sector. From the virtual spaces, we will need to construct a unit cell (a matrix) +of spaces which will be supplied to the PEPS constructor. The same is true for the physical +spaces, which can be extracted directly from the Hamiltonian `LocalOperator`: +""" + +V_peps = U1Space(0 => 2, 1 => 1, -1 => 1) +V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2) +virtual_spaces = fill(V_peps, size(lattice)...) +physical_spaces = H.lattice + +md""" +## Ground state search + +From this point onwards it's business as usual: Create an initial PEPS and environment +(using the symmetric spaces), specify the algorithmic parameters and optimize: +""" + +boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)) +gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge) +optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2) + +peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) +env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); + +md""" +Finally, we can optimize the PEPS with respect to the XXZ Hamiltonian. Note that the +optimization might take a while since precompilation of symmetric AD code takes longer and +because symmetric tensors do create a bit of overhead (which does pay off at larger bond +and environment dimensions): +""" + +peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg) +@show E; + +md""" +Note that for the specified parameters $J=\Delta=1$, we simulated the same Hamiltonian as +in the [Heisenberg example](@ref examples_heisenberg). In that example, with a non-symmetric +$D=2$ PEPS simulation, we reached a ground-state energy of around $E_\text{D=2} = -0.6625\dots$. +Again comparing against [Sandvik's](@cite sandvik_computational_2011) accurate QMC estimate +``E_{\text{ref}}=−0.6694421``, we see that we already got closer to the reference energy. +""" diff --git a/examples/4.xxz/xxz.jl b/examples/4.xxz/xxz.jl deleted file mode 100644 index e66e85010..000000000 --- a/examples/4.xxz/xxz.jl +++ /dev/null @@ -1,932 +0,0 @@ -### A Pluto.jl notebook ### -# v0.20.5 - -using Markdown -using InteractiveUtils - -# ╔═╡ dbe8239a-f481-4681-95bc-ed464560a13b -using Random - -# ╔═╡ 8c88c236-43da-497b-b083-dcb9ee7888a2 -using TensorKit, PEPSKit - -# ╔═╡ c115b454-1fa8-47b5-a510-b4be607dd8ba -using MPSKit: add_physical_charge - -# ╔═╡ 118fb1e5-dce5-4eaf-9d85-7a2365409091 -md""" -# Néel order in the U(1)-symmetric XXZ model - -Here, we want to look at a special case of the Heisenberg model, where the ``x`` and ``y`` couplings are equal, called the XXZ model - -```math -H_0 = J \big(\sum_{\langle i, j \rangle} S_i^x S_j^x + S_i^y S_j^y + \Delta S_i^z S_j^z \big) . -``` - -For appropriate ``\Delta``, the model enters an antiferromagnetic phase (Néel order) which we will force by adding staggered magnetic charges to ``H_0``. Furthermore, since the XXZ Hamiltonian obeys a ``U(1)`` symmetry, we will make use of that and work with ``U(1)``-symmetric PEPS and CTMRG environments. For simplicity, we will consider spin-``1/2`` operators. - -But first, let's make this example deterministic and import the required packages: -""" - -# ╔═╡ a43c4ba1-af3d-41a6-b3ea-e1c78f1fe461 -Random.seed!(2928528935); - -# ╔═╡ 2bec4073-864c-444b-a06d-aac1d7bdd9f7 -md""" -## Constructing the model - -Let us define the XXZ Hamiltonian with the parameters -""" - -# ╔═╡ c633965b-82b7-4bb4-8a45-52a34ccc6a84 -J, Delta, spin = 1.0, 1.0, 1//2; - -# ╔═╡ b6f2d6f7-4be6-4067-ae4b-5f318531574b -md""" -with ``U(1)``-symmetric tensors -""" - -# ╔═╡ 43857112-b6d5-4da8-9e5a-f55d48e5006a -symmetry = U1Irrep; - -# ╔═╡ 08d95080-b23c-4dbd-bc47-6f7f5de53662 -md""" -on a ``2 \times 2`` unit cell: -""" - -# ╔═╡ 4d3f9e11-ec65-4187-a610-f38c5780506c -lattice = InfiniteSquare(2, 2); - -# ╔═╡ eb2f129c-0169-4185-a878-4944a3d1fd4d -H₀ = heisenberg_XXZ(ComplexF64, symmetry, lattice; J, Delta, spin); - -# ╔═╡ a18b57e6-15dc-4147-a327-50c957ad96ca -md""" -This ensures that our PEPS ansatz can support the bipartite Néel order. As discussed above, we encode the Néel order directly in the ansatz by adding staggered auxiliary physical charges: -""" - -# ╔═╡ f61f0b2f-da31-43c8-8d5e-6cb690b4d9ae -S_aux = [ - U1Irrep(-1//2) U1Irrep(1//2) - U1Irrep(1//2) U1Irrep(-1//2) -]; - -# ╔═╡ 7a257773-171b-4191-8011-f96f8754c571 -H = add_physical_charge(H₀, S_aux); - -# ╔═╡ 2dbf8595-a3b9-4836-a90f-335d7000cbd6 -md""" -## Specifying the symmetric virtual spaces - -Before we create an initial PEPS and CTM environment, we need to think about which symmetric spaces we need to construct. Since we want to exploit the global ``U(1)`` symmetry of the model, we will use TensorKit's `U1Space`s where we specify dimensions for each symmetry sector: -""" - -# ╔═╡ 95aabe91-9be6-4fa1-8ee7-24c01f500f88 -V_peps = U1Space(0 => 2, 1 => 1, -1 => 1); - -# ╔═╡ f3528aa8-ef8d-4579-bdf5-95fedf9fdd08 -V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2); - -# ╔═╡ 08213456-9a3f-44ed-99f3-11dff12cda9a -md""" -From the virtual spaces, we will need to construct a unit cell (a matrix) of spaces which will be supplied to the PEPS constructor. The same is true for the physical spaces, which we will just extract from the Hamiltonian `LocalOperator`: -""" - -# ╔═╡ dc9c03ce-d620-4874-8e5b-e4d64758fc09 -virtual_spaces = fill(V_peps, size(lattice)...); - -# ╔═╡ 1088908b-fe26-4471-93ba-a8f4766582e3 -physical_spaces = H.lattice; - -# ╔═╡ b41e515b-8ba7-4cf6-8502-ed7cdd2a1e04 -md""" -## Ground state search - -From this point onwards it's business as usual: Create an initial PEPS and environment (using the symmetric spaces), specify the algorithmic parameters and optimize: -""" - -# ╔═╡ 710db80f-468c-43a8-9899-cca2c95935e0 -boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)); - -# ╔═╡ b4f46884-100a-4208-83d1-9ea11fd10e2f -gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge); - -# ╔═╡ 341f420e-ffbe-41b1-836b-75046c4ee62a -optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2); - -# ╔═╡ 7e3822b5-a1e7-4a2b-a6db-caa80004dfca -peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces); - -# ╔═╡ d75423c9-0c97-4711-97d1-5a812cd63c51 -env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); - -# ╔═╡ d05a10e1-33b5-4c46-9f39-8604b12087fb -md""" -Finally, we can optimize the PEPS with respect to the XXZ Hamiltonian. Note that the optimization might take a while since precompilation of symmetric AD code takes longer and because symmetric tensors do create a bit of overhead (which does pay off at larger bond and environment dimensions): -""" - -# ╔═╡ 642ab5a8-193a-11f0-01d7-3172b0c1a5c0 -peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg); - -# ╔═╡ d7d2e27d-01dc-4c3c-9ce9-6ac06581ec87 -@show E - -# ╔═╡ 8e7cc822-d193-4757-b54e-a21e2ba1009b -md""" -Note that for the specified parameters ``J=\Delta=1``, we simulated the same Hamiltonian as in the [Heisenberg example](). In that example, with a non-symmetric ``D=2`` PEPS simulation, we reached a ground-state energy of around ``E_\text{D=2} = -0.6625\dots``. Again comparing against -[Sandvik's](@cite sandvik_computational_2011) accurate QMC estimate ``E_{\text{ref}}=−0.6694421``, we see that we already got closer to the reference energy. -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000001 -PLUTO_PROJECT_TOML_CONTENTS = """ -[deps] -MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502" -PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" -Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" - -[compat] -MPSKit = "~0.12.6" -PEPSKit = "~0.5.0" -TensorKit = "~0.14.5" -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000002 -PLUTO_MANIFEST_TOML_CONTENTS = """ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.11.4" -manifest_format = "2.0" -project_hash = "c70e6e86b5621a8e0ee82a182ffe7c3e8712cf1e" - -[[deps.AbstractFFTs]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" -uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" -version = "1.5.0" - - [deps.AbstractFFTs.extensions] - AbstractFFTsChainRulesCoreExt = "ChainRulesCore" - AbstractFFTsTestExt = "Test" - - [deps.AbstractFFTs.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] -git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" -uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" -version = "0.1.42" - - [deps.Accessors.extensions] - AxisKeysExt = "AxisKeys" - IntervalSetsExt = "IntervalSets" - LinearAlgebraExt = "LinearAlgebra" - StaticArraysExt = "StaticArrays" - StructArraysExt = "StructArrays" - TestExt = "Test" - UnitfulExt = "Unitful" - - [deps.Accessors.weakdeps] - AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - -[[deps.Adapt]] -deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" -uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.3.0" -weakdeps = ["SparseArrays", "StaticArrays"] - - [deps.Adapt.extensions] - AdaptSparseArraysExt = "SparseArrays" - AdaptStaticArraysExt = "StaticArrays" - -[[deps.ArrayLayouts]] -deps = ["FillArrays", "LinearAlgebra"] -git-tree-sha1 = "4e25216b8fea1908a0ce0f5d87368587899f75be" -uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.ArrayLayouts.extensions] - ArrayLayoutsSparseArraysExt = "SparseArrays" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -version = "1.11.0" - -[[deps.BangBang]] -deps = ["Accessors", "ConstructionBase", "InitialValues", "LinearAlgebra"] -git-tree-sha1 = "26f41e1df02c330c4fa1e98d4aa2168fdafc9b1f" -uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" -version = "0.4.4" - - [deps.BangBang.extensions] - BangBangChainRulesCoreExt = "ChainRulesCore" - BangBangDataFramesExt = "DataFrames" - BangBangStaticArraysExt = "StaticArrays" - BangBangStructArraysExt = "StructArrays" - BangBangTablesExt = "Tables" - BangBangTypedTablesExt = "TypedTables" - - [deps.BangBang.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" - TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -version = "1.11.0" - -[[deps.BlockArrays]] -deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "df1746706459aa184ed3424b240a917b89d67b60" -uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -version = "1.6.1" - - [deps.BlockArrays.extensions] - BlockArraysAdaptExt = "Adapt" - BlockArraysBandedMatricesExt = "BandedMatrices" - - [deps.BlockArrays.weakdeps] - Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - -[[deps.BlockTensorKit]] -deps = ["BlockArrays", "Compat", "LinearAlgebra", "Random", "Strided", "TensorKit", "TensorOperations", "TupleTools", "VectorInterface"] -git-tree-sha1 = "e0d455f2998aca33747def4f384c1aff5e3278de" -uuid = "5f87ffc2-9cf1-4a46-8172-465d160bd8cd" -version = "0.1.6" - -[[deps.ChainRules]] -deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "SparseInverseSubset", "Statistics", "StructArrays", "SuiteSparse"] -git-tree-sha1 = "a975ae558af61a2a48720a6271661bf2621e0f4e" -uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" -version = "1.72.3" - -[[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "1713c74e00545bfe14605d2a2be1712de8fbcb58" -uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.25.1" -weakdeps = ["SparseArrays"] - - [deps.ChainRulesCore.extensions] - ChainRulesCoreSparseArraysExt = "SparseArrays" - -[[deps.ChunkSplitters]] -git-tree-sha1 = "63a3903063d035260f0f6eab00f517471c5dc784" -uuid = "ae650224-84b6-46f8-82ea-d812ca08434e" -version = "3.1.2" - -[[deps.CommonSubexpressions]] -deps = ["MacroTools"] -git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" -uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.1" - -[[deps.Compat]] -deps = ["TOML", "UUIDs"] -git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.16.0" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.1.1+0" - -[[deps.CompositionsBase]] -git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" -uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" -version = "0.1.2" -weakdeps = ["InverseFunctions"] - - [deps.CompositionsBase.extensions] - CompositionsBaseInverseFunctionsExt = "InverseFunctions" - -[[deps.ConstructionBase]] -git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" -uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.8" - - [deps.ConstructionBase.extensions] - ConstructionBaseIntervalSetsExt = "IntervalSets" - ConstructionBaseLinearAlgebraExt = "LinearAlgebra" - ConstructionBaseStaticArraysExt = "StaticArrays" - - [deps.ConstructionBase.weakdeps] - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.DataAPI]] -git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" -uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.16.0" - -[[deps.DataValueInterfaces]] -git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" -uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" -version = "1.0.0" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -version = "1.11.0" - -[[deps.DiffResults]] -deps = ["StaticArraysCore"] -git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" -uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" -version = "1.1.0" - -[[deps.DiffRules]] -deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] -git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" -uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.15.1" - -[[deps.Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" -version = "1.11.0" - -[[deps.DocStringExtensions]] -git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.4" - -[[deps.FillArrays]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" -uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.13.0" - - [deps.FillArrays.extensions] - FillArraysPDMatsExt = "PDMats" - FillArraysSparseArraysExt = "SparseArrays" - FillArraysStatisticsExt = "Statistics" - - [deps.FillArrays.weakdeps] - PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[deps.FiniteDifferences]] -deps = ["ChainRulesCore", "LinearAlgebra", "Printf", "Random", "Richardson", "SparseArrays", "StaticArrays"] -git-tree-sha1 = "06d76c780d657729cf20821fb5832c6cc4dfd0b5" -uuid = "26cc04aa-876d-5657-8c51-4c34ba976000" -version = "0.12.32" - -[[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" -uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "1.0.1" -weakdeps = ["StaticArrays"] - - [deps.ForwardDiff.extensions] - ForwardDiffStaticArraysExt = "StaticArrays" - -[[deps.GPUArraysCore]] -deps = ["Adapt"] -git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" -uuid = "46192b85-c4d5-4398-a991-12ede77f4527" -version = "0.2.0" - -[[deps.HalfIntegers]] -git-tree-sha1 = "9c3149243abb5bc0bad0431d6c4fcac0f4443c7c" -uuid = "f0d1745a-41c9-11e9-1dd9-e5d34d218721" -version = "1.6.0" - -[[deps.HashArrayMappedTries]] -git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae" -uuid = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" -version = "0.2.0" - -[[deps.IRTools]] -deps = ["InteractiveUtils", "MacroTools"] -git-tree-sha1 = "950c3717af761bc3ff906c2e8e52bd83390b6ec2" -uuid = "7869d1d1-7146-5819-86e3-90919afe41df" -version = "0.4.14" - -[[deps.InitialValues]] -git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" -uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" -version = "0.3.1" - -[[deps.IntegerMathUtils]] -git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" -uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" -version = "0.1.2" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -version = "1.11.0" - -[[deps.InverseFunctions]] -git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" -uuid = "3587e190-3f89-42d0-90ee-14403ec27112" -version = "0.1.17" - - [deps.InverseFunctions.extensions] - InverseFunctionsDatesExt = "Dates" - InverseFunctionsTestExt = "Test" - - [deps.InverseFunctions.weakdeps] - Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.IrrationalConstants]] -git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" -uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.4" - -[[deps.IteratorInterfaceExtensions]] -git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" -uuid = "82899510-4779-5014-852e-03e436cf321d" -version = "1.0.0" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.7.0" - -[[deps.KrylovKit]] -deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"] -git-tree-sha1 = "38477816f8db29956ea591feb3086d9edabf6f38" -uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" -version = "0.9.5" -weakdeps = ["ChainRulesCore"] - - [deps.KrylovKit.extensions] - KrylovKitChainRulesCoreExt = "ChainRulesCore" - -[[deps.LRUCache]] -git-tree-sha1 = "5519b95a490ff5fe629c4a7aa3b3dfc9160498b3" -uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" -version = "1.6.2" -weakdeps = ["Serialization"] - - [deps.LRUCache.extensions] - SerializationExt = ["Serialization"] - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -version = "1.11.0" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.11.0" - -[[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" -uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.29" - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" - - [deps.LogExpFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -version = "1.11.0" - -[[deps.LoggingExtras]] -deps = ["Dates", "Logging"] -git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" -uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.0.3" - -[[deps.MPSKit]] -deps = ["Accessors", "BlockTensorKit", "Compat", "DocStringExtensions", "HalfIntegers", "KrylovKit", "LinearAlgebra", "LoggingExtras", "OhMyThreads", "OptimKit", "Printf", "Random", "RecipesBase", "TensorKit", "TensorKitManifolds", "TensorOperations", "VectorInterface"] -git-tree-sha1 = "588bef90e9672431efda1b686e8d477b621b2118" -uuid = "bb1c41ca-d63c-52ed-829e-0820dda26502" -version = "0.12.6" - -[[deps.MPSKitModels]] -deps = ["LinearAlgebra", "MPSKit", "MacroTools", "PrecompileTools", "TensorKit", "TensorOperations", "TupleTools"] -git-tree-sha1 = "d658f13d6b1c08304344faede50bebcc4f574b6f" -uuid = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" -version = "0.4.0" - -[[deps.MacroTools]] -git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.15" - -[[deps.Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -version = "1.11.0" - -[[deps.NaNMath]] -deps = ["OpenLibm_jll"] -git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.1.3" - -[[deps.OhMyThreads]] -deps = ["BangBang", "ChunkSplitters", "StableTasks", "TaskLocalValues"] -git-tree-sha1 = "5f81bdb937fd857bac9548fa8ab9390a06864bb5" -uuid = "67456a42-1dca-4109-a031-0a68de7e3ad5" -version = "0.7.0" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.27+1" - -[[deps.OpenLibm_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+4" - -[[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.6+0" - -[[deps.OptimKit]] -deps = ["LinearAlgebra", "Printf", "ScopedValues", "VectorInterface"] -git-tree-sha1 = "b0163ac202bc03aeb15f0e55002e544e74965534" -uuid = "77e91f04-9b3b-57a6-a776-40b61faaebe0" -version = "0.4.0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.8.0" - -[[deps.PEPSKit]] -deps = ["Accessors", "ChainRulesCore", "Compat", "FiniteDifferences", "KrylovKit", "LinearAlgebra", "LoggingExtras", "MPSKit", "MPSKitModels", "OhMyThreads", "OptimKit", "Printf", "Random", "Statistics", "TensorKit", "TensorOperations", "VectorInterface", "Zygote"] -git-tree-sha1 = "12c42d39d9c67070d5783cbd7ebb54ab957c6a09" -uuid = "52969e89-939e-4361-9b68-9bc7cde4bdeb" -version = "0.5.0" - -[[deps.PackageExtensionCompat]] -git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" -uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" -version = "1.0.2" -weakdeps = ["Requires", "TOML"] - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.2.1" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.3" - -[[deps.Primes]] -deps = ["IntegerMathUtils"] -git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" -uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" -version = "0.5.7" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -version = "1.11.0" - -[[deps.PtrArrays]] -git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" -uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" -version = "1.3.0" - -[[deps.Random]] -deps = ["SHA"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -version = "1.11.0" - -[[deps.RationalRoots]] -git-tree-sha1 = "e5f5db699187a4810fda9181b34250deeedafd81" -uuid = "308eb6b3-cc68-5ff3-9e97-c3c4da4fa681" -version = "0.2.1" - -[[deps.RealDot]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" -uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" -version = "0.1.0" - -[[deps.RecipesBase]] -deps = ["PrecompileTools"] -git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.3.4" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.1" - -[[deps.Richardson]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "48f038bfd83344065434089c2a79417f38715c41" -uuid = "708f8203-808e-40c0-ba2d-98a6953ed40d" -version = "1.4.2" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.ScopedValues]] -deps = ["HashArrayMappedTries", "Logging"] -git-tree-sha1 = "1147f140b4c8ddab224c94efa9569fc23d63ab44" -uuid = "7e506255-f358-4e82-b7e4-beb19740aa63" -version = "1.3.0" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -version = "1.11.0" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -version = "1.11.0" - -[[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.11.0" - -[[deps.SparseInverseSubset]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "52962839426b75b3021296f7df242e40ecfc0852" -uuid = "dc90abb0-5640-4711-901d-7e5b23a2fada" -version = "0.1.2" - -[[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "64cca0c26b4f31ba18f13f6c12af7c85f478cfde" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.5.0" -weakdeps = ["ChainRulesCore"] - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" - -[[deps.StableTasks]] -git-tree-sha1 = "c4f6610f85cb965bee5bfafa64cbeeda55a4e0b2" -uuid = "91464d47-22a1-43fe-8b7f-2d57ee82463f" -version = "0.1.7" - -[[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "0feb6b9031bd5c51f9072393eb5ab3efd31bf9e4" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.13" -weakdeps = ["ChainRulesCore", "Statistics"] - - [deps.StaticArrays.extensions] - StaticArraysChainRulesCoreExt = "ChainRulesCore" - StaticArraysStatisticsExt = "Statistics" - -[[deps.StaticArraysCore]] -git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" -uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.3" - -[[deps.Statistics]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.Statistics.extensions] - SparseArraysExt = ["SparseArrays"] - -[[deps.Strided]] -deps = ["LinearAlgebra", "StridedViews", "TupleTools"] -git-tree-sha1 = "4a1128f5237b5d0170d934a2eb4fa7a273639c9f" -uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" -version = "2.3.0" - -[[deps.StridedViews]] -deps = ["LinearAlgebra", "PackageExtensionCompat"] -git-tree-sha1 = "425158c52aa58d42593be6861befadf8b2541e9b" -uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" -version = "0.4.1" - - [deps.StridedViews.extensions] - StridedViewsCUDAExt = "CUDA" - StridedViewsPtrArraysExt = "PtrArrays" - - [deps.StridedViews.weakdeps] - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - PtrArrays = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" - -[[deps.StructArrays]] -deps = ["ConstructionBase", "DataAPI", "Tables"] -git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" -uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" -version = "0.7.1" - - [deps.StructArrays.extensions] - StructArraysAdaptExt = "Adapt" - StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"] - StructArraysLinearAlgebraExt = "LinearAlgebra" - StructArraysSparseArraysExt = "SparseArrays" - StructArraysStaticArraysExt = "StaticArrays" - - [deps.StructArrays.weakdeps] - Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" - GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" - KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.SuiteSparse]] -deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] -uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" - -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.7.0+0" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[deps.TableTraits]] -deps = ["IteratorInterfaceExtensions"] -git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" -uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" -version = "1.0.1" - -[[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" -uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.12.0" - -[[deps.TaskLocalValues]] -git-tree-sha1 = "d155450e6dff2a8bc2fcb81dcb194bd98b0aeb46" -uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" -version = "0.1.2" - -[[deps.TensorKit]] -deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "Random", "SparseArrays", "Strided", "TensorKitSectors", "TensorOperations", "TupleTools", "VectorInterface"] -git-tree-sha1 = "4a09ea843d18b7256f710f1188414433dcf0b7db" -uuid = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" -version = "0.14.5" -weakdeps = ["ChainRulesCore", "FiniteDifferences"] - - [deps.TensorKit.extensions] - TensorKitChainRulesCoreExt = "ChainRulesCore" - TensorKitFiniteDifferencesExt = "FiniteDifferences" - -[[deps.TensorKitManifolds]] -deps = ["LinearAlgebra", "TensorKit"] -git-tree-sha1 = "94530ac4691795834e2efacb2d31d37571dad52f" -uuid = "11fa318c-39cb-4a83-b1ed-cdc7ba1e3684" -version = "0.7.2" - -[[deps.TensorKitSectors]] -deps = ["HalfIntegers", "LinearAlgebra", "TensorOperations", "WignerSymbols"] -git-tree-sha1 = "fd15110964416b3ac3e7d1d212b0260e4629e536" -uuid = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f" -version = "0.1.4" - -[[deps.TensorOperations]] -deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Preferences", "PtrArrays", "Strided", "StridedViews", "TupleTools", "VectorInterface"] -git-tree-sha1 = "c7458aad3d855e892e2cae208a793a5fceee2406" -uuid = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" -version = "5.2.0" - - [deps.TensorOperations.extensions] - TensorOperationsBumperExt = "Bumper" - TensorOperationsChainRulesCoreExt = "ChainRulesCore" - TensorOperationscuTENSORExt = ["cuTENSOR", "CUDA"] - - [deps.TensorOperations.weakdeps] - Bumper = "8ce10254-0962-460f-a3d8-1f77fea1446e" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1" - -[[deps.TupleTools]] -git-tree-sha1 = "41e43b9dc950775eac654b9f845c839cd2f1821e" -uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" -version = "1.6.0" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -version = "1.11.0" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -version = "1.11.0" - -[[deps.VectorInterface]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9166406dedd38c111a6574e9814be83d267f8aec" -uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8" -version = "0.5.0" - -[[deps.WignerSymbols]] -deps = ["HalfIntegers", "LRUCache", "Primes", "RationalRoots"] -git-tree-sha1 = "960e5f708871c1d9a28a7f1dbcaf4e0ee34ee960" -uuid = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" -version = "2.0.0" - -[[deps.Zygote]] -deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] -git-tree-sha1 = "207d714f3514b0d564e3a08f9e9f753bf6566c2d" -uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" -version = "0.7.6" - - [deps.Zygote.extensions] - ZygoteAtomExt = "Atom" - ZygoteColorsExt = "Colors" - ZygoteDistancesExt = "Distances" - ZygoteTrackerExt = "Tracker" - - [deps.Zygote.weakdeps] - Atom = "c52e3926-4ff0-5f6e-af25-54175e0327b1" - Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" - Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.ZygoteRules]] -deps = ["ChainRulesCore", "MacroTools"] -git-tree-sha1 = "434b3de333c75fc446aa0d19fc394edafd07ab08" -uuid = "700de1a5-db45-46bc-99cf-38207098b444" -version = "0.2.7" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.11.0+0" -""" - -# ╔═╡ Cell order: -# ╠═118fb1e5-dce5-4eaf-9d85-7a2365409091 -# ╠═dbe8239a-f481-4681-95bc-ed464560a13b -# ╠═a43c4ba1-af3d-41a6-b3ea-e1c78f1fe461 -# ╠═8c88c236-43da-497b-b083-dcb9ee7888a2 -# ╠═c115b454-1fa8-47b5-a510-b4be607dd8ba -# ╠═2bec4073-864c-444b-a06d-aac1d7bdd9f7 -# ╠═c633965b-82b7-4bb4-8a45-52a34ccc6a84 -# ╠═b6f2d6f7-4be6-4067-ae4b-5f318531574b -# ╠═43857112-b6d5-4da8-9e5a-f55d48e5006a -# ╠═08d95080-b23c-4dbd-bc47-6f7f5de53662 -# ╠═4d3f9e11-ec65-4187-a610-f38c5780506c -# ╠═eb2f129c-0169-4185-a878-4944a3d1fd4d -# ╠═a18b57e6-15dc-4147-a327-50c957ad96ca -# ╠═f61f0b2f-da31-43c8-8d5e-6cb690b4d9ae -# ╠═7a257773-171b-4191-8011-f96f8754c571 -# ╠═2dbf8595-a3b9-4836-a90f-335d7000cbd6 -# ╠═95aabe91-9be6-4fa1-8ee7-24c01f500f88 -# ╠═f3528aa8-ef8d-4579-bdf5-95fedf9fdd08 -# ╠═08213456-9a3f-44ed-99f3-11dff12cda9a -# ╠═dc9c03ce-d620-4874-8e5b-e4d64758fc09 -# ╠═1088908b-fe26-4471-93ba-a8f4766582e3 -# ╠═b41e515b-8ba7-4cf6-8502-ed7cdd2a1e04 -# ╠═710db80f-468c-43a8-9899-cca2c95935e0 -# ╠═b4f46884-100a-4208-83d1-9ea11fd10e2f -# ╠═341f420e-ffbe-41b1-836b-75046c4ee62a -# ╠═7e3822b5-a1e7-4a2b-a6db-caa80004dfca -# ╠═d75423c9-0c97-4711-97d1-5a812cd63c51 -# ╠═d05a10e1-33b5-4c46-9f39-8604b12087fb -# ╠═642ab5a8-193a-11f0-01d7-3172b0c1a5c0 -# ╠═d7d2e27d-01dc-4c3c-9ce9-6ac06581ec87 -# ╠═8e7cc822-d193-4757-b54e-a21e2ba1009b -# ╟─00000000-0000-0000-0000-000000000001 -# ╟─00000000-0000-0000-0000-000000000002 diff --git a/examples/5.fermi_hubbard/fermi_hubbard.jl b/examples/5.fermi_hubbard/fermi_hubbard.jl deleted file mode 100644 index a42b767d0..000000000 --- a/examples/5.fermi_hubbard/fermi_hubbard.jl +++ /dev/null @@ -1,944 +0,0 @@ -### A Pluto.jl notebook ### -# v0.20.5 - -using Markdown -using InteractiveUtils - -# ╔═╡ e37d4924-e7ec-47b6-abd2-729e3736ca0a -using Random - -# ╔═╡ ca35aca6-fd69-4a08-9cde-34e2570e1cca -using TensorKit, PEPSKit - -# ╔═╡ 88782296-e160-4633-bca9-e3becc1012a2 -using MPSKit: add_physical_charge - -# ╔═╡ 596482a0-61c1-45d2-9c3b-d65f78c8b280 -md""" -# Fermi-Hubbard model with ``f\mathbb{Z}_2 \boxtimes U(1)`` symmetry, at large ``U`` and half-filling - -In this example, we will demonstrate how to handle fermionic PEPS tensors and how to optimize them. To that end, we consider the two-dimensional Hubbard model - -```math -H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- + c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i -``` - -where ``\sigma \in \{\uparrow,\downarrow\}`` and ``n_{i,\sigma} = c_{i,\sigma}^+ c_{i,\sigma}^-`` is the fermionic number operator. As in previous examples, using fermionic degrees of freedom is a matter of creating tensors with the right symmetry sectors - the rest of the simulation workflow remains the same. - -First though, we make the example deterministic by seeding the RNG, and we make our imports: -""" - -# ╔═╡ f6caf5ba-2777-46bb-9795-29f960894d6c -Random.seed!(2928528937); - -# ╔═╡ d8403224-d288-4ddc-b587-2c3d4e824090 -md""" -## Defining the fermionic Hamiltonian - -Let us start by fixing the parameters of the Hubbard model. We're going to use a hopping of ``t=1`` and a large ``U=8`` on a ``2 \times 2`` unit cell: -""" - -# ╔═╡ c53436e1-97eb-4371-853a-48071bfdb2ac -t = 1.0; - -# ╔═╡ 07accc9f-a371-4c7c-a31b-304d89447250 -U = 8.0; - -# ╔═╡ b7c9d9ca-3ff5-4808-8dfc-c6c71ea0143e -lattice = InfiniteSquare(2, 2); - -# ╔═╡ 07089315-c37b-4bd7-bf48-de2e6b5cc5c5 -md""" -In order to create fermionic tensors, one needs to define symmetry sectors using TensorKit's [`FermionParity`](@extref). Not only do we want use fermion parity but we also want our particles to exploit the global ``U(1)`` symmetry. The combined product sector can be obtained using the [Deligne product](https://jutho.github.io/TensorKit.jl/stable/lib/sectors/#TensorKitSectors.deligneproduct-Tuple{Sector,%20Sector}), called through `⊠` which is obtained by typing `\boxtimes+TAB`. We will not impose any extra spin symmetry, so we have: -""" - -# ╔═╡ e770f01b-7e23-45b4-a460-ad237a778f47 -fermion = fℤ₂; - -# ╔═╡ 8f072cdb-7872-445b-bbab-949a17cda272 -particle_symmetry = U1Irrep; - -# ╔═╡ 72276f14-447f-4ddf-b06c-a2432be93b59 -spin_symmetry = Trivial; - -# ╔═╡ 6644b0cf-c7c6-4c25-a5c5-ef2a826e5b90 -S = fermion ⊠ particle_symmetry; - -# ╔═╡ 77c04811-60d6-4c93-9083-e17dba8c61d2 -md""" -The next step is defining graded virtual PEPS and environment spaces using `S`. Here we also use the symmetry sector to impose half-filling. That is all we need to define the Hubbard Hamiltonian: -""" - -# ╔═╡ 679cc5c6-0121-43d4-8179-8cbe1084215e -D, χ = 1, 1; - -# ╔═╡ 1560d618-c782-4d12-9817-b66a01435c72 -V_peps = Vect[S]((0, 0) => 2 * D, (1, 1) => D, (1, -1) => D); - -# ╔═╡ 5a2ee7f3-e73b-42ba-8743-09f152921fda -V_env = Vect[S]( - (0, 0) => 4 * χ, (1, -1) => 2 * χ, (1, 1) => 2 * χ, (0, 2) => χ, (0, -2) => χ -); - -# ╔═╡ d8b05a5f-bc86-4678-8595-bb296f86f28a -S_aux = S((1, -1)); - -# ╔═╡ 8daa6402-82d7-4a7c-85a1-295fbbc5a9e1 -H₀ = hubbard_model(ComplexF64, particle_symmetry, spin_symmetry, lattice; t, U); - -# ╔═╡ c6604da5-7125-4370-8824-578362ae16a2 -H = add_physical_charge(H₀, fill(S_aux, size(H₀.lattice)...)); - -# ╔═╡ 37c1c825-c6b5-4a4f-902b-b3299869dcc1 -md""" -## Finding the ground state - -Again, the procedure of ground state optimization is very similar to before. First, we define all algorithmic parameters: -""" - -# ╔═╡ f09bd4cf-d41d-4c15-943f-a9315aa3d8e3 -boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)); - -# ╔═╡ b1db3cbb-aef4-4ffb-8fcc-cc5948247299 -gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge); - -# ╔═╡ cd49f55e-94a7-481e-8287-1e80a0f4034f -optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2); - -# ╔═╡ 7f59f1d9-b7db-4ee6-a99d-7999a83d6a53 -md""" -Second, we initialize a PEPS state and environment (which we converge) constructed from symmetric physical and virtual spaces: -""" - -# ╔═╡ 0b8154c9-9638-4c9e-8f40-ab73b667ffb1 -physical_spaces = H.lattice; - -# ╔═╡ 40bb6832-e12d-4341-8d12-defc54d79145 -virtual_spaces = fill(V_peps, size(lattice)...); - -# ╔═╡ 378bcccd-3803-4754-928d-a437fe457e9f -peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces); - -# ╔═╡ 1a70d171-4087-4f1d-8ba7-41a178c8f80b -env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); - -# ╔═╡ 63230dd6-98c5-44b0-b0a4-d7bb51e44445 -md""" -And third, we start the ground state search (this does take quite long): -""" - -# ╔═╡ 6081ea87-09a4-4b52-96fc-753cb94a5d36 -peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg); - -# ╔═╡ 69c92f0b-3598-4f92-8475-52f4eee2c03c -@show E - -# ╔═╡ a872f393-fbd9-432a-aabc-ddd33f33f450 -md""" -Finally, let's compare the obtained energy against a reference energy from a QMC study by [Qin et al.](@cite qin_benchmark_2016). With the parameters specified above, they obtain an energy of ``E_\text{ref} \approx 4 \times -0.5244140625 = -2.09765625`` (the factor 4 comes from the ``2 \times 2`` unit cell that we use here). Thus, we find: -""" - -# ╔═╡ 8d8baa3a-df5b-45e0-be1f-56f6dcd99ff7 -E_ref = -2.09765625; - -# ╔═╡ d5e10a13-402d-4995-9594-b4e3623a87ce -@show (E - E_ref) / E_ref - -# ╔═╡ 00000000-0000-0000-0000-000000000001 -PLUTO_PROJECT_TOML_CONTENTS = """ -[deps] -MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502" -PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" -Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" - -[compat] -MPSKit = "~0.12.6" -PEPSKit = "~0.5.0" -TensorKit = "~0.14.5" -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000002 -PLUTO_MANIFEST_TOML_CONTENTS = """ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.11.4" -manifest_format = "2.0" -project_hash = "c70e6e86b5621a8e0ee82a182ffe7c3e8712cf1e" - -[[deps.AbstractFFTs]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" -uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" -version = "1.5.0" - - [deps.AbstractFFTs.extensions] - AbstractFFTsChainRulesCoreExt = "ChainRulesCore" - AbstractFFTsTestExt = "Test" - - [deps.AbstractFFTs.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] -git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" -uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" -version = "0.1.42" - - [deps.Accessors.extensions] - AxisKeysExt = "AxisKeys" - IntervalSetsExt = "IntervalSets" - LinearAlgebraExt = "LinearAlgebra" - StaticArraysExt = "StaticArrays" - StructArraysExt = "StructArrays" - TestExt = "Test" - UnitfulExt = "Unitful" - - [deps.Accessors.weakdeps] - AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - -[[deps.Adapt]] -deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" -uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.3.0" -weakdeps = ["SparseArrays", "StaticArrays"] - - [deps.Adapt.extensions] - AdaptSparseArraysExt = "SparseArrays" - AdaptStaticArraysExt = "StaticArrays" - -[[deps.ArrayLayouts]] -deps = ["FillArrays", "LinearAlgebra"] -git-tree-sha1 = "4e25216b8fea1908a0ce0f5d87368587899f75be" -uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.ArrayLayouts.extensions] - ArrayLayoutsSparseArraysExt = "SparseArrays" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -version = "1.11.0" - -[[deps.BangBang]] -deps = ["Accessors", "ConstructionBase", "InitialValues", "LinearAlgebra"] -git-tree-sha1 = "26f41e1df02c330c4fa1e98d4aa2168fdafc9b1f" -uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" -version = "0.4.4" - - [deps.BangBang.extensions] - BangBangChainRulesCoreExt = "ChainRulesCore" - BangBangDataFramesExt = "DataFrames" - BangBangStaticArraysExt = "StaticArrays" - BangBangStructArraysExt = "StructArrays" - BangBangTablesExt = "Tables" - BangBangTypedTablesExt = "TypedTables" - - [deps.BangBang.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" - TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -version = "1.11.0" - -[[deps.BlockArrays]] -deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "df1746706459aa184ed3424b240a917b89d67b60" -uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -version = "1.6.1" - - [deps.BlockArrays.extensions] - BlockArraysAdaptExt = "Adapt" - BlockArraysBandedMatricesExt = "BandedMatrices" - - [deps.BlockArrays.weakdeps] - Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - -[[deps.BlockTensorKit]] -deps = ["BlockArrays", "Compat", "LinearAlgebra", "Random", "Strided", "TensorKit", "TensorOperations", "TupleTools", "VectorInterface"] -git-tree-sha1 = "e0d455f2998aca33747def4f384c1aff5e3278de" -uuid = "5f87ffc2-9cf1-4a46-8172-465d160bd8cd" -version = "0.1.6" - -[[deps.ChainRules]] -deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "SparseInverseSubset", "Statistics", "StructArrays", "SuiteSparse"] -git-tree-sha1 = "a975ae558af61a2a48720a6271661bf2621e0f4e" -uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" -version = "1.72.3" - -[[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "1713c74e00545bfe14605d2a2be1712de8fbcb58" -uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.25.1" -weakdeps = ["SparseArrays"] - - [deps.ChainRulesCore.extensions] - ChainRulesCoreSparseArraysExt = "SparseArrays" - -[[deps.ChunkSplitters]] -git-tree-sha1 = "63a3903063d035260f0f6eab00f517471c5dc784" -uuid = "ae650224-84b6-46f8-82ea-d812ca08434e" -version = "3.1.2" - -[[deps.CommonSubexpressions]] -deps = ["MacroTools"] -git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" -uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.1" - -[[deps.Compat]] -deps = ["TOML", "UUIDs"] -git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.16.0" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.1.1+0" - -[[deps.CompositionsBase]] -git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" -uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" -version = "0.1.2" -weakdeps = ["InverseFunctions"] - - [deps.CompositionsBase.extensions] - CompositionsBaseInverseFunctionsExt = "InverseFunctions" - -[[deps.ConstructionBase]] -git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" -uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.8" - - [deps.ConstructionBase.extensions] - ConstructionBaseIntervalSetsExt = "IntervalSets" - ConstructionBaseLinearAlgebraExt = "LinearAlgebra" - ConstructionBaseStaticArraysExt = "StaticArrays" - - [deps.ConstructionBase.weakdeps] - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.DataAPI]] -git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" -uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.16.0" - -[[deps.DataValueInterfaces]] -git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" -uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" -version = "1.0.0" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -version = "1.11.0" - -[[deps.DiffResults]] -deps = ["StaticArraysCore"] -git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" -uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" -version = "1.1.0" - -[[deps.DiffRules]] -deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] -git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" -uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.15.1" - -[[deps.Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" -version = "1.11.0" - -[[deps.DocStringExtensions]] -git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.4" - -[[deps.FillArrays]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" -uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.13.0" - - [deps.FillArrays.extensions] - FillArraysPDMatsExt = "PDMats" - FillArraysSparseArraysExt = "SparseArrays" - FillArraysStatisticsExt = "Statistics" - - [deps.FillArrays.weakdeps] - PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[deps.FiniteDifferences]] -deps = ["ChainRulesCore", "LinearAlgebra", "Printf", "Random", "Richardson", "SparseArrays", "StaticArrays"] -git-tree-sha1 = "06d76c780d657729cf20821fb5832c6cc4dfd0b5" -uuid = "26cc04aa-876d-5657-8c51-4c34ba976000" -version = "0.12.32" - -[[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" -uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "1.0.1" -weakdeps = ["StaticArrays"] - - [deps.ForwardDiff.extensions] - ForwardDiffStaticArraysExt = "StaticArrays" - -[[deps.GPUArraysCore]] -deps = ["Adapt"] -git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" -uuid = "46192b85-c4d5-4398-a991-12ede77f4527" -version = "0.2.0" - -[[deps.HalfIntegers]] -git-tree-sha1 = "9c3149243abb5bc0bad0431d6c4fcac0f4443c7c" -uuid = "f0d1745a-41c9-11e9-1dd9-e5d34d218721" -version = "1.6.0" - -[[deps.HashArrayMappedTries]] -git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae" -uuid = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" -version = "0.2.0" - -[[deps.IRTools]] -deps = ["InteractiveUtils", "MacroTools"] -git-tree-sha1 = "950c3717af761bc3ff906c2e8e52bd83390b6ec2" -uuid = "7869d1d1-7146-5819-86e3-90919afe41df" -version = "0.4.14" - -[[deps.InitialValues]] -git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" -uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" -version = "0.3.1" - -[[deps.IntegerMathUtils]] -git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" -uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" -version = "0.1.2" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -version = "1.11.0" - -[[deps.InverseFunctions]] -git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" -uuid = "3587e190-3f89-42d0-90ee-14403ec27112" -version = "0.1.17" - - [deps.InverseFunctions.extensions] - InverseFunctionsDatesExt = "Dates" - InverseFunctionsTestExt = "Test" - - [deps.InverseFunctions.weakdeps] - Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.IrrationalConstants]] -git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" -uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.4" - -[[deps.IteratorInterfaceExtensions]] -git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" -uuid = "82899510-4779-5014-852e-03e436cf321d" -version = "1.0.0" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.7.0" - -[[deps.KrylovKit]] -deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"] -git-tree-sha1 = "38477816f8db29956ea591feb3086d9edabf6f38" -uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" -version = "0.9.5" -weakdeps = ["ChainRulesCore"] - - [deps.KrylovKit.extensions] - KrylovKitChainRulesCoreExt = "ChainRulesCore" - -[[deps.LRUCache]] -git-tree-sha1 = "5519b95a490ff5fe629c4a7aa3b3dfc9160498b3" -uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" -version = "1.6.2" -weakdeps = ["Serialization"] - - [deps.LRUCache.extensions] - SerializationExt = ["Serialization"] - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -version = "1.11.0" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.11.0" - -[[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" -uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.29" - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" - - [deps.LogExpFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -version = "1.11.0" - -[[deps.LoggingExtras]] -deps = ["Dates", "Logging"] -git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" -uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.0.3" - -[[deps.MPSKit]] -deps = ["Accessors", "BlockTensorKit", "Compat", "DocStringExtensions", "HalfIntegers", "KrylovKit", "LinearAlgebra", "LoggingExtras", "OhMyThreads", "OptimKit", "Printf", "Random", "RecipesBase", "TensorKit", "TensorKitManifolds", "TensorOperations", "VectorInterface"] -git-tree-sha1 = "588bef90e9672431efda1b686e8d477b621b2118" -uuid = "bb1c41ca-d63c-52ed-829e-0820dda26502" -version = "0.12.6" - -[[deps.MPSKitModels]] -deps = ["LinearAlgebra", "MPSKit", "MacroTools", "PrecompileTools", "TensorKit", "TensorOperations", "TupleTools"] -git-tree-sha1 = "d658f13d6b1c08304344faede50bebcc4f574b6f" -uuid = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" -version = "0.4.0" - -[[deps.MacroTools]] -git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.15" - -[[deps.Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -version = "1.11.0" - -[[deps.NaNMath]] -deps = ["OpenLibm_jll"] -git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.1.3" - -[[deps.OhMyThreads]] -deps = ["BangBang", "ChunkSplitters", "StableTasks", "TaskLocalValues"] -git-tree-sha1 = "5f81bdb937fd857bac9548fa8ab9390a06864bb5" -uuid = "67456a42-1dca-4109-a031-0a68de7e3ad5" -version = "0.7.0" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.27+1" - -[[deps.OpenLibm_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+4" - -[[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.6+0" - -[[deps.OptimKit]] -deps = ["LinearAlgebra", "Printf", "ScopedValues", "VectorInterface"] -git-tree-sha1 = "b0163ac202bc03aeb15f0e55002e544e74965534" -uuid = "77e91f04-9b3b-57a6-a776-40b61faaebe0" -version = "0.4.0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.8.0" - -[[deps.PEPSKit]] -deps = ["Accessors", "ChainRulesCore", "Compat", "FiniteDifferences", "KrylovKit", "LinearAlgebra", "LoggingExtras", "MPSKit", "MPSKitModels", "OhMyThreads", "OptimKit", "Printf", "Random", "Statistics", "TensorKit", "TensorOperations", "VectorInterface", "Zygote"] -git-tree-sha1 = "12c42d39d9c67070d5783cbd7ebb54ab957c6a09" -uuid = "52969e89-939e-4361-9b68-9bc7cde4bdeb" -version = "0.5.0" - -[[deps.PackageExtensionCompat]] -git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" -uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" -version = "1.0.2" -weakdeps = ["Requires", "TOML"] - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.2.1" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.3" - -[[deps.Primes]] -deps = ["IntegerMathUtils"] -git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" -uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" -version = "0.5.7" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -version = "1.11.0" - -[[deps.PtrArrays]] -git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" -uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" -version = "1.3.0" - -[[deps.Random]] -deps = ["SHA"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -version = "1.11.0" - -[[deps.RationalRoots]] -git-tree-sha1 = "e5f5db699187a4810fda9181b34250deeedafd81" -uuid = "308eb6b3-cc68-5ff3-9e97-c3c4da4fa681" -version = "0.2.1" - -[[deps.RealDot]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" -uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" -version = "0.1.0" - -[[deps.RecipesBase]] -deps = ["PrecompileTools"] -git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.3.4" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.1" - -[[deps.Richardson]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "48f038bfd83344065434089c2a79417f38715c41" -uuid = "708f8203-808e-40c0-ba2d-98a6953ed40d" -version = "1.4.2" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.ScopedValues]] -deps = ["HashArrayMappedTries", "Logging"] -git-tree-sha1 = "1147f140b4c8ddab224c94efa9569fc23d63ab44" -uuid = "7e506255-f358-4e82-b7e4-beb19740aa63" -version = "1.3.0" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -version = "1.11.0" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -version = "1.11.0" - -[[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.11.0" - -[[deps.SparseInverseSubset]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "52962839426b75b3021296f7df242e40ecfc0852" -uuid = "dc90abb0-5640-4711-901d-7e5b23a2fada" -version = "0.1.2" - -[[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "64cca0c26b4f31ba18f13f6c12af7c85f478cfde" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.5.0" -weakdeps = ["ChainRulesCore"] - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" - -[[deps.StableTasks]] -git-tree-sha1 = "c4f6610f85cb965bee5bfafa64cbeeda55a4e0b2" -uuid = "91464d47-22a1-43fe-8b7f-2d57ee82463f" -version = "0.1.7" - -[[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "0feb6b9031bd5c51f9072393eb5ab3efd31bf9e4" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.13" -weakdeps = ["ChainRulesCore", "Statistics"] - - [deps.StaticArrays.extensions] - StaticArraysChainRulesCoreExt = "ChainRulesCore" - StaticArraysStatisticsExt = "Statistics" - -[[deps.StaticArraysCore]] -git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" -uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.3" - -[[deps.Statistics]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.Statistics.extensions] - SparseArraysExt = ["SparseArrays"] - -[[deps.Strided]] -deps = ["LinearAlgebra", "StridedViews", "TupleTools"] -git-tree-sha1 = "4a1128f5237b5d0170d934a2eb4fa7a273639c9f" -uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" -version = "2.3.0" - -[[deps.StridedViews]] -deps = ["LinearAlgebra", "PackageExtensionCompat"] -git-tree-sha1 = "425158c52aa58d42593be6861befadf8b2541e9b" -uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" -version = "0.4.1" - - [deps.StridedViews.extensions] - StridedViewsCUDAExt = "CUDA" - StridedViewsPtrArraysExt = "PtrArrays" - - [deps.StridedViews.weakdeps] - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - PtrArrays = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" - -[[deps.StructArrays]] -deps = ["ConstructionBase", "DataAPI", "Tables"] -git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" -uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" -version = "0.7.1" - - [deps.StructArrays.extensions] - StructArraysAdaptExt = "Adapt" - StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"] - StructArraysLinearAlgebraExt = "LinearAlgebra" - StructArraysSparseArraysExt = "SparseArrays" - StructArraysStaticArraysExt = "StaticArrays" - - [deps.StructArrays.weakdeps] - Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" - GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" - KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.SuiteSparse]] -deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] -uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" - -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.7.0+0" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[deps.TableTraits]] -deps = ["IteratorInterfaceExtensions"] -git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" -uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" -version = "1.0.1" - -[[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" -uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.12.0" - -[[deps.TaskLocalValues]] -git-tree-sha1 = "d155450e6dff2a8bc2fcb81dcb194bd98b0aeb46" -uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" -version = "0.1.2" - -[[deps.TensorKit]] -deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "Random", "SparseArrays", "Strided", "TensorKitSectors", "TensorOperations", "TupleTools", "VectorInterface"] -git-tree-sha1 = "4a09ea843d18b7256f710f1188414433dcf0b7db" -uuid = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" -version = "0.14.5" -weakdeps = ["ChainRulesCore", "FiniteDifferences"] - - [deps.TensorKit.extensions] - TensorKitChainRulesCoreExt = "ChainRulesCore" - TensorKitFiniteDifferencesExt = "FiniteDifferences" - -[[deps.TensorKitManifolds]] -deps = ["LinearAlgebra", "TensorKit"] -git-tree-sha1 = "94530ac4691795834e2efacb2d31d37571dad52f" -uuid = "11fa318c-39cb-4a83-b1ed-cdc7ba1e3684" -version = "0.7.2" - -[[deps.TensorKitSectors]] -deps = ["HalfIntegers", "LinearAlgebra", "TensorOperations", "WignerSymbols"] -git-tree-sha1 = "fd15110964416b3ac3e7d1d212b0260e4629e536" -uuid = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f" -version = "0.1.4" - -[[deps.TensorOperations]] -deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Preferences", "PtrArrays", "Strided", "StridedViews", "TupleTools", "VectorInterface"] -git-tree-sha1 = "c7458aad3d855e892e2cae208a793a5fceee2406" -uuid = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" -version = "5.2.0" - - [deps.TensorOperations.extensions] - TensorOperationsBumperExt = "Bumper" - TensorOperationsChainRulesCoreExt = "ChainRulesCore" - TensorOperationscuTENSORExt = ["cuTENSOR", "CUDA"] - - [deps.TensorOperations.weakdeps] - Bumper = "8ce10254-0962-460f-a3d8-1f77fea1446e" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1" - -[[deps.TupleTools]] -git-tree-sha1 = "41e43b9dc950775eac654b9f845c839cd2f1821e" -uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" -version = "1.6.0" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -version = "1.11.0" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -version = "1.11.0" - -[[deps.VectorInterface]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9166406dedd38c111a6574e9814be83d267f8aec" -uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8" -version = "0.5.0" - -[[deps.WignerSymbols]] -deps = ["HalfIntegers", "LRUCache", "Primes", "RationalRoots"] -git-tree-sha1 = "960e5f708871c1d9a28a7f1dbcaf4e0ee34ee960" -uuid = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" -version = "2.0.0" - -[[deps.Zygote]] -deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] -git-tree-sha1 = "207d714f3514b0d564e3a08f9e9f753bf6566c2d" -uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" -version = "0.7.6" - - [deps.Zygote.extensions] - ZygoteAtomExt = "Atom" - ZygoteColorsExt = "Colors" - ZygoteDistancesExt = "Distances" - ZygoteTrackerExt = "Tracker" - - [deps.Zygote.weakdeps] - Atom = "c52e3926-4ff0-5f6e-af25-54175e0327b1" - Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" - Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.ZygoteRules]] -deps = ["ChainRulesCore", "MacroTools"] -git-tree-sha1 = "434b3de333c75fc446aa0d19fc394edafd07ab08" -uuid = "700de1a5-db45-46bc-99cf-38207098b444" -version = "0.2.7" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.11.0+0" -""" - -# ╔═╡ Cell order: -# ╠═596482a0-61c1-45d2-9c3b-d65f78c8b280 -# ╠═e37d4924-e7ec-47b6-abd2-729e3736ca0a -# ╠═f6caf5ba-2777-46bb-9795-29f960894d6c -# ╠═ca35aca6-fd69-4a08-9cde-34e2570e1cca -# ╠═88782296-e160-4633-bca9-e3becc1012a2 -# ╠═d8403224-d288-4ddc-b587-2c3d4e824090 -# ╠═c53436e1-97eb-4371-853a-48071bfdb2ac -# ╠═07accc9f-a371-4c7c-a31b-304d89447250 -# ╠═b7c9d9ca-3ff5-4808-8dfc-c6c71ea0143e -# ╠═07089315-c37b-4bd7-bf48-de2e6b5cc5c5 -# ╠═e770f01b-7e23-45b4-a460-ad237a778f47 -# ╠═8f072cdb-7872-445b-bbab-949a17cda272 -# ╠═72276f14-447f-4ddf-b06c-a2432be93b59 -# ╠═6644b0cf-c7c6-4c25-a5c5-ef2a826e5b90 -# ╠═77c04811-60d6-4c93-9083-e17dba8c61d2 -# ╠═679cc5c6-0121-43d4-8179-8cbe1084215e -# ╠═1560d618-c782-4d12-9817-b66a01435c72 -# ╠═5a2ee7f3-e73b-42ba-8743-09f152921fda -# ╠═d8b05a5f-bc86-4678-8595-bb296f86f28a -# ╠═8daa6402-82d7-4a7c-85a1-295fbbc5a9e1 -# ╠═c6604da5-7125-4370-8824-578362ae16a2 -# ╠═37c1c825-c6b5-4a4f-902b-b3299869dcc1 -# ╠═f09bd4cf-d41d-4c15-943f-a9315aa3d8e3 -# ╠═b1db3cbb-aef4-4ffb-8fcc-cc5948247299 -# ╠═cd49f55e-94a7-481e-8287-1e80a0f4034f -# ╠═7f59f1d9-b7db-4ee6-a99d-7999a83d6a53 -# ╠═0b8154c9-9638-4c9e-8f40-ab73b667ffb1 -# ╠═40bb6832-e12d-4341-8d12-defc54d79145 -# ╠═378bcccd-3803-4754-928d-a437fe457e9f -# ╠═1a70d171-4087-4f1d-8ba7-41a178c8f80b -# ╠═63230dd6-98c5-44b0-b0a4-d7bb51e44445 -# ╠═6081ea87-09a4-4b52-96fc-753cb94a5d36 -# ╠═69c92f0b-3598-4f92-8475-52f4eee2c03c -# ╠═a872f393-fbd9-432a-aabc-ddd33f33f450 -# ╠═8d8baa3a-df5b-45e0-be1f-56f6dcd99ff7 -# ╠═d5e10a13-402d-4995-9594-b4e3623a87ce -# ╟─00000000-0000-0000-0000-000000000001 -# ╟─00000000-0000-0000-0000-000000000002 diff --git a/examples/5.fermi_hubbard/main.jl b/examples/5.fermi_hubbard/main.jl new file mode 100644 index 000000000..13b9294ef --- /dev/null +++ b/examples/5.fermi_hubbard/main.jl @@ -0,0 +1,102 @@ +using Markdown +md""" +# Fermi-Hubbard model with $f\mathbb{Z}_2 \boxtimes U(1)$ symmetry, at large $U$ and half-filling + +In this example, we will demonstrate how to handle fermionic PEPS tensors and how to +optimize them. To that end, we consider the two-dimensional Hubbard model + +```math +H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- + +c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i +``` + +where $\sigma \in \{\uparrow,\downarrow\}$ and $n_{i,\sigma} = c_{i,\sigma}^+ c_{i,\sigma}^-$ +is the fermionic number operator. As in previous examples, using fermionic degrees of freedom +is a matter of creating tensors with the right symmetry sectors - the rest of the simulation +workflow remains the same. + +First though, we make the example deterministic by seeding the RNG, and we make our imports: +""" + +using Random +using TensorKit, PEPSKit +using MPSKit: add_physical_charge +Random.seed!(2928528937); + +md""" +## Defining the fermionic Hamiltonian + +Let us start by fixing the parameters of the Hubbard model. We're going to use a hopping of +$t=1$ and a large $U=8$ on a $2 \times 2$ unit cell: +""" + +t = 1.0 +U = 8.0 +lattice = InfiniteSquare(2, 2); + +md""" +In order to create fermionic tensors, one needs to define symmetry sectors using TensorKit's +[`FermionParity`](@extref). Not only do we want use fermion parity but we also want our +particles to exploit the global $U(1)$ symmetry. The combined product sector can be obtained +using the [Deligne product](https://jutho.github.io/TensorKit.jl/stable/lib/sectors/#TensorKitSectors.deligneproduct-Tuple{Sector,%20Sector}), +called through `⊠` which is obtained by typing `\boxtimes+TAB`. We will not impose any extra +spin symmetry, so we have: +""" + +fermion = fℤ₂ +particle_symmetry = U1Irrep +spin_symmetry = Trivial +S = fermion ⊠ particle_symmetry + +md""" +The next step is defining graded virtual PEPS and environment spaces using `S`. Here we also +use the symmetry sector to impose half-filling. That is all we need to define the Hubbard +Hamiltonian: +""" + +D, χ = 1, 1 +V_peps = Vect[S]((0, 0) => 2 * D, (1, 1) => D, (1, -1) => D) +V_env = Vect[S]( + (0, 0) => 4 * χ, (1, -1) => 2 * χ, (1, 1) => 2 * χ, (0, 2) => χ, (0, -2) => χ +) +S_aux = S((1, -1)) +H₀ = hubbard_model(ComplexF64, particle_symmetry, spin_symmetry, lattice; t, U) +H = add_physical_charge(H₀, fill(S_aux, size(H₀.lattice)...)); + +md""" +## Finding the ground state + +Again, the procedure of ground state optimization is very similar to before. First, we +define all algorithmic parameters: +""" + +boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)) +gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge) +optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2) + +md""" +Second, we initialize a PEPS state and environment (which we converge) constructed from +symmetric physical and virtual spaces: +""" + +physical_spaces = H.lattice +virtual_spaces = fill(V_peps, size(lattice)...) +peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) +env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); + +md""" +And third, we start the ground state search (this does take quite long): +""" + +peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg) +@show E; + +md""" +Finally, let's compare the obtained energy against a reference energy from a QMC study by +[Qin et al.](@cite qin_benchmark_2016). With the parameters specified above, they obtain an +energy of $E_\text{ref} \approx 4 \times -0.5244140625 = -2.09765625$ (the factor 4 comes +from the $2 \times 2$ unit cell that we use here). Thus, we find: +""" + +E_ref = -2.09765625 +@show (E - E_ref) / E_ref; diff --git a/examples/6.hubbard_su/hubbard_su.jl b/examples/6.hubbard_su/hubbard_su.jl deleted file mode 100644 index c069659cb..000000000 --- a/examples/6.hubbard_su/hubbard_su.jl +++ /dev/null @@ -1,954 +0,0 @@ -### A Pluto.jl notebook ### -# v0.20.5 - -using Markdown -using InteractiveUtils - -# ╔═╡ 4aff432e-e8a9-441f-8c72-ba3609d99eba -using Random - -# ╔═╡ 4f49c108-6b3c-4d6a-a99f-90922ab8e114 -using TensorKit, PEPSKit - -# ╔═╡ ba26b46c-4ccd-426b-a3c7-c71c5051f390 -md""" -# Hubbard model imaginary time evolution using simple update - -Once again, we consider the Hubbard model but this time we obtain the ground-state PEPS by imaginary time evoluation. In particular, we'll use the [`SimpleUpdate`](@ref) algorithm. As a reminder, we define the Hubbard model as - -```math -H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- + c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i -``` - -with ``\sigma \in \{\uparrow,\downarrow\}`` and ``n_{i,\sigma} = c_{i,\sigma}^+ c_{i,\sigma}^-``. - -Let's get started by seeding the RNG and importing the required modules: -""" - -# ╔═╡ b1bcace2-28ff-4475-acb2-3ef8e9ca7033 -Random.seed!(1298351928); - -# ╔═╡ 1a979cdf-711e-414b-8566-c23638e760d2 -md""" -## Defining the Hamiltonian - -First, we define the Hubbard model at ``t=1`` hopping and ``U=6`` using `Trivial` sectors for the particle and spin symmetries: -""" - -# ╔═╡ 452bf333-e3fd-450f-8f6a-0ef42586a03f -t, U = 1, 6; - -# ╔═╡ aa4e6383-999d-4b1d-9fca-a053b7a9debf -md""" -## Running the simple update algorithm - -Next, we'll specify the virtual PEPS bond dimension and define the fermionic physical and virtual spaces. For the PEPS ansatz we choose a ``2 \times 2`` unit cell: -""" - -# ╔═╡ 59d49b04-4ea8-4bc1-b308-56dbb3b5e3d4 -Dbond = 8; - -# ╔═╡ cd7499dc-32b3-41ca-a369-a8c7dcce8d88 -physical_space = Vect[fℤ₂](0 => 2, 1 => 2); - -# ╔═╡ 5e046ae3-747e-40c5-9f35-59ced565de50 -virtual_space = Vect[fℤ₂](0 => Dbond / 2, 1 => Dbond / 2); - -# ╔═╡ 6224ad78-cf6c-444e-976a-1a0d1bb6c261 -Nr, Nc = 2, 2; - -# ╔═╡ 156d773c-96c3-4fb2-a111-71eddddfa33b -H = hubbard_model(Float64, Trivial, Trivial, InfiniteSquare(Nr, Nc); t, U, mu=U / 2); - -# ╔═╡ f1a13a5d-c7c0-4fd9-8a42-06826d04a406 -md""" -The simple update algorithm evolves an infinite PEPS with weights on the virtual bonds, so we here need to intialize an [`InfiniteWeightPEPS`](@ref). By default, the bond weights will be identity. Note that we here use tensors with real `Float64` entries: -""" - -# ╔═╡ d0bb6199-6e09-41cb-bc0c-a552aedc5443 -wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, virtual_space; unitcell=(Nr, Nc)); - -# ╔═╡ 51df2d55-e51f-41cf-8fd0-bd58ca85c977 -md""" -Before starting the simple update routine, we normalize the vertex tensors: -""" - -# ╔═╡ 30053016-35f6-49d9-a574-4f53eb702200 -for ind in CartesianIndices(wpeps.vertices) - wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf) -end; - -# ╔═╡ ada2d1a4-f7d2-4424-bc57-490556a7c4d1 -md""" -Let's set algorithm parameters: The plan is to successively decrease the time interval of the Trotter-Suzuki as well as the convergence tolerance such that we obtain a more accurate result at each iteration. To run the simple update, we call `simpleupdate` where we use the keyword `bipartite=false` - meaning that we use the full ``2 \times 2`` unit cell without assuming a bipartite structure. Thus, we can start evolving: -""" - -# ╔═╡ 2e9699be-2d90-46e3-ab47-7f75deddcc22 -dts = [1e-2, 1e-3, 4e-4, 1e-4]; - -# ╔═╡ 444fc05e-28a3-47af-a328-5d332004f465 -tols = [1e-6, 1e-8, 1e-8, 1e-8]; - -# ╔═╡ 76d89b68-5356-490f-96f4-ec2704fdf8ff -maxiter = 20000; - -# ╔═╡ da7fe8eb-7edc-40b5-909e-39c19ae8fece -begin - wpeps_su = wpeps - for (n, (dt, tol)) in enumerate(zip(dts, tols)) - trscheme = truncerr(1e-10) & truncdim(Dbond) - alg = SimpleUpdate(dt, tol, maxiter, trscheme) - global wpeps_su, = simpleupdate(wpeps_su, H, alg; bipartite=false) - end -end; - -# ╔═╡ 9e3b3df0-c0f7-4a26-b425-fe9015c6e99f -md""" -To obtain the evolved `InfiniteWeightPEPS` as an actual PEPS without weights on the bonds, we can just call the following constructor: -""" - -# ╔═╡ 671286d1-7eee-413e-8ed2-f3c140ff9999 -peps = InfinitePEPS(wpeps_su); - -# ╔═╡ c1de88b7-f054-4063-86b6-ae234b4c4b0d -md""" -## Computing the ground-state energy - -In order to compute the energy expectation value with evolved PEPS, we need to converge a CTMRG environment on it. We first converge an environment with a small enviroment dimension and then use that to initialize another run with bigger environment dimension. We'll use `trscheme=truncdim(χ)` for that such that the dimension is increased during the second CTMRG run: -""" - -# ╔═╡ 5d2c06fd-a954-4b4b-a442-1322ea5eb5a3 -χenv₀, χenv = 6, 20; - -# ╔═╡ 5f6f179c-6d44-4316-9e7f-ff25bfc0f95d -env_space = Vect[fℤ₂](0 => χenv₀ / 2, 1 => χenv₀ / 2); - -# ╔═╡ be0441c5-394e-4812-aa44-5d1e8565723e -begin - env = CTMRGEnv(rand, Float64, peps, env_space) - for χ in [χenv₀, χenv] - global env, = leading_boundary( - env, peps; alg=:sequential, tol=1e-5, trscheme=truncdim(χ) - ) - end -end; - -# ╔═╡ 487caef7-ceda-41ba-82ee-3d3dc0058162 -md""" -We measure the energy by computing the `H` expectation value, where we have to make sure to normalize to obtain the energy per site: -""" - -# ╔═╡ 474d4eb6-3d1a-4816-879f-a50e40f7fe9b -E = expectation_value(peps, H, env) / (Nr * Nc); - -# ╔═╡ c439d59e-2643-4532-89f3-3dcf92e0c49f -@show E - -# ╔═╡ 5a0064cf-2ad4-4d2c-818f-e90ca9a1b82d -md""" -Finally, we can compare the obtained ground-state energy against the literature, namely the QMC estimates from [Qin et al.](@cite qin_benchmark_2016). We find that the result generally agree: -""" - -# ╔═╡ ce6851d5-3cba-4393-9ca3-a5f49c5d0dde -Es_exact = Dict(0 => -1.62, 2 => -0.176, 4 => 0.8603, 6 => -0.6567, 8 => -0.5243); - -# ╔═╡ 6a17a167-5a49-40a7-9308-6bc687ce935e -E_exact = Es_exact[U] - U / 2; - -# ╔═╡ 36427835-e43f-4458-b600-bbbc75cf22a7 -@show (E - E_exact) / E_exact - -# ╔═╡ 00000000-0000-0000-0000-000000000001 -PLUTO_PROJECT_TOML_CONTENTS = """ -[deps] -PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" -Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" - -[compat] -PEPSKit = "~0.5.0" -TensorKit = "~0.14.5" -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000002 -PLUTO_MANIFEST_TOML_CONTENTS = """ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.11.4" -manifest_format = "2.0" -project_hash = "79f58b0126713df51e6c54bffa8c6c88c0809a34" - -[[deps.AbstractFFTs]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" -uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" -version = "1.5.0" - - [deps.AbstractFFTs.extensions] - AbstractFFTsChainRulesCoreExt = "ChainRulesCore" - AbstractFFTsTestExt = "Test" - - [deps.AbstractFFTs.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] -git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" -uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" -version = "0.1.42" - - [deps.Accessors.extensions] - AxisKeysExt = "AxisKeys" - IntervalSetsExt = "IntervalSets" - LinearAlgebraExt = "LinearAlgebra" - StaticArraysExt = "StaticArrays" - StructArraysExt = "StructArrays" - TestExt = "Test" - UnitfulExt = "Unitful" - - [deps.Accessors.weakdeps] - AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - -[[deps.Adapt]] -deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" -uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.3.0" -weakdeps = ["SparseArrays", "StaticArrays"] - - [deps.Adapt.extensions] - AdaptSparseArraysExt = "SparseArrays" - AdaptStaticArraysExt = "StaticArrays" - -[[deps.ArrayLayouts]] -deps = ["FillArrays", "LinearAlgebra"] -git-tree-sha1 = "4e25216b8fea1908a0ce0f5d87368587899f75be" -uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.ArrayLayouts.extensions] - ArrayLayoutsSparseArraysExt = "SparseArrays" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -version = "1.11.0" - -[[deps.BangBang]] -deps = ["Accessors", "ConstructionBase", "InitialValues", "LinearAlgebra"] -git-tree-sha1 = "26f41e1df02c330c4fa1e98d4aa2168fdafc9b1f" -uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" -version = "0.4.4" - - [deps.BangBang.extensions] - BangBangChainRulesCoreExt = "ChainRulesCore" - BangBangDataFramesExt = "DataFrames" - BangBangStaticArraysExt = "StaticArrays" - BangBangStructArraysExt = "StructArrays" - BangBangTablesExt = "Tables" - BangBangTypedTablesExt = "TypedTables" - - [deps.BangBang.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" - TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -version = "1.11.0" - -[[deps.BlockArrays]] -deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "df1746706459aa184ed3424b240a917b89d67b60" -uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -version = "1.6.1" - - [deps.BlockArrays.extensions] - BlockArraysAdaptExt = "Adapt" - BlockArraysBandedMatricesExt = "BandedMatrices" - - [deps.BlockArrays.weakdeps] - Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - -[[deps.BlockTensorKit]] -deps = ["BlockArrays", "Compat", "LinearAlgebra", "Random", "Strided", "TensorKit", "TensorOperations", "TupleTools", "VectorInterface"] -git-tree-sha1 = "e0d455f2998aca33747def4f384c1aff5e3278de" -uuid = "5f87ffc2-9cf1-4a46-8172-465d160bd8cd" -version = "0.1.6" - -[[deps.ChainRules]] -deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "SparseInverseSubset", "Statistics", "StructArrays", "SuiteSparse"] -git-tree-sha1 = "a975ae558af61a2a48720a6271661bf2621e0f4e" -uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" -version = "1.72.3" - -[[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "1713c74e00545bfe14605d2a2be1712de8fbcb58" -uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.25.1" -weakdeps = ["SparseArrays"] - - [deps.ChainRulesCore.extensions] - ChainRulesCoreSparseArraysExt = "SparseArrays" - -[[deps.ChunkSplitters]] -git-tree-sha1 = "63a3903063d035260f0f6eab00f517471c5dc784" -uuid = "ae650224-84b6-46f8-82ea-d812ca08434e" -version = "3.1.2" - -[[deps.CommonSubexpressions]] -deps = ["MacroTools"] -git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" -uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.1" - -[[deps.Compat]] -deps = ["TOML", "UUIDs"] -git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.16.0" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.1.1+0" - -[[deps.CompositionsBase]] -git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" -uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" -version = "0.1.2" -weakdeps = ["InverseFunctions"] - - [deps.CompositionsBase.extensions] - CompositionsBaseInverseFunctionsExt = "InverseFunctions" - -[[deps.ConstructionBase]] -git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" -uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.8" - - [deps.ConstructionBase.extensions] - ConstructionBaseIntervalSetsExt = "IntervalSets" - ConstructionBaseLinearAlgebraExt = "LinearAlgebra" - ConstructionBaseStaticArraysExt = "StaticArrays" - - [deps.ConstructionBase.weakdeps] - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.DataAPI]] -git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" -uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.16.0" - -[[deps.DataValueInterfaces]] -git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" -uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" -version = "1.0.0" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -version = "1.11.0" - -[[deps.DiffResults]] -deps = ["StaticArraysCore"] -git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" -uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" -version = "1.1.0" - -[[deps.DiffRules]] -deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] -git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" -uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.15.1" - -[[deps.Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" -version = "1.11.0" - -[[deps.DocStringExtensions]] -git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.4" - -[[deps.FillArrays]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" -uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.13.0" - - [deps.FillArrays.extensions] - FillArraysPDMatsExt = "PDMats" - FillArraysSparseArraysExt = "SparseArrays" - FillArraysStatisticsExt = "Statistics" - - [deps.FillArrays.weakdeps] - PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[deps.FiniteDifferences]] -deps = ["ChainRulesCore", "LinearAlgebra", "Printf", "Random", "Richardson", "SparseArrays", "StaticArrays"] -git-tree-sha1 = "06d76c780d657729cf20821fb5832c6cc4dfd0b5" -uuid = "26cc04aa-876d-5657-8c51-4c34ba976000" -version = "0.12.32" - -[[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" -uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "1.0.1" -weakdeps = ["StaticArrays"] - - [deps.ForwardDiff.extensions] - ForwardDiffStaticArraysExt = "StaticArrays" - -[[deps.GPUArraysCore]] -deps = ["Adapt"] -git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" -uuid = "46192b85-c4d5-4398-a991-12ede77f4527" -version = "0.2.0" - -[[deps.HalfIntegers]] -git-tree-sha1 = "9c3149243abb5bc0bad0431d6c4fcac0f4443c7c" -uuid = "f0d1745a-41c9-11e9-1dd9-e5d34d218721" -version = "1.6.0" - -[[deps.HashArrayMappedTries]] -git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae" -uuid = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" -version = "0.2.0" - -[[deps.IRTools]] -deps = ["InteractiveUtils", "MacroTools"] -git-tree-sha1 = "950c3717af761bc3ff906c2e8e52bd83390b6ec2" -uuid = "7869d1d1-7146-5819-86e3-90919afe41df" -version = "0.4.14" - -[[deps.InitialValues]] -git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" -uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" -version = "0.3.1" - -[[deps.IntegerMathUtils]] -git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" -uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" -version = "0.1.2" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -version = "1.11.0" - -[[deps.InverseFunctions]] -git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" -uuid = "3587e190-3f89-42d0-90ee-14403ec27112" -version = "0.1.17" - - [deps.InverseFunctions.extensions] - InverseFunctionsDatesExt = "Dates" - InverseFunctionsTestExt = "Test" - - [deps.InverseFunctions.weakdeps] - Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.IrrationalConstants]] -git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" -uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.4" - -[[deps.IteratorInterfaceExtensions]] -git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" -uuid = "82899510-4779-5014-852e-03e436cf321d" -version = "1.0.0" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.7.0" - -[[deps.KrylovKit]] -deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"] -git-tree-sha1 = "38477816f8db29956ea591feb3086d9edabf6f38" -uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" -version = "0.9.5" -weakdeps = ["ChainRulesCore"] - - [deps.KrylovKit.extensions] - KrylovKitChainRulesCoreExt = "ChainRulesCore" - -[[deps.LRUCache]] -git-tree-sha1 = "5519b95a490ff5fe629c4a7aa3b3dfc9160498b3" -uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" -version = "1.6.2" -weakdeps = ["Serialization"] - - [deps.LRUCache.extensions] - SerializationExt = ["Serialization"] - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -version = "1.11.0" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.11.0" - -[[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" -uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.29" - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" - - [deps.LogExpFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -version = "1.11.0" - -[[deps.LoggingExtras]] -deps = ["Dates", "Logging"] -git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" -uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.0.3" - -[[deps.MPSKit]] -deps = ["Accessors", "BlockTensorKit", "Compat", "DocStringExtensions", "HalfIntegers", "KrylovKit", "LinearAlgebra", "LoggingExtras", "OhMyThreads", "OptimKit", "Printf", "Random", "RecipesBase", "TensorKit", "TensorKitManifolds", "TensorOperations", "VectorInterface"] -git-tree-sha1 = "588bef90e9672431efda1b686e8d477b621b2118" -uuid = "bb1c41ca-d63c-52ed-829e-0820dda26502" -version = "0.12.6" - -[[deps.MPSKitModels]] -deps = ["LinearAlgebra", "MPSKit", "MacroTools", "PrecompileTools", "TensorKit", "TensorOperations", "TupleTools"] -git-tree-sha1 = "d658f13d6b1c08304344faede50bebcc4f574b6f" -uuid = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" -version = "0.4.0" - -[[deps.MacroTools]] -git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.15" - -[[deps.Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -version = "1.11.0" - -[[deps.NaNMath]] -deps = ["OpenLibm_jll"] -git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.1.3" - -[[deps.OhMyThreads]] -deps = ["BangBang", "ChunkSplitters", "StableTasks", "TaskLocalValues"] -git-tree-sha1 = "5f81bdb937fd857bac9548fa8ab9390a06864bb5" -uuid = "67456a42-1dca-4109-a031-0a68de7e3ad5" -version = "0.7.0" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.27+1" - -[[deps.OpenLibm_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+4" - -[[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.6+0" - -[[deps.OptimKit]] -deps = ["LinearAlgebra", "Printf", "ScopedValues", "VectorInterface"] -git-tree-sha1 = "b0163ac202bc03aeb15f0e55002e544e74965534" -uuid = "77e91f04-9b3b-57a6-a776-40b61faaebe0" -version = "0.4.0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.8.0" - -[[deps.PEPSKit]] -deps = ["Accessors", "ChainRulesCore", "Compat", "FiniteDifferences", "KrylovKit", "LinearAlgebra", "LoggingExtras", "MPSKit", "MPSKitModels", "OhMyThreads", "OptimKit", "Printf", "Random", "Statistics", "TensorKit", "TensorOperations", "VectorInterface", "Zygote"] -git-tree-sha1 = "12c42d39d9c67070d5783cbd7ebb54ab957c6a09" -uuid = "52969e89-939e-4361-9b68-9bc7cde4bdeb" -version = "0.5.0" - -[[deps.PackageExtensionCompat]] -git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" -uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" -version = "1.0.2" -weakdeps = ["Requires", "TOML"] - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.2.1" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.3" - -[[deps.Primes]] -deps = ["IntegerMathUtils"] -git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" -uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" -version = "0.5.7" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -version = "1.11.0" - -[[deps.PtrArrays]] -git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" -uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" -version = "1.3.0" - -[[deps.Random]] -deps = ["SHA"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -version = "1.11.0" - -[[deps.RationalRoots]] -git-tree-sha1 = "e5f5db699187a4810fda9181b34250deeedafd81" -uuid = "308eb6b3-cc68-5ff3-9e97-c3c4da4fa681" -version = "0.2.1" - -[[deps.RealDot]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" -uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" -version = "0.1.0" - -[[deps.RecipesBase]] -deps = ["PrecompileTools"] -git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.3.4" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.1" - -[[deps.Richardson]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "48f038bfd83344065434089c2a79417f38715c41" -uuid = "708f8203-808e-40c0-ba2d-98a6953ed40d" -version = "1.4.2" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.ScopedValues]] -deps = ["HashArrayMappedTries", "Logging"] -git-tree-sha1 = "1147f140b4c8ddab224c94efa9569fc23d63ab44" -uuid = "7e506255-f358-4e82-b7e4-beb19740aa63" -version = "1.3.0" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -version = "1.11.0" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -version = "1.11.0" - -[[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.11.0" - -[[deps.SparseInverseSubset]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "52962839426b75b3021296f7df242e40ecfc0852" -uuid = "dc90abb0-5640-4711-901d-7e5b23a2fada" -version = "0.1.2" - -[[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "64cca0c26b4f31ba18f13f6c12af7c85f478cfde" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.5.0" -weakdeps = ["ChainRulesCore"] - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" - -[[deps.StableTasks]] -git-tree-sha1 = "c4f6610f85cb965bee5bfafa64cbeeda55a4e0b2" -uuid = "91464d47-22a1-43fe-8b7f-2d57ee82463f" -version = "0.1.7" - -[[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "0feb6b9031bd5c51f9072393eb5ab3efd31bf9e4" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.13" -weakdeps = ["ChainRulesCore", "Statistics"] - - [deps.StaticArrays.extensions] - StaticArraysChainRulesCoreExt = "ChainRulesCore" - StaticArraysStatisticsExt = "Statistics" - -[[deps.StaticArraysCore]] -git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" -uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.3" - -[[deps.Statistics]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.Statistics.extensions] - SparseArraysExt = ["SparseArrays"] - -[[deps.Strided]] -deps = ["LinearAlgebra", "StridedViews", "TupleTools"] -git-tree-sha1 = "4a1128f5237b5d0170d934a2eb4fa7a273639c9f" -uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" -version = "2.3.0" - -[[deps.StridedViews]] -deps = ["LinearAlgebra", "PackageExtensionCompat"] -git-tree-sha1 = "425158c52aa58d42593be6861befadf8b2541e9b" -uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" -version = "0.4.1" - - [deps.StridedViews.extensions] - StridedViewsCUDAExt = "CUDA" - StridedViewsPtrArraysExt = "PtrArrays" - - [deps.StridedViews.weakdeps] - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - PtrArrays = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" - -[[deps.StructArrays]] -deps = ["ConstructionBase", "DataAPI", "Tables"] -git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" -uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" -version = "0.7.1" - - [deps.StructArrays.extensions] - StructArraysAdaptExt = "Adapt" - StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"] - StructArraysLinearAlgebraExt = "LinearAlgebra" - StructArraysSparseArraysExt = "SparseArrays" - StructArraysStaticArraysExt = "StaticArrays" - - [deps.StructArrays.weakdeps] - Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" - GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" - KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.SuiteSparse]] -deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] -uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" - -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.7.0+0" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[deps.TableTraits]] -deps = ["IteratorInterfaceExtensions"] -git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" -uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" -version = "1.0.1" - -[[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" -uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.12.0" - -[[deps.TaskLocalValues]] -git-tree-sha1 = "d155450e6dff2a8bc2fcb81dcb194bd98b0aeb46" -uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" -version = "0.1.2" - -[[deps.TensorKit]] -deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "Random", "SparseArrays", "Strided", "TensorKitSectors", "TensorOperations", "TupleTools", "VectorInterface"] -git-tree-sha1 = "4a09ea843d18b7256f710f1188414433dcf0b7db" -uuid = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" -version = "0.14.5" -weakdeps = ["ChainRulesCore", "FiniteDifferences"] - - [deps.TensorKit.extensions] - TensorKitChainRulesCoreExt = "ChainRulesCore" - TensorKitFiniteDifferencesExt = "FiniteDifferences" - -[[deps.TensorKitManifolds]] -deps = ["LinearAlgebra", "TensorKit"] -git-tree-sha1 = "94530ac4691795834e2efacb2d31d37571dad52f" -uuid = "11fa318c-39cb-4a83-b1ed-cdc7ba1e3684" -version = "0.7.2" - -[[deps.TensorKitSectors]] -deps = ["HalfIntegers", "LinearAlgebra", "TensorOperations", "WignerSymbols"] -git-tree-sha1 = "fd15110964416b3ac3e7d1d212b0260e4629e536" -uuid = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f" -version = "0.1.4" - -[[deps.TensorOperations]] -deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Preferences", "PtrArrays", "Strided", "StridedViews", "TupleTools", "VectorInterface"] -git-tree-sha1 = "c7458aad3d855e892e2cae208a793a5fceee2406" -uuid = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" -version = "5.2.0" - - [deps.TensorOperations.extensions] - TensorOperationsBumperExt = "Bumper" - TensorOperationsChainRulesCoreExt = "ChainRulesCore" - TensorOperationscuTENSORExt = ["cuTENSOR", "CUDA"] - - [deps.TensorOperations.weakdeps] - Bumper = "8ce10254-0962-460f-a3d8-1f77fea1446e" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1" - -[[deps.TupleTools]] -git-tree-sha1 = "41e43b9dc950775eac654b9f845c839cd2f1821e" -uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" -version = "1.6.0" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -version = "1.11.0" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -version = "1.11.0" - -[[deps.VectorInterface]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9166406dedd38c111a6574e9814be83d267f8aec" -uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8" -version = "0.5.0" - -[[deps.WignerSymbols]] -deps = ["HalfIntegers", "LRUCache", "Primes", "RationalRoots"] -git-tree-sha1 = "960e5f708871c1d9a28a7f1dbcaf4e0ee34ee960" -uuid = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" -version = "2.0.0" - -[[deps.Zygote]] -deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] -git-tree-sha1 = "207d714f3514b0d564e3a08f9e9f753bf6566c2d" -uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" -version = "0.7.6" - - [deps.Zygote.extensions] - ZygoteAtomExt = "Atom" - ZygoteColorsExt = "Colors" - ZygoteDistancesExt = "Distances" - ZygoteTrackerExt = "Tracker" - - [deps.Zygote.weakdeps] - Atom = "c52e3926-4ff0-5f6e-af25-54175e0327b1" - Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" - Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.ZygoteRules]] -deps = ["ChainRulesCore", "MacroTools"] -git-tree-sha1 = "434b3de333c75fc446aa0d19fc394edafd07ab08" -uuid = "700de1a5-db45-46bc-99cf-38207098b444" -version = "0.2.7" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.11.0+0" -""" - -# ╔═╡ Cell order: -# ╠═ba26b46c-4ccd-426b-a3c7-c71c5051f390 -# ╠═4aff432e-e8a9-441f-8c72-ba3609d99eba -# ╠═b1bcace2-28ff-4475-acb2-3ef8e9ca7033 -# ╠═4f49c108-6b3c-4d6a-a99f-90922ab8e114 -# ╠═1a979cdf-711e-414b-8566-c23638e760d2 -# ╠═452bf333-e3fd-450f-8f6a-0ef42586a03f -# ╠═156d773c-96c3-4fb2-a111-71eddddfa33b -# ╠═aa4e6383-999d-4b1d-9fca-a053b7a9debf -# ╠═59d49b04-4ea8-4bc1-b308-56dbb3b5e3d4 -# ╠═cd7499dc-32b3-41ca-a369-a8c7dcce8d88 -# ╠═5e046ae3-747e-40c5-9f35-59ced565de50 -# ╠═6224ad78-cf6c-444e-976a-1a0d1bb6c261 -# ╠═f1a13a5d-c7c0-4fd9-8a42-06826d04a406 -# ╠═d0bb6199-6e09-41cb-bc0c-a552aedc5443 -# ╠═51df2d55-e51f-41cf-8fd0-bd58ca85c977 -# ╠═30053016-35f6-49d9-a574-4f53eb702200 -# ╠═ada2d1a4-f7d2-4424-bc57-490556a7c4d1 -# ╠═2e9699be-2d90-46e3-ab47-7f75deddcc22 -# ╠═444fc05e-28a3-47af-a328-5d332004f465 -# ╠═76d89b68-5356-490f-96f4-ec2704fdf8ff -# ╠═da7fe8eb-7edc-40b5-909e-39c19ae8fece -# ╠═9e3b3df0-c0f7-4a26-b425-fe9015c6e99f -# ╠═671286d1-7eee-413e-8ed2-f3c140ff9999 -# ╠═c1de88b7-f054-4063-86b6-ae234b4c4b0d -# ╠═5d2c06fd-a954-4b4b-a442-1322ea5eb5a3 -# ╠═5f6f179c-6d44-4316-9e7f-ff25bfc0f95d -# ╠═be0441c5-394e-4812-aa44-5d1e8565723e -# ╠═487caef7-ceda-41ba-82ee-3d3dc0058162 -# ╠═474d4eb6-3d1a-4816-879f-a50e40f7fe9b -# ╠═c439d59e-2643-4532-89f3-3dcf92e0c49f -# ╠═5a0064cf-2ad4-4d2c-818f-e90ca9a1b82d -# ╠═ce6851d5-3cba-4393-9ca3-a5f49c5d0dde -# ╠═6a17a167-5a49-40a7-9308-6bc687ce935e -# ╠═36427835-e43f-4458-b600-bbbc75cf22a7 -# ╟─00000000-0000-0000-0000-000000000001 -# ╟─00000000-0000-0000-0000-000000000002 diff --git a/examples/6.hubbard_su/main.jl b/examples/6.hubbard_su/main.jl new file mode 100644 index 000000000..efb8fe6a8 --- /dev/null +++ b/examples/6.hubbard_su/main.jl @@ -0,0 +1,121 @@ +using Markdown +md""" +# Hubbard model imaginary time evolution using simple update + +Once again, we consider the Hubbard model but this time we obtain the ground-state PEPS by +imaginary time evoluation. In particular, we'll use the [`SimpleUpdate`](@ref) algorithm. +As a reminder, we define the Hubbard model as + +```math +H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- + +c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i +``` + +with $\sigma \in \{\uparrow,\downarrow\}$ and $n_{i,\sigma} = c_{i,\sigma}^+ c_{i,\sigma}^-$. + +Let's get started by seeding the RNG and importing the required modules: +""" + +using Random +using TensorKit, PEPSKit +Random.seed!(1298351928); + +md""" +## Defining the Hamiltonian + +First, we define the Hubbard model at $t=1$ hopping and $U=6$ using `Trivial` sectors for +the particle and spin symmetries, and set $\mu = U/2$ for half-filling. The model will be +constructed on a $2 \times 2$ unit cell, so we have: +""" + +t = 1 +U = 6 +Nr, Nc = 2, 2 +H = hubbard_model(Float64, Trivial, Trivial, InfiniteSquare(Nr, Nc); t, U, mu=U / 2); + +md""" +## Running the simple update algorithm + +Next, we'll specify the virtual PEPS bond dimension and define the fermionic physical and +virtual spaces. The simple update algorithm evolves an infinite PEPS with weights on the +virtual bonds, so we here need to intialize an [`InfiniteWeightPEPS`](@ref). By default, +the bond weights will be identity. Unlike in the other examples, we here use tensors with +real `Float64` entries: +""" + +Dbond = 8 +physical_space = Vect[fℤ₂](0 => 2, 1 => 2) +virtual_space = Vect[fℤ₂](0 => Dbond / 2, 1 => Dbond / 2) +wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, virtual_space; unitcell=(Nr, Nc)); + +md""" +Before starting the simple update routine, we normalize the vertex tensors of `wpeps` by +dividing with the maximal vertex element (using the infinity norm): +""" + +for ind in CartesianIndices(wpeps.vertices) + wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf) +end + +md""" +Let's set algorithm parameters: The plan is to successively decrease the time interval of +the Trotter-Suzuki as well as the convergence tolerance such that we obtain a more accurate +result at each iteration. To run the simple update, we call [`simpleupdate`](@ref) where we +use the keyword `bipartite=false` - meaning that we use the full $2 \times 2$ unit cell +without assuming a bipartite structure. Thus, we can start evolving: +""" + +dts = [1e-2, 1e-3, 4e-4, 1e-4] +tols = [1e-6, 1e-8, 1e-8, 1e-8] +maxiter = 20000 + +for (n, (dt, tol)) in enumerate(zip(dts, tols)) + trscheme = truncerr(1e-10) & truncdim(Dbond) + alg = SimpleUpdate(dt, tol, maxiter, trscheme) + global wpeps, = simpleupdate(wpeps, H, alg; bipartite=false) +end + +md""" +To obtain the evolved `InfiniteWeightPEPS` as an actual PEPS without weights on the bonds, +we can just call the following constructor: +""" + +peps = InfinitePEPS(wpeps); + +md""" +## Computing the ground-state energy + +In order to compute the energy expectation value with evolved PEPS, we need to converge a +CTMRG environment on it. We first converge an environment with a small enviroment dimension +and then use that to initialize another run with bigger environment dimension. We'll use +`trscheme=truncdim(χ)` for that such that the dimension is increased during the second CTMRG +run: +""" + +χenv₀, χenv = 6, 20 +env_space = Vect[fℤ₂](0 => χenv₀ / 2, 1 => χenv₀ / 2) + +env = CTMRGEnv(rand, Float64, peps, env_space) +for χ in [χenv₀, χenv] + global env, = leading_boundary( + env, peps; alg=:sequential, tol=1e-5, trscheme=truncdim(χ) + ) +end + +md""" +We measure the energy by computing the `H` expectation value, where we have to make sure to +normalize with respect to the unit cell to obtain the energy per site: +""" + +E = expectation_value(peps, H, env) / (Nr * Nc) +@show E; + +md""" +Finally, we can compare the obtained ground-state energy against the literature, namely the +QMC estimates from [Qin et al.](@cite qin_benchmark_2016). We find that the results generally +agree: +""" + +Es_exact = Dict(0 => -1.62, 2 => -0.176, 4 => 0.8603, 6 => -0.6567, 8 => -0.5243) +E_exact = Es_exact[U] - U / 2 +@show (E - E_exact) / E_exact; diff --git a/examples/8.ising_partition_function/ising_partition_function.jl b/examples/8.ising_partition_function/ising_partition_function.jl deleted file mode 100644 index 76e60ef39..000000000 --- a/examples/8.ising_partition_function/ising_partition_function.jl +++ /dev/null @@ -1,973 +0,0 @@ -### A Pluto.jl notebook ### -# v0.20.5 - -using Markdown -using InteractiveUtils - -# ╔═╡ 801e31ee-0207-4ceb-be8b-7326097cd5f8 -using Random - -# ╔═╡ 0e110dfa-d1fa-4e00-8955-440bc8333f2e -using LinearAlgebra, TensorKit, PEPSKit, QuadGK - -# ╔═╡ c48b528a-6334-4639-9d86-7447a62722a7 -md""" -# 2D classical Ising partition function using CTMRG - -All previous examples dealt with quantum systems, describing their states by `InfinitePEPS` that can be contracted using CTMRG or VUMPS techniques. Here, we shift our focus towards classical physics and consider the 2D classical Ising model with the partition function - -```math -\mathcal{Z}(\beta) = \sum_{\{s\}} \exp(-\beta H(s)) \text{ with } H(s) = -J \sum_{\langle i, j \rangle} s_i s_j . -``` - -The idea is to encode the partition function into an infinite square lattice of rank-4 tensors which can then be contracted using CTMRG. These rank-4 tensors are represented by [`InfinitePartitionFunction`](@ref) states, as we will see. - -But first, let's seed the RNG and import all required modules: -""" - -# ╔═╡ 8294ffc6-6e61-4f00-85d4-0bbf46abc1d1 -Random.seed!(234923); - -# ╔═╡ e9a89299-420b-4d69-8783-6227e87f3156 -md""" -## Defining the partition function - -The first step is to define the rank-4 tensor that, when contracted on a square lattice, evaluates to the partition function value at a given ``\beta``. Since we later want to compute the magnetization and energy, we define the appropriate rank-4 tensors as well: -""" - -# ╔═╡ cef9e388-3f2a-4bc9-9510-f4a8333ea7b8 -function classical_ising(; beta=log(1 + sqrt(2)) / 2, J=1.0) - K = beta * J - - # Boltzmann weights - t = ComplexF64[exp(K) exp(-K); exp(-K) exp(K)] - r = eigen(t) - nt = r.vectors * sqrt(Diagonal(r.values)) * r.vectors - - # local partition function tensor - O = zeros(2, 2, 2, 2) - O[1, 1, 1, 1] = 1 - O[2, 2, 2, 2] = 1 - @tensor o[-1 -2; -3 -4] := O[3 4; 2 1] * nt[-3; 3] * nt[-4; 4] * nt[-2; 2] * nt[-1; 1] - - # magnetization tensor - M = copy(O) - M[2, 2, 2, 2] *= -1 - @tensor m[-1 -2; -3 -4] := M[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * nt[-3; 3] * nt[-4; 4] - - # bond interaction tensor and energy-per-site tensor - e = ComplexF64[-J J; J -J] .* nt - @tensor e_hor[-1 -2; -3 -4] := - O[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * nt[-3; 3] * e[-4; 4] - @tensor e_vert[-1 -2; -3 -4] := - O[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * e[-3; 3] * nt[-4; 4] - e = e_hor + e_vert - - # fixed tensor map space for all three - TMS = ℂ^2 ⊗ ℂ^2 ← ℂ^2 ⊗ ℂ^2 - - return TensorMap(o, TMS), TensorMap(m, TMS), TensorMap(e, TMS) -end; - -# ╔═╡ 22970727-5426-400d-9fae-37ab85046cc4 -md""" -So let's initialize these tensors at inverse temperature ``\beta=0.6`` and construct the corresponding `InfinitePartitionFunction`: -""" - -# ╔═╡ 43bebcf1-7dde-4c72-9cfa-4d229c53d624 -beta = 0.6; - -# ╔═╡ f2e44974-de37-4bc4-a4d1-42fa2f144233 -O, M, E = classical_ising(; beta); - -# ╔═╡ e38a0809-5adc-4b32-895e-83005a12d022 -Z = InfinitePartitionFunction(O); - -# ╔═╡ 0fb5ff79-89d1-4dc2-8902-cbef6082bd48 -md""" -## Contracting the partition function - -Next, we can contract the partition function as per usual by constructing a `CTMRGEnv` and calling `leading_boundary`: -""" - -# ╔═╡ c14d1429-8ea2-454e-973d-7380385fdb76 -χenv = 20; - -# ╔═╡ 9957dd70-45e3-4714-8467-bb9f5587056c -env₀ = CTMRGEnv(Z, χenv); - -# ╔═╡ 32a3820b-b23f-49e0-9b6f-20be53d4dd14 -env, = leading_boundary(env₀, Z; tol=1e-8, maxiter=500); - -# ╔═╡ 23761bb7-f167-4c29-b68e-7aa4be83c258 -md""" -Note that CTMRG environments for partition functions differ from the PEPS environments only by the edge tensors - instead of two legs connecting the edges and the PEPS-PEPS sandwich, there is only one leg connecting the edges and the partition function tensor: -""" - -# ╔═╡ a49b029e-e822-40ff-8a0d-6e7d3d38c2e3 -space.(env.edges) - -# ╔═╡ 5f4e8cc6-dc0a-4018-a2ef-8eda2379121e -md""" -To compute the value of the partition function, we have to contract `Z` with the converged environment using [`network_value`](@ref). Additionally, we will compute the magnetization and energy (per site), again using [`expectation_value`](@ref) but this time also specifying the index in the unit cell, where we want to insert the local tensor: -""" - -# ╔═╡ 56a7688d-2219-4cf1-a5e6-de6052be6325 -λ = network_value(Z, env); - -# ╔═╡ 01905c11-725e-4367-983e-3e505288d787 -m = expectation_value(Z, (1, 1) => M, env); - -# ╔═╡ a2b54391-1f02-4fcb-a193-f655ac70210c -e = expectation_value(Z, (1, 1) => E, env); - -# ╔═╡ 2195b7db-910e-4988-99b6-3daa17d30821 -md""" -## Comparing against the exact Onsager solution - -In order to assess our results, we will compare against the [exact Onsager solution](https://en.wikipedia.org/wiki/Square_lattice_Ising_model#Exact_solution). To that end, we compute the exact free energy, magnetization and energy per site (where `quadgk` performs the integral from ``0`` to ``\pi/2``): -""" - -# ╔═╡ 80946864-1461-482e-b86b-41edbb1f573a -function classical_ising_exact(; beta=log(1 + sqrt(2)) / 2, J=1.0) - K = beta * J - - k = 1 / sinh(2 * K)^2 - F = quadgk( - theta -> log(cosh(2 * K)^2 + 1 / k * sqrt(1 + k^2 - 2 * k * cos(2 * theta))), 0, pi - )[1] - f = -1 / beta * (log(2) / 2 + 1 / (2 * pi) * F) - - m = 1 - (sinh(2 * K))^(-4) > 0 ? (1 - (sinh(2 * K))^(-4))^(1 / 8) : 0 - - E = quadgk(theta -> 1 / sqrt(1 - (4 * k) * (1 + k)^(-2) * sin(theta)^2), 0, pi / 2)[1] - e = -J * cosh(2 * K) / sinh(2 * K) * (1 + 2 / pi * (2 * tanh(2 * K)^2 - 1) * E) - - return f, m, e -end; - -# ╔═╡ a330f090-a6de-4ded-9f19-ab290f9266f1 -f_exact, m_exact, e_exact = classical_ising_exact(; beta); - -# ╔═╡ fc26fcd0-3508-49e1-b804-8dcca4a452e3 -md""" -And indeed, we do find agreement between the exact and CTMRG values (keeping in mind that energy accuracy is limited by the environment dimension and the lack of proper extrapolation): -""" - -# ╔═╡ 6aa5c314-35e8-4200-9e50-875460e59553 -@show (-log(λ) / beta - f_exact) / f_exact - -# ╔═╡ 77c8e924-526a-4f51-b2df-e160fd6530e7 -@show (abs(m) - abs(m_exact)) / abs(m_exact) - -# ╔═╡ d8845d3c-1a9d-11f0-27c9-d379139ebccc -@show (e - e_exact) / e_exact # accuracy limited by bond dimension and maxiter - -# ╔═╡ 00000000-0000-0000-0000-000000000001 -PLUTO_PROJECT_TOML_CONTENTS = """ -[deps] -LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" -QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" -Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" - -[compat] -PEPSKit = "~0.5.0" -QuadGK = "~2.11.2" -TensorKit = "~0.14.5" -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000002 -PLUTO_MANIFEST_TOML_CONTENTS = """ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.11.4" -manifest_format = "2.0" -project_hash = "0f5d8f2e954df1ae29d19d3c3ee4ca9cffdd18ac" - -[[deps.AbstractFFTs]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" -uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" -version = "1.5.0" - - [deps.AbstractFFTs.extensions] - AbstractFFTsChainRulesCoreExt = "ChainRulesCore" - AbstractFFTsTestExt = "Test" - - [deps.AbstractFFTs.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] -git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" -uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" -version = "0.1.42" - - [deps.Accessors.extensions] - AxisKeysExt = "AxisKeys" - IntervalSetsExt = "IntervalSets" - LinearAlgebraExt = "LinearAlgebra" - StaticArraysExt = "StaticArrays" - StructArraysExt = "StructArrays" - TestExt = "Test" - UnitfulExt = "Unitful" - - [deps.Accessors.weakdeps] - AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - -[[deps.Adapt]] -deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" -uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.3.0" -weakdeps = ["SparseArrays", "StaticArrays"] - - [deps.Adapt.extensions] - AdaptSparseArraysExt = "SparseArrays" - AdaptStaticArraysExt = "StaticArrays" - -[[deps.ArrayLayouts]] -deps = ["FillArrays", "LinearAlgebra"] -git-tree-sha1 = "4e25216b8fea1908a0ce0f5d87368587899f75be" -uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.ArrayLayouts.extensions] - ArrayLayoutsSparseArraysExt = "SparseArrays" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -version = "1.11.0" - -[[deps.BangBang]] -deps = ["Accessors", "ConstructionBase", "InitialValues", "LinearAlgebra"] -git-tree-sha1 = "26f41e1df02c330c4fa1e98d4aa2168fdafc9b1f" -uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" -version = "0.4.4" - - [deps.BangBang.extensions] - BangBangChainRulesCoreExt = "ChainRulesCore" - BangBangDataFramesExt = "DataFrames" - BangBangStaticArraysExt = "StaticArrays" - BangBangStructArraysExt = "StructArrays" - BangBangTablesExt = "Tables" - BangBangTypedTablesExt = "TypedTables" - - [deps.BangBang.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" - TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -version = "1.11.0" - -[[deps.BlockArrays]] -deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "df1746706459aa184ed3424b240a917b89d67b60" -uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -version = "1.6.1" - - [deps.BlockArrays.extensions] - BlockArraysAdaptExt = "Adapt" - BlockArraysBandedMatricesExt = "BandedMatrices" - - [deps.BlockArrays.weakdeps] - Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - -[[deps.BlockTensorKit]] -deps = ["BlockArrays", "Compat", "LinearAlgebra", "Random", "Strided", "TensorKit", "TensorOperations", "TupleTools", "VectorInterface"] -git-tree-sha1 = "e0d455f2998aca33747def4f384c1aff5e3278de" -uuid = "5f87ffc2-9cf1-4a46-8172-465d160bd8cd" -version = "0.1.6" - -[[deps.ChainRules]] -deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "SparseInverseSubset", "Statistics", "StructArrays", "SuiteSparse"] -git-tree-sha1 = "a975ae558af61a2a48720a6271661bf2621e0f4e" -uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" -version = "1.72.3" - -[[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "1713c74e00545bfe14605d2a2be1712de8fbcb58" -uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.25.1" -weakdeps = ["SparseArrays"] - - [deps.ChainRulesCore.extensions] - ChainRulesCoreSparseArraysExt = "SparseArrays" - -[[deps.ChunkSplitters]] -git-tree-sha1 = "63a3903063d035260f0f6eab00f517471c5dc784" -uuid = "ae650224-84b6-46f8-82ea-d812ca08434e" -version = "3.1.2" - -[[deps.CommonSubexpressions]] -deps = ["MacroTools"] -git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" -uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.1" - -[[deps.Compat]] -deps = ["TOML", "UUIDs"] -git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.16.0" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.1.1+0" - -[[deps.CompositionsBase]] -git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" -uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" -version = "0.1.2" -weakdeps = ["InverseFunctions"] - - [deps.CompositionsBase.extensions] - CompositionsBaseInverseFunctionsExt = "InverseFunctions" - -[[deps.ConstructionBase]] -git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" -uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.8" - - [deps.ConstructionBase.extensions] - ConstructionBaseIntervalSetsExt = "IntervalSets" - ConstructionBaseLinearAlgebraExt = "LinearAlgebra" - ConstructionBaseStaticArraysExt = "StaticArrays" - - [deps.ConstructionBase.weakdeps] - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.DataAPI]] -git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" -uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.16.0" - -[[deps.DataStructures]] -deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "4e1fe97fdaed23e9dc21d4d664bea76b65fc50a0" -uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.22" - -[[deps.DataValueInterfaces]] -git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" -uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" -version = "1.0.0" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -version = "1.11.0" - -[[deps.DiffResults]] -deps = ["StaticArraysCore"] -git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" -uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" -version = "1.1.0" - -[[deps.DiffRules]] -deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] -git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" -uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.15.1" - -[[deps.Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" -version = "1.11.0" - -[[deps.DocStringExtensions]] -git-tree-sha1 = "e7b7e6f178525d17c720ab9c081e4ef04429f860" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.4" - -[[deps.FillArrays]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" -uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.13.0" - - [deps.FillArrays.extensions] - FillArraysPDMatsExt = "PDMats" - FillArraysSparseArraysExt = "SparseArrays" - FillArraysStatisticsExt = "Statistics" - - [deps.FillArrays.weakdeps] - PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[deps.FiniteDifferences]] -deps = ["ChainRulesCore", "LinearAlgebra", "Printf", "Random", "Richardson", "SparseArrays", "StaticArrays"] -git-tree-sha1 = "06d76c780d657729cf20821fb5832c6cc4dfd0b5" -uuid = "26cc04aa-876d-5657-8c51-4c34ba976000" -version = "0.12.32" - -[[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" -uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "1.0.1" -weakdeps = ["StaticArrays"] - - [deps.ForwardDiff.extensions] - ForwardDiffStaticArraysExt = "StaticArrays" - -[[deps.GPUArraysCore]] -deps = ["Adapt"] -git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" -uuid = "46192b85-c4d5-4398-a991-12ede77f4527" -version = "0.2.0" - -[[deps.HalfIntegers]] -git-tree-sha1 = "9c3149243abb5bc0bad0431d6c4fcac0f4443c7c" -uuid = "f0d1745a-41c9-11e9-1dd9-e5d34d218721" -version = "1.6.0" - -[[deps.HashArrayMappedTries]] -git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae" -uuid = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" -version = "0.2.0" - -[[deps.IRTools]] -deps = ["InteractiveUtils", "MacroTools"] -git-tree-sha1 = "950c3717af761bc3ff906c2e8e52bd83390b6ec2" -uuid = "7869d1d1-7146-5819-86e3-90919afe41df" -version = "0.4.14" - -[[deps.InitialValues]] -git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" -uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" -version = "0.3.1" - -[[deps.IntegerMathUtils]] -git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" -uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" -version = "0.1.2" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -version = "1.11.0" - -[[deps.InverseFunctions]] -git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" -uuid = "3587e190-3f89-42d0-90ee-14403ec27112" -version = "0.1.17" - - [deps.InverseFunctions.extensions] - InverseFunctionsDatesExt = "Dates" - InverseFunctionsTestExt = "Test" - - [deps.InverseFunctions.weakdeps] - Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.IrrationalConstants]] -git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" -uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.4" - -[[deps.IteratorInterfaceExtensions]] -git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" -uuid = "82899510-4779-5014-852e-03e436cf321d" -version = "1.0.0" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.7.0" - -[[deps.KrylovKit]] -deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"] -git-tree-sha1 = "38477816f8db29956ea591feb3086d9edabf6f38" -uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" -version = "0.9.5" -weakdeps = ["ChainRulesCore"] - - [deps.KrylovKit.extensions] - KrylovKitChainRulesCoreExt = "ChainRulesCore" - -[[deps.LRUCache]] -git-tree-sha1 = "5519b95a490ff5fe629c4a7aa3b3dfc9160498b3" -uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" -version = "1.6.2" -weakdeps = ["Serialization"] - - [deps.LRUCache.extensions] - SerializationExt = ["Serialization"] - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -version = "1.11.0" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.11.0" - -[[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" -uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.29" - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" - - [deps.LogExpFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -version = "1.11.0" - -[[deps.LoggingExtras]] -deps = ["Dates", "Logging"] -git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" -uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.0.3" - -[[deps.MPSKit]] -deps = ["Accessors", "BlockTensorKit", "Compat", "DocStringExtensions", "HalfIntegers", "KrylovKit", "LinearAlgebra", "LoggingExtras", "OhMyThreads", "OptimKit", "Printf", "Random", "RecipesBase", "TensorKit", "TensorKitManifolds", "TensorOperations", "VectorInterface"] -git-tree-sha1 = "588bef90e9672431efda1b686e8d477b621b2118" -uuid = "bb1c41ca-d63c-52ed-829e-0820dda26502" -version = "0.12.6" - -[[deps.MPSKitModels]] -deps = ["LinearAlgebra", "MPSKit", "MacroTools", "PrecompileTools", "TensorKit", "TensorOperations", "TupleTools"] -git-tree-sha1 = "d658f13d6b1c08304344faede50bebcc4f574b6f" -uuid = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" -version = "0.4.0" - -[[deps.MacroTools]] -git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.15" - -[[deps.Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -version = "1.11.0" - -[[deps.NaNMath]] -deps = ["OpenLibm_jll"] -git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.1.3" - -[[deps.OhMyThreads]] -deps = ["BangBang", "ChunkSplitters", "StableTasks", "TaskLocalValues"] -git-tree-sha1 = "5f81bdb937fd857bac9548fa8ab9390a06864bb5" -uuid = "67456a42-1dca-4109-a031-0a68de7e3ad5" -version = "0.7.0" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.27+1" - -[[deps.OpenLibm_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+4" - -[[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.6+0" - -[[deps.OptimKit]] -deps = ["LinearAlgebra", "Printf", "ScopedValues", "VectorInterface"] -git-tree-sha1 = "b0163ac202bc03aeb15f0e55002e544e74965534" -uuid = "77e91f04-9b3b-57a6-a776-40b61faaebe0" -version = "0.4.0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.8.0" - -[[deps.PEPSKit]] -deps = ["Accessors", "ChainRulesCore", "Compat", "FiniteDifferences", "KrylovKit", "LinearAlgebra", "LoggingExtras", "MPSKit", "MPSKitModels", "OhMyThreads", "OptimKit", "Printf", "Random", "Statistics", "TensorKit", "TensorOperations", "VectorInterface", "Zygote"] -git-tree-sha1 = "12c42d39d9c67070d5783cbd7ebb54ab957c6a09" -uuid = "52969e89-939e-4361-9b68-9bc7cde4bdeb" -version = "0.5.0" - -[[deps.PackageExtensionCompat]] -git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" -uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" -version = "1.0.2" -weakdeps = ["Requires", "TOML"] - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.2.1" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.3" - -[[deps.Primes]] -deps = ["IntegerMathUtils"] -git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" -uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" -version = "0.5.7" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -version = "1.11.0" - -[[deps.PtrArrays]] -git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" -uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" -version = "1.3.0" - -[[deps.QuadGK]] -deps = ["DataStructures", "LinearAlgebra"] -git-tree-sha1 = "9da16da70037ba9d701192e27befedefb91ec284" -uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" -version = "2.11.2" - - [deps.QuadGK.extensions] - QuadGKEnzymeExt = "Enzyme" - - [deps.QuadGK.weakdeps] - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - -[[deps.Random]] -deps = ["SHA"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -version = "1.11.0" - -[[deps.RationalRoots]] -git-tree-sha1 = "e5f5db699187a4810fda9181b34250deeedafd81" -uuid = "308eb6b3-cc68-5ff3-9e97-c3c4da4fa681" -version = "0.2.1" - -[[deps.RealDot]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" -uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" -version = "0.1.0" - -[[deps.RecipesBase]] -deps = ["PrecompileTools"] -git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.3.4" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.1" - -[[deps.Richardson]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "48f038bfd83344065434089c2a79417f38715c41" -uuid = "708f8203-808e-40c0-ba2d-98a6953ed40d" -version = "1.4.2" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.ScopedValues]] -deps = ["HashArrayMappedTries", "Logging"] -git-tree-sha1 = "1147f140b4c8ddab224c94efa9569fc23d63ab44" -uuid = "7e506255-f358-4e82-b7e4-beb19740aa63" -version = "1.3.0" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -version = "1.11.0" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -version = "1.11.0" - -[[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.11.0" - -[[deps.SparseInverseSubset]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "52962839426b75b3021296f7df242e40ecfc0852" -uuid = "dc90abb0-5640-4711-901d-7e5b23a2fada" -version = "0.1.2" - -[[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "64cca0c26b4f31ba18f13f6c12af7c85f478cfde" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.5.0" -weakdeps = ["ChainRulesCore"] - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" - -[[deps.StableTasks]] -git-tree-sha1 = "c4f6610f85cb965bee5bfafa64cbeeda55a4e0b2" -uuid = "91464d47-22a1-43fe-8b7f-2d57ee82463f" -version = "0.1.7" - -[[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "0feb6b9031bd5c51f9072393eb5ab3efd31bf9e4" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.13" -weakdeps = ["ChainRulesCore", "Statistics"] - - [deps.StaticArrays.extensions] - StaticArraysChainRulesCoreExt = "ChainRulesCore" - StaticArraysStatisticsExt = "Statistics" - -[[deps.StaticArraysCore]] -git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" -uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.3" - -[[deps.Statistics]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.Statistics.extensions] - SparseArraysExt = ["SparseArrays"] - -[[deps.Strided]] -deps = ["LinearAlgebra", "StridedViews", "TupleTools"] -git-tree-sha1 = "4a1128f5237b5d0170d934a2eb4fa7a273639c9f" -uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" -version = "2.3.0" - -[[deps.StridedViews]] -deps = ["LinearAlgebra", "PackageExtensionCompat"] -git-tree-sha1 = "425158c52aa58d42593be6861befadf8b2541e9b" -uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" -version = "0.4.1" - - [deps.StridedViews.extensions] - StridedViewsCUDAExt = "CUDA" - StridedViewsPtrArraysExt = "PtrArrays" - - [deps.StridedViews.weakdeps] - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - PtrArrays = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" - -[[deps.StructArrays]] -deps = ["ConstructionBase", "DataAPI", "Tables"] -git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" -uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" -version = "0.7.1" - - [deps.StructArrays.extensions] - StructArraysAdaptExt = "Adapt" - StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"] - StructArraysLinearAlgebraExt = "LinearAlgebra" - StructArraysSparseArraysExt = "SparseArrays" - StructArraysStaticArraysExt = "StaticArrays" - - [deps.StructArrays.weakdeps] - Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" - GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" - KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.SuiteSparse]] -deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] -uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" - -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.7.0+0" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[deps.TableTraits]] -deps = ["IteratorInterfaceExtensions"] -git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" -uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" -version = "1.0.1" - -[[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" -uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.12.0" - -[[deps.TaskLocalValues]] -git-tree-sha1 = "d155450e6dff2a8bc2fcb81dcb194bd98b0aeb46" -uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" -version = "0.1.2" - -[[deps.TensorKit]] -deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "Random", "SparseArrays", "Strided", "TensorKitSectors", "TensorOperations", "TupleTools", "VectorInterface"] -git-tree-sha1 = "4a09ea843d18b7256f710f1188414433dcf0b7db" -uuid = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" -version = "0.14.5" -weakdeps = ["ChainRulesCore", "FiniteDifferences"] - - [deps.TensorKit.extensions] - TensorKitChainRulesCoreExt = "ChainRulesCore" - TensorKitFiniteDifferencesExt = "FiniteDifferences" - -[[deps.TensorKitManifolds]] -deps = ["LinearAlgebra", "TensorKit"] -git-tree-sha1 = "94530ac4691795834e2efacb2d31d37571dad52f" -uuid = "11fa318c-39cb-4a83-b1ed-cdc7ba1e3684" -version = "0.7.2" - -[[deps.TensorKitSectors]] -deps = ["HalfIntegers", "LinearAlgebra", "TensorOperations", "WignerSymbols"] -git-tree-sha1 = "fd15110964416b3ac3e7d1d212b0260e4629e536" -uuid = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f" -version = "0.1.4" - -[[deps.TensorOperations]] -deps = ["LRUCache", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Preferences", "PtrArrays", "Strided", "StridedViews", "TupleTools", "VectorInterface"] -git-tree-sha1 = "c7458aad3d855e892e2cae208a793a5fceee2406" -uuid = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" -version = "5.2.0" - - [deps.TensorOperations.extensions] - TensorOperationsBumperExt = "Bumper" - TensorOperationsChainRulesCoreExt = "ChainRulesCore" - TensorOperationscuTENSORExt = ["cuTENSOR", "CUDA"] - - [deps.TensorOperations.weakdeps] - Bumper = "8ce10254-0962-460f-a3d8-1f77fea1446e" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1" - -[[deps.TupleTools]] -git-tree-sha1 = "41e43b9dc950775eac654b9f845c839cd2f1821e" -uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" -version = "1.6.0" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -version = "1.11.0" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -version = "1.11.0" - -[[deps.VectorInterface]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9166406dedd38c111a6574e9814be83d267f8aec" -uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8" -version = "0.5.0" - -[[deps.WignerSymbols]] -deps = ["HalfIntegers", "LRUCache", "Primes", "RationalRoots"] -git-tree-sha1 = "960e5f708871c1d9a28a7f1dbcaf4e0ee34ee960" -uuid = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" -version = "2.0.0" - -[[deps.Zygote]] -deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] -git-tree-sha1 = "207d714f3514b0d564e3a08f9e9f753bf6566c2d" -uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" -version = "0.7.6" - - [deps.Zygote.extensions] - ZygoteAtomExt = "Atom" - ZygoteColorsExt = "Colors" - ZygoteDistancesExt = "Distances" - ZygoteTrackerExt = "Tracker" - - [deps.Zygote.weakdeps] - Atom = "c52e3926-4ff0-5f6e-af25-54175e0327b1" - Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" - Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.ZygoteRules]] -deps = ["ChainRulesCore", "MacroTools"] -git-tree-sha1 = "434b3de333c75fc446aa0d19fc394edafd07ab08" -uuid = "700de1a5-db45-46bc-99cf-38207098b444" -version = "0.2.7" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.11.0+0" -""" - -# ╔═╡ Cell order: -# ╠═c48b528a-6334-4639-9d86-7447a62722a7 -# ╠═801e31ee-0207-4ceb-be8b-7326097cd5f8 -# ╠═8294ffc6-6e61-4f00-85d4-0bbf46abc1d1 -# ╠═0e110dfa-d1fa-4e00-8955-440bc8333f2e -# ╠═e9a89299-420b-4d69-8783-6227e87f3156 -# ╠═cef9e388-3f2a-4bc9-9510-f4a8333ea7b8 -# ╠═22970727-5426-400d-9fae-37ab85046cc4 -# ╠═43bebcf1-7dde-4c72-9cfa-4d229c53d624 -# ╠═f2e44974-de37-4bc4-a4d1-42fa2f144233 -# ╠═e38a0809-5adc-4b32-895e-83005a12d022 -# ╠═0fb5ff79-89d1-4dc2-8902-cbef6082bd48 -# ╠═c14d1429-8ea2-454e-973d-7380385fdb76 -# ╠═9957dd70-45e3-4714-8467-bb9f5587056c -# ╠═32a3820b-b23f-49e0-9b6f-20be53d4dd14 -# ╠═23761bb7-f167-4c29-b68e-7aa4be83c258 -# ╠═a49b029e-e822-40ff-8a0d-6e7d3d38c2e3 -# ╠═5f4e8cc6-dc0a-4018-a2ef-8eda2379121e -# ╠═56a7688d-2219-4cf1-a5e6-de6052be6325 -# ╠═01905c11-725e-4367-983e-3e505288d787 -# ╠═a2b54391-1f02-4fcb-a193-f655ac70210c -# ╠═2195b7db-910e-4988-99b6-3daa17d30821 -# ╠═80946864-1461-482e-b86b-41edbb1f573a -# ╠═a330f090-a6de-4ded-9f19-ab290f9266f1 -# ╠═fc26fcd0-3508-49e1-b804-8dcca4a452e3 -# ╠═6aa5c314-35e8-4200-9e50-875460e59553 -# ╠═77c8e924-526a-4f51-b2df-e160fd6530e7 -# ╠═d8845d3c-1a9d-11f0-27c9-d379139ebccc -# ╟─00000000-0000-0000-0000-000000000001 -# ╟─00000000-0000-0000-0000-000000000002 diff --git a/examples/8.ising_partition_function/main.jl b/examples/8.ising_partition_function/main.jl new file mode 100644 index 000000000..4aa2d5f0f --- /dev/null +++ b/examples/8.ising_partition_function/main.jl @@ -0,0 +1,143 @@ +using Markdown +md""" +# 2D classical Ising partition function using CTMRG + +All previous examples dealt with quantum systems, describing their states by `InfinitePEPS` +that can be contracted using CTMRG or VUMPS techniques. Here, we shift our focus towards +classical physics and consider the 2D classical Ising model with the partition function + +```math +\mathcal{Z}(\beta) = \sum_{\{s\}} \exp(-\beta H(s)) \text{ with } H(s) = -J \sum_{\langle i, j \rangle} s_i s_j . +``` + +The idea is to encode the partition function into an infinite square lattice of rank-4 +tensors which can then be contracted using CTMRG. These rank-4 tensors are represented by +[`InfinitePartitionFunction`](@ref) states, as we will see. + +But first, let's seed the RNG and import all required modules: +""" + +using Random, LinearAlgebra +using TensorKit, PEPSKit +using QuadGK +Random.seed!(234923); + +md""" +## Defining the partition function + +The first step is to define the rank-4 tensor that, when contracted on a square lattice, +evaluates to the partition function value at a given $\beta$. Since we later want to compute +the magnetization and energy, we define the appropriate rank-4 tensors as well: +""" + +function classical_ising(; beta=log(1 + sqrt(2)) / 2, J=1.0) + K = beta * J + + # Boltzmann weights + t = ComplexF64[exp(K) exp(-K); exp(-K) exp(K)] + r = eigen(t) + nt = r.vectors * sqrt(Diagonal(r.values)) * r.vectors + + # local partition function tensor + O = zeros(2, 2, 2, 2) + O[1, 1, 1, 1] = 1 + O[2, 2, 2, 2] = 1 + @tensor o[-1 -2; -3 -4] := O[3 4; 2 1] * nt[-3; 3] * nt[-4; 4] * nt[-2; 2] * nt[-1; 1] + + # magnetization tensor + M = copy(O) + M[2, 2, 2, 2] *= -1 + @tensor m[-1 -2; -3 -4] := M[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * nt[-3; 3] * nt[-4; 4] + + # bond interaction tensor and energy-per-site tensor + e = ComplexF64[-J J; J -J] .* nt + @tensor e_hor[-1 -2; -3 -4] := + O[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * nt[-3; 3] * e[-4; 4] + @tensor e_vert[-1 -2; -3 -4] := + O[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * e[-3; 3] * nt[-4; 4] + e = e_hor + e_vert + + # fixed tensor map space for all three + TMS = ℂ^2 ⊗ ℂ^2 ← ℂ^2 ⊗ ℂ^2 + + return TensorMap(o, TMS), TensorMap(m, TMS), TensorMap(e, TMS) +end; + +md""" +So let's initialize these tensors at inverse temperature ``\beta=0.6`` and construct the +corresponding `InfinitePartitionFunction`: +""" + +beta = 0.6 +O, M, E = classical_ising(; beta) +Z = InfinitePartitionFunction(O) + +md""" +## Contracting the partition function + +Next, we can contract the partition function as per usual by constructing a `CTMRGEnv` with +a specified environment dimension (or space) and calling `leading_boundary` with appropriate +settings: +""" + +χenv = 20 +env₀ = CTMRGEnv(Z, χenv) +env, = leading_boundary(env₀, Z; tol=1e-8, maxiter=500); + +md""" +Note that CTMRG environments for partition functions differ from the PEPS environments only +by the edge tensors - instead of two legs connecting the edges and the PEPS-PEPS sandwich, +there is only one leg connecting the edges and the partition function tensor: +""" + +space.(env.edges) + +md""" +To compute the value of the partition function, we have to contract `Z` with the converged +environment using [`network_value`](@ref). Additionally, we will compute the magnetization +and energy (per site), again using [`expectation_value`](@ref) but this time also specifying +the index in the unit cell, where we want to insert the local tensor: +""" + +λ = network_value(Z, env) +m = expectation_value(Z, (1, 1) => M, env) +e = expectation_value(Z, (1, 1) => E, env) +@show λ m e; + +md""" +## Comparing against the exact Onsager solution + +In order to assess our results, we will compare against the +[exact Onsager solution](https://en.wikipedia.org/wiki/Square_lattice_Ising_model#Exact_solution). +To that end, we compute the exact free energy, magnetization and energy per site (where +`quadgk` performs the integral from $0$ to $\pi/2$): +""" + +function classical_ising_exact(; beta=log(1 + sqrt(2)) / 2, J=1.0) + K = beta * J + + k = 1 / sinh(2 * K)^2 + F = quadgk( + theta -> log(cosh(2 * K)^2 + 1 / k * sqrt(1 + k^2 - 2 * k * cos(2 * theta))), 0, pi + )[1] + f = -1 / beta * (log(2) / 2 + 1 / (2 * pi) * F) + + m = 1 - (sinh(2 * K))^(-4) > 0 ? (1 - (sinh(2 * K))^(-4))^(1 / 8) : 0 + + E = quadgk(theta -> 1 / sqrt(1 - (4 * k) * (1 + k)^(-2) * sin(theta)^2), 0, pi / 2)[1] + e = -J * cosh(2 * K) / sinh(2 * K) * (1 + 2 / pi * (2 * tanh(2 * K)^2 - 1) * E) + + return f, m, e +end + +f_exact, m_exact, e_exact = classical_ising_exact(; beta); + +md""" +And indeed, we do find agreement between the exact and CTMRG values (keeping in mind that +energy accuracy is limited by the environment dimension and the lack of proper +extrapolation): +""" + +@show (-log(λ) / beta - f_exact) / f_exact +@show (abs(m) - abs(m_exact)) / abs(m_exact) +@show (e - e_exact) / e_exact; diff --git a/examples/README.md b/examples/README.md index ce148b16e..7a728316c 100644 --- a/examples/README.md +++ b/examples/README.md @@ -18,4 +18,6 @@ delete the entries for which you wish to generate new files. ## Contributing Contributions are welcome! Please open an issue or a pull request if you have any questions -or suggestions. +or suggestions. The examples should be placed in their own folder, where the `main.jl` file +serves as the entry point. Any other files will be copied over to the `docs/src/examples` +folder, so you can use this to include images or other files. diff --git a/examples/make.jl b/examples/make.jl index beb73f4e5..1c97581a6 100644 --- a/examples/make.jl +++ b/examples/make.jl @@ -61,15 +61,27 @@ function build_example(root, name) target_dir = joinpath(@__DIR__, "..", "docs", "src", "examples", root, name) if !iscached(root, name) - Literate.markdown(source_file, target_dir; execute=true, name="index", - preprocess=attach_notebook_badge(root, name), mdstrings=true, - nbviewer_root_url="https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev", - binder_root_url="https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev", - credits=false, - repo_root_url="https://github.com/QuantumKitHub/PEPSKit.jl") - Literate.notebook(source_file, target_dir; execute=false, name="main", - preprocess=str -> replace(str, r"(? "\$"), - mdstrings=true, credits=false) + Literate.markdown( + source_file, + target_dir; + execute=true, + name="index", + preprocess=attach_notebook_badge(root, name), + mdstrings=true, + nbviewer_root_url="https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev", + binder_root_url="https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev", + credits=false, + repo_root_url="https://github.com/QuantumKitHub/PEPSKit.jl", + ) + Literate.notebook( + source_file, + target_dir; + execute=false, + name="main", + preprocess=str -> replace(str, r"(? "\$"), + mdstrings=true, + credits=false, + ) foreach(filter(!=("main.jl"), readdir(source_dir))) do f return cp(joinpath(source_dir, f), joinpath(target_dir, f); force=true) From c29015cb396fffc1ad50a01609ea6e89def141cb Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 17 Apr 2025 16:24:23 +0200 Subject: [PATCH 047/113] Add Heisenberg SU example --- examples/7.heisenberg_su/heis_tools.jl | 58 --------- examples/7.heisenberg_su/main.jl | 146 +++++++++++++++++++++++ examples/7.heisenberg_su/simpleupdate.jl | 57 --------- 3 files changed, 146 insertions(+), 115 deletions(-) delete mode 100644 examples/7.heisenberg_su/heis_tools.jl create mode 100644 examples/7.heisenberg_su/main.jl delete mode 100644 examples/7.heisenberg_su/simpleupdate.jl diff --git a/examples/7.heisenberg_su/heis_tools.jl b/examples/7.heisenberg_su/heis_tools.jl deleted file mode 100644 index b27f3148c..000000000 --- a/examples/7.heisenberg_su/heis_tools.jl +++ /dev/null @@ -1,58 +0,0 @@ -using Test -using Printf -using Random -import Statistics: mean -using TensorKit -using PEPSKit - -module MeasureHeis - -export measure_heis - -using TensorKit -import MPSKitModels: S_x, S_y, S_z, S_exchange -using PEPSKit - -""" -Measure magnetization on each site -""" -function cal_mags(peps::InfinitePEPS, env::CTMRGEnv) - Nr, Nc = size(peps) - lattice = collect(space(t, 1) for t in peps.A) - # detect symmetry on physical axis - symm = sectortype(space(peps.A[1, 1])) - if symm == Trivial - Sas = real.([S_x(symm), im * S_y(symm), S_z(symm)]) - elseif symm == U1Irrep - # only Sz preserves - Sas = real.([S_z(symm)]) - else - throw(ArgumentError("Unrecognized symmetry on physical axis")) - end - return [ - collect( - expectation_value( - peps, LocalOperator(lattice, (CartesianIndex(r, c),) => Sa), env - ) for (r, c) in Iterators.product(1:Nr, 1:Nc) - ) for Sa in Sas - ] -end - -""" -Measure physical quantities for Heisenberg model -""" -function measure_heis(peps::InfinitePEPS, H::LocalOperator, env::CTMRGEnv) - results = Dict{String,Any}() - Nr, Nc = size(peps) - results["e_site"] = cost_function(peps, env, H) / (Nr * Nc) - results["mag"] = cal_mags(peps, env) - results["mag_norm"] = collect( - norm([mags[r, c] for mags in results["mag"]]) for - (r, c) in Iterators.product(1:Nr, 1:Nc) - ) - return results -end - -end - -import .MeasureHeis: measure_heis diff --git a/examples/7.heisenberg_su/main.jl b/examples/7.heisenberg_su/main.jl new file mode 100644 index 000000000..0235a42d3 --- /dev/null +++ b/examples/7.heisenberg_su/main.jl @@ -0,0 +1,146 @@ +using Markdown +md""" +# Simple update for the Heisenberg model + +In this next example, we will use [`SimpleUpdate`](@ref) imaginary time evolution to treat +the two-dimensional Heisenberg model once again: + +```math +H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j. +``` + +In the previous examples, we used a sublattice rotation to simulate antiferromagnetic +Hamiltonian on a single-site unit cell. Here, we will instead use a $2 \times 2$ unit cell +and set $J_x=J_y=J_z=1$. + +Let's get started by seeding the RNG and importing all required modules: +""" + +using Random +import Statistics: mean +using TensorKit, PEPSKit +import MPSKitModels: S_x, S_y, S_z, S_exchange +Random.seed!(0); + +md""" +## Defining the Hamiltonian + +To construct the Heisenberg Hamiltonian as just discussed, we'll use `heisenberg_XYZ` and, +in addition, make it real (`real` and `imag` works for `LocalOperator`s) since we want to +use PEPS and environments with real entries. We can either initialize the Hamiltonian with +no internal symmetries (`symm = Trivial`) or use the global $U(1)$ symmetry +(`symm = U1Irrep`): +""" + +symm = Trivial # ∈ {Trivial, U1Irrep} +Nr, Nc = 2, 2 +H = real(heisenberg_XYZ(ComplexF64, symm, InfiniteSquare(Nr, Nc); Jx=1, Jy=1, Jz=1)); + +md""" +## Simple updating + +We proceed by initializing a random weighted PEPS that will be evolved. Again, we'll +normalize its vertex tensors. First though, we need to take of defining the appropriate +(symmetric) spaces: +""" + +Dbond = 4 +χenv = 16 +if symm == Trivial + physical_space = ℂ^2 + bond_space = ℂ^Dbond + env_space = ℂ^χenv +elseif symm == U1Irrep + physical_space = ℂ[U1Irrep](1//2 => 1, -1//2 => 1) + bond_space = ℂ[U1Irrep](0 => Dbond ÷ 2, 1//2 => Dbond ÷ 4, -1//2 => Dbond ÷ 4) + env_space = ℂ[U1Irrep](0 => χenv ÷ 2, 1//2 => χenv ÷ 4, -1//2 => χenv ÷ 4) +else + error("not implemented") +end + +wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, bond_space; unitcell=(Nr, Nc)) +for ind in CartesianIndices(wpeps.vertices) + wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf) +end + +md""" +Next, we can start the `SimpleUpdate` routine, successively decreasing the time intervals +and singular value convergence tolerances. Note that TensorKit allows to combine SVD +truncation schemes, which we use here to set a maximal bond dimension and at the same time +fix a truncation error (if that can be reached by remaining below `Dbond`): +""" + +dts = [1e-2, 1e-3, 4e-4] +tols = [1e-6, 1e-8, 1e-8] +maxiter = 10000 +trscheme_peps = truncerr(1e-10) & truncdim(Dbond) + +for (dt, tol) in zip(dts, tols) + alg = SimpleUpdate(dt, tol, maxiter, trscheme_peps) + result = simpleupdate(wpeps, H, alg; bipartite=true) + global wpeps = result[1] +end + +md""" +## Computing the ground-state energy and magnetizations + +In order to compute observable expectation values, we need to converge a CTMRG environment +on the evolved PEPS. Let's do so: +""" + +peps = InfinitePEPS(wpeps) # absorb the weights +env₀ = CTMRGEnv(rand, Float64, peps, env_space) +trscheme_env = truncerr(1e-10) & truncdim(χenv) +env, = leading_boundary( + env₀, + peps; + alg=:sequential, + projector_alg=:fullinfinite, + tol=1e-10, + trscheme=trscheme_env, +); + +md""" +Finally, we'll measure the energy and different magnetizations. For the magnetizations, +the plan is to compute the expectation values unit cell entry-wise in different spin +directions: +""" + +function compute_mags(peps::InfinitePEPS, env::CTMRGEnv) + lattice = collect(space(t, 1) for t in peps.A) + + # detect symmetry on physical axis + symm = sectortype(space(peps.A[1, 1])) + if symm == Trivial + S_ops = real.([S_x(symm), im * S_y(symm), S_z(symm)]) + elseif symm == U1Irrep + S_ops = real.([S_z(symm)]) # only Sz preserves + end + + return [ + collect( + expectation_value( + peps, LocalOperator(lattice, (CartesianIndex(r, c),) => S), env + ) for (r, c) in Iterators.product(1:size(peps, 1), 1:size(peps, 2)) + ) for S in S_ops + ] +end + +E = expectation_value(peps, H, env) / (Nr * Nc) +Ms = compute_mags(peps, env) +M_norms = collect(norm([m[r, c] for m in Ms]) for (r, c) in Iterators.product(1:Nr, 1:Nc)) +@show E Ms M_norms; + +md""" +To assess the results, we will benchmark against data from [Corboz](@ref corboz_variational_2016), +which use manual gradients to perform a variational optimization of the Heisenberg model. +In particular, for the energy and magnetization they find $E_\text{ref} = -0.6675$ and +$M_\text{ref} = 0.3767$. Looking at the relative errors, we find general agreement, although +the accuracy is limited by the methodological limitations of the simple update algorithm as +well as finite bond dimension effects and a lacking extrapolation: +""" + +E_ref = -0.6675 +M_ref = 0.3767 +@show (E - E_ref) / E_ref +@show (mean(M_norms) - M_ref) / E_ref; diff --git a/examples/7.heisenberg_su/simpleupdate.jl b/examples/7.heisenberg_su/simpleupdate.jl deleted file mode 100644 index f3cd64a6a..000000000 --- a/examples/7.heisenberg_su/simpleupdate.jl +++ /dev/null @@ -1,57 +0,0 @@ -include("heis_tools.jl") - -# benchmark data is from Phys. Rev. B 94, 035133 (2016) -Dbond, χenv, symm = 4, 16, Trivial -trscheme_peps = truncerr(1e-10) & truncdim(Dbond) -trscheme_env = truncerr(1e-10) & truncdim(χenv) -Nr, Nc = 2, 2 -# Heisenberg model Hamiltonian -# (already only includes nearest neighbor terms) -ham = real(heisenberg_XYZ(ComplexF64, symm, InfiniteSquare(Nr, Nc); Jx=1.0, Jy=1.0, Jz=1.0)) - -# random initialization of 2x2 iPEPS with weights and CTMRGEnv (using real numbers) -if symm == Trivial - Pspace = ℂ^2 - Vspace = ℂ^Dbond - Espace = ℂ^χenv -elseif symm == U1Irrep - Pspace = ℂ[U1Irrep](1//2 => 1, -1//2 => 1) - Vspace = ℂ[U1Irrep](0 => Dbond ÷ 2, 1//2 => Dbond ÷ 4, -1//2 => Dbond ÷ 4) - Espace = ℂ[U1Irrep](0 => χenv ÷ 2, 1//2 => χenv ÷ 4, -1//2 => χenv ÷ 4) -else - error("Not implemented") -end -Random.seed!(0) -peps = InfiniteWeightPEPS(rand, Float64, Pspace, Vspace; unitcell=(Nr, Nc)) -# normalize vertex tensors -for ind in CartesianIndices(peps.vertices) - peps.vertices[ind] /= norm(peps.vertices[ind], Inf) -end - -# simple update -dts = [1e-2, 1e-3, 4e-4] -tols = [1e-6, 1e-8, 1e-8] -maxiter = 10000 -for (dt, tol) in zip(dts, tols) - alg = SimpleUpdate(dt, tol, maxiter, trscheme_peps) - result = simpleupdate(peps, ham, alg; bipartite=true) - global peps = result[1] -end -# measure physical quantities with CTMRG -peps_ = InfinitePEPS(peps) -env = CTMRGEnv(rand, Float64, peps_, Espace) -env, = leading_boundary( - env, - peps_; - alg=:sequential, - projector_alg=:fullinfinite, - tol=1e-10, - verbosity=2, - trscheme=trscheme_env, -) -meas = measure_heis(peps_, ham, env) -display(meas) -@info @sprintf("Energy = %.8f\n", meas["e_site"]) -@info @sprintf("Staggered magnetization = %.8f\n", mean(meas["mag_norm"])) -@test isapprox(meas["e_site"], -0.6675; atol=1e-3) -@test isapprox(mean(meas["mag_norm"]), 0.3767; atol=1e-3) From e1ba6cf060e7511dbd910d6ea6642ce7a45cf82b Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 17 Apr 2025 17:43:42 +0200 Subject: [PATCH 048/113] Add partially generated example files --- docs/src/examples/1.heisenberg/index.md | 330 ++++++++ docs/src/examples/1.heisenberg/main.ipynb | 392 ++++++++++ docs/src/examples/2.boundary_mps/index.md | 258 +++++++ docs/src/examples/2.boundary_mps/main.ipynb | 324 ++++++++ docs/src/examples/3.bose_hubbard/index.md | 810 ++++++++++++++++++++ docs/src/examples/3.bose_hubbard/main.ipynb | 257 +++++++ docs/src/examples/4.xxz/index.md | 599 +++++++++++++++ docs/src/examples/4.xxz/main.ipynb | 197 +++++ examples/1.heisenberg/main.jl | 2 +- examples/3.bose_hubbard/main.jl | 2 +- examples/4.xxz/main.jl | 4 +- examples/5.fermi_hubbard/main.jl | 2 +- examples/7.heisenberg_su/main.jl | 8 +- examples/8.ising_partition_function/main.jl | 10 +- examples/Cache.toml | 5 + examples/Project.toml | 1 + 16 files changed, 3187 insertions(+), 14 deletions(-) create mode 100644 docs/src/examples/1.heisenberg/index.md create mode 100644 docs/src/examples/1.heisenberg/main.ipynb create mode 100644 docs/src/examples/2.boundary_mps/index.md create mode 100644 docs/src/examples/2.boundary_mps/main.ipynb create mode 100644 docs/src/examples/3.bose_hubbard/index.md create mode 100644 docs/src/examples/3.bose_hubbard/main.ipynb create mode 100644 docs/src/examples/4.xxz/index.md create mode 100644 docs/src/examples/4.xxz/main.ipynb create mode 100644 examples/Cache.toml diff --git a/docs/src/examples/1.heisenberg/index.md b/docs/src/examples/1.heisenberg/index.md new file mode 100644 index 000000000..9c9ffc470 --- /dev/null +++ b/docs/src/examples/1.heisenberg/index.md @@ -0,0 +1,330 @@ +```@meta +EditURL = "../../../../examples/1.heisenberg/main.jl" +``` + +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//1.heisenberg/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//1.heisenberg/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//1.heisenberg) + +````julia +using Markdown +```` + +# [Optimizing the 2D Heisenberg model](@id examples_heisenberg) + +In this example we want to provide a basic rundown of PEPSKit's optimization workflow for +PEPS. To that end, we will consider the two-dimensional Heisenberg model on a square lattice + +```math +H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j +``` + +Here, we want to set $J_x=J_y=J_z=1$ where the Heisenberg model is in the antiferromagnetic +regime. Due to the bipartite sublattice structure of antiferromagnetic order one needs a +PEPS ansatz with a $2 \times 2$ unit cell. This can be circumvented by performing a unitary +sublattice rotation on all B-sites resulting in a change of parameters to +$(J_x, J_y, J_z)=(-1, 1, -1)$. This gives us a unitarily equivalent Hamiltonian (with the +same spectrum) with a ground state on a single-site unit cell. + +Let us get started by fixing the random seed of this example to make it deterministic: + +````julia +using Random +Random.seed!(123456789); +```` + +We're going to need only two packages: `TensorKit`, since we use that for all the underlying +tensor operations, and `PEPSKit` itself. So let us import these: + +````julia +using TensorKit, PEPSKit +```` + +## Defining the Heisenberg Hamiltonian + +To create the sublattice rotated Heisenberg Hamiltonian on an infinite square lattice, we use +the `heisenberg_XYZ` method from [MPSKitModels](https://quantumkithub.github.io/MPSKitModels.jl/dev/) +which is redefined for the `InfiniteSquare` and reexported in PEPSKit: + +````julia +H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1) +```` + +```` +LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 2, 2, Vector{ComplexF64}}}, Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 2, 2, Vector{ComplexF64}}}}, TensorKit.ComplexSpace}(TensorKit.ComplexSpace[ℂ^2;;], ((CartesianIndex(1, 1), CartesianIndex(1, 2)) => TensorMap((ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)): +[:, :, 1, 1] = + -0.25 + 0.0im 0.0 + 0.0im + 0.0 + 0.0im -0.5 + 0.0im + +[:, :, 2, 1] = + 0.0 + 0.0im 0.0 + 0.0im + 0.25 + 0.0im 0.0 + 0.0im + +[:, :, 1, 2] = + 0.0 + 0.0im 0.25 + 0.0im + 0.0 + 0.0im 0.0 + 0.0im + +[:, :, 2, 2] = + -0.5 + 0.0im 0.0 + 0.0im + 0.0 + 0.0im -0.25 + 0.0im +, (CartesianIndex(1, 1), CartesianIndex(2, 1)) => TensorMap((ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)): +[:, :, 1, 1] = + -0.25 + 0.0im 0.0 + 0.0im + 0.0 + 0.0im -0.5 + 0.0im + +[:, :, 2, 1] = + 0.0 + 0.0im 0.0 + 0.0im + 0.25 + 0.0im 0.0 + 0.0im + +[:, :, 1, 2] = + 0.0 + 0.0im 0.25 + 0.0im + 0.0 + 0.0im 0.0 + 0.0im + +[:, :, 2, 2] = + -0.5 + 0.0im 0.0 + 0.0im + 0.0 + 0.0im -0.25 + 0.0im +)) +```` + +## Setting up the algorithms and initial guesses + +Next, we set the simulation parameters. During optimization, the PEPS will be contracted +using CTMRG and the PEPS gradient will be computed by differentiating through the CTMRG +routine using AD. Since the algorithmic stack that implements this is rather elaborate, +the amount of settings one can configure is also quite large. To reduce this complexity, +PEPSKit defaults to (presumably) reasonable settings which also dynamically adapts to the +user-specified parameters. + +First, we set the bond dimension `Dbond` of the virtual PEPS indices and the environment +dimension `χenv` of the virtual corner and transfer matrix indices. + +````julia +Dbond = 2 +χenv = 16; +```` + +To configure the CTMRG algorithm, we create a `NamedTuple` containing different keyword +arguments. To see a description of all arguments, see the docstring of +[`leading_boundary`](@ref). Here, we want to converge the CTMRG environments up to a +specific tolerance and during the CTMRG run keep all index dimensions fixed: + +````julia +boundary_alg = (; tol=1e-10, trscheme=(; alg=:fixedspace)); +```` + +Let us also configure the optimizer algorithm. We are going to optimize the PEPS using the +L-BFGS optimizer from [OptimKit](https://github.com/Jutho/OptimKit.jl). Again, we specify +the convergence tolerance (for the gradient norm) as well as the maximal number of iterations +and the BFGS memory size (which is used to approximate the Hessian): + +````julia +optimizer_alg = (; alg=:lbfgs, tol=1e-4, maxiter=100, lbfgs_memory=16); +```` + +Additionally, during optimization, we want to reuse the previous CTMRG environment to +initialize the CTMRG run of the current optimization step using the `reuse_env` argument. +And to control the output information, we set the `verbosity`: + +````julia +reuse_env = true +verbosity = 1; +```` + +Next, we initialize a random PEPS which will be used as an initial guess for the +optimization. To get a PEPS with physical dimension 2 (since we have a spin-1/2 Hamiltonian) +with complex-valued random Gaussian entries, we set: + +````julia +peps₀ = InfinitePEPS(randn, ComplexF64, 2, Dbond) +```` + +```` +InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}(TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}[TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')): +[:, :, 1, 1, 1] = + 0.07382174258286094 + 0.12820373667088403im 0.7897519397510839 + 0.9113654266438473im + 0.2553716885006697 - 0.4358399804354269im -1.0272416446076236 - 0.12635062198157215im + +[:, :, 2, 1, 1] = + 0.16833628450178303 - 0.10088950122180829im -0.9702030532300809 + 0.010730752411986726im + -1.6804460553576506 + 0.29081053879369084im 0.6844811667615024 + 0.09101537356941222im + +[:, :, 1, 2, 1] = + 0.5085938050744258 + 0.3786892551842583im 1.0020057959636561 - 1.4704891009758718im + -0.6153328223084331 + 0.10417896606055738im 0.6024931811537675 - 1.0348374874397468im + +[:, :, 2, 2, 1] = + -0.027201695938305456 + 0.5778042099380925im 0.09232089635078945 + 0.6143070126937361im + 1.0707115218777772 - 0.5747168579241235im -0.5819741818511422 - 0.9842624134267605im + +[:, :, 1, 1, 2] = + 1.2332543810053822 - 1.7783531996396438im 0.8887723728085348 + 0.7809798723615474im + 1.2251189302516847 - 0.6853683793073324im 1.5333834584675397 - 0.13856216581406375im + +[:, :, 2, 1, 2] = + 0.1406381347783769 + 0.6630243440357264im -0.7294596235434386 + 0.40327909254711103im + 0.7212056487788236 + 0.24320971945037498im 0.9991347929322827 + 0.0017902515981375842im + +[:, :, 1, 2, 2] = + 0.34282910982693904 - 0.4865238029567361im 0.9380949844871762 - 0.6985342237892025im + -0.7437083517319159 - 0.6895708849529253im -0.8981092940164176 + 0.9720706252141459im + +[:, :, 2, 2, 2] = + -0.8897079923413616 - 0.7145412189457411im 0.07771261045117502 - 0.6400190994609709im + -1.6099412157243007 + 0.8855200965611144im 0.7357380595021633 + 0.4626916850143416im +;;]) +```` + +The last thing we need before we can start the optimization is an initial CTMRG environment. +Typically, a random environment which we converge on `peps₀` serves as a good starting point. +To contract a PEPS starting from an environment using CTMRG, we call [`leading_boundary`](@ref): + +````julia +env_random = CTMRGEnv(randn, ComplexF64, peps₀, ℂ^χenv); +env₀, info_ctmrg = leading_boundary(env_random, peps₀; boundary_alg...); +```` + +```` +[ Info: CTMRG init: obj = -2.749614463601e+00 +3.639628057806e+00im err = 1.0000e+00 +[ Info: CTMRG conv 27: obj = +9.727103564786e+00 err = 2.6201184615e-11 time = 7.47 sec + +```` + +Besides the converged environment, `leading_boundary` also returns a `NamedTuple` of +informational quantities such as the last (maximal) SVD truncation error: + +````julia +@show info_ctmrg.truncation_error; +```` + +```` +info_ctmrg.truncation_error = 0.0017032153529848298 + +```` + +## Ground state search + +Finally, we can start the optimization by calling [`fixedpoint`](@ref) on `H` with our +settings for the boundary (CTMRG) algorithm and the optimizer. This might take a while +(especially the precompilation of AD code in this case): + +````julia +peps, env, E, info_opt = fixedpoint( + H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity +); +```` + +```` +┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Float64}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 +┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 + +```` + +Note that `fixedpoint` returns the final optimized PEPS, the last converged environment, +the final energy estimate as well as a `NamedTuple` of diagnostics. This allows us to, e.g., +analyze the number of cost function calls or the history of gradient norms to evaluate +the convergence rate: + +````julia +@show info_opt.fg_evaluations info_opt.gradnorms[1:10:end]; +```` + +```` +info_opt.fg_evaluations = 101 +info_opt.gradnorms[1:10:end] = [0.9354746780119341, 0.30327773685601944, 0.01774018270739478, 0.011400758285761247, 0.006234905315448026, 0.010361182129783082, 0.0019945520233835886, 0.0007205561049739842, 0.00014589086981901128] + +```` + +Let's now compare the optimized energy against an accurate Quantum Monte Carlo estimate by +[Sandvik](@cite sandvik_computational_2011), where the energy per site was found to be +$E_{\text{ref}}=−0.6694421$. From our simple optimization we find: + +````julia +@show E; +```` + +```` +E = -0.6625142918261725 + +```` + +While this energy is in the right ballpark, there is still quite some deviation from the +accurate reference energy. This, however, can be attributed to the small bond dimension - an +optimization with larger bond dimension would approach this value much more closely. + +A more reasonable comparison would be against another finite bond dimension PEPS simulation. +For example, Juraj Hasik's data from $J_1\text{-}J_2$ +[PEPS simulations](https://github.com/jurajHasik/j1j2_ipeps_states/blob/main/single-site_pg-C4v-A1/j20.0/state_1s_A1_j20.0_D2_chi_opt48.dat) +yields $E_{D=2,\chi=16}=-0.660231\dots$ which is more in line with what we find here. + +## Compute the correlation lengths and transfer matrix spectra + +In practice, in order to obtain an accurate and variational energy estimate, one would need +to compute multiple energies at different environment dimensions and extrapolate in, e.g., +the correlation length or the second gap of the transfer matrix spectrum. For that, we would +need the [`correlation_length`](@ref) function, which computes the horizontal and vertical +correlation lengths and transfer matrix spectra for all unit cell coordinates: + +````julia +ξ_h, ξ_v, λ_h, λ_v = correlation_length(peps, env) +@show ξ_h ξ_v; +```` + +```` +ξ_h = [1.0343456168037697] +ξ_v = [1.0242117798450008] + +```` + +## Computing observables + +As a last thing, we want to see how we can compute expectation values of observables, given +the optimized PEPS and its CTMRG environment. To compute, e.g., the magnetization, we first +need to define the observable as a `TensorMap`: + +````julia +σ_z = TensorMap([1.0 0.0; 0.0 -1.0], ℂ^2, ℂ^2) +```` + +```` +TensorMap(ℂ^2 ← ℂ^2): + 1.0 0.0 + 0.0 -1.0 + +```` + +In order to be able to contract it with the PEPS and environment, we define need to define a +`LocalOperator` and specify on which physical spaces and sites the observable acts. That way, +the PEPS-environment-operator contraction gets automatically generated (also works for +multi-site operators!). See the [`LocalOperator`](@ref) docstring for more details. +The magnetization is just a single-site observable, so we have: + +````julia +M = LocalOperator(fill(ℂ^2, 1, 1), (CartesianIndex(1, 1),) => σ_z) +```` + +```` +LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}}, TensorKit.TensorMap{Float64, TensorKit.ComplexSpace, 1, 1, Vector{Float64}}}}, TensorKit.ComplexSpace}(TensorKit.ComplexSpace[ℂ^2;;], ((CartesianIndex(1, 1),) => TensorMap(ℂ^2 ← ℂ^2): + 1.0 0.0 + 0.0 -1.0 +,)) +```` + +Finally, to evaluate the expecation value on the `LocalOperator`, we call: + +````julia +@show expectation_value(peps, M, env); +```` + +```` +expectation_value(peps, M, env) = -0.7533587094249098 - 3.448382721363169e-16im + +```` + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/docs/src/examples/1.heisenberg/main.ipynb b/docs/src/examples/1.heisenberg/main.ipynb new file mode 100644 index 000000000..0f18cd8bf --- /dev/null +++ b/docs/src/examples/1.heisenberg/main.ipynb @@ -0,0 +1,392 @@ +{ + "cells": [ + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Markdown" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "# Optimizing the 2D Heisenberg model\n", + "\n", + "In this example we want to provide a basic rundown of PEPSKit's optimization workflow for\n", + "PEPS. To that end, we will consider the two-dimensional Heisenberg model on a square lattice\n", + "\n", + "$$\n", + "H = \\sum_{\\langle i,j \\rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j\n", + "$$\n", + "\n", + "Here, we want to set $J_x=J_y=J_z=1$ where the Heisenberg model is in the antiferromagnetic\n", + "regime. Due to the bipartite sublattice structure of antiferromagnetic order one needs a\n", + "PEPS ansatz with a $2 \\times 2$ unit cell. This can be circumvented by performing a unitary\n", + "sublattice rotation on all B-sites resulting in a change of parameters to\n", + "$(J_x, J_y, J_z)=(-1, 1, -1)$. This gives us a unitarily equivalent Hamiltonian (with the\n", + "same spectrum) with a ground state on a single-site unit cell.\n", + "\n", + "Let us get started by fixing the random seed of this example to make it deterministic:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Random\n", + "Random.seed!(123456789);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "We're going to need only two packages: `TensorKit`, since we use that for all the underlying\n", + "tensor operations, and `PEPSKit` itself. So let us import these:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "using TensorKit, PEPSKit" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Defining the Heisenberg Hamiltonian\n", + "\n", + "To create the sublattice rotated Heisenberg Hamiltonian on an infinite square lattice, we use\n", + "the `heisenberg_XYZ` method from [MPSKitModels](https://quantumkithub.github.io/MPSKitModels.jl/dev/)\n", + "which is redefined for the `InfiniteSquare` and reexported in PEPSKit:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1)" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Setting up the algorithms and initial guesses\n", + "\n", + "Next, we set the simulation parameters. During optimization, the PEPS will be contracted\n", + "using CTMRG and the PEPS gradient will be computed by differentiating through the CTMRG\n", + "routine using AD. Since the algorithmic stack that implements this is rather elaborate,\n", + "the amount of settings one can configure is also quite large. To reduce this complexity,\n", + "PEPSKit defaults to (presumably) reasonable settings which also dynamically adapts to the\n", + "user-specified parameters.\n", + "\n", + "First, we set the bond dimension `Dbond` of the virtual PEPS indices and the environment\n", + "dimension `χenv` of the virtual corner and transfer matrix indices." + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "Dbond = 2\n", + "χenv = 16;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "To configure the CTMRG algorithm, we create a `NamedTuple` containing different keyword\n", + "arguments. To see a description of all arguments, see the docstring of\n", + "`leading_boundary`. Here, we want to converge the CTMRG environments up to a\n", + "specific tolerance and during the CTMRG run keep all index dimensions fixed:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "boundary_alg = (; tol=1e-10, trscheme=(; alg=:fixedspace));" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Let us also configure the optimizer algorithm. We are going to optimize the PEPS using the\n", + "L-BFGS optimizer from [OptimKit](https://github.com/Jutho/OptimKit.jl). Again, we specify\n", + "the convergence tolerance (for the gradient norm) as well as the maximal number of iterations\n", + "and the BFGS memory size (which is used to approximate the Hessian):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "optimizer_alg = (; alg=:lbfgs, tol=1e-4, maxiter=100, lbfgs_memory=16);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Additionally, during optimization, we want to reuse the previous CTMRG environment to\n", + "initialize the CTMRG run of the current optimization step using the `reuse_env` argument.\n", + "And to control the output information, we set the `verbosity`:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "reuse_env = true\n", + "verbosity = 1;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Next, we initialize a random PEPS which will be used as an initial guess for the\n", + "optimization. To get a PEPS with physical dimension 2 (since we have a spin-1/2 Hamiltonian)\n", + "with complex-valued random Gaussian entries, we set:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "peps₀ = InfinitePEPS(randn, ComplexF64, 2, Dbond)" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "The last thing we need before we can start the optimization is an initial CTMRG environment.\n", + "Typically, a random environment which we converge on `peps₀` serves as a good starting point.\n", + "To contract a PEPS starting from an environment using CTMRG, we call `leading_boundary`:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "env_random = CTMRGEnv(randn, ComplexF64, peps₀, ℂ^χenv);\n", + "env₀, info_ctmrg = leading_boundary(env_random, peps₀; boundary_alg...);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Besides the converged environment, `leading_boundary` also returns a `NamedTuple` of\n", + "informational quantities such as the last (maximal) SVD truncation error:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "@show info_ctmrg.truncation_error;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Ground state search\n", + "\n", + "Finally, we can start the optimization by calling `fixedpoint` on `H` with our\n", + "settings for the boundary (CTMRG) algorithm and the optimizer. This might take a while\n", + "(especially the precompilation of AD code in this case):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "peps, env, E, info_opt = fixedpoint(\n", + " H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity\n", + ");" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Note that `fixedpoint` returns the final optimized PEPS, the last converged environment,\n", + "the final energy estimate as well as a `NamedTuple` of diagnostics. This allows us to, e.g.,\n", + "analyze the number of cost function calls or the history of gradient norms to evaluate\n", + "the convergence rate:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "@show info_opt.fg_evaluations info_opt.gradnorms[1:10:end];" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Let's now compare the optimized energy against an accurate Quantum Monte Carlo estimate by\n", + "[Sandvik](@cite sandvik_computational_2011), where the energy per site was found to be\n", + "$E_{\\text{ref}}=−0.6694421$. From our simple optimization we find:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "@show E;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "While this energy is in the right ballpark, there is still quite some deviation from the\n", + "accurate reference energy. This, however, can be attributed to the small bond dimension - an\n", + "optimization with larger bond dimension would approach this value much more closely.\n", + "\n", + "A more reasonable comparison would be against another finite bond dimension PEPS simulation.\n", + "For example, Juraj Hasik's data from $J_1\\text{-}J_2$\n", + "[PEPS simulations](https://github.com/jurajHasik/j1j2_ipeps_states/blob/main/single-site_pg-C4v-A1/j20.0/state_1s_A1_j20.0_D2_chi_opt48.dat)\n", + "yields $E_{D=2,\\chi=16}=-0.660231\\dots$ which is more in line with what we find here.\n", + "\n", + "## Compute the correlation lengths and transfer matrix spectra\n", + "\n", + "In practice, in order to obtain an accurate and variational energy estimate, one would need\n", + "to compute multiple energies at different environment dimensions and extrapolate in, e.g.,\n", + "the correlation length or the second gap of the transfer matrix spectrum. For that, we would\n", + "need the `correlation_length` function, which computes the horizontal and vertical\n", + "correlation lengths and transfer matrix spectra for all unit cell coordinates:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "ξ_h, ξ_v, λ_h, λ_v = correlation_length(peps, env)\n", + "@show ξ_h ξ_v;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Computing observables\n", + "\n", + "As a last thing, we want to see how we can compute expectation values of observables, given\n", + "the optimized PEPS and its CTMRG environment. To compute, e.g., the magnetization, we first\n", + "need to define the observable as a `TensorMap`:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "σ_z = TensorMap([1.0 0.0; 0.0 -1.0], ℂ^2, ℂ^2)" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "In order to be able to contract it with the PEPS and environment, we define need to define a\n", + "`LocalOperator` and specify on which physical spaces and sites the observable acts. That way,\n", + "the PEPS-environment-operator contraction gets automatically generated (also works for\n", + "multi-site operators!). See the `LocalOperator` docstring for more details.\n", + "The magnetization is just a single-site observable, so we have:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "M = LocalOperator(fill(ℂ^2, 1, 1), (CartesianIndex(1, 1),) => σ_z)" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Finally, to evaluate the expecation value on the `LocalOperator`, we call:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "@show expectation_value(peps, M, env);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "---\n", + "\n", + "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" + ], + "metadata": {} + } + ], + "nbformat_minor": 3, + "metadata": { + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.11.4" + }, + "kernelspec": { + "name": "julia-1.11", + "display_name": "Julia 1.11.4", + "language": "julia" + } + }, + "nbformat": 4 +} diff --git a/docs/src/examples/2.boundary_mps/index.md b/docs/src/examples/2.boundary_mps/index.md new file mode 100644 index 000000000..1bbc7f4ac --- /dev/null +++ b/docs/src/examples/2.boundary_mps/index.md @@ -0,0 +1,258 @@ +```@meta +EditURL = "../../../../examples/2.boundary_mps/main.jl" +``` + +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//2.boundary_mps/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//2.boundary_mps/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//2.boundary_mps) + +````julia +using Markdown +```` + +# Boundary MPS contractions using VUMPS and PEPOs + +Instead of using CTMRG to contract an infinite PEPS, one can also use an boundary MPSs +ansatz to contract the infinite network. In particular, we will here use VUMPS to do so. + +Before we start, we'll fix the random seed for reproducability: + +````julia +using Random +Random.seed!(29384293742893); +```` + +Besides `TensorKit` and `PEPSKit`, we here also need [`MPSKit`](https://quantumkithub.github.io/MPSKit.jl/stable/) +which implements the VUMPS algorithm as well as the required MPS operations: + +````julia +using TensorKit, PEPSKit, MPSKit +```` + +## Computing a PEPS norm + +We start by initializing a random initial infinite PEPS: + +````julia +peps₀ = InfinitePEPS(ComplexSpace(2), ComplexSpace(2)) +```` + +```` +InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}(TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}[TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')): +[:, :, 1, 1, 1] = + -0.5524390176345264 - 0.07357188568178248im 0.34014501646081047 - 0.7552574870030472im + -0.5455245317233405 + 0.8946618856309984im 1.249282911658007 + 0.45352274131986825im + +[:, :, 2, 1, 1] = + 0.33621043661988675 + 0.4400876608299719im -0.9866664087107284 - 0.28688827761325675im + -0.0077250067072679235 + 1.7380910495900947im -0.19071062901939098 - 1.1367500834118434im + +[:, :, 1, 2, 1] = + -0.09149850722392933 + 0.3560942836258964im 1.6255618447281441 - 0.5689426732891244im + -0.19309251474097275 - 0.32363899914302613im -0.025356816648697236 + 0.5632279168368712im + +[:, :, 2, 2, 1] = + 0.07675114584269166 - 0.011479824536308164im -0.17779977372973318 + 1.1379201927122535im + -1.0116302866282385 - 0.9253070687198848im 1.1649047337212566 + 0.9936369101208083im + +[:, :, 1, 1, 2] = + 0.2510676919806213 - 0.182052326055189im -0.5792402993550532 - 0.4309109406268341im + 0.04501645227038913 - 0.8140971172854408im -0.5608346802110794 + 0.21262550530307248im + +[:, :, 2, 1, 2] = + 1.5061767210554262 + 0.17190948125245623im -0.8001234458239143 + 0.6764943808639017im + -0.8176938467062373 - 0.40919675695722396im -0.6692181340575689 + 0.6923370271564298im + +[:, :, 1, 2, 2] = + -0.16556382071485704 + 0.2540132491548349im 0.05546115732751907 + 0.3723175507964387im + -0.29883021417599165 - 0.07229462525164528im -1.200173153698329 - 0.45509299328832953im + +[:, :, 2, 2, 2] = + 0.289873563752043 + 0.44718981087960125im 0.018357838612906643 + 0.9634127683557584im + 0.5128282969211142 - 0.2865462937979091im -0.44278618042821827 + 0.2612084385439659im +;;]) +```` + +To compute its norm, we need to construct the transfer operator corresponding to +the partition function representing the overlap $\langle \psi_\text{PEPS} | \psi_\text{PEPS} \rangle$: + +````julia +transfer = InfiniteTransferPEPS(peps₀, 1, 1) +```` + +```` +single site MPSKit.InfiniteMPO{Tuple{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}}: +╷ ⋮ +┼ O[1]: (TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')), TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)'))) +╵ ⋮ + +```` + +We then find its leading boundary MPS fixed point, where the corresponding eigenvalue +encodes the norm of the state. To that end, let us first we build an initial guess for the +boundary MPS, choosing a bond dimension of 20: + +````julia +mps₀ = initializeMPS(transfer, [ComplexSpace(20)]) +```` + +```` +single site InfiniteMPS: +│ ⋮ +│ C[1]: TensorMap(ℂ^20 ← ℂ^20) +├── AL[1]: TensorMap((ℂ^20 ⊗ ℂ^2 ⊗ (ℂ^2)') ← ℂ^20) +│ ⋮ + +```` + +Note that this will just construct a MPS with random Gaussian entries based on the virtual +spaces of the supplied transfer operator. Of course, one might come up with a better initial +guess (leading to better convergence) depending on the application. To find the leading +boundary MPS fixed point, we call [`leading_boundary`](@ref) using the [VUMPS](@extref) +algorithm from MPSKit. Note that, by default, `leading_boundary` uses CTMRG where the +settings are supplied as keyword arguments, so in the present case we need to supply the +VUMPS algorithm struct explicitly: + +````julia +mps, env, ϵ = leading_boundary(mps₀, transfer, VUMPS(; tol=1e-6, verbosity=2)); +```` + +```` +[ Info: VUMPS init: obj = +1.674563752306e+00 +3.035692829590e+00im err = 7.5576e-01 +[ Info: VUMPS conv 120: obj = +6.831610878163e+00 -1.001928853191e-08im err = 9.5332406967e-07 time = 5.64 sec + +```` + +The norm of the state per unit cell is then given by the expectation value +$\langle \psi_\text{MPS} | \mathbb{T} | \psi_\text{MPS} \rangle$: + +````julia +norm_vumps = abs(prod(expectation_value(mps, transfer))) +```` + +```` +6.831610878163006 +```` + +This can be compared to the result obtained using CTMRG, where we see that the results match: + +````julia +env_ctmrg, = leading_boundary( + CTMRGEnv(peps₀, ComplexSpace(20)), peps₀; tol=1e-6, verbosity=2 +) +norm_ctmrg = abs(norm(peps₀, env_ctmrg)) +@show abs(norm_vumps - norm_ctmrg) / norm_vumps; +```` + +```` +[ Info: CTMRG init: obj = -1.495741317009e+01 +3.091851579630e-01im err = 1.0000e+00 +[ Info: CTMRG conv 30: obj = +6.831603585666e+00 err = 6.2262595140e-07 time = 0.23 sec +abs(norm_vumps - norm_ctmrg) / norm_vumps = 1.0674637855860049e-6 + +```` + +## Working with unit cells + +For PEPS with non-trivial unit cells, the principle is exactly the same. The only difference +is that now the transfer operator of the PEPS norm partition function has multiple lines, +each of which can be represented by an [`InfiniteTransferPEPS`](@ref) object. Such a +multi-line transfer operator is represented by a `MultilineTransferPEPS` object. In this +case, the boundary MPS is an [`MultilineMPS`](@extref) object, which should be initialized +by specifying a virtual space for each site in the partition function unit cell. + +First, we construct a PEPS with a $2 \times 2$ unit cell using the `unitcell` keyword +argument and then define the corresponding transfer PEPS: + +````julia +peps₀_2x2 = InfinitePEPS(ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2)) +transfer_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1); +```` + +Now, the procedure is the same as before: We compute the norm once using VUMPS, once using CTMRG and then compare. + +````julia +mps₀_2x2 = initializeMPS(transfer_2x2, fill(ComplexSpace(20), 2, 2)) +mps_2x2, = leading_boundary(mps₀_2x2, transfer_2x2, VUMPS(; tol=1e-6, verbosity=2)) +norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, transfer_2x2))) + +env_ctmrg_2x2, = leading_boundary( + CTMRGEnv(peps₀_2x2, ComplexSpace(20)), peps₀_2x2; tol=1e-6, verbosity=2 +) +norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2)) + +@show abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps +```` + +```` +0.001753056153861759 +```` + +Again, the results are compatible. Note that for larger unit cells and non-Hermitian PEPS +the VUMPS algorithm may become unstable, in which case the CTMRG algorithm is recommended. + +## Contracting PEPO overlaps + +Using exactly the same machinery, we can contract partition functions which encode the +expectation value of a PEPO for a given PEPS state. As an example, we can consider the +overlap of the PEPO correponding to the partition function of 3D classical Ising model with +our random PEPS from before and evaluate the overlap +$\langle \psi_\text{PEPS} | O_\text{PEPO} | \psi_\text{PEPS} \rangle$. + +The classical Ising PEPO is defined as follows: + +````julia +function ising_pepo(β; unitcell=(1, 1, 1)) + t = ComplexF64[exp(β) exp(-β); exp(-β) exp(β)] + q = sqrt(t) + + O = zeros(2, 2, 2, 2, 2, 2) + O[1, 1, 1, 1, 1, 1] = 1 + O[2, 2, 2, 2, 2, 2] = 1 + @tensor o[-1 -2; -3 -4 -5 -6] := + O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] + O = TensorMap(o, ℂ^2 ⊗ (ℂ^2)' ← ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)') + + return InfinitePEPO(O; unitcell) +end; +```` + +To evaluate the overlap, we instantiate the PEPO and the corresponding [`InfiniteTransferPEPO`](@ref) +in the right direction, on the right row of the partition function (trivial here): + +````julia +pepo = ising_pepo(1) +transfer_pepo = InfiniteTransferPEPO(peps₀, pepo, 1, 1) +```` + +```` +single site MPSKit.InfiniteMPO{Tuple{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 2, 4, Vector{ComplexF64}}}}: +╷ ⋮ +┼ O[1]: (TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')), TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')), TensorMap((ℂ^2 ⊗ (ℂ^2)') ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)'))) +╵ ⋮ + +```` + +As before, we converge the boundary MPS using VUMPS and then compute the expectation value: + +````julia +mps₀_pepo = initializeMPS(transfer_pepo, [ComplexSpace(20)]) +mps_pepo, = leading_boundary(mps₀_pepo, transfer_pepo, VUMPS(; tol=1e-6, verbosity=2)) +norm_pepo = abs(prod(expectation_value(mps_pepo, transfer_pepo))); +@show norm_pepo; +```` + +```` +[ Info: VUMPS init: obj = +2.488222368854e+01 +3.652981254368e-01im err = 9.0735e-01 +┌ Warning: VUMPS cancel 200: obj = +9.667589206130e+01 -1.135822593507e+00im err = 8.3337202584e-02 time = 30.62 sec +└ @ MPSKit ~/.julia/packages/MPSKit/EfZBD/src/algorithms/statmech/vumps.jl:51 +norm_pepo = 96.68256408894005 + +```` + +These objects and routines can be used to optimize PEPS fixed points of 3D partition +functions, see for example [Vanderstraeten et al.](@cite vanderstraeten_residual_2018) + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/docs/src/examples/2.boundary_mps/main.ipynb b/docs/src/examples/2.boundary_mps/main.ipynb new file mode 100644 index 000000000..84d22dbb0 --- /dev/null +++ b/docs/src/examples/2.boundary_mps/main.ipynb @@ -0,0 +1,324 @@ +{ + "cells": [ + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Markdown" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "# Boundary MPS contractions using VUMPS and PEPOs\n", + "\n", + "Instead of using CTMRG to contract an infinite PEPS, one can also use an boundary MPSs\n", + "ansatz to contract the infinite network. In particular, we will here use VUMPS to do so.\n", + "\n", + "Before we start, we'll fix the random seed for reproducability:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Random\n", + "Random.seed!(29384293742893);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Besides `TensorKit` and `PEPSKit`, we here also need [`MPSKit`](https://quantumkithub.github.io/MPSKit.jl/stable/)\n", + "which implements the VUMPS algorithm as well as the required MPS operations:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "using TensorKit, PEPSKit, MPSKit" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Computing a PEPS norm\n", + "\n", + "We start by initializing a random initial infinite PEPS:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "peps₀ = InfinitePEPS(ComplexSpace(2), ComplexSpace(2))" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "To compute its norm, we need to construct the transfer operator corresponding to\n", + "the partition function representing the overlap $\\langle \\psi_\\text{PEPS} | \\psi_\\text{PEPS} \\rangle$:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "transfer = InfiniteTransferPEPS(peps₀, 1, 1)" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "We then find its leading boundary MPS fixed point, where the corresponding eigenvalue\n", + "encodes the norm of the state. To that end, let us first we build an initial guess for the\n", + "boundary MPS, choosing a bond dimension of 20:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "mps₀ = initializeMPS(transfer, [ComplexSpace(20)])" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Note that this will just construct a MPS with random Gaussian entries based on the virtual\n", + "spaces of the supplied transfer operator. Of course, one might come up with a better initial\n", + "guess (leading to better convergence) depending on the application. To find the leading\n", + "boundary MPS fixed point, we call `leading_boundary` using the VUMPS\n", + "algorithm from MPSKit. Note that, by default, `leading_boundary` uses CTMRG where the\n", + "settings are supplied as keyword arguments, so in the present case we need to supply the\n", + "VUMPS algorithm struct explicitly:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "mps, env, ϵ = leading_boundary(mps₀, transfer, VUMPS(; tol=1e-6, verbosity=2));" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "The norm of the state per unit cell is then given by the expectation value\n", + "$\\langle \\psi_\\text{MPS} | \\mathbb{T} | \\psi_\\text{MPS} \\rangle$:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "norm_vumps = abs(prod(expectation_value(mps, transfer)))" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "This can be compared to the result obtained using CTMRG, where we see that the results match:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "env_ctmrg, = leading_boundary(\n", + " CTMRGEnv(peps₀, ComplexSpace(20)), peps₀; tol=1e-6, verbosity=2\n", + ")\n", + "norm_ctmrg = abs(norm(peps₀, env_ctmrg))\n", + "@show abs(norm_vumps - norm_ctmrg) / norm_vumps;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Working with unit cells\n", + "\n", + "For PEPS with non-trivial unit cells, the principle is exactly the same. The only difference\n", + "is that now the transfer operator of the PEPS norm partition function has multiple lines,\n", + "each of which can be represented by an `InfiniteTransferPEPS` object. Such a\n", + "multi-line transfer operator is represented by a `MultilineTransferPEPS` object. In this\n", + "case, the boundary MPS is an `MultilineMPS` object, which should be initialized\n", + "by specifying a virtual space for each site in the partition function unit cell.\n", + "\n", + "First, we construct a PEPS with a $2 \\times 2$ unit cell using the `unitcell` keyword\n", + "argument and then define the corresponding transfer PEPS:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "peps₀_2x2 = InfinitePEPS(ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2))\n", + "transfer_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Now, the procedure is the same as before: We compute the norm once using VUMPS, once using CTMRG and then compare." + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "mps₀_2x2 = initializeMPS(transfer_2x2, fill(ComplexSpace(20), 2, 2))\n", + "mps_2x2, = leading_boundary(mps₀_2x2, transfer_2x2, VUMPS(; tol=1e-6, verbosity=2))\n", + "norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, transfer_2x2)))\n", + "\n", + "env_ctmrg_2x2, = leading_boundary(\n", + " CTMRGEnv(peps₀_2x2, ComplexSpace(20)), peps₀_2x2; tol=1e-6, verbosity=2\n", + ")\n", + "norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2))\n", + "\n", + "@show abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Again, the results are compatible. Note that for larger unit cells and non-Hermitian PEPS\n", + "the VUMPS algorithm may become unstable, in which case the CTMRG algorithm is recommended.\n", + "\n", + "## Contracting PEPO overlaps\n", + "\n", + "Using exactly the same machinery, we can contract partition functions which encode the\n", + "expectation value of a PEPO for a given PEPS state. As an example, we can consider the\n", + "overlap of the PEPO correponding to the partition function of 3D classical Ising model with\n", + "our random PEPS from before and evaluate the overlap\n", + "$\\langle \\psi_\\text{PEPS} | O_\\text{PEPO} | \\psi_\\text{PEPS} \\rangle$.\n", + "\n", + "The classical Ising PEPO is defined as follows:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "function ising_pepo(β; unitcell=(1, 1, 1))\n", + " t = ComplexF64[exp(β) exp(-β); exp(-β) exp(β)]\n", + " q = sqrt(t)\n", + "\n", + " O = zeros(2, 2, 2, 2, 2, 2)\n", + " O[1, 1, 1, 1, 1, 1] = 1\n", + " O[2, 2, 2, 2, 2, 2] = 1\n", + " @tensor o[-1 -2; -3 -4 -5 -6] :=\n", + " O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6]\n", + " O = TensorMap(o, ℂ^2 ⊗ (ℂ^2)' ← ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')\n", + "\n", + " return InfinitePEPO(O; unitcell)\n", + "end;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "To evaluate the overlap, we instantiate the PEPO and the corresponding `InfiniteTransferPEPO`\n", + "in the right direction, on the right row of the partition function (trivial here):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "pepo = ising_pepo(1)\n", + "transfer_pepo = InfiniteTransferPEPO(peps₀, pepo, 1, 1)" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "As before, we converge the boundary MPS using VUMPS and then compute the expectation value:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "mps₀_pepo = initializeMPS(transfer_pepo, [ComplexSpace(20)])\n", + "mps_pepo, = leading_boundary(mps₀_pepo, transfer_pepo, VUMPS(; tol=1e-6, verbosity=2))\n", + "norm_pepo = abs(prod(expectation_value(mps_pepo, transfer_pepo)));\n", + "@show norm_pepo;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "These objects and routines can be used to optimize PEPS fixed points of 3D partition\n", + "functions, see for example [Vanderstraeten et al.](@cite vanderstraeten_residual_2018)" + ], + "metadata": {} + }, + { + "cell_type": "markdown", + "source": [ + "---\n", + "\n", + "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" + ], + "metadata": {} + } + ], + "nbformat_minor": 3, + "metadata": { + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.11.4" + }, + "kernelspec": { + "name": "julia-1.11", + "display_name": "Julia 1.11.4", + "language": "julia" + } + }, + "nbformat": 4 +} diff --git a/docs/src/examples/3.bose_hubbard/index.md b/docs/src/examples/3.bose_hubbard/index.md new file mode 100644 index 000000000..c69137477 --- /dev/null +++ b/docs/src/examples/3.bose_hubbard/index.md @@ -0,0 +1,810 @@ +```@meta +EditURL = "../../../../examples/3.bose_hubbard/main.jl" +``` + +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//3.bose_hubbard/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//3.bose_hubbard/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//3.bose_hubbard) + +````julia +using Markdown +```` + +# Optimizing the $U(1)$-symmetric Bose-Hubbard model + +This example demonstrates the simulation of the two-dimensional Bose-Hubbard model. In +particular, the point will be to showcase the use of internal symmetries and finite +particle densities in PEPS ground state searches. As we will see, incorporating symmetries +into the simulation consists of initializing a symmetric Hamiltonian, PEPS state and CTM +environment - made possible through TensorKit. + +But first let's seed the RNG and import the required modules: + +````julia +using Random +using TensorKit, PEPSKit +using MPSKit: add_physical_charge +Random.seed!(2928528935); +```` + +## Defining the model + +We will construct the Bose-Hubbard model Hamiltonian through the +[`bose_hubbard_model`](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.bose_hubbard_model), +function from MPSKitModels as reexported by PEPSKit. We'll simulate the model in its +Mott-insulating phase where the ratio $U/t$ is large, since in this phase we expect the +ground state to be well approximated by a PEPS with a manifest global $U(1)$ symmetry. +Furthermore, we'll impose a cutoff at 2 bosons per site, set the chemical potential to zero +and use a simple $1 \times 1$ unit cell: + +````julia +t = 1.0 +U = 30.0 +cutoff = 2 +mu = 0.0 +lattice = InfiniteSquare(1, 1); +```` + +Next, we impose an explicit global $U(1)$ symmetry as well as a fixed particle number +density in our simulations. We can do this by setting the `symmetry` argument of the +Hamiltonian constructor to `U1Irrep` and passing one as the particle number density +keyword argument `n`: + +````julia +symmetry = U1Irrep +n = 1 +H = bose_hubbard_model(ComplexF64, symmetry, lattice; cutoff, t, U, n); +```` + +Before we continue, it might be interesting to inspect the corresponding lattice physical +spaces (which is here just a $1 \times 1$ matrix due to the single-site unit cell): + +````julia +physical_spaces = H.lattice +```` + +```` +1×1 Matrix{TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}}: + Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1) +```` + +Note that the physical space contains $U(1)$ charges -1, 0 and +1. Indeed, imposing a +particle number density of +1 corresponds to shifting the physical charges by -1 to +'re-center' the physical charges around the desired density. When we do this with a cutoff +of two bosons per site, i.e. starting from $U(1)$ charges 0, 1 and 2 on the physical level, +we indeed get the observed charges. + +## Characterizing the virtual spaces + +When running PEPS simulations with explicit internal symmetries, specifying the structure of +the virtual spaces of the PEPS and its environment becomes a bit more involved. For the +environment, one could in principle allow the virtual space to be chosen dynamically during +the boundary contraction using CTMRG by using a truncation scheme that allows for this +(e.g. using `alg=:truncdim` or `alg=:truncbelow` to truncate to a fixed total bond dimension +or singular value cutoff respectively). For the PEPS virtual space however, the structure +has to be specified before the optimization. + +While there are a host of techniques to do this in an informed way (e.g. starting from a +simple update result), here we just specify the virtual space manually. Since we're dealing +with a model at unit filling our physical space only contains integer $U(1)$ irreps. +Therefore, we'll build our PEPS and environment spaces using integer $U(1)$ irreps centered +around the zero charge: + +````julia +V_peps = U1Space(0 => 2, 1 => 1, -1 => 1) +V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2); +```` + +## Finding the ground state + +Having defined our Hamiltonian and spaces, it is just a matter of plugging this into the +optimization framework in the usual way to find the ground state. So, we first specify all +algorithms and their tolerances: + +````julia +boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)) +gradient_alg = (; tol=1e-6, maxiter=10, alg=:eigsolver, iterscheme=:diffgauge) +optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=200, ls_maxiter=2, ls_maxfg=2); +```` + +!!! note + Taking CTMRG gradients and optimizing symmetric tensors tends to be more problematic + than with dense tensors. In particular, this means that one frequently needs to tweak + the `boundary_alg`, `gradient_alg` and `optimizer_alg` settings. There rarely is a + general-purpose set of settings which will always work, so instead one has to adjust + the simulation settings for each specific application. For example, it might help to + switch between the CTMRG flavors `alg=:simultaneous` and `alg=:sequential` to + improve convergence. The evaluation of the CTMRG gradient can be instable, so there it + is advised to try the different `iterscheme=:diffgauge` and `iterscheme=:fixed` schemes + as well as different `alg` keywords. Of course the tolerances of the algorithms and + their subalgorithms also have to be compatible. For more details on the available + options, see the [`fixedpoint`](@ref) docstring. + +Keep in mind that the PEPS is constructed from a unit cell of spaces, so we have to make a +matrix of `V_peps` spaces: + +````julia +virtual_spaces = fill(V_peps, size(lattice)...) +peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) +env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); +```` + +```` +[ Info: CTMRG init: obj = +1.693461429863e+00 +8.390974048721e-02im err = 1.0000e+00 +[ Info: CTMRG conv 19: obj = +1.181834754305e+01 -1.514027570125e-11im err = 3.6943032119e-09 time = 6.77 sec + +```` + +And at last, we optimize (which might take a bit): + +````julia +peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg) +@show E; +```` + +```` +[ Info: CTMRG init: obj = +6.242353178969e-02 err = 1.0000e+00 +[ Info: CTMRG conv 4: obj = +6.242353178968e-02 err = 5.3242429630e-11 time = 0.13 sec +[ Info: LBFGS: initializing with f = 9.360531870693, ‖∇f‖ = 1.6944e+01 +┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Float64}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 +[ Info: CTMRG init: obj = +6.240949771847e-02 err = 1.0000e+00 +[ Info: CTMRG conv 13: obj = +6.241448365552e-02 err = 9.9109245574e-09 time = 0.17 sec +[ Info: CTMRG init: obj = +6.237870901373e-02 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.250909523927e-02 err = 3.7008104828e-09 time = 0.16 sec +[ Info: CTMRG init: obj = +6.282962969748e-02 +4.542778772990e-13im err = 1.0000e+00 +[ Info: CTMRG conv 25: obj = +6.631935894614e-02 err = 6.4811816657e-09 time = 0.26 sec +[ Info: CTMRG init: obj = +7.333609757066e-02 +7.025628888643e-13im err = 1.0000e+00 +┌ Warning: CTMRG cancel 100: obj = +1.222846396868e-01 err = 9.4598744433e-06 time = 1.05 sec +└ @ PEPSKit ~/.julia/packages/PEPSKit/P7ER3/src/algorithms/ctmrg/ctmrg.jl:129 +[ Info: CTMRG init: obj = +6.248815924073e-02 err = 1.0000e+00 +[ Info: CTMRG conv 14: obj = +6.254210320788e-02 err = 5.8592754706e-09 time = 0.14 sec +[ Info: CTMRG init: obj = +6.245238566875e-02 err = 1.0000e+00 +[ Info: CTMRG conv 14: obj = +6.246617228050e-02 err = 3.9601332591e-09 time = 0.15 sec +[ Info: CTMRG init: obj = +7.503564551435e-02 err = 1.0000e+00 +┌ Warning: CTMRG cancel 100: obj = +9.980119603028e-02 err = 1.7005988492e-06 time = 1.06 sec +└ @ PEPSKit ~/.julia/packages/PEPSKit/P7ER3/src/algorithms/ctmrg/ctmrg.jl:129 +[ Info: LBFGS: iter 1, time 800.83 s: f = 0.124397324377, ‖∇f‖ = 6.2876e+00, α = 1.56e+02, m = 0, nfg = 7 +┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 +[ Info: CTMRG init: obj = +1.753936502020e-01 err = 1.0000e+00 +[ Info: CTMRG conv 55: obj = +1.733894725524e-01 err = 8.1365124077e-09 time = 0.62 sec +[ Info: CTMRG init: obj = +1.402751961848e-01 err = 1.0000e+00 +┌ Warning: CTMRG cancel 100: obj = +1.402868717464e-01 err = 1.1002578927e-05 time = 1.05 sec +└ @ PEPSKit ~/.julia/packages/PEPSKit/P7ER3/src/algorithms/ctmrg/ctmrg.jl:129 +[ Info: LBFGS: iter 2, time 819.10 s: f = 0.065740243544, ‖∇f‖ = 8.6301e+00, α = 5.34e-01, m = 1, nfg = 2 +[ Info: CTMRG init: obj = +1.864268466450e-01 err = 1.0000e+00 +[ Info: CTMRG conv 25: obj = +1.900559755493e-01 err = 4.6098787403e-09 time = 0.26 sec +[ Info: LBFGS: iter 3, time 820.69 s: f = -0.035484016742, ‖∇f‖ = 1.7043e+00, α = 1.00e+00, m = 2, nfg = 1 +[ Info: CTMRG init: obj = +1.843525493223e-01 err = 1.0000e+00 +[ Info: CTMRG conv 19: obj = +1.843555438547e-01 err = 6.0174972186e-09 time = 0.17 sec +[ Info: LBFGS: iter 4, time 822.01 s: f = -0.068142497162, ‖∇f‖ = 1.5153e+00, α = 1.00e+00, m = 3, nfg = 1 +[ Info: CTMRG init: obj = +1.205660214209e-01 err = 1.0000e+00 +[ Info: CTMRG conv 37: obj = +1.230027024040e-01 err = 8.1345079594e-09 time = 0.42 sec +[ Info: CTMRG init: obj = +1.777797347746e-01 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +1.777857216166e-01 err = 9.5736429674e-09 time = 0.19 sec +[ Info: CTMRG init: obj = +1.490804268869e-01 err = 1.0000e+00 +[ Info: CTMRG conv 26: obj = +1.494241241324e-01 err = 6.2342436828e-09 time = 0.28 sec +[ Info: LBFGS: iter 5, time 826.91 s: f = -0.161915006602, ‖∇f‖ = 1.4797e+00, α = 5.52e-01, m = 4, nfg = 3 +[ Info: CTMRG init: obj = +1.584441491329e-01 err = 1.0000e+00 +[ Info: CTMRG conv 19: obj = +1.585829116178e-01 err = 7.3150666982e-09 time = 0.20 sec +[ Info: LBFGS: iter 6, time 828.30 s: f = -0.192198031506, ‖∇f‖ = 9.0883e-01, α = 1.00e+00, m = 5, nfg = 1 +[ Info: CTMRG init: obj = +1.555986931082e-01 err = 1.0000e+00 +[ Info: CTMRG conv 21: obj = +1.559453587913e-01 err = 4.7549366621e-09 time = 0.21 sec +[ Info: LBFGS: iter 7, time 829.59 s: f = -0.205025430186, ‖∇f‖ = 1.4077e+00, α = 1.00e+00, m = 6, nfg = 1 +[ Info: CTMRG init: obj = +1.642012255794e-01 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +1.642477281365e-01 err = 8.4090087635e-09 time = 0.20 sec +[ Info: LBFGS: iter 8, time 830.89 s: f = -0.221962222995, ‖∇f‖ = 5.1030e-01, α = 1.00e+00, m = 7, nfg = 1 +[ Info: CTMRG init: obj = +1.699305880848e-01 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +1.699638761285e-01 err = 5.2636089744e-09 time = 0.17 sec +[ Info: LBFGS: iter 9, time 832.36 s: f = -0.228516635895, ‖∇f‖ = 4.0683e-01, α = 1.00e+00, m = 8, nfg = 1 +[ Info: CTMRG init: obj = +1.850735815256e-01 err = 1.0000e+00 +[ Info: CTMRG conv 14: obj = +1.851356199709e-01 err = 5.5067543930e-09 time = 0.14 sec +[ Info: LBFGS: iter 10, time 833.39 s: f = -0.238976021230, ‖∇f‖ = 2.5966e-01, α = 1.00e+00, m = 9, nfg = 1 +[ Info: CTMRG init: obj = +2.027068304089e-01 err = 1.0000e+00 +[ Info: CTMRG conv 13: obj = +2.027852287122e-01 err = 2.7944641112e-09 time = 0.14 sec +[ Info: LBFGS: iter 11, time 834.44 s: f = -0.245116064461, ‖∇f‖ = 3.7637e-01, α = 1.00e+00, m = 10, nfg = 1 +[ Info: CTMRG init: obj = +2.320245389893e-01 err = 1.0000e+00 +[ Info: CTMRG conv 10: obj = +2.321898571322e-01 err = 8.2007194775e-09 time = 0.11 sec +[ Info: LBFGS: iter 12, time 835.39 s: f = -0.252909139554, ‖∇f‖ = 3.4356e-01, α = 1.00e+00, m = 11, nfg = 1 +[ Info: CTMRG init: obj = +2.717013307419e-01 err = 1.0000e+00 +[ Info: CTMRG conv 9: obj = +2.720038319914e-01 err = 3.1708110696e-09 time = 0.09 sec +[ Info: LBFGS: iter 13, time 836.50 s: f = -0.260342387029, ‖∇f‖ = 2.9482e-01, α = 1.00e+00, m = 12, nfg = 1 +[ Info: CTMRG init: obj = +3.142116244338e-01 err = 1.0000e+00 +[ Info: CTMRG conv 8: obj = +3.146350793253e-01 err = 5.8852994747e-09 time = 0.07 sec +[ Info: LBFGS: iter 14, time 837.38 s: f = -0.265537731651, ‖∇f‖ = 2.5638e-01, α = 1.00e+00, m = 13, nfg = 1 +[ Info: CTMRG init: obj = +3.372181485668e-01 err = 1.0000e+00 +[ Info: CTMRG conv 8: obj = +3.374449695056e-01 err = 3.9399420036e-09 time = 0.07 sec +[ Info: LBFGS: iter 15, time 838.21 s: f = -0.268085955662, ‖∇f‖ = 1.4302e-01, α = 1.00e+00, m = 14, nfg = 1 +[ Info: CTMRG init: obj = +3.511358819550e-01 err = 1.0000e+00 +[ Info: CTMRG conv 8: obj = +3.512358490282e-01 err = 2.8080096982e-09 time = 0.08 sec +[ Info: LBFGS: iter 16, time 839.01 s: f = -0.269213801539, ‖∇f‖ = 9.4430e-02, α = 1.00e+00, m = 15, nfg = 1 +[ Info: CTMRG init: obj = +3.607127041006e-01 err = 1.0000e+00 +[ Info: CTMRG conv 8: obj = +3.607676677594e-01 err = 1.9984047107e-09 time = 0.08 sec +[ Info: LBFGS: iter 17, time 839.95 s: f = -0.270165070558, ‖∇f‖ = 7.6548e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +3.669365823186e-01 err = 1.0000e+00 +[ Info: CTMRG conv 8: obj = +3.669833353692e-01 err = 2.9609976008e-09 time = 0.07 sec +[ Info: LBFGS: iter 18, time 840.67 s: f = -0.270700725371, ‖∇f‖ = 8.1691e-02, α = 1.00e+00, m = 17, nfg = 1 +[ Info: CTMRG init: obj = +3.662821626355e-01 err = 1.0000e+00 +[ Info: CTMRG conv 8: obj = +3.662785214245e-01 err = 9.5463302733e-10 time = 0.08 sec +[ Info: LBFGS: iter 19, time 841.33 s: f = -0.271027470591, ‖∇f‖ = 4.3095e-02, α = 1.00e+00, m = 18, nfg = 1 +[ Info: CTMRG init: obj = +3.652544451924e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +3.652538502298e-01 err = 7.8623197014e-09 time = 0.08 sec +[ Info: LBFGS: iter 20, time 842.03 s: f = -0.271239343525, ‖∇f‖ = 4.0156e-02, α = 1.00e+00, m = 19, nfg = 1 +[ Info: CTMRG init: obj = +3.675947033282e-01 err = 1.0000e+00 +[ Info: CTMRG conv 8: obj = +3.675962363363e-01 err = 1.5798610291e-09 time = 0.09 sec +[ Info: LBFGS: iter 21, time 843.04 s: f = -0.271530179046, ‖∇f‖ = 5.9545e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +3.737427181841e-01 err = 1.0000e+00 +[ Info: CTMRG conv 8: obj = +3.737631616818e-01 err = 3.3856069217e-09 time = 0.06 sec +[ Info: LBFGS: iter 22, time 843.75 s: f = -0.271855643129, ‖∇f‖ = 5.4653e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +3.793177955257e-01 err = 1.0000e+00 +[ Info: CTMRG conv 8: obj = +3.793309874498e-01 err = 2.3841155460e-09 time = 0.10 sec +[ Info: LBFGS: iter 23, time 844.46 s: f = -0.272062163616, ‖∇f‖ = 3.1192e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +3.855276802897e-01 err = 1.0000e+00 +[ Info: CTMRG conv 8: obj = +3.855464418552e-01 err = 2.7835477038e-09 time = 0.09 sec +[ Info: LBFGS: iter 24, time 845.20 s: f = -0.272177598947, ‖∇f‖ = 3.2733e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +3.884945750065e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +3.884960623902e-01 err = 8.6715117074e-09 time = 0.08 sec +[ Info: LBFGS: iter 25, time 846.20 s: f = -0.272296901359, ‖∇f‖ = 3.2681e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +3.930849227646e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +3.930864681387e-01 err = 7.2244702258e-09 time = 0.05 sec +[ Info: LBFGS: iter 26, time 846.87 s: f = -0.272496091725, ‖∇f‖ = 3.3863e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +3.973131595676e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +3.973144781440e-01 err = 8.3712881010e-09 time = 0.08 sec +[ Info: LBFGS: iter 27, time 847.57 s: f = -0.272637326787, ‖∇f‖ = 2.0637e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +3.986958901805e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +3.986969801782e-01 err = 6.6737409627e-09 time = 0.09 sec +[ Info: LBFGS: iter 28, time 848.29 s: f = -0.272670103336, ‖∇f‖ = 2.1720e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +3.996067064404e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +3.996067526264e-01 err = 1.5899308014e-09 time = 0.07 sec +[ Info: LBFGS: iter 29, time 849.27 s: f = -0.272699141285, ‖∇f‖ = 1.5696e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.018837916115e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.018834369289e-01 err = 3.4335860175e-09 time = 0.05 sec +[ Info: LBFGS: iter 30, time 849.94 s: f = -0.272746811570, ‖∇f‖ = 2.3734e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.071011385726e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.070990570134e-01 err = 6.5552329812e-09 time = 0.05 sec +[ Info: LBFGS: iter 31, time 850.59 s: f = -0.272818112786, ‖∇f‖ = 3.1753e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.145240753004e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.145178808901e-01 err = 6.8052663533e-09 time = 0.08 sec +[ Info: LBFGS: iter 32, time 851.32 s: f = -0.272906643893, ‖∇f‖ = 2.5985e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.242551245171e-01 err = 1.0000e+00 +[ Info: CTMRG conv 8: obj = +4.242386562514e-01 err = 9.8539759844e-10 time = 0.08 sec +[ Info: LBFGS: iter 33, time 852.05 s: f = -0.272952554121, ‖∇f‖ = 4.4589e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.260999681855e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.260997173475e-01 err = 2.1123831393e-09 time = 0.38 sec +[ Info: LBFGS: iter 34, time 853.10 s: f = -0.273005267007, ‖∇f‖ = 9.9076e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.263395922801e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.263395940764e-01 err = 1.4406662993e-09 time = 0.09 sec +[ Info: LBFGS: iter 35, time 853.77 s: f = -0.273013070971, ‖∇f‖ = 8.2167e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.267340571890e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.267340095510e-01 err = 1.8605278064e-09 time = 0.07 sec +[ Info: LBFGS: iter 36, time 854.49 s: f = -0.273020751438, ‖∇f‖ = 9.8987e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.270278252693e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.270279916970e-01 err = 3.1989087010e-09 time = 0.07 sec +[ Info: LBFGS: iter 37, time 855.21 s: f = -0.273028647747, ‖∇f‖ = 1.5048e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.275457230483e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.275457274368e-01 err = 1.9224715076e-09 time = 0.07 sec +[ Info: LBFGS: iter 38, time 856.18 s: f = -0.273039550238, ‖∇f‖ = 7.4328e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.283093133458e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.283093311740e-01 err = 1.7195411799e-09 time = 0.06 sec +[ Info: LBFGS: iter 39, time 856.88 s: f = -0.273049748943, ‖∇f‖ = 8.1203e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.293602909349e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.293603320901e-01 err = 1.3448015618e-09 time = 0.08 sec +[ Info: LBFGS: iter 40, time 857.57 s: f = -0.273057542987, ‖∇f‖ = 1.0556e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.315340639040e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.315343813704e-01 err = 2.7317716643e-09 time = 0.08 sec +[ Info: LBFGS: iter 41, time 858.34 s: f = -0.273070228574, ‖∇f‖ = 1.2840e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.356033735656e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.356056142543e-01 err = 6.4345317970e-09 time = 0.07 sec +[ Info: LBFGS: iter 42, time 859.34 s: f = -0.273082077719, ‖∇f‖ = 1.1193e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.361087228120e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.361086699054e-01 err = 1.1521036128e-09 time = 0.06 sec +[ Info: LBFGS: iter 43, time 860.05 s: f = -0.273092996552, ‖∇f‖ = 8.1332e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.369765582804e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.369766520549e-01 err = 2.6684951030e-09 time = 0.08 sec +[ Info: LBFGS: iter 44, time 860.78 s: f = -0.273103912308, ‖∇f‖ = 1.2611e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.387686835133e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.387695437311e-01 err = 4.9139230079e-09 time = 0.08 sec +[ Info: LBFGS: iter 45, time 861.52 s: f = -0.273116383103, ‖∇f‖ = 1.4901e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.426689967922e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.426741768214e-01 err = 9.6216823102e-09 time = 0.09 sec +[ Info: LBFGS: iter 46, time 862.31 s: f = -0.273124864427, ‖∇f‖ = 2.0568e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.435228513815e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.435230477001e-01 err = 1.3938375485e-09 time = 0.32 sec +[ Info: LBFGS: iter 47, time 863.27 s: f = -0.273139111302, ‖∇f‖ = 7.0923e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.442359332390e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.442360624121e-01 err = 8.2102807253e-09 time = 0.05 sec +[ Info: LBFGS: iter 48, time 863.93 s: f = -0.273143969600, ‖∇f‖ = 4.7032e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.450671762927e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.450673528731e-01 err = 9.4782302337e-09 time = 0.06 sec +[ Info: LBFGS: iter 49, time 864.68 s: f = -0.273146563392, ‖∇f‖ = 4.8587e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.461659228579e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.461662107224e-01 err = 1.4651344945e-09 time = 0.08 sec +[ Info: LBFGS: iter 50, time 865.66 s: f = -0.273149681682, ‖∇f‖ = 4.4858e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.478197469584e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.478201251117e-01 err = 1.4263848945e-09 time = 0.06 sec +[ Info: LBFGS: iter 51, time 866.36 s: f = -0.273153535758, ‖∇f‖ = 6.1631e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.499444375418e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.499449995341e-01 err = 1.7222819789e-09 time = 0.08 sec +[ Info: LBFGS: iter 52, time 867.07 s: f = -0.273156987689, ‖∇f‖ = 4.5642e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.504547041087e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.504547220327e-01 err = 7.7826823112e-09 time = 0.07 sec +[ Info: LBFGS: iter 53, time 867.79 s: f = -0.273159364143, ‖∇f‖ = 3.9352e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.511021911515e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.511022771394e-01 err = 7.4953726522e-10 time = 0.09 sec +[ Info: LBFGS: iter 54, time 868.57 s: f = -0.273162378681, ‖∇f‖ = 5.2448e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.520921936956e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.520921967728e-01 err = 5.3039284811e-10 time = 0.31 sec +[ Info: LBFGS: iter 55, time 869.53 s: f = -0.273164685489, ‖∇f‖ = 7.9447e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.530357875303e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.530358010870e-01 err = 8.7429488510e-09 time = 0.05 sec +[ Info: LBFGS: iter 56, time 870.18 s: f = -0.273167770852, ‖∇f‖ = 4.5867e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.545882887291e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.545884315469e-01 err = 1.6054261815e-09 time = 0.09 sec +[ Info: LBFGS: iter 57, time 870.92 s: f = -0.273171004811, ‖∇f‖ = 4.0036e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.556787931045e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.556789973237e-01 err = 1.4934621828e-09 time = 0.09 sec +[ Info: LBFGS: iter 58, time 871.92 s: f = -0.273172734685, ‖∇f‖ = 5.1587e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.572978492667e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.572983075304e-01 err = 2.1649745710e-09 time = 0.06 sec +[ Info: LBFGS: iter 59, time 872.61 s: f = -0.273175277923, ‖∇f‖ = 5.2136e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.592789057454e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.592795996463e-01 err = 2.4538482534e-09 time = 0.08 sec +[ Info: LBFGS: iter 60, time 873.36 s: f = -0.273178436887, ‖∇f‖ = 4.5043e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.610203529605e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.610209113341e-01 err = 1.9923210396e-09 time = 0.07 sec +[ Info: LBFGS: iter 61, time 874.08 s: f = -0.273181599401, ‖∇f‖ = 4.1926e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.616536977817e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.616537604132e-01 err = 6.4830178495e-09 time = 0.07 sec +[ Info: LBFGS: iter 62, time 875.13 s: f = -0.273184127264, ‖∇f‖ = 3.5435e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.615991308044e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.615992366511e-01 err = 5.0404638781e-10 time = 0.06 sec +[ Info: LBFGS: iter 63, time 875.81 s: f = -0.273186580584, ‖∇f‖ = 3.2519e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.622036014559e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.622036743292e-01 err = 8.0180819642e-10 time = 0.06 sec +[ Info: LBFGS: iter 64, time 876.50 s: f = -0.273189436738, ‖∇f‖ = 6.9448e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.625455998697e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.625456196865e-01 err = 8.9687844711e-09 time = 0.07 sec +[ Info: LBFGS: iter 65, time 877.22 s: f = -0.273192692504, ‖∇f‖ = 4.6825e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.645067676136e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.645069109392e-01 err = 1.9375918118e-09 time = 0.09 sec +[ Info: LBFGS: iter 66, time 877.96 s: f = -0.273196715211, ‖∇f‖ = 4.7511e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.657748055462e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.657748482350e-01 err = 1.2394947561e-09 time = 0.37 sec +[ Info: LBFGS: iter 67, time 878.91 s: f = -0.273198196827, ‖∇f‖ = 5.4294e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.665064064468e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.665065369184e-01 err = 6.4068919881e-09 time = 0.07 sec +[ Info: LBFGS: iter 68, time 879.57 s: f = -0.273199435966, ‖∇f‖ = 2.8645e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.674195111640e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.674196890444e-01 err = 7.6716513054e-09 time = 0.06 sec +[ Info: LBFGS: iter 69, time 880.24 s: f = -0.273200799932, ‖∇f‖ = 2.4252e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.683160818296e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.683162051195e-01 err = 7.4930079200e-09 time = 0.08 sec +[ Info: LBFGS: iter 70, time 880.94 s: f = -0.273202184331, ‖∇f‖ = 3.0503e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.690638581817e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.690637699300e-01 err = 9.6440009281e-10 time = 0.07 sec +[ Info: LBFGS: iter 71, time 881.90 s: f = -0.273203318657, ‖∇f‖ = 7.2710e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.694434155331e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.694433572079e-01 err = 6.3638742883e-09 time = 0.05 sec +[ Info: LBFGS: iter 72, time 882.59 s: f = -0.273204976120, ‖∇f‖ = 2.8153e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.690025332347e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.690026028015e-01 err = 4.5405781107e-09 time = 0.07 sec +[ Info: LBFGS: iter 73, time 883.29 s: f = -0.273205613161, ‖∇f‖ = 2.0563e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.683640409461e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.683642070895e-01 err = 7.5729673107e-09 time = 0.06 sec +[ Info: LBFGS: iter 74, time 883.98 s: f = -0.273206541752, ‖∇f‖ = 2.6401e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.680812736007e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.680812878329e-01 err = 5.8296871295e-09 time = 0.06 sec +[ Info: LBFGS: iter 75, time 884.93 s: f = -0.273207825994, ‖∇f‖ = 3.3947e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.683658632583e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.683654640805e-01 err = 9.6410675213e-10 time = 0.06 sec +[ Info: LBFGS: iter 76, time 885.62 s: f = -0.273210784096, ‖∇f‖ = 5.5166e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.695632207222e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.695628536799e-01 err = 1.4863989272e-09 time = 0.07 sec +[ Info: LBFGS: iter 77, time 886.29 s: f = -0.273212703606, ‖∇f‖ = 5.9417e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.704381714894e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.704383900529e-01 err = 8.0609213295e-09 time = 0.06 sec +[ Info: LBFGS: iter 78, time 886.98 s: f = -0.273214840394, ‖∇f‖ = 2.5444e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.716629768178e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.716633806818e-01 err = 9.3022446537e-09 time = 0.06 sec +[ Info: LBFGS: iter 79, time 887.93 s: f = -0.273216186725, ‖∇f‖ = 2.5210e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.726362728301e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.726365646547e-01 err = 7.0379215850e-09 time = 0.05 sec +[ Info: LBFGS: iter 80, time 888.61 s: f = -0.273217132240, ‖∇f‖ = 2.9834e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.746270632342e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.746275390474e-01 err = 1.2462578943e-09 time = 0.07 sec +[ Info: LBFGS: iter 81, time 889.28 s: f = -0.273217860371, ‖∇f‖ = 8.6736e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.742606682887e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.742606864218e-01 err = 3.5846387007e-09 time = 0.06 sec +[ Info: LBFGS: iter 82, time 889.96 s: f = -0.273219978798, ‖∇f‖ = 2.8197e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.739168218451e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.739168525084e-01 err = 6.3378884097e-09 time = 0.06 sec +[ Info: LBFGS: iter 83, time 890.68 s: f = -0.273220887198, ‖∇f‖ = 1.4861e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.736949927381e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.736950134585e-01 err = 5.3980945320e-09 time = 0.05 sec +[ Info: LBFGS: iter 84, time 891.56 s: f = -0.273221346093, ‖∇f‖ = 1.9427e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.737094141910e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.737094093508e-01 err = 4.1427533982e-09 time = 0.05 sec +[ Info: LBFGS: iter 85, time 892.28 s: f = -0.273221865528, ‖∇f‖ = 1.7524e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.739498377882e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.739497241759e-01 err = 8.3094272741e-09 time = 0.06 sec +[ Info: LBFGS: iter 86, time 892.99 s: f = -0.273222181741, ‖∇f‖ = 5.3066e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.742275640120e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.742275861455e-01 err = 2.1070029154e-09 time = 0.07 sec +[ Info: LBFGS: iter 87, time 893.98 s: f = -0.273223246562, ‖∇f‖ = 1.9685e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.745615531112e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.745615970216e-01 err = 2.5255250793e-09 time = 0.05 sec +[ Info: LBFGS: iter 88, time 894.67 s: f = -0.273223705610, ‖∇f‖ = 2.3045e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.753529638533e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.753531654518e-01 err = 5.7678184307e-09 time = 0.07 sec +[ Info: LBFGS: iter 89, time 895.38 s: f = -0.273224556828, ‖∇f‖ = 2.5083e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.765772035582e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.765776837597e-01 err = 1.0124171631e-09 time = 0.08 sec +[ Info: LBFGS: iter 90, time 896.12 s: f = -0.273225646272, ‖∇f‖ = 4.2989e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.777304198473e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.777307237114e-01 err = 1.0180024105e-09 time = 0.08 sec +[ Info: LBFGS: iter 91, time 897.15 s: f = -0.273227256373, ‖∇f‖ = 2.7322e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.783240501999e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.783240673497e-01 err = 7.1416725880e-10 time = 0.06 sec +[ Info: LBFGS: iter 92, time 897.82 s: f = -0.273229828316, ‖∇f‖ = 2.2841e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.791322881259e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.791323312929e-01 err = 1.0389736817e-09 time = 0.09 sec +[ Info: LBFGS: iter 93, time 898.53 s: f = -0.273231704181, ‖∇f‖ = 2.4489e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.786596533113e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.786601089445e-01 err = 5.9830244732e-10 time = 0.09 sec +[ Info: CTMRG init: obj = +4.789662294135e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.789662889092e-01 err = 6.4853481779e-09 time = 0.07 sec +[ Info: LBFGS: iter 94, time 900.03 s: f = -0.273232179586, ‖∇f‖ = 2.5292e-03, α = 3.61e-01, m = 20, nfg = 2 +[ Info: CTMRG init: obj = +4.788074933549e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.788075351219e-01 err = 2.2631300753e-09 time = 0.07 sec +[ Info: LBFGS: iter 95, time 901.02 s: f = -0.273232651417, ‖∇f‖ = 1.6879e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.786080247497e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.786081498864e-01 err = 3.2395930512e-09 time = 0.05 sec +[ Info: LBFGS: iter 96, time 901.75 s: f = -0.273233247066, ‖∇f‖ = 1.8610e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.786842676431e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.786842578665e-01 err = 1.1277031841e-09 time = 0.06 sec +[ Info: LBFGS: iter 97, time 902.47 s: f = -0.273233724645, ‖∇f‖ = 2.3320e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.792106070878e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.792104764342e-01 err = 4.9994793879e-09 time = 0.06 sec +[ Info: LBFGS: iter 98, time 903.15 s: f = -0.273234496326, ‖∇f‖ = 2.1070e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.792807644559e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.792804289320e-01 err = 5.7368410925e-10 time = 0.07 sec +[ Info: LBFGS: iter 99, time 903.85 s: f = -0.273234942243, ‖∇f‖ = 4.3229e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.797988803658e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.797989152104e-01 err = 4.5762436281e-09 time = 0.07 sec +[ Info: LBFGS: iter 100, time 904.79 s: f = -0.273235872899, ‖∇f‖ = 1.0227e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.797019933537e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.797019858679e-01 err = 9.2179000290e-10 time = 0.10 sec +[ Info: LBFGS: iter 101, time 905.50 s: f = -0.273236083478, ‖∇f‖ = 8.8617e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.793891521133e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.793891740523e-01 err = 5.6337023713e-09 time = 0.06 sec +[ Info: LBFGS: iter 102, time 906.21 s: f = -0.273236502150, ‖∇f‖ = 1.2113e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.789744279460e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.789745607107e-01 err = 3.7058752456e-10 time = 0.09 sec +[ Info: CTMRG init: obj = +4.791677254254e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.791677641063e-01 err = 7.3689893544e-09 time = 0.07 sec +[ Info: LBFGS: iter 103, time 907.70 s: f = -0.273236852006, ‖∇f‖ = 2.2250e-03, α = 5.40e-01, m = 20, nfg = 2 +[ Info: CTMRG init: obj = +4.789276815767e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.789277231124e-01 err = 7.5306084214e-09 time = 0.07 sec +[ Info: LBFGS: iter 104, time 908.67 s: f = -0.273237309095, ‖∇f‖ = 1.5651e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.788843602719e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.788843637881e-01 err = 2.6405239504e-10 time = 0.11 sec +[ Info: LBFGS: iter 105, time 909.39 s: f = -0.273237826712, ‖∇f‖ = 1.7300e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.789798585945e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.789798340955e-01 err = 4.5254772597e-09 time = 0.08 sec +[ Info: LBFGS: iter 106, time 910.12 s: f = -0.273238151589, ‖∇f‖ = 1.4739e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.792964889500e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.792965031016e-01 err = 3.0861610133e-09 time = 0.07 sec +[ Info: LBFGS: iter 107, time 910.85 s: f = -0.273238452194, ‖∇f‖ = 1.3132e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.797585448501e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.797583969194e-01 err = 5.5138899038e-10 time = 0.09 sec +[ Info: LBFGS: iter 108, time 911.83 s: f = -0.273239083045, ‖∇f‖ = 3.6339e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.801830137612e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.801830200283e-01 err = 4.9330311249e-09 time = 0.05 sec +[ Info: LBFGS: iter 109, time 912.50 s: f = -0.273239925488, ‖∇f‖ = 1.6856e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.802634867190e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.802634639939e-01 err = 5.1863757945e-09 time = 0.08 sec +[ Info: LBFGS: iter 110, time 913.22 s: f = -0.273240465522, ‖∇f‖ = 1.3613e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.802760262834e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.802760076695e-01 err = 4.9382603595e-09 time = 0.07 sec +[ Info: LBFGS: iter 111, time 913.97 s: f = -0.273240934835, ‖∇f‖ = 2.3524e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.802939956932e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.802939410658e-01 err = 8.9304889036e-09 time = 0.06 sec +[ Info: LBFGS: iter 112, time 914.64 s: f = -0.273241253954, ‖∇f‖ = 2.3895e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.802973441785e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.802973435724e-01 err = 2.4216364455e-09 time = 0.07 sec +[ Info: LBFGS: iter 113, time 915.58 s: f = -0.273241593627, ‖∇f‖ = 1.3301e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.804014797027e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.804014788612e-01 err = 1.8737547985e-09 time = 0.09 sec +[ Info: LBFGS: iter 114, time 916.26 s: f = -0.273242108811, ‖∇f‖ = 1.2847e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.805466102721e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.805466013995e-01 err = 2.4328755928e-09 time = 0.06 sec +[ Info: LBFGS: iter 115, time 916.92 s: f = -0.273242449543, ‖∇f‖ = 1.3579e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.803090646228e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.803090968139e-01 err = 5.2955340458e-10 time = 0.08 sec +[ Info: CTMRG init: obj = +4.804639686484e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.804639727315e-01 err = 5.4757355659e-09 time = 0.06 sec +[ Info: LBFGS: iter 116, time 918.28 s: f = -0.273242675076, ‖∇f‖ = 2.3470e-03, α = 3.57e-01, m = 20, nfg = 2 +[ Info: CTMRG init: obj = +4.805754019387e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.805753859421e-01 err = 7.4466348840e-09 time = 0.07 sec +[ Info: LBFGS: iter 117, time 919.21 s: f = -0.273243104527, ‖∇f‖ = 1.2979e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.805735505394e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.805735313982e-01 err = 4.2148915555e-10 time = 0.11 sec +[ Info: LBFGS: iter 118, time 919.93 s: f = -0.273243436953, ‖∇f‖ = 1.2233e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.804710505169e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.804710342447e-01 err = 6.4482932714e-10 time = 0.08 sec +[ Info: LBFGS: iter 119, time 920.72 s: f = -0.273243761256, ‖∇f‖ = 1.6044e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.805019941032e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.805019970087e-01 err = 5.7035908358e-09 time = 0.06 sec +[ Info: LBFGS: iter 120, time 921.44 s: f = -0.273244062582, ‖∇f‖ = 1.7999e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.805364210841e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.805364298716e-01 err = 5.4422519760e-09 time = 0.07 sec +[ Info: LBFGS: iter 121, time 922.37 s: f = -0.273244428575, ‖∇f‖ = 1.3779e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.807559862614e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.807560378139e-01 err = 3.7379046929e-09 time = 0.05 sec +[ Info: LBFGS: iter 122, time 923.04 s: f = -0.273244941087, ‖∇f‖ = 1.6881e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.810722414880e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.810722899338e-01 err = 7.1509377999e-09 time = 0.06 sec +[ Info: LBFGS: iter 123, time 923.70 s: f = -0.273245490453, ‖∇f‖ = 1.8823e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.814299105464e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.814299327851e-01 err = 7.1850148357e-09 time = 0.06 sec +[ Info: LBFGS: iter 124, time 924.47 s: f = -0.273246014128, ‖∇f‖ = 1.3348e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.816345761873e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.816345765078e-01 err = 5.1886510131e-09 time = 0.08 sec +[ Info: LBFGS: iter 125, time 925.47 s: f = -0.273246415220, ‖∇f‖ = 1.6797e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.817457892273e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.817457676277e-01 err = 7.9942843277e-09 time = 0.05 sec +[ Info: LBFGS: iter 126, time 926.18 s: f = -0.273246886558, ‖∇f‖ = 1.9101e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.816486297860e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.816486220771e-01 err = 5.8526396306e-10 time = 0.07 sec +[ Info: LBFGS: iter 127, time 926.91 s: f = -0.273247578331, ‖∇f‖ = 2.6783e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.813734078208e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.813733741400e-01 err = 2.1140612736e-09 time = 0.08 sec +[ Info: LBFGS: iter 128, time 927.65 s: f = -0.273248596780, ‖∇f‖ = 4.2726e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.809326459337e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.809326329788e-01 err = 3.3469639206e-09 time = 0.07 sec +[ Info: LBFGS: iter 129, time 928.44 s: f = -0.273249248580, ‖∇f‖ = 3.4266e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.809941074596e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.809940893817e-01 err = 9.1754566530e-09 time = 0.29 sec +[ Info: LBFGS: iter 130, time 929.37 s: f = -0.273249798264, ‖∇f‖ = 1.3846e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.810122860248e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.810123085036e-01 err = 7.9488237170e-10 time = 0.09 sec +[ Info: LBFGS: iter 131, time 930.09 s: f = -0.273250091726, ‖∇f‖ = 1.3050e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.810105154042e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.810105224177e-01 err = 7.4451601923e-10 time = 0.09 sec +[ Info: LBFGS: iter 132, time 930.86 s: f = -0.273250298144, ‖∇f‖ = 1.7451e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.809813774018e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.809814217119e-01 err = 1.7143550686e-09 time = 0.09 sec +[ Info: LBFGS: iter 133, time 931.61 s: f = -0.273250674484, ‖∇f‖ = 1.8764e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.809589590340e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.809590192078e-01 err = 1.8391504148e-09 time = 0.08 sec +[ Info: LBFGS: iter 134, time 932.61 s: f = -0.273250849981, ‖∇f‖ = 2.5432e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.808955403058e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.808955449714e-01 err = 2.2951085914e-09 time = 0.05 sec +[ Info: LBFGS: iter 135, time 933.31 s: f = -0.273251094386, ‖∇f‖ = 1.0169e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.808431471175e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.808431483697e-01 err = 6.0541470008e-09 time = 0.07 sec +[ Info: LBFGS: iter 136, time 934.01 s: f = -0.273251250424, ‖∇f‖ = 1.1018e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.807421686570e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.807421786855e-01 err = 3.8423948125e-10 time = 0.08 sec +[ Info: LBFGS: iter 137, time 934.75 s: f = -0.273251472616, ‖∇f‖ = 1.7175e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.805501691108e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.805501937811e-01 err = 1.2032452024e-09 time = 0.09 sec +[ Info: LBFGS: iter 138, time 935.51 s: f = -0.273251802341, ‖∇f‖ = 1.9190e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.804289072221e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.804289531354e-01 err = 1.2177451389e-09 time = 0.08 sec +[ Info: CTMRG init: obj = +4.805208730891e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.805208760207e-01 err = 3.1793481864e-10 time = 0.11 sec +[ Info: LBFGS: iter 139, time 937.24 s: f = -0.273251940669, ‖∇f‖ = 2.5923e-03, α = 2.54e-01, m = 20, nfg = 2 +[ Info: CTMRG init: obj = +4.803946272888e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.803946461498e-01 err = 1.2157672579e-09 time = 0.07 sec +[ Info: LBFGS: iter 140, time 937.97 s: f = -0.273252255136, ‖∇f‖ = 1.6162e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.803241381625e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.803241574618e-01 err = 1.1802934031e-09 time = 0.09 sec +[ Info: LBFGS: iter 141, time 938.74 s: f = -0.273252593676, ‖∇f‖ = 9.5803e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.803546161524e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.803546361914e-01 err = 8.7972431541e-10 time = 0.08 sec +[ Info: LBFGS: iter 142, time 939.48 s: f = -0.273252841099, ‖∇f‖ = 1.5506e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.804182585835e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.804182806506e-01 err = 8.3811595962e-10 time = 0.08 sec +[ Info: LBFGS: iter 143, time 940.47 s: f = -0.273253128531, ‖∇f‖ = 2.2830e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.805261995241e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.805262097495e-01 err = 4.7700114831e-09 time = 0.10 sec +[ Info: LBFGS: iter 144, time 941.19 s: f = -0.273253470875, ‖∇f‖ = 1.3732e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.805616712670e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.805616822842e-01 err = 1.2044520669e-09 time = 0.07 sec +[ Info: LBFGS: iter 145, time 941.97 s: f = -0.273253787952, ‖∇f‖ = 1.4764e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.806272354494e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.806272279261e-01 err = 1.9225106931e-09 time = 0.06 sec +[ Info: LBFGS: iter 146, time 942.69 s: f = -0.273254080621, ‖∇f‖ = 1.9509e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.805717973510e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.805717949586e-01 err = 4.3409144020e-10 time = 0.08 sec +[ Info: LBFGS: iter 147, time 943.42 s: f = -0.273254306475, ‖∇f‖ = 1.9010e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.801673305193e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.801673335911e-01 err = 3.7575359203e-09 time = 0.36 sec +[ Info: LBFGS: iter 148, time 944.41 s: f = -0.273255277035, ‖∇f‖ = 2.1723e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.800445144046e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.800445745424e-01 err = 3.0499085824e-09 time = 0.08 sec +[ Info: LBFGS: iter 149, time 945.12 s: f = -0.273255976775, ‖∇f‖ = 2.3105e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.800359660106e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.800360016141e-01 err = 1.1855876964e-09 time = 0.08 sec +[ Info: LBFGS: iter 150, time 945.86 s: f = -0.273256484758, ‖∇f‖ = 1.2498e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.800064707408e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.800066140113e-01 err = 2.0245498571e-09 time = 0.08 sec +[ Info: LBFGS: iter 151, time 946.63 s: f = -0.273256936415, ‖∇f‖ = 1.2435e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.799563181331e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.799563788753e-01 err = 1.1719463343e-09 time = 0.07 sec +[ Info: LBFGS: iter 152, time 947.63 s: f = -0.273257194268, ‖∇f‖ = 1.5879e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.798930407799e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.798931268224e-01 err = 1.1396026674e-09 time = 0.06 sec +[ Info: LBFGS: iter 153, time 948.38 s: f = -0.273257492644, ‖∇f‖ = 1.2019e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.797802516360e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.797802819870e-01 err = 8.0552494762e-10 time = 0.07 sec +[ Info: LBFGS: iter 154, time 949.11 s: f = -0.273257706633, ‖∇f‖ = 1.2598e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.797768701253e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.797768714427e-01 err = 3.3382578990e-09 time = 0.07 sec +[ Info: LBFGS: iter 155, time 949.86 s: f = -0.273257863534, ‖∇f‖ = 1.2053e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.796659993069e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.796660368515e-01 err = 9.1008880966e-10 time = 0.07 sec +[ Info: LBFGS: iter 156, time 950.61 s: f = -0.273258179903, ‖∇f‖ = 1.2266e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.795411638633e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.795411850459e-01 err = 1.2512833434e-09 time = 0.08 sec +[ Info: LBFGS: iter 157, time 951.59 s: f = -0.273258423796, ‖∇f‖ = 1.9907e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.795802685592e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.795802885861e-01 err = 8.2245725331e-09 time = 0.10 sec +[ Info: LBFGS: iter 158, time 952.30 s: f = -0.273258732899, ‖∇f‖ = 1.0784e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.792877111859e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.792879760255e-01 err = 4.0009118433e-09 time = 0.07 sec +[ Info: LBFGS: iter 159, time 953.04 s: f = -0.273259186735, ‖∇f‖ = 1.6223e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.791975875972e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.791976321664e-01 err = 1.6716860412e-09 time = 0.07 sec +[ Info: LBFGS: iter 160, time 953.76 s: f = -0.273259592363, ‖∇f‖ = 1.6598e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.789064571829e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.789065644045e-01 err = 3.5932050759e-09 time = 0.09 sec +[ Info: LBFGS: iter 161, time 954.53 s: f = -0.273259817595, ‖∇f‖ = 3.7859e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.786811932101e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.786812583197e-01 err = 2.0205940886e-09 time = 0.09 sec +[ Info: LBFGS: iter 162, time 955.51 s: f = -0.273260282927, ‖∇f‖ = 9.1253e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.788559393609e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.788560073523e-01 err = 2.0974758634e-09 time = 0.10 sec +[ Info: LBFGS: iter 163, time 956.22 s: f = -0.273260379913, ‖∇f‖ = 7.4528e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.788376643167e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.788376636156e-01 err = 4.3116122365e-09 time = 0.06 sec +[ Info: LBFGS: iter 164, time 956.93 s: f = -0.273260551977, ‖∇f‖ = 6.2372e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.785975525078e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.785975539109e-01 err = 1.4094402103e-09 time = 0.07 sec +[ Info: LBFGS: iter 165, time 957.68 s: f = -0.273260703522, ‖∇f‖ = 2.8247e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.785447283809e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.785447317097e-01 err = 6.4005366060e-09 time = 0.06 sec +[ Info: LBFGS: iter 166, time 958.66 s: f = -0.273260965983, ‖∇f‖ = 7.7435e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.785616857991e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.785616855805e-01 err = 2.4400266361e-09 time = 0.05 sec +[ Info: LBFGS: iter 167, time 959.34 s: f = -0.273261029226, ‖∇f‖ = 6.0943e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.784706282454e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.784706362702e-01 err = 1.0967731972e-09 time = 0.08 sec +[ Info: LBFGS: iter 168, time 960.06 s: f = -0.273261217327, ‖∇f‖ = 6.3523e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.782868347547e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.782868052432e-01 err = 1.6148867721e-09 time = 0.09 sec +[ Info: LBFGS: iter 169, time 960.83 s: f = -0.273261413376, ‖∇f‖ = 2.2349e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.780984755793e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.780985167087e-01 err = 2.2970561742e-09 time = 0.07 sec +[ Info: LBFGS: iter 170, time 961.59 s: f = -0.273261694992, ‖∇f‖ = 8.1484e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.780266153849e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.780266154518e-01 err = 8.1891024560e-09 time = 0.07 sec +[ Info: LBFGS: iter 171, time 962.57 s: f = -0.273261835395, ‖∇f‖ = 7.1536e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.779268653137e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.779268609535e-01 err = 9.9986450086e-10 time = 0.10 sec +[ Info: LBFGS: iter 172, time 963.29 s: f = -0.273262028596, ‖∇f‖ = 1.0380e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.777985422147e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.777985306143e-01 err = 8.7770193229e-10 time = 0.07 sec +[ Info: LBFGS: iter 173, time 964.03 s: f = -0.273262181630, ‖∇f‖ = 1.1178e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.777370606901e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.777370633742e-01 err = 1.4143631977e-09 time = 0.08 sec +[ Info: LBFGS: iter 174, time 964.79 s: f = -0.273262422962, ‖∇f‖ = 1.0462e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.775641028873e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.775641014404e-01 err = 3.1561784283e-09 time = 0.07 sec +[ Info: LBFGS: iter 175, time 965.50 s: f = -0.273262837415, ‖∇f‖ = 1.1822e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.774748517265e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.774748352105e-01 err = 2.4478019594e-09 time = 0.07 sec +[ Info: LBFGS: iter 176, time 966.45 s: f = -0.273263042769, ‖∇f‖ = 2.2133e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.773219350857e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.773219260487e-01 err = 1.6189317245e-09 time = 0.11 sec +[ Info: LBFGS: iter 177, time 967.17 s: f = -0.273263279588, ‖∇f‖ = 8.7624e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.772854043848e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.772854020301e-01 err = 2.9822673611e-09 time = 0.07 sec +[ Info: LBFGS: iter 178, time 967.90 s: f = -0.273263449265, ‖∇f‖ = 1.0564e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.771758028625e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.771757836120e-01 err = 8.8142743730e-10 time = 0.09 sec +[ Info: LBFGS: iter 179, time 968.65 s: f = -0.273263776392, ‖∇f‖ = 1.6950e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.771302116662e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.771301874760e-01 err = 5.2541798786e-09 time = 0.06 sec +[ Info: LBFGS: iter 180, time 969.40 s: f = -0.273264059850, ‖∇f‖ = 1.5481e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.767996014124e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.767995959424e-01 err = 5.5848027818e-09 time = 0.07 sec +[ Info: CTMRG init: obj = +4.770208398690e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.770208392566e-01 err = 1.6681094467e-09 time = 0.10 sec +[ Info: LBFGS: iter 181, time 971.10 s: f = -0.273264187559, ‖∇f‖ = 1.2988e-03, α = 3.40e-01, m = 20, nfg = 2 +[ Info: CTMRG init: obj = +4.770440823632e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.770440797053e-01 err = 1.5739787613e-09 time = 0.06 sec +[ Info: LBFGS: iter 182, time 971.83 s: f = -0.273264310040, ‖∇f‖ = 5.0027e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.770117929246e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.770117950770e-01 err = 8.9575249608e-10 time = 0.07 sec +[ Info: LBFGS: iter 183, time 972.55 s: f = -0.273264350660, ‖∇f‖ = 5.8334e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.769971605641e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.769971621318e-01 err = 7.7748930713e-10 time = 0.07 sec +[ Info: LBFGS: iter 184, time 973.26 s: f = -0.273264392156, ‖∇f‖ = 7.4958e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.769083171394e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.769083261527e-01 err = 2.2158423859e-09 time = 0.07 sec +[ Info: LBFGS: iter 185, time 974.24 s: f = -0.273264466960, ‖∇f‖ = 1.5690e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.768678353976e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.768678382372e-01 err = 1.4134441577e-09 time = 0.11 sec +[ Info: LBFGS: iter 186, time 974.91 s: f = -0.273264575915, ‖∇f‖ = 8.7235e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.767879001421e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.767878991691e-01 err = 1.7814314057e-09 time = 0.09 sec +[ Info: LBFGS: iter 187, time 975.63 s: f = -0.273264679414, ‖∇f‖ = 5.2723e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.767421973633e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.767421945382e-01 err = 7.9236797418e-10 time = 0.07 sec +[ Info: LBFGS: iter 188, time 976.36 s: f = -0.273264731290, ‖∇f‖ = 6.4665e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.766872205654e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.766872174361e-01 err = 1.0396357887e-09 time = 0.07 sec +[ Info: LBFGS: iter 189, time 977.08 s: f = -0.273264767679, ‖∇f‖ = 9.9049e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.766967641060e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.766967637394e-01 err = 2.0981305723e-09 time = 0.36 sec +[ Info: LBFGS: iter 190, time 978.05 s: f = -0.273264818438, ‖∇f‖ = 5.8232e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.767219705006e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.767219689583e-01 err = 2.1271834938e-09 time = 0.08 sec +[ Info: LBFGS: iter 191, time 978.75 s: f = -0.273264883219, ‖∇f‖ = 5.0729e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.767527763688e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.767527741140e-01 err = 9.6804643183e-10 time = 0.06 sec +[ Info: LBFGS: iter 192, time 979.56 s: f = -0.273264932574, ‖∇f‖ = 7.3332e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.768092611055e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.768092546795e-01 err = 1.9216532006e-09 time = 0.06 sec +[ Info: LBFGS: iter 193, time 980.29 s: f = -0.273265008002, ‖∇f‖ = 8.3120e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.769703094195e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.769702847581e-01 err = 2.0268032020e-09 time = 0.07 sec +[ Info: LBFGS: iter 194, time 981.35 s: f = -0.273265046576, ‖∇f‖ = 1.6803e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.769516426028e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.769516416392e-01 err = 7.6116111015e-09 time = 0.05 sec +[ Info: LBFGS: iter 195, time 982.07 s: f = -0.273265157726, ‖∇f‖ = 5.2448e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.769446882418e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.769446879824e-01 err = 2.9030694112e-09 time = 0.07 sec +[ Info: LBFGS: iter 196, time 982.81 s: f = -0.273265202826, ‖∇f‖ = 5.7354e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.769545446496e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.769545416856e-01 err = 7.3607404224e-09 time = 0.06 sec +[ Info: LBFGS: iter 197, time 983.55 s: f = -0.273265259520, ‖∇f‖ = 8.1885e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.769849318412e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.769849242592e-01 err = 6.6225776188e-10 time = 0.07 sec +[ Info: LBFGS: iter 198, time 984.30 s: f = -0.273265334929, ‖∇f‖ = 8.0328e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.769764186629e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.769763223155e-01 err = 2.8607955001e-09 time = 0.07 sec +[ Info: CTMRG init: obj = +4.769817945901e-01 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +4.769817694585e-01 err = 1.3320949671e-09 time = 0.12 sec +[ Info: LBFGS: iter 199, time 986.02 s: f = -0.273265394805, ‖∇f‖ = 1.1434e-03, α = 5.11e-01, m = 20, nfg = 2 +[ Info: CTMRG init: obj = +4.770224767611e-01 err = 1.0000e+00 +[ Info: CTMRG conv 6: obj = +4.770224657374e-01 err = 6.8019993036e-09 time = 0.06 sec +┌ Warning: LBFGS: not converged to requested tol after 200 iterations and time 986.74 s: f = -0.273265481969, ‖∇f‖ = 5.2333e-04 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/lbfgs.jl:197 +E = -0.2732654819685406 + +```` + +We can compare our PEPS result to the energy obtained using a cylinder-MPS calculation +using a cylinder circumference of $L_y = 7$ and a bond dimension of 446, which yields +$E = -0.273284888$: + +````julia +E_ref = -0.273284888 +@show (E - E_ref) / E_ref; +```` + +```` +(E - E_ref) / E_ref = -7.101026186047375e-5 + +```` + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/docs/src/examples/3.bose_hubbard/main.ipynb b/docs/src/examples/3.bose_hubbard/main.ipynb new file mode 100644 index 000000000..9cb555b2d --- /dev/null +++ b/docs/src/examples/3.bose_hubbard/main.ipynb @@ -0,0 +1,257 @@ +{ + "cells": [ + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Markdown" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "# Optimizing the $U(1)$-symmetric Bose-Hubbard model\n", + "\n", + "This example demonstrates the simulation of the two-dimensional Bose-Hubbard model. In\n", + "particular, the point will be to showcase the use of internal symmetries and finite\n", + "particle densities in PEPS ground state searches. As we will see, incorporating symmetries\n", + "into the simulation consists of initializing a symmetric Hamiltonian, PEPS state and CTM\n", + "environment - made possible through TensorKit.\n", + "\n", + "But first let's seed the RNG and import the required modules:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Random\n", + "using TensorKit, PEPSKit\n", + "using MPSKit: add_physical_charge\n", + "Random.seed!(2928528935);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Defining the model\n", + "\n", + "We will construct the Bose-Hubbard model Hamiltonian through the\n", + "[`bose_hubbard_model`](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.bose_hubbard_model),\n", + "function from MPSKitModels as reexported by PEPSKit. We'll simulate the model in its\n", + "Mott-insulating phase where the ratio $U/t$ is large, since in this phase we expect the\n", + "ground state to be well approximated by a PEPS with a manifest global $U(1)$ symmetry.\n", + "Furthermore, we'll impose a cutoff at 2 bosons per site, set the chemical potential to zero\n", + "and use a simple $1 \\times 1$ unit cell:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "t = 1.0\n", + "U = 30.0\n", + "cutoff = 2\n", + "mu = 0.0\n", + "lattice = InfiniteSquare(1, 1);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Next, we impose an explicit global $U(1)$ symmetry as well as a fixed particle number\n", + "density in our simulations. We can do this by setting the `symmetry` argument of the\n", + "Hamiltonian constructor to `U1Irrep` and passing one as the particle number density\n", + "keyword argument `n`:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "symmetry = U1Irrep\n", + "n = 1\n", + "H = bose_hubbard_model(ComplexF64, symmetry, lattice; cutoff, t, U, n);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Before we continue, it might be interesting to inspect the corresponding lattice physical\n", + "spaces (which is here just a $1 \\times 1$ matrix due to the single-site unit cell):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "physical_spaces = H.lattice" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Note that the physical space contains $U(1)$ charges -1, 0 and +1. Indeed, imposing a\n", + "particle number density of +1 corresponds to shifting the physical charges by -1 to\n", + "'re-center' the physical charges around the desired density. When we do this with a cutoff\n", + "of two bosons per site, i.e. starting from $U(1)$ charges 0, 1 and 2 on the physical level,\n", + "we indeed get the observed charges.\n", + "\n", + "## Characterizing the virtual spaces\n", + "\n", + "When running PEPS simulations with explicit internal symmetries, specifying the structure of\n", + "the virtual spaces of the PEPS and its environment becomes a bit more involved. For the\n", + "environment, one could in principle allow the virtual space to be chosen dynamically during\n", + "the boundary contraction using CTMRG by using a truncation scheme that allows for this\n", + "(e.g. using `alg=:truncdim` or `alg=:truncbelow` to truncate to a fixed total bond dimension\n", + "or singular value cutoff respectively). For the PEPS virtual space however, the structure\n", + "has to be specified before the optimization.\n", + "\n", + "While there are a host of techniques to do this in an informed way (e.g. starting from a\n", + "simple update result), here we just specify the virtual space manually. Since we're dealing\n", + "with a model at unit filling our physical space only contains integer $U(1)$ irreps.\n", + "Therefore, we'll build our PEPS and environment spaces using integer $U(1)$ irreps centered\n", + "around the zero charge:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "V_peps = U1Space(0 => 2, 1 => 1, -1 => 1)\n", + "V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Finding the ground state\n", + "\n", + "Having defined our Hamiltonian and spaces, it is just a matter of plugging this into the\n", + "optimization framework in the usual way to find the ground state. So, we first specify all\n", + "algorithms and their tolerances:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace))\n", + "gradient_alg = (; tol=1e-6, maxiter=10, alg=:eigsolver, iterscheme=:diffgauge)\n", + "optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=200, ls_maxiter=2, ls_maxfg=2);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "!!! note\n", + "\tTaking CTMRG gradients and optimizing symmetric tensors tends to be more problematic\n", + " than with dense tensors. In particular, this means that one frequently needs to tweak\n", + " the `boundary_alg`, `gradient_alg` and `optimizer_alg` settings. There rarely is a\n", + " general-purpose set of settings which will always work, so instead one has to adjust\n", + " the simulation settings for each specific application. For example, it might help to\n", + " switch between the CTMRG flavors `alg=:simultaneous` and `alg=:sequential` to\n", + " improve convergence. The evaluation of the CTMRG gradient can be instable, so there it\n", + " is advised to try the different `iterscheme=:diffgauge` and `iterscheme=:fixed` schemes\n", + " as well as different `alg` keywords. Of course the tolerances of the algorithms and\n", + " their subalgorithms also have to be compatible. For more details on the available\n", + " options, see the `fixedpoint` docstring.\n", + "\n", + "Keep in mind that the PEPS is constructed from a unit cell of spaces, so we have to make a\n", + "matrix of `V_peps` spaces:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "virtual_spaces = fill(V_peps, size(lattice)...)\n", + "peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces)\n", + "env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "And at last, we optimize (which might take a bit):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg)\n", + "@show E;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "We can compare our PEPS result to the energy obtained using a cylinder-MPS calculation\n", + "using a cylinder circumference of $L_y = 7$ and a bond dimension of 446, which yields\n", + "$E = -0.273284888$:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "E_ref = -0.273284888\n", + "@show (E - E_ref) / E_ref;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "---\n", + "\n", + "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" + ], + "metadata": {} + } + ], + "nbformat_minor": 3, + "metadata": { + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.11.4" + }, + "kernelspec": { + "name": "julia-1.11", + "display_name": "Julia 1.11.4", + "language": "julia" + } + }, + "nbformat": 4 +} diff --git a/docs/src/examples/4.xxz/index.md b/docs/src/examples/4.xxz/index.md new file mode 100644 index 000000000..203ddd550 --- /dev/null +++ b/docs/src/examples/4.xxz/index.md @@ -0,0 +1,599 @@ +```@meta +EditURL = "../../../../examples/4.xxz/main.jl" +``` + +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//4.xxz/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//4.xxz/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//4.xxz) + +````julia +using Markdown +```` + +# Néel order in the U(1)-symmetric XXZ model + +Here, we want to look at a special case of the Heisenberg model, where the $x$ and $y$ +couplings are equal, called the XXZ model + +```math +H_0 = J \big(\sum_{\langle i, j \rangle} S_i^x S_j^x + S_i^y S_j^y + \Delta S_i^z S_j^z \big) . +``` + +For appropriate $\Delta$, the model enters an antiferromagnetic phase (Néel order) which we +will force by adding staggered magnetic charges to ``H_0``. Furthermore, since the XXZ +Hamiltonian obeys a $U(1)$ symmetry, we will make use of that and work with $U(1)$-symmetric +PEPS and CTMRG environments. For simplicity, we will consider spin-$1/2$ operators. + +But first, let's make this example deterministic and import the required packages: + +````julia +using Random +using TensorKit, PEPSKit +using MPSKit: add_physical_charge +Random.seed!(2928528935); +```` + +## Constructing the model + +Let us define the $U(1)$-symmetric XXZ Hamiltonian on a $2 \times 2$ unit cell with the +parameters: + +````julia +J = 1.0 +Delta = 1.0 +spin = 1//2 +symmetry = U1Irrep +lattice = InfiniteSquare(2, 2) +H₀ = heisenberg_XXZ(ComplexF64, symmetry, lattice; J, Delta, spin); +```` + +This ensures that our PEPS ansatz can support the bipartite Néel order. As discussed above, +we encode the Néel order directly in the ansatz by adding staggered auxiliary physical +charges: + +````julia +S_aux = [ + U1Irrep(-1//2) U1Irrep(1//2) + U1Irrep(1//2) U1Irrep(-1//2) +] +H = add_physical_charge(H₀, S_aux); +```` + +## Specifying the symmetric virtual spaces + +Before we create an initial PEPS and CTM environment, we need to think about which +symmetric spaces we need to construct. Since we want to exploit the global $U(1)$ symmetry +of the model, we will use TensorKit's `U1Space`s where we specify dimensions for each +symmetry sector. From the virtual spaces, we will need to construct a unit cell (a matrix) +of spaces which will be supplied to the PEPS constructor. The same is true for the physical +spaces, which can be extracted directly from the Hamiltonian `LocalOperator`: + +````julia +V_peps = U1Space(0 => 2, 1 => 1, -1 => 1) +V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2) +virtual_spaces = fill(V_peps, size(lattice)...) +physical_spaces = H.lattice +```` + +```` +2×2 Matrix{TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}}: + Rep[TensorKitSectors.U₁](0=>1, -1=>1) Rep[TensorKitSectors.U₁](0=>1, 1=>1) + Rep[TensorKitSectors.U₁](0=>1, 1=>1) Rep[TensorKitSectors.U₁](0=>1, -1=>1) +```` + +## Ground state search + +From this point onwards it's business as usual: Create an initial PEPS and environment +(using the symmetric spaces), specify the algorithmic parameters and optimize: + +````julia +boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)) +gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge) +optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2) + +peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) +env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); +```` + +```` +[ Info: CTMRG init: obj = -1.121020187593e+04 -6.991066478500e+03im err = 1.0000e+00 +[ Info: CTMRG conv 26: obj = +6.369731502336e+03 -8.500319381710e-08im err = 7.5599921139e-09 time = 0.97 sec + +```` + +Finally, we can optimize the PEPS with respect to the XXZ Hamiltonian. Note that the +optimization might take a while since precompilation of symmetric AD code takes longer and +because symmetric tensors do create a bit of overhead (which does pay off at larger bond +and environment dimensions): + +````julia +peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg) +@show E; +```` + +```` +[ Info: CTMRG init: obj = +2.434421528081e-05 err = 1.0000e+00 +[ Info: CTMRG conv 4: obj = +2.434421528088e-05 err = 4.5912943585e-10 time = 0.18 sec +[ Info: LBFGS: initializing with f = -0.033045967451, ‖∇f‖ = 3.2973e-01 +┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Float64}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 +[ Info: CTMRG init: obj = +2.453223895159e-05 err = 1.0000e+00 +[ Info: CTMRG conv 19: obj = +2.453720354328e-05 err = 5.3853880385e-09 time = 0.70 sec +[ Info: CTMRG init: obj = +2.536991372204e-05 err = 1.0000e+00 +[ Info: CTMRG conv 21: obj = +2.551399135525e-05 err = 5.7602811253e-09 time = 1.01 sec +[ Info: CTMRG init: obj = +3.190392580620e-05 err = 1.0000e+00 +[ Info: CTMRG conv 23: obj = +3.871282989002e-05 err = 2.3099743648e-09 time = 0.80 sec +[ Info: CTMRG init: obj = +1.997307247185e-04 +1.744054390924e-14im err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +2.397713225168e-03 err = 8.6119116463e-09 time = 0.59 sec +┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: +│ α = 2.50e+01, dϕ = -9.83e-03, ϕ - ϕ₀ = -1.52e-01 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 1, time 173.47 s: f = -0.185441286972, ‖∇f‖ = 1.8487e+00, α = 2.50e+01, m = 0, nfg = 4 +┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 +[ Info: CTMRG init: obj = +4.060460706144e-05 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +4.073280032714e-05 err = 8.7858583593e-09 time = 0.72 sec +[ Info: CTMRG init: obj = +4.950177698074e-05 err = 1.0000e+00 +[ Info: CTMRG conv 24: obj = +5.405071831250e-05 err = 4.1362491224e-09 time = 0.87 sec +[ Info: CTMRG init: obj = +1.459089235128e-04 err = 1.0000e+00 +[ Info: CTMRG conv 13: obj = +3.628610875102e-04 err = 7.1545714198e-09 time = 0.50 sec +[ Info: CTMRG init: obj = +1.067948187035e-02 err = 1.0000e+00 +[ Info: CTMRG conv 10: obj = +3.300787404705e-02 err = 2.7551053256e-09 time = 0.38 sec +┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: +│ α = 2.50e+01, dϕ = -1.83e-03, ϕ - ϕ₀ = -3.94e-01 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 2, time 219.43 s: f = -0.579296056587, ‖∇f‖ = 5.7534e-01, α = 2.50e+01, m = 0, nfg = 4 +[ Info: CTMRG init: obj = +5.216577372581e-04 err = 1.0000e+00 +[ Info: CTMRG conv 12: obj = +5.262193467872e-04 err = 2.3063817877e-09 time = 0.43 sec +[ Info: LBFGS: iter 3, time 225.57 s: f = -0.613492668655, ‖∇f‖ = 3.3905e-01, α = 1.00e+00, m = 1, nfg = 1 +[ Info: CTMRG init: obj = +5.712313609937e-04 err = 1.0000e+00 +[ Info: CTMRG conv 12: obj = +5.762503340314e-04 err = 1.2560009849e-09 time = 0.44 sec +[ Info: LBFGS: iter 4, time 231.66 s: f = -0.638698278101, ‖∇f‖ = 2.2127e-01, α = 1.00e+00, m = 2, nfg = 1 +[ Info: CTMRG init: obj = +6.503993965962e-04 err = 1.0000e+00 +[ Info: CTMRG conv 12: obj = +6.672622988324e-04 err = 1.2420966253e-09 time = 0.42 sec +[ Info: LBFGS: iter 5, time 237.33 s: f = -0.650278206280, ‖∇f‖ = 1.9661e-01, α = 1.00e+00, m = 3, nfg = 1 +[ Info: CTMRG init: obj = +7.095032316279e-04 err = 1.0000e+00 +[ Info: CTMRG conv 11: obj = +7.107783954017e-04 err = 6.2073791690e-09 time = 0.40 sec +[ Info: LBFGS: iter 6, time 243.08 s: f = -0.654875781442, ‖∇f‖ = 7.1166e-02, α = 1.00e+00, m = 4, nfg = 1 +[ Info: CTMRG init: obj = +7.678769240767e-04 err = 1.0000e+00 +[ Info: CTMRG conv 11: obj = +7.677598689487e-04 err = 2.8083589443e-09 time = 0.42 sec +[ Info: LBFGS: iter 7, time 248.84 s: f = -0.656067729644, ‖∇f‖ = 5.1946e-02, α = 1.00e+00, m = 5, nfg = 1 +[ Info: CTMRG init: obj = +1.047392070849e-03 err = 1.0000e+00 +[ Info: CTMRG conv 11: obj = +1.045750152055e-03 err = 3.4449671849e-09 time = 0.42 sec +[ Info: LBFGS: iter 8, time 254.59 s: f = -0.659056547972, ‖∇f‖ = 5.4114e-02, α = 1.00e+00, m = 6, nfg = 1 +[ Info: CTMRG init: obj = +1.532812857985e-03 err = 1.0000e+00 +[ Info: CTMRG conv 11: obj = +1.525097438199e-03 err = 2.4326768610e-09 time = 0.38 sec +[ Info: LBFGS: iter 9, time 259.75 s: f = -0.660492187403, ‖∇f‖ = 1.0001e-01, α = 1.00e+00, m = 7, nfg = 1 +[ Info: CTMRG init: obj = +1.795787577321e-03 err = 1.0000e+00 +[ Info: CTMRG conv 10: obj = +1.794727275308e-03 err = 2.9197329251e-09 time = 0.36 sec +[ Info: LBFGS: iter 10, time 265.12 s: f = -0.662131899972, ‖∇f‖ = 3.0720e-02, α = 1.00e+00, m = 8, nfg = 1 +[ Info: CTMRG init: obj = +1.996305356333e-03 err = 1.0000e+00 +[ Info: CTMRG conv 10: obj = +1.995481173538e-03 err = 1.5914652201e-09 time = 0.37 sec +[ Info: LBFGS: iter 11, time 270.19 s: f = -0.662491636970, ‖∇f‖ = 2.1327e-02, α = 1.00e+00, m = 9, nfg = 1 +[ Info: CTMRG init: obj = +2.243383437860e-03 err = 1.0000e+00 +[ Info: CTMRG conv 10: obj = +2.242179147938e-03 err = 1.3840632855e-09 time = 0.37 sec +[ Info: LBFGS: iter 12, time 275.22 s: f = -0.662815874554, ‖∇f‖ = 2.0939e-02, α = 1.00e+00, m = 10, nfg = 1 +[ Info: CTMRG init: obj = +2.529321906303e-03 err = 1.0000e+00 +[ Info: CTMRG conv 10: obj = +2.527958437132e-03 err = 1.3943320526e-09 time = 0.38 sec +[ Info: LBFGS: iter 13, time 280.65 s: f = -0.663206295533, ‖∇f‖ = 2.3137e-02, α = 1.00e+00, m = 11, nfg = 1 +[ Info: CTMRG init: obj = +2.905364340563e-03 err = 1.0000e+00 +[ Info: CTMRG conv 10: obj = +2.902988231101e-03 err = 2.0819309387e-09 time = 0.39 sec +[ Info: LBFGS: iter 14, time 286.03 s: f = -0.663617412480, ‖∇f‖ = 3.2148e-02, α = 1.00e+00, m = 12, nfg = 1 +[ Info: CTMRG init: obj = +2.904272464292e-03 err = 1.0000e+00 +[ Info: CTMRG conv 10: obj = +2.905132091807e-03 err = 1.9716972635e-09 time = 0.39 sec +[ Info: LBFGS: iter 15, time 291.13 s: f = -0.663981399612, ‖∇f‖ = 2.1162e-02, α = 1.00e+00, m = 13, nfg = 1 +[ Info: CTMRG init: obj = +2.742432815679e-03 err = 1.0000e+00 +[ Info: CTMRG conv 11: obj = +2.745820290756e-03 err = 1.5265448213e-09 time = 0.38 sec +[ Info: LBFGS: iter 16, time 296.57 s: f = -0.664500170184, ‖∇f‖ = 3.0047e-02, α = 1.00e+00, m = 14, nfg = 1 +[ Info: CTMRG init: obj = +2.401849189969e-03 err = 1.0000e+00 +[ Info: CTMRG conv 12: obj = +2.405656778850e-03 err = 2.5894583460e-09 time = 0.46 sec +[ Info: LBFGS: iter 17, time 301.86 s: f = -0.665018204774, ‖∇f‖ = 3.4052e-02, α = 1.00e+00, m = 15, nfg = 1 +[ Info: CTMRG init: obj = +2.122203005349e-03 err = 1.0000e+00 +[ Info: CTMRG conv 12: obj = +2.121928393701e-03 err = 9.5870670882e-09 time = 0.44 sec +[ Info: LBFGS: iter 18, time 307.57 s: f = -0.665352132477, ‖∇f‖ = 4.0506e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +2.072289083756e-03 err = 1.0000e+00 +[ Info: CTMRG conv 12: obj = +2.072594745594e-03 err = 4.5258473845e-09 time = 0.43 sec +[ Info: LBFGS: iter 19, time 313.22 s: f = -0.665708949595, ‖∇f‖ = 1.8115e-02, α = 1.00e+00, m = 17, nfg = 1 +[ Info: CTMRG init: obj = +2.162982716617e-03 err = 1.0000e+00 +[ Info: CTMRG conv 11: obj = +2.163052122686e-03 err = 5.9164202930e-09 time = 0.38 sec +[ Info: LBFGS: iter 20, time 319.05 s: f = -0.665851319983, ‖∇f‖ = 1.7887e-02, α = 1.00e+00, m = 18, nfg = 1 +[ Info: CTMRG init: obj = +2.220648043164e-03 err = 1.0000e+00 +[ Info: CTMRG conv 12: obj = +2.221583997885e-03 err = 5.4700111805e-09 time = 0.43 sec +[ Info: LBFGS: iter 21, time 324.88 s: f = -0.666077676932, ‖∇f‖ = 2.1504e-02, α = 1.00e+00, m = 19, nfg = 1 +[ Info: CTMRG init: obj = +2.452606638527e-03 err = 1.0000e+00 +[ Info: CTMRG conv 13: obj = +2.457433179381e-03 err = 7.8365492645e-09 time = 0.49 sec +[ Info: LBFGS: iter 22, time 330.78 s: f = -0.666415750625, ‖∇f‖ = 2.1742e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +2.618995877418e-03 err = 1.0000e+00 +[ Info: CTMRG conv 12: obj = +2.627247025253e-03 err = 5.4628097961e-09 time = 0.43 sec +[ Info: CTMRG init: obj = +2.517366578177e-03 err = 1.0000e+00 +[ Info: CTMRG conv 11: obj = +2.518273673784e-03 err = 8.0918301167e-09 time = 0.39 sec +[ Info: LBFGS: iter 23, time 342.43 s: f = -0.666535417444, ‖∇f‖ = 2.1053e-02, α = 3.37e-01, m = 20, nfg = 2 +[ Info: CTMRG init: obj = +2.575130612824e-03 err = 1.0000e+00 +[ Info: CTMRG conv 12: obj = +2.575296959997e-03 err = 5.8864311994e-09 time = 0.43 sec +[ Info: LBFGS: iter 24, time 348.22 s: f = -0.666677914685, ‖∇f‖ = 1.4107e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +2.640725585692e-03 err = 1.0000e+00 +[ Info: CTMRG conv 14: obj = +2.643147349459e-03 err = 2.1654459528e-09 time = 0.51 sec +[ Info: LBFGS: iter 25, time 354.02 s: f = -0.666880717597, ‖∇f‖ = 1.5936e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +2.677813236881e-03 err = 1.0000e+00 +[ Info: CTMRG conv 13: obj = +2.677409654697e-03 err = 7.1910371417e-09 time = 0.48 sec +[ Info: LBFGS: iter 26, time 359.89 s: f = -0.667020492218, ‖∇f‖ = 2.1705e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +2.714827500016e-03 err = 1.0000e+00 +[ Info: CTMRG conv 14: obj = +2.715087100998e-03 err = 3.4660002553e-09 time = 0.52 sec +[ Info: LBFGS: iter 27, time 365.73 s: f = -0.667174861341, ‖∇f‖ = 1.3538e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +2.870936188843e-03 err = 1.0000e+00 +[ Info: CTMRG conv 13: obj = +2.871152272950e-03 err = 4.4859828582e-09 time = 0.49 sec +[ Info: LBFGS: iter 28, time 371.84 s: f = -0.667242799138, ‖∇f‖ = 1.3749e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +2.894454117569e-03 err = 1.0000e+00 +[ Info: CTMRG conv 13: obj = +2.894497874679e-03 err = 2.8815190399e-09 time = 0.51 sec +[ Info: LBFGS: iter 29, time 377.75 s: f = -0.667289201830, ‖∇f‖ = 9.6270e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +2.992675491930e-03 err = 1.0000e+00 +[ Info: CTMRG conv 13: obj = +2.992923140174e-03 err = 5.1513256196e-09 time = 0.48 sec +[ Info: LBFGS: iter 30, time 383.74 s: f = -0.667382804207, ‖∇f‖ = 1.1004e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +3.166823421024e-03 err = 1.0000e+00 +[ Info: CTMRG conv 14: obj = +3.168045231564e-03 err = 1.9426667949e-09 time = 0.52 sec +[ Info: LBFGS: iter 31, time 389.50 s: f = -0.667514031651, ‖∇f‖ = 1.5020e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +3.391726443493e-03 err = 1.0000e+00 +[ Info: CTMRG conv 14: obj = +3.393587165917e-03 err = 4.1266089130e-09 time = 0.49 sec +[ Info: LBFGS: iter 32, time 395.39 s: f = -0.667654012398, ‖∇f‖ = 1.6237e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +3.608251780050e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +3.612137047877e-03 err = 5.5508459619e-09 time = 0.55 sec +[ Info: LBFGS: iter 33, time 401.25 s: f = -0.667695159156, ‖∇f‖ = 2.0278e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +3.567945490801e-03 err = 1.0000e+00 +[ Info: CTMRG conv 14: obj = +3.568212239514e-03 err = 4.2558976934e-09 time = 0.51 sec +[ Info: LBFGS: iter 34, time 407.49 s: f = -0.667791548479, ‖∇f‖ = 7.2359e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +3.560786709647e-03 err = 1.0000e+00 +[ Info: CTMRG conv 13: obj = +3.560744298718e-03 err = 9.7700409998e-09 time = 0.49 sec +[ Info: LBFGS: iter 35, time 413.61 s: f = -0.667831622740, ‖∇f‖ = 7.0221e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +3.612058119712e-03 err = 1.0000e+00 +[ Info: CTMRG conv 14: obj = +3.612096455450e-03 err = 9.4956185538e-09 time = 0.50 sec +[ Info: LBFGS: iter 36, time 419.79 s: f = -0.667897197556, ‖∇f‖ = 1.0611e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +3.748694446268e-03 err = 1.0000e+00 +[ Info: CTMRG conv 14: obj = +3.749410253030e-03 err = 8.1837906634e-09 time = 0.53 sec +[ Info: LBFGS: iter 37, time 426.04 s: f = -0.667974329902, ‖∇f‖ = 1.3520e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +3.932731964018e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +3.934152642199e-03 err = 4.4759136527e-09 time = 0.58 sec +[ Info: LBFGS: iter 38, time 432.14 s: f = -0.668044978527, ‖∇f‖ = 8.1835e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.075036525220e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +4.075095185707e-03 err = 4.9388492576e-09 time = 0.54 sec +[ Info: LBFGS: iter 39, time 438.40 s: f = -0.668096641090, ‖∇f‖ = 5.8523e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.249636465901e-03 err = 1.0000e+00 +[ Info: CTMRG conv 14: obj = +4.250516433969e-03 err = 9.0111357740e-09 time = 0.55 sec +[ Info: LBFGS: iter 40, time 444.50 s: f = -0.668140633648, ‖∇f‖ = 8.7357e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.408266209899e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +4.408238818952e-03 err = 9.3231498401e-09 time = 0.54 sec +[ Info: LBFGS: iter 41, time 450.71 s: f = -0.668191141610, ‖∇f‖ = 1.0519e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.597894504232e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +4.598301067090e-03 err = 8.3891599548e-09 time = 0.60 sec +[ Info: LBFGS: iter 42, time 456.88 s: f = -0.668251028839, ‖∇f‖ = 9.9323e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.696678230485e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +4.697823025374e-03 err = 8.0248890527e-09 time = 0.57 sec +[ Info: LBFGS: iter 43, time 462.72 s: f = -0.668287406221, ‖∇f‖ = 8.1822e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.650711531624e-03 err = 1.0000e+00 +[ Info: CTMRG conv 14: obj = +4.650746519732e-03 err = 6.7135782228e-09 time = 0.47 sec +[ Info: LBFGS: iter 44, time 468.42 s: f = -0.668312220264, ‖∇f‖ = 4.9144e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.625470238204e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +4.625513939090e-03 err = 4.9755202754e-09 time = 0.54 sec +[ Info: LBFGS: iter 45, time 474.22 s: f = -0.668335763877, ‖∇f‖ = 5.4414e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.669165659738e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +4.669545010290e-03 err = 2.7865418046e-09 time = 0.56 sec +[ Info: LBFGS: iter 46, time 480.47 s: f = -0.668372098383, ‖∇f‖ = 6.8595e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +4.882117118241e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +4.884335131166e-03 err = 8.3333297223e-09 time = 0.59 sec +[ Info: LBFGS: iter 47, time 486.78 s: f = -0.668431605944, ‖∇f‖ = 8.8807e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +5.309290623370e-03 err = 1.0000e+00 +[ Info: CTMRG conv 17: obj = +5.316323973446e-03 err = 8.0212919448e-09 time = 0.62 sec +[ Info: CTMRG init: obj = +5.119887535680e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +5.121775455646e-03 err = 6.2134661508e-09 time = 0.57 sec +[ Info: LBFGS: iter 48, time 498.87 s: f = -0.668464682116, ‖∇f‖ = 8.2571e-03, α = 5.24e-01, m = 20, nfg = 2 +[ Info: CTMRG init: obj = +5.273402134894e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +5.273723968011e-03 err = 3.4080188496e-09 time = 0.55 sec +[ Info: LBFGS: iter 49, time 504.67 s: f = -0.668492867254, ‖∇f‖ = 4.3005e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +5.434996342170e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +5.435269932189e-03 err = 9.7185194815e-09 time = 0.52 sec +[ Info: LBFGS: iter 50, time 510.48 s: f = -0.668513727270, ‖∇f‖ = 3.9910e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +5.535741796887e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +5.535812124729e-03 err = 7.5597802907e-09 time = 0.55 sec +[ Info: LBFGS: iter 51, time 516.41 s: f = -0.668532155485, ‖∇f‖ = 4.9090e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +5.721601939015e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +5.722494303974e-03 err = 9.0525500416e-09 time = 0.56 sec +[ Info: LBFGS: iter 52, time 522.37 s: f = -0.668564505110, ‖∇f‖ = 7.4817e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +5.854170952025e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +5.855570255032e-03 err = 6.0643662779e-09 time = 0.58 sec +[ Info: LBFGS: iter 53, time 528.39 s: f = -0.668593093779, ‖∇f‖ = 5.7300e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +5.807157999050e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +5.807180207336e-03 err = 6.8718778031e-09 time = 0.57 sec +[ Info: LBFGS: iter 54, time 534.30 s: f = -0.668613013637, ‖∇f‖ = 4.0964e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +5.777684965760e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +5.778327844031e-03 err = 6.8696167870e-09 time = 0.53 sec +[ Info: LBFGS: iter 55, time 540.15 s: f = -0.668634613224, ‖∇f‖ = 4.2489e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +5.776704820114e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +5.777004562734e-03 err = 7.3944931153e-09 time = 0.56 sec +[ Info: LBFGS: iter 56, time 546.08 s: f = -0.668649481004, ‖∇f‖ = 4.5912e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +5.856675141670e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +5.857261938207e-03 err = 5.2072352127e-09 time = 0.58 sec +[ Info: LBFGS: iter 57, time 552.10 s: f = -0.668670198485, ‖∇f‖ = 3.8195e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +5.995689940197e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +5.996264576639e-03 err = 6.8920420466e-09 time = 0.59 sec +[ Info: LBFGS: iter 58, time 558.08 s: f = -0.668688448995, ‖∇f‖ = 3.4508e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.099733436549e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.099798555351e-03 err = 4.5817148903e-09 time = 0.56 sec +[ Info: LBFGS: iter 59, time 564.00 s: f = -0.668696405392, ‖∇f‖ = 5.8372e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.115965920909e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +6.116008207532e-03 err = 4.0996420107e-09 time = 0.56 sec +[ Info: LBFGS: iter 60, time 570.39 s: f = -0.668706977023, ‖∇f‖ = 3.5019e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.154049968178e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +6.154040328233e-03 err = 4.3393809493e-09 time = 0.55 sec +[ Info: LBFGS: iter 61, time 576.75 s: f = -0.668721369553, ‖∇f‖ = 2.8608e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.180409862959e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +6.180481649061e-03 err = 6.7759235085e-09 time = 0.56 sec +[ Info: LBFGS: iter 62, time 583.14 s: f = -0.668732770821, ‖∇f‖ = 3.0068e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.216422621938e-03 err = 1.0000e+00 +[ Info: CTMRG conv 17: obj = +6.216968359833e-03 err = 3.5461853049e-09 time = 0.65 sec +[ Info: LBFGS: iter 63, time 589.47 s: f = -0.668738498959, ‖∇f‖ = 7.3212e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.221199582857e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.221285221433e-03 err = 4.3169649076e-09 time = 0.58 sec +[ Info: LBFGS: iter 64, time 595.63 s: f = -0.668752996535, ‖∇f‖ = 3.0434e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.242137977852e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.242318533556e-03 err = 4.6010616214e-09 time = 0.62 sec +[ Info: LBFGS: iter 65, time 602.00 s: f = -0.668762694601, ‖∇f‖ = 1.9787e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.289082932438e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.289343235396e-03 err = 5.8175591078e-09 time = 0.63 sec +[ Info: LBFGS: iter 66, time 608.31 s: f = -0.668773371271, ‖∇f‖ = 2.8034e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.398675130868e-03 err = 1.0000e+00 +[ Info: CTMRG conv 17: obj = +6.398833095649e-03 err = 4.5926394812e-09 time = 0.63 sec +[ Info: LBFGS: iter 67, time 614.61 s: f = -0.668783730169, ‖∇f‖ = 4.4007e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.490371007286e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.490358021783e-03 err = 6.5723120435e-09 time = 0.59 sec +[ Info: LBFGS: iter 68, time 620.49 s: f = -0.668794471804, ‖∇f‖ = 2.4210e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.535126515606e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +6.535148940005e-03 err = 7.7202755813e-09 time = 0.51 sec +[ Info: LBFGS: iter 69, time 626.32 s: f = -0.668800925048, ‖∇f‖ = 1.7114e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.595058098376e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.595020144173e-03 err = 3.8463595010e-09 time = 0.57 sec +[ Info: LBFGS: iter 70, time 632.22 s: f = -0.668808484765, ‖∇f‖ = 2.5442e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.629079062355e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.629041212706e-03 err = 4.2289764196e-09 time = 0.56 sec +[ Info: LBFGS: iter 71, time 638.44 s: f = -0.668813882136, ‖∇f‖ = 3.7919e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.639171252265e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.639210497400e-03 err = 3.7366899617e-09 time = 0.59 sec +[ Info: LBFGS: iter 72, time 644.68 s: f = -0.668819791141, ‖∇f‖ = 2.1652e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.654973412141e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.655339377376e-03 err = 7.5374087983e-09 time = 0.61 sec +[ Info: LBFGS: iter 73, time 650.69 s: f = -0.668826145765, ‖∇f‖ = 1.9093e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.662806120898e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.662814498802e-03 err = 3.3848722633e-09 time = 0.60 sec +[ Info: LBFGS: iter 74, time 656.72 s: f = -0.668830491901, ‖∇f‖ = 2.4506e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.702717314521e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +6.702719872350e-03 err = 9.3358252520e-09 time = 0.56 sec +[ Info: LBFGS: iter 75, time 662.62 s: f = -0.668836964982, ‖∇f‖ = 2.6465e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.755435653801e-03 err = 1.0000e+00 +[ Info: CTMRG conv 17: obj = +6.755466254550e-03 err = 4.1759687247e-09 time = 0.63 sec +[ Info: CTMRG init: obj = +6.724498871765e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.724503911311e-03 err = 5.4391737468e-09 time = 0.63 sec +[ Info: LBFGS: iter 76, time 675.39 s: f = -0.668840404782, ‖∇f‖ = 3.1398e-03, α = 3.87e-01, m = 20, nfg = 2 +[ Info: CTMRG init: obj = +6.769517301888e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.769508414086e-03 err = 5.1735891627e-09 time = 0.59 sec +[ Info: LBFGS: iter 77, time 681.45 s: f = -0.668843872314, ‖∇f‖ = 3.1246e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.802028757627e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.802028595034e-03 err = 6.3599636500e-09 time = 0.60 sec +[ Info: LBFGS: iter 78, time 687.52 s: f = -0.668847211574, ‖∇f‖ = 2.4091e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.816904509594e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.816904040071e-03 err = 3.2048624166e-09 time = 0.60 sec +[ Info: LBFGS: iter 79, time 693.54 s: f = -0.668850327797, ‖∇f‖ = 2.0185e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.900461182865e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.900570345503e-03 err = 4.2595997369e-09 time = 0.65 sec +[ Info: LBFGS: iter 80, time 699.67 s: f = -0.668852132421, ‖∇f‖ = 4.1279e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: CTMRG init: obj = +6.912967976917e-03 err = 1.0000e+00 +[ Info: CTMRG conv 17: obj = +6.913007896384e-03 err = 6.0275386485e-09 time = 0.62 sec +[ Info: CTMRG init: obj = +6.910412300869e-03 err = 1.0000e+00 +[ Info: CTMRG conv 17: obj = +6.910433755449e-03 err = 4.3218398488e-09 time = 0.62 sec +[ Info: CTMRG init: obj = +6.901253491862e-03 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +6.901253321410e-03 err = 2.0427380336e-09 time = 0.52 sec +[ Info: LBFGS: iter 81, time 718.23 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 4.20e-02, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.72 sec +[ Info: CTMRG init: obj = +6.903715176268e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777121e-03 err = 4.0082178383e-09 time = 0.66 sec +[ Info: CTMRG init: obj = +6.904105837467e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486670e-03 err = 5.2863114192e-09 time = 0.59 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 82, time 737.05 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.76 sec +[ Info: CTMRG init: obj = +6.903715176279e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777131e-03 err = 4.0082185801e-09 time = 0.68 sec +[ Info: CTMRG init: obj = +6.904105837342e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486544e-03 err = 5.2863118416e-09 time = 0.58 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 83, time 756.63 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.71 sec +[ Info: CTMRG init: obj = +6.903715176288e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777140e-03 err = 4.0082195479e-09 time = 0.66 sec +[ Info: CTMRG init: obj = +6.904105837343e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486545e-03 err = 5.2863124904e-09 time = 0.61 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 84, time 776.38 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.74 sec +[ Info: CTMRG init: obj = +6.903715176298e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777150e-03 err = 4.0082209060e-09 time = 0.68 sec +[ Info: CTMRG init: obj = +6.904105837280e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486481e-03 err = 5.2863111416e-09 time = 0.58 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 85, time 796.20 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.74 sec +[ Info: CTMRG init: obj = +6.903715176296e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777149e-03 err = 4.0082189483e-09 time = 0.66 sec +[ Info: CTMRG init: obj = +6.904105837102e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486302e-03 err = 5.2863118722e-09 time = 0.60 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 86, time 816.05 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.74 sec +[ Info: CTMRG init: obj = +6.903715176290e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777143e-03 err = 4.0082193245e-09 time = 0.66 sec +[ Info: CTMRG init: obj = +6.904105837270e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486472e-03 err = 5.2863100503e-09 time = 0.58 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 87, time 835.56 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.71 sec +[ Info: CTMRG init: obj = +6.903715176296e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777148e-03 err = 4.0082200300e-09 time = 0.65 sec +[ Info: CTMRG init: obj = +6.904105837224e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486425e-03 err = 5.2863111525e-09 time = 0.57 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 88, time 854.74 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.72 sec +[ Info: CTMRG init: obj = +6.903715176315e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777166e-03 err = 4.0082194363e-09 time = 0.65 sec +[ Info: CTMRG init: obj = +6.904105837312e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486514e-03 err = 5.2863100478e-09 time = 0.57 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 89, time 874.42 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.69 sec +[ Info: CTMRG init: obj = +6.903715176263e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777116e-03 err = 4.0082172169e-09 time = 0.62 sec +[ Info: CTMRG init: obj = +6.904105837338e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486540e-03 err = 5.2863119129e-09 time = 0.58 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 90, time 893.28 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.75 sec +[ Info: CTMRG init: obj = +6.903715176276e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777129e-03 err = 4.0082175126e-09 time = 0.65 sec +[ Info: CTMRG init: obj = +6.904105837251e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486452e-03 err = 5.2863111569e-09 time = 0.58 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 91, time 913.14 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.77 sec +[ Info: CTMRG init: obj = +6.903715176272e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777125e-03 err = 4.0082181074e-09 time = 0.68 sec +[ Info: CTMRG init: obj = +6.904105837232e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486434e-03 err = 5.2863134906e-09 time = 0.58 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 92, time 933.21 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.73 sec +[ Info: CTMRG init: obj = +6.903715176283e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777136e-03 err = 4.0082201639e-09 time = 0.68 sec +[ Info: CTMRG init: obj = +6.904105837346e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486548e-03 err = 5.2863126347e-09 time = 0.58 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 93, time 952.50 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.72 sec +[ Info: CTMRG init: obj = +6.903715176277e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777130e-03 err = 4.0082177395e-09 time = 0.64 sec +[ Info: CTMRG init: obj = +6.904105837321e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486523e-03 err = 5.2863123948e-09 time = 0.60 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 94, time 972.36 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.78 sec +[ Info: CTMRG init: obj = +6.903715176301e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777153e-03 err = 4.0082202712e-09 time = 0.66 sec +[ Info: CTMRG init: obj = +6.904105837315e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486517e-03 err = 5.2863110108e-09 time = 0.60 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 95, time 992.67 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.73 sec +[ Info: CTMRG init: obj = +6.903715176310e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777162e-03 err = 4.0082201146e-09 time = 0.65 sec +[ Info: CTMRG init: obj = +6.904105837264e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486466e-03 err = 5.2863115583e-09 time = 0.55 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 96, time 1012.35 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.74 sec +[ Info: CTMRG init: obj = +6.903715176248e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777101e-03 err = 4.0082187020e-09 time = 0.67 sec +[ Info: CTMRG init: obj = +6.904105837262e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486464e-03 err = 5.2863108791e-09 time = 0.56 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 97, time 1032.65 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.79 sec +[ Info: CTMRG init: obj = +6.903715176342e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777193e-03 err = 4.0082195840e-09 time = 0.68 sec +[ Info: CTMRG init: obj = +6.904105837350e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486552e-03 err = 5.2863133708e-09 time = 0.58 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 98, time 1052.51 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.77 sec +[ Info: CTMRG init: obj = +6.903715176276e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777128e-03 err = 4.0082194381e-09 time = 0.64 sec +[ Info: CTMRG init: obj = +6.904105837352e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486554e-03 err = 5.2863122797e-09 time = 0.56 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 99, time 1072.16 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 +[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.78 sec +[ Info: CTMRG init: obj = +6.903715176277e-03 err = 1.0000e+00 +[ Info: CTMRG conv 18: obj = +6.903870777129e-03 err = 4.0082200112e-09 time = 0.70 sec +[ Info: CTMRG init: obj = +6.904105837289e-03 err = 1.0000e+00 +[ Info: CTMRG conv 16: obj = +6.904113486491e-03 err = 5.2863126525e-09 time = 0.60 sec +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +┌ Warning: LBFGS: not converged to requested tol after 100 iterations and time 1092.27 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/lbfgs.jl:197 +E = -0.6688553292829834 + +```` + +Note that for the specified parameters $J=\Delta=1$, we simulated the same Hamiltonian as +in the [Heisenberg example](@ref examples_heisenberg). In that example, with a non-symmetric +$D=2$ PEPS simulation, we reached a ground-state energy of around $E_\text{D=2} = -0.6625\dots$. +Again comparing against [Sandvik's](@cite sandvik_computational_2011) accurate QMC estimate +``E_{\text{ref}}=−0.6694421``, we see that we already got closer to the reference energy. + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/docs/src/examples/4.xxz/main.ipynb b/docs/src/examples/4.xxz/main.ipynb new file mode 100644 index 000000000..d2ea2d76a --- /dev/null +++ b/docs/src/examples/4.xxz/main.ipynb @@ -0,0 +1,197 @@ +{ + "cells": [ + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Markdown" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "# Néel order in the U(1)-symmetric XXZ model\n", + "\n", + "Here, we want to look at a special case of the Heisenberg model, where the $x$ and $y$\n", + "couplings are equal, called the XXZ model\n", + "\n", + "$$\n", + "H_0 = J \\big(\\sum_{\\langle i, j \\rangle} S_i^x S_j^x + S_i^y S_j^y + \\Delta S_i^z S_j^z \\big) .\n", + "$$\n", + "\n", + "For appropriate $\\Delta$, the model enters an antiferromagnetic phase (Néel order) which we\n", + "will force by adding staggered magnetic charges to $H_0$. Furthermore, since the XXZ\n", + "Hamiltonian obeys a $U(1)$ symmetry, we will make use of that and work with $U(1)$-symmetric\n", + "PEPS and CTMRG environments. For simplicity, we will consider spin-$1/2$ operators.\n", + "\n", + "But first, let's make this example deterministic and import the required packages:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Random\n", + "using TensorKit, PEPSKit\n", + "using MPSKit: add_physical_charge\n", + "Random.seed!(2928528935);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Constructing the model\n", + "\n", + "Let us define the $U(1)$-symmetric XXZ Hamiltonian on a $2 \\times 2$ unit cell with the\n", + "parameters:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "J = 1.0\n", + "Delta = 1.0\n", + "spin = 1//2\n", + "symmetry = U1Irrep\n", + "lattice = InfiniteSquare(2, 2)\n", + "H₀ = heisenberg_XXZ(ComplexF64, symmetry, lattice; J, Delta, spin);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "This ensures that our PEPS ansatz can support the bipartite Néel order. As discussed above,\n", + "we encode the Néel order directly in the ansatz by adding staggered auxiliary physical\n", + "charges:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "S_aux = [\n", + " U1Irrep(-1//2) U1Irrep(1//2)\n", + " U1Irrep(1//2) U1Irrep(-1//2)\n", + "]\n", + "H = add_physical_charge(H₀, S_aux);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Specifying the symmetric virtual spaces\n", + "\n", + "Before we create an initial PEPS and CTM environment, we need to think about which\n", + "symmetric spaces we need to construct. Since we want to exploit the global $U(1)$ symmetry\n", + "of the model, we will use TensorKit's `U1Space`s where we specify dimensions for each\n", + "symmetry sector. From the virtual spaces, we will need to construct a unit cell (a matrix)\n", + "of spaces which will be supplied to the PEPS constructor. The same is true for the physical\n", + "spaces, which can be extracted directly from the Hamiltonian `LocalOperator`:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "V_peps = U1Space(0 => 2, 1 => 1, -1 => 1)\n", + "V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2)\n", + "virtual_spaces = fill(V_peps, size(lattice)...)\n", + "physical_spaces = H.lattice" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Ground state search\n", + "\n", + "From this point onwards it's business as usual: Create an initial PEPS and environment\n", + "(using the symmetric spaces), specify the algorithmic parameters and optimize:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace))\n", + "gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge)\n", + "optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2)\n", + "\n", + "peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces)\n", + "env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Finally, we can optimize the PEPS with respect to the XXZ Hamiltonian. Note that the\n", + "optimization might take a while since precompilation of symmetric AD code takes longer and\n", + "because symmetric tensors do create a bit of overhead (which does pay off at larger bond\n", + "and environment dimensions):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg)\n", + "@show E;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Note that for the specified parameters $J=\\Delta=1$, we simulated the same Hamiltonian as\n", + "in the Heisenberg example. In that example, with a non-symmetric\n", + "$D=2$ PEPS simulation, we reached a ground-state energy of around $E_\\text{D=2} = -0.6625\\dots$.\n", + "Again comparing against [Sandvik's](@cite sandvik_computational_2011) accurate QMC estimate\n", + "$E_{\\text{ref}}=−0.6694421$, we see that we already got closer to the reference energy." + ], + "metadata": {} + }, + { + "cell_type": "markdown", + "source": [ + "---\n", + "\n", + "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" + ], + "metadata": {} + } + ], + "nbformat_minor": 3, + "metadata": { + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.11.4" + }, + "kernelspec": { + "name": "julia-1.11", + "display_name": "Julia 1.11.4", + "language": "julia" + } + }, + "nbformat": 4 +} diff --git a/examples/1.heisenberg/main.jl b/examples/1.heisenberg/main.jl index 796bc25d3..85b931456 100644 --- a/examples/1.heisenberg/main.jl +++ b/examples/1.heisenberg/main.jl @@ -81,7 +81,7 @@ And to control the output information, we set the `verbosity`: """ reuse_env = true -verbosity = 1; +verbosity = 3; md""" Next, we initialize a random PEPS which will be used as an initial guess for the diff --git a/examples/3.bose_hubbard/main.jl b/examples/3.bose_hubbard/main.jl index 3d7c32152..fc76c77c8 100644 --- a/examples/3.bose_hubbard/main.jl +++ b/examples/3.bose_hubbard/main.jl @@ -87,7 +87,7 @@ optimization framework in the usual way to find the ground state. So, we first s algorithms and their tolerances: """ -boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)) +boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace)) gradient_alg = (; tol=1e-6, maxiter=10, alg=:eigsolver, iterscheme=:diffgauge) optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=200, ls_maxiter=2, ls_maxfg=2); diff --git a/examples/4.xxz/main.jl b/examples/4.xxz/main.jl index c161cafea..f25afb246 100644 --- a/examples/4.xxz/main.jl +++ b/examples/4.xxz/main.jl @@ -1,6 +1,6 @@ using Markdown md""" -# Néel order in the U(1)-symmetric XXZ model +# Néel order in the $U(1)$-symmetric XXZ model Here, we want to look at a special case of the Heisenberg model, where the $x$ and $y$ couplings are equal, called the XXZ model @@ -71,7 +71,7 @@ From this point onwards it's business as usual: Create an initial PEPS and envir (using the symmetric spaces), specify the algorithmic parameters and optimize: """ -boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)) +boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace)) gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge) optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2) diff --git a/examples/5.fermi_hubbard/main.jl b/examples/5.fermi_hubbard/main.jl index 13b9294ef..17f7a3286 100644 --- a/examples/5.fermi_hubbard/main.jl +++ b/examples/5.fermi_hubbard/main.jl @@ -70,7 +70,7 @@ Again, the procedure of ground state optimization is very similar to before. Fir define all algorithmic parameters: """ -boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)) +boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace)) gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge) optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2) diff --git a/examples/7.heisenberg_su/main.jl b/examples/7.heisenberg_su/main.jl index 0235a42d3..d7620a736 100644 --- a/examples/7.heisenberg_su/main.jl +++ b/examples/7.heisenberg_su/main.jl @@ -32,7 +32,7 @@ no internal symmetries (`symm = Trivial`) or use the global $U(1)$ symmetry (`symm = U1Irrep`): """ -symm = Trivial # ∈ {Trivial, U1Irrep} +symm = Trivial ## ∈ {Trivial, U1Irrep} Nr, Nc = 2, 2 H = real(heisenberg_XYZ(ComplexF64, symm, InfiniteSquare(Nr, Nc); Jx=1, Jy=1, Jz=1)); @@ -88,7 +88,7 @@ In order to compute observable expectation values, we need to converge a CTMRG e on the evolved PEPS. Let's do so: """ -peps = InfinitePEPS(wpeps) # absorb the weights +peps = InfinitePEPS(wpeps) ## absorb the weights env₀ = CTMRGEnv(rand, Float64, peps, env_space) trscheme_env = truncerr(1e-10) & truncdim(χenv) env, = leading_boundary( @@ -109,12 +109,12 @@ directions: function compute_mags(peps::InfinitePEPS, env::CTMRGEnv) lattice = collect(space(t, 1) for t in peps.A) - # detect symmetry on physical axis + ## detect symmetry on physical axis symm = sectortype(space(peps.A[1, 1])) if symm == Trivial S_ops = real.([S_x(symm), im * S_y(symm), S_z(symm)]) elseif symm == U1Irrep - S_ops = real.([S_z(symm)]) # only Sz preserves + S_ops = real.([S_z(symm)]) ## only Sz preserves end return [ diff --git a/examples/8.ising_partition_function/main.jl b/examples/8.ising_partition_function/main.jl index 4aa2d5f0f..9eefe0e24 100644 --- a/examples/8.ising_partition_function/main.jl +++ b/examples/8.ising_partition_function/main.jl @@ -33,23 +33,23 @@ the magnetization and energy, we define the appropriate rank-4 tensors as well: function classical_ising(; beta=log(1 + sqrt(2)) / 2, J=1.0) K = beta * J - # Boltzmann weights + ## Boltzmann weights t = ComplexF64[exp(K) exp(-K); exp(-K) exp(K)] r = eigen(t) nt = r.vectors * sqrt(Diagonal(r.values)) * r.vectors - # local partition function tensor + ## local partition function tensor O = zeros(2, 2, 2, 2) O[1, 1, 1, 1] = 1 O[2, 2, 2, 2] = 1 @tensor o[-1 -2; -3 -4] := O[3 4; 2 1] * nt[-3; 3] * nt[-4; 4] * nt[-2; 2] * nt[-1; 1] - # magnetization tensor + ## magnetization tensor M = copy(O) M[2, 2, 2, 2] *= -1 @tensor m[-1 -2; -3 -4] := M[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * nt[-3; 3] * nt[-4; 4] - # bond interaction tensor and energy-per-site tensor + ## bond interaction tensor and energy-per-site tensor e = ComplexF64[-J J; J -J] .* nt @tensor e_hor[-1 -2; -3 -4] := O[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * nt[-3; 3] * e[-4; 4] @@ -57,7 +57,7 @@ function classical_ising(; beta=log(1 + sqrt(2)) / 2, J=1.0) O[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * e[-3; 3] * nt[-4; 4] e = e_hor + e_vert - # fixed tensor map space for all three + ## fixed tensor map space for all three TMS = ℂ^2 ⊗ ℂ^2 ← ℂ^2 ⊗ ℂ^2 return TensorMap(o, TMS), TensorMap(m, TMS), TensorMap(e, TMS) diff --git a/examples/Cache.toml b/examples/Cache.toml new file mode 100644 index 000000000..61dfe46fa --- /dev/null +++ b/examples/Cache.toml @@ -0,0 +1,5 @@ +["./"] +"4.xxz" = "9015d85ff87c5165142c64c7031275bab78e3d84620d2e13d0d69f054f7f9438" +"1.heisenberg" = "aefc6c22bcacdb0b5b69ff1b64e57a0f1debe8778a2d683f4efcadcfccb28b7c" +"2.boundary_mps" = "497e7b378946319995bac90abba7f3f83b95cc93e0423af6d488049861796e10" +"3.bose_hubbard" = "a4eae524b73b5795d9b13af09d31b625adcff9814f3c25cc3b001d20f12bef95" diff --git a/examples/Project.toml b/examples/Project.toml index 11aa8ec3e..cc32cd917 100644 --- a/examples/Project.toml +++ b/examples/Project.toml @@ -5,4 +5,5 @@ MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502" PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" From a04204cdb53bd8303a27ef4fff1e25c2317a0296 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 17 Apr 2025 20:07:46 +0200 Subject: [PATCH 049/113] Hide `using Markdown` in example scripts --- docs/src/examples/1.heisenberg/index.md | 2717 ++++++++++++++++++- docs/src/examples/1.heisenberg/main.ipynb | 4 +- examples/1.heisenberg/main.jl | 2 +- examples/2.boundary_mps/main.jl | 2 +- examples/3.bose_hubbard/main.jl | 2 +- examples/4.xxz/main.jl | 2 +- examples/5.fermi_hubbard/main.jl | 2 +- examples/6.hubbard_su/main.jl | 2 +- examples/7.heisenberg_su/main.jl | 2 +- examples/8.ising_partition_function/main.jl | 2 +- examples/Cache.toml | 3 - 11 files changed, 2722 insertions(+), 18 deletions(-) diff --git a/docs/src/examples/1.heisenberg/index.md b/docs/src/examples/1.heisenberg/index.md index 9c9ffc470..4fe6a633d 100644 --- a/docs/src/examples/1.heisenberg/index.md +++ b/docs/src/examples/1.heisenberg/index.md @@ -6,9 +6,6 @@ EditURL = "../../../../examples/1.heisenberg/main.jl" [![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//1.heisenberg/main.ipynb) [![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//1.heisenberg) -````julia -using Markdown -```` # [Optimizing the 2D Heisenberg model](@id examples_heisenberg) @@ -127,7 +124,7 @@ And to control the output information, we set the `verbosity`: ````julia reuse_env = true -verbosity = 1; +verbosity = 3; ```` Next, we initialize a random PEPS which will be used as an initial guess for the @@ -185,7 +182,7 @@ env₀, info_ctmrg = leading_boundary(env_random, peps₀; boundary_alg...); ```` [ Info: CTMRG init: obj = -2.749614463601e+00 +3.639628057806e+00im err = 1.0000e+00 -[ Info: CTMRG conv 27: obj = +9.727103564786e+00 err = 2.6201184615e-11 time = 7.47 sec +[ Info: CTMRG conv 27: obj = +9.727103564786e+00 err = 2.6201184615e-11 time = 6.82 sec ```` @@ -214,12 +211,2722 @@ peps, env, E, info_opt = fixedpoint( ```` ```` +[ Info: CTMRG init: obj = +2.458081979447e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +2.458081979447e-01 err = 1.0702487618e-11 time = 0.01 sec +[ Info: CTMRG 2: obj = +2.458081979447e-01 err = 3.6204359828e-12 time = 0.01 sec +[ Info: CTMRG 3: obj = +2.458081979447e-01 err = 1.0761692541e-12 time = 0.01 sec +[ Info: CTMRG conv 4: obj = +2.458081979447e-01 err = 3.6674259117e-13 time = 0.02 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.88e-01 +[ Info: BiCGStab linsolve in iteration 1: normres = 2.06e-02 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 5.68e-03 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.95e-03 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 1.15e-03 +[ Info: BiCGStab linsolve in iteration 3: normres = 3.44e-04 +[ Info: BiCGStab linsolve in iteration 3.5: normres = 1.06e-04 +[ Info: BiCGStab linsolve in iteration 4: normres = 2.94e-05 +[ Info: BiCGStab linsolve in iteration 4.5: normres = 3.91e-06 +[ Info: BiCGStab linsolve in iteration 5: normres = 1.17e-06 +[ Info: BiCGStab linsolve in iteration 5.5: normres = 1.19e-06 +┌ Info: BiCGStab linsolve converged at iteration 6: +│ * norm of residual = 3.55e-07 +└ * number of operations = 14 +[ Info: LBFGS: initializing with f = 0.000601645310, ‖∇f‖ = 9.3547e-01 ┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Float64}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 +[ Info: CTMRG init: obj = +2.466747864702e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +2.467202300719e-01 err = 5.1468672546e-03 time = 0.01 sec +[ Info: CTMRG 2: obj = +2.467177582954e-01 err = 1.0248503896e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +2.467174847646e-01 err = 7.0606560014e-03 time = 0.00 sec +[ Info: CTMRG 4: obj = +2.467175566543e-01 err = 1.7544501818e-03 time = 0.01 sec +[ Info: CTMRG 5: obj = +2.467175535135e-01 err = 7.6336938372e-04 time = 0.01 sec +[ Info: CTMRG 6: obj = +2.467175523269e-01 err = 3.2948274479e-04 time = 0.01 sec +[ Info: CTMRG 7: obj = +2.467175525681e-01 err = 6.8853494985e-05 time = 0.02 sec +[ Info: CTMRG 8: obj = +2.467175526511e-01 err = 3.5139804357e-05 time = 0.01 sec +[ Info: CTMRG 9: obj = +2.467175526675e-01 err = 1.3695745603e-05 time = 0.01 sec +[ Info: CTMRG 10: obj = +2.467175526653e-01 err = 3.0592132984e-06 time = 0.01 sec +[ Info: CTMRG 11: obj = +2.467175526626e-01 err = 9.6314251491e-07 time = 0.01 sec +[ Info: CTMRG 12: obj = +2.467175526615e-01 err = 4.7338928574e-07 time = 0.01 sec +[ Info: CTMRG 13: obj = +2.467175526615e-01 err = 1.4856431007e-07 time = 0.01 sec +[ Info: CTMRG 14: obj = +2.467175526616e-01 err = 3.2966310155e-08 time = 0.01 sec +[ Info: CTMRG 15: obj = +2.467175526617e-01 err = 1.7362459887e-08 time = 0.01 sec +[ Info: CTMRG 16: obj = +2.467175526617e-01 err = 6.3743957795e-09 time = 0.01 sec +[ Info: CTMRG 17: obj = +2.467175526617e-01 err = 1.4125953209e-09 time = 0.01 sec +[ Info: CTMRG 18: obj = +2.467175526617e-01 err = 5.2856033100e-10 time = 0.01 sec +[ Info: CTMRG 19: obj = +2.467175526617e-01 err = 2.6594624172e-10 time = 0.01 sec +[ Info: CTMRG conv 20: obj = +2.467175526617e-01 err = 6.9252688655e-11 time = 0.12 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.99e-01 +[ Info: BiCGStab linsolve in iteration 1: normres = 2.23e-02 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 6.96e-03 +[ Info: BiCGStab linsolve in iteration 2: normres = 2.33e-03 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 1.63e-03 +[ Info: BiCGStab linsolve in iteration 3: normres = 4.84e-04 +[ Info: BiCGStab linsolve in iteration 3.5: normres = 1.54e-04 +[ Info: BiCGStab linsolve in iteration 4: normres = 4.61e-05 +[ Info: BiCGStab linsolve in iteration 4.5: normres = 3.99e-06 +[ Info: BiCGStab linsolve in iteration 5: normres = 1.06e-06 +┌ Info: BiCGStab linsolve converged at iteration 5.5: +│ * norm of residual = 4.99e-07 +└ * number of operations = 13 +[ Info: CTMRG init: obj = +2.504989231566e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +2.518577636537e-01 err = 2.2195315784e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +2.519084970968e-01 err = 3.5708295274e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +2.518988455424e-01 err = 3.1268882475e-02 time = 0.01 sec +[ Info: CTMRG 4: obj = +2.519002749932e-01 err = 1.3358078973e-02 time = 0.01 sec +[ Info: CTMRG 5: obj = +2.519007227276e-01 err = 4.9297438688e-03 time = 0.01 sec +[ Info: CTMRG 6: obj = +2.519007313294e-01 err = 2.0293072275e-03 time = 0.01 sec +[ Info: CTMRG 7: obj = +2.519007274334e-01 err = 5.6475980506e-04 time = 0.01 sec +[ Info: CTMRG 8: obj = +2.519007280100e-01 err = 1.5819533038e-04 time = 0.01 sec +[ Info: CTMRG 9: obj = +2.519007283638e-01 err = 9.2072757112e-05 time = 0.01 sec +[ Info: CTMRG 10: obj = +2.519007284107e-01 err = 4.0322529795e-05 time = 0.01 sec +[ Info: CTMRG 11: obj = +2.519007284073e-01 err = 1.1668112409e-05 time = 0.01 sec +[ Info: CTMRG 12: obj = +2.519007283947e-01 err = 3.0908008114e-06 time = 0.01 sec +[ Info: CTMRG 13: obj = +2.519007283902e-01 err = 1.2771504159e-06 time = 0.01 sec +[ Info: CTMRG 14: obj = +2.519007283886e-01 err = 5.2562459654e-07 time = 0.01 sec +[ Info: CTMRG 15: obj = +2.519007283886e-01 err = 1.9526028301e-07 time = 0.01 sec +[ Info: CTMRG 16: obj = +2.519007283887e-01 err = 4.9184396270e-08 time = 0.01 sec +[ Info: CTMRG 17: obj = +2.519007283888e-01 err = 2.7371205699e-08 time = 0.01 sec +[ Info: CTMRG 18: obj = +2.519007283888e-01 err = 1.0841608326e-08 time = 0.01 sec +[ Info: CTMRG 19: obj = +2.519007283888e-01 err = 3.4538640055e-09 time = 0.01 sec +[ Info: CTMRG 20: obj = +2.519007283888e-01 err = 1.0564151881e-09 time = 0.01 sec +[ Info: CTMRG 21: obj = +2.519007283888e-01 err = 4.6104335122e-10 time = 0.01 sec +[ Info: CTMRG 22: obj = +2.519007283888e-01 err = 1.8122934616e-10 time = 0.01 sec +[ Info: CTMRG conv 23: obj = +2.519007283888e-01 err = 7.0319174446e-11 time = 0.13 sec +[ Info: BiCGStab linsolve starts with norm of residual = 3.83e-01 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.09e-02 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.84e-02 +[ Info: BiCGStab linsolve in iteration 2: normres = 6.20e-03 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 6.03e-03 +[ Info: BiCGStab linsolve in iteration 3: normres = 1.67e-03 +[ Info: BiCGStab linsolve in iteration 3.5: normres = 7.47e-04 +[ Info: BiCGStab linsolve in iteration 4: normres = 1.80e-04 +[ Info: BiCGStab linsolve in iteration 4.5: normres = 1.21e-04 +[ Info: BiCGStab linsolve in iteration 5: normres = 5.27e-05 +[ Info: BiCGStab linsolve in iteration 5.5: normres = 3.66e-06 +[ Info: BiCGStab linsolve in iteration 6: normres = 1.22e-06 +┌ Info: BiCGStab linsolve converged at iteration 6.5: +│ * norm of residual = 6.74e-08 +└ * number of operations = 15 +[ Info: CTMRG init: obj = +2.773142477636e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +3.280961996908e-01 err = 1.1119405070e-01 time = 0.01 sec +[ Info: CTMRG 2: obj = +3.408862747463e-01 err = 1.1817777907e-01 time = 0.01 sec +[ Info: CTMRG 3: obj = +3.422468241365e-01 err = 8.4221966888e-02 time = 0.01 sec +[ Info: CTMRG 4: obj = +3.423550758606e-01 err = 5.4661495617e-02 time = 0.01 sec +[ Info: CTMRG 5: obj = +3.423637658895e-01 err = 2.0305722305e-02 time = 0.01 sec +[ Info: CTMRG 6: obj = +3.423647903142e-01 err = 5.0566947094e-03 time = 0.01 sec +[ Info: CTMRG 7: obj = +3.423649197863e-01 err = 2.1393494537e-03 time = 0.01 sec +[ Info: CTMRG 8: obj = +3.423649288336e-01 err = 7.1326038559e-04 time = 0.01 sec +[ Info: CTMRG 9: obj = +3.423649290144e-01 err = 1.8057996916e-04 time = 0.01 sec +[ Info: CTMRG 10: obj = +3.423649290717e-01 err = 9.0089521941e-05 time = 0.00 sec +[ Info: CTMRG 11: obj = +3.423649290982e-01 err = 2.3300941438e-05 time = 0.01 sec +[ Info: CTMRG 12: obj = +3.423649291002e-01 err = 7.8791728239e-06 time = 0.01 sec +[ Info: CTMRG 13: obj = +3.423649290993e-01 err = 3.2204397272e-06 time = 0.00 sec +[ Info: CTMRG 14: obj = +3.423649290996e-01 err = 8.9775415590e-07 time = 0.00 sec +[ Info: CTMRG 15: obj = +3.423649290995e-01 err = 5.3793169894e-07 time = 0.01 sec +[ Info: CTMRG 16: obj = +3.423649290995e-01 err = 1.5592179650e-07 time = 0.01 sec +[ Info: CTMRG 17: obj = +3.423649290995e-01 err = 3.8856151006e-08 time = 0.00 sec +[ Info: CTMRG 18: obj = +3.423649290995e-01 err = 1.9229756162e-08 time = 0.01 sec +[ Info: CTMRG 19: obj = +3.423649290995e-01 err = 9.5951149575e-09 time = 0.01 sec +[ Info: CTMRG 20: obj = +3.423649290995e-01 err = 3.6585761634e-09 time = 0.00 sec +[ Info: CTMRG 21: obj = +3.423649290995e-01 err = 8.5616189166e-10 time = 0.01 sec +[ Info: CTMRG 22: obj = +3.423649290995e-01 err = 3.0800030135e-10 time = 0.01 sec +[ Info: CTMRG 23: obj = +3.423649290995e-01 err = 2.0405422214e-10 time = 0.01 sec +[ Info: CTMRG conv 24: obj = +3.423649290995e-01 err = 7.9350588207e-11 time = 0.13 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.81e-01 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.54e-02 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 7.42e-03 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.75e-03 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 2.08e-04 +[ Info: BiCGStab linsolve in iteration 3: normres = 6.29e-05 +[ Info: BiCGStab linsolve in iteration 3.5: normres = 1.68e-05 +[ Info: BiCGStab linsolve in iteration 4: normres = 5.40e-06 +[ Info: BiCGStab linsolve in iteration 4.5: normres = 1.48e-05 +[ Info: BiCGStab linsolve in iteration 5: normres = 3.78e-06 +┌ Info: BiCGStab linsolve converged at iteration 5.5: +│ * norm of residual = 1.81e-08 +└ * number of operations = 13 +[ Info: CTMRG init: obj = +4.355241324960e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.049671855166e-01 err = 3.4977566014e-01 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.045100850086e-01 err = 2.0108294005e-01 time = 0.01 sec +[ Info: CTMRG 3: obj = +5.044874876263e-01 err = 2.1035795651e-01 time = 0.01 sec +[ Info: CTMRG 4: obj = +5.044881606001e-01 err = 1.9089865698e-01 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.044882185306e-01 err = 2.0042800366e-02 time = 0.01 sec +[ Info: CTMRG 6: obj = +5.044882217392e-01 err = 5.5656824031e-03 time = 0.01 sec +[ Info: CTMRG 7: obj = +5.044882218988e-01 err = 5.7048147285e-04 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.044882219065e-01 err = 2.3007944270e-04 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.044882219068e-01 err = 3.5688381042e-05 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.044882219068e-01 err = 9.5580911901e-06 time = 0.01 sec +[ Info: CTMRG 11: obj = +5.044882219068e-01 err = 1.8142608163e-06 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.044882219068e-01 err = 4.2890533382e-07 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.044882219068e-01 err = 8.8210060575e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.044882219068e-01 err = 1.9750966814e-08 time = 0.01 sec +[ Info: CTMRG 15: obj = +5.044882219068e-01 err = 4.1972035907e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +5.044882219068e-01 err = 9.2044965770e-10 time = 0.00 sec +[ Info: CTMRG 17: obj = +5.044882219068e-01 err = 1.9955644891e-10 time = 0.00 sec +[ Info: CTMRG conv 18: obj = +5.044882219068e-01 err = 4.2217186903e-11 time = 0.10 sec +[ Info: BiCGStab linsolve starts with norm of residual = 8.51e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.54e-03 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.48e-04 +[ Info: BiCGStab linsolve in iteration 2: normres = 4.23e-05 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 8.80e-07 +└ * number of operations = 7 +[ Info: CTMRG init: obj = +3.422319647713e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.059235206244e-01 err = 2.0255578684e-01 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.112745931363e-01 err = 2.0818285390e-01 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.115117557626e-01 err = 2.3880984707e-01 time = 0.01 sec +[ Info: CTMRG 4: obj = +5.115093847498e-01 err = 1.0893440842e-01 time = 0.01 sec +[ Info: CTMRG 5: obj = +5.115083695228e-01 err = 1.7611497477e-02 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.115083777318e-01 err = 2.4620917957e-03 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.115083844066e-01 err = 7.4826522225e-04 time = 0.01 sec +[ Info: CTMRG 8: obj = +5.115083844800e-01 err = 2.8878212993e-04 time = 0.01 sec +[ Info: CTMRG 9: obj = +5.115083844399e-01 err = 4.7299635369e-05 time = 0.01 sec +[ Info: CTMRG 10: obj = +5.115083844387e-01 err = 1.0303058937e-05 time = 0.01 sec +[ Info: CTMRG 11: obj = +5.115083844390e-01 err = 3.2840305765e-06 time = 0.01 sec +[ Info: CTMRG 12: obj = +5.115083844390e-01 err = 1.3182904640e-06 time = 0.01 sec +[ Info: CTMRG 13: obj = +5.115083844390e-01 err = 3.1656887010e-07 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.115083844390e-01 err = 5.9372142563e-08 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.115083844390e-01 err = 1.6914997756e-08 time = 0.00 sec +[ Info: CTMRG 16: obj = +5.115083844390e-01 err = 7.6918589147e-09 time = 0.00 sec +[ Info: CTMRG 17: obj = +5.115083844390e-01 err = 2.1726348156e-09 time = 0.00 sec +[ Info: CTMRG 18: obj = +5.115083844390e-01 err = 4.3095702532e-10 time = 0.01 sec +[ Info: CTMRG conv 19: obj = +5.115083844390e-01 err = 9.0095611039e-11 time = 0.12 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.00e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 3.15e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 9.17e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.40e-05 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 2.92e-06 +┌ Info: BiCGStab linsolve converged at iteration 3: +│ * norm of residual = 4.66e-07 +└ * number of operations = 8 +[ Info: LBFGS: iter 1, time 732.46 s: f = -0.489796540851, ‖∇f‖ = 6.0022e-01, α = 5.94e+01, m = 0, nfg = 5 ┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 +[ Info: CTMRG init: obj = +5.640950274181e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.664827046284e-01 err = 8.5541943898e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.665188272848e-01 err = 9.5361394153e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.665185518575e-01 err = 4.9906223331e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.665185750436e-01 err = 3.9675306336e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.665185766900e-01 err = 9.9772842181e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.665185767074e-01 err = 1.8624251343e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.665185767053e-01 err = 2.4949133561e-05 time = 0.01 sec +[ Info: CTMRG 8: obj = +5.665185767052e-01 err = 3.5158447123e-06 time = 0.01 sec +[ Info: CTMRG 9: obj = +5.665185767052e-01 err = 7.6646557758e-07 time = 0.01 sec +[ Info: CTMRG 10: obj = +5.665185767052e-01 err = 2.6432871984e-07 time = 0.02 sec +[ Info: CTMRG 11: obj = +5.665185767052e-01 err = 6.1799005969e-08 time = 0.01 sec +[ Info: CTMRG 12: obj = +5.665185767052e-01 err = 1.0719167757e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.665185767052e-01 err = 1.2598877275e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.665185767052e-01 err = 2.3249788335e-10 time = 0.00 sec +[ Info: CTMRG conv 15: obj = +5.665185767052e-01 err = 6.4079819106e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 3.90e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 2.80e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.14e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 3.71e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 8.35e-07 +└ * number of operations = 7 +[ Info: CTMRG init: obj = +5.255414209869e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.258510285849e-01 err = 2.3155134355e-02 time = 0.06 sec +[ Info: CTMRG 2: obj = +5.258515618555e-01 err = 2.5067820962e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +5.258515132282e-01 err = 1.2983127504e-02 time = 0.01 sec +[ Info: CTMRG 4: obj = +5.258515440844e-01 err = 2.2122995624e-03 time = 0.01 sec +[ Info: CTMRG 5: obj = +5.258515454127e-01 err = 8.3607529323e-04 time = 0.25 sec +[ Info: CTMRG 6: obj = +5.258515453052e-01 err = 9.4699099439e-05 time = 0.01 sec +[ Info: CTMRG 7: obj = +5.258515452959e-01 err = 3.4372419957e-05 time = 0.01 sec +[ Info: CTMRG 8: obj = +5.258515452961e-01 err = 1.4651733977e-05 time = 0.01 sec +[ Info: CTMRG 9: obj = +5.258515452961e-01 err = 3.4728653268e-06 time = 0.01 sec +[ Info: CTMRG 10: obj = +5.258515452962e-01 err = 3.9807656440e-07 time = 0.01 sec +[ Info: CTMRG 11: obj = +5.258515452961e-01 err = 9.4139336219e-08 time = 0.01 sec +[ Info: CTMRG 12: obj = +5.258515452962e-01 err = 5.8812312879e-08 time = 0.01 sec +[ Info: CTMRG 13: obj = +5.258515452962e-01 err = 1.8138314946e-08 time = 0.01 sec +[ Info: CTMRG 14: obj = +5.258515452962e-01 err = 3.4054119944e-09 time = 0.01 sec +[ Info: CTMRG 15: obj = +5.258515452962e-01 err = 4.4531114588e-10 time = 0.01 sec +[ Info: CTMRG 16: obj = +5.258515452961e-01 err = 1.6854097708e-10 time = 0.01 sec +[ Info: CTMRG conv 17: obj = +5.258515452962e-01 err = 7.6966581908e-11 time = 0.39 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.05e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 2.65e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 8.86e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.40e-05 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 5.17e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 2, time 734.49 s: f = -0.501984649868, ‖∇f‖ = 5.3739e-01, α = 2.80e-01, m = 1, nfg = 2 +[ Info: CTMRG init: obj = +4.968273104592e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.962307463119e-01 err = 4.3932885704e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +4.962149486894e-01 err = 3.0548043697e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.962171150065e-01 err = 1.4274310610e-02 time = 0.01 sec +[ Info: CTMRG 4: obj = +4.962172915061e-01 err = 2.2606808105e-03 time = 0.01 sec +[ Info: CTMRG 5: obj = +4.962172843461e-01 err = 1.8231907969e-03 time = 0.01 sec +[ Info: CTMRG 6: obj = +4.962172829927e-01 err = 4.1053122318e-04 time = 0.01 sec +[ Info: CTMRG 7: obj = +4.962172829934e-01 err = 4.4027754764e-05 time = 0.01 sec +[ Info: CTMRG 8: obj = +4.962172830022e-01 err = 1.8670932046e-05 time = 0.01 sec +[ Info: CTMRG 9: obj = +4.962172830025e-01 err = 7.2998707694e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.962172830024e-01 err = 1.7299831046e-06 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.962172830024e-01 err = 3.1059078477e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.962172830024e-01 err = 9.7390964221e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.962172830024e-01 err = 4.7426002166e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.962172830024e-01 err = 1.4007557897e-08 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.962172830024e-01 err = 2.5859635083e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.962172830024e-01 err = 5.3995702982e-10 time = 0.00 sec +[ Info: CTMRG 17: obj = +4.962172830024e-01 err = 2.3838227266e-10 time = 0.00 sec +[ Info: CTMRG conv 18: obj = +4.962172830024e-01 err = 9.3742778827e-11 time = 0.11 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.58e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.39e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.04e-04 +[ Info: BiCGStab linsolve in iteration 2: normres = 3.85e-05 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 2.38e-06 +┌ Info: BiCGStab linsolve converged at iteration 3: +│ * norm of residual = 4.05e-07 +└ * number of operations = 8 +[ Info: LBFGS: iter 3, time 734.72 s: f = -0.523163971924, ‖∇f‖ = 3.9927e-01, α = 1.00e+00, m = 2, nfg = 1 +[ Info: CTMRG init: obj = +3.562598080445e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +3.596831790076e-01 err = 2.1723962944e-01 time = 0.00 sec +[ Info: CTMRG 2: obj = +3.595275896187e-01 err = 1.3970935615e-01 time = 0.00 sec +[ Info: CTMRG 3: obj = +3.595245983237e-01 err = 6.7542524698e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +3.595238759998e-01 err = 2.1141802791e-02 time = 0.00 sec +[ Info: CTMRG 5: obj = +3.595232562709e-01 err = 7.4741289874e-03 time = 0.01 sec +[ Info: CTMRG 6: obj = +3.595231453278e-01 err = 1.6565241775e-03 time = 0.00 sec +[ Info: CTMRG 7: obj = +3.595231340288e-01 err = 5.2796105893e-04 time = 0.00 sec +[ Info: CTMRG 8: obj = +3.595231328369e-01 err = 2.0585129130e-04 time = 0.00 sec +[ Info: CTMRG 9: obj = +3.595231326390e-01 err = 6.8342124066e-05 time = 0.00 sec +[ Info: CTMRG 10: obj = +3.595231326074e-01 err = 2.5627513069e-05 time = 0.00 sec +[ Info: CTMRG 11: obj = +3.595231326030e-01 err = 9.3034807248e-06 time = 0.00 sec +[ Info: CTMRG 12: obj = +3.595231326025e-01 err = 3.5835141132e-06 time = 0.00 sec +[ Info: CTMRG 13: obj = +3.595231326024e-01 err = 1.3899078677e-06 time = 0.00 sec +[ Info: CTMRG 14: obj = +3.595231326024e-01 err = 5.1505027780e-07 time = 0.00 sec +[ Info: CTMRG 15: obj = +3.595231326024e-01 err = 1.9089200667e-07 time = 0.00 sec +[ Info: CTMRG 16: obj = +3.595231326024e-01 err = 7.0182635216e-08 time = 0.00 sec +[ Info: CTMRG 17: obj = +3.595231326024e-01 err = 2.5505438905e-08 time = 0.00 sec +[ Info: CTMRG 18: obj = +3.595231326024e-01 err = 9.3197226471e-09 time = 0.02 sec +[ Info: CTMRG 19: obj = +3.595231326024e-01 err = 3.4246060196e-09 time = 0.01 sec +[ Info: CTMRG 20: obj = +3.595231326024e-01 err = 1.2717678278e-09 time = 0.01 sec +[ Info: CTMRG 21: obj = +3.595231326024e-01 err = 4.7430899057e-10 time = 0.01 sec +[ Info: CTMRG 22: obj = +3.595231326024e-01 err = 1.7723079135e-10 time = 0.01 sec +[ Info: CTMRG conv 23: obj = +3.595231326024e-01 err = 6.5988037074e-11 time = 0.13 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.55e-01 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.22e-02 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.73e-03 +[ Info: BiCGStab linsolve in iteration 2: normres = 4.32e-04 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 1.56e-04 +[ Info: BiCGStab linsolve in iteration 3: normres = 2.89e-05 +[ Info: BiCGStab linsolve in iteration 3.5: normres = 6.28e-03 +[ Info: BiCGStab linsolve in iteration 4: normres = 1.28e-03 +┌ Info: BiCGStab linsolve converged at iteration 4.5: +│ * norm of residual = 5.31e-08 +└ * number of operations = 11 +[ Info: CTMRG init: obj = +4.680044618365e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.678878042342e-01 err = 4.0067386290e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +4.678751770234e-01 err = 3.1844803872e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.678757002284e-01 err = 2.3390575547e-02 time = 0.01 sec +[ Info: CTMRG 4: obj = +4.678758088696e-01 err = 2.3333366616e-03 time = 0.01 sec +[ Info: CTMRG 5: obj = +4.678758087099e-01 err = 8.7270862010e-04 time = 0.01 sec +[ Info: CTMRG 6: obj = +4.678758078482e-01 err = 2.0206487957e-04 time = 0.01 sec +[ Info: CTMRG 7: obj = +4.678758078169e-01 err = 4.1103913248e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.678758078226e-01 err = 1.0481808577e-05 time = 0.01 sec +[ Info: CTMRG 9: obj = +4.678758078231e-01 err = 4.2077137369e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.678758078231e-01 err = 1.4649754992e-06 time = 0.01 sec +[ Info: CTMRG 11: obj = +4.678758078231e-01 err = 4.1264370851e-07 time = 0.01 sec +[ Info: CTMRG 12: obj = +4.678758078231e-01 err = 1.0850345284e-07 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.678758078231e-01 err = 2.7381579388e-08 time = 0.01 sec +[ Info: CTMRG 14: obj = +4.678758078231e-01 err = 1.0813919781e-08 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.678758078231e-01 err = 3.4304424306e-09 time = 0.01 sec +[ Info: CTMRG 16: obj = +4.678758078231e-01 err = 9.2798340115e-10 time = 0.00 sec +[ Info: CTMRG 17: obj = +4.678758078231e-01 err = 2.3475738746e-10 time = 0.00 sec +[ Info: CTMRG conv 18: obj = +4.678758078231e-01 err = 7.2973345454e-11 time = 0.10 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.61e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 8.57e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.11e-03 +[ Info: BiCGStab linsolve in iteration 2: normres = 2.36e-04 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 5.22e-06 +[ Info: BiCGStab linsolve in iteration 3: normres = 1.07e-06 +┌ Info: BiCGStab linsolve converged at iteration 3.5: +│ * norm of residual = 1.07e-07 +└ * number of operations = 9 +[ Info: LBFGS: iter 4, time 735.25 s: f = -0.538654390178, ‖∇f‖ = 4.1552e-01, α = 2.29e-01, m = 3, nfg = 2 +[ Info: CTMRG init: obj = +1.361090548391e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +2.492681304638e-01 err = 2.7633751803e-01 time = 0.01 sec +[ Info: CTMRG 2: obj = +2.729788177171e-01 err = 3.3254602721e-01 time = 0.01 sec +[ Info: CTMRG 3: obj = +2.771967161921e-01 err = 1.2871942679e-01 time = 0.01 sec +[ Info: CTMRG 4: obj = +2.779581748526e-01 err = 8.4067728014e-02 time = 0.01 sec +[ Info: CTMRG 5: obj = +2.780581629514e-01 err = 6.0831204990e-02 time = 0.01 sec +[ Info: CTMRG 6: obj = +2.780474606214e-01 err = 5.6932247083e-02 time = 0.01 sec +[ Info: CTMRG 7: obj = +2.780302531384e-01 err = 3.4222154914e-02 time = 0.01 sec +[ Info: CTMRG 8: obj = +2.780200353034e-01 err = 3.3736099111e-02 time = 0.01 sec +[ Info: CTMRG 9: obj = +2.780150195975e-01 err = 2.1491380928e-02 time = 0.01 sec +[ Info: CTMRG 10: obj = +2.780127868273e-01 err = 1.6640500825e-02 time = 0.01 sec +[ Info: CTMRG 11: obj = +2.780118071149e-01 err = 1.0801060671e-02 time = 0.01 sec +[ Info: CTMRG 12: obj = +2.780114025117e-01 err = 7.3818436743e-03 time = 0.01 sec +[ Info: CTMRG 13: obj = +2.780112272568e-01 err = 4.7841431573e-03 time = 0.01 sec +[ Info: CTMRG 14: obj = +2.780111585913e-01 err = 3.1469231082e-03 time = 0.01 sec +[ Info: CTMRG 15: obj = +2.780111276329e-01 err = 2.0310417700e-03 time = 0.01 sec +[ Info: CTMRG 16: obj = +2.780111165486e-01 err = 1.3193954295e-03 time = 0.01 sec +[ Info: CTMRG 17: obj = +2.780111109125e-01 err = 8.4931855133e-04 time = 0.01 sec +[ Info: CTMRG 18: obj = +2.780111092872e-01 err = 5.4832384428e-04 time = 0.01 sec +[ Info: CTMRG 19: obj = +2.780111081752e-01 err = 3.5236207484e-04 time = 0.01 sec +[ Info: CTMRG 20: obj = +2.780111080036e-01 err = 2.2671813449e-04 time = 0.01 sec +[ Info: CTMRG 21: obj = +2.780111077502e-01 err = 1.4552348057e-04 time = 0.01 sec +[ Info: CTMRG 22: obj = +2.780111077635e-01 err = 9.3454119058e-05 time = 0.01 sec +[ Info: CTMRG 23: obj = +2.780111076937e-01 err = 5.9938526146e-05 time = 0.01 sec +[ Info: CTMRG 24: obj = +2.780111077133e-01 err = 3.8449675674e-05 time = 0.01 sec +[ Info: CTMRG 25: obj = +2.780111076904e-01 err = 2.4647795488e-05 time = 0.01 sec +[ Info: CTMRG 26: obj = +2.780111077008e-01 err = 1.5801059838e-05 time = 0.01 sec +[ Info: CTMRG 27: obj = +2.780111076924e-01 err = 1.0125795229e-05 time = 0.01 sec +[ Info: CTMRG 28: obj = +2.780111076971e-01 err = 6.4889439047e-06 time = 0.01 sec +[ Info: CTMRG 29: obj = +2.780111076938e-01 err = 4.1574499013e-06 time = 0.01 sec +[ Info: CTMRG 30: obj = +2.780111076958e-01 err = 2.6636405300e-06 time = 0.01 sec +[ Info: CTMRG 31: obj = +2.780111076945e-01 err = 1.7063672352e-06 time = 0.01 sec +[ Info: CTMRG 32: obj = +2.780111076953e-01 err = 1.0931104129e-06 time = 0.01 sec +[ Info: CTMRG 33: obj = +2.780111076947e-01 err = 7.0020655988e-07 time = 0.01 sec +[ Info: CTMRG 34: obj = +2.780111076951e-01 err = 4.4852201369e-07 time = 0.01 sec +[ Info: CTMRG 35: obj = +2.780111076949e-01 err = 2.8729264916e-07 time = 0.01 sec +[ Info: CTMRG 36: obj = +2.780111076950e-01 err = 1.8401865610e-07 time = 0.01 sec +[ Info: CTMRG 37: obj = +2.780111076949e-01 err = 1.1786625616e-07 time = 0.01 sec +[ Info: CTMRG 38: obj = +2.780111076950e-01 err = 7.5494400898e-08 time = 0.01 sec +[ Info: CTMRG 39: obj = +2.780111076949e-01 err = 4.8354217077e-08 time = 0.01 sec +[ Info: CTMRG 40: obj = +2.780111076950e-01 err = 3.0970795192e-08 time = 0.01 sec +[ Info: CTMRG 41: obj = +2.780111076949e-01 err = 1.9836592332e-08 time = 0.01 sec +[ Info: CTMRG 42: obj = +2.780111076950e-01 err = 1.2705178147e-08 time = 0.01 sec +[ Info: CTMRG 43: obj = +2.780111076949e-01 err = 8.1375289079e-09 time = 0.01 sec +[ Info: CTMRG 44: obj = +2.780111076949e-01 err = 5.2119907250e-09 time = 0.01 sec +[ Info: CTMRG 45: obj = +2.780111076949e-01 err = 3.3382079689e-09 time = 0.01 sec +[ Info: CTMRG 46: obj = +2.780111076949e-01 err = 2.1380735358e-09 time = 0.01 sec +[ Info: CTMRG 47: obj = +2.780111076949e-01 err = 1.3694050211e-09 time = 0.01 sec +[ Info: CTMRG 48: obj = +2.780111076949e-01 err = 8.7708492359e-10 time = 0.01 sec +[ Info: CTMRG 49: obj = +2.780111076949e-01 err = 5.6175862626e-10 time = 0.01 sec +[ Info: CTMRG 50: obj = +2.780111076949e-01 err = 3.5979756862e-10 time = 0.01 sec +[ Info: CTMRG 51: obj = +2.780111076949e-01 err = 2.3044300143e-10 time = 0.01 sec +[ Info: CTMRG 52: obj = +2.780111076949e-01 err = 1.4759372169e-10 time = 0.01 sec +[ Info: CTMRG conv 53: obj = +2.780111076949e-01 err = 9.4533846806e-11 time = 0.29 sec +[ Info: BiCGStab linsolve starts with norm of residual = 3.29e-01 +[ Info: BiCGStab linsolve in iteration 1: normres = 5.56e-02 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.21e-02 +[ Info: BiCGStab linsolve in iteration 2: normres = 5.92e-03 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 3.69e-03 +[ Info: BiCGStab linsolve in iteration 3: normres = 1.54e-03 +[ Info: BiCGStab linsolve in iteration 3.5: normres = 1.47e-04 +[ Info: BiCGStab linsolve in iteration 4: normres = 3.29e-05 +[ Info: BiCGStab linsolve in iteration 4.5: normres = 1.35e-05 +[ Info: BiCGStab linsolve in iteration 5: normres = 2.53e-06 +┌ Info: BiCGStab linsolve converged at iteration 5.5: +│ * norm of residual = 5.01e-07 +└ * number of operations = 13 +[ Info: CTMRG init: obj = +1.747462633461e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +2.718493922832e-01 err = 2.7890398206e-01 time = 0.01 sec +[ Info: CTMRG 2: obj = +2.796442514830e-01 err = 3.4014977169e-01 time = 0.01 sec +[ Info: CTMRG 3: obj = +2.803869164174e-01 err = 9.5922304517e-02 time = 0.01 sec +[ Info: CTMRG 4: obj = +2.803706435718e-01 err = 6.6406375999e-02 time = 0.01 sec +[ Info: CTMRG 5: obj = +2.803183420351e-01 err = 4.4063125080e-02 time = 0.01 sec +[ Info: CTMRG 6: obj = +2.802922722169e-01 err = 4.0155182717e-02 time = 0.01 sec +[ Info: CTMRG 7: obj = +2.802817958119e-01 err = 2.1359492680e-02 time = 0.01 sec +[ Info: CTMRG 8: obj = +2.802779179079e-01 err = 1.3997059564e-02 time = 0.01 sec +[ Info: CTMRG 9: obj = +2.802765110153e-01 err = 8.0592501297e-03 time = 0.01 sec +[ Info: CTMRG 10: obj = +2.802760168664e-01 err = 5.0941094049e-03 time = 0.01 sec +[ Info: CTMRG 11: obj = +2.802758392735e-01 err = 3.0805114137e-03 time = 0.00 sec +[ Info: CTMRG 12: obj = +2.802757787064e-01 err = 1.8814415892e-03 time = 0.01 sec +[ Info: CTMRG 13: obj = +2.802757563217e-01 err = 1.1265596873e-03 time = 0.01 sec +[ Info: CTMRG 14: obj = +2.802757491228e-01 err = 6.7670929086e-04 time = 0.01 sec +[ Info: CTMRG 15: obj = +2.802757462098e-01 err = 4.0309421683e-04 time = 0.01 sec +[ Info: CTMRG 16: obj = +2.802757454171e-01 err = 2.4028400007e-04 time = 0.01 sec +[ Info: CTMRG 17: obj = +2.802757450036e-01 err = 1.4273046611e-04 time = 0.01 sec +[ Info: CTMRG 18: obj = +2.802757449388e-01 err = 8.4783470625e-05 time = 0.01 sec +[ Info: CTMRG 19: obj = +2.802757448686e-01 err = 5.0287710298e-05 time = 0.01 sec +[ Info: CTMRG 20: obj = +2.802757448720e-01 err = 2.9823338887e-05 time = 0.00 sec +[ Info: CTMRG 21: obj = +2.802757448566e-01 err = 1.7675631746e-05 time = 0.01 sec +[ Info: CTMRG 22: obj = +2.802757448611e-01 err = 1.0474783786e-05 time = 0.01 sec +[ Info: CTMRG 23: obj = +2.802757448568e-01 err = 6.2057598499e-06 time = 0.00 sec +[ Info: CTMRG 24: obj = +2.802757448588e-01 err = 3.6763227068e-06 time = 0.01 sec +[ Info: CTMRG 25: obj = +2.802757448574e-01 err = 2.1776040456e-06 time = 0.01 sec +[ Info: CTMRG 26: obj = +2.802757448581e-01 err = 1.2898116978e-06 time = 0.01 sec +[ Info: CTMRG 27: obj = +2.802757448577e-01 err = 7.6392306184e-07 time = 0.00 sec +[ Info: CTMRG 28: obj = +2.802757448579e-01 err = 4.5244238301e-07 time = 0.01 sec +[ Info: CTMRG 29: obj = +2.802757448578e-01 err = 2.6795749960e-07 time = 0.01 sec +[ Info: CTMRG 30: obj = +2.802757448579e-01 err = 1.5869510452e-07 time = 0.01 sec +[ Info: CTMRG 31: obj = +2.802757448578e-01 err = 9.3984457232e-08 time = 0.01 sec +[ Info: CTMRG 32: obj = +2.802757448579e-01 err = 5.5660358279e-08 time = 0.01 sec +[ Info: CTMRG 33: obj = +2.802757448578e-01 err = 3.2963519525e-08 time = 0.01 sec +[ Info: CTMRG 34: obj = +2.802757448578e-01 err = 1.9521800691e-08 time = 0.01 sec +[ Info: CTMRG 35: obj = +2.802757448578e-01 err = 1.1561256755e-08 time = 0.00 sec +[ Info: CTMRG 36: obj = +2.802757448578e-01 err = 6.8468312133e-09 time = 0.01 sec +[ Info: CTMRG 37: obj = +2.802757448578e-01 err = 4.0548386307e-09 time = 0.01 sec +[ Info: CTMRG 38: obj = +2.802757448578e-01 err = 2.4013588735e-09 time = 0.01 sec +[ Info: CTMRG 39: obj = +2.802757448578e-01 err = 1.4221332948e-09 time = 0.00 sec +[ Info: CTMRG 40: obj = +2.802757448578e-01 err = 8.4221677250e-10 time = 0.01 sec +[ Info: CTMRG 41: obj = +2.802757448578e-01 err = 4.9877801141e-10 time = 0.01 sec +[ Info: CTMRG 42: obj = +2.802757448578e-01 err = 2.9538585025e-10 time = 0.01 sec +[ Info: CTMRG 43: obj = +2.802757448578e-01 err = 1.7493268954e-10 time = 0.01 sec +[ Info: CTMRG 44: obj = +2.802757448578e-01 err = 1.0359885552e-10 time = 0.01 sec +[ Info: CTMRG conv 45: obj = +2.802757448578e-01 err = 6.1354058626e-11 time = 0.25 sec +[ Info: BiCGStab linsolve starts with norm of residual = 3.35e-01 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.03e-02 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.41e-02 +[ Info: BiCGStab linsolve in iteration 2: normres = 2.72e-03 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 1.92e-03 +[ Info: BiCGStab linsolve in iteration 3: normres = 5.49e-04 +[ Info: BiCGStab linsolve in iteration 3.5: normres = 1.52e-04 +[ Info: BiCGStab linsolve in iteration 4: normres = 3.33e-05 +[ Info: BiCGStab linsolve in iteration 4.5: normres = 2.37e-06 +┌ Info: BiCGStab linsolve converged at iteration 5: +│ * norm of residual = 4.80e-07 +└ * number of operations = 12 +[ Info: CTMRG init: obj = +3.218181656181e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +3.347408492966e-01 err = 2.2748631899e-01 time = 0.01 sec +[ Info: CTMRG 2: obj = +3.349727572571e-01 err = 1.7705654425e-01 time = 0.01 sec +[ Info: CTMRG 3: obj = +3.349557854112e-01 err = 5.9986367263e-02 time = 0.01 sec +[ Info: CTMRG 4: obj = +3.349497623768e-01 err = 2.3135597061e-02 time = 0.01 sec +[ Info: CTMRG 5: obj = +3.349481474864e-01 err = 7.5570497872e-03 time = 0.01 sec +[ Info: CTMRG 6: obj = +3.349478065136e-01 err = 1.9538199085e-03 time = 0.01 sec +[ Info: CTMRG 7: obj = +3.349477423423e-01 err = 1.2340473771e-03 time = 0.01 sec +[ Info: CTMRG 8: obj = +3.349477304763e-01 err = 4.3525791110e-04 time = 0.01 sec +[ Info: CTMRG 9: obj = +3.349477282227e-01 err = 2.0650966963e-04 time = 0.01 sec +[ Info: CTMRG 10: obj = +3.349477278074e-01 err = 8.3822899760e-05 time = 0.00 sec +[ Info: CTMRG 11: obj = +3.349477277259e-01 err = 3.7732886311e-05 time = 0.00 sec +[ Info: CTMRG 12: obj = +3.349477277123e-01 err = 1.6144491689e-05 time = 0.01 sec +[ Info: CTMRG 13: obj = +3.349477277090e-01 err = 7.1473298752e-06 time = 0.01 sec +[ Info: CTMRG 14: obj = +3.349477277087e-01 err = 3.0866539934e-06 time = 0.00 sec +[ Info: CTMRG 15: obj = +3.349477277085e-01 err = 1.3443256803e-06 time = 0.00 sec +[ Info: CTMRG 16: obj = +3.349477277085e-01 err = 5.7924833331e-07 time = 0.01 sec +[ Info: CTMRG 17: obj = +3.349477277085e-01 err = 2.5062959720e-07 time = 0.00 sec +[ Info: CTMRG 18: obj = +3.349477277085e-01 err = 1.0812525472e-07 time = 0.01 sec +[ Info: CTMRG 19: obj = +3.349477277085e-01 err = 4.6777995734e-08 time = 0.00 sec +[ Info: CTMRG 20: obj = +3.349477277085e-01 err = 2.0222471517e-08 time = 0.01 sec +[ Info: CTMRG 21: obj = +3.349477277085e-01 err = 8.7525869465e-09 time = 0.01 sec +[ Info: CTMRG 22: obj = +3.349477277085e-01 err = 3.7861132156e-09 time = 0.00 sec +[ Info: CTMRG 23: obj = +3.349477277085e-01 err = 1.6381695143e-09 time = 0.01 sec +[ Info: CTMRG 24: obj = +3.349477277085e-01 err = 7.0852749498e-10 time = 0.01 sec +[ Info: CTMRG 25: obj = +3.349477277085e-01 err = 3.0646711677e-10 time = 0.00 sec +[ Info: CTMRG 26: obj = +3.349477277085e-01 err = 1.3253887089e-10 time = 0.01 sec +[ Info: CTMRG conv 27: obj = +3.349477277085e-01 err = 5.7327038894e-11 time = 0.15 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.34e-01 +[ Info: BiCGStab linsolve in iteration 1: normres = 2.00e-02 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.98e-03 +[ Info: BiCGStab linsolve in iteration 2: normres = 7.77e-04 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 1.75e-04 +[ Info: BiCGStab linsolve in iteration 3: normres = 4.04e-05 +[ Info: BiCGStab linsolve in iteration 3.5: normres = 2.83e-05 +[ Info: BiCGStab linsolve in iteration 4: normres = 5.78e-06 +┌ Info: BiCGStab linsolve converged at iteration 4.5: +│ * norm of residual = 1.64e-07 +└ * number of operations = 11 +[ Info: CTMRG init: obj = +4.465844626156e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.466478643504e-01 err = 3.0531464291e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +4.466423237538e-01 err = 2.6259975717e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.466423269680e-01 err = 2.2698419728e-02 time = 0.01 sec +[ Info: CTMRG 4: obj = +4.466423753841e-01 err = 1.5737800890e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.466423771165e-01 err = 8.0106757224e-04 time = 0.01 sec +[ Info: CTMRG 6: obj = +4.466423767483e-01 err = 1.4995743009e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.466423767172e-01 err = 4.6336099280e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.466423767192e-01 err = 7.4052685550e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.466423767195e-01 err = 2.7312234384e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.466423767195e-01 err = 1.2667504865e-06 time = 0.01 sec +[ Info: CTMRG 11: obj = +4.466423767195e-01 err = 4.6783595574e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.466423767195e-01 err = 1.3108458777e-07 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.466423767195e-01 err = 2.8100062526e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.466423767195e-01 err = 8.4836640681e-09 time = 0.01 sec +[ Info: CTMRG 15: obj = +4.466423767195e-01 err = 3.6015760753e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.466423767195e-01 err = 1.2269490759e-09 time = 0.00 sec +[ Info: CTMRG 17: obj = +4.466423767195e-01 err = 3.1040872266e-10 time = 0.00 sec +[ Info: CTMRG conv 18: obj = +4.466423767195e-01 err = 6.8059332535e-11 time = 0.10 sec +[ Info: BiCGStab linsolve starts with norm of residual = 3.73e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.43e-03 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.12e-03 +[ Info: BiCGStab linsolve in iteration 2: normres = 4.18e-04 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 9.07e-06 +[ Info: BiCGStab linsolve in iteration 3: normres = 2.09e-06 +┌ Info: BiCGStab linsolve converged at iteration 3.5: +│ * norm of residual = 2.92e-07 +└ * number of operations = 9 +[ Info: LBFGS: iter 5, time 736.72 s: f = -0.549821445064, ‖∇f‖ = 4.4002e-01, α = 6.90e-02, m = 4, nfg = 4 +[ Info: CTMRG init: obj = +2.412790896317e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +2.983930870846e-01 err = 2.5141343896e-01 time = 0.01 sec +[ Info: CTMRG 2: obj = +3.004376846111e-01 err = 2.7968754892e-01 time = 0.01 sec +[ Info: CTMRG 3: obj = +3.004971439000e-01 err = 1.3426217604e-01 time = 0.01 sec +[ Info: CTMRG 4: obj = +3.004553813954e-01 err = 5.8970983213e-02 time = 0.01 sec +[ Info: CTMRG 5: obj = +3.004376693784e-01 err = 3.0280891908e-02 time = 0.01 sec +[ Info: CTMRG 6: obj = +3.004319417580e-01 err = 1.5672899027e-02 time = 0.01 sec +[ Info: CTMRG 7: obj = +3.004302027936e-01 err = 5.8028874433e-03 time = 0.01 sec +[ Info: CTMRG 8: obj = +3.004296867220e-01 err = 2.5948112491e-03 time = 0.01 sec +[ Info: CTMRG 9: obj = +3.004295340477e-01 err = 1.1447200167e-03 time = 0.01 sec +[ Info: CTMRG 10: obj = +3.004294892962e-01 err = 6.6058094381e-04 time = 0.01 sec +[ Info: CTMRG 11: obj = +3.004294760322e-01 err = 3.4254230926e-04 time = 0.01 sec +[ Info: CTMRG 12: obj = +3.004294721864e-01 err = 1.9141797831e-04 time = 0.01 sec +[ Info: CTMRG 13: obj = +3.004294710268e-01 err = 1.0281286744e-04 time = 0.01 sec +[ Info: CTMRG 14: obj = +3.004294707015e-01 err = 5.6363800062e-05 time = 0.01 sec +[ Info: CTMRG 15: obj = +3.004294705975e-01 err = 3.0499158004e-05 time = 0.00 sec +[ Info: CTMRG 16: obj = +3.004294705714e-01 err = 1.6597746883e-05 time = 0.01 sec +[ Info: CTMRG 17: obj = +3.004294705613e-01 err = 8.9959318478e-06 time = 0.01 sec +[ Info: CTMRG 18: obj = +3.004294705597e-01 err = 4.8833705049e-06 time = 0.01 sec +[ Info: CTMRG 19: obj = +3.004294705585e-01 err = 2.6476507833e-06 time = 0.01 sec +[ Info: CTMRG 20: obj = +3.004294705585e-01 err = 1.4360833121e-06 time = 0.01 sec +[ Info: CTMRG 21: obj = +3.004294705583e-01 err = 7.7864696454e-07 time = 0.01 sec +[ Info: CTMRG 22: obj = +3.004294705584e-01 err = 4.2222672142e-07 time = 0.00 sec +[ Info: CTMRG 23: obj = +3.004294705583e-01 err = 2.2893083353e-07 time = 0.00 sec +[ Info: CTMRG 24: obj = +3.004294705583e-01 err = 1.2412889552e-07 time = 0.00 sec +[ Info: CTMRG 25: obj = +3.004294705583e-01 err = 6.7301966372e-08 time = 0.01 sec +[ Info: CTMRG 26: obj = +3.004294705583e-01 err = 3.6490897114e-08 time = 0.01 sec +[ Info: CTMRG 27: obj = +3.004294705583e-01 err = 1.9785054528e-08 time = 0.01 sec +[ Info: CTMRG 28: obj = +3.004294705583e-01 err = 1.0727293977e-08 time = 0.00 sec +[ Info: CTMRG 29: obj = +3.004294705583e-01 err = 5.8162335389e-09 time = 0.01 sec +[ Info: CTMRG 30: obj = +3.004294705583e-01 err = 3.1535036279e-09 time = 0.01 sec +[ Info: CTMRG 31: obj = +3.004294705583e-01 err = 1.7097974506e-09 time = 0.00 sec +[ Info: CTMRG 32: obj = +3.004294705583e-01 err = 9.2703482284e-10 time = 0.00 sec +[ Info: CTMRG 33: obj = +3.004294705583e-01 err = 5.0262776853e-10 time = 0.00 sec +[ Info: CTMRG 34: obj = +3.004294705583e-01 err = 2.7251995940e-10 time = 0.01 sec +[ Info: CTMRG 35: obj = +3.004294705583e-01 err = 1.4775870840e-10 time = 0.00 sec +[ Info: CTMRG conv 36: obj = +3.004294705583e-01 err = 8.0112964589e-11 time = 0.20 sec +[ Info: BiCGStab linsolve starts with norm of residual = 3.18e-01 +[ Info: BiCGStab linsolve in iteration 1: normres = 2.39e-02 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 6.06e-03 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.51e-03 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 2.98e-04 +[ Info: BiCGStab linsolve in iteration 3: normres = 7.41e-05 +[ Info: BiCGStab linsolve in iteration 3.5: normres = 1.98e-05 +[ Info: BiCGStab linsolve in iteration 4: normres = 2.51e-06 +[ Info: BiCGStab linsolve in iteration 4.5: normres = 6.09e-06 +[ Info: BiCGStab linsolve in iteration 5: normres = 1.08e-06 +┌ Info: BiCGStab linsolve converged at iteration 5.5: +│ * norm of residual = 2.17e-08 +└ * number of operations = 13 +[ Info: CTMRG init: obj = +4.029197970323e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.040265024968e-01 err = 8.3906634603e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +4.040213992499e-01 err = 5.3339298008e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.040200587979e-01 err = 1.8853025793e-02 time = 0.01 sec +[ Info: CTMRG 4: obj = +4.040201322910e-01 err = 4.1227587370e-03 time = 0.01 sec +[ Info: CTMRG 5: obj = +4.040201455082e-01 err = 1.0596262918e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.040201448203e-01 err = 2.8068145851e-04 time = 0.01 sec +[ Info: CTMRG 7: obj = +4.040201445920e-01 err = 1.0381716561e-04 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.040201445821e-01 err = 2.5617878885e-05 time = 0.01 sec +[ Info: CTMRG 9: obj = +4.040201445837e-01 err = 6.0269535884e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.040201445838e-01 err = 2.5252478073e-06 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.040201445838e-01 err = 9.0508673606e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.040201445838e-01 err = 2.6859837947e-07 time = 0.01 sec +[ Info: CTMRG 13: obj = +4.040201445838e-01 err = 6.3087542319e-08 time = 0.01 sec +[ Info: CTMRG 14: obj = +4.040201445838e-01 err = 2.0694143817e-08 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.040201445838e-01 err = 8.5466921256e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.040201445838e-01 err = 2.9874902093e-09 time = 0.00 sec +[ Info: CTMRG 17: obj = +4.040201445838e-01 err = 8.3859571372e-10 time = 0.01 sec +[ Info: CTMRG 18: obj = +4.040201445838e-01 err = 2.1393527162e-10 time = 0.01 sec +[ Info: CTMRG conv 19: obj = +4.040201445838e-01 err = 7.1518605014e-11 time = 0.10 sec +[ Info: BiCGStab linsolve starts with norm of residual = 7.79e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.31e-03 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 9.63e-04 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.54e-04 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 3.10e-05 +[ Info: BiCGStab linsolve in iteration 3: normres = 7.89e-06 +[ Info: BiCGStab linsolve in iteration 3.5: normres = 2.64e-06 +┌ Info: BiCGStab linsolve converged at iteration 4: +│ * norm of residual = 5.38e-07 +└ * number of operations = 10 +[ Info: LBFGS: iter 6, time 737.65 s: f = -0.569016778155, ‖∇f‖ = 4.8450e-01, α = 2.26e-01, m = 5, nfg = 2 +[ Info: CTMRG init: obj = +4.035207942335e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.042584410425e-01 err = 5.2437278550e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +4.042836556690e-01 err = 4.9527012746e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.042852299400e-01 err = 2.4699437399e-02 time = 0.01 sec +[ Info: CTMRG 4: obj = +4.042851646966e-01 err = 9.1509951326e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.042851450449e-01 err = 9.8690854240e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.042851437275e-01 err = 2.8473471054e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.042851437211e-01 err = 1.0573289997e-04 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.042851437238e-01 err = 3.7637932675e-05 time = 0.01 sec +[ Info: CTMRG 9: obj = +4.042851437234e-01 err = 1.3583952250e-05 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.042851437233e-01 err = 2.9014142659e-06 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.042851437233e-01 err = 4.9034564121e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.042851437233e-01 err = 1.1013089712e-07 time = 0.01 sec +[ Info: CTMRG 13: obj = +4.042851437233e-01 err = 5.8263635065e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.042851437233e-01 err = 2.0927785712e-08 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.042851437233e-01 err = 5.3087796933e-09 time = 0.01 sec +[ Info: CTMRG 16: obj = +4.042851437233e-01 err = 1.7248442558e-09 time = 0.01 sec +[ Info: CTMRG 17: obj = +4.042851437233e-01 err = 5.1762627037e-10 time = 0.01 sec +[ Info: CTMRG 18: obj = +4.042851437233e-01 err = 1.6893888947e-10 time = 0.01 sec +[ Info: CTMRG conv 19: obj = +4.042851437233e-01 err = 5.9271458341e-11 time = 0.10 sec +[ Info: BiCGStab linsolve starts with norm of residual = 8.95e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.48e-03 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 6.04e-04 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.08e-04 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 6.61e-04 +[ Info: BiCGStab linsolve in iteration 3: normres = 1.19e-04 +[ Info: BiCGStab linsolve in iteration 3.5: normres = 7.44e-06 +[ Info: BiCGStab linsolve in iteration 4: normres = 1.36e-06 +┌ Info: BiCGStab linsolve converged at iteration 4.5: +│ * norm of residual = 4.36e-09 +└ * number of operations = 11 +[ Info: LBFGS: iter 7, time 737.95 s: f = -0.587127261652, ‖∇f‖ = 4.1972e-01, α = 1.00e+00, m = 6, nfg = 1 +[ Info: CTMRG init: obj = +4.494454290295e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.488017112917e-01 err = 7.5042395244e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.487977728719e-01 err = 4.2518831105e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.487981795686e-01 err = 3.4979894660e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.487981689220e-01 err = 6.1684772135e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.487981640997e-01 err = 1.6222504331e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.487981636483e-01 err = 2.4136515871e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.487981636206e-01 err = 5.7927862064e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.487981636191e-01 err = 1.7706002698e-05 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.487981636190e-01 err = 5.3192324036e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.487981636190e-01 err = 1.4283361356e-06 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.487981636190e-01 err = 3.5279836033e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.487981636190e-01 err = 8.3983532294e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.487981636190e-01 err = 2.0592313254e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.487981636190e-01 err = 5.3861869203e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.487981636190e-01 err = 1.4742300511e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.487981636190e-01 err = 4.1020401276e-10 time = 0.00 sec +[ Info: CTMRG 17: obj = +4.487981636190e-01 err = 1.1476630177e-10 time = 0.00 sec +[ Info: CTMRG conv 18: obj = +4.487981636190e-01 err = 3.2198542704e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 5.08e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.54e-03 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.64e-04 +[ Info: BiCGStab linsolve in iteration 2: normres = 2.50e-05 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 3.70e-06 +┌ Info: BiCGStab linsolve converged at iteration 3: +│ * norm of residual = 6.68e-07 +└ * number of operations = 8 +[ Info: LBFGS: iter 8, time 738.14 s: f = -0.600154758006, ‖∇f‖ = 2.1793e-01, α = 1.00e+00, m = 7, nfg = 1 +[ Info: CTMRG init: obj = +4.569285721684e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.572522604787e-01 err = 2.1243836175e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.572538951113e-01 err = 2.4214513898e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.572535377757e-01 err = 2.1692309351e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.572535033057e-01 err = 4.4260078016e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.572535009899e-01 err = 6.0942657421e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.572535008401e-01 err = 1.5510681652e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.572535008298e-01 err = 4.0477781029e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.572535008290e-01 err = 1.0691965424e-05 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.572535008289e-01 err = 2.7462527254e-06 time = 0.01 sec +[ Info: CTMRG 10: obj = +4.572535008289e-01 err = 7.0843815967e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.572535008289e-01 err = 1.8449048386e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.572535008289e-01 err = 4.9036176537e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.572535008289e-01 err = 1.3215402770e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.572535008289e-01 err = 3.5995433118e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.572535008289e-01 err = 9.8473999376e-10 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.572535008289e-01 err = 2.6975564134e-10 time = 0.00 sec +[ Info: CTMRG conv 17: obj = +4.572535008289e-01 err = 7.3811792327e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 4.62e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.35e-03 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 9.64e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.39e-05 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 4.87e-06 +┌ Info: BiCGStab linsolve converged at iteration 3: +│ * norm of residual = 4.89e-07 +└ * number of operations = 8 +[ Info: LBFGS: iter 9, time 738.33 s: f = -0.606883012825, ‖∇f‖ = 1.9566e-01, α = 1.00e+00, m = 8, nfg = 1 +[ Info: CTMRG init: obj = +4.751460494098e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.901950895617e-01 err = 1.2581520933e-01 time = 0.01 sec +[ Info: CTMRG 2: obj = +4.904532787071e-01 err = 8.1457829973e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.904572215992e-01 err = 7.1511426296e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.904572639531e-01 err = 3.0996938051e-02 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.904572634247e-01 err = 1.5577559375e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.904572633539e-01 err = 5.0453343455e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.904572633498e-01 err = 6.1297117723e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.904572633495e-01 err = 1.6222827133e-05 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.904572633495e-01 err = 2.9532921887e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.904572633495e-01 err = 7.1162783161e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.904572633495e-01 err = 1.4094107604e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.904572633495e-01 err = 3.2153200798e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.904572633495e-01 err = 6.6490374456e-09 time = 0.01 sec +[ Info: CTMRG 14: obj = +4.904572633495e-01 err = 1.4745212902e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.904572633495e-01 err = 3.1167312715e-10 time = 0.00 sec +[ Info: CTMRG conv 16: obj = +4.904572633495e-01 err = 6.8196952087e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 3.15e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 6.96e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.71e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 4.82e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 3.70e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 10, time 738.51 s: f = -0.625040022199, ‖∇f‖ = 3.0328e-01, α = 1.00e+00, m = 9, nfg = 1 +[ Info: CTMRG init: obj = +4.903047313693e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.905863636392e-01 err = 4.4650850752e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.905683240376e-01 err = 1.0062185721e-01 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.905676217881e-01 err = 3.1563747458e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.905675942509e-01 err = 1.1871810596e-02 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.905675931490e-01 err = 1.4226558041e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.905675931043e-01 err = 1.1094633837e-04 time = 0.01 sec +[ Info: CTMRG 7: obj = +4.905675931024e-01 err = 5.1903839202e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.905675931023e-01 err = 4.2256440222e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.905675931023e-01 err = 1.9093152851e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.905675931023e-01 err = 1.8676028333e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.905675931023e-01 err = 7.2246028958e-08 time = 0.01 sec +[ Info: CTMRG 12: obj = +4.905675931023e-01 err = 8.5276931973e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.905675931023e-01 err = 2.8057797515e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.905675931023e-01 err = 3.8537126993e-10 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.905675931023e-01 err = 1.1128050445e-10 time = 0.00 sec +[ Info: CTMRG conv 16: obj = +4.905675931023e-01 err = 1.7180873355e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.09e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 5.71e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.20e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 5.02e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 2.82e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 11, time 738.70 s: f = -0.639164743235, ‖∇f‖ = 2.3076e-01, α = 1.00e+00, m = 10, nfg = 1 +[ Info: CTMRG init: obj = +4.925811754316e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.988304585060e-01 err = 1.0008347269e-01 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.989519899158e-01 err = 1.0647292714e-01 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.989536236066e-01 err = 6.7400475230e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.989536001200e-01 err = 4.0031937321e-02 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.989535965234e-01 err = 3.0676161215e-03 time = 0.01 sec +[ Info: CTMRG 6: obj = +4.989535962958e-01 err = 1.0579611877e-03 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.989535962839e-01 err = 1.2763776966e-04 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.989535962833e-01 err = 3.9852634218e-05 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.989535962833e-01 err = 5.2674200426e-06 time = 0.01 sec +[ Info: CTMRG 10: obj = +4.989535962833e-01 err = 1.6276173936e-06 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.989535962833e-01 err = 2.5791215365e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.989535962833e-01 err = 6.8224384629e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.989535962833e-01 err = 1.2062177443e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.989535962833e-01 err = 2.9135955763e-09 time = 0.01 sec +[ Info: CTMRG 15: obj = +4.989535962833e-01 err = 5.5044387237e-10 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.989535962833e-01 err = 1.2569373368e-10 time = 0.00 sec +[ Info: CTMRG conv 17: obj = +4.989535962833e-01 err = 2.4561163224e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 3.18e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 8.57e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 6.46e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 6.39e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 2.55e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 12, time 738.89 s: f = -0.647174335216, ‖∇f‖ = 2.6065e-01, α = 1.00e+00, m = 11, nfg = 1 +[ Info: CTMRG init: obj = +5.405492682453e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.427801286802e-01 err = 7.6717163902e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +5.427830011126e-01 err = 7.1399340684e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.427828772067e-01 err = 7.5634327916e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.427828725696e-01 err = 6.2868584438e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.427828724428e-01 err = 7.1550333180e-04 time = 0.01 sec +[ Info: CTMRG 6: obj = +5.427828724396e-01 err = 1.6070816270e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.427828724395e-01 err = 1.4321836621e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.427828724395e-01 err = 3.5694309329e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.427828724395e-01 err = 3.1885117918e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.427828724395e-01 err = 7.9543581307e-08 time = 0.01 sec +[ Info: CTMRG 11: obj = +5.427828724395e-01 err = 7.7248576221e-09 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.427828724395e-01 err = 1.8249489862e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.427828724395e-01 err = 2.0721673430e-10 time = 0.00 sec +[ Info: CTMRG conv 14: obj = +5.427828724395e-01 err = 4.4087775497e-11 time = 0.07 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.97e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.53e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 6.77e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 5.09e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 13, time 739.05 s: f = -0.650338609163, ‖∇f‖ = 1.6108e-01, α = 1.00e+00, m = 12, nfg = 1 +[ Info: CTMRG init: obj = +5.305347582917e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.322477179888e-01 err = 6.1823996560e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +5.322937108615e-01 err = 5.5926282645e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.322949585294e-01 err = 3.3514574593e-02 time = 0.01 sec +[ Info: CTMRG 4: obj = +5.322949936813e-01 err = 2.2919824445e-02 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.322949947127e-01 err = 5.6177783996e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.322949947440e-01 err = 8.2180099169e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.322949947449e-01 err = 1.3884475228e-04 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.322949947450e-01 err = 2.2272647969e-05 time = 0.01 sec +[ Info: CTMRG 9: obj = +5.322949947450e-01 err = 3.7176359415e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.322949947450e-01 err = 6.1570733363e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.322949947450e-01 err = 1.0490306818e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.322949947450e-01 err = 1.7817148203e-08 time = 0.01 sec +[ Info: CTMRG 13: obj = +5.322949947450e-01 err = 3.0873477182e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.322949947450e-01 err = 5.3520909835e-10 time = 0.00 sec +[ Info: CTMRG conv 15: obj = +5.322949947450e-01 err = 9.3629966180e-11 time = 0.07 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.61e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.17e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.92e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 2.60e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 2.43e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 14, time 739.23 s: f = -0.654606007953, ‖∇f‖ = 7.7724e-02, α = 1.00e+00, m = 13, nfg = 1 +[ Info: CTMRG init: obj = +5.318345276045e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.319484700515e-01 err = 6.8827250218e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +5.319489723280e-01 err = 5.6866171593e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +5.319489976527e-01 err = 2.4965770639e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.319489987328e-01 err = 7.5580296888e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.319489987762e-01 err = 5.1322009892e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.319489987779e-01 err = 9.1237575731e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.319489987780e-01 err = 2.1496489750e-05 time = 0.01 sec +[ Info: CTMRG 8: obj = +5.319489987780e-01 err = 1.9716342242e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.319489987780e-01 err = 6.8170806486e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.319489987780e-01 err = 5.1868602306e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.319489987780e-01 err = 2.1741363096e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.319489987780e-01 err = 2.1151357768e-09 time = 0.01 sec +[ Info: CTMRG 13: obj = +5.319489987780e-01 err = 7.1604650072e-10 time = 0.00 sec +[ Info: CTMRG conv 14: obj = +5.319489987780e-01 err = 8.5421124578e-11 time = 0.07 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.71e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.24e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.35e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 3.51e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 3.69e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 15, time 739.41 s: f = -0.655962567656, ‖∇f‖ = 5.1320e-02, α = 1.00e+00, m = 14, nfg = 1 +[ Info: CTMRG init: obj = +5.384478376744e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.384328572163e-01 err = 6.9413634806e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +5.384325013378e-01 err = 7.4981499690e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.384325200982e-01 err = 4.5539057960e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.384325216386e-01 err = 9.2162673624e-03 time = 0.01 sec +[ Info: CTMRG 5: obj = +5.384325217260e-01 err = 1.3513302582e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.384325217306e-01 err = 7.7229500390e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.384325217308e-01 err = 1.0818900907e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.384325217308e-01 err = 1.5084499532e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.384325217308e-01 err = 2.7373991237e-07 time = 0.01 sec +[ Info: CTMRG 10: obj = +5.384325217308e-01 err = 6.1929993834e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.384325217308e-01 err = 1.1950369765e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.384325217308e-01 err = 2.7338526117e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.384325217308e-01 err = 5.5024907332e-10 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.384325217308e-01 err = 1.2171496601e-10 time = 0.01 sec +[ Info: CTMRG conv 15: obj = +5.384325217308e-01 err = 2.4618079413e-11 time = 0.07 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.67e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 3.71e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.44e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 2.22e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 3.58e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 16, time 739.59 s: f = -0.657034966533, ‖∇f‖ = 5.6668e-02, α = 1.00e+00, m = 15, nfg = 1 +[ Info: CTMRG init: obj = +5.526295024707e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.527997174411e-01 err = 5.1915113688e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +5.528102602561e-01 err = 6.8532082643e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.528108731603e-01 err = 7.2437586700e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.528109064990e-01 err = 1.5912881053e-02 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.528109082867e-01 err = 1.7152051521e-03 time = 0.01 sec +[ Info: CTMRG 6: obj = +5.528109083823e-01 err = 2.1923062362e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.528109083874e-01 err = 2.8342417225e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.528109083877e-01 err = 5.4527028189e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.528109083877e-01 err = 1.2890298973e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.528109083877e-01 err = 2.9985702873e-07 time = 0.01 sec +[ Info: CTMRG 11: obj = +5.528109083877e-01 err = 6.8949352819e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.528109083877e-01 err = 1.5887781202e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.528109083877e-01 err = 3.6530439817e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.528109083877e-01 err = 8.4131526813e-10 time = 0.01 sec +[ Info: CTMRG 15: obj = +5.528109083877e-01 err = 1.9323742432e-10 time = 0.00 sec +[ Info: CTMRG conv 16: obj = +5.528109083877e-01 err = 4.3794080897e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.55e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.73e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.21e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.02e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 8.45e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 17, time 739.81 s: f = -0.658609918816, ‖∇f‖ = 4.5267e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.677351553934e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.676540650188e-01 err = 8.1121950466e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +5.676557801648e-01 err = 9.8508548940e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.676559337146e-01 err = 4.9071808894e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.676559435273e-01 err = 1.6289688930e-02 time = 0.24 sec +[ Info: CTMRG 5: obj = +5.676559441271e-01 err = 1.6822148326e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.676559441634e-01 err = 2.2379838580e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.676559441656e-01 err = 2.5108531982e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.676559441658e-01 err = 2.5779331098e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.676559441658e-01 err = 3.1808574283e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.676559441658e-01 err = 8.9034900278e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.676559441658e-01 err = 2.2773476137e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.676559441658e-01 err = 5.5973679220e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.676559441658e-01 err = 1.3584034249e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.676559441658e-01 err = 3.3035634048e-10 time = 0.00 sec +[ Info: CTMRG conv 15: obj = +5.676559441658e-01 err = 7.9739519733e-11 time = 0.31 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.58e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.40e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.94e-05 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 9.89e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 18, time 740.22 s: f = -0.659421361772, ‖∇f‖ = 4.8752e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.737978897057e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.739222975857e-01 err = 4.6101476264e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.739349062170e-01 err = 4.2215111228e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +5.739357219420e-01 err = 1.9564899301e-02 time = 0.01 sec +[ Info: CTMRG 4: obj = +5.739357726444e-01 err = 2.8765811504e-03 time = 0.01 sec +[ Info: CTMRG 5: obj = +5.739357757773e-01 err = 8.7017770956e-04 time = 0.01 sec +[ Info: CTMRG 6: obj = +5.739357759709e-01 err = 1.0215005459e-04 time = 0.01 sec +[ Info: CTMRG 7: obj = +5.739357759829e-01 err = 1.7793037040e-05 time = 0.01 sec +[ Info: CTMRG 8: obj = +5.739357759836e-01 err = 3.8457298884e-06 time = 0.01 sec +[ Info: CTMRG 9: obj = +5.739357759837e-01 err = 1.0299620705e-06 time = 0.01 sec +[ Info: CTMRG 10: obj = +5.739357759837e-01 err = 2.7605838464e-07 time = 0.01 sec +[ Info: CTMRG 11: obj = +5.739357759837e-01 err = 7.0562738324e-08 time = 0.01 sec +[ Info: CTMRG 12: obj = +5.739357759837e-01 err = 1.7746967135e-08 time = 0.02 sec +[ Info: CTMRG 13: obj = +5.739357759837e-01 err = 4.4366077410e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.739357759837e-01 err = 1.1064387907e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.739357759837e-01 err = 2.8054101760e-10 time = 0.00 sec +[ Info: CTMRG conv 16: obj = +5.739357759837e-01 err = 6.6982893607e-11 time = 0.12 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.62e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.43e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.36e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.62e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 9.75e-08 +└ * number of operations = 7 +[ Info: LBFGS: iter 19, time 740.43 s: f = -0.659584257676, ‖∇f‖ = 5.7745e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.745076718628e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.745504437966e-01 err = 2.6756870940e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +5.745540194585e-01 err = 2.8944679002e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.745542424652e-01 err = 7.7206198448e-03 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.745542558356e-01 err = 2.7277946047e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.745542566313e-01 err = 4.4629488603e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.745542566786e-01 err = 5.3026651135e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.745542566814e-01 err = 6.1208775576e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.745542566816e-01 err = 1.7032705487e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.745542566816e-01 err = 4.7740572637e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.745542566816e-01 err = 1.2154636031e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.745542566816e-01 err = 3.0057748435e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.745542566816e-01 err = 7.3383713037e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.745542566816e-01 err = 1.8075494674e-09 time = 0.02 sec +[ Info: CTMRG 14: obj = +5.745542566816e-01 err = 4.3690387741e-10 time = 0.00 sec +[ Info: CTMRG conv 15: obj = +5.745542566816e-01 err = 9.8198371912e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.54e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.13e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.56e-05 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 7.53e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 20, time 740.59 s: f = -0.659811195031, ‖∇f‖ = 1.7740e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.752674236133e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.752694036899e-01 err = 2.1218296584e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +5.752695499956e-01 err = 1.3704207111e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.752695590184e-01 err = 4.5807953561e-03 time = 0.02 sec +[ Info: CTMRG 4: obj = +5.752695595597e-01 err = 3.4238528365e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.752695595920e-01 err = 2.0224562220e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.752695595939e-01 err = 3.9865308042e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.752695595940e-01 err = 5.6760672361e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.752695595940e-01 err = 7.6538316722e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.752695595940e-01 err = 1.2463425262e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.752695595940e-01 err = 2.5216574089e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.752695595940e-01 err = 5.7812688632e-09 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.752695595940e-01 err = 1.4258756369e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.752695595940e-01 err = 3.4716330364e-10 time = 0.00 sec +[ Info: CTMRG conv 14: obj = +5.752695595940e-01 err = 8.6928184333e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.53e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.01e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.51e-05 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 7.16e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 21, time 740.77 s: f = -0.659874427409, ‖∇f‖ = 1.4673e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.774023192899e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.774064958137e-01 err = 5.2667649352e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.774069388430e-01 err = 5.2960609639e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.774069652092e-01 err = 3.4923403633e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.774069667823e-01 err = 2.8750346775e-03 time = 0.01 sec +[ Info: CTMRG 5: obj = +5.774069668767e-01 err = 6.2186150563e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.774069668824e-01 err = 8.6136884852e-05 time = 0.01 sec +[ Info: CTMRG 7: obj = +5.774069668827e-01 err = 9.0441803580e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.774069668827e-01 err = 9.0103356074e-07 time = 0.01 sec +[ Info: CTMRG 9: obj = +5.774069668827e-01 err = 1.1384324661e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.774069668827e-01 err = 2.8411595872e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.774069668827e-01 err = 7.0092464313e-09 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.774069668827e-01 err = 1.7193878645e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.774069668827e-01 err = 4.2148593500e-10 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.774069668827e-01 err = 1.0304832851e-10 time = 0.00 sec +[ Info: CTMRG conv 15: obj = +5.774069668827e-01 err = 2.5103947776e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.54e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.61e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.12e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.38e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 9.74e-08 +└ * number of operations = 7 +[ Info: LBFGS: iter 22, time 740.97 s: f = -0.660072570659, ‖∇f‖ = 1.9320e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.783110309028e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.783108255746e-01 err = 7.2443994591e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.783111423198e-01 err = 2.8860814323e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.783111595653e-01 err = 2.2443381270e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.783111605521e-01 err = 4.6360446117e-03 time = 0.01 sec +[ Info: CTMRG 5: obj = +5.783111606098e-01 err = 1.0052495730e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.783111606132e-01 err = 1.0433521403e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.783111606134e-01 err = 9.1319735408e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.783111606134e-01 err = 8.8028573318e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.783111606134e-01 err = 1.3151474683e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.783111606134e-01 err = 3.2396316084e-08 time = 0.01 sec +[ Info: CTMRG 11: obj = +5.783111606134e-01 err = 8.2149969187e-09 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.783111606134e-01 err = 2.0034110301e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.783111606134e-01 err = 4.8663471437e-10 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.783111606134e-01 err = 1.2033947986e-10 time = 0.00 sec +[ Info: CTMRG conv 15: obj = +5.783111606134e-01 err = 3.3750013034e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.58e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.37e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.44e-04 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.89e-05 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 1.48e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 23, time 741.18 s: f = -0.660232141902, ‖∇f‖ = 1.7545e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.774957758920e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.774964260001e-01 err = 6.6910362684e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.774976182560e-01 err = 2.5319186985e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +5.774976876573e-01 err = 2.1875537787e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.774976917736e-01 err = 5.9041750499e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.774976920214e-01 err = 1.7972192344e-03 time = 0.01 sec +[ Info: CTMRG 6: obj = +5.774976920364e-01 err = 2.2391149907e-04 time = 0.01 sec +[ Info: CTMRG 7: obj = +5.774976920373e-01 err = 2.4041293211e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.774976920373e-01 err = 2.6421033580e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.774976920373e-01 err = 5.2152551435e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.774976920373e-01 err = 1.3588440773e-07 time = 0.01 sec +[ Info: CTMRG 11: obj = +5.774976920373e-01 err = 3.2646794172e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.774976920373e-01 err = 8.0499742470e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.774976920373e-01 err = 1.9496547196e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.774976920373e-01 err = 4.8236662536e-10 time = 0.01 sec +[ Info: CTMRG 15: obj = +5.774976920373e-01 err = 1.1222137722e-10 time = 0.00 sec +[ Info: CTMRG conv 16: obj = +5.774976920373e-01 err = 2.9079293043e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.71e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 6.87e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.83e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.03e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 5.73e-08 +└ * number of operations = 7 +[ Info: LBFGS: iter 24, time 741.38 s: f = -0.660380080163, ‖∇f‖ = 2.3752e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.749926971670e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.750450811480e-01 err = 7.7270285488e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.750491452719e-01 err = 3.8135605681e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +5.750493887424e-01 err = 1.2445130794e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.750494030845e-01 err = 4.8086169382e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.750494039262e-01 err = 1.3132102922e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.750494039755e-01 err = 2.5036781202e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.750494039784e-01 err = 2.1182037659e-05 time = 0.01 sec +[ Info: CTMRG 8: obj = +5.750494039785e-01 err = 7.5321688127e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.750494039786e-01 err = 8.6005660195e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.750494039786e-01 err = 3.1830412707e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.750494039786e-01 err = 5.2918435787e-08 time = 0.01 sec +[ Info: CTMRG 12: obj = +5.750494039786e-01 err = 1.6446625880e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.750494039786e-01 err = 3.3168386738e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.750494039786e-01 err = 9.1175729121e-10 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.750494039786e-01 err = 2.0195940187e-10 time = 0.00 sec +[ Info: CTMRG conv 16: obj = +5.750494039786e-01 err = 5.1821331571e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.78e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 7.41e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.75e-05 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 7.69e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 25, time 741.58 s: f = -0.660461052221, ‖∇f‖ = 2.3596e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.765747440600e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.765788384867e-01 err = 2.2853927761e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.765791823038e-01 err = 1.3335130319e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +5.765792030577e-01 err = 9.8433894609e-03 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.765792042909e-01 err = 2.1037476909e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.765792043640e-01 err = 5.2126556905e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.765792043684e-01 err = 8.6168268881e-05 time = 0.01 sec +[ Info: CTMRG 7: obj = +5.765792043686e-01 err = 7.0162547794e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.765792043686e-01 err = 1.5688460809e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.765792043686e-01 err = 2.4306451964e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.765792043686e-01 err = 6.9216033883e-08 time = 0.01 sec +[ Info: CTMRG 11: obj = +5.765792043686e-01 err = 1.3025643496e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.765792043686e-01 err = 3.8027422852e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.765792043686e-01 err = 8.2564302200e-10 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.765792043686e-01 err = 2.1918734256e-10 time = 0.00 sec +[ Info: CTMRG conv 15: obj = +5.765792043686e-01 err = 5.0773904127e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.74e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.82e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.90e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.10e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 4.40e-08 +└ * number of operations = 7 +[ Info: LBFGS: iter 26, time 741.79 s: f = -0.660554016679, ‖∇f‖ = 1.2681e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.757322983460e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.757343721418e-01 err = 2.1079992809e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.757345387839e-01 err = 1.0166458464e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.757345495986e-01 err = 7.3820816488e-03 time = 0.01 sec +[ Info: CTMRG 4: obj = +5.757345502703e-01 err = 8.9909591579e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.757345503116e-01 err = 2.7671963248e-04 time = 0.01 sec +[ Info: CTMRG 6: obj = +5.757345503142e-01 err = 3.6140774931e-05 time = 0.01 sec +[ Info: CTMRG 7: obj = +5.757345503143e-01 err = 6.3768792424e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.757345503143e-01 err = 9.4625711612e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.757345503143e-01 err = 2.5237583786e-07 time = 0.01 sec +[ Info: CTMRG 10: obj = +5.757345503143e-01 err = 4.5947464379e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.757345503143e-01 err = 1.3110474418e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.757345503143e-01 err = 2.6577531679e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.757345503143e-01 err = 7.3094753444e-10 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.757345503143e-01 err = 1.5998759171e-10 time = 0.01 sec +[ Info: CTMRG conv 15: obj = +5.757345503143e-01 err = 4.2336499920e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.76e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.21e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.65e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.22e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 6.24e-08 +└ * number of operations = 7 +[ Info: LBFGS: iter 27, time 741.99 s: f = -0.660617092333, ‖∇f‖ = 1.0485e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.691631586134e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.691313758312e-01 err = 1.1127714797e-01 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.691306598475e-01 err = 8.3633507268e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.691306081406e-01 err = 2.2760694213e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.691306044675e-01 err = 3.7238536282e-03 time = 0.01 sec +[ Info: CTMRG 5: obj = +5.691306042103e-01 err = 1.2331756614e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.691306041923e-01 err = 1.7901320419e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.691306041911e-01 err = 4.6453716163e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.691306041910e-01 err = 1.1374558993e-05 time = 0.01 sec +[ Info: CTMRG 9: obj = +5.691306041910e-01 err = 3.9978366268e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.691306041910e-01 err = 9.4661004369e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.691306041910e-01 err = 3.1688051985e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.691306041910e-01 err = 7.4572919635e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.691306041910e-01 err = 2.4809135180e-08 time = 0.01 sec +[ Info: CTMRG 14: obj = +5.691306041910e-01 err = 5.8399514545e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.691306041910e-01 err = 1.9392756033e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +5.691306041910e-01 err = 4.5672920180e-10 time = 0.00 sec +[ Info: CTMRG 17: obj = +5.691306041910e-01 err = 1.5144960849e-10 time = 0.01 sec +[ Info: CTMRG conv 18: obj = +5.691306041910e-01 err = 3.5696979483e-11 time = 0.10 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.93e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 7.80e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.71e-05 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 9.51e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 28, time 742.20 s: f = -0.660813477825, ‖∇f‖ = 1.7986e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.591990954908e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.591610169535e-01 err = 5.4879295071e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.591609825010e-01 err = 2.6625147412e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +5.591609804415e-01 err = 1.4017124921e-02 time = 0.01 sec +[ Info: CTMRG 4: obj = +5.591609802496e-01 err = 1.2598553282e-02 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.591609802342e-01 err = 1.8820040724e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.591609802330e-01 err = 2.7096671897e-04 time = 0.01 sec +[ Info: CTMRG 7: obj = +5.591609802329e-01 err = 5.7667718937e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.591609802329e-01 err = 1.0559269066e-05 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.591609802329e-01 err = 4.2181941011e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.591609802329e-01 err = 1.0502109284e-06 time = 0.01 sec +[ Info: CTMRG 11: obj = +5.591609802329e-01 err = 3.5469854819e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.591609802329e-01 err = 9.5877101239e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.591609802329e-01 err = 3.1194933559e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.591609802329e-01 err = 8.6658950684e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.591609802329e-01 err = 2.7756072257e-09 time = 0.01 sec +[ Info: CTMRG 16: obj = +5.591609802329e-01 err = 7.8340669087e-10 time = 0.00 sec +[ Info: CTMRG 17: obj = +5.591609802329e-01 err = 2.4783678024e-10 time = 0.00 sec +[ Info: CTMRG conv 18: obj = +5.591609802329e-01 err = 7.0849178395e-11 time = 0.10 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.95e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 6.52e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.29e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 2.58e-06 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 1.60e-06 +┌ Info: BiCGStab linsolve converged at iteration 3: +│ * norm of residual = 2.83e-07 +└ * number of operations = 8 +[ Info: LBFGS: iter 29, time 742.71 s: f = -0.660960969686, ‖∇f‖ = 1.7471e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.539558878304e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.539752091369e-01 err = 4.1470294142e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +5.539792510442e-01 err = 4.7847540257e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.539796111926e-01 err = 1.1555918689e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.539796417725e-01 err = 4.1461570076e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.539796443371e-01 err = 1.2084325931e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.539796445513e-01 err = 1.9632555807e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.539796445691e-01 err = 3.6393072328e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.539796445706e-01 err = 6.6099892800e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.539796445708e-01 err = 1.7934472006e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.539796445708e-01 err = 4.7538083772e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.539796445708e-01 err = 1.3049298279e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.539796445708e-01 err = 3.9479295853e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.539796445708e-01 err = 1.0139677357e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.539796445708e-01 err = 3.3404786037e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.539796445708e-01 err = 7.9259193557e-10 time = 0.00 sec +[ Info: CTMRG 16: obj = +5.539796445708e-01 err = 2.8292805329e-10 time = 0.00 sec +[ Info: CTMRG conv 17: obj = +5.539796445708e-01 err = 6.2037879550e-11 time = 0.07 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.90e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 5.41e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.06e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.03e-06 +[ Info: BiCGStab linsolve in iteration 2.5: normres = 1.11e-06 +┌ Info: BiCGStab linsolve converged at iteration 3: +│ * norm of residual = 1.12e-08 +└ * number of operations = 8 +[ Info: LBFGS: iter 30, time 742.95 s: f = -0.661039077160, ‖∇f‖ = 1.1401e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.543832099958e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.543792183643e-01 err = 3.7883656995e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.543790438941e-01 err = 2.6898809478e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.543790313905e-01 err = 1.0538275064e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.543790303854e-01 err = 2.3573598711e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.543790303045e-01 err = 4.1273066505e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.543790302980e-01 err = 7.7637788890e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.543790302975e-01 err = 2.4626010034e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.543790302975e-01 err = 6.1769076461e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.543790302975e-01 err = 2.2693899191e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.543790302975e-01 err = 5.6638817605e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.543790302975e-01 err = 2.0553265137e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.543790302975e-01 err = 5.2998319426e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.543790302975e-01 err = 1.9025272420e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.543790302975e-01 err = 5.0219617993e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.543790302975e-01 err = 1.7921504633e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +5.543790302975e-01 err = 4.8030813529e-10 time = 0.00 sec +[ Info: CTMRG 17: obj = +5.543790302975e-01 err = 1.7096037135e-10 time = 0.00 sec +[ Info: CTMRG conv 18: obj = +5.543790302975e-01 err = 4.6283162910e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.90e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.10e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 7.90e-06 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.30e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 4.48e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 31, time 743.15 s: f = -0.661087806652, ‖∇f‖ = 1.0339e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.519543985810e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.519518927726e-01 err = 1.3395954187e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +5.519518865043e-01 err = 1.3634648983e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.519518868851e-01 err = 6.5563096965e-03 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.519518869269e-01 err = 2.1108600340e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.519518869307e-01 err = 5.2480763606e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.519518869310e-01 err = 7.0692167650e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.519518869310e-01 err = 1.3219974578e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.519518869310e-01 err = 1.9470385022e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.519518869310e-01 err = 5.5788700872e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.519518869310e-01 err = 1.9802755960e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.519518869310e-01 err = 5.0593860126e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.519518869310e-01 err = 1.9270770547e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.519518869310e-01 err = 5.0349407772e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.519518869310e-01 err = 1.8801447845e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.519518869310e-01 err = 5.0040090660e-10 time = 0.00 sec +[ Info: CTMRG 16: obj = +5.519518869310e-01 err = 1.8410365012e-10 time = 0.00 sec +[ Info: CTMRG conv 17: obj = +5.519518869310e-01 err = 4.9569737079e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.91e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 3.83e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 9.73e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 5.90e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 32, time 743.35 s: f = -0.661121452359, ‖∇f‖ = 8.8764e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.435912005696e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.436007882889e-01 err = 3.0325945688e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +5.436033225325e-01 err = 4.0530949330e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.436035780366e-01 err = 1.1462831550e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.436036025205e-01 err = 8.7060100692e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.436036048348e-01 err = 2.7786670383e-03 time = 0.01 sec +[ Info: CTMRG 6: obj = +5.436036050524e-01 err = 4.9328772754e-04 time = 0.01 sec +[ Info: CTMRG 7: obj = +5.436036050728e-01 err = 6.6855650971e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.436036050747e-01 err = 9.6809505522e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.436036050749e-01 err = 1.5748130724e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.436036050749e-01 err = 4.1842173186e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.436036050749e-01 err = 1.2902906913e-07 time = 0.01 sec +[ Info: CTMRG 12: obj = +5.436036050749e-01 err = 3.7976395576e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.436036050749e-01 err = 1.2130088618e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.436036050749e-01 err = 3.3624163166e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.436036050749e-01 err = 1.1552460156e-09 time = 0.01 sec +[ Info: CTMRG 16: obj = +5.436036050749e-01 err = 3.1073672437e-10 time = 0.00 sec +[ Info: CTMRG 17: obj = +5.436036050749e-01 err = 1.0997143024e-10 time = 0.00 sec +[ Info: CTMRG conv 18: obj = +5.436036050749e-01 err = 2.9784875217e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.94e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 5.35e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.28e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 3.19e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 6.22e-08 +└ * number of operations = 7 +[ Info: LBFGS: iter 33, time 743.57 s: f = -0.661180968072, ‖∇f‖ = 1.0798e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.439225121131e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.439193276537e-01 err = 3.8824424609e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.439202291941e-01 err = 1.6593452375e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +5.439203158928e-01 err = 5.3340807460e-03 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.439203241746e-01 err = 2.7838671876e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.439203249619e-01 err = 7.2572765319e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.439203250366e-01 err = 1.6885253072e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.439203250437e-01 err = 3.2900532985e-05 time = 0.01 sec +[ Info: CTMRG 8: obj = +5.439203250443e-01 err = 6.5666193756e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.439203250444e-01 err = 2.3797750506e-06 time = 0.01 sec +[ Info: CTMRG 10: obj = +5.439203250444e-01 err = 6.2761973516e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.439203250444e-01 err = 2.3097295090e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.439203250444e-01 err = 5.7123356250e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.439203250444e-01 err = 2.0798630020e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.439203250444e-01 err = 5.0929076578e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.439203250444e-01 err = 1.8485408848e-09 time = 0.01 sec +[ Info: CTMRG 16: obj = +5.439203250444e-01 err = 4.5054917151e-10 time = 0.00 sec +[ Info: CTMRG 17: obj = +5.439203250444e-01 err = 1.6333204943e-10 time = 0.01 sec +[ Info: CTMRG conv 18: obj = +5.439203250444e-01 err = 3.9696609234e-11 time = 0.10 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.95e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 6.12e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.85e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.57e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 5.37e-08 +└ * number of operations = 7 +[ Info: CTMRG init: obj = +5.438718833136e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.438710974166e-01 err = 2.6162492611e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.438713361071e-01 err = 8.4657179009e-03 time = 0.01 sec +[ Info: CTMRG 3: obj = +5.438713587572e-01 err = 3.0378244946e-03 time = 0.01 sec +[ Info: CTMRG 4: obj = +5.438713608992e-01 err = 1.2098309665e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.438713611009e-01 err = 5.5922136679e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.438713611198e-01 err = 8.6609309395e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.438713611216e-01 err = 1.7685720841e-05 time = 0.01 sec +[ Info: CTMRG 8: obj = +5.438713611218e-01 err = 4.4876625855e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.438713611218e-01 err = 1.2542553505e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.438713611218e-01 err = 3.8070769294e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.438713611218e-01 err = 1.0921906499e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.438713611218e-01 err = 3.3983804551e-08 time = 0.01 sec +[ Info: CTMRG 13: obj = +5.438713611218e-01 err = 9.6871498319e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.438713611218e-01 err = 3.0340630051e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.438713611218e-01 err = 8.5878984189e-10 time = 0.00 sec +[ Info: CTMRG 16: obj = +5.438713611218e-01 err = 2.7010186529e-10 time = 0.01 sec +[ Info: CTMRG conv 17: obj = +5.438713611218e-01 err = 7.5993244513e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.94e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 5.76e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.93e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.81e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 4.28e-08 +└ * number of operations = 7 +[ Info: LBFGS: iter 34, time 744.01 s: f = -0.661206863491, ‖∇f‖ = 9.1298e-03, α = 5.16e-01, m = 16, nfg = 2 +[ Info: CTMRG init: obj = +5.441731369005e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.441718411263e-01 err = 6.7685026096e-03 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.441718309851e-01 err = 3.8979572503e-03 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.441718304264e-01 err = 2.7832993020e-03 time = 0.01 sec +[ Info: CTMRG 4: obj = +5.441718303786e-01 err = 3.5203612978e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.441718303742e-01 err = 1.1460341716e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.441718303738e-01 err = 3.6608408369e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.441718303738e-01 err = 5.5583878613e-06 time = 0.01 sec +[ Info: CTMRG 8: obj = +5.441718303738e-01 err = 1.9626085459e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.441718303738e-01 err = 5.2070037428e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.441718303738e-01 err = 1.6404286084e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.441718303738e-01 err = 4.8993730928e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.441718303738e-01 err = 1.4795669704e-08 time = 0.01 sec +[ Info: CTMRG 13: obj = +5.441718303738e-01 err = 4.4733946164e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.441718303738e-01 err = 1.3563707019e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.441718303738e-01 err = 4.0974489918e-10 time = 0.00 sec +[ Info: CTMRG 16: obj = +5.441718303738e-01 err = 1.2511107466e-10 time = 0.01 sec +[ Info: CTMRG conv 17: obj = +5.441718303738e-01 err = 3.7661518747e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.95e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.45e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.90e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 2.89e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 7.40e-08 +└ * number of operations = 7 +[ Info: LBFGS: iter 35, time 744.23 s: f = -0.661226335408, ‖∇f‖ = 6.6169e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.402058126435e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.402058667336e-01 err = 1.3736911282e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.402056323671e-01 err = 1.9367344047e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +5.402056082882e-01 err = 6.9372113248e-03 time = 0.01 sec +[ Info: CTMRG 4: obj = +5.402056059275e-01 err = 4.1933668480e-03 time = 0.01 sec +[ Info: CTMRG 5: obj = +5.402056056985e-01 err = 1.2150256164e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.402056056764e-01 err = 2.6340454902e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.402056056743e-01 err = 3.6495057334e-05 time = 0.01 sec +[ Info: CTMRG 8: obj = +5.402056056741e-01 err = 8.1080371742e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.402056056741e-01 err = 1.9598109735e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.402056056741e-01 err = 5.9412479992e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.402056056741e-01 err = 1.6809402337e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.402056056741e-01 err = 5.0133967112e-08 time = 0.01 sec +[ Info: CTMRG 13: obj = +5.402056056741e-01 err = 1.4566593242e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.402056056741e-01 err = 4.3159068215e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.402056056741e-01 err = 1.2684921746e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +5.402056056741e-01 err = 3.7436597894e-10 time = 0.01 sec +[ Info: CTMRG 17: obj = +5.402056056741e-01 err = 1.1109468648e-10 time = 0.00 sec +[ Info: CTMRG conv 18: obj = +5.402056056741e-01 err = 3.2694659242e-11 time = 0.10 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.97e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 3.52e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.60e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 8.52e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 2.36e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 36, time 744.46 s: f = -0.661260012209, ‖∇f‖ = 5.9848e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.401725794020e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.401714569933e-01 err = 1.5858490766e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.401713229617e-01 err = 1.1887922679e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +5.401713082865e-01 err = 5.8941340539e-03 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.401713067984e-01 err = 2.3609052771e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.401713066517e-01 err = 4.5579772643e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.401713066375e-01 err = 7.4411336242e-05 time = 0.01 sec +[ Info: CTMRG 7: obj = +5.401713066361e-01 err = 2.9212141435e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.401713066359e-01 err = 4.7712606710e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.401713066359e-01 err = 1.3660234248e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.401713066359e-01 err = 3.8297770309e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.401713066359e-01 err = 9.8707294969e-08 time = 0.01 sec +[ Info: CTMRG 12: obj = +5.401713066359e-01 err = 3.2189981170e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.401713066359e-01 err = 8.6089099021e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.401713066359e-01 err = 2.7400151227e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.401713066359e-01 err = 7.4412132300e-10 time = 0.01 sec +[ Info: CTMRG 16: obj = +5.401713066359e-01 err = 2.3514539335e-10 time = 0.00 sec +[ Info: CTMRG conv 17: obj = +5.401713066359e-01 err = 6.4308071272e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.96e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 2.28e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 5.22e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 6.84e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 37, time 744.67 s: f = -0.661268668988, ‖∇f‖ = 1.0826e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.387272115400e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.387280402148e-01 err = 6.8278088737e-03 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.387281861458e-01 err = 5.4261176243e-03 time = 0.01 sec +[ Info: CTMRG 3: obj = +5.387282009746e-01 err = 3.5477831519e-03 time = 0.01 sec +[ Info: CTMRG 4: obj = +5.387282024107e-01 err = 1.2815961301e-03 time = 0.01 sec +[ Info: CTMRG 5: obj = +5.387282025478e-01 err = 4.1247266285e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.387282025609e-01 err = 7.8780023012e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.387282025621e-01 err = 1.5191343931e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.387282025622e-01 err = 1.6849366862e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.387282025622e-01 err = 5.8112364784e-07 time = 0.01 sec +[ Info: CTMRG 10: obj = +5.387282025622e-01 err = 1.0548979422e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.387282025622e-01 err = 3.6985392527e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.387282025622e-01 err = 8.1728765595e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.387282025622e-01 err = 2.8468727637e-09 time = 0.01 sec +[ Info: CTMRG 14: obj = +5.387282025622e-01 err = 6.5380497724e-10 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.387282025622e-01 err = 2.2799144818e-10 time = 0.00 sec +[ Info: CTMRG conv 16: obj = +5.387282025622e-01 err = 5.3067244057e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.97e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 2.40e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 7.40e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 3.26e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 38, time 744.88 s: f = -0.661283178602, ‖∇f‖ = 5.0739e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.369964811744e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.369958426469e-01 err = 9.4665859289e-03 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.369958232411e-01 err = 7.2919910161e-03 time = 0.01 sec +[ Info: CTMRG 3: obj = +5.369958212074e-01 err = 2.6813496126e-03 time = 0.01 sec +[ Info: CTMRG 4: obj = +5.369958209935e-01 err = 1.5600120967e-03 time = 0.01 sec +[ Info: CTMRG 5: obj = +5.369958209719e-01 err = 4.8430330270e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.369958209697e-01 err = 9.5587029525e-05 time = 0.01 sec +[ Info: CTMRG 7: obj = +5.369958209695e-01 err = 2.1059613530e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.369958209695e-01 err = 2.4345077718e-06 time = 0.01 sec +[ Info: CTMRG 9: obj = +5.369958209695e-01 err = 6.8888816326e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.369958209694e-01 err = 1.3341897127e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.369958209694e-01 err = 3.6052046390e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.369958209694e-01 err = 9.6155249588e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.369958209694e-01 err = 2.7046972936e-09 time = 0.01 sec +[ Info: CTMRG 14: obj = +5.369958209694e-01 err = 7.2109040450e-10 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.369958209694e-01 err = 2.1438212277e-10 time = 0.00 sec +[ Info: CTMRG conv 16: obj = +5.369958209694e-01 err = 5.5378076280e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 1.98e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 2.34e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 9.34e-06 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.10e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 3.93e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 39, time 745.09 s: f = -0.661293239500, ‖∇f‖ = 4.8729e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.354449621486e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.354428703136e-01 err = 1.3758626843e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.354426286569e-01 err = 9.4531308920e-03 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.354426026719e-01 err = 4.1268435550e-03 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.354426000294e-01 err = 1.6904169178e-03 time = 0.01 sec +[ Info: CTMRG 5: obj = +5.354425997668e-01 err = 5.6495328902e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.354425997410e-01 err = 1.2406061781e-04 time = 0.01 sec +[ Info: CTMRG 7: obj = +5.354425997385e-01 err = 3.2896972597e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.354425997382e-01 err = 4.5159923684e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.354425997382e-01 err = 9.4300150796e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.354425997382e-01 err = 1.5743296513e-07 time = 0.01 sec +[ Info: CTMRG 11: obj = +5.354425997382e-01 err = 3.6347007617e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.354425997382e-01 err = 9.5386751694e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.354425997382e-01 err = 2.3105075215e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.354425997382e-01 err = 6.7328852738e-10 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.354425997382e-01 err = 1.7390418021e-10 time = 0.01 sec +[ Info: CTMRG conv 16: obj = +5.354425997382e-01 err = 5.1797540885e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.00e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.60e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 5.03e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 1.64e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 40, time 745.30 s: f = -0.661307958912, ‖∇f‖ = 6.2349e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.313300515273e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.313227231700e-01 err = 4.4955824128e-02 time = 0.05 sec +[ Info: CTMRG 2: obj = +5.313214982545e-01 err = 3.5216830098e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +5.313213594837e-01 err = 1.0313978214e-02 time = 0.01 sec +[ Info: CTMRG 4: obj = +5.313213449633e-01 err = 4.6653180367e-03 time = 0.01 sec +[ Info: CTMRG 5: obj = +5.313213434831e-01 err = 2.7519312188e-03 time = 0.01 sec +[ Info: CTMRG 6: obj = +5.313213433338e-01 err = 6.2471105040e-04 time = 0.24 sec +[ Info: CTMRG 7: obj = +5.313213433188e-01 err = 8.9044402819e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.313213433173e-01 err = 1.3219042603e-05 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.313213433172e-01 err = 1.3218961535e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.313213433171e-01 err = 2.0252425310e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.313213433171e-01 err = 3.0592872243e-08 time = 0.01 sec +[ Info: CTMRG 12: obj = +5.313213433171e-01 err = 1.0430527544e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.313213433171e-01 err = 3.2804517865e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.313213433171e-01 err = 1.0599478835e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.313213433171e-01 err = 3.3601729140e-10 time = 0.00 sec +[ Info: CTMRG 16: obj = +5.313213433171e-01 err = 1.0719310492e-10 time = 0.00 sec +[ Info: CTMRG conv 17: obj = +5.313213433171e-01 err = 3.3958179369e-11 time = 0.36 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.02e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.87e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.17e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 8.28e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 41, time 745.78 s: f = -0.661342970541, ‖∇f‖ = 9.2762e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.211957382243e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.211762625113e-01 err = 1.1020646844e-01 time = 0.01 sec +[ Info: CTMRG 2: obj = +5.211699611963e-01 err = 7.4481850072e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +5.211691766127e-01 err = 2.8333498724e-02 time = 0.01 sec +[ Info: CTMRG 4: obj = +5.211690886423e-01 err = 1.3446085947e-02 time = 0.01 sec +[ Info: CTMRG 5: obj = +5.211690790472e-01 err = 5.3309638064e-03 time = 0.01 sec +[ Info: CTMRG 6: obj = +5.211690780121e-01 err = 1.4211663296e-03 time = 0.01 sec +[ Info: CTMRG 7: obj = +5.211690779010e-01 err = 2.7551066064e-04 time = 0.01 sec +[ Info: CTMRG 8: obj = +5.211690778891e-01 err = 4.2886745899e-05 time = 0.01 sec +[ Info: CTMRG 9: obj = +5.211690778878e-01 err = 6.7351499237e-06 time = 0.01 sec +[ Info: CTMRG 10: obj = +5.211690778877e-01 err = 1.1402719805e-06 time = 0.01 sec +[ Info: CTMRG 11: obj = +5.211690778877e-01 err = 2.4387962316e-07 time = 0.02 sec +[ Info: CTMRG 12: obj = +5.211690778877e-01 err = 6.3206588382e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.211690778877e-01 err = 2.0797435605e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.211690778877e-01 err = 6.8305846215e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.211690778877e-01 err = 2.2373264449e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +5.211690778877e-01 err = 7.3217787642e-10 time = 0.00 sec +[ Info: CTMRG 17: obj = +5.211690778877e-01 err = 2.3951036344e-10 time = 0.00 sec +[ Info: CTMRG conv 18: obj = +5.211690778877e-01 err = 7.8329627217e-11 time = 0.12 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.15e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 6.65e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.51e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 3.07e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 8.91e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 42, time 746.01 s: f = -0.661417237192, ‖∇f‖ = 1.7461e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.043151425320e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.043555440692e-01 err = 2.0606605946e-01 time = 0.00 sec +[ Info: CTMRG 2: obj = +5.043465249374e-01 err = 8.1521389483e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.043451858294e-01 err = 2.1121628078e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.043450181480e-01 err = 2.0283629507e-02 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.043449977818e-01 err = 7.2215239307e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.043449953361e-01 err = 2.1237200881e-03 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.043449950439e-01 err = 3.9825944576e-04 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.043449950090e-01 err = 6.9297647607e-05 time = 0.01 sec +[ Info: CTMRG 9: obj = +5.043449950049e-01 err = 1.1901554409e-05 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.043449950044e-01 err = 2.2630675674e-06 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.043449950043e-01 err = 5.6906075100e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.043449950043e-01 err = 2.0419831879e-07 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.043449950043e-01 err = 7.1495393819e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.043449950043e-01 err = 2.4787306425e-08 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.043449950043e-01 err = 8.5680098104e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +5.043449950043e-01 err = 2.9580859866e-09 time = 0.00 sec +[ Info: CTMRG 17: obj = +5.043449950043e-01 err = 1.0207665562e-09 time = 0.00 sec +[ Info: CTMRG 18: obj = +5.043449950043e-01 err = 3.5215445851e-10 time = 0.00 sec +[ Info: CTMRG 19: obj = +5.043449950043e-01 err = 1.2149427622e-10 time = 0.00 sec +[ Info: CTMRG conv 20: obj = +5.043449950043e-01 err = 4.1898392519e-11 time = 0.10 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.25e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 8.54e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 6.78e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 4.41e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 1.85e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 43, time 746.22 s: f = -0.661494994773, ‖∇f‖ = 2.7924e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.027450069913e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.027378701297e-01 err = 5.1094487540e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +5.027370044925e-01 err = 2.0610784853e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +5.027369010069e-01 err = 8.9218148869e-03 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.027368888989e-01 err = 5.8962347694e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.027368874749e-01 err = 1.7424506238e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.027368873071e-01 err = 3.6499390894e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +5.027368872873e-01 err = 5.9104469886e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.027368872850e-01 err = 1.0134500875e-05 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.027368872847e-01 err = 2.6327575699e-06 time = 0.01 sec +[ Info: CTMRG 10: obj = +5.027368872847e-01 err = 7.7928412920e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.027368872847e-01 err = 2.5620774270e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +5.027368872847e-01 err = 8.6761876916e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.027368872847e-01 err = 2.9808928092e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.027368872847e-01 err = 1.0273657402e-08 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.027368872847e-01 err = 3.5438348184e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +5.027368872847e-01 err = 1.2221827880e-09 time = 0.00 sec +[ Info: CTMRG 17: obj = +5.027368872847e-01 err = 4.2139137129e-10 time = 0.00 sec +[ Info: CTMRG 18: obj = +5.027368872847e-01 err = 1.4519064354e-10 time = 0.00 sec +[ Info: CTMRG conv 19: obj = +5.027368872847e-01 err = 5.0033079164e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.27e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 9.03e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 5.65e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 3.29e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 2.45e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 44, time 746.42 s: f = -0.661665032445, ‖∇f‖ = 2.1193e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.997259388265e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.997434091165e-01 err = 2.1319379898e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.997424394894e-01 err = 3.1440794778e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.997423047248e-01 err = 8.9566756650e-03 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.997422872813e-01 err = 7.8488341655e-03 time = 0.01 sec +[ Info: CTMRG 5: obj = +4.997422850616e-01 err = 1.5740316196e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.997422847814e-01 err = 1.7287364053e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.997422847462e-01 err = 3.5399981148e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.997422847418e-01 err = 7.5354269222e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.997422847413e-01 err = 1.7472653580e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.997422847412e-01 err = 4.7902544415e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.997422847412e-01 err = 1.5276794453e-07 time = 0.01 sec +[ Info: CTMRG 12: obj = +4.997422847412e-01 err = 5.3831290570e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.997422847412e-01 err = 1.9059392235e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.997422847412e-01 err = 6.7681376868e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.997422847412e-01 err = 2.4084368673e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.997422847412e-01 err = 8.5816732731e-10 time = 0.00 sec +[ Info: CTMRG 17: obj = +4.997422847412e-01 err = 3.0600090431e-10 time = 0.00 sec +[ Info: CTMRG 18: obj = +4.997422847412e-01 err = 1.0917235381e-10 time = 0.01 sec +[ Info: CTMRG conv 19: obj = +4.997422847412e-01 err = 3.8984024490e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.22e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 7.73e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.33e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 2.04e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 1.93e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 45, time 746.63 s: f = -0.661840699875, ‖∇f‖ = 2.3535e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.912350354529e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.912801591534e-01 err = 4.9201443171e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.912817703942e-01 err = 9.4018965645e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.912819658265e-01 err = 1.3882058341e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.912819946837e-01 err = 2.2253187793e-02 time = 0.01 sec +[ Info: CTMRG 5: obj = +4.912819989460e-01 err = 5.2173976273e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.912819995745e-01 err = 8.4145188946e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.912819996671e-01 err = 1.1678436587e-04 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.912819996808e-01 err = 2.1299738318e-05 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.912819996829e-01 err = 3.8322897521e-06 time = 0.01 sec +[ Info: CTMRG 10: obj = +4.912819996832e-01 err = 8.3512527203e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.912819996832e-01 err = 2.2574105482e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.912819996832e-01 err = 7.7895221879e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.912819996832e-01 err = 2.9696038140e-08 time = 0.01 sec +[ Info: CTMRG 14: obj = +4.912819996832e-01 err = 1.1434886267e-08 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.912819996832e-01 err = 4.4168598480e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.912819996832e-01 err = 1.7079986063e-09 time = 0.00 sec +[ Info: CTMRG 17: obj = +4.912819996832e-01 err = 6.6070850458e-10 time = 0.01 sec +[ Info: CTMRG 18: obj = +4.912819996832e-01 err = 2.5565601745e-10 time = 0.00 sec +[ Info: CTMRG conv 19: obj = +4.912819996832e-01 err = 9.8917416004e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.25e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 8.46e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 5.16e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 2.47e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 1.85e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 46, time 746.84 s: f = -0.661983211854, ‖∇f‖ = 2.0945e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +5.025330516247e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +5.025013161656e-01 err = 3.7262956909e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +5.024982636995e-01 err = 5.9104360401e-02 time = 0.01 sec +[ Info: CTMRG 3: obj = +5.024978015183e-01 err = 1.9898674105e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +5.024977361778e-01 err = 2.0977057198e-02 time = 0.00 sec +[ Info: CTMRG 5: obj = +5.024977271904e-01 err = 4.8084494692e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +5.024977259681e-01 err = 5.5766592047e-04 time = 0.01 sec +[ Info: CTMRG 7: obj = +5.024977258026e-01 err = 6.5443767084e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +5.024977257802e-01 err = 1.0298289364e-05 time = 0.00 sec +[ Info: CTMRG 9: obj = +5.024977257772e-01 err = 2.5804937220e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +5.024977257768e-01 err = 8.1137457236e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +5.024977257768e-01 err = 2.8719120710e-07 time = 0.01 sec +[ Info: CTMRG 12: obj = +5.024977257767e-01 err = 1.0504451781e-07 time = 0.00 sec +[ Info: CTMRG 13: obj = +5.024977257767e-01 err = 3.8941462508e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +5.024977257767e-01 err = 1.4491179912e-08 time = 0.00 sec +[ Info: CTMRG 15: obj = +5.024977257767e-01 err = 5.4009794604e-09 time = 0.01 sec +[ Info: CTMRG 16: obj = +5.024977257767e-01 err = 2.0140266561e-09 time = 0.00 sec +[ Info: CTMRG 17: obj = +5.024977257767e-01 err = 7.5124019201e-10 time = 0.00 sec +[ Info: CTMRG 18: obj = +5.024977257767e-01 err = 2.8023658102e-10 time = 0.00 sec +[ Info: CTMRG 19: obj = +5.024977257767e-01 err = 1.0453510150e-10 time = 0.01 sec +[ Info: CTMRG conv 20: obj = +5.024977257767e-01 err = 3.9037482248e-11 time = 0.10 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.40e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 9.88e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.57e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 2.17e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 1.83e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 47, time 747.06 s: f = -0.662069016591, ‖∇f‖ = 1.9084e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.864801008385e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.866290742665e-01 err = 4.9250010918e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.866281147451e-01 err = 6.7595039472e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.866277796217e-01 err = 2.2923353155e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.866277230508e-01 err = 2.6443022022e-02 time = 0.01 sec +[ Info: CTMRG 5: obj = +4.866277139855e-01 err = 7.3747801331e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.866277125523e-01 err = 1.4227474364e-03 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.866277123270e-01 err = 2.2988468978e-04 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.866277122917e-01 err = 3.7643953857e-05 time = 0.01 sec +[ Info: CTMRG 9: obj = +4.866277122861e-01 err = 6.5965927946e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.866277122853e-01 err = 1.2085745198e-06 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.866277122851e-01 err = 2.8540650146e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.866277122851e-01 err = 1.2829494096e-07 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.866277122851e-01 err = 5.4456178407e-08 time = 0.01 sec +[ Info: CTMRG 14: obj = +4.866277122851e-01 err = 2.2285903244e-08 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.866277122851e-01 err = 8.9850902997e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.866277122851e-01 err = 3.6010095035e-09 time = 0.00 sec +[ Info: CTMRG 17: obj = +4.866277122851e-01 err = 1.4399030956e-09 time = 0.01 sec +[ Info: CTMRG 18: obj = +4.866277122851e-01 err = 5.7521663851e-10 time = 0.00 sec +[ Info: CTMRG 19: obj = +4.866277122851e-01 err = 2.2974368228e-10 time = 0.00 sec +[ Info: CTMRG conv 20: obj = +4.866277122851e-01 err = 9.1731499957e-11 time = 0.10 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.43e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.03e-04 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.02e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 2.13e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 3.30e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 48, time 747.27 s: f = -0.662233515834, ‖∇f‖ = 1.7527e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.865762026415e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.865552131075e-01 err = 2.5099336574e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.865543433734e-01 err = 1.6187632893e-02 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.865541812568e-01 err = 1.2454578674e-02 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.865541532339e-01 err = 2.6180836383e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.865541485675e-01 err = 1.3770069427e-03 time = 0.01 sec +[ Info: CTMRG 6: obj = +4.865541478018e-01 err = 3.0527243762e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.865541476768e-01 err = 6.5580721151e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.865541476564e-01 err = 1.2631547800e-05 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.865541476531e-01 err = 2.4491119457e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.865541476526e-01 err = 6.0792872105e-07 time = 0.01 sec +[ Info: CTMRG 11: obj = +4.865541476525e-01 err = 2.4500096860e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.865541476525e-01 err = 1.0074365221e-07 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.865541476525e-01 err = 4.1130823135e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.865541476525e-01 err = 1.6694836785e-08 time = 0.01 sec +[ Info: CTMRG 15: obj = +4.865541476525e-01 err = 6.7564919172e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.865541476525e-01 err = 2.7308124124e-09 time = 0.00 sec +[ Info: CTMRG 17: obj = +4.865541476525e-01 err = 1.1031092630e-09 time = 0.00 sec +[ Info: CTMRG 18: obj = +4.865541476525e-01 err = 4.4549134178e-10 time = 0.01 sec +[ Info: CTMRG 19: obj = +4.865541476525e-01 err = 1.7989576062e-10 time = 0.00 sec +[ Info: CTMRG conv 20: obj = +4.865541476525e-01 err = 7.2639870177e-11 time = 0.10 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.39e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 8.75e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.32e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 2.39e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 2.83e-07 +└ * number of operations = 7 +[ Info: CTMRG init: obj = +4.867581560856e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.867519001252e-01 err = 1.2951453645e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.867516101978e-01 err = 9.1993381187e-03 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.867515568795e-01 err = 6.2073431202e-03 time = 0.01 sec +[ Info: CTMRG 4: obj = +4.867515477783e-01 err = 1.3390206492e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.867515462749e-01 err = 6.3459200659e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.867515460297e-01 err = 1.2048535350e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.867515459899e-01 err = 2.6264484414e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.867515459835e-01 err = 4.9481206357e-06 time = 0.01 sec +[ Info: CTMRG 9: obj = +4.867515459824e-01 err = 1.0106694922e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.867515459823e-01 err = 3.1666024681e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.867515459822e-01 err = 1.3614558734e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.867515459822e-01 err = 5.6526890923e-08 time = 0.01 sec +[ Info: CTMRG 13: obj = +4.867515459822e-01 err = 2.3047740445e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.867515459822e-01 err = 9.3186500948e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.867515459822e-01 err = 3.7542292065e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.867515459822e-01 err = 1.5101684939e-09 time = 0.00 sec +[ Info: CTMRG 17: obj = +4.867515459822e-01 err = 6.0707054414e-10 time = 0.01 sec +[ Info: CTMRG 18: obj = +4.867515459822e-01 err = 2.4398323899e-10 time = 0.00 sec +[ Info: CTMRG conv 19: obj = +4.867515459822e-01 err = 9.8042421643e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.40e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 8.02e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.72e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.78e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 2.56e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 49, time 747.70 s: f = -0.662332106545, ‖∇f‖ = 1.6912e-02, α = 5.23e-01, m = 16, nfg = 2 +[ Info: CTMRG init: obj = +4.862950588272e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.862840325625e-01 err = 9.1042291527e-03 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.862839806779e-01 err = 6.6410828656e-03 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.862839797666e-01 err = 6.8678084765e-03 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.862839797727e-01 err = 2.6672908191e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.862839797791e-01 err = 7.2026531035e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.862839797805e-01 err = 1.3225164977e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.862839797808e-01 err = 2.0312511868e-05 time = 0.01 sec +[ Info: CTMRG 8: obj = +4.862839797808e-01 err = 3.5372990652e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.862839797808e-01 err = 5.5125618545e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.862839797808e-01 err = 2.1581964431e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.862839797808e-01 err = 9.4072818763e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.862839797808e-01 err = 3.9343276160e-08 time = 0.01 sec +[ Info: CTMRG 13: obj = +4.862839797808e-01 err = 1.6104078487e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.862839797808e-01 err = 6.5346722834e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.862839797808e-01 err = 2.6423533830e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.862839797808e-01 err = 1.0668463153e-09 time = 0.01 sec +[ Info: CTMRG 17: obj = +4.862839797808e-01 err = 4.3042610028e-10 time = 0.00 sec +[ Info: CTMRG 18: obj = +4.862839797808e-01 err = 1.7360600259e-10 time = 0.00 sec +[ Info: CTMRG conv 19: obj = +4.862839797808e-01 err = 7.0003540153e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.42e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 8.10e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.19e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 2.30e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 2.76e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 50, time 747.91 s: f = -0.662397705763, ‖∇f‖ = 1.0361e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.893824468396e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.893695986099e-01 err = 1.1390621318e-02 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.893690571249e-01 err = 1.3380894274e-02 time = 0.05 sec +[ Info: CTMRG 3: obj = +4.893689684468e-01 err = 5.4894625530e-03 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.893689539309e-01 err = 7.8963541007e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.893689515958e-01 err = 1.7736394097e-03 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.893689512234e-01 err = 3.0241836955e-04 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.893689511642e-01 err = 4.8275441414e-05 time = 0.24 sec +[ Info: CTMRG 8: obj = +4.893689511548e-01 err = 8.2763977483e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.893689511533e-01 err = 1.2655865883e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.893689511530e-01 err = 1.7864090952e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.893689511530e-01 err = 4.9868465607e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.893689511530e-01 err = 1.9670269269e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.893689511530e-01 err = 8.0856259813e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.893689511530e-01 err = 3.2837613747e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.893689511530e-01 err = 1.3220813178e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.893689511530e-01 err = 5.3021149954e-10 time = 0.00 sec +[ Info: CTMRG 17: obj = +4.893689511530e-01 err = 2.1230558278e-10 time = 0.00 sec +[ Info: CTMRG conv 18: obj = +4.893689511530e-01 err = 8.4959096968e-11 time = 0.36 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.47e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 6.80e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.78e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 2.31e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 2.42e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 51, time 748.41 s: f = -0.662434512495, ‖∇f‖ = 8.3812e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.873344619303e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.873334243454e-01 err = 1.1099105959e-02 time = 0.01 sec +[ Info: CTMRG 2: obj = +4.873335983033e-01 err = 8.6096569291e-03 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.873336272395e-01 err = 2.6157767972e-03 time = 0.01 sec +[ Info: CTMRG 4: obj = +4.873336320352e-01 err = 4.1745171164e-03 time = 0.01 sec +[ Info: CTMRG 5: obj = +4.873336328165e-01 err = 1.1163254230e-03 time = 0.01 sec +[ Info: CTMRG 6: obj = +4.873336329429e-01 err = 2.0388090381e-04 time = 0.01 sec +[ Info: CTMRG 7: obj = +4.873336329633e-01 err = 3.6754193314e-05 time = 0.01 sec +[ Info: CTMRG 8: obj = +4.873336329666e-01 err = 6.8538024408e-06 time = 0.01 sec +[ Info: CTMRG 9: obj = +4.873336329672e-01 err = 1.1628953574e-06 time = 0.02 sec +[ Info: CTMRG 10: obj = +4.873336329672e-01 err = 2.1627590876e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.873336329673e-01 err = 7.3713651650e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.873336329673e-01 err = 3.0177412450e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.873336329673e-01 err = 1.2273757232e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.873336329673e-01 err = 4.9615562975e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.873336329673e-01 err = 1.9987296371e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.873336329673e-01 err = 8.0378253946e-10 time = 0.00 sec +[ Info: CTMRG 17: obj = +4.873336329673e-01 err = 3.2293571004e-10 time = 0.00 sec +[ Info: CTMRG 18: obj = +4.873336329673e-01 err = 1.2967864134e-10 time = 0.00 sec +[ Info: CTMRG conv 19: obj = +4.873336329673e-01 err = 5.2056103107e-11 time = 0.12 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.46e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 6.12e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 5.56e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 4.11e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 1.75e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 52, time 748.64 s: f = -0.662459914679, ‖∇f‖ = 5.8461e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.881417718274e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.881483950633e-01 err = 7.7310558650e-03 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.881497700741e-01 err = 4.1319082935e-03 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.881500114941e-01 err = 4.5310278701e-03 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.881500510368e-01 err = 3.0184843576e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.881500573751e-01 err = 9.4074464583e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.881500583830e-01 err = 2.0584326057e-04 time = 0.02 sec +[ Info: CTMRG 7: obj = +4.881500585428e-01 err = 4.1745001617e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.881500585681e-01 err = 9.1099662777e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.881500585721e-01 err = 2.4020935540e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.881500585727e-01 err = 7.6979464331e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.881500585728e-01 err = 2.9823699018e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.881500585728e-01 err = 1.1924474760e-07 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.881500585728e-01 err = 4.7569922080e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.881500585728e-01 err = 1.8950455035e-08 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.881500585728e-01 err = 7.5428339398e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.881500585728e-01 err = 3.0006434320e-09 time = 0.00 sec +[ Info: CTMRG 17: obj = +4.881500585728e-01 err = 1.1932906845e-09 time = 0.00 sec +[ Info: CTMRG 18: obj = +4.881500585728e-01 err = 4.7443931848e-10 time = 0.00 sec +[ Info: CTMRG 19: obj = +4.881500585728e-01 err = 1.8861717720e-10 time = 0.00 sec +[ Info: CTMRG conv 20: obj = +4.881500585728e-01 err = 7.4967997746e-11 time = 0.10 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.46e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.29e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.23e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 2.14e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 6.94e-08 +└ * number of operations = 7 +[ Info: LBFGS: iter 53, time 748.85 s: f = -0.662475090799, ‖∇f‖ = 1.1955e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.877652814782e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.877728053729e-01 err = 3.8203207689e-03 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.877744730022e-01 err = 2.7511456268e-03 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.877747604877e-01 err = 8.8932653684e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.877748072897e-01 err = 4.0671907071e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.877748147618e-01 err = 9.5452965796e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.877748159459e-01 err = 2.5790260975e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.877748161331e-01 err = 9.5666705065e-06 time = 0.01 sec +[ Info: CTMRG 8: obj = +4.877748161626e-01 err = 3.9937545292e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.877748161673e-01 err = 1.6485960408e-06 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.877748161680e-01 err = 6.6740022927e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.877748161681e-01 err = 2.6831715970e-07 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.877748161681e-01 err = 1.0727982803e-07 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.877748161681e-01 err = 4.2774024155e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.877748161681e-01 err = 1.7022782053e-08 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.877748161681e-01 err = 6.7671325669e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.877748161681e-01 err = 2.6882700423e-09 time = 0.00 sec +[ Info: CTMRG 17: obj = +4.877748161681e-01 err = 1.0674561471e-09 time = 0.00 sec +[ Info: CTMRG 18: obj = +4.877748161681e-01 err = 4.2374832168e-10 time = 0.00 sec +[ Info: CTMRG 19: obj = +4.877748161681e-01 err = 1.6818826336e-10 time = 0.00 sec +[ Info: CTMRG conv 20: obj = +4.877748161681e-01 err = 6.6746769170e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.46e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 3.00e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 7.46e-06 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.49e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 6.68e-08 +└ * number of operations = 7 +[ Info: LBFGS: iter 54, time 749.07 s: f = -0.662490551714, ‖∇f‖ = 4.3803e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.870317675865e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.870319253809e-01 err = 1.6664736676e-03 time = 0.01 sec +[ Info: CTMRG 2: obj = +4.870319134703e-01 err = 2.0776644147e-03 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.870319111716e-01 err = 1.1544245835e-03 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.870319107945e-01 err = 1.6366022073e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.870319107340e-01 err = 4.3842632216e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.870319107244e-01 err = 9.2273610132e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.870319107229e-01 err = 1.6440142298e-05 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.870319107226e-01 err = 2.7580834334e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.870319107226e-01 err = 4.5313147574e-07 time = 0.01 sec +[ Info: CTMRG 10: obj = +4.870319107226e-01 err = 7.3039979726e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.870319107226e-01 err = 1.3531950605e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.870319107226e-01 err = 3.9906609488e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.870319107226e-01 err = 1.5633451124e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.870319107226e-01 err = 6.3301560351e-10 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.870319107226e-01 err = 2.5470583934e-10 time = 0.01 sec +[ Info: CTMRG 16: obj = +4.870319107226e-01 err = 1.0193232141e-10 time = 0.00 sec +[ Info: CTMRG conv 17: obj = +4.870319107226e-01 err = 4.0689835072e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.47e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 3.30e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.28e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.14e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 8.02e-08 +└ * number of operations = 7 +[ Info: LBFGS: iter 55, time 749.27 s: f = -0.662494796646, ‖∇f‖ = 3.0803e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.867774155272e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.867774505566e-01 err = 2.4129670839e-03 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.867774604484e-01 err = 8.2999637010e-04 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.867774624891e-01 err = 1.2052675009e-03 time = 0.01 sec +[ Info: CTMRG 4: obj = +4.867774628317e-01 err = 7.8406209004e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.867774628872e-01 err = 2.2233661270e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.867774628961e-01 err = 4.7774794494e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.867774628975e-01 err = 9.2935061620e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.867774628978e-01 err = 1.6530791481e-06 time = 0.01 sec +[ Info: CTMRG 9: obj = +4.867774628978e-01 err = 2.9460621382e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.867774628978e-01 err = 9.1416010636e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.867774628978e-01 err = 3.4838553222e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.867774628978e-01 err = 1.3854341983e-08 time = 0.01 sec +[ Info: CTMRG 13: obj = +4.867774628978e-01 err = 5.5451742816e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.867774628978e-01 err = 2.2193757470e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.867774628978e-01 err = 8.8782169049e-10 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.867774628978e-01 err = 3.5499098017e-10 time = 0.01 sec +[ Info: CTMRG 17: obj = +4.867774628978e-01 err = 1.4189740703e-10 time = 0.00 sec +[ Info: CTMRG conv 18: obj = +4.867774628978e-01 err = 5.6705989414e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.18e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.72e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 2.62e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 1.12e-07 +└ * number of operations = 7 +[ Info: LBFGS: iter 56, time 749.48 s: f = -0.662500144159, ‖∇f‖ = 3.3935e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.860002353379e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.860013431488e-01 err = 3.3115184730e-03 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.860014757934e-01 err = 4.6320537559e-03 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.860014988886e-01 err = 1.0460184063e-03 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.860015027168e-01 err = 1.8618600125e-03 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.860015033390e-01 err = 3.9521060768e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.860015034393e-01 err = 6.9796470271e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.860015034555e-01 err = 1.4529615635e-05 time = 0.01 sec +[ Info: CTMRG 8: obj = +4.860015034581e-01 err = 2.6751335073e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.860015034585e-01 err = 6.7074458469e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.860015034586e-01 err = 2.6579258020e-07 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.860015034586e-01 err = 1.0816693846e-07 time = 0.01 sec +[ Info: CTMRG 12: obj = +4.860015034586e-01 err = 4.3801274739e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.860015034586e-01 err = 1.7649287882e-08 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.860015034586e-01 err = 7.0924442397e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.860015034586e-01 err = 2.8461462794e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.860015034586e-01 err = 1.1412987761e-09 time = 0.01 sec +[ Info: CTMRG 17: obj = +4.860015034586e-01 err = 4.5747320396e-10 time = 0.00 sec +[ Info: CTMRG 18: obj = +4.860015034586e-01 err = 1.8333045843e-10 time = 0.00 sec +[ Info: CTMRG conv 19: obj = +4.860015034586e-01 err = 7.3458567112e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.47e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.71e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.65e-05 +[ Info: BiCGStab linsolve in iteration 2: normres = 8.38e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 6.50e-08 +└ * number of operations = 7 +[ Info: LBFGS: iter 57, time 749.69 s: f = -0.662501922158, ‖∇f‖ = 5.3636e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.863578737185e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.863579909469e-01 err = 9.5313618234e-04 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.863580289693e-01 err = 1.3994846381e-03 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.863580355929e-01 err = 4.1410928667e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.863580366873e-01 err = 7.3460619254e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.863580368647e-01 err = 1.7260360784e-04 time = 0.01 sec +[ Info: CTMRG 6: obj = +4.863580368932e-01 err = 3.4080997535e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.863580368978e-01 err = 7.2299169005e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.863580368985e-01 err = 1.3644740944e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.863580368986e-01 err = 3.1155296829e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.863580368986e-01 err = 1.2542758283e-07 time = 0.01 sec +[ Info: CTMRG 11: obj = +4.863580368986e-01 err = 5.1015432158e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.863580368986e-01 err = 2.0633187411e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.863580368986e-01 err = 8.3082140012e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.863580368986e-01 err = 3.3371382732e-09 time = 0.01 sec +[ Info: CTMRG 15: obj = +4.863580368986e-01 err = 1.3385872957e-09 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.863580368986e-01 err = 5.3652763580e-10 time = 0.00 sec +[ Info: CTMRG 17: obj = +4.863580368986e-01 err = 2.1494620807e-10 time = 0.00 sec +[ Info: CTMRG conv 18: obj = +4.863580368986e-01 err = 8.6095563925e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.47e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.21e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.23e-05 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 4.60e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 58, time 749.89 s: f = -0.662504711089, ‖∇f‖ = 2.3876e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.866212669635e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.866213613100e-01 err = 1.4759657582e-03 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.866213747809e-01 err = 7.9289524373e-04 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.866213771274e-01 err = 5.1306401193e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.866213775143e-01 err = 4.2065930893e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.866213775769e-01 err = 1.0562284232e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.866213775869e-01 err = 2.4072274243e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.866213775886e-01 err = 5.1736460954e-06 time = 0.01 sec +[ Info: CTMRG 8: obj = +4.866213775888e-01 err = 9.8532084572e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.866213775889e-01 err = 1.9730125915e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.866213775889e-01 err = 7.1167411583e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.866213775889e-01 err = 2.8948314389e-08 time = 0.01 sec +[ Info: CTMRG 12: obj = +4.866213775889e-01 err = 1.1741049954e-08 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.866213775889e-01 err = 4.7348494686e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.866213775889e-01 err = 1.9029961332e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.866213775889e-01 err = 7.6342973253e-10 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.866213775889e-01 err = 3.0595469313e-10 time = 0.01 sec +[ Info: CTMRG 17: obj = +4.866213775889e-01 err = 1.2254344743e-10 time = 0.00 sec +[ Info: CTMRG conv 18: obj = +4.866213775889e-01 err = 4.9069377092e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.47e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 3.55e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 8.70e-06 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.81e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 8.12e-08 +└ * number of operations = 7 +[ Info: LBFGS: iter 59, time 750.10 s: f = -0.662506778078, ‖∇f‖ = 1.8200e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.867458482880e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.867459827181e-01 err = 1.9349503462e-03 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.867459822846e-01 err = 5.3929265647e-04 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.867459822054e-01 err = 7.3569257296e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.867459821906e-01 err = 2.0179568136e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.867459821881e-01 err = 6.4892812865e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.867459821877e-01 err = 1.3236857494e-05 time = 0.01 sec +[ Info: CTMRG 7: obj = +4.867459821876e-01 err = 2.2794381970e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.867459821876e-01 err = 3.7412876605e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.867459821876e-01 err = 7.6207185477e-08 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.867459821876e-01 err = 2.5410811418e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.867459821876e-01 err = 1.0282660307e-08 time = 0.01 sec +[ Info: CTMRG 12: obj = +4.867459821876e-01 err = 4.1984756534e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.867459821876e-01 err = 1.6973518368e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.867459821876e-01 err = 6.8235565697e-10 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.867459821876e-01 err = 2.7355442340e-10 time = 0.01 sec +[ Info: CTMRG 16: obj = +4.867459821876e-01 err = 1.0951984365e-10 time = 0.00 sec +[ Info: CTMRG conv 17: obj = +4.867459821876e-01 err = 4.3822209879e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.47e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 2.97e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 7.14e-06 +[ Info: BiCGStab linsolve in iteration 2: normres = 1.54e-06 +┌ Info: BiCGStab linsolve converged at iteration 2.5: +│ * norm of residual = 6.11e-08 +└ * number of operations = 7 +[ Info: LBFGS: iter 60, time 750.31 s: f = -0.662508721362, ‖∇f‖ = 1.9946e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.869287389745e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.869286597747e-01 err = 1.9940602121e-03 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.869286601384e-01 err = 1.3841587518e-03 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.869286603601e-01 err = 1.4840542536e-03 time = 0.01 sec +[ Info: CTMRG 4: obj = +4.869286603954e-01 err = 3.1301968780e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.869286604010e-01 err = 1.2092804596e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.869286604018e-01 err = 2.8689931889e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.869286604020e-01 err = 5.3905012256e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.869286604020e-01 err = 9.2092243926e-07 time = 0.01 sec +[ Info: CTMRG 9: obj = +4.869286604020e-01 err = 1.7574894868e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.869286604020e-01 err = 4.6388651259e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.869286604020e-01 err = 1.6794589504e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.869286604020e-01 err = 6.6199291963e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.869286604020e-01 err = 2.6456375835e-09 time = 0.01 sec +[ Info: CTMRG 14: obj = +4.869286604020e-01 err = 1.0581734137e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.869286604020e-01 err = 4.2307623696e-10 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.869286604020e-01 err = 1.6908030361e-10 time = 0.00 sec +[ Info: CTMRG conv 17: obj = +4.869286604020e-01 err = 6.7554981369e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.47e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 2.10e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 5.78e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 6.48e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 61, time 750.51 s: f = -0.662510450644, ‖∇f‖ = 3.2749e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.872775787444e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.872777894551e-01 err = 2.3434221429e-03 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.872777841895e-01 err = 1.8813696812e-03 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.872777833132e-01 err = 6.1073374493e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.872777831708e-01 err = 6.8243763429e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.872777831478e-01 err = 1.5065789801e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.872777831441e-01 err = 2.6638126130e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.872777831435e-01 err = 4.2841700114e-06 time = 0.01 sec +[ Info: CTMRG 8: obj = +4.872777831434e-01 err = 7.6306045732e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.872777831434e-01 err = 1.8614599385e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.872777831434e-01 err = 6.3967311729e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.872777831434e-01 err = 2.4744609316e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.872777831434e-01 err = 9.8243799941e-09 time = 0.01 sec +[ Info: CTMRG 13: obj = +4.872777831434e-01 err = 3.9171440203e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.872777831434e-01 err = 1.5629020137e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.872777831434e-01 err = 6.2344782858e-10 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.872777831434e-01 err = 2.4863067289e-10 time = 0.01 sec +[ Info: CTMRG conv 17: obj = +4.872777831434e-01 err = 9.9130046892e-11 time = 0.09 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.49e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 3.08e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.17e-05 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 8.75e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 62, time 750.71 s: f = -0.662510853517, ‖∇f‖ = 2.9884e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.870813040506e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.870813615032e-01 err = 1.2913179703e-03 time = 0.05 sec +[ Info: CTMRG 2: obj = +4.870813597568e-01 err = 9.8483687344e-04 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.870813594482e-01 err = 3.1885953822e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.870813593976e-01 err = 3.8106446287e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.870813593894e-01 err = 8.5842328305e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.870813593881e-01 err = 1.4678094852e-05 time = 0.24 sec +[ Info: CTMRG 7: obj = +4.870813593879e-01 err = 2.9454756324e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.870813593879e-01 err = 5.6025443041e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.870813593879e-01 err = 9.5459992712e-08 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.870813593879e-01 err = 1.6099638575e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.870813593879e-01 err = 5.7201685986e-09 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.870813593879e-01 err = 2.2454381617e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.870813593879e-01 err = 8.9491949405e-10 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.870813593879e-01 err = 3.5715708112e-10 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.870813593879e-01 err = 1.4253943748e-10 time = 0.00 sec +[ Info: CTMRG conv 16: obj = +4.870813593879e-01 err = 5.6877686023e-11 time = 0.35 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 2.04e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 7.36e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 2.05e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 63, time 751.17 s: f = -0.662511685410, ‖∇f‖ = 8.0551e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.870349859529e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.870349859999e-01 err = 2.0991342629e-04 time = 0.01 sec +[ Info: CTMRG 2: obj = +4.870349862326e-01 err = 1.7244951606e-04 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.870349862713e-01 err = 1.2109232875e-04 time = 0.01 sec +[ Info: CTMRG 4: obj = +4.870349862776e-01 err = 9.9158329777e-05 time = 0.01 sec +[ Info: CTMRG 5: obj = +4.870349862786e-01 err = 2.3228423778e-05 time = 0.01 sec +[ Info: CTMRG 6: obj = +4.870349862788e-01 err = 4.6330789052e-06 time = 0.01 sec +[ Info: CTMRG 7: obj = +4.870349862788e-01 err = 1.0140210755e-06 time = 0.01 sec +[ Info: CTMRG 8: obj = +4.870349862788e-01 err = 1.9433795295e-07 time = 0.01 sec +[ Info: CTMRG 9: obj = +4.870349862788e-01 err = 3.5422610687e-08 time = 0.01 sec +[ Info: CTMRG 10: obj = +4.870349862788e-01 err = 7.4279377322e-09 time = 0.01 sec +[ Info: CTMRG 11: obj = +4.870349862788e-01 err = 2.4014400012e-09 time = 0.01 sec +[ Info: CTMRG 12: obj = +4.870349862788e-01 err = 9.7471500618e-10 time = 0.02 sec +[ Info: CTMRG 13: obj = +4.870349862788e-01 err = 3.9332033591e-10 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.870349862788e-01 err = 1.5796076576e-10 time = 0.00 sec +[ Info: CTMRG conv 15: obj = +4.870349862788e-01 err = 6.3284236934e-11 time = 0.12 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.70e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 6.21e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 2.15e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 64, time 751.39 s: f = -0.662511841022, ‖∇f‖ = 7.3596e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.869966911865e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.869966411373e-01 err = 5.2013445409e-04 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.869966429809e-01 err = 2.4833601508e-04 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.869966433178e-01 err = 3.2690554348e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.869966433733e-01 err = 1.3976489212e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.869966433823e-01 err = 3.4992166977e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.869966433837e-01 err = 6.3118717958e-06 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.869966433839e-01 err = 1.4864271828e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.869966433840e-01 err = 2.9818848923e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.869966433840e-01 err = 5.9144279246e-08 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.869966433840e-01 err = 1.4288396759e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.869966433840e-01 err = 5.5280856478e-09 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.869966433840e-01 err = 2.2403524184e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.869966433840e-01 err = 9.0152133171e-10 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.869966433840e-01 err = 3.6153983618e-10 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.869966433840e-01 err = 1.4472500077e-10 time = 0.01 sec +[ Info: CTMRG conv 16: obj = +4.869966433840e-01 err = 5.7875664824e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 7.03e-06 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.11e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 1.59e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 65, time 751.57 s: f = -0.662512305957, ‖∇f‖ = 8.4091e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.869623538089e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.869623228070e-01 err = 6.3829661358e-04 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.869623230353e-01 err = 3.8613461334e-04 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.869623231053e-01 err = 3.5505201312e-04 time = 0.01 sec +[ Info: CTMRG 4: obj = +4.869623231176e-01 err = 1.4057040963e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.869623231197e-01 err = 3.5843110600e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.869623231200e-01 err = 5.8504693981e-06 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.869623231200e-01 err = 1.3106255496e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.869623231200e-01 err = 2.5814406020e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.869623231200e-01 err = 5.1426243502e-08 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.869623231200e-01 err = 1.8065260945e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.869623231200e-01 err = 7.3136567715e-09 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.869623231200e-01 err = 2.9477386272e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.869623231200e-01 err = 1.1825459408e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.869623231200e-01 err = 4.7310794397e-10 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.869623231200e-01 err = 1.8903348735e-10 time = 0.00 sec +[ Info: CTMRG conv 16: obj = +4.869623231200e-01 err = 7.5478963908e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 5.49e-06 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.42e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 1.54e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 66, time 751.76 s: f = -0.662512680347, ‖∇f‖ = 7.3318e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.873820030782e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.873820420917e-01 err = 2.2143221946e-03 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.873820372269e-01 err = 2.0481779639e-03 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.873820364679e-01 err = 5.3037962248e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.873820363473e-01 err = 7.5089565140e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.873820363281e-01 err = 1.7017852072e-04 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.873820363251e-01 err = 3.0094963158e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.873820363246e-01 err = 5.8035667300e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.873820363245e-01 err = 1.0447594979e-06 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.873820363245e-01 err = 1.7658119259e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.873820363245e-01 err = 3.0977924964e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.873820363245e-01 err = 7.3032903032e-09 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.873820363245e-01 err = 2.5111531456e-09 time = 0.01 sec +[ Info: CTMRG 13: obj = +4.873820363245e-01 err = 9.8851018512e-10 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.873820363245e-01 err = 3.9522131739e-10 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.873820363245e-01 err = 1.5797195478e-10 time = 0.00 sec +[ Info: CTMRG conv 16: obj = +4.873820363245e-01 err = 6.3028635303e-11 time = 0.07 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.22e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.08e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 3.14e-07 +└ * number of operations = 6 +[ Info: CTMRG init: obj = +4.871502229196e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.871502306089e-01 err = 9.8755224133e-04 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.871502296477e-01 err = 9.0529225624e-04 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.871502294976e-01 err = 2.3382784352e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.871502294737e-01 err = 3.3204031357e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.871502294699e-01 err = 7.5449854396e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.871502294693e-01 err = 1.3361981270e-05 time = 0.01 sec +[ Info: CTMRG 7: obj = +4.871502294692e-01 err = 2.5528415707e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.871502294692e-01 err = 4.5938787008e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.871502294692e-01 err = 7.7466797946e-08 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.871502294692e-01 err = 1.3531039075e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.871502294692e-01 err = 3.2009851233e-09 time = 0.01 sec +[ Info: CTMRG 12: obj = +4.871502294692e-01 err = 1.1117563012e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.871502294692e-01 err = 4.4013941366e-10 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.871502294692e-01 err = 1.7643050257e-10 time = 0.00 sec +[ Info: CTMRG conv 15: obj = +4.871502294692e-01 err = 7.0619373596e-11 time = 0.07 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 7.67e-06 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.99e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 1.65e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 67, time 752.14 s: f = -0.662512901164, ‖∇f‖ = 1.2648e-03, α = 4.44e-01, m = 16, nfg = 2 +[ Info: CTMRG init: obj = +4.871582525206e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.871582439217e-01 err = 7.0361757325e-04 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.871582415394e-01 err = 4.6307068763e-04 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.871582411462e-01 err = 1.9343006639e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.871582410819e-01 err = 5.7876533775e-05 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.871582410716e-01 err = 1.2977387141e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.871582410699e-01 err = 3.0450495296e-06 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.871582410697e-01 err = 6.7359692099e-07 time = 0.01 sec +[ Info: CTMRG 8: obj = +4.871582410696e-01 err = 1.3578179313e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.871582410696e-01 err = 5.2222628038e-08 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.871582410696e-01 err = 2.0864136204e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.871582410696e-01 err = 8.3510027031e-09 time = 0.01 sec +[ Info: CTMRG 12: obj = +4.871582410696e-01 err = 3.3335645189e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.871582410696e-01 err = 1.3299483108e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.871582410696e-01 err = 5.3024874607e-10 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.871582410696e-01 err = 2.1135886950e-10 time = 0.00 sec +[ Info: CTMRG conv 16: obj = +4.871582410696e-01 err = 8.4230456350e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.10e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.20e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 1.86e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 68, time 752.34 s: f = -0.662513239918, ‖∇f‖ = 5.7061e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.871483260462e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.871483438638e-01 err = 3.2602681294e-04 time = 0.01 sec +[ Info: CTMRG 2: obj = +4.871483432773e-01 err = 3.0035296932e-04 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.871483431681e-01 err = 1.6100407782e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.871483431499e-01 err = 1.1686577884e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.871483431469e-01 err = 3.1380876014e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.871483431464e-01 err = 5.5772827525e-06 time = 0.01 sec +[ Info: CTMRG 7: obj = +4.871483431463e-01 err = 9.5246453347e-07 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.871483431463e-01 err = 1.5007471777e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.871483431463e-01 err = 5.2589587229e-08 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.871483431463e-01 err = 2.0682875473e-08 time = 0.01 sec +[ Info: CTMRG 11: obj = +4.871483431463e-01 err = 8.2471209582e-09 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.871483431463e-01 err = 3.2886125745e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.871483431463e-01 err = 1.3117782091e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.871483431463e-01 err = 5.2302126729e-10 time = 0.01 sec +[ Info: CTMRG 15: obj = +4.871483431463e-01 err = 2.0848754569e-10 time = 0.00 sec +[ Info: CTMRG conv 16: obj = +4.871483431463e-01 err = 8.3092252273e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 1.02e-05 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.05e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 1.60e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 69, time 752.53 s: f = -0.662513444109, ‖∇f‖ = 6.0192e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.871055125305e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.871055599359e-01 err = 3.3634784872e-04 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.871055603125e-01 err = 2.5982992996e-04 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.871055603637e-01 err = 4.1946092031e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.871055603714e-01 err = 2.8063187517e-04 time = 0.01 sec +[ Info: CTMRG 5: obj = +4.871055603726e-01 err = 8.7874307642e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.871055603728e-01 err = 1.7319042429e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.871055603728e-01 err = 3.1412622469e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.871055603728e-01 err = 5.0099116614e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.871055603728e-01 err = 8.5149232397e-08 time = 0.01 sec +[ Info: CTMRG 10: obj = +4.871055603728e-01 err = 3.3763644435e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.871055603728e-01 err = 1.3518044681e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.871055603728e-01 err = 5.4068605594e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.871055603728e-01 err = 2.1615959132e-09 time = 0.01 sec +[ Info: CTMRG 14: obj = +4.871055603728e-01 err = 8.6336725923e-10 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.871055603728e-01 err = 3.4466105637e-10 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.871055603728e-01 err = 1.3753924361e-10 time = 0.00 sec +[ Info: CTMRG conv 17: obj = +4.871055603728e-01 err = 5.4873812654e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 8.99e-06 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.90e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 1.40e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 70, time 752.73 s: f = -0.662513692106, ‖∇f‖ = 7.2056e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.871552878423e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.871553915379e-01 err = 8.9202731825e-04 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.871553973321e-01 err = 7.3548423914e-04 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.871553983327e-01 err = 8.3595905074e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.871553984966e-01 err = 1.6546816571e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.871553985229e-01 err = 7.6151164930e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.871553985271e-01 err = 1.7566067674e-05 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.871553985278e-01 err = 3.5257855639e-06 time = 0.01 sec +[ Info: CTMRG 8: obj = +4.871553985279e-01 err = 6.8726358933e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.871553985279e-01 err = 1.7765534459e-07 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.871553985279e-01 err = 6.1463487748e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.871553985279e-01 err = 2.3987614869e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.871553985279e-01 err = 9.5606539508e-09 time = 0.01 sec +[ Info: CTMRG 13: obj = +4.871553985280e-01 err = 3.8234189622e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.871553985279e-01 err = 1.5284842653e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.871553985280e-01 err = 6.1071515684e-10 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.871553985280e-01 err = 2.4389413250e-10 time = 0.01 sec +[ Info: CTMRG conv 17: obj = +4.871553985279e-01 err = 9.7367767317e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.47e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 9.85e-06 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.86e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 2.30e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 71, time 752.93 s: f = -0.662513794204, ‖∇f‖ = 1.0926e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.870955159804e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.870955242317e-01 err = 4.7869063845e-04 time = 0.01 sec +[ Info: CTMRG 2: obj = +4.870955246517e-01 err = 2.6992177903e-04 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.870955247220e-01 err = 1.0961449254e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.870955247336e-01 err = 1.4925804044e-04 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.870955247355e-01 err = 4.8672011520e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.870955247358e-01 err = 1.0918883684e-05 time = 0.01 sec +[ Info: CTMRG 7: obj = +4.870955247358e-01 err = 2.0619789672e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.870955247358e-01 err = 3.6034236211e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.870955247358e-01 err = 6.0273330273e-08 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.870955247358e-01 err = 1.3728687924e-08 time = 0.01 sec +[ Info: CTMRG 11: obj = +4.870955247358e-01 err = 4.9082233078e-09 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.870955247358e-01 err = 1.9226655236e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.870955247358e-01 err = 7.6680180638e-10 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.870955247358e-01 err = 3.0656189433e-10 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.870955247358e-01 err = 1.2255553875e-10 time = 0.01 sec +[ Info: CTMRG conv 16: obj = +4.870955247358e-01 err = 4.8977976333e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 7.75e-06 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.85e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 2.06e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 72, time 753.13 s: f = -0.662513946704, ‖∇f‖ = 4.1373e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.870752269852e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.870752286197e-01 err = 3.9932652563e-04 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.870752288596e-01 err = 2.6466484168e-04 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.870752289037e-01 err = 1.1433401528e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.870752289111e-01 err = 6.2273963197e-05 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.870752289123e-01 err = 2.4705984548e-05 time = 0.01 sec +[ Info: CTMRG 6: obj = +4.870752289125e-01 err = 5.7977075461e-06 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.870752289125e-01 err = 1.1276763650e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.870752289125e-01 err = 2.0656333962e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.870752289125e-01 err = 3.9040725698e-08 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.870752289125e-01 err = 1.1485978827e-08 time = 0.01 sec +[ Info: CTMRG 11: obj = +4.870752289125e-01 err = 4.6100960558e-09 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.870752289125e-01 err = 1.8568373167e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.870752289125e-01 err = 7.4561344742e-10 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.870752289125e-01 err = 2.9872031965e-10 time = 0.01 sec +[ Info: CTMRG 15: obj = +4.870752289125e-01 err = 1.1950654362e-10 time = 0.00 sec +[ Info: CTMRG conv 16: obj = +4.870752289125e-01 err = 4.7763719917e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 5.47e-06 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.71e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 1.69e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 73, time 753.36 s: f = -0.662514020708, ‖∇f‖ = 3.2774e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.870813432406e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.870813453148e-01 err = 1.8834962320e-04 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.870813452681e-01 err = 1.2686730260e-04 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.870813452625e-01 err = 1.3145315247e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.870813452617e-01 err = 3.1816344042e-05 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.870813452615e-01 err = 1.0342581760e-05 time = 0.24 sec +[ Info: CTMRG 6: obj = +4.870813452615e-01 err = 2.0854868107e-06 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.870813452615e-01 err = 3.6519336561e-07 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.870813452615e-01 err = 6.4424421015e-08 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.870813452615e-01 err = 1.3843181511e-08 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.870813452615e-01 err = 4.3185362476e-09 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.870813452615e-01 err = 1.6324287363e-09 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.870813452615e-01 err = 6.4480857565e-10 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.870813452615e-01 err = 2.5663103239e-10 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.870813452615e-01 err = 1.0229134609e-10 time = 0.00 sec +[ Info: CTMRG conv 15: obj = +4.870813452615e-01 err = 4.0787669868e-11 time = 0.30 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.50e-06 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.14e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 1.35e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 74, time 753.78 s: f = -0.662514074542, ‖∇f‖ = 4.1795e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.870722344844e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.870723291553e-01 err = 2.5941061633e-04 time = 0.01 sec +[ Info: CTMRG 2: obj = +4.870723464056e-01 err = 1.1084784840e-04 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.870723494464e-01 err = 9.3758282099e-05 time = 0.01 sec +[ Info: CTMRG 4: obj = +4.870723499475e-01 err = 9.4297775847e-05 time = 0.01 sec +[ Info: CTMRG 5: obj = +4.870723500284e-01 err = 2.5561657323e-05 time = 0.01 sec +[ Info: CTMRG 6: obj = +4.870723500413e-01 err = 4.6248610944e-06 time = 0.01 sec +[ Info: CTMRG 7: obj = +4.870723500434e-01 err = 1.1436931887e-06 time = 0.01 sec +[ Info: CTMRG 8: obj = +4.870723500437e-01 err = 4.3630391336e-07 time = 0.01 sec +[ Info: CTMRG 9: obj = +4.870723500438e-01 err = 1.7801537182e-07 time = 0.01 sec +[ Info: CTMRG 10: obj = +4.870723500438e-01 err = 7.2554332340e-08 time = 0.01 sec +[ Info: CTMRG 11: obj = +4.870723500438e-01 err = 2.9358076362e-08 time = 0.01 sec +[ Info: CTMRG 12: obj = +4.870723500438e-01 err = 1.1810976534e-08 time = 0.02 sec +[ Info: CTMRG 13: obj = +4.870723500438e-01 err = 4.7359284405e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.870723500438e-01 err = 1.8951827955e-09 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.870723500438e-01 err = 7.5749821459e-10 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.870723500438e-01 err = 3.0254736910e-10 time = 0.00 sec +[ Info: CTMRG 17: obj = +4.870723500438e-01 err = 1.2078791119e-10 time = 0.00 sec +[ Info: CTMRG conv 18: obj = +4.870723500438e-01 err = 4.8208653950e-11 time = 0.13 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 5.69e-06 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.36e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 1.06e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 75, time 754.01 s: f = -0.662514105503, ‖∇f‖ = 9.0816e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.871059996010e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.871060260824e-01 err = 2.3212975558e-04 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.871060313226e-01 err = 6.0366707495e-05 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.871060322339e-01 err = 4.2781800076e-05 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.871060323836e-01 err = 9.7161530041e-05 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.871060324077e-01 err = 2.6294097185e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.871060324116e-01 err = 5.1769823968e-06 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.871060324122e-01 err = 9.8695437433e-07 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.871060324123e-01 err = 2.4648367451e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.871060324123e-01 err = 8.9984899112e-08 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.871060324123e-01 err = 3.6220571920e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.871060324123e-01 err = 1.4683676590e-08 time = 0.01 sec +[ Info: CTMRG 12: obj = +4.871060324123e-01 err = 5.9202167119e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.871060324123e-01 err = 2.3770160384e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.871060324123e-01 err = 9.5188830755e-10 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.871060324123e-01 err = 3.8060341252e-10 time = 0.00 sec +[ Info: CTMRG 16: obj = +4.871060324123e-01 err = 1.5203855885e-10 time = 0.00 sec +[ Info: CTMRG conv 17: obj = +4.871060324123e-01 err = 6.0699425286e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 5.28e-06 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.24e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 1.03e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 76, time 754.21 s: f = -0.662514180025, ‖∇f‖ = 2.8220e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.871258251721e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.871258259952e-01 err = 1.7293852066e-04 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.871258260174e-01 err = 1.1346642231e-04 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.871258260216e-01 err = 1.0233945068e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.871258260223e-01 err = 6.0570493275e-05 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.871258260224e-01 err = 2.0896520923e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.871258260224e-01 err = 4.5655925705e-06 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.871258260224e-01 err = 8.5956434648e-07 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.871258260224e-01 err = 1.5327118351e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.871258260224e-01 err = 2.8484127698e-08 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.871258260224e-01 err = 6.4590159028e-09 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.871258260224e-01 err = 2.5185838514e-09 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.871258260224e-01 err = 1.0135315637e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.871258260224e-01 err = 4.0681619704e-10 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.871258260224e-01 err = 1.6292460926e-10 time = 0.00 sec +[ Info: CTMRG conv 15: obj = +4.871258260224e-01 err = 6.5156869516e-11 time = 0.07 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.86e-06 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.03e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 1.03e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 77, time 754.39 s: f = -0.662514206339, ‖∇f‖ = 2.0931e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.871297192460e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.871297195782e-01 err = 2.1211911635e-04 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.871297194628e-01 err = 1.4320092176e-04 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.871297194429e-01 err = 1.9926352688e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.871297194397e-01 err = 3.2429111048e-05 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.871297194392e-01 err = 1.4663659258e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.871297194391e-01 err = 3.5857813250e-06 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.871297194391e-01 err = 7.0178191046e-07 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.871297194391e-01 err = 1.2462503873e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.871297194391e-01 err = 2.1787859117e-08 time = 0.01 sec +[ Info: CTMRG 10: obj = +4.871297194391e-01 err = 4.0553879959e-09 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.871297194391e-01 err = 1.1212126372e-09 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.871297194391e-01 err = 4.2962250755e-10 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.871297194391e-01 err = 1.6958944823e-10 time = 0.00 sec +[ Info: CTMRG conv 14: obj = +4.871297194391e-01 err = 6.7374698962e-11 time = 0.07 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 5.31e-06 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.27e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 1.07e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 78, time 754.58 s: f = -0.662514231519, ‖∇f‖ = 2.6637e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.871403384801e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.871403574921e-01 err = 2.5568178996e-04 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.871403605819e-01 err = 2.0089994629e-04 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.871403611211e-01 err = 2.9754469798e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.871403612097e-01 err = 5.9599373811e-05 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.871403612240e-01 err = 2.6363572735e-05 time = 0.01 sec +[ Info: CTMRG 6: obj = +4.871403612263e-01 err = 5.9238042400e-06 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.871403612266e-01 err = 1.1086621617e-06 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.871403612267e-01 err = 2.0262400771e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.871403612267e-01 err = 7.5692988916e-08 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.871403612267e-01 err = 3.0759849754e-08 time = 0.01 sec +[ Info: CTMRG 11: obj = +4.871403612267e-01 err = 1.2466815181e-08 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.871403612267e-01 err = 5.0206957768e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.871403612267e-01 err = 2.0135864110e-09 time = 0.00 sec +[ Info: CTMRG 14: obj = +4.871403612267e-01 err = 8.0565433886e-10 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.871403612267e-01 err = 3.2190725787e-10 time = 0.01 sec +[ Info: CTMRG 16: obj = +4.871403612267e-01 err = 1.2851399791e-10 time = 0.00 sec +[ Info: CTMRG conv 17: obj = +4.871403612267e-01 err = 5.1280083750e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.79e-06 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.16e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 1.06e-07 +└ * number of operations = 6 +[ Info: CTMRG init: obj = +4.871355908543e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.871355966086e-01 err = 1.4046316207e-04 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.871355975438e-01 err = 1.1049674349e-04 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.871355977071e-01 err = 1.6372858084e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.871355977339e-01 err = 3.2766704582e-05 time = 0.01 sec +[ Info: CTMRG 5: obj = +4.871355977382e-01 err = 1.4493026864e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.871355977389e-01 err = 3.2535786842e-06 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.871355977390e-01 err = 6.0746278835e-07 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.871355977390e-01 err = 1.1048152143e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.871355977390e-01 err = 4.1498305040e-08 time = 0.01 sec +[ Info: CTMRG 10: obj = +4.871355977390e-01 err = 1.6854548372e-08 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.871355977390e-01 err = 6.8302721326e-09 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.871355977390e-01 err = 2.7507577208e-09 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.871355977390e-01 err = 1.1032683620e-09 time = 0.01 sec +[ Info: CTMRG 14: obj = +4.871355977390e-01 err = 4.4145680170e-10 time = 0.00 sec +[ Info: CTMRG 15: obj = +4.871355977390e-01 err = 1.7639427491e-10 time = 0.00 sec +[ Info: CTMRG conv 16: obj = +4.871355977390e-01 err = 7.0428609682e-11 time = 0.08 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.84e-06 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.12e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 1.03e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 79, time 754.98 s: f = -0.662514243124, ‖∇f‖ = 2.4156e-04, α = 5.50e-01, m = 16, nfg = 2 +[ Info: CTMRG init: obj = +4.871179793379e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.871179801697e-01 err = 1.5631360249e-04 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.871179801833e-01 err = 5.5606384689e-05 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.871179801852e-01 err = 1.4161299902e-04 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.871179801854e-01 err = 6.4294663733e-05 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.871179801855e-01 err = 1.9586641733e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.871179801855e-01 err = 4.0133955465e-06 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.871179801855e-01 err = 7.2141125870e-07 time = 0.01 sec +[ Info: CTMRG 8: obj = +4.871179801855e-01 err = 1.2115678362e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.871179801855e-01 err = 2.0142931321e-08 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.871179801855e-01 err = 3.6807478447e-09 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.871179801855e-01 err = 9.3804583294e-10 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.871179801855e-01 err = 3.2939576562e-10 time = 0.01 sec +[ Info: CTMRG 13: obj = +4.871179801855e-01 err = 1.2840573337e-10 time = 0.00 sec +[ Info: CTMRG conv 14: obj = +4.871179801855e-01 err = 5.1027997092e-11 time = 0.07 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.83e-06 +[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.17e-06 +┌ Info: BiCGStab linsolve converged at iteration 2: +│ * norm of residual = 1.06e-07 +└ * number of operations = 6 +[ Info: LBFGS: iter 80, time 755.17 s: f = -0.662514255964, ‖∇f‖ = 1.4589e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.871073990611e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.871073992573e-01 err = 1.2520311614e-04 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.871073992474e-01 err = 3.9887951457e-05 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.871073992458e-01 err = 7.5472399281e-05 time = 0.01 sec +[ Info: CTMRG 4: obj = +4.871073992455e-01 err = 4.0831399145e-05 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.871073992454e-01 err = 1.1983311291e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.871073992454e-01 err = 2.4288228106e-06 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.871073992454e-01 err = 4.3266287791e-07 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.871073992454e-01 err = 7.3700330899e-08 time = 0.01 sec +[ Info: CTMRG 9: obj = +4.871073992454e-01 err = 1.3367391679e-08 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.871073992454e-01 err = 3.2342099574e-09 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.871073992454e-01 err = 1.1050350908e-09 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.871073992454e-01 err = 4.2985840603e-10 time = 0.00 sec +[ Info: CTMRG 13: obj = +4.871073992454e-01 err = 1.7132274257e-10 time = 0.01 sec +[ Info: CTMRG conv 14: obj = +4.871073992454e-01 err = 6.8479019651e-11 time = 0.07 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 4.30e-06 +┌ Info: BiCGStab linsolve converged at iteration 1.5: +│ * norm of residual = 9.20e-07 +└ * number of operations = 5 +[ Info: LBFGS: iter 81, time 755.35 s: f = -0.662514264597, ‖∇f‖ = 1.6299e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.870802265100e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.870802270952e-01 err = 1.5637536758e-04 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.870802270994e-01 err = 6.5932274507e-05 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.870802270998e-01 err = 8.4743946162e-05 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.870802270999e-01 err = 6.3767011841e-05 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.870802270999e-01 err = 1.8007628475e-05 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.870802270999e-01 err = 3.6762667212e-06 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.870802270999e-01 err = 6.8319004154e-07 time = 0.01 sec +[ Info: CTMRG 8: obj = +4.870802270999e-01 err = 1.2815259166e-07 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.870802270999e-01 err = 2.2222081395e-08 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.870802270999e-01 err = 3.8771168412e-09 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.870802270999e-01 err = 1.1224318440e-09 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.870802270999e-01 err = 4.1649202324e-10 time = 0.01 sec +[ Info: CTMRG 13: obj = +4.870802270999e-01 err = 1.6462481867e-10 time = 0.00 sec +[ Info: CTMRG conv 14: obj = +4.870802270999e-01 err = 6.5733103902e-11 time = 0.07 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 3.75e-06 +┌ Info: BiCGStab linsolve converged at iteration 1.5: +│ * norm of residual = 6.29e-07 +└ * number of operations = 5 +[ Info: LBFGS: iter 82, time 755.53 s: f = -0.662514270687, ‖∇f‖ = 2.0842e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.870861801606e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.870861801546e-01 err = 3.0026862223e-05 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.870861801521e-01 err = 1.0052445643e-05 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.870861801518e-01 err = 3.5172205110e-05 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.870861801518e-01 err = 1.7511339538e-05 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.870861801518e-01 err = 5.2661006646e-06 time = 0.01 sec +[ Info: CTMRG 6: obj = +4.870861801518e-01 err = 1.0545807128e-06 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.870861801518e-01 err = 1.8889459938e-07 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.870861801518e-01 err = 3.1188385446e-08 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.870861801518e-01 err = 4.9674504469e-09 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.870861801518e-01 err = 7.6165287749e-10 time = 0.01 sec +[ Info: CTMRG 11: obj = +4.870861801518e-01 err = 1.2997626631e-10 time = 0.00 sec +[ Info: CTMRG conv 12: obj = +4.870861801518e-01 err = 3.5947094377e-11 time = 0.06 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 3.77e-06 +┌ Info: BiCGStab linsolve converged at iteration 1.5: +│ * norm of residual = 6.21e-07 +└ * number of operations = 5 +[ Info: LBFGS: iter 83, time 755.70 s: f = -0.662514276005, ‖∇f‖ = 1.1227e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.870924286027e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.870924285770e-01 err = 5.1111427041e-05 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.870924285712e-01 err = 1.6995613204e-05 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.870924285707e-01 err = 4.5583186554e-05 time = 0.00 sec +[ Info: CTMRG 4: obj = +4.870924285706e-01 err = 2.2187857241e-05 time = 0.00 sec +[ Info: CTMRG 5: obj = +4.870924285706e-01 err = 6.7063783159e-06 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.870924285706e-01 err = 1.3203376049e-06 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.870924285706e-01 err = 2.3417684274e-07 time = 0.01 sec +[ Info: CTMRG 8: obj = +4.870924285706e-01 err = 3.8634842497e-08 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.870924285706e-01 err = 6.2564255420e-09 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.870924285706e-01 err = 1.0591197139e-09 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.870924285706e-01 err = 2.4363386038e-10 time = 0.00 sec +[ Info: CTMRG conv 12: obj = +4.870924285706e-01 err = 8.3649103606e-11 time = 0.06 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 3.92e-06 +┌ Info: BiCGStab linsolve converged at iteration 1.5: +│ * norm of residual = 7.05e-07 +└ * number of operations = 5 +[ Info: LBFGS: iter 84, time 755.91 s: f = -0.662514281099, ‖∇f‖ = 1.0747e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.870928381111e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.870928379488e-01 err = 2.8222048730e-05 time = 0.00 sec +[ Info: CTMRG 2: obj = +4.870928379327e-01 err = 1.9291761999e-05 time = 0.00 sec +[ Info: CTMRG 3: obj = +4.870928379304e-01 err = 1.9206061441e-05 time = 0.24 sec +[ Info: CTMRG 4: obj = +4.870928379300e-01 err = 4.1153580589e-06 time = 0.01 sec +[ Info: CTMRG 5: obj = +4.870928379299e-01 err = 1.5444182106e-06 time = 0.00 sec +[ Info: CTMRG 6: obj = +4.870928379299e-01 err = 3.2729482757e-07 time = 0.00 sec +[ Info: CTMRG 7: obj = +4.870928379299e-01 err = 6.1772540606e-08 time = 0.00 sec +[ Info: CTMRG 8: obj = +4.870928379299e-01 err = 1.2017085572e-08 time = 0.00 sec +[ Info: CTMRG 9: obj = +4.870928379299e-01 err = 2.8873364166e-09 time = 0.00 sec +[ Info: CTMRG 10: obj = +4.870928379299e-01 err = 9.2398739389e-10 time = 0.00 sec +[ Info: CTMRG 11: obj = +4.870928379299e-01 err = 3.4237484988e-10 time = 0.00 sec +[ Info: CTMRG 12: obj = +4.870928379299e-01 err = 1.3303805908e-10 time = 0.00 sec +[ Info: CTMRG conv 13: obj = +4.870928379299e-01 err = 5.2490247254e-11 time = 0.30 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 3.98e-06 +┌ Info: BiCGStab linsolve converged at iteration 1.5: +│ * norm of residual = 7.06e-07 +└ * number of operations = 5 +[ Info: LBFGS: iter 85, time 756.33 s: f = -0.662514284644, ‖∇f‖ = 1.0173e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: CTMRG init: obj = +4.870856616218e-01 err = 1.0000e+00 +[ Info: CTMRG 1: obj = +4.870856604044e-01 err = 6.5977582010e-05 time = 0.01 sec +[ Info: CTMRG 2: obj = +4.870856602664e-01 err = 4.1250268645e-05 time = 0.01 sec +[ Info: CTMRG 3: obj = +4.870856602447e-01 err = 5.3496895553e-05 time = 0.01 sec +[ Info: CTMRG 4: obj = +4.870856602412e-01 err = 2.8889294878e-05 time = 0.01 sec +[ Info: CTMRG 5: obj = +4.870856602406e-01 err = 8.5942434633e-06 time = 0.01 sec +[ Info: CTMRG 6: obj = +4.870856602405e-01 err = 1.7822285215e-06 time = 0.01 sec +[ Info: CTMRG 7: obj = +4.870856602405e-01 err = 3.0751246919e-07 time = 0.01 sec +[ Info: CTMRG 8: obj = +4.870856602405e-01 err = 5.1833408219e-08 time = 0.01 sec +[ Info: CTMRG 9: obj = +4.870856602405e-01 err = 9.2340459614e-09 time = 0.01 sec +[ Info: CTMRG 10: obj = +4.870856602405e-01 err = 2.6588387991e-09 time = 0.01 sec +[ Info: CTMRG 11: obj = +4.870856602405e-01 err = 1.0354992143e-09 time = 0.01 sec +[ Info: CTMRG 12: obj = +4.870856602405e-01 err = 4.0936881781e-10 time = 0.01 sec +[ Info: CTMRG 13: obj = +4.870856602405e-01 err = 1.6260405180e-10 time = 0.01 sec +[ Info: CTMRG conv 14: obj = +4.870856602405e-01 err = 6.4747169783e-11 time = 0.11 sec +[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 +[ Info: BiCGStab linsolve in iteration 1: normres = 3.90e-06 +┌ Info: BiCGStab linsolve converged at iteration 1.5: +│ * norm of residual = 5.43e-07 +└ * number of operations = 5 +[ Info: LBFGS: converged after 86 iterations and time 756.56 s: f = -0.662514291826, ‖∇f‖ = 8.8301e-05 ```` diff --git a/docs/src/examples/1.heisenberg/main.ipynb b/docs/src/examples/1.heisenberg/main.ipynb index 0f18cd8bf..5c50a5495 100644 --- a/docs/src/examples/1.heisenberg/main.ipynb +++ b/docs/src/examples/1.heisenberg/main.ipynb @@ -4,7 +4,7 @@ "outputs": [], "cell_type": "code", "source": [ - "using Markdown" + "using Markdown #hide" ], "metadata": {}, "execution_count": null @@ -158,7 +158,7 @@ "cell_type": "code", "source": [ "reuse_env = true\n", - "verbosity = 1;" + "verbosity = 3;" ], "metadata": {}, "execution_count": null diff --git a/examples/1.heisenberg/main.jl b/examples/1.heisenberg/main.jl index 85b931456..f376e2c8f 100644 --- a/examples/1.heisenberg/main.jl +++ b/examples/1.heisenberg/main.jl @@ -1,4 +1,4 @@ -using Markdown +using Markdown #hide md""" # [Optimizing the 2D Heisenberg model](@id examples_heisenberg) diff --git a/examples/2.boundary_mps/main.jl b/examples/2.boundary_mps/main.jl index 8d1cc2763..42053c798 100644 --- a/examples/2.boundary_mps/main.jl +++ b/examples/2.boundary_mps/main.jl @@ -1,4 +1,4 @@ -using Markdown +using Markdown #hide md""" # Boundary MPS contractions using VUMPS and PEPOs diff --git a/examples/3.bose_hubbard/main.jl b/examples/3.bose_hubbard/main.jl index fc76c77c8..3dd13b1d3 100644 --- a/examples/3.bose_hubbard/main.jl +++ b/examples/3.bose_hubbard/main.jl @@ -1,4 +1,4 @@ -using Markdown +using Markdown #hide md""" # Optimizing the $U(1)$-symmetric Bose-Hubbard model diff --git a/examples/4.xxz/main.jl b/examples/4.xxz/main.jl index f25afb246..a629d9727 100644 --- a/examples/4.xxz/main.jl +++ b/examples/4.xxz/main.jl @@ -1,4 +1,4 @@ -using Markdown +using Markdown #hide md""" # Néel order in the $U(1)$-symmetric XXZ model diff --git a/examples/5.fermi_hubbard/main.jl b/examples/5.fermi_hubbard/main.jl index 17f7a3286..fb38d0f2e 100644 --- a/examples/5.fermi_hubbard/main.jl +++ b/examples/5.fermi_hubbard/main.jl @@ -1,4 +1,4 @@ -using Markdown +using Markdown #hide md""" # Fermi-Hubbard model with $f\mathbb{Z}_2 \boxtimes U(1)$ symmetry, at large $U$ and half-filling diff --git a/examples/6.hubbard_su/main.jl b/examples/6.hubbard_su/main.jl index efb8fe6a8..c83587366 100644 --- a/examples/6.hubbard_su/main.jl +++ b/examples/6.hubbard_su/main.jl @@ -1,4 +1,4 @@ -using Markdown +using Markdown #hide md""" # Hubbard model imaginary time evolution using simple update diff --git a/examples/7.heisenberg_su/main.jl b/examples/7.heisenberg_su/main.jl index d7620a736..b65ef1576 100644 --- a/examples/7.heisenberg_su/main.jl +++ b/examples/7.heisenberg_su/main.jl @@ -1,4 +1,4 @@ -using Markdown +using Markdown #hide md""" # Simple update for the Heisenberg model diff --git a/examples/8.ising_partition_function/main.jl b/examples/8.ising_partition_function/main.jl index 9eefe0e24..129155cd8 100644 --- a/examples/8.ising_partition_function/main.jl +++ b/examples/8.ising_partition_function/main.jl @@ -1,4 +1,4 @@ -using Markdown +using Markdown #hide md""" # 2D classical Ising partition function using CTMRG diff --git a/examples/Cache.toml b/examples/Cache.toml index 61dfe46fa..bec3964d8 100644 --- a/examples/Cache.toml +++ b/examples/Cache.toml @@ -1,5 +1,2 @@ ["./"] -"4.xxz" = "9015d85ff87c5165142c64c7031275bab78e3d84620d2e13d0d69f054f7f9438" "1.heisenberg" = "aefc6c22bcacdb0b5b69ff1b64e57a0f1debe8778a2d683f4efcadcfccb28b7c" -"2.boundary_mps" = "497e7b378946319995bac90abba7f3f83b95cc93e0423af6d488049861796e10" -"3.bose_hubbard" = "a4eae524b73b5795d9b13af09d31b625adcff9814f3c25cc3b001d20f12bef95" From e7fcce9adbf4a673ca81f869060c69700eaf9238 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 18 Apr 2025 12:45:21 +0200 Subject: [PATCH 050/113] Add rendered examples --- docs/src/examples/1.heisenberg/index.md | 2797 +---------------- docs/src/examples/2.boundary_mps/index.md | 30 +- docs/src/examples/2.boundary_mps/main.ipynb | 6 +- docs/src/examples/3.bose_hubbard/index.md | 810 +---- docs/src/examples/3.bose_hubbard/main.ipynb | 10 +- docs/src/examples/4.xxz/index.md | 579 +--- docs/src/examples/4.xxz/main.ipynb | 10 +- docs/src/examples/5.fermi_hubbard/index.md | 244 ++ docs/src/examples/5.fermi_hubbard/main.ipynb | 221 ++ docs/src/examples/6.hubbard_su/index.md | 215 ++ docs/src/examples/6.hubbard_su/main.ipynb | 248 ++ docs/src/examples/7.heisenberg_su/index.md | 212 ++ docs/src/examples/7.heisenberg_su/main.ipynb | 253 ++ .../8.ising_partition_function/index.md | 205 ++ .../8.ising_partition_function/main.ipynb | 260 ++ examples/2.boundary_mps/main.jl | 4 +- examples/3.bose_hubbard/main.jl | 6 +- examples/4.xxz/main.jl | 6 +- examples/5.fermi_hubbard/main.jl | 8 +- examples/6.hubbard_su/main.jl | 4 +- examples/7.heisenberg_su/main.jl | 2 +- examples/Cache.toml | 7 + examples/Project.toml | 1 + 23 files changed, 2273 insertions(+), 3865 deletions(-) create mode 100644 docs/src/examples/5.fermi_hubbard/index.md create mode 100644 docs/src/examples/5.fermi_hubbard/main.ipynb create mode 100644 docs/src/examples/6.hubbard_su/index.md create mode 100644 docs/src/examples/6.hubbard_su/main.ipynb create mode 100644 docs/src/examples/7.heisenberg_su/index.md create mode 100644 docs/src/examples/7.heisenberg_su/main.ipynb create mode 100644 docs/src/examples/8.ising_partition_function/index.md create mode 100644 docs/src/examples/8.ising_partition_function/main.ipynb diff --git a/docs/src/examples/1.heisenberg/index.md b/docs/src/examples/1.heisenberg/index.md index 4fe6a633d..d30928d00 100644 --- a/docs/src/examples/1.heisenberg/index.md +++ b/docs/src/examples/1.heisenberg/index.md @@ -182,7 +182,7 @@ env₀, info_ctmrg = leading_boundary(env_random, peps₀; boundary_alg...); ```` [ Info: CTMRG init: obj = -2.749614463601e+00 +3.639628057806e+00im err = 1.0000e+00 -[ Info: CTMRG conv 27: obj = +9.727103564786e+00 err = 2.6201184615e-11 time = 6.82 sec +[ Info: CTMRG conv 27: obj = +9.727103564786e+00 err = 2.6201184615e-11 time = 0.30 sec ```` @@ -211,2722 +211,99 @@ peps, env, E, info_opt = fixedpoint( ```` ```` -[ Info: CTMRG init: obj = +2.458081979447e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +2.458081979447e-01 err = 1.0702487618e-11 time = 0.01 sec -[ Info: CTMRG 2: obj = +2.458081979447e-01 err = 3.6204359828e-12 time = 0.01 sec -[ Info: CTMRG 3: obj = +2.458081979447e-01 err = 1.0761692541e-12 time = 0.01 sec -[ Info: CTMRG conv 4: obj = +2.458081979447e-01 err = 3.6674259117e-13 time = 0.02 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.88e-01 -[ Info: BiCGStab linsolve in iteration 1: normres = 2.06e-02 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 5.68e-03 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.95e-03 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 1.15e-03 -[ Info: BiCGStab linsolve in iteration 3: normres = 3.44e-04 -[ Info: BiCGStab linsolve in iteration 3.5: normres = 1.06e-04 -[ Info: BiCGStab linsolve in iteration 4: normres = 2.94e-05 -[ Info: BiCGStab linsolve in iteration 4.5: normres = 3.91e-06 -[ Info: BiCGStab linsolve in iteration 5: normres = 1.17e-06 -[ Info: BiCGStab linsolve in iteration 5.5: normres = 1.19e-06 -┌ Info: BiCGStab linsolve converged at iteration 6: -│ * norm of residual = 3.55e-07 -└ * number of operations = 14 [ Info: LBFGS: initializing with f = 0.000601645310, ‖∇f‖ = 9.3547e-01 ┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Float64}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 -[ Info: CTMRG init: obj = +2.466747864702e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +2.467202300719e-01 err = 5.1468672546e-03 time = 0.01 sec -[ Info: CTMRG 2: obj = +2.467177582954e-01 err = 1.0248503896e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +2.467174847646e-01 err = 7.0606560014e-03 time = 0.00 sec -[ Info: CTMRG 4: obj = +2.467175566543e-01 err = 1.7544501818e-03 time = 0.01 sec -[ Info: CTMRG 5: obj = +2.467175535135e-01 err = 7.6336938372e-04 time = 0.01 sec -[ Info: CTMRG 6: obj = +2.467175523269e-01 err = 3.2948274479e-04 time = 0.01 sec -[ Info: CTMRG 7: obj = +2.467175525681e-01 err = 6.8853494985e-05 time = 0.02 sec -[ Info: CTMRG 8: obj = +2.467175526511e-01 err = 3.5139804357e-05 time = 0.01 sec -[ Info: CTMRG 9: obj = +2.467175526675e-01 err = 1.3695745603e-05 time = 0.01 sec -[ Info: CTMRG 10: obj = +2.467175526653e-01 err = 3.0592132984e-06 time = 0.01 sec -[ Info: CTMRG 11: obj = +2.467175526626e-01 err = 9.6314251491e-07 time = 0.01 sec -[ Info: CTMRG 12: obj = +2.467175526615e-01 err = 4.7338928574e-07 time = 0.01 sec -[ Info: CTMRG 13: obj = +2.467175526615e-01 err = 1.4856431007e-07 time = 0.01 sec -[ Info: CTMRG 14: obj = +2.467175526616e-01 err = 3.2966310155e-08 time = 0.01 sec -[ Info: CTMRG 15: obj = +2.467175526617e-01 err = 1.7362459887e-08 time = 0.01 sec -[ Info: CTMRG 16: obj = +2.467175526617e-01 err = 6.3743957795e-09 time = 0.01 sec -[ Info: CTMRG 17: obj = +2.467175526617e-01 err = 1.4125953209e-09 time = 0.01 sec -[ Info: CTMRG 18: obj = +2.467175526617e-01 err = 5.2856033100e-10 time = 0.01 sec -[ Info: CTMRG 19: obj = +2.467175526617e-01 err = 2.6594624172e-10 time = 0.01 sec -[ Info: CTMRG conv 20: obj = +2.467175526617e-01 err = 6.9252688655e-11 time = 0.12 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.99e-01 -[ Info: BiCGStab linsolve in iteration 1: normres = 2.23e-02 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 6.96e-03 -[ Info: BiCGStab linsolve in iteration 2: normres = 2.33e-03 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 1.63e-03 -[ Info: BiCGStab linsolve in iteration 3: normres = 4.84e-04 -[ Info: BiCGStab linsolve in iteration 3.5: normres = 1.54e-04 -[ Info: BiCGStab linsolve in iteration 4: normres = 4.61e-05 -[ Info: BiCGStab linsolve in iteration 4.5: normres = 3.99e-06 -[ Info: BiCGStab linsolve in iteration 5: normres = 1.06e-06 -┌ Info: BiCGStab linsolve converged at iteration 5.5: -│ * norm of residual = 4.99e-07 -└ * number of operations = 13 -[ Info: CTMRG init: obj = +2.504989231566e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +2.518577636537e-01 err = 2.2195315784e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +2.519084970968e-01 err = 3.5708295274e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +2.518988455424e-01 err = 3.1268882475e-02 time = 0.01 sec -[ Info: CTMRG 4: obj = +2.519002749932e-01 err = 1.3358078973e-02 time = 0.01 sec -[ Info: CTMRG 5: obj = +2.519007227276e-01 err = 4.9297438688e-03 time = 0.01 sec -[ Info: CTMRG 6: obj = +2.519007313294e-01 err = 2.0293072275e-03 time = 0.01 sec -[ Info: CTMRG 7: obj = +2.519007274334e-01 err = 5.6475980506e-04 time = 0.01 sec -[ Info: CTMRG 8: obj = +2.519007280100e-01 err = 1.5819533038e-04 time = 0.01 sec -[ Info: CTMRG 9: obj = +2.519007283638e-01 err = 9.2072757112e-05 time = 0.01 sec -[ Info: CTMRG 10: obj = +2.519007284107e-01 err = 4.0322529795e-05 time = 0.01 sec -[ Info: CTMRG 11: obj = +2.519007284073e-01 err = 1.1668112409e-05 time = 0.01 sec -[ Info: CTMRG 12: obj = +2.519007283947e-01 err = 3.0908008114e-06 time = 0.01 sec -[ Info: CTMRG 13: obj = +2.519007283902e-01 err = 1.2771504159e-06 time = 0.01 sec -[ Info: CTMRG 14: obj = +2.519007283886e-01 err = 5.2562459654e-07 time = 0.01 sec -[ Info: CTMRG 15: obj = +2.519007283886e-01 err = 1.9526028301e-07 time = 0.01 sec -[ Info: CTMRG 16: obj = +2.519007283887e-01 err = 4.9184396270e-08 time = 0.01 sec -[ Info: CTMRG 17: obj = +2.519007283888e-01 err = 2.7371205699e-08 time = 0.01 sec -[ Info: CTMRG 18: obj = +2.519007283888e-01 err = 1.0841608326e-08 time = 0.01 sec -[ Info: CTMRG 19: obj = +2.519007283888e-01 err = 3.4538640055e-09 time = 0.01 sec -[ Info: CTMRG 20: obj = +2.519007283888e-01 err = 1.0564151881e-09 time = 0.01 sec -[ Info: CTMRG 21: obj = +2.519007283888e-01 err = 4.6104335122e-10 time = 0.01 sec -[ Info: CTMRG 22: obj = +2.519007283888e-01 err = 1.8122934616e-10 time = 0.01 sec -[ Info: CTMRG conv 23: obj = +2.519007283888e-01 err = 7.0319174446e-11 time = 0.13 sec -[ Info: BiCGStab linsolve starts with norm of residual = 3.83e-01 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.09e-02 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.84e-02 -[ Info: BiCGStab linsolve in iteration 2: normres = 6.20e-03 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 6.03e-03 -[ Info: BiCGStab linsolve in iteration 3: normres = 1.67e-03 -[ Info: BiCGStab linsolve in iteration 3.5: normres = 7.47e-04 -[ Info: BiCGStab linsolve in iteration 4: normres = 1.80e-04 -[ Info: BiCGStab linsolve in iteration 4.5: normres = 1.21e-04 -[ Info: BiCGStab linsolve in iteration 5: normres = 5.27e-05 -[ Info: BiCGStab linsolve in iteration 5.5: normres = 3.66e-06 -[ Info: BiCGStab linsolve in iteration 6: normres = 1.22e-06 -┌ Info: BiCGStab linsolve converged at iteration 6.5: -│ * norm of residual = 6.74e-08 -└ * number of operations = 15 -[ Info: CTMRG init: obj = +2.773142477636e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +3.280961996908e-01 err = 1.1119405070e-01 time = 0.01 sec -[ Info: CTMRG 2: obj = +3.408862747463e-01 err = 1.1817777907e-01 time = 0.01 sec -[ Info: CTMRG 3: obj = +3.422468241365e-01 err = 8.4221966888e-02 time = 0.01 sec -[ Info: CTMRG 4: obj = +3.423550758606e-01 err = 5.4661495617e-02 time = 0.01 sec -[ Info: CTMRG 5: obj = +3.423637658895e-01 err = 2.0305722305e-02 time = 0.01 sec -[ Info: CTMRG 6: obj = +3.423647903142e-01 err = 5.0566947094e-03 time = 0.01 sec -[ Info: CTMRG 7: obj = +3.423649197863e-01 err = 2.1393494537e-03 time = 0.01 sec -[ Info: CTMRG 8: obj = +3.423649288336e-01 err = 7.1326038559e-04 time = 0.01 sec -[ Info: CTMRG 9: obj = +3.423649290144e-01 err = 1.8057996916e-04 time = 0.01 sec -[ Info: CTMRG 10: obj = +3.423649290717e-01 err = 9.0089521941e-05 time = 0.00 sec -[ Info: CTMRG 11: obj = +3.423649290982e-01 err = 2.3300941438e-05 time = 0.01 sec -[ Info: CTMRG 12: obj = +3.423649291002e-01 err = 7.8791728239e-06 time = 0.01 sec -[ Info: CTMRG 13: obj = +3.423649290993e-01 err = 3.2204397272e-06 time = 0.00 sec -[ Info: CTMRG 14: obj = +3.423649290996e-01 err = 8.9775415590e-07 time = 0.00 sec -[ Info: CTMRG 15: obj = +3.423649290995e-01 err = 5.3793169894e-07 time = 0.01 sec -[ Info: CTMRG 16: obj = +3.423649290995e-01 err = 1.5592179650e-07 time = 0.01 sec -[ Info: CTMRG 17: obj = +3.423649290995e-01 err = 3.8856151006e-08 time = 0.00 sec -[ Info: CTMRG 18: obj = +3.423649290995e-01 err = 1.9229756162e-08 time = 0.01 sec -[ Info: CTMRG 19: obj = +3.423649290995e-01 err = 9.5951149575e-09 time = 0.01 sec -[ Info: CTMRG 20: obj = +3.423649290995e-01 err = 3.6585761634e-09 time = 0.00 sec -[ Info: CTMRG 21: obj = +3.423649290995e-01 err = 8.5616189166e-10 time = 0.01 sec -[ Info: CTMRG 22: obj = +3.423649290995e-01 err = 3.0800030135e-10 time = 0.01 sec -[ Info: CTMRG 23: obj = +3.423649290995e-01 err = 2.0405422214e-10 time = 0.01 sec -[ Info: CTMRG conv 24: obj = +3.423649290995e-01 err = 7.9350588207e-11 time = 0.13 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.81e-01 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.54e-02 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 7.42e-03 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.75e-03 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 2.08e-04 -[ Info: BiCGStab linsolve in iteration 3: normres = 6.29e-05 -[ Info: BiCGStab linsolve in iteration 3.5: normres = 1.68e-05 -[ Info: BiCGStab linsolve in iteration 4: normres = 5.40e-06 -[ Info: BiCGStab linsolve in iteration 4.5: normres = 1.48e-05 -[ Info: BiCGStab linsolve in iteration 5: normres = 3.78e-06 -┌ Info: BiCGStab linsolve converged at iteration 5.5: -│ * norm of residual = 1.81e-08 -└ * number of operations = 13 -[ Info: CTMRG init: obj = +4.355241324960e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.049671855166e-01 err = 3.4977566014e-01 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.045100850086e-01 err = 2.0108294005e-01 time = 0.01 sec -[ Info: CTMRG 3: obj = +5.044874876263e-01 err = 2.1035795651e-01 time = 0.01 sec -[ Info: CTMRG 4: obj = +5.044881606001e-01 err = 1.9089865698e-01 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.044882185306e-01 err = 2.0042800366e-02 time = 0.01 sec -[ Info: CTMRG 6: obj = +5.044882217392e-01 err = 5.5656824031e-03 time = 0.01 sec -[ Info: CTMRG 7: obj = +5.044882218988e-01 err = 5.7048147285e-04 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.044882219065e-01 err = 2.3007944270e-04 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.044882219068e-01 err = 3.5688381042e-05 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.044882219068e-01 err = 9.5580911901e-06 time = 0.01 sec -[ Info: CTMRG 11: obj = +5.044882219068e-01 err = 1.8142608163e-06 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.044882219068e-01 err = 4.2890533382e-07 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.044882219068e-01 err = 8.8210060575e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.044882219068e-01 err = 1.9750966814e-08 time = 0.01 sec -[ Info: CTMRG 15: obj = +5.044882219068e-01 err = 4.1972035907e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +5.044882219068e-01 err = 9.2044965770e-10 time = 0.00 sec -[ Info: CTMRG 17: obj = +5.044882219068e-01 err = 1.9955644891e-10 time = 0.00 sec -[ Info: CTMRG conv 18: obj = +5.044882219068e-01 err = 4.2217186903e-11 time = 0.10 sec -[ Info: BiCGStab linsolve starts with norm of residual = 8.51e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.54e-03 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.48e-04 -[ Info: BiCGStab linsolve in iteration 2: normres = 4.23e-05 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 8.80e-07 -└ * number of operations = 7 -[ Info: CTMRG init: obj = +3.422319647713e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.059235206244e-01 err = 2.0255578684e-01 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.112745931363e-01 err = 2.0818285390e-01 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.115117557626e-01 err = 2.3880984707e-01 time = 0.01 sec -[ Info: CTMRG 4: obj = +5.115093847498e-01 err = 1.0893440842e-01 time = 0.01 sec -[ Info: CTMRG 5: obj = +5.115083695228e-01 err = 1.7611497477e-02 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.115083777318e-01 err = 2.4620917957e-03 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.115083844066e-01 err = 7.4826522225e-04 time = 0.01 sec -[ Info: CTMRG 8: obj = +5.115083844800e-01 err = 2.8878212993e-04 time = 0.01 sec -[ Info: CTMRG 9: obj = +5.115083844399e-01 err = 4.7299635369e-05 time = 0.01 sec -[ Info: CTMRG 10: obj = +5.115083844387e-01 err = 1.0303058937e-05 time = 0.01 sec -[ Info: CTMRG 11: obj = +5.115083844390e-01 err = 3.2840305765e-06 time = 0.01 sec -[ Info: CTMRG 12: obj = +5.115083844390e-01 err = 1.3182904640e-06 time = 0.01 sec -[ Info: CTMRG 13: obj = +5.115083844390e-01 err = 3.1656887010e-07 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.115083844390e-01 err = 5.9372142563e-08 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.115083844390e-01 err = 1.6914997756e-08 time = 0.00 sec -[ Info: CTMRG 16: obj = +5.115083844390e-01 err = 7.6918589147e-09 time = 0.00 sec -[ Info: CTMRG 17: obj = +5.115083844390e-01 err = 2.1726348156e-09 time = 0.00 sec -[ Info: CTMRG 18: obj = +5.115083844390e-01 err = 4.3095702532e-10 time = 0.01 sec -[ Info: CTMRG conv 19: obj = +5.115083844390e-01 err = 9.0095611039e-11 time = 0.12 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.00e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 3.15e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 9.17e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.40e-05 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 2.92e-06 -┌ Info: BiCGStab linsolve converged at iteration 3: -│ * norm of residual = 4.66e-07 -└ * number of operations = 8 -[ Info: LBFGS: iter 1, time 732.46 s: f = -0.489796540851, ‖∇f‖ = 6.0022e-01, α = 5.94e+01, m = 0, nfg = 5 +[ Info: LBFGS: iter 1, time 4.15 s: f = -0.489796540851, ‖∇f‖ = 6.0022e-01, α = 5.94e+01, m = 0, nfg = 5 ┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 -[ Info: CTMRG init: obj = +5.640950274181e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.664827046284e-01 err = 8.5541943898e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.665188272848e-01 err = 9.5361394153e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.665185518575e-01 err = 4.9906223331e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.665185750436e-01 err = 3.9675306336e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.665185766900e-01 err = 9.9772842181e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.665185767074e-01 err = 1.8624251343e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.665185767053e-01 err = 2.4949133561e-05 time = 0.01 sec -[ Info: CTMRG 8: obj = +5.665185767052e-01 err = 3.5158447123e-06 time = 0.01 sec -[ Info: CTMRG 9: obj = +5.665185767052e-01 err = 7.6646557758e-07 time = 0.01 sec -[ Info: CTMRG 10: obj = +5.665185767052e-01 err = 2.6432871984e-07 time = 0.02 sec -[ Info: CTMRG 11: obj = +5.665185767052e-01 err = 6.1799005969e-08 time = 0.01 sec -[ Info: CTMRG 12: obj = +5.665185767052e-01 err = 1.0719167757e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.665185767052e-01 err = 1.2598877275e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.665185767052e-01 err = 2.3249788335e-10 time = 0.00 sec -[ Info: CTMRG conv 15: obj = +5.665185767052e-01 err = 6.4079819106e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 3.90e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 2.80e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.14e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 3.71e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 8.35e-07 -└ * number of operations = 7 -[ Info: CTMRG init: obj = +5.255414209869e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.258510285849e-01 err = 2.3155134355e-02 time = 0.06 sec -[ Info: CTMRG 2: obj = +5.258515618555e-01 err = 2.5067820962e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +5.258515132282e-01 err = 1.2983127504e-02 time = 0.01 sec -[ Info: CTMRG 4: obj = +5.258515440844e-01 err = 2.2122995624e-03 time = 0.01 sec -[ Info: CTMRG 5: obj = +5.258515454127e-01 err = 8.3607529323e-04 time = 0.25 sec -[ Info: CTMRG 6: obj = +5.258515453052e-01 err = 9.4699099439e-05 time = 0.01 sec -[ Info: CTMRG 7: obj = +5.258515452959e-01 err = 3.4372419957e-05 time = 0.01 sec -[ Info: CTMRG 8: obj = +5.258515452961e-01 err = 1.4651733977e-05 time = 0.01 sec -[ Info: CTMRG 9: obj = +5.258515452961e-01 err = 3.4728653268e-06 time = 0.01 sec -[ Info: CTMRG 10: obj = +5.258515452962e-01 err = 3.9807656440e-07 time = 0.01 sec -[ Info: CTMRG 11: obj = +5.258515452961e-01 err = 9.4139336219e-08 time = 0.01 sec -[ Info: CTMRG 12: obj = +5.258515452962e-01 err = 5.8812312879e-08 time = 0.01 sec -[ Info: CTMRG 13: obj = +5.258515452962e-01 err = 1.8138314946e-08 time = 0.01 sec -[ Info: CTMRG 14: obj = +5.258515452962e-01 err = 3.4054119944e-09 time = 0.01 sec -[ Info: CTMRG 15: obj = +5.258515452962e-01 err = 4.4531114588e-10 time = 0.01 sec -[ Info: CTMRG 16: obj = +5.258515452961e-01 err = 1.6854097708e-10 time = 0.01 sec -[ Info: CTMRG conv 17: obj = +5.258515452962e-01 err = 7.6966581908e-11 time = 0.39 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.05e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 2.65e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 8.86e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.40e-05 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 5.17e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 2, time 734.49 s: f = -0.501984649868, ‖∇f‖ = 5.3739e-01, α = 2.80e-01, m = 1, nfg = 2 -[ Info: CTMRG init: obj = +4.968273104592e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.962307463119e-01 err = 4.3932885704e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +4.962149486894e-01 err = 3.0548043697e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.962171150065e-01 err = 1.4274310610e-02 time = 0.01 sec -[ Info: CTMRG 4: obj = +4.962172915061e-01 err = 2.2606808105e-03 time = 0.01 sec -[ Info: CTMRG 5: obj = +4.962172843461e-01 err = 1.8231907969e-03 time = 0.01 sec -[ Info: CTMRG 6: obj = +4.962172829927e-01 err = 4.1053122318e-04 time = 0.01 sec -[ Info: CTMRG 7: obj = +4.962172829934e-01 err = 4.4027754764e-05 time = 0.01 sec -[ Info: CTMRG 8: obj = +4.962172830022e-01 err = 1.8670932046e-05 time = 0.01 sec -[ Info: CTMRG 9: obj = +4.962172830025e-01 err = 7.2998707694e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.962172830024e-01 err = 1.7299831046e-06 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.962172830024e-01 err = 3.1059078477e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.962172830024e-01 err = 9.7390964221e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.962172830024e-01 err = 4.7426002166e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.962172830024e-01 err = 1.4007557897e-08 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.962172830024e-01 err = 2.5859635083e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.962172830024e-01 err = 5.3995702982e-10 time = 0.00 sec -[ Info: CTMRG 17: obj = +4.962172830024e-01 err = 2.3838227266e-10 time = 0.00 sec -[ Info: CTMRG conv 18: obj = +4.962172830024e-01 err = 9.3742778827e-11 time = 0.11 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.58e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.39e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.04e-04 -[ Info: BiCGStab linsolve in iteration 2: normres = 3.85e-05 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 2.38e-06 -┌ Info: BiCGStab linsolve converged at iteration 3: -│ * norm of residual = 4.05e-07 -└ * number of operations = 8 -[ Info: LBFGS: iter 3, time 734.72 s: f = -0.523163971924, ‖∇f‖ = 3.9927e-01, α = 1.00e+00, m = 2, nfg = 1 -[ Info: CTMRG init: obj = +3.562598080445e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +3.596831790076e-01 err = 2.1723962944e-01 time = 0.00 sec -[ Info: CTMRG 2: obj = +3.595275896187e-01 err = 1.3970935615e-01 time = 0.00 sec -[ Info: CTMRG 3: obj = +3.595245983237e-01 err = 6.7542524698e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +3.595238759998e-01 err = 2.1141802791e-02 time = 0.00 sec -[ Info: CTMRG 5: obj = +3.595232562709e-01 err = 7.4741289874e-03 time = 0.01 sec -[ Info: CTMRG 6: obj = +3.595231453278e-01 err = 1.6565241775e-03 time = 0.00 sec -[ Info: CTMRG 7: obj = +3.595231340288e-01 err = 5.2796105893e-04 time = 0.00 sec -[ Info: CTMRG 8: obj = +3.595231328369e-01 err = 2.0585129130e-04 time = 0.00 sec -[ Info: CTMRG 9: obj = +3.595231326390e-01 err = 6.8342124066e-05 time = 0.00 sec -[ Info: CTMRG 10: obj = +3.595231326074e-01 err = 2.5627513069e-05 time = 0.00 sec -[ Info: CTMRG 11: obj = +3.595231326030e-01 err = 9.3034807248e-06 time = 0.00 sec -[ Info: CTMRG 12: obj = +3.595231326025e-01 err = 3.5835141132e-06 time = 0.00 sec -[ Info: CTMRG 13: obj = +3.595231326024e-01 err = 1.3899078677e-06 time = 0.00 sec -[ Info: CTMRG 14: obj = +3.595231326024e-01 err = 5.1505027780e-07 time = 0.00 sec -[ Info: CTMRG 15: obj = +3.595231326024e-01 err = 1.9089200667e-07 time = 0.00 sec -[ Info: CTMRG 16: obj = +3.595231326024e-01 err = 7.0182635216e-08 time = 0.00 sec -[ Info: CTMRG 17: obj = +3.595231326024e-01 err = 2.5505438905e-08 time = 0.00 sec -[ Info: CTMRG 18: obj = +3.595231326024e-01 err = 9.3197226471e-09 time = 0.02 sec -[ Info: CTMRG 19: obj = +3.595231326024e-01 err = 3.4246060196e-09 time = 0.01 sec -[ Info: CTMRG 20: obj = +3.595231326024e-01 err = 1.2717678278e-09 time = 0.01 sec -[ Info: CTMRG 21: obj = +3.595231326024e-01 err = 4.7430899057e-10 time = 0.01 sec -[ Info: CTMRG 22: obj = +3.595231326024e-01 err = 1.7723079135e-10 time = 0.01 sec -[ Info: CTMRG conv 23: obj = +3.595231326024e-01 err = 6.5988037074e-11 time = 0.13 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.55e-01 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.22e-02 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.73e-03 -[ Info: BiCGStab linsolve in iteration 2: normres = 4.32e-04 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 1.56e-04 -[ Info: BiCGStab linsolve in iteration 3: normres = 2.89e-05 -[ Info: BiCGStab linsolve in iteration 3.5: normres = 6.28e-03 -[ Info: BiCGStab linsolve in iteration 4: normres = 1.28e-03 -┌ Info: BiCGStab linsolve converged at iteration 4.5: -│ * norm of residual = 5.31e-08 -└ * number of operations = 11 -[ Info: CTMRG init: obj = +4.680044618365e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.678878042342e-01 err = 4.0067386290e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +4.678751770234e-01 err = 3.1844803872e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.678757002284e-01 err = 2.3390575547e-02 time = 0.01 sec -[ Info: CTMRG 4: obj = +4.678758088696e-01 err = 2.3333366616e-03 time = 0.01 sec -[ Info: CTMRG 5: obj = +4.678758087099e-01 err = 8.7270862010e-04 time = 0.01 sec -[ Info: CTMRG 6: obj = +4.678758078482e-01 err = 2.0206487957e-04 time = 0.01 sec -[ Info: CTMRG 7: obj = +4.678758078169e-01 err = 4.1103913248e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.678758078226e-01 err = 1.0481808577e-05 time = 0.01 sec -[ Info: CTMRG 9: obj = +4.678758078231e-01 err = 4.2077137369e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.678758078231e-01 err = 1.4649754992e-06 time = 0.01 sec -[ Info: CTMRG 11: obj = +4.678758078231e-01 err = 4.1264370851e-07 time = 0.01 sec -[ Info: CTMRG 12: obj = +4.678758078231e-01 err = 1.0850345284e-07 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.678758078231e-01 err = 2.7381579388e-08 time = 0.01 sec -[ Info: CTMRG 14: obj = +4.678758078231e-01 err = 1.0813919781e-08 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.678758078231e-01 err = 3.4304424306e-09 time = 0.01 sec -[ Info: CTMRG 16: obj = +4.678758078231e-01 err = 9.2798340115e-10 time = 0.00 sec -[ Info: CTMRG 17: obj = +4.678758078231e-01 err = 2.3475738746e-10 time = 0.00 sec -[ Info: CTMRG conv 18: obj = +4.678758078231e-01 err = 7.2973345454e-11 time = 0.10 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.61e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 8.57e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.11e-03 -[ Info: BiCGStab linsolve in iteration 2: normres = 2.36e-04 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 5.22e-06 -[ Info: BiCGStab linsolve in iteration 3: normres = 1.07e-06 -┌ Info: BiCGStab linsolve converged at iteration 3.5: -│ * norm of residual = 1.07e-07 -└ * number of operations = 9 -[ Info: LBFGS: iter 4, time 735.25 s: f = -0.538654390178, ‖∇f‖ = 4.1552e-01, α = 2.29e-01, m = 3, nfg = 2 -[ Info: CTMRG init: obj = +1.361090548391e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +2.492681304638e-01 err = 2.7633751803e-01 time = 0.01 sec -[ Info: CTMRG 2: obj = +2.729788177171e-01 err = 3.3254602721e-01 time = 0.01 sec -[ Info: CTMRG 3: obj = +2.771967161921e-01 err = 1.2871942679e-01 time = 0.01 sec -[ Info: CTMRG 4: obj = +2.779581748526e-01 err = 8.4067728014e-02 time = 0.01 sec -[ Info: CTMRG 5: obj = +2.780581629514e-01 err = 6.0831204990e-02 time = 0.01 sec -[ Info: CTMRG 6: obj = +2.780474606214e-01 err = 5.6932247083e-02 time = 0.01 sec -[ Info: CTMRG 7: obj = +2.780302531384e-01 err = 3.4222154914e-02 time = 0.01 sec -[ Info: CTMRG 8: obj = +2.780200353034e-01 err = 3.3736099111e-02 time = 0.01 sec -[ Info: CTMRG 9: obj = +2.780150195975e-01 err = 2.1491380928e-02 time = 0.01 sec -[ Info: CTMRG 10: obj = +2.780127868273e-01 err = 1.6640500825e-02 time = 0.01 sec -[ Info: CTMRG 11: obj = +2.780118071149e-01 err = 1.0801060671e-02 time = 0.01 sec -[ Info: CTMRG 12: obj = +2.780114025117e-01 err = 7.3818436743e-03 time = 0.01 sec -[ Info: CTMRG 13: obj = +2.780112272568e-01 err = 4.7841431573e-03 time = 0.01 sec -[ Info: CTMRG 14: obj = +2.780111585913e-01 err = 3.1469231082e-03 time = 0.01 sec -[ Info: CTMRG 15: obj = +2.780111276329e-01 err = 2.0310417700e-03 time = 0.01 sec -[ Info: CTMRG 16: obj = +2.780111165486e-01 err = 1.3193954295e-03 time = 0.01 sec -[ Info: CTMRG 17: obj = +2.780111109125e-01 err = 8.4931855133e-04 time = 0.01 sec -[ Info: CTMRG 18: obj = +2.780111092872e-01 err = 5.4832384428e-04 time = 0.01 sec -[ Info: CTMRG 19: obj = +2.780111081752e-01 err = 3.5236207484e-04 time = 0.01 sec -[ Info: CTMRG 20: obj = +2.780111080036e-01 err = 2.2671813449e-04 time = 0.01 sec -[ Info: CTMRG 21: obj = +2.780111077502e-01 err = 1.4552348057e-04 time = 0.01 sec -[ Info: CTMRG 22: obj = +2.780111077635e-01 err = 9.3454119058e-05 time = 0.01 sec -[ Info: CTMRG 23: obj = +2.780111076937e-01 err = 5.9938526146e-05 time = 0.01 sec -[ Info: CTMRG 24: obj = +2.780111077133e-01 err = 3.8449675674e-05 time = 0.01 sec -[ Info: CTMRG 25: obj = +2.780111076904e-01 err = 2.4647795488e-05 time = 0.01 sec -[ Info: CTMRG 26: obj = +2.780111077008e-01 err = 1.5801059838e-05 time = 0.01 sec -[ Info: CTMRG 27: obj = +2.780111076924e-01 err = 1.0125795229e-05 time = 0.01 sec -[ Info: CTMRG 28: obj = +2.780111076971e-01 err = 6.4889439047e-06 time = 0.01 sec -[ Info: CTMRG 29: obj = +2.780111076938e-01 err = 4.1574499013e-06 time = 0.01 sec -[ Info: CTMRG 30: obj = +2.780111076958e-01 err = 2.6636405300e-06 time = 0.01 sec -[ Info: CTMRG 31: obj = +2.780111076945e-01 err = 1.7063672352e-06 time = 0.01 sec -[ Info: CTMRG 32: obj = +2.780111076953e-01 err = 1.0931104129e-06 time = 0.01 sec -[ Info: CTMRG 33: obj = +2.780111076947e-01 err = 7.0020655988e-07 time = 0.01 sec -[ Info: CTMRG 34: obj = +2.780111076951e-01 err = 4.4852201369e-07 time = 0.01 sec -[ Info: CTMRG 35: obj = +2.780111076949e-01 err = 2.8729264916e-07 time = 0.01 sec -[ Info: CTMRG 36: obj = +2.780111076950e-01 err = 1.8401865610e-07 time = 0.01 sec -[ Info: CTMRG 37: obj = +2.780111076949e-01 err = 1.1786625616e-07 time = 0.01 sec -[ Info: CTMRG 38: obj = +2.780111076950e-01 err = 7.5494400898e-08 time = 0.01 sec -[ Info: CTMRG 39: obj = +2.780111076949e-01 err = 4.8354217077e-08 time = 0.01 sec -[ Info: CTMRG 40: obj = +2.780111076950e-01 err = 3.0970795192e-08 time = 0.01 sec -[ Info: CTMRG 41: obj = +2.780111076949e-01 err = 1.9836592332e-08 time = 0.01 sec -[ Info: CTMRG 42: obj = +2.780111076950e-01 err = 1.2705178147e-08 time = 0.01 sec -[ Info: CTMRG 43: obj = +2.780111076949e-01 err = 8.1375289079e-09 time = 0.01 sec -[ Info: CTMRG 44: obj = +2.780111076949e-01 err = 5.2119907250e-09 time = 0.01 sec -[ Info: CTMRG 45: obj = +2.780111076949e-01 err = 3.3382079689e-09 time = 0.01 sec -[ Info: CTMRG 46: obj = +2.780111076949e-01 err = 2.1380735358e-09 time = 0.01 sec -[ Info: CTMRG 47: obj = +2.780111076949e-01 err = 1.3694050211e-09 time = 0.01 sec -[ Info: CTMRG 48: obj = +2.780111076949e-01 err = 8.7708492359e-10 time = 0.01 sec -[ Info: CTMRG 49: obj = +2.780111076949e-01 err = 5.6175862626e-10 time = 0.01 sec -[ Info: CTMRG 50: obj = +2.780111076949e-01 err = 3.5979756862e-10 time = 0.01 sec -[ Info: CTMRG 51: obj = +2.780111076949e-01 err = 2.3044300143e-10 time = 0.01 sec -[ Info: CTMRG 52: obj = +2.780111076949e-01 err = 1.4759372169e-10 time = 0.01 sec -[ Info: CTMRG conv 53: obj = +2.780111076949e-01 err = 9.4533846806e-11 time = 0.29 sec -[ Info: BiCGStab linsolve starts with norm of residual = 3.29e-01 -[ Info: BiCGStab linsolve in iteration 1: normres = 5.56e-02 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.21e-02 -[ Info: BiCGStab linsolve in iteration 2: normres = 5.92e-03 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 3.69e-03 -[ Info: BiCGStab linsolve in iteration 3: normres = 1.54e-03 -[ Info: BiCGStab linsolve in iteration 3.5: normres = 1.47e-04 -[ Info: BiCGStab linsolve in iteration 4: normres = 3.29e-05 -[ Info: BiCGStab linsolve in iteration 4.5: normres = 1.35e-05 -[ Info: BiCGStab linsolve in iteration 5: normres = 2.53e-06 -┌ Info: BiCGStab linsolve converged at iteration 5.5: -│ * norm of residual = 5.01e-07 -└ * number of operations = 13 -[ Info: CTMRG init: obj = +1.747462633461e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +2.718493922832e-01 err = 2.7890398206e-01 time = 0.01 sec -[ Info: CTMRG 2: obj = +2.796442514830e-01 err = 3.4014977169e-01 time = 0.01 sec -[ Info: CTMRG 3: obj = +2.803869164174e-01 err = 9.5922304517e-02 time = 0.01 sec -[ Info: CTMRG 4: obj = +2.803706435718e-01 err = 6.6406375999e-02 time = 0.01 sec -[ Info: CTMRG 5: obj = +2.803183420351e-01 err = 4.4063125080e-02 time = 0.01 sec -[ Info: CTMRG 6: obj = +2.802922722169e-01 err = 4.0155182717e-02 time = 0.01 sec -[ Info: CTMRG 7: obj = +2.802817958119e-01 err = 2.1359492680e-02 time = 0.01 sec -[ Info: CTMRG 8: obj = +2.802779179079e-01 err = 1.3997059564e-02 time = 0.01 sec -[ Info: CTMRG 9: obj = +2.802765110153e-01 err = 8.0592501297e-03 time = 0.01 sec -[ Info: CTMRG 10: obj = +2.802760168664e-01 err = 5.0941094049e-03 time = 0.01 sec -[ Info: CTMRG 11: obj = +2.802758392735e-01 err = 3.0805114137e-03 time = 0.00 sec -[ Info: CTMRG 12: obj = +2.802757787064e-01 err = 1.8814415892e-03 time = 0.01 sec -[ Info: CTMRG 13: obj = +2.802757563217e-01 err = 1.1265596873e-03 time = 0.01 sec -[ Info: CTMRG 14: obj = +2.802757491228e-01 err = 6.7670929086e-04 time = 0.01 sec -[ Info: CTMRG 15: obj = +2.802757462098e-01 err = 4.0309421683e-04 time = 0.01 sec -[ Info: CTMRG 16: obj = +2.802757454171e-01 err = 2.4028400007e-04 time = 0.01 sec -[ Info: CTMRG 17: obj = +2.802757450036e-01 err = 1.4273046611e-04 time = 0.01 sec -[ Info: CTMRG 18: obj = +2.802757449388e-01 err = 8.4783470625e-05 time = 0.01 sec -[ Info: CTMRG 19: obj = +2.802757448686e-01 err = 5.0287710298e-05 time = 0.01 sec -[ Info: CTMRG 20: obj = +2.802757448720e-01 err = 2.9823338887e-05 time = 0.00 sec -[ Info: CTMRG 21: obj = +2.802757448566e-01 err = 1.7675631746e-05 time = 0.01 sec -[ Info: CTMRG 22: obj = +2.802757448611e-01 err = 1.0474783786e-05 time = 0.01 sec -[ Info: CTMRG 23: obj = +2.802757448568e-01 err = 6.2057598499e-06 time = 0.00 sec -[ Info: CTMRG 24: obj = +2.802757448588e-01 err = 3.6763227068e-06 time = 0.01 sec -[ Info: CTMRG 25: obj = +2.802757448574e-01 err = 2.1776040456e-06 time = 0.01 sec -[ Info: CTMRG 26: obj = +2.802757448581e-01 err = 1.2898116978e-06 time = 0.01 sec -[ Info: CTMRG 27: obj = +2.802757448577e-01 err = 7.6392306184e-07 time = 0.00 sec -[ Info: CTMRG 28: obj = +2.802757448579e-01 err = 4.5244238301e-07 time = 0.01 sec -[ Info: CTMRG 29: obj = +2.802757448578e-01 err = 2.6795749960e-07 time = 0.01 sec -[ Info: CTMRG 30: obj = +2.802757448579e-01 err = 1.5869510452e-07 time = 0.01 sec -[ Info: CTMRG 31: obj = +2.802757448578e-01 err = 9.3984457232e-08 time = 0.01 sec -[ Info: CTMRG 32: obj = +2.802757448579e-01 err = 5.5660358279e-08 time = 0.01 sec -[ Info: CTMRG 33: obj = +2.802757448578e-01 err = 3.2963519525e-08 time = 0.01 sec -[ Info: CTMRG 34: obj = +2.802757448578e-01 err = 1.9521800691e-08 time = 0.01 sec -[ Info: CTMRG 35: obj = +2.802757448578e-01 err = 1.1561256755e-08 time = 0.00 sec -[ Info: CTMRG 36: obj = +2.802757448578e-01 err = 6.8468312133e-09 time = 0.01 sec -[ Info: CTMRG 37: obj = +2.802757448578e-01 err = 4.0548386307e-09 time = 0.01 sec -[ Info: CTMRG 38: obj = +2.802757448578e-01 err = 2.4013588735e-09 time = 0.01 sec -[ Info: CTMRG 39: obj = +2.802757448578e-01 err = 1.4221332948e-09 time = 0.00 sec -[ Info: CTMRG 40: obj = +2.802757448578e-01 err = 8.4221677250e-10 time = 0.01 sec -[ Info: CTMRG 41: obj = +2.802757448578e-01 err = 4.9877801141e-10 time = 0.01 sec -[ Info: CTMRG 42: obj = +2.802757448578e-01 err = 2.9538585025e-10 time = 0.01 sec -[ Info: CTMRG 43: obj = +2.802757448578e-01 err = 1.7493268954e-10 time = 0.01 sec -[ Info: CTMRG 44: obj = +2.802757448578e-01 err = 1.0359885552e-10 time = 0.01 sec -[ Info: CTMRG conv 45: obj = +2.802757448578e-01 err = 6.1354058626e-11 time = 0.25 sec -[ Info: BiCGStab linsolve starts with norm of residual = 3.35e-01 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.03e-02 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.41e-02 -[ Info: BiCGStab linsolve in iteration 2: normres = 2.72e-03 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 1.92e-03 -[ Info: BiCGStab linsolve in iteration 3: normres = 5.49e-04 -[ Info: BiCGStab linsolve in iteration 3.5: normres = 1.52e-04 -[ Info: BiCGStab linsolve in iteration 4: normres = 3.33e-05 -[ Info: BiCGStab linsolve in iteration 4.5: normres = 2.37e-06 -┌ Info: BiCGStab linsolve converged at iteration 5: -│ * norm of residual = 4.80e-07 -└ * number of operations = 12 -[ Info: CTMRG init: obj = +3.218181656181e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +3.347408492966e-01 err = 2.2748631899e-01 time = 0.01 sec -[ Info: CTMRG 2: obj = +3.349727572571e-01 err = 1.7705654425e-01 time = 0.01 sec -[ Info: CTMRG 3: obj = +3.349557854112e-01 err = 5.9986367263e-02 time = 0.01 sec -[ Info: CTMRG 4: obj = +3.349497623768e-01 err = 2.3135597061e-02 time = 0.01 sec -[ Info: CTMRG 5: obj = +3.349481474864e-01 err = 7.5570497872e-03 time = 0.01 sec -[ Info: CTMRG 6: obj = +3.349478065136e-01 err = 1.9538199085e-03 time = 0.01 sec -[ Info: CTMRG 7: obj = +3.349477423423e-01 err = 1.2340473771e-03 time = 0.01 sec -[ Info: CTMRG 8: obj = +3.349477304763e-01 err = 4.3525791110e-04 time = 0.01 sec -[ Info: CTMRG 9: obj = +3.349477282227e-01 err = 2.0650966963e-04 time = 0.01 sec -[ Info: CTMRG 10: obj = +3.349477278074e-01 err = 8.3822899760e-05 time = 0.00 sec -[ Info: CTMRG 11: obj = +3.349477277259e-01 err = 3.7732886311e-05 time = 0.00 sec -[ Info: CTMRG 12: obj = +3.349477277123e-01 err = 1.6144491689e-05 time = 0.01 sec -[ Info: CTMRG 13: obj = +3.349477277090e-01 err = 7.1473298752e-06 time = 0.01 sec -[ Info: CTMRG 14: obj = +3.349477277087e-01 err = 3.0866539934e-06 time = 0.00 sec -[ Info: CTMRG 15: obj = +3.349477277085e-01 err = 1.3443256803e-06 time = 0.00 sec -[ Info: CTMRG 16: obj = +3.349477277085e-01 err = 5.7924833331e-07 time = 0.01 sec -[ Info: CTMRG 17: obj = +3.349477277085e-01 err = 2.5062959720e-07 time = 0.00 sec -[ Info: CTMRG 18: obj = +3.349477277085e-01 err = 1.0812525472e-07 time = 0.01 sec -[ Info: CTMRG 19: obj = +3.349477277085e-01 err = 4.6777995734e-08 time = 0.00 sec -[ Info: CTMRG 20: obj = +3.349477277085e-01 err = 2.0222471517e-08 time = 0.01 sec -[ Info: CTMRG 21: obj = +3.349477277085e-01 err = 8.7525869465e-09 time = 0.01 sec -[ Info: CTMRG 22: obj = +3.349477277085e-01 err = 3.7861132156e-09 time = 0.00 sec -[ Info: CTMRG 23: obj = +3.349477277085e-01 err = 1.6381695143e-09 time = 0.01 sec -[ Info: CTMRG 24: obj = +3.349477277085e-01 err = 7.0852749498e-10 time = 0.01 sec -[ Info: CTMRG 25: obj = +3.349477277085e-01 err = 3.0646711677e-10 time = 0.00 sec -[ Info: CTMRG 26: obj = +3.349477277085e-01 err = 1.3253887089e-10 time = 0.01 sec -[ Info: CTMRG conv 27: obj = +3.349477277085e-01 err = 5.7327038894e-11 time = 0.15 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.34e-01 -[ Info: BiCGStab linsolve in iteration 1: normres = 2.00e-02 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.98e-03 -[ Info: BiCGStab linsolve in iteration 2: normres = 7.77e-04 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 1.75e-04 -[ Info: BiCGStab linsolve in iteration 3: normres = 4.04e-05 -[ Info: BiCGStab linsolve in iteration 3.5: normres = 2.83e-05 -[ Info: BiCGStab linsolve in iteration 4: normres = 5.78e-06 -┌ Info: BiCGStab linsolve converged at iteration 4.5: -│ * norm of residual = 1.64e-07 -└ * number of operations = 11 -[ Info: CTMRG init: obj = +4.465844626156e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.466478643504e-01 err = 3.0531464291e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +4.466423237538e-01 err = 2.6259975717e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.466423269680e-01 err = 2.2698419728e-02 time = 0.01 sec -[ Info: CTMRG 4: obj = +4.466423753841e-01 err = 1.5737800890e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.466423771165e-01 err = 8.0106757224e-04 time = 0.01 sec -[ Info: CTMRG 6: obj = +4.466423767483e-01 err = 1.4995743009e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.466423767172e-01 err = 4.6336099280e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.466423767192e-01 err = 7.4052685550e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.466423767195e-01 err = 2.7312234384e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.466423767195e-01 err = 1.2667504865e-06 time = 0.01 sec -[ Info: CTMRG 11: obj = +4.466423767195e-01 err = 4.6783595574e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.466423767195e-01 err = 1.3108458777e-07 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.466423767195e-01 err = 2.8100062526e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.466423767195e-01 err = 8.4836640681e-09 time = 0.01 sec -[ Info: CTMRG 15: obj = +4.466423767195e-01 err = 3.6015760753e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.466423767195e-01 err = 1.2269490759e-09 time = 0.00 sec -[ Info: CTMRG 17: obj = +4.466423767195e-01 err = 3.1040872266e-10 time = 0.00 sec -[ Info: CTMRG conv 18: obj = +4.466423767195e-01 err = 6.8059332535e-11 time = 0.10 sec -[ Info: BiCGStab linsolve starts with norm of residual = 3.73e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.43e-03 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.12e-03 -[ Info: BiCGStab linsolve in iteration 2: normres = 4.18e-04 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 9.07e-06 -[ Info: BiCGStab linsolve in iteration 3: normres = 2.09e-06 -┌ Info: BiCGStab linsolve converged at iteration 3.5: -│ * norm of residual = 2.92e-07 -└ * number of operations = 9 -[ Info: LBFGS: iter 5, time 736.72 s: f = -0.549821445064, ‖∇f‖ = 4.4002e-01, α = 6.90e-02, m = 4, nfg = 4 -[ Info: CTMRG init: obj = +2.412790896317e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +2.983930870846e-01 err = 2.5141343896e-01 time = 0.01 sec -[ Info: CTMRG 2: obj = +3.004376846111e-01 err = 2.7968754892e-01 time = 0.01 sec -[ Info: CTMRG 3: obj = +3.004971439000e-01 err = 1.3426217604e-01 time = 0.01 sec -[ Info: CTMRG 4: obj = +3.004553813954e-01 err = 5.8970983213e-02 time = 0.01 sec -[ Info: CTMRG 5: obj = +3.004376693784e-01 err = 3.0280891908e-02 time = 0.01 sec -[ Info: CTMRG 6: obj = +3.004319417580e-01 err = 1.5672899027e-02 time = 0.01 sec -[ Info: CTMRG 7: obj = +3.004302027936e-01 err = 5.8028874433e-03 time = 0.01 sec -[ Info: CTMRG 8: obj = +3.004296867220e-01 err = 2.5948112491e-03 time = 0.01 sec -[ Info: CTMRG 9: obj = +3.004295340477e-01 err = 1.1447200167e-03 time = 0.01 sec -[ Info: CTMRG 10: obj = +3.004294892962e-01 err = 6.6058094381e-04 time = 0.01 sec -[ Info: CTMRG 11: obj = +3.004294760322e-01 err = 3.4254230926e-04 time = 0.01 sec -[ Info: CTMRG 12: obj = +3.004294721864e-01 err = 1.9141797831e-04 time = 0.01 sec -[ Info: CTMRG 13: obj = +3.004294710268e-01 err = 1.0281286744e-04 time = 0.01 sec -[ Info: CTMRG 14: obj = +3.004294707015e-01 err = 5.6363800062e-05 time = 0.01 sec -[ Info: CTMRG 15: obj = +3.004294705975e-01 err = 3.0499158004e-05 time = 0.00 sec -[ Info: CTMRG 16: obj = +3.004294705714e-01 err = 1.6597746883e-05 time = 0.01 sec -[ Info: CTMRG 17: obj = +3.004294705613e-01 err = 8.9959318478e-06 time = 0.01 sec -[ Info: CTMRG 18: obj = +3.004294705597e-01 err = 4.8833705049e-06 time = 0.01 sec -[ Info: CTMRG 19: obj = +3.004294705585e-01 err = 2.6476507833e-06 time = 0.01 sec -[ Info: CTMRG 20: obj = +3.004294705585e-01 err = 1.4360833121e-06 time = 0.01 sec -[ Info: CTMRG 21: obj = +3.004294705583e-01 err = 7.7864696454e-07 time = 0.01 sec -[ Info: CTMRG 22: obj = +3.004294705584e-01 err = 4.2222672142e-07 time = 0.00 sec -[ Info: CTMRG 23: obj = +3.004294705583e-01 err = 2.2893083353e-07 time = 0.00 sec -[ Info: CTMRG 24: obj = +3.004294705583e-01 err = 1.2412889552e-07 time = 0.00 sec -[ Info: CTMRG 25: obj = +3.004294705583e-01 err = 6.7301966372e-08 time = 0.01 sec -[ Info: CTMRG 26: obj = +3.004294705583e-01 err = 3.6490897114e-08 time = 0.01 sec -[ Info: CTMRG 27: obj = +3.004294705583e-01 err = 1.9785054528e-08 time = 0.01 sec -[ Info: CTMRG 28: obj = +3.004294705583e-01 err = 1.0727293977e-08 time = 0.00 sec -[ Info: CTMRG 29: obj = +3.004294705583e-01 err = 5.8162335389e-09 time = 0.01 sec -[ Info: CTMRG 30: obj = +3.004294705583e-01 err = 3.1535036279e-09 time = 0.01 sec -[ Info: CTMRG 31: obj = +3.004294705583e-01 err = 1.7097974506e-09 time = 0.00 sec -[ Info: CTMRG 32: obj = +3.004294705583e-01 err = 9.2703482284e-10 time = 0.00 sec -[ Info: CTMRG 33: obj = +3.004294705583e-01 err = 5.0262776853e-10 time = 0.00 sec -[ Info: CTMRG 34: obj = +3.004294705583e-01 err = 2.7251995940e-10 time = 0.01 sec -[ Info: CTMRG 35: obj = +3.004294705583e-01 err = 1.4775870840e-10 time = 0.00 sec -[ Info: CTMRG conv 36: obj = +3.004294705583e-01 err = 8.0112964589e-11 time = 0.20 sec -[ Info: BiCGStab linsolve starts with norm of residual = 3.18e-01 -[ Info: BiCGStab linsolve in iteration 1: normres = 2.39e-02 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 6.06e-03 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.51e-03 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 2.98e-04 -[ Info: BiCGStab linsolve in iteration 3: normres = 7.41e-05 -[ Info: BiCGStab linsolve in iteration 3.5: normres = 1.98e-05 -[ Info: BiCGStab linsolve in iteration 4: normres = 2.51e-06 -[ Info: BiCGStab linsolve in iteration 4.5: normres = 6.09e-06 -[ Info: BiCGStab linsolve in iteration 5: normres = 1.08e-06 -┌ Info: BiCGStab linsolve converged at iteration 5.5: -│ * norm of residual = 2.17e-08 -└ * number of operations = 13 -[ Info: CTMRG init: obj = +4.029197970323e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.040265024968e-01 err = 8.3906634603e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +4.040213992499e-01 err = 5.3339298008e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.040200587979e-01 err = 1.8853025793e-02 time = 0.01 sec -[ Info: CTMRG 4: obj = +4.040201322910e-01 err = 4.1227587370e-03 time = 0.01 sec -[ Info: CTMRG 5: obj = +4.040201455082e-01 err = 1.0596262918e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.040201448203e-01 err = 2.8068145851e-04 time = 0.01 sec -[ Info: CTMRG 7: obj = +4.040201445920e-01 err = 1.0381716561e-04 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.040201445821e-01 err = 2.5617878885e-05 time = 0.01 sec -[ Info: CTMRG 9: obj = +4.040201445837e-01 err = 6.0269535884e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.040201445838e-01 err = 2.5252478073e-06 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.040201445838e-01 err = 9.0508673606e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.040201445838e-01 err = 2.6859837947e-07 time = 0.01 sec -[ Info: CTMRG 13: obj = +4.040201445838e-01 err = 6.3087542319e-08 time = 0.01 sec -[ Info: CTMRG 14: obj = +4.040201445838e-01 err = 2.0694143817e-08 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.040201445838e-01 err = 8.5466921256e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.040201445838e-01 err = 2.9874902093e-09 time = 0.00 sec -[ Info: CTMRG 17: obj = +4.040201445838e-01 err = 8.3859571372e-10 time = 0.01 sec -[ Info: CTMRG 18: obj = +4.040201445838e-01 err = 2.1393527162e-10 time = 0.01 sec -[ Info: CTMRG conv 19: obj = +4.040201445838e-01 err = 7.1518605014e-11 time = 0.10 sec -[ Info: BiCGStab linsolve starts with norm of residual = 7.79e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.31e-03 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 9.63e-04 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.54e-04 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 3.10e-05 -[ Info: BiCGStab linsolve in iteration 3: normres = 7.89e-06 -[ Info: BiCGStab linsolve in iteration 3.5: normres = 2.64e-06 -┌ Info: BiCGStab linsolve converged at iteration 4: -│ * norm of residual = 5.38e-07 -└ * number of operations = 10 -[ Info: LBFGS: iter 6, time 737.65 s: f = -0.569016778155, ‖∇f‖ = 4.8450e-01, α = 2.26e-01, m = 5, nfg = 2 -[ Info: CTMRG init: obj = +4.035207942335e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.042584410425e-01 err = 5.2437278550e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +4.042836556690e-01 err = 4.9527012746e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.042852299400e-01 err = 2.4699437399e-02 time = 0.01 sec -[ Info: CTMRG 4: obj = +4.042851646966e-01 err = 9.1509951326e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.042851450449e-01 err = 9.8690854240e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.042851437275e-01 err = 2.8473471054e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.042851437211e-01 err = 1.0573289997e-04 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.042851437238e-01 err = 3.7637932675e-05 time = 0.01 sec -[ Info: CTMRG 9: obj = +4.042851437234e-01 err = 1.3583952250e-05 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.042851437233e-01 err = 2.9014142659e-06 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.042851437233e-01 err = 4.9034564121e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.042851437233e-01 err = 1.1013089712e-07 time = 0.01 sec -[ Info: CTMRG 13: obj = +4.042851437233e-01 err = 5.8263635065e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.042851437233e-01 err = 2.0927785712e-08 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.042851437233e-01 err = 5.3087796933e-09 time = 0.01 sec -[ Info: CTMRG 16: obj = +4.042851437233e-01 err = 1.7248442558e-09 time = 0.01 sec -[ Info: CTMRG 17: obj = +4.042851437233e-01 err = 5.1762627037e-10 time = 0.01 sec -[ Info: CTMRG 18: obj = +4.042851437233e-01 err = 1.6893888947e-10 time = 0.01 sec -[ Info: CTMRG conv 19: obj = +4.042851437233e-01 err = 5.9271458341e-11 time = 0.10 sec -[ Info: BiCGStab linsolve starts with norm of residual = 8.95e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.48e-03 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 6.04e-04 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.08e-04 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 6.61e-04 -[ Info: BiCGStab linsolve in iteration 3: normres = 1.19e-04 -[ Info: BiCGStab linsolve in iteration 3.5: normres = 7.44e-06 -[ Info: BiCGStab linsolve in iteration 4: normres = 1.36e-06 -┌ Info: BiCGStab linsolve converged at iteration 4.5: -│ * norm of residual = 4.36e-09 -└ * number of operations = 11 -[ Info: LBFGS: iter 7, time 737.95 s: f = -0.587127261652, ‖∇f‖ = 4.1972e-01, α = 1.00e+00, m = 6, nfg = 1 -[ Info: CTMRG init: obj = +4.494454290295e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.488017112917e-01 err = 7.5042395244e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.487977728719e-01 err = 4.2518831105e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.487981795686e-01 err = 3.4979894660e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.487981689220e-01 err = 6.1684772135e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.487981640997e-01 err = 1.6222504331e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.487981636483e-01 err = 2.4136515871e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.487981636206e-01 err = 5.7927862064e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.487981636191e-01 err = 1.7706002698e-05 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.487981636190e-01 err = 5.3192324036e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.487981636190e-01 err = 1.4283361356e-06 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.487981636190e-01 err = 3.5279836033e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.487981636190e-01 err = 8.3983532294e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.487981636190e-01 err = 2.0592313254e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.487981636190e-01 err = 5.3861869203e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.487981636190e-01 err = 1.4742300511e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.487981636190e-01 err = 4.1020401276e-10 time = 0.00 sec -[ Info: CTMRG 17: obj = +4.487981636190e-01 err = 1.1476630177e-10 time = 0.00 sec -[ Info: CTMRG conv 18: obj = +4.487981636190e-01 err = 3.2198542704e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 5.08e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.54e-03 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.64e-04 -[ Info: BiCGStab linsolve in iteration 2: normres = 2.50e-05 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 3.70e-06 -┌ Info: BiCGStab linsolve converged at iteration 3: -│ * norm of residual = 6.68e-07 -└ * number of operations = 8 -[ Info: LBFGS: iter 8, time 738.14 s: f = -0.600154758006, ‖∇f‖ = 2.1793e-01, α = 1.00e+00, m = 7, nfg = 1 -[ Info: CTMRG init: obj = +4.569285721684e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.572522604787e-01 err = 2.1243836175e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.572538951113e-01 err = 2.4214513898e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.572535377757e-01 err = 2.1692309351e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.572535033057e-01 err = 4.4260078016e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.572535009899e-01 err = 6.0942657421e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.572535008401e-01 err = 1.5510681652e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.572535008298e-01 err = 4.0477781029e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.572535008290e-01 err = 1.0691965424e-05 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.572535008289e-01 err = 2.7462527254e-06 time = 0.01 sec -[ Info: CTMRG 10: obj = +4.572535008289e-01 err = 7.0843815967e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.572535008289e-01 err = 1.8449048386e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.572535008289e-01 err = 4.9036176537e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.572535008289e-01 err = 1.3215402770e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.572535008289e-01 err = 3.5995433118e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.572535008289e-01 err = 9.8473999376e-10 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.572535008289e-01 err = 2.6975564134e-10 time = 0.00 sec -[ Info: CTMRG conv 17: obj = +4.572535008289e-01 err = 7.3811792327e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 4.62e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.35e-03 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 9.64e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.39e-05 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 4.87e-06 -┌ Info: BiCGStab linsolve converged at iteration 3: -│ * norm of residual = 4.89e-07 -└ * number of operations = 8 -[ Info: LBFGS: iter 9, time 738.33 s: f = -0.606883012825, ‖∇f‖ = 1.9566e-01, α = 1.00e+00, m = 8, nfg = 1 -[ Info: CTMRG init: obj = +4.751460494098e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.901950895617e-01 err = 1.2581520933e-01 time = 0.01 sec -[ Info: CTMRG 2: obj = +4.904532787071e-01 err = 8.1457829973e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.904572215992e-01 err = 7.1511426296e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.904572639531e-01 err = 3.0996938051e-02 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.904572634247e-01 err = 1.5577559375e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.904572633539e-01 err = 5.0453343455e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.904572633498e-01 err = 6.1297117723e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.904572633495e-01 err = 1.6222827133e-05 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.904572633495e-01 err = 2.9532921887e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.904572633495e-01 err = 7.1162783161e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.904572633495e-01 err = 1.4094107604e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.904572633495e-01 err = 3.2153200798e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.904572633495e-01 err = 6.6490374456e-09 time = 0.01 sec -[ Info: CTMRG 14: obj = +4.904572633495e-01 err = 1.4745212902e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.904572633495e-01 err = 3.1167312715e-10 time = 0.00 sec -[ Info: CTMRG conv 16: obj = +4.904572633495e-01 err = 6.8196952087e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 3.15e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 6.96e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.71e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 4.82e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 3.70e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 10, time 738.51 s: f = -0.625040022199, ‖∇f‖ = 3.0328e-01, α = 1.00e+00, m = 9, nfg = 1 -[ Info: CTMRG init: obj = +4.903047313693e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.905863636392e-01 err = 4.4650850752e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.905683240376e-01 err = 1.0062185721e-01 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.905676217881e-01 err = 3.1563747458e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.905675942509e-01 err = 1.1871810596e-02 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.905675931490e-01 err = 1.4226558041e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.905675931043e-01 err = 1.1094633837e-04 time = 0.01 sec -[ Info: CTMRG 7: obj = +4.905675931024e-01 err = 5.1903839202e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.905675931023e-01 err = 4.2256440222e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.905675931023e-01 err = 1.9093152851e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.905675931023e-01 err = 1.8676028333e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.905675931023e-01 err = 7.2246028958e-08 time = 0.01 sec -[ Info: CTMRG 12: obj = +4.905675931023e-01 err = 8.5276931973e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.905675931023e-01 err = 2.8057797515e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.905675931023e-01 err = 3.8537126993e-10 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.905675931023e-01 err = 1.1128050445e-10 time = 0.00 sec -[ Info: CTMRG conv 16: obj = +4.905675931023e-01 err = 1.7180873355e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.09e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 5.71e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.20e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 5.02e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 2.82e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 11, time 738.70 s: f = -0.639164743235, ‖∇f‖ = 2.3076e-01, α = 1.00e+00, m = 10, nfg = 1 -[ Info: CTMRG init: obj = +4.925811754316e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.988304585060e-01 err = 1.0008347269e-01 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.989519899158e-01 err = 1.0647292714e-01 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.989536236066e-01 err = 6.7400475230e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.989536001200e-01 err = 4.0031937321e-02 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.989535965234e-01 err = 3.0676161215e-03 time = 0.01 sec -[ Info: CTMRG 6: obj = +4.989535962958e-01 err = 1.0579611877e-03 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.989535962839e-01 err = 1.2763776966e-04 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.989535962833e-01 err = 3.9852634218e-05 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.989535962833e-01 err = 5.2674200426e-06 time = 0.01 sec -[ Info: CTMRG 10: obj = +4.989535962833e-01 err = 1.6276173936e-06 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.989535962833e-01 err = 2.5791215365e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.989535962833e-01 err = 6.8224384629e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.989535962833e-01 err = 1.2062177443e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.989535962833e-01 err = 2.9135955763e-09 time = 0.01 sec -[ Info: CTMRG 15: obj = +4.989535962833e-01 err = 5.5044387237e-10 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.989535962833e-01 err = 1.2569373368e-10 time = 0.00 sec -[ Info: CTMRG conv 17: obj = +4.989535962833e-01 err = 2.4561163224e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 3.18e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 8.57e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 6.46e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 6.39e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 2.55e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 12, time 738.89 s: f = -0.647174335216, ‖∇f‖ = 2.6065e-01, α = 1.00e+00, m = 11, nfg = 1 -[ Info: CTMRG init: obj = +5.405492682453e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.427801286802e-01 err = 7.6717163902e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +5.427830011126e-01 err = 7.1399340684e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.427828772067e-01 err = 7.5634327916e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.427828725696e-01 err = 6.2868584438e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.427828724428e-01 err = 7.1550333180e-04 time = 0.01 sec -[ Info: CTMRG 6: obj = +5.427828724396e-01 err = 1.6070816270e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.427828724395e-01 err = 1.4321836621e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.427828724395e-01 err = 3.5694309329e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.427828724395e-01 err = 3.1885117918e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.427828724395e-01 err = 7.9543581307e-08 time = 0.01 sec -[ Info: CTMRG 11: obj = +5.427828724395e-01 err = 7.7248576221e-09 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.427828724395e-01 err = 1.8249489862e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.427828724395e-01 err = 2.0721673430e-10 time = 0.00 sec -[ Info: CTMRG conv 14: obj = +5.427828724395e-01 err = 4.4087775497e-11 time = 0.07 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.97e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.53e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 6.77e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 5.09e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 13, time 739.05 s: f = -0.650338609163, ‖∇f‖ = 1.6108e-01, α = 1.00e+00, m = 12, nfg = 1 -[ Info: CTMRG init: obj = +5.305347582917e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.322477179888e-01 err = 6.1823996560e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +5.322937108615e-01 err = 5.5926282645e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.322949585294e-01 err = 3.3514574593e-02 time = 0.01 sec -[ Info: CTMRG 4: obj = +5.322949936813e-01 err = 2.2919824445e-02 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.322949947127e-01 err = 5.6177783996e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.322949947440e-01 err = 8.2180099169e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.322949947449e-01 err = 1.3884475228e-04 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.322949947450e-01 err = 2.2272647969e-05 time = 0.01 sec -[ Info: CTMRG 9: obj = +5.322949947450e-01 err = 3.7176359415e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.322949947450e-01 err = 6.1570733363e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.322949947450e-01 err = 1.0490306818e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.322949947450e-01 err = 1.7817148203e-08 time = 0.01 sec -[ Info: CTMRG 13: obj = +5.322949947450e-01 err = 3.0873477182e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.322949947450e-01 err = 5.3520909835e-10 time = 0.00 sec -[ Info: CTMRG conv 15: obj = +5.322949947450e-01 err = 9.3629966180e-11 time = 0.07 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.61e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.17e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.92e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 2.60e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 2.43e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 14, time 739.23 s: f = -0.654606007953, ‖∇f‖ = 7.7724e-02, α = 1.00e+00, m = 13, nfg = 1 -[ Info: CTMRG init: obj = +5.318345276045e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.319484700515e-01 err = 6.8827250218e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +5.319489723280e-01 err = 5.6866171593e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +5.319489976527e-01 err = 2.4965770639e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.319489987328e-01 err = 7.5580296888e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.319489987762e-01 err = 5.1322009892e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.319489987779e-01 err = 9.1237575731e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.319489987780e-01 err = 2.1496489750e-05 time = 0.01 sec -[ Info: CTMRG 8: obj = +5.319489987780e-01 err = 1.9716342242e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.319489987780e-01 err = 6.8170806486e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.319489987780e-01 err = 5.1868602306e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.319489987780e-01 err = 2.1741363096e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.319489987780e-01 err = 2.1151357768e-09 time = 0.01 sec -[ Info: CTMRG 13: obj = +5.319489987780e-01 err = 7.1604650072e-10 time = 0.00 sec -[ Info: CTMRG conv 14: obj = +5.319489987780e-01 err = 8.5421124578e-11 time = 0.07 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.71e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.24e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.35e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 3.51e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 3.69e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 15, time 739.41 s: f = -0.655962567656, ‖∇f‖ = 5.1320e-02, α = 1.00e+00, m = 14, nfg = 1 -[ Info: CTMRG init: obj = +5.384478376744e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.384328572163e-01 err = 6.9413634806e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +5.384325013378e-01 err = 7.4981499690e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.384325200982e-01 err = 4.5539057960e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.384325216386e-01 err = 9.2162673624e-03 time = 0.01 sec -[ Info: CTMRG 5: obj = +5.384325217260e-01 err = 1.3513302582e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.384325217306e-01 err = 7.7229500390e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.384325217308e-01 err = 1.0818900907e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.384325217308e-01 err = 1.5084499532e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.384325217308e-01 err = 2.7373991237e-07 time = 0.01 sec -[ Info: CTMRG 10: obj = +5.384325217308e-01 err = 6.1929993834e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.384325217308e-01 err = 1.1950369765e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.384325217308e-01 err = 2.7338526117e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.384325217308e-01 err = 5.5024907332e-10 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.384325217308e-01 err = 1.2171496601e-10 time = 0.01 sec -[ Info: CTMRG conv 15: obj = +5.384325217308e-01 err = 2.4618079413e-11 time = 0.07 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.67e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 3.71e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.44e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 2.22e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 3.58e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 16, time 739.59 s: f = -0.657034966533, ‖∇f‖ = 5.6668e-02, α = 1.00e+00, m = 15, nfg = 1 -[ Info: CTMRG init: obj = +5.526295024707e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.527997174411e-01 err = 5.1915113688e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +5.528102602561e-01 err = 6.8532082643e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.528108731603e-01 err = 7.2437586700e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.528109064990e-01 err = 1.5912881053e-02 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.528109082867e-01 err = 1.7152051521e-03 time = 0.01 sec -[ Info: CTMRG 6: obj = +5.528109083823e-01 err = 2.1923062362e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.528109083874e-01 err = 2.8342417225e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.528109083877e-01 err = 5.4527028189e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.528109083877e-01 err = 1.2890298973e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.528109083877e-01 err = 2.9985702873e-07 time = 0.01 sec -[ Info: CTMRG 11: obj = +5.528109083877e-01 err = 6.8949352819e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.528109083877e-01 err = 1.5887781202e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.528109083877e-01 err = 3.6530439817e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.528109083877e-01 err = 8.4131526813e-10 time = 0.01 sec -[ Info: CTMRG 15: obj = +5.528109083877e-01 err = 1.9323742432e-10 time = 0.00 sec -[ Info: CTMRG conv 16: obj = +5.528109083877e-01 err = 4.3794080897e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.55e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.73e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.21e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.02e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 8.45e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 17, time 739.81 s: f = -0.658609918816, ‖∇f‖ = 4.5267e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.677351553934e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.676540650188e-01 err = 8.1121950466e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +5.676557801648e-01 err = 9.8508548940e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.676559337146e-01 err = 4.9071808894e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.676559435273e-01 err = 1.6289688930e-02 time = 0.24 sec -[ Info: CTMRG 5: obj = +5.676559441271e-01 err = 1.6822148326e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.676559441634e-01 err = 2.2379838580e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.676559441656e-01 err = 2.5108531982e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.676559441658e-01 err = 2.5779331098e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.676559441658e-01 err = 3.1808574283e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.676559441658e-01 err = 8.9034900278e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.676559441658e-01 err = 2.2773476137e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.676559441658e-01 err = 5.5973679220e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.676559441658e-01 err = 1.3584034249e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.676559441658e-01 err = 3.3035634048e-10 time = 0.00 sec -[ Info: CTMRG conv 15: obj = +5.676559441658e-01 err = 7.9739519733e-11 time = 0.31 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.58e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.40e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.94e-05 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 9.89e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 18, time 740.22 s: f = -0.659421361772, ‖∇f‖ = 4.8752e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.737978897057e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.739222975857e-01 err = 4.6101476264e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.739349062170e-01 err = 4.2215111228e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +5.739357219420e-01 err = 1.9564899301e-02 time = 0.01 sec -[ Info: CTMRG 4: obj = +5.739357726444e-01 err = 2.8765811504e-03 time = 0.01 sec -[ Info: CTMRG 5: obj = +5.739357757773e-01 err = 8.7017770956e-04 time = 0.01 sec -[ Info: CTMRG 6: obj = +5.739357759709e-01 err = 1.0215005459e-04 time = 0.01 sec -[ Info: CTMRG 7: obj = +5.739357759829e-01 err = 1.7793037040e-05 time = 0.01 sec -[ Info: CTMRG 8: obj = +5.739357759836e-01 err = 3.8457298884e-06 time = 0.01 sec -[ Info: CTMRG 9: obj = +5.739357759837e-01 err = 1.0299620705e-06 time = 0.01 sec -[ Info: CTMRG 10: obj = +5.739357759837e-01 err = 2.7605838464e-07 time = 0.01 sec -[ Info: CTMRG 11: obj = +5.739357759837e-01 err = 7.0562738324e-08 time = 0.01 sec -[ Info: CTMRG 12: obj = +5.739357759837e-01 err = 1.7746967135e-08 time = 0.02 sec -[ Info: CTMRG 13: obj = +5.739357759837e-01 err = 4.4366077410e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.739357759837e-01 err = 1.1064387907e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.739357759837e-01 err = 2.8054101760e-10 time = 0.00 sec -[ Info: CTMRG conv 16: obj = +5.739357759837e-01 err = 6.6982893607e-11 time = 0.12 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.62e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.43e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.36e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.62e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 9.75e-08 -└ * number of operations = 7 -[ Info: LBFGS: iter 19, time 740.43 s: f = -0.659584257676, ‖∇f‖ = 5.7745e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.745076718628e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.745504437966e-01 err = 2.6756870940e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +5.745540194585e-01 err = 2.8944679002e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.745542424652e-01 err = 7.7206198448e-03 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.745542558356e-01 err = 2.7277946047e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.745542566313e-01 err = 4.4629488603e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.745542566786e-01 err = 5.3026651135e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.745542566814e-01 err = 6.1208775576e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.745542566816e-01 err = 1.7032705487e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.745542566816e-01 err = 4.7740572637e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.745542566816e-01 err = 1.2154636031e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.745542566816e-01 err = 3.0057748435e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.745542566816e-01 err = 7.3383713037e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.745542566816e-01 err = 1.8075494674e-09 time = 0.02 sec -[ Info: CTMRG 14: obj = +5.745542566816e-01 err = 4.3690387741e-10 time = 0.00 sec -[ Info: CTMRG conv 15: obj = +5.745542566816e-01 err = 9.8198371912e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.54e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.13e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.56e-05 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 7.53e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 20, time 740.59 s: f = -0.659811195031, ‖∇f‖ = 1.7740e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.752674236133e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.752694036899e-01 err = 2.1218296584e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +5.752695499956e-01 err = 1.3704207111e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.752695590184e-01 err = 4.5807953561e-03 time = 0.02 sec -[ Info: CTMRG 4: obj = +5.752695595597e-01 err = 3.4238528365e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.752695595920e-01 err = 2.0224562220e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.752695595939e-01 err = 3.9865308042e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.752695595940e-01 err = 5.6760672361e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.752695595940e-01 err = 7.6538316722e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.752695595940e-01 err = 1.2463425262e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.752695595940e-01 err = 2.5216574089e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.752695595940e-01 err = 5.7812688632e-09 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.752695595940e-01 err = 1.4258756369e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.752695595940e-01 err = 3.4716330364e-10 time = 0.00 sec -[ Info: CTMRG conv 14: obj = +5.752695595940e-01 err = 8.6928184333e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.53e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.01e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.51e-05 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 7.16e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 21, time 740.77 s: f = -0.659874427409, ‖∇f‖ = 1.4673e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.774023192899e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.774064958137e-01 err = 5.2667649352e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.774069388430e-01 err = 5.2960609639e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.774069652092e-01 err = 3.4923403633e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.774069667823e-01 err = 2.8750346775e-03 time = 0.01 sec -[ Info: CTMRG 5: obj = +5.774069668767e-01 err = 6.2186150563e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.774069668824e-01 err = 8.6136884852e-05 time = 0.01 sec -[ Info: CTMRG 7: obj = +5.774069668827e-01 err = 9.0441803580e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.774069668827e-01 err = 9.0103356074e-07 time = 0.01 sec -[ Info: CTMRG 9: obj = +5.774069668827e-01 err = 1.1384324661e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.774069668827e-01 err = 2.8411595872e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.774069668827e-01 err = 7.0092464313e-09 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.774069668827e-01 err = 1.7193878645e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.774069668827e-01 err = 4.2148593500e-10 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.774069668827e-01 err = 1.0304832851e-10 time = 0.00 sec -[ Info: CTMRG conv 15: obj = +5.774069668827e-01 err = 2.5103947776e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.54e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.61e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.12e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.38e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 9.74e-08 -└ * number of operations = 7 -[ Info: LBFGS: iter 22, time 740.97 s: f = -0.660072570659, ‖∇f‖ = 1.9320e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.783110309028e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.783108255746e-01 err = 7.2443994591e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.783111423198e-01 err = 2.8860814323e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.783111595653e-01 err = 2.2443381270e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.783111605521e-01 err = 4.6360446117e-03 time = 0.01 sec -[ Info: CTMRG 5: obj = +5.783111606098e-01 err = 1.0052495730e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.783111606132e-01 err = 1.0433521403e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.783111606134e-01 err = 9.1319735408e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.783111606134e-01 err = 8.8028573318e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.783111606134e-01 err = 1.3151474683e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.783111606134e-01 err = 3.2396316084e-08 time = 0.01 sec -[ Info: CTMRG 11: obj = +5.783111606134e-01 err = 8.2149969187e-09 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.783111606134e-01 err = 2.0034110301e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.783111606134e-01 err = 4.8663471437e-10 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.783111606134e-01 err = 1.2033947986e-10 time = 0.00 sec -[ Info: CTMRG conv 15: obj = +5.783111606134e-01 err = 3.3750013034e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.58e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.37e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.44e-04 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.89e-05 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 1.48e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 23, time 741.18 s: f = -0.660232141902, ‖∇f‖ = 1.7545e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.774957758920e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.774964260001e-01 err = 6.6910362684e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.774976182560e-01 err = 2.5319186985e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +5.774976876573e-01 err = 2.1875537787e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.774976917736e-01 err = 5.9041750499e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.774976920214e-01 err = 1.7972192344e-03 time = 0.01 sec -[ Info: CTMRG 6: obj = +5.774976920364e-01 err = 2.2391149907e-04 time = 0.01 sec -[ Info: CTMRG 7: obj = +5.774976920373e-01 err = 2.4041293211e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.774976920373e-01 err = 2.6421033580e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.774976920373e-01 err = 5.2152551435e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.774976920373e-01 err = 1.3588440773e-07 time = 0.01 sec -[ Info: CTMRG 11: obj = +5.774976920373e-01 err = 3.2646794172e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.774976920373e-01 err = 8.0499742470e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.774976920373e-01 err = 1.9496547196e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.774976920373e-01 err = 4.8236662536e-10 time = 0.01 sec -[ Info: CTMRG 15: obj = +5.774976920373e-01 err = 1.1222137722e-10 time = 0.00 sec -[ Info: CTMRG conv 16: obj = +5.774976920373e-01 err = 2.9079293043e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.71e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 6.87e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.83e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.03e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 5.73e-08 -└ * number of operations = 7 -[ Info: LBFGS: iter 24, time 741.38 s: f = -0.660380080163, ‖∇f‖ = 2.3752e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.749926971670e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.750450811480e-01 err = 7.7270285488e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.750491452719e-01 err = 3.8135605681e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +5.750493887424e-01 err = 1.2445130794e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.750494030845e-01 err = 4.8086169382e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.750494039262e-01 err = 1.3132102922e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.750494039755e-01 err = 2.5036781202e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.750494039784e-01 err = 2.1182037659e-05 time = 0.01 sec -[ Info: CTMRG 8: obj = +5.750494039785e-01 err = 7.5321688127e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.750494039786e-01 err = 8.6005660195e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.750494039786e-01 err = 3.1830412707e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.750494039786e-01 err = 5.2918435787e-08 time = 0.01 sec -[ Info: CTMRG 12: obj = +5.750494039786e-01 err = 1.6446625880e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.750494039786e-01 err = 3.3168386738e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.750494039786e-01 err = 9.1175729121e-10 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.750494039786e-01 err = 2.0195940187e-10 time = 0.00 sec -[ Info: CTMRG conv 16: obj = +5.750494039786e-01 err = 5.1821331571e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.78e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 7.41e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.75e-05 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 7.69e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 25, time 741.58 s: f = -0.660461052221, ‖∇f‖ = 2.3596e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.765747440600e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.765788384867e-01 err = 2.2853927761e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.765791823038e-01 err = 1.3335130319e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +5.765792030577e-01 err = 9.8433894609e-03 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.765792042909e-01 err = 2.1037476909e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.765792043640e-01 err = 5.2126556905e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.765792043684e-01 err = 8.6168268881e-05 time = 0.01 sec -[ Info: CTMRG 7: obj = +5.765792043686e-01 err = 7.0162547794e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.765792043686e-01 err = 1.5688460809e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.765792043686e-01 err = 2.4306451964e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.765792043686e-01 err = 6.9216033883e-08 time = 0.01 sec -[ Info: CTMRG 11: obj = +5.765792043686e-01 err = 1.3025643496e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.765792043686e-01 err = 3.8027422852e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.765792043686e-01 err = 8.2564302200e-10 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.765792043686e-01 err = 2.1918734256e-10 time = 0.00 sec -[ Info: CTMRG conv 15: obj = +5.765792043686e-01 err = 5.0773904127e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.74e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.82e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.90e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.10e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 4.40e-08 -└ * number of operations = 7 -[ Info: LBFGS: iter 26, time 741.79 s: f = -0.660554016679, ‖∇f‖ = 1.2681e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.757322983460e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.757343721418e-01 err = 2.1079992809e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.757345387839e-01 err = 1.0166458464e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.757345495986e-01 err = 7.3820816488e-03 time = 0.01 sec -[ Info: CTMRG 4: obj = +5.757345502703e-01 err = 8.9909591579e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.757345503116e-01 err = 2.7671963248e-04 time = 0.01 sec -[ Info: CTMRG 6: obj = +5.757345503142e-01 err = 3.6140774931e-05 time = 0.01 sec -[ Info: CTMRG 7: obj = +5.757345503143e-01 err = 6.3768792424e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.757345503143e-01 err = 9.4625711612e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.757345503143e-01 err = 2.5237583786e-07 time = 0.01 sec -[ Info: CTMRG 10: obj = +5.757345503143e-01 err = 4.5947464379e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.757345503143e-01 err = 1.3110474418e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.757345503143e-01 err = 2.6577531679e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.757345503143e-01 err = 7.3094753444e-10 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.757345503143e-01 err = 1.5998759171e-10 time = 0.01 sec -[ Info: CTMRG conv 15: obj = +5.757345503143e-01 err = 4.2336499920e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.76e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.21e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.65e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.22e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 6.24e-08 -└ * number of operations = 7 -[ Info: LBFGS: iter 27, time 741.99 s: f = -0.660617092333, ‖∇f‖ = 1.0485e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.691631586134e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.691313758312e-01 err = 1.1127714797e-01 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.691306598475e-01 err = 8.3633507268e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.691306081406e-01 err = 2.2760694213e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.691306044675e-01 err = 3.7238536282e-03 time = 0.01 sec -[ Info: CTMRG 5: obj = +5.691306042103e-01 err = 1.2331756614e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.691306041923e-01 err = 1.7901320419e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.691306041911e-01 err = 4.6453716163e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.691306041910e-01 err = 1.1374558993e-05 time = 0.01 sec -[ Info: CTMRG 9: obj = +5.691306041910e-01 err = 3.9978366268e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.691306041910e-01 err = 9.4661004369e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.691306041910e-01 err = 3.1688051985e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.691306041910e-01 err = 7.4572919635e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.691306041910e-01 err = 2.4809135180e-08 time = 0.01 sec -[ Info: CTMRG 14: obj = +5.691306041910e-01 err = 5.8399514545e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.691306041910e-01 err = 1.9392756033e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +5.691306041910e-01 err = 4.5672920180e-10 time = 0.00 sec -[ Info: CTMRG 17: obj = +5.691306041910e-01 err = 1.5144960849e-10 time = 0.01 sec -[ Info: CTMRG conv 18: obj = +5.691306041910e-01 err = 3.5696979483e-11 time = 0.10 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.93e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 7.80e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.71e-05 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 9.51e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 28, time 742.20 s: f = -0.660813477825, ‖∇f‖ = 1.7986e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.591990954908e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.591610169535e-01 err = 5.4879295071e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.591609825010e-01 err = 2.6625147412e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +5.591609804415e-01 err = 1.4017124921e-02 time = 0.01 sec -[ Info: CTMRG 4: obj = +5.591609802496e-01 err = 1.2598553282e-02 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.591609802342e-01 err = 1.8820040724e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.591609802330e-01 err = 2.7096671897e-04 time = 0.01 sec -[ Info: CTMRG 7: obj = +5.591609802329e-01 err = 5.7667718937e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.591609802329e-01 err = 1.0559269066e-05 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.591609802329e-01 err = 4.2181941011e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.591609802329e-01 err = 1.0502109284e-06 time = 0.01 sec -[ Info: CTMRG 11: obj = +5.591609802329e-01 err = 3.5469854819e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.591609802329e-01 err = 9.5877101239e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.591609802329e-01 err = 3.1194933559e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.591609802329e-01 err = 8.6658950684e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.591609802329e-01 err = 2.7756072257e-09 time = 0.01 sec -[ Info: CTMRG 16: obj = +5.591609802329e-01 err = 7.8340669087e-10 time = 0.00 sec -[ Info: CTMRG 17: obj = +5.591609802329e-01 err = 2.4783678024e-10 time = 0.00 sec -[ Info: CTMRG conv 18: obj = +5.591609802329e-01 err = 7.0849178395e-11 time = 0.10 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.95e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 6.52e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.29e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 2.58e-06 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 1.60e-06 -┌ Info: BiCGStab linsolve converged at iteration 3: -│ * norm of residual = 2.83e-07 -└ * number of operations = 8 -[ Info: LBFGS: iter 29, time 742.71 s: f = -0.660960969686, ‖∇f‖ = 1.7471e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.539558878304e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.539752091369e-01 err = 4.1470294142e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +5.539792510442e-01 err = 4.7847540257e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.539796111926e-01 err = 1.1555918689e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.539796417725e-01 err = 4.1461570076e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.539796443371e-01 err = 1.2084325931e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.539796445513e-01 err = 1.9632555807e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.539796445691e-01 err = 3.6393072328e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.539796445706e-01 err = 6.6099892800e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.539796445708e-01 err = 1.7934472006e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.539796445708e-01 err = 4.7538083772e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.539796445708e-01 err = 1.3049298279e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.539796445708e-01 err = 3.9479295853e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.539796445708e-01 err = 1.0139677357e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.539796445708e-01 err = 3.3404786037e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.539796445708e-01 err = 7.9259193557e-10 time = 0.00 sec -[ Info: CTMRG 16: obj = +5.539796445708e-01 err = 2.8292805329e-10 time = 0.00 sec -[ Info: CTMRG conv 17: obj = +5.539796445708e-01 err = 6.2037879550e-11 time = 0.07 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.90e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 5.41e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.06e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.03e-06 -[ Info: BiCGStab linsolve in iteration 2.5: normres = 1.11e-06 -┌ Info: BiCGStab linsolve converged at iteration 3: -│ * norm of residual = 1.12e-08 -└ * number of operations = 8 -[ Info: LBFGS: iter 30, time 742.95 s: f = -0.661039077160, ‖∇f‖ = 1.1401e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.543832099958e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.543792183643e-01 err = 3.7883656995e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.543790438941e-01 err = 2.6898809478e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.543790313905e-01 err = 1.0538275064e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.543790303854e-01 err = 2.3573598711e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.543790303045e-01 err = 4.1273066505e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.543790302980e-01 err = 7.7637788890e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.543790302975e-01 err = 2.4626010034e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.543790302975e-01 err = 6.1769076461e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.543790302975e-01 err = 2.2693899191e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.543790302975e-01 err = 5.6638817605e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.543790302975e-01 err = 2.0553265137e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.543790302975e-01 err = 5.2998319426e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.543790302975e-01 err = 1.9025272420e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.543790302975e-01 err = 5.0219617993e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.543790302975e-01 err = 1.7921504633e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +5.543790302975e-01 err = 4.8030813529e-10 time = 0.00 sec -[ Info: CTMRG 17: obj = +5.543790302975e-01 err = 1.7096037135e-10 time = 0.00 sec -[ Info: CTMRG conv 18: obj = +5.543790302975e-01 err = 4.6283162910e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.90e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.10e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 7.90e-06 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.30e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 4.48e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 31, time 743.15 s: f = -0.661087806652, ‖∇f‖ = 1.0339e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.519543985810e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.519518927726e-01 err = 1.3395954187e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +5.519518865043e-01 err = 1.3634648983e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.519518868851e-01 err = 6.5563096965e-03 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.519518869269e-01 err = 2.1108600340e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.519518869307e-01 err = 5.2480763606e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.519518869310e-01 err = 7.0692167650e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.519518869310e-01 err = 1.3219974578e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.519518869310e-01 err = 1.9470385022e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.519518869310e-01 err = 5.5788700872e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.519518869310e-01 err = 1.9802755960e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.519518869310e-01 err = 5.0593860126e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.519518869310e-01 err = 1.9270770547e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.519518869310e-01 err = 5.0349407772e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.519518869310e-01 err = 1.8801447845e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.519518869310e-01 err = 5.0040090660e-10 time = 0.00 sec -[ Info: CTMRG 16: obj = +5.519518869310e-01 err = 1.8410365012e-10 time = 0.00 sec -[ Info: CTMRG conv 17: obj = +5.519518869310e-01 err = 4.9569737079e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.91e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 3.83e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 9.73e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 5.90e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 32, time 743.35 s: f = -0.661121452359, ‖∇f‖ = 8.8764e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.435912005696e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.436007882889e-01 err = 3.0325945688e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +5.436033225325e-01 err = 4.0530949330e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.436035780366e-01 err = 1.1462831550e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.436036025205e-01 err = 8.7060100692e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.436036048348e-01 err = 2.7786670383e-03 time = 0.01 sec -[ Info: CTMRG 6: obj = +5.436036050524e-01 err = 4.9328772754e-04 time = 0.01 sec -[ Info: CTMRG 7: obj = +5.436036050728e-01 err = 6.6855650971e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.436036050747e-01 err = 9.6809505522e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.436036050749e-01 err = 1.5748130724e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.436036050749e-01 err = 4.1842173186e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.436036050749e-01 err = 1.2902906913e-07 time = 0.01 sec -[ Info: CTMRG 12: obj = +5.436036050749e-01 err = 3.7976395576e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.436036050749e-01 err = 1.2130088618e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.436036050749e-01 err = 3.3624163166e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.436036050749e-01 err = 1.1552460156e-09 time = 0.01 sec -[ Info: CTMRG 16: obj = +5.436036050749e-01 err = 3.1073672437e-10 time = 0.00 sec -[ Info: CTMRG 17: obj = +5.436036050749e-01 err = 1.0997143024e-10 time = 0.00 sec -[ Info: CTMRG conv 18: obj = +5.436036050749e-01 err = 2.9784875217e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.94e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 5.35e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.28e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 3.19e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 6.22e-08 -└ * number of operations = 7 -[ Info: LBFGS: iter 33, time 743.57 s: f = -0.661180968072, ‖∇f‖ = 1.0798e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.439225121131e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.439193276537e-01 err = 3.8824424609e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.439202291941e-01 err = 1.6593452375e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +5.439203158928e-01 err = 5.3340807460e-03 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.439203241746e-01 err = 2.7838671876e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.439203249619e-01 err = 7.2572765319e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.439203250366e-01 err = 1.6885253072e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.439203250437e-01 err = 3.2900532985e-05 time = 0.01 sec -[ Info: CTMRG 8: obj = +5.439203250443e-01 err = 6.5666193756e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.439203250444e-01 err = 2.3797750506e-06 time = 0.01 sec -[ Info: CTMRG 10: obj = +5.439203250444e-01 err = 6.2761973516e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.439203250444e-01 err = 2.3097295090e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.439203250444e-01 err = 5.7123356250e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.439203250444e-01 err = 2.0798630020e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.439203250444e-01 err = 5.0929076578e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.439203250444e-01 err = 1.8485408848e-09 time = 0.01 sec -[ Info: CTMRG 16: obj = +5.439203250444e-01 err = 4.5054917151e-10 time = 0.00 sec -[ Info: CTMRG 17: obj = +5.439203250444e-01 err = 1.6333204943e-10 time = 0.01 sec -[ Info: CTMRG conv 18: obj = +5.439203250444e-01 err = 3.9696609234e-11 time = 0.10 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.95e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 6.12e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.85e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.57e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 5.37e-08 -└ * number of operations = 7 -[ Info: CTMRG init: obj = +5.438718833136e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.438710974166e-01 err = 2.6162492611e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.438713361071e-01 err = 8.4657179009e-03 time = 0.01 sec -[ Info: CTMRG 3: obj = +5.438713587572e-01 err = 3.0378244946e-03 time = 0.01 sec -[ Info: CTMRG 4: obj = +5.438713608992e-01 err = 1.2098309665e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.438713611009e-01 err = 5.5922136679e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.438713611198e-01 err = 8.6609309395e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.438713611216e-01 err = 1.7685720841e-05 time = 0.01 sec -[ Info: CTMRG 8: obj = +5.438713611218e-01 err = 4.4876625855e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.438713611218e-01 err = 1.2542553505e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.438713611218e-01 err = 3.8070769294e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.438713611218e-01 err = 1.0921906499e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.438713611218e-01 err = 3.3983804551e-08 time = 0.01 sec -[ Info: CTMRG 13: obj = +5.438713611218e-01 err = 9.6871498319e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.438713611218e-01 err = 3.0340630051e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.438713611218e-01 err = 8.5878984189e-10 time = 0.00 sec -[ Info: CTMRG 16: obj = +5.438713611218e-01 err = 2.7010186529e-10 time = 0.01 sec -[ Info: CTMRG conv 17: obj = +5.438713611218e-01 err = 7.5993244513e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.94e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 5.76e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.93e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.81e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 4.28e-08 -└ * number of operations = 7 -[ Info: LBFGS: iter 34, time 744.01 s: f = -0.661206863491, ‖∇f‖ = 9.1298e-03, α = 5.16e-01, m = 16, nfg = 2 -[ Info: CTMRG init: obj = +5.441731369005e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.441718411263e-01 err = 6.7685026096e-03 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.441718309851e-01 err = 3.8979572503e-03 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.441718304264e-01 err = 2.7832993020e-03 time = 0.01 sec -[ Info: CTMRG 4: obj = +5.441718303786e-01 err = 3.5203612978e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.441718303742e-01 err = 1.1460341716e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.441718303738e-01 err = 3.6608408369e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.441718303738e-01 err = 5.5583878613e-06 time = 0.01 sec -[ Info: CTMRG 8: obj = +5.441718303738e-01 err = 1.9626085459e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.441718303738e-01 err = 5.2070037428e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.441718303738e-01 err = 1.6404286084e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.441718303738e-01 err = 4.8993730928e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.441718303738e-01 err = 1.4795669704e-08 time = 0.01 sec -[ Info: CTMRG 13: obj = +5.441718303738e-01 err = 4.4733946164e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.441718303738e-01 err = 1.3563707019e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.441718303738e-01 err = 4.0974489918e-10 time = 0.00 sec -[ Info: CTMRG 16: obj = +5.441718303738e-01 err = 1.2511107466e-10 time = 0.01 sec -[ Info: CTMRG conv 17: obj = +5.441718303738e-01 err = 3.7661518747e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.95e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.45e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.90e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 2.89e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 7.40e-08 -└ * number of operations = 7 -[ Info: LBFGS: iter 35, time 744.23 s: f = -0.661226335408, ‖∇f‖ = 6.6169e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.402058126435e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.402058667336e-01 err = 1.3736911282e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.402056323671e-01 err = 1.9367344047e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +5.402056082882e-01 err = 6.9372113248e-03 time = 0.01 sec -[ Info: CTMRG 4: obj = +5.402056059275e-01 err = 4.1933668480e-03 time = 0.01 sec -[ Info: CTMRG 5: obj = +5.402056056985e-01 err = 1.2150256164e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.402056056764e-01 err = 2.6340454902e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.402056056743e-01 err = 3.6495057334e-05 time = 0.01 sec -[ Info: CTMRG 8: obj = +5.402056056741e-01 err = 8.1080371742e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.402056056741e-01 err = 1.9598109735e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.402056056741e-01 err = 5.9412479992e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.402056056741e-01 err = 1.6809402337e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.402056056741e-01 err = 5.0133967112e-08 time = 0.01 sec -[ Info: CTMRG 13: obj = +5.402056056741e-01 err = 1.4566593242e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.402056056741e-01 err = 4.3159068215e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.402056056741e-01 err = 1.2684921746e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +5.402056056741e-01 err = 3.7436597894e-10 time = 0.01 sec -[ Info: CTMRG 17: obj = +5.402056056741e-01 err = 1.1109468648e-10 time = 0.00 sec -[ Info: CTMRG conv 18: obj = +5.402056056741e-01 err = 3.2694659242e-11 time = 0.10 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.97e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 3.52e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.60e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 8.52e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 2.36e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 36, time 744.46 s: f = -0.661260012209, ‖∇f‖ = 5.9848e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.401725794020e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.401714569933e-01 err = 1.5858490766e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.401713229617e-01 err = 1.1887922679e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +5.401713082865e-01 err = 5.8941340539e-03 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.401713067984e-01 err = 2.3609052771e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.401713066517e-01 err = 4.5579772643e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.401713066375e-01 err = 7.4411336242e-05 time = 0.01 sec -[ Info: CTMRG 7: obj = +5.401713066361e-01 err = 2.9212141435e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.401713066359e-01 err = 4.7712606710e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.401713066359e-01 err = 1.3660234248e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.401713066359e-01 err = 3.8297770309e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.401713066359e-01 err = 9.8707294969e-08 time = 0.01 sec -[ Info: CTMRG 12: obj = +5.401713066359e-01 err = 3.2189981170e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.401713066359e-01 err = 8.6089099021e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.401713066359e-01 err = 2.7400151227e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.401713066359e-01 err = 7.4412132300e-10 time = 0.01 sec -[ Info: CTMRG 16: obj = +5.401713066359e-01 err = 2.3514539335e-10 time = 0.00 sec -[ Info: CTMRG conv 17: obj = +5.401713066359e-01 err = 6.4308071272e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.96e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 2.28e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 5.22e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 6.84e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 37, time 744.67 s: f = -0.661268668988, ‖∇f‖ = 1.0826e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.387272115400e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.387280402148e-01 err = 6.8278088737e-03 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.387281861458e-01 err = 5.4261176243e-03 time = 0.01 sec -[ Info: CTMRG 3: obj = +5.387282009746e-01 err = 3.5477831519e-03 time = 0.01 sec -[ Info: CTMRG 4: obj = +5.387282024107e-01 err = 1.2815961301e-03 time = 0.01 sec -[ Info: CTMRG 5: obj = +5.387282025478e-01 err = 4.1247266285e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.387282025609e-01 err = 7.8780023012e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.387282025621e-01 err = 1.5191343931e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.387282025622e-01 err = 1.6849366862e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.387282025622e-01 err = 5.8112364784e-07 time = 0.01 sec -[ Info: CTMRG 10: obj = +5.387282025622e-01 err = 1.0548979422e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.387282025622e-01 err = 3.6985392527e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.387282025622e-01 err = 8.1728765595e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.387282025622e-01 err = 2.8468727637e-09 time = 0.01 sec -[ Info: CTMRG 14: obj = +5.387282025622e-01 err = 6.5380497724e-10 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.387282025622e-01 err = 2.2799144818e-10 time = 0.00 sec -[ Info: CTMRG conv 16: obj = +5.387282025622e-01 err = 5.3067244057e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.97e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 2.40e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 7.40e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 3.26e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 38, time 744.88 s: f = -0.661283178602, ‖∇f‖ = 5.0739e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.369964811744e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.369958426469e-01 err = 9.4665859289e-03 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.369958232411e-01 err = 7.2919910161e-03 time = 0.01 sec -[ Info: CTMRG 3: obj = +5.369958212074e-01 err = 2.6813496126e-03 time = 0.01 sec -[ Info: CTMRG 4: obj = +5.369958209935e-01 err = 1.5600120967e-03 time = 0.01 sec -[ Info: CTMRG 5: obj = +5.369958209719e-01 err = 4.8430330270e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.369958209697e-01 err = 9.5587029525e-05 time = 0.01 sec -[ Info: CTMRG 7: obj = +5.369958209695e-01 err = 2.1059613530e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.369958209695e-01 err = 2.4345077718e-06 time = 0.01 sec -[ Info: CTMRG 9: obj = +5.369958209695e-01 err = 6.8888816326e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.369958209694e-01 err = 1.3341897127e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.369958209694e-01 err = 3.6052046390e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.369958209694e-01 err = 9.6155249588e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.369958209694e-01 err = 2.7046972936e-09 time = 0.01 sec -[ Info: CTMRG 14: obj = +5.369958209694e-01 err = 7.2109040450e-10 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.369958209694e-01 err = 2.1438212277e-10 time = 0.00 sec -[ Info: CTMRG conv 16: obj = +5.369958209694e-01 err = 5.5378076280e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 1.98e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 2.34e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 9.34e-06 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.10e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 3.93e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 39, time 745.09 s: f = -0.661293239500, ‖∇f‖ = 4.8729e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.354449621486e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.354428703136e-01 err = 1.3758626843e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.354426286569e-01 err = 9.4531308920e-03 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.354426026719e-01 err = 4.1268435550e-03 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.354426000294e-01 err = 1.6904169178e-03 time = 0.01 sec -[ Info: CTMRG 5: obj = +5.354425997668e-01 err = 5.6495328902e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.354425997410e-01 err = 1.2406061781e-04 time = 0.01 sec -[ Info: CTMRG 7: obj = +5.354425997385e-01 err = 3.2896972597e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.354425997382e-01 err = 4.5159923684e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.354425997382e-01 err = 9.4300150796e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.354425997382e-01 err = 1.5743296513e-07 time = 0.01 sec -[ Info: CTMRG 11: obj = +5.354425997382e-01 err = 3.6347007617e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.354425997382e-01 err = 9.5386751694e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.354425997382e-01 err = 2.3105075215e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.354425997382e-01 err = 6.7328852738e-10 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.354425997382e-01 err = 1.7390418021e-10 time = 0.01 sec -[ Info: CTMRG conv 16: obj = +5.354425997382e-01 err = 5.1797540885e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.00e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.60e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 5.03e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 1.64e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 40, time 745.30 s: f = -0.661307958912, ‖∇f‖ = 6.2349e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.313300515273e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.313227231700e-01 err = 4.4955824128e-02 time = 0.05 sec -[ Info: CTMRG 2: obj = +5.313214982545e-01 err = 3.5216830098e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +5.313213594837e-01 err = 1.0313978214e-02 time = 0.01 sec -[ Info: CTMRG 4: obj = +5.313213449633e-01 err = 4.6653180367e-03 time = 0.01 sec -[ Info: CTMRG 5: obj = +5.313213434831e-01 err = 2.7519312188e-03 time = 0.01 sec -[ Info: CTMRG 6: obj = +5.313213433338e-01 err = 6.2471105040e-04 time = 0.24 sec -[ Info: CTMRG 7: obj = +5.313213433188e-01 err = 8.9044402819e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.313213433173e-01 err = 1.3219042603e-05 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.313213433172e-01 err = 1.3218961535e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.313213433171e-01 err = 2.0252425310e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.313213433171e-01 err = 3.0592872243e-08 time = 0.01 sec -[ Info: CTMRG 12: obj = +5.313213433171e-01 err = 1.0430527544e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.313213433171e-01 err = 3.2804517865e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.313213433171e-01 err = 1.0599478835e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.313213433171e-01 err = 3.3601729140e-10 time = 0.00 sec -[ Info: CTMRG 16: obj = +5.313213433171e-01 err = 1.0719310492e-10 time = 0.00 sec -[ Info: CTMRG conv 17: obj = +5.313213433171e-01 err = 3.3958179369e-11 time = 0.36 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.02e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.87e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.17e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 8.28e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 41, time 745.78 s: f = -0.661342970541, ‖∇f‖ = 9.2762e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.211957382243e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.211762625113e-01 err = 1.1020646844e-01 time = 0.01 sec -[ Info: CTMRG 2: obj = +5.211699611963e-01 err = 7.4481850072e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +5.211691766127e-01 err = 2.8333498724e-02 time = 0.01 sec -[ Info: CTMRG 4: obj = +5.211690886423e-01 err = 1.3446085947e-02 time = 0.01 sec -[ Info: CTMRG 5: obj = +5.211690790472e-01 err = 5.3309638064e-03 time = 0.01 sec -[ Info: CTMRG 6: obj = +5.211690780121e-01 err = 1.4211663296e-03 time = 0.01 sec -[ Info: CTMRG 7: obj = +5.211690779010e-01 err = 2.7551066064e-04 time = 0.01 sec -[ Info: CTMRG 8: obj = +5.211690778891e-01 err = 4.2886745899e-05 time = 0.01 sec -[ Info: CTMRG 9: obj = +5.211690778878e-01 err = 6.7351499237e-06 time = 0.01 sec -[ Info: CTMRG 10: obj = +5.211690778877e-01 err = 1.1402719805e-06 time = 0.01 sec -[ Info: CTMRG 11: obj = +5.211690778877e-01 err = 2.4387962316e-07 time = 0.02 sec -[ Info: CTMRG 12: obj = +5.211690778877e-01 err = 6.3206588382e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.211690778877e-01 err = 2.0797435605e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.211690778877e-01 err = 6.8305846215e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.211690778877e-01 err = 2.2373264449e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +5.211690778877e-01 err = 7.3217787642e-10 time = 0.00 sec -[ Info: CTMRG 17: obj = +5.211690778877e-01 err = 2.3951036344e-10 time = 0.00 sec -[ Info: CTMRG conv 18: obj = +5.211690778877e-01 err = 7.8329627217e-11 time = 0.12 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.15e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 6.65e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.51e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 3.07e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 8.91e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 42, time 746.01 s: f = -0.661417237192, ‖∇f‖ = 1.7461e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.043151425320e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.043555440692e-01 err = 2.0606605946e-01 time = 0.00 sec -[ Info: CTMRG 2: obj = +5.043465249374e-01 err = 8.1521389483e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.043451858294e-01 err = 2.1121628078e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.043450181480e-01 err = 2.0283629507e-02 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.043449977818e-01 err = 7.2215239307e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.043449953361e-01 err = 2.1237200881e-03 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.043449950439e-01 err = 3.9825944576e-04 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.043449950090e-01 err = 6.9297647607e-05 time = 0.01 sec -[ Info: CTMRG 9: obj = +5.043449950049e-01 err = 1.1901554409e-05 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.043449950044e-01 err = 2.2630675674e-06 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.043449950043e-01 err = 5.6906075100e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.043449950043e-01 err = 2.0419831879e-07 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.043449950043e-01 err = 7.1495393819e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.043449950043e-01 err = 2.4787306425e-08 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.043449950043e-01 err = 8.5680098104e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +5.043449950043e-01 err = 2.9580859866e-09 time = 0.00 sec -[ Info: CTMRG 17: obj = +5.043449950043e-01 err = 1.0207665562e-09 time = 0.00 sec -[ Info: CTMRG 18: obj = +5.043449950043e-01 err = 3.5215445851e-10 time = 0.00 sec -[ Info: CTMRG 19: obj = +5.043449950043e-01 err = 1.2149427622e-10 time = 0.00 sec -[ Info: CTMRG conv 20: obj = +5.043449950043e-01 err = 4.1898392519e-11 time = 0.10 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.25e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 8.54e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 6.78e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 4.41e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 1.85e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 43, time 746.22 s: f = -0.661494994773, ‖∇f‖ = 2.7924e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.027450069913e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.027378701297e-01 err = 5.1094487540e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +5.027370044925e-01 err = 2.0610784853e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +5.027369010069e-01 err = 8.9218148869e-03 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.027368888989e-01 err = 5.8962347694e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.027368874749e-01 err = 1.7424506238e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.027368873071e-01 err = 3.6499390894e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +5.027368872873e-01 err = 5.9104469886e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.027368872850e-01 err = 1.0134500875e-05 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.027368872847e-01 err = 2.6327575699e-06 time = 0.01 sec -[ Info: CTMRG 10: obj = +5.027368872847e-01 err = 7.7928412920e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.027368872847e-01 err = 2.5620774270e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +5.027368872847e-01 err = 8.6761876916e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.027368872847e-01 err = 2.9808928092e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.027368872847e-01 err = 1.0273657402e-08 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.027368872847e-01 err = 3.5438348184e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +5.027368872847e-01 err = 1.2221827880e-09 time = 0.00 sec -[ Info: CTMRG 17: obj = +5.027368872847e-01 err = 4.2139137129e-10 time = 0.00 sec -[ Info: CTMRG 18: obj = +5.027368872847e-01 err = 1.4519064354e-10 time = 0.00 sec -[ Info: CTMRG conv 19: obj = +5.027368872847e-01 err = 5.0033079164e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.27e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 9.03e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 5.65e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 3.29e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 2.45e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 44, time 746.42 s: f = -0.661665032445, ‖∇f‖ = 2.1193e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.997259388265e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.997434091165e-01 err = 2.1319379898e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.997424394894e-01 err = 3.1440794778e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.997423047248e-01 err = 8.9566756650e-03 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.997422872813e-01 err = 7.8488341655e-03 time = 0.01 sec -[ Info: CTMRG 5: obj = +4.997422850616e-01 err = 1.5740316196e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.997422847814e-01 err = 1.7287364053e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.997422847462e-01 err = 3.5399981148e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.997422847418e-01 err = 7.5354269222e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.997422847413e-01 err = 1.7472653580e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.997422847412e-01 err = 4.7902544415e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.997422847412e-01 err = 1.5276794453e-07 time = 0.01 sec -[ Info: CTMRG 12: obj = +4.997422847412e-01 err = 5.3831290570e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.997422847412e-01 err = 1.9059392235e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.997422847412e-01 err = 6.7681376868e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.997422847412e-01 err = 2.4084368673e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.997422847412e-01 err = 8.5816732731e-10 time = 0.00 sec -[ Info: CTMRG 17: obj = +4.997422847412e-01 err = 3.0600090431e-10 time = 0.00 sec -[ Info: CTMRG 18: obj = +4.997422847412e-01 err = 1.0917235381e-10 time = 0.01 sec -[ Info: CTMRG conv 19: obj = +4.997422847412e-01 err = 3.8984024490e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.22e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 7.73e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.33e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 2.04e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 1.93e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 45, time 746.63 s: f = -0.661840699875, ‖∇f‖ = 2.3535e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.912350354529e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.912801591534e-01 err = 4.9201443171e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.912817703942e-01 err = 9.4018965645e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.912819658265e-01 err = 1.3882058341e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.912819946837e-01 err = 2.2253187793e-02 time = 0.01 sec -[ Info: CTMRG 5: obj = +4.912819989460e-01 err = 5.2173976273e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.912819995745e-01 err = 8.4145188946e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.912819996671e-01 err = 1.1678436587e-04 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.912819996808e-01 err = 2.1299738318e-05 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.912819996829e-01 err = 3.8322897521e-06 time = 0.01 sec -[ Info: CTMRG 10: obj = +4.912819996832e-01 err = 8.3512527203e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.912819996832e-01 err = 2.2574105482e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.912819996832e-01 err = 7.7895221879e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.912819996832e-01 err = 2.9696038140e-08 time = 0.01 sec -[ Info: CTMRG 14: obj = +4.912819996832e-01 err = 1.1434886267e-08 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.912819996832e-01 err = 4.4168598480e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.912819996832e-01 err = 1.7079986063e-09 time = 0.00 sec -[ Info: CTMRG 17: obj = +4.912819996832e-01 err = 6.6070850458e-10 time = 0.01 sec -[ Info: CTMRG 18: obj = +4.912819996832e-01 err = 2.5565601745e-10 time = 0.00 sec -[ Info: CTMRG conv 19: obj = +4.912819996832e-01 err = 9.8917416004e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.25e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 8.46e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 5.16e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 2.47e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 1.85e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 46, time 746.84 s: f = -0.661983211854, ‖∇f‖ = 2.0945e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +5.025330516247e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +5.025013161656e-01 err = 3.7262956909e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +5.024982636995e-01 err = 5.9104360401e-02 time = 0.01 sec -[ Info: CTMRG 3: obj = +5.024978015183e-01 err = 1.9898674105e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +5.024977361778e-01 err = 2.0977057198e-02 time = 0.00 sec -[ Info: CTMRG 5: obj = +5.024977271904e-01 err = 4.8084494692e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +5.024977259681e-01 err = 5.5766592047e-04 time = 0.01 sec -[ Info: CTMRG 7: obj = +5.024977258026e-01 err = 6.5443767084e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +5.024977257802e-01 err = 1.0298289364e-05 time = 0.00 sec -[ Info: CTMRG 9: obj = +5.024977257772e-01 err = 2.5804937220e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +5.024977257768e-01 err = 8.1137457236e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +5.024977257768e-01 err = 2.8719120710e-07 time = 0.01 sec -[ Info: CTMRG 12: obj = +5.024977257767e-01 err = 1.0504451781e-07 time = 0.00 sec -[ Info: CTMRG 13: obj = +5.024977257767e-01 err = 3.8941462508e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +5.024977257767e-01 err = 1.4491179912e-08 time = 0.00 sec -[ Info: CTMRG 15: obj = +5.024977257767e-01 err = 5.4009794604e-09 time = 0.01 sec -[ Info: CTMRG 16: obj = +5.024977257767e-01 err = 2.0140266561e-09 time = 0.00 sec -[ Info: CTMRG 17: obj = +5.024977257767e-01 err = 7.5124019201e-10 time = 0.00 sec -[ Info: CTMRG 18: obj = +5.024977257767e-01 err = 2.8023658102e-10 time = 0.00 sec -[ Info: CTMRG 19: obj = +5.024977257767e-01 err = 1.0453510150e-10 time = 0.01 sec -[ Info: CTMRG conv 20: obj = +5.024977257767e-01 err = 3.9037482248e-11 time = 0.10 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.40e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 9.88e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.57e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 2.17e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 1.83e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 47, time 747.06 s: f = -0.662069016591, ‖∇f‖ = 1.9084e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.864801008385e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.866290742665e-01 err = 4.9250010918e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.866281147451e-01 err = 6.7595039472e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.866277796217e-01 err = 2.2923353155e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.866277230508e-01 err = 2.6443022022e-02 time = 0.01 sec -[ Info: CTMRG 5: obj = +4.866277139855e-01 err = 7.3747801331e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.866277125523e-01 err = 1.4227474364e-03 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.866277123270e-01 err = 2.2988468978e-04 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.866277122917e-01 err = 3.7643953857e-05 time = 0.01 sec -[ Info: CTMRG 9: obj = +4.866277122861e-01 err = 6.5965927946e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.866277122853e-01 err = 1.2085745198e-06 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.866277122851e-01 err = 2.8540650146e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.866277122851e-01 err = 1.2829494096e-07 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.866277122851e-01 err = 5.4456178407e-08 time = 0.01 sec -[ Info: CTMRG 14: obj = +4.866277122851e-01 err = 2.2285903244e-08 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.866277122851e-01 err = 8.9850902997e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.866277122851e-01 err = 3.6010095035e-09 time = 0.00 sec -[ Info: CTMRG 17: obj = +4.866277122851e-01 err = 1.4399030956e-09 time = 0.01 sec -[ Info: CTMRG 18: obj = +4.866277122851e-01 err = 5.7521663851e-10 time = 0.00 sec -[ Info: CTMRG 19: obj = +4.866277122851e-01 err = 2.2974368228e-10 time = 0.00 sec -[ Info: CTMRG conv 20: obj = +4.866277122851e-01 err = 9.1731499957e-11 time = 0.10 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.43e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.03e-04 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.02e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 2.13e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 3.30e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 48, time 747.27 s: f = -0.662233515834, ‖∇f‖ = 1.7527e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.865762026415e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.865552131075e-01 err = 2.5099336574e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.865543433734e-01 err = 1.6187632893e-02 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.865541812568e-01 err = 1.2454578674e-02 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.865541532339e-01 err = 2.6180836383e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.865541485675e-01 err = 1.3770069427e-03 time = 0.01 sec -[ Info: CTMRG 6: obj = +4.865541478018e-01 err = 3.0527243762e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.865541476768e-01 err = 6.5580721151e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.865541476564e-01 err = 1.2631547800e-05 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.865541476531e-01 err = 2.4491119457e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.865541476526e-01 err = 6.0792872105e-07 time = 0.01 sec -[ Info: CTMRG 11: obj = +4.865541476525e-01 err = 2.4500096860e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.865541476525e-01 err = 1.0074365221e-07 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.865541476525e-01 err = 4.1130823135e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.865541476525e-01 err = 1.6694836785e-08 time = 0.01 sec -[ Info: CTMRG 15: obj = +4.865541476525e-01 err = 6.7564919172e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.865541476525e-01 err = 2.7308124124e-09 time = 0.00 sec -[ Info: CTMRG 17: obj = +4.865541476525e-01 err = 1.1031092630e-09 time = 0.00 sec -[ Info: CTMRG 18: obj = +4.865541476525e-01 err = 4.4549134178e-10 time = 0.01 sec -[ Info: CTMRG 19: obj = +4.865541476525e-01 err = 1.7989576062e-10 time = 0.00 sec -[ Info: CTMRG conv 20: obj = +4.865541476525e-01 err = 7.2639870177e-11 time = 0.10 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.39e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 8.75e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.32e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 2.39e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 2.83e-07 -└ * number of operations = 7 -[ Info: CTMRG init: obj = +4.867581560856e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.867519001252e-01 err = 1.2951453645e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.867516101978e-01 err = 9.1993381187e-03 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.867515568795e-01 err = 6.2073431202e-03 time = 0.01 sec -[ Info: CTMRG 4: obj = +4.867515477783e-01 err = 1.3390206492e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.867515462749e-01 err = 6.3459200659e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.867515460297e-01 err = 1.2048535350e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.867515459899e-01 err = 2.6264484414e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.867515459835e-01 err = 4.9481206357e-06 time = 0.01 sec -[ Info: CTMRG 9: obj = +4.867515459824e-01 err = 1.0106694922e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.867515459823e-01 err = 3.1666024681e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.867515459822e-01 err = 1.3614558734e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.867515459822e-01 err = 5.6526890923e-08 time = 0.01 sec -[ Info: CTMRG 13: obj = +4.867515459822e-01 err = 2.3047740445e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.867515459822e-01 err = 9.3186500948e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.867515459822e-01 err = 3.7542292065e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.867515459822e-01 err = 1.5101684939e-09 time = 0.00 sec -[ Info: CTMRG 17: obj = +4.867515459822e-01 err = 6.0707054414e-10 time = 0.01 sec -[ Info: CTMRG 18: obj = +4.867515459822e-01 err = 2.4398323899e-10 time = 0.00 sec -[ Info: CTMRG conv 19: obj = +4.867515459822e-01 err = 9.8042421643e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.40e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 8.02e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.72e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.78e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 2.56e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 49, time 747.70 s: f = -0.662332106545, ‖∇f‖ = 1.6912e-02, α = 5.23e-01, m = 16, nfg = 2 -[ Info: CTMRG init: obj = +4.862950588272e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.862840325625e-01 err = 9.1042291527e-03 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.862839806779e-01 err = 6.6410828656e-03 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.862839797666e-01 err = 6.8678084765e-03 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.862839797727e-01 err = 2.6672908191e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.862839797791e-01 err = 7.2026531035e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.862839797805e-01 err = 1.3225164977e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.862839797808e-01 err = 2.0312511868e-05 time = 0.01 sec -[ Info: CTMRG 8: obj = +4.862839797808e-01 err = 3.5372990652e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.862839797808e-01 err = 5.5125618545e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.862839797808e-01 err = 2.1581964431e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.862839797808e-01 err = 9.4072818763e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.862839797808e-01 err = 3.9343276160e-08 time = 0.01 sec -[ Info: CTMRG 13: obj = +4.862839797808e-01 err = 1.6104078487e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.862839797808e-01 err = 6.5346722834e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.862839797808e-01 err = 2.6423533830e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.862839797808e-01 err = 1.0668463153e-09 time = 0.01 sec -[ Info: CTMRG 17: obj = +4.862839797808e-01 err = 4.3042610028e-10 time = 0.00 sec -[ Info: CTMRG 18: obj = +4.862839797808e-01 err = 1.7360600259e-10 time = 0.00 sec -[ Info: CTMRG conv 19: obj = +4.862839797808e-01 err = 7.0003540153e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.42e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 8.10e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 4.19e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 2.30e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 2.76e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 50, time 747.91 s: f = -0.662397705763, ‖∇f‖ = 1.0361e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.893824468396e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.893695986099e-01 err = 1.1390621318e-02 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.893690571249e-01 err = 1.3380894274e-02 time = 0.05 sec -[ Info: CTMRG 3: obj = +4.893689684468e-01 err = 5.4894625530e-03 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.893689539309e-01 err = 7.8963541007e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.893689515958e-01 err = 1.7736394097e-03 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.893689512234e-01 err = 3.0241836955e-04 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.893689511642e-01 err = 4.8275441414e-05 time = 0.24 sec -[ Info: CTMRG 8: obj = +4.893689511548e-01 err = 8.2763977483e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.893689511533e-01 err = 1.2655865883e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.893689511530e-01 err = 1.7864090952e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.893689511530e-01 err = 4.9868465607e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.893689511530e-01 err = 1.9670269269e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.893689511530e-01 err = 8.0856259813e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.893689511530e-01 err = 3.2837613747e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.893689511530e-01 err = 1.3220813178e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.893689511530e-01 err = 5.3021149954e-10 time = 0.00 sec -[ Info: CTMRG 17: obj = +4.893689511530e-01 err = 2.1230558278e-10 time = 0.00 sec -[ Info: CTMRG conv 18: obj = +4.893689511530e-01 err = 8.4959096968e-11 time = 0.36 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.47e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 6.80e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.78e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 2.31e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 2.42e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 51, time 748.41 s: f = -0.662434512495, ‖∇f‖ = 8.3812e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.873344619303e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.873334243454e-01 err = 1.1099105959e-02 time = 0.01 sec -[ Info: CTMRG 2: obj = +4.873335983033e-01 err = 8.6096569291e-03 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.873336272395e-01 err = 2.6157767972e-03 time = 0.01 sec -[ Info: CTMRG 4: obj = +4.873336320352e-01 err = 4.1745171164e-03 time = 0.01 sec -[ Info: CTMRG 5: obj = +4.873336328165e-01 err = 1.1163254230e-03 time = 0.01 sec -[ Info: CTMRG 6: obj = +4.873336329429e-01 err = 2.0388090381e-04 time = 0.01 sec -[ Info: CTMRG 7: obj = +4.873336329633e-01 err = 3.6754193314e-05 time = 0.01 sec -[ Info: CTMRG 8: obj = +4.873336329666e-01 err = 6.8538024408e-06 time = 0.01 sec -[ Info: CTMRG 9: obj = +4.873336329672e-01 err = 1.1628953574e-06 time = 0.02 sec -[ Info: CTMRG 10: obj = +4.873336329672e-01 err = 2.1627590876e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.873336329673e-01 err = 7.3713651650e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.873336329673e-01 err = 3.0177412450e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.873336329673e-01 err = 1.2273757232e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.873336329673e-01 err = 4.9615562975e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.873336329673e-01 err = 1.9987296371e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.873336329673e-01 err = 8.0378253946e-10 time = 0.00 sec -[ Info: CTMRG 17: obj = +4.873336329673e-01 err = 3.2293571004e-10 time = 0.00 sec -[ Info: CTMRG 18: obj = +4.873336329673e-01 err = 1.2967864134e-10 time = 0.00 sec -[ Info: CTMRG conv 19: obj = +4.873336329673e-01 err = 5.2056103107e-11 time = 0.12 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.46e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 6.12e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 5.56e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 4.11e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 1.75e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 52, time 748.64 s: f = -0.662459914679, ‖∇f‖ = 5.8461e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.881417718274e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.881483950633e-01 err = 7.7310558650e-03 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.881497700741e-01 err = 4.1319082935e-03 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.881500114941e-01 err = 4.5310278701e-03 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.881500510368e-01 err = 3.0184843576e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.881500573751e-01 err = 9.4074464583e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.881500583830e-01 err = 2.0584326057e-04 time = 0.02 sec -[ Info: CTMRG 7: obj = +4.881500585428e-01 err = 4.1745001617e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.881500585681e-01 err = 9.1099662777e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.881500585721e-01 err = 2.4020935540e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.881500585727e-01 err = 7.6979464331e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.881500585728e-01 err = 2.9823699018e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.881500585728e-01 err = 1.1924474760e-07 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.881500585728e-01 err = 4.7569922080e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.881500585728e-01 err = 1.8950455035e-08 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.881500585728e-01 err = 7.5428339398e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.881500585728e-01 err = 3.0006434320e-09 time = 0.00 sec -[ Info: CTMRG 17: obj = +4.881500585728e-01 err = 1.1932906845e-09 time = 0.00 sec -[ Info: CTMRG 18: obj = +4.881500585728e-01 err = 4.7443931848e-10 time = 0.00 sec -[ Info: CTMRG 19: obj = +4.881500585728e-01 err = 1.8861717720e-10 time = 0.00 sec -[ Info: CTMRG conv 20: obj = +4.881500585728e-01 err = 7.4967997746e-11 time = 0.10 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.46e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.29e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.23e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 2.14e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 6.94e-08 -└ * number of operations = 7 -[ Info: LBFGS: iter 53, time 748.85 s: f = -0.662475090799, ‖∇f‖ = 1.1955e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.877652814782e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.877728053729e-01 err = 3.8203207689e-03 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.877744730022e-01 err = 2.7511456268e-03 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.877747604877e-01 err = 8.8932653684e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.877748072897e-01 err = 4.0671907071e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.877748147618e-01 err = 9.5452965796e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.877748159459e-01 err = 2.5790260975e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.877748161331e-01 err = 9.5666705065e-06 time = 0.01 sec -[ Info: CTMRG 8: obj = +4.877748161626e-01 err = 3.9937545292e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.877748161673e-01 err = 1.6485960408e-06 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.877748161680e-01 err = 6.6740022927e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.877748161681e-01 err = 2.6831715970e-07 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.877748161681e-01 err = 1.0727982803e-07 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.877748161681e-01 err = 4.2774024155e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.877748161681e-01 err = 1.7022782053e-08 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.877748161681e-01 err = 6.7671325669e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.877748161681e-01 err = 2.6882700423e-09 time = 0.00 sec -[ Info: CTMRG 17: obj = +4.877748161681e-01 err = 1.0674561471e-09 time = 0.00 sec -[ Info: CTMRG 18: obj = +4.877748161681e-01 err = 4.2374832168e-10 time = 0.00 sec -[ Info: CTMRG 19: obj = +4.877748161681e-01 err = 1.6818826336e-10 time = 0.00 sec -[ Info: CTMRG conv 20: obj = +4.877748161681e-01 err = 6.6746769170e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.46e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 3.00e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 7.46e-06 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.49e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 6.68e-08 -└ * number of operations = 7 -[ Info: LBFGS: iter 54, time 749.07 s: f = -0.662490551714, ‖∇f‖ = 4.3803e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.870317675865e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.870319253809e-01 err = 1.6664736676e-03 time = 0.01 sec -[ Info: CTMRG 2: obj = +4.870319134703e-01 err = 2.0776644147e-03 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.870319111716e-01 err = 1.1544245835e-03 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.870319107945e-01 err = 1.6366022073e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.870319107340e-01 err = 4.3842632216e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.870319107244e-01 err = 9.2273610132e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.870319107229e-01 err = 1.6440142298e-05 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.870319107226e-01 err = 2.7580834334e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.870319107226e-01 err = 4.5313147574e-07 time = 0.01 sec -[ Info: CTMRG 10: obj = +4.870319107226e-01 err = 7.3039979726e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.870319107226e-01 err = 1.3531950605e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.870319107226e-01 err = 3.9906609488e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.870319107226e-01 err = 1.5633451124e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.870319107226e-01 err = 6.3301560351e-10 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.870319107226e-01 err = 2.5470583934e-10 time = 0.01 sec -[ Info: CTMRG 16: obj = +4.870319107226e-01 err = 1.0193232141e-10 time = 0.00 sec -[ Info: CTMRG conv 17: obj = +4.870319107226e-01 err = 4.0689835072e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.47e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 3.30e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.28e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.14e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 8.02e-08 -└ * number of operations = 7 -[ Info: LBFGS: iter 55, time 749.27 s: f = -0.662494796646, ‖∇f‖ = 3.0803e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.867774155272e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.867774505566e-01 err = 2.4129670839e-03 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.867774604484e-01 err = 8.2999637010e-04 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.867774624891e-01 err = 1.2052675009e-03 time = 0.01 sec -[ Info: CTMRG 4: obj = +4.867774628317e-01 err = 7.8406209004e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.867774628872e-01 err = 2.2233661270e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.867774628961e-01 err = 4.7774794494e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.867774628975e-01 err = 9.2935061620e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.867774628978e-01 err = 1.6530791481e-06 time = 0.01 sec -[ Info: CTMRG 9: obj = +4.867774628978e-01 err = 2.9460621382e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.867774628978e-01 err = 9.1416010636e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.867774628978e-01 err = 3.4838553222e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.867774628978e-01 err = 1.3854341983e-08 time = 0.01 sec -[ Info: CTMRG 13: obj = +4.867774628978e-01 err = 5.5451742816e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.867774628978e-01 err = 2.2193757470e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.867774628978e-01 err = 8.8782169049e-10 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.867774628978e-01 err = 3.5499098017e-10 time = 0.01 sec -[ Info: CTMRG 17: obj = +4.867774628978e-01 err = 1.4189740703e-10 time = 0.00 sec -[ Info: CTMRG conv 18: obj = +4.867774628978e-01 err = 5.6705989414e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.18e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.72e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 2.62e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 1.12e-07 -└ * number of operations = 7 -[ Info: LBFGS: iter 56, time 749.48 s: f = -0.662500144159, ‖∇f‖ = 3.3935e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.860002353379e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.860013431488e-01 err = 3.3115184730e-03 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.860014757934e-01 err = 4.6320537559e-03 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.860014988886e-01 err = 1.0460184063e-03 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.860015027168e-01 err = 1.8618600125e-03 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.860015033390e-01 err = 3.9521060768e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.860015034393e-01 err = 6.9796470271e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.860015034555e-01 err = 1.4529615635e-05 time = 0.01 sec -[ Info: CTMRG 8: obj = +4.860015034581e-01 err = 2.6751335073e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.860015034585e-01 err = 6.7074458469e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.860015034586e-01 err = 2.6579258020e-07 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.860015034586e-01 err = 1.0816693846e-07 time = 0.01 sec -[ Info: CTMRG 12: obj = +4.860015034586e-01 err = 4.3801274739e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.860015034586e-01 err = 1.7649287882e-08 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.860015034586e-01 err = 7.0924442397e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.860015034586e-01 err = 2.8461462794e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.860015034586e-01 err = 1.1412987761e-09 time = 0.01 sec -[ Info: CTMRG 17: obj = +4.860015034586e-01 err = 4.5747320396e-10 time = 0.00 sec -[ Info: CTMRG 18: obj = +4.860015034586e-01 err = 1.8333045843e-10 time = 0.00 sec -[ Info: CTMRG conv 19: obj = +4.860015034586e-01 err = 7.3458567112e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.47e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.71e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.65e-05 -[ Info: BiCGStab linsolve in iteration 2: normres = 8.38e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 6.50e-08 -└ * number of operations = 7 -[ Info: LBFGS: iter 57, time 749.69 s: f = -0.662501922158, ‖∇f‖ = 5.3636e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.863578737185e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.863579909469e-01 err = 9.5313618234e-04 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.863580289693e-01 err = 1.3994846381e-03 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.863580355929e-01 err = 4.1410928667e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.863580366873e-01 err = 7.3460619254e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.863580368647e-01 err = 1.7260360784e-04 time = 0.01 sec -[ Info: CTMRG 6: obj = +4.863580368932e-01 err = 3.4080997535e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.863580368978e-01 err = 7.2299169005e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.863580368985e-01 err = 1.3644740944e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.863580368986e-01 err = 3.1155296829e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.863580368986e-01 err = 1.2542758283e-07 time = 0.01 sec -[ Info: CTMRG 11: obj = +4.863580368986e-01 err = 5.1015432158e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.863580368986e-01 err = 2.0633187411e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.863580368986e-01 err = 8.3082140012e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.863580368986e-01 err = 3.3371382732e-09 time = 0.01 sec -[ Info: CTMRG 15: obj = +4.863580368986e-01 err = 1.3385872957e-09 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.863580368986e-01 err = 5.3652763580e-10 time = 0.00 sec -[ Info: CTMRG 17: obj = +4.863580368986e-01 err = 2.1494620807e-10 time = 0.00 sec -[ Info: CTMRG conv 18: obj = +4.863580368986e-01 err = 8.6095563925e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.47e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.21e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.23e-05 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 4.60e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 58, time 749.89 s: f = -0.662504711089, ‖∇f‖ = 2.3876e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.866212669635e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.866213613100e-01 err = 1.4759657582e-03 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.866213747809e-01 err = 7.9289524373e-04 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.866213771274e-01 err = 5.1306401193e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.866213775143e-01 err = 4.2065930893e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.866213775769e-01 err = 1.0562284232e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.866213775869e-01 err = 2.4072274243e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.866213775886e-01 err = 5.1736460954e-06 time = 0.01 sec -[ Info: CTMRG 8: obj = +4.866213775888e-01 err = 9.8532084572e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.866213775889e-01 err = 1.9730125915e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.866213775889e-01 err = 7.1167411583e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.866213775889e-01 err = 2.8948314389e-08 time = 0.01 sec -[ Info: CTMRG 12: obj = +4.866213775889e-01 err = 1.1741049954e-08 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.866213775889e-01 err = 4.7348494686e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.866213775889e-01 err = 1.9029961332e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.866213775889e-01 err = 7.6342973253e-10 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.866213775889e-01 err = 3.0595469313e-10 time = 0.01 sec -[ Info: CTMRG 17: obj = +4.866213775889e-01 err = 1.2254344743e-10 time = 0.00 sec -[ Info: CTMRG conv 18: obj = +4.866213775889e-01 err = 4.9069377092e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.47e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 3.55e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 8.70e-06 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.81e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 8.12e-08 -└ * number of operations = 7 -[ Info: LBFGS: iter 59, time 750.10 s: f = -0.662506778078, ‖∇f‖ = 1.8200e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.867458482880e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.867459827181e-01 err = 1.9349503462e-03 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.867459822846e-01 err = 5.3929265647e-04 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.867459822054e-01 err = 7.3569257296e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.867459821906e-01 err = 2.0179568136e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.867459821881e-01 err = 6.4892812865e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.867459821877e-01 err = 1.3236857494e-05 time = 0.01 sec -[ Info: CTMRG 7: obj = +4.867459821876e-01 err = 2.2794381970e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.867459821876e-01 err = 3.7412876605e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.867459821876e-01 err = 7.6207185477e-08 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.867459821876e-01 err = 2.5410811418e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.867459821876e-01 err = 1.0282660307e-08 time = 0.01 sec -[ Info: CTMRG 12: obj = +4.867459821876e-01 err = 4.1984756534e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.867459821876e-01 err = 1.6973518368e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.867459821876e-01 err = 6.8235565697e-10 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.867459821876e-01 err = 2.7355442340e-10 time = 0.01 sec -[ Info: CTMRG 16: obj = +4.867459821876e-01 err = 1.0951984365e-10 time = 0.00 sec -[ Info: CTMRG conv 17: obj = +4.867459821876e-01 err = 4.3822209879e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.47e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 2.97e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 7.14e-06 -[ Info: BiCGStab linsolve in iteration 2: normres = 1.54e-06 -┌ Info: BiCGStab linsolve converged at iteration 2.5: -│ * norm of residual = 6.11e-08 -└ * number of operations = 7 -[ Info: LBFGS: iter 60, time 750.31 s: f = -0.662508721362, ‖∇f‖ = 1.9946e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.869287389745e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.869286597747e-01 err = 1.9940602121e-03 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.869286601384e-01 err = 1.3841587518e-03 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.869286603601e-01 err = 1.4840542536e-03 time = 0.01 sec -[ Info: CTMRG 4: obj = +4.869286603954e-01 err = 3.1301968780e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.869286604010e-01 err = 1.2092804596e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.869286604018e-01 err = 2.8689931889e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.869286604020e-01 err = 5.3905012256e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.869286604020e-01 err = 9.2092243926e-07 time = 0.01 sec -[ Info: CTMRG 9: obj = +4.869286604020e-01 err = 1.7574894868e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.869286604020e-01 err = 4.6388651259e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.869286604020e-01 err = 1.6794589504e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.869286604020e-01 err = 6.6199291963e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.869286604020e-01 err = 2.6456375835e-09 time = 0.01 sec -[ Info: CTMRG 14: obj = +4.869286604020e-01 err = 1.0581734137e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.869286604020e-01 err = 4.2307623696e-10 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.869286604020e-01 err = 1.6908030361e-10 time = 0.00 sec -[ Info: CTMRG conv 17: obj = +4.869286604020e-01 err = 6.7554981369e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.47e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 2.10e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 5.78e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 6.48e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 61, time 750.51 s: f = -0.662510450644, ‖∇f‖ = 3.2749e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.872775787444e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.872777894551e-01 err = 2.3434221429e-03 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.872777841895e-01 err = 1.8813696812e-03 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.872777833132e-01 err = 6.1073374493e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.872777831708e-01 err = 6.8243763429e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.872777831478e-01 err = 1.5065789801e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.872777831441e-01 err = 2.6638126130e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.872777831435e-01 err = 4.2841700114e-06 time = 0.01 sec -[ Info: CTMRG 8: obj = +4.872777831434e-01 err = 7.6306045732e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.872777831434e-01 err = 1.8614599385e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.872777831434e-01 err = 6.3967311729e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.872777831434e-01 err = 2.4744609316e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.872777831434e-01 err = 9.8243799941e-09 time = 0.01 sec -[ Info: CTMRG 13: obj = +4.872777831434e-01 err = 3.9171440203e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.872777831434e-01 err = 1.5629020137e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.872777831434e-01 err = 6.2344782858e-10 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.872777831434e-01 err = 2.4863067289e-10 time = 0.01 sec -[ Info: CTMRG conv 17: obj = +4.872777831434e-01 err = 9.9130046892e-11 time = 0.09 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.49e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 3.08e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.17e-05 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 8.75e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 62, time 750.71 s: f = -0.662510853517, ‖∇f‖ = 2.9884e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.870813040506e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.870813615032e-01 err = 1.2913179703e-03 time = 0.05 sec -[ Info: CTMRG 2: obj = +4.870813597568e-01 err = 9.8483687344e-04 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.870813594482e-01 err = 3.1885953822e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.870813593976e-01 err = 3.8106446287e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.870813593894e-01 err = 8.5842328305e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.870813593881e-01 err = 1.4678094852e-05 time = 0.24 sec -[ Info: CTMRG 7: obj = +4.870813593879e-01 err = 2.9454756324e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.870813593879e-01 err = 5.6025443041e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.870813593879e-01 err = 9.5459992712e-08 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.870813593879e-01 err = 1.6099638575e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.870813593879e-01 err = 5.7201685986e-09 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.870813593879e-01 err = 2.2454381617e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.870813593879e-01 err = 8.9491949405e-10 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.870813593879e-01 err = 3.5715708112e-10 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.870813593879e-01 err = 1.4253943748e-10 time = 0.00 sec -[ Info: CTMRG conv 16: obj = +4.870813593879e-01 err = 5.6877686023e-11 time = 0.35 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 2.04e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 7.36e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 2.05e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 63, time 751.17 s: f = -0.662511685410, ‖∇f‖ = 8.0551e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.870349859529e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.870349859999e-01 err = 2.0991342629e-04 time = 0.01 sec -[ Info: CTMRG 2: obj = +4.870349862326e-01 err = 1.7244951606e-04 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.870349862713e-01 err = 1.2109232875e-04 time = 0.01 sec -[ Info: CTMRG 4: obj = +4.870349862776e-01 err = 9.9158329777e-05 time = 0.01 sec -[ Info: CTMRG 5: obj = +4.870349862786e-01 err = 2.3228423778e-05 time = 0.01 sec -[ Info: CTMRG 6: obj = +4.870349862788e-01 err = 4.6330789052e-06 time = 0.01 sec -[ Info: CTMRG 7: obj = +4.870349862788e-01 err = 1.0140210755e-06 time = 0.01 sec -[ Info: CTMRG 8: obj = +4.870349862788e-01 err = 1.9433795295e-07 time = 0.01 sec -[ Info: CTMRG 9: obj = +4.870349862788e-01 err = 3.5422610687e-08 time = 0.01 sec -[ Info: CTMRG 10: obj = +4.870349862788e-01 err = 7.4279377322e-09 time = 0.01 sec -[ Info: CTMRG 11: obj = +4.870349862788e-01 err = 2.4014400012e-09 time = 0.01 sec -[ Info: CTMRG 12: obj = +4.870349862788e-01 err = 9.7471500618e-10 time = 0.02 sec -[ Info: CTMRG 13: obj = +4.870349862788e-01 err = 3.9332033591e-10 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.870349862788e-01 err = 1.5796076576e-10 time = 0.00 sec -[ Info: CTMRG conv 15: obj = +4.870349862788e-01 err = 6.3284236934e-11 time = 0.12 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.70e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 6.21e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 2.15e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 64, time 751.39 s: f = -0.662511841022, ‖∇f‖ = 7.3596e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.869966911865e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.869966411373e-01 err = 5.2013445409e-04 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.869966429809e-01 err = 2.4833601508e-04 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.869966433178e-01 err = 3.2690554348e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.869966433733e-01 err = 1.3976489212e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.869966433823e-01 err = 3.4992166977e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.869966433837e-01 err = 6.3118717958e-06 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.869966433839e-01 err = 1.4864271828e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.869966433840e-01 err = 2.9818848923e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.869966433840e-01 err = 5.9144279246e-08 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.869966433840e-01 err = 1.4288396759e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.869966433840e-01 err = 5.5280856478e-09 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.869966433840e-01 err = 2.2403524184e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.869966433840e-01 err = 9.0152133171e-10 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.869966433840e-01 err = 3.6153983618e-10 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.869966433840e-01 err = 1.4472500077e-10 time = 0.01 sec -[ Info: CTMRG conv 16: obj = +4.869966433840e-01 err = 5.7875664824e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 7.03e-06 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.11e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 1.59e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 65, time 751.57 s: f = -0.662512305957, ‖∇f‖ = 8.4091e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.869623538089e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.869623228070e-01 err = 6.3829661358e-04 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.869623230353e-01 err = 3.8613461334e-04 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.869623231053e-01 err = 3.5505201312e-04 time = 0.01 sec -[ Info: CTMRG 4: obj = +4.869623231176e-01 err = 1.4057040963e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.869623231197e-01 err = 3.5843110600e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.869623231200e-01 err = 5.8504693981e-06 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.869623231200e-01 err = 1.3106255496e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.869623231200e-01 err = 2.5814406020e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.869623231200e-01 err = 5.1426243502e-08 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.869623231200e-01 err = 1.8065260945e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.869623231200e-01 err = 7.3136567715e-09 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.869623231200e-01 err = 2.9477386272e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.869623231200e-01 err = 1.1825459408e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.869623231200e-01 err = 4.7310794397e-10 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.869623231200e-01 err = 1.8903348735e-10 time = 0.00 sec -[ Info: CTMRG conv 16: obj = +4.869623231200e-01 err = 7.5478963908e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 5.49e-06 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.42e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 1.54e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 66, time 751.76 s: f = -0.662512680347, ‖∇f‖ = 7.3318e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.873820030782e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.873820420917e-01 err = 2.2143221946e-03 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.873820372269e-01 err = 2.0481779639e-03 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.873820364679e-01 err = 5.3037962248e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.873820363473e-01 err = 7.5089565140e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.873820363281e-01 err = 1.7017852072e-04 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.873820363251e-01 err = 3.0094963158e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.873820363246e-01 err = 5.8035667300e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.873820363245e-01 err = 1.0447594979e-06 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.873820363245e-01 err = 1.7658119259e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.873820363245e-01 err = 3.0977924964e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.873820363245e-01 err = 7.3032903032e-09 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.873820363245e-01 err = 2.5111531456e-09 time = 0.01 sec -[ Info: CTMRG 13: obj = +4.873820363245e-01 err = 9.8851018512e-10 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.873820363245e-01 err = 3.9522131739e-10 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.873820363245e-01 err = 1.5797195478e-10 time = 0.00 sec -[ Info: CTMRG conv 16: obj = +4.873820363245e-01 err = 6.3028635303e-11 time = 0.07 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.22e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.08e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 3.14e-07 -└ * number of operations = 6 -[ Info: CTMRG init: obj = +4.871502229196e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.871502306089e-01 err = 9.8755224133e-04 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.871502296477e-01 err = 9.0529225624e-04 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.871502294976e-01 err = 2.3382784352e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.871502294737e-01 err = 3.3204031357e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.871502294699e-01 err = 7.5449854396e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.871502294693e-01 err = 1.3361981270e-05 time = 0.01 sec -[ Info: CTMRG 7: obj = +4.871502294692e-01 err = 2.5528415707e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.871502294692e-01 err = 4.5938787008e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.871502294692e-01 err = 7.7466797946e-08 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.871502294692e-01 err = 1.3531039075e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.871502294692e-01 err = 3.2009851233e-09 time = 0.01 sec -[ Info: CTMRG 12: obj = +4.871502294692e-01 err = 1.1117563012e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.871502294692e-01 err = 4.4013941366e-10 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.871502294692e-01 err = 1.7643050257e-10 time = 0.00 sec -[ Info: CTMRG conv 15: obj = +4.871502294692e-01 err = 7.0619373596e-11 time = 0.07 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 7.67e-06 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.99e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 1.65e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 67, time 752.14 s: f = -0.662512901164, ‖∇f‖ = 1.2648e-03, α = 4.44e-01, m = 16, nfg = 2 -[ Info: CTMRG init: obj = +4.871582525206e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.871582439217e-01 err = 7.0361757325e-04 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.871582415394e-01 err = 4.6307068763e-04 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.871582411462e-01 err = 1.9343006639e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.871582410819e-01 err = 5.7876533775e-05 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.871582410716e-01 err = 1.2977387141e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.871582410699e-01 err = 3.0450495296e-06 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.871582410697e-01 err = 6.7359692099e-07 time = 0.01 sec -[ Info: CTMRG 8: obj = +4.871582410696e-01 err = 1.3578179313e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.871582410696e-01 err = 5.2222628038e-08 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.871582410696e-01 err = 2.0864136204e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.871582410696e-01 err = 8.3510027031e-09 time = 0.01 sec -[ Info: CTMRG 12: obj = +4.871582410696e-01 err = 3.3335645189e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.871582410696e-01 err = 1.3299483108e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.871582410696e-01 err = 5.3024874607e-10 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.871582410696e-01 err = 2.1135886950e-10 time = 0.00 sec -[ Info: CTMRG conv 16: obj = +4.871582410696e-01 err = 8.4230456350e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.10e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.20e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 1.86e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 68, time 752.34 s: f = -0.662513239918, ‖∇f‖ = 5.7061e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.871483260462e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.871483438638e-01 err = 3.2602681294e-04 time = 0.01 sec -[ Info: CTMRG 2: obj = +4.871483432773e-01 err = 3.0035296932e-04 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.871483431681e-01 err = 1.6100407782e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.871483431499e-01 err = 1.1686577884e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.871483431469e-01 err = 3.1380876014e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.871483431464e-01 err = 5.5772827525e-06 time = 0.01 sec -[ Info: CTMRG 7: obj = +4.871483431463e-01 err = 9.5246453347e-07 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.871483431463e-01 err = 1.5007471777e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.871483431463e-01 err = 5.2589587229e-08 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.871483431463e-01 err = 2.0682875473e-08 time = 0.01 sec -[ Info: CTMRG 11: obj = +4.871483431463e-01 err = 8.2471209582e-09 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.871483431463e-01 err = 3.2886125745e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.871483431463e-01 err = 1.3117782091e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.871483431463e-01 err = 5.2302126729e-10 time = 0.01 sec -[ Info: CTMRG 15: obj = +4.871483431463e-01 err = 2.0848754569e-10 time = 0.00 sec -[ Info: CTMRG conv 16: obj = +4.871483431463e-01 err = 8.3092252273e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 1.02e-05 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.05e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 1.60e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 69, time 752.53 s: f = -0.662513444109, ‖∇f‖ = 6.0192e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.871055125305e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.871055599359e-01 err = 3.3634784872e-04 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.871055603125e-01 err = 2.5982992996e-04 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.871055603637e-01 err = 4.1946092031e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.871055603714e-01 err = 2.8063187517e-04 time = 0.01 sec -[ Info: CTMRG 5: obj = +4.871055603726e-01 err = 8.7874307642e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.871055603728e-01 err = 1.7319042429e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.871055603728e-01 err = 3.1412622469e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.871055603728e-01 err = 5.0099116614e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.871055603728e-01 err = 8.5149232397e-08 time = 0.01 sec -[ Info: CTMRG 10: obj = +4.871055603728e-01 err = 3.3763644435e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.871055603728e-01 err = 1.3518044681e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.871055603728e-01 err = 5.4068605594e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.871055603728e-01 err = 2.1615959132e-09 time = 0.01 sec -[ Info: CTMRG 14: obj = +4.871055603728e-01 err = 8.6336725923e-10 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.871055603728e-01 err = 3.4466105637e-10 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.871055603728e-01 err = 1.3753924361e-10 time = 0.00 sec -[ Info: CTMRG conv 17: obj = +4.871055603728e-01 err = 5.4873812654e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 8.99e-06 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.90e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 1.40e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 70, time 752.73 s: f = -0.662513692106, ‖∇f‖ = 7.2056e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.871552878423e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.871553915379e-01 err = 8.9202731825e-04 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.871553973321e-01 err = 7.3548423914e-04 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.871553983327e-01 err = 8.3595905074e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.871553984966e-01 err = 1.6546816571e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.871553985229e-01 err = 7.6151164930e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.871553985271e-01 err = 1.7566067674e-05 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.871553985278e-01 err = 3.5257855639e-06 time = 0.01 sec -[ Info: CTMRG 8: obj = +4.871553985279e-01 err = 6.8726358933e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.871553985279e-01 err = 1.7765534459e-07 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.871553985279e-01 err = 6.1463487748e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.871553985279e-01 err = 2.3987614869e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.871553985279e-01 err = 9.5606539508e-09 time = 0.01 sec -[ Info: CTMRG 13: obj = +4.871553985280e-01 err = 3.8234189622e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.871553985279e-01 err = 1.5284842653e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.871553985280e-01 err = 6.1071515684e-10 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.871553985280e-01 err = 2.4389413250e-10 time = 0.01 sec -[ Info: CTMRG conv 17: obj = +4.871553985279e-01 err = 9.7367767317e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.47e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 9.85e-06 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 3.86e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 2.30e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 71, time 752.93 s: f = -0.662513794204, ‖∇f‖ = 1.0926e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.870955159804e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.870955242317e-01 err = 4.7869063845e-04 time = 0.01 sec -[ Info: CTMRG 2: obj = +4.870955246517e-01 err = 2.6992177903e-04 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.870955247220e-01 err = 1.0961449254e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.870955247336e-01 err = 1.4925804044e-04 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.870955247355e-01 err = 4.8672011520e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.870955247358e-01 err = 1.0918883684e-05 time = 0.01 sec -[ Info: CTMRG 7: obj = +4.870955247358e-01 err = 2.0619789672e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.870955247358e-01 err = 3.6034236211e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.870955247358e-01 err = 6.0273330273e-08 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.870955247358e-01 err = 1.3728687924e-08 time = 0.01 sec -[ Info: CTMRG 11: obj = +4.870955247358e-01 err = 4.9082233078e-09 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.870955247358e-01 err = 1.9226655236e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.870955247358e-01 err = 7.6680180638e-10 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.870955247358e-01 err = 3.0656189433e-10 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.870955247358e-01 err = 1.2255553875e-10 time = 0.01 sec -[ Info: CTMRG conv 16: obj = +4.870955247358e-01 err = 4.8977976333e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 7.75e-06 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 2.85e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 2.06e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 72, time 753.13 s: f = -0.662513946704, ‖∇f‖ = 4.1373e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.870752269852e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.870752286197e-01 err = 3.9932652563e-04 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.870752288596e-01 err = 2.6466484168e-04 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.870752289037e-01 err = 1.1433401528e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.870752289111e-01 err = 6.2273963197e-05 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.870752289123e-01 err = 2.4705984548e-05 time = 0.01 sec -[ Info: CTMRG 6: obj = +4.870752289125e-01 err = 5.7977075461e-06 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.870752289125e-01 err = 1.1276763650e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.870752289125e-01 err = 2.0656333962e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.870752289125e-01 err = 3.9040725698e-08 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.870752289125e-01 err = 1.1485978827e-08 time = 0.01 sec -[ Info: CTMRG 11: obj = +4.870752289125e-01 err = 4.6100960558e-09 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.870752289125e-01 err = 1.8568373167e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.870752289125e-01 err = 7.4561344742e-10 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.870752289125e-01 err = 2.9872031965e-10 time = 0.01 sec -[ Info: CTMRG 15: obj = +4.870752289125e-01 err = 1.1950654362e-10 time = 0.00 sec -[ Info: CTMRG conv 16: obj = +4.870752289125e-01 err = 4.7763719917e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 5.47e-06 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.71e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 1.69e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 73, time 753.36 s: f = -0.662514020708, ‖∇f‖ = 3.2774e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.870813432406e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.870813453148e-01 err = 1.8834962320e-04 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.870813452681e-01 err = 1.2686730260e-04 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.870813452625e-01 err = 1.3145315247e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.870813452617e-01 err = 3.1816344042e-05 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.870813452615e-01 err = 1.0342581760e-05 time = 0.24 sec -[ Info: CTMRG 6: obj = +4.870813452615e-01 err = 2.0854868107e-06 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.870813452615e-01 err = 3.6519336561e-07 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.870813452615e-01 err = 6.4424421015e-08 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.870813452615e-01 err = 1.3843181511e-08 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.870813452615e-01 err = 4.3185362476e-09 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.870813452615e-01 err = 1.6324287363e-09 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.870813452615e-01 err = 6.4480857565e-10 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.870813452615e-01 err = 2.5663103239e-10 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.870813452615e-01 err = 1.0229134609e-10 time = 0.00 sec -[ Info: CTMRG conv 15: obj = +4.870813452615e-01 err = 4.0787669868e-11 time = 0.30 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.50e-06 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.14e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 1.35e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 74, time 753.78 s: f = -0.662514074542, ‖∇f‖ = 4.1795e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.870722344844e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.870723291553e-01 err = 2.5941061633e-04 time = 0.01 sec -[ Info: CTMRG 2: obj = +4.870723464056e-01 err = 1.1084784840e-04 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.870723494464e-01 err = 9.3758282099e-05 time = 0.01 sec -[ Info: CTMRG 4: obj = +4.870723499475e-01 err = 9.4297775847e-05 time = 0.01 sec -[ Info: CTMRG 5: obj = +4.870723500284e-01 err = 2.5561657323e-05 time = 0.01 sec -[ Info: CTMRG 6: obj = +4.870723500413e-01 err = 4.6248610944e-06 time = 0.01 sec -[ Info: CTMRG 7: obj = +4.870723500434e-01 err = 1.1436931887e-06 time = 0.01 sec -[ Info: CTMRG 8: obj = +4.870723500437e-01 err = 4.3630391336e-07 time = 0.01 sec -[ Info: CTMRG 9: obj = +4.870723500438e-01 err = 1.7801537182e-07 time = 0.01 sec -[ Info: CTMRG 10: obj = +4.870723500438e-01 err = 7.2554332340e-08 time = 0.01 sec -[ Info: CTMRG 11: obj = +4.870723500438e-01 err = 2.9358076362e-08 time = 0.01 sec -[ Info: CTMRG 12: obj = +4.870723500438e-01 err = 1.1810976534e-08 time = 0.02 sec -[ Info: CTMRG 13: obj = +4.870723500438e-01 err = 4.7359284405e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.870723500438e-01 err = 1.8951827955e-09 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.870723500438e-01 err = 7.5749821459e-10 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.870723500438e-01 err = 3.0254736910e-10 time = 0.00 sec -[ Info: CTMRG 17: obj = +4.870723500438e-01 err = 1.2078791119e-10 time = 0.00 sec -[ Info: CTMRG conv 18: obj = +4.870723500438e-01 err = 4.8208653950e-11 time = 0.13 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 5.69e-06 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.36e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 1.06e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 75, time 754.01 s: f = -0.662514105503, ‖∇f‖ = 9.0816e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.871059996010e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.871060260824e-01 err = 2.3212975558e-04 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.871060313226e-01 err = 6.0366707495e-05 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.871060322339e-01 err = 4.2781800076e-05 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.871060323836e-01 err = 9.7161530041e-05 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.871060324077e-01 err = 2.6294097185e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.871060324116e-01 err = 5.1769823968e-06 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.871060324122e-01 err = 9.8695437433e-07 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.871060324123e-01 err = 2.4648367451e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.871060324123e-01 err = 8.9984899112e-08 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.871060324123e-01 err = 3.6220571920e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.871060324123e-01 err = 1.4683676590e-08 time = 0.01 sec -[ Info: CTMRG 12: obj = +4.871060324123e-01 err = 5.9202167119e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.871060324123e-01 err = 2.3770160384e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.871060324123e-01 err = 9.5188830755e-10 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.871060324123e-01 err = 3.8060341252e-10 time = 0.00 sec -[ Info: CTMRG 16: obj = +4.871060324123e-01 err = 1.5203855885e-10 time = 0.00 sec -[ Info: CTMRG conv 17: obj = +4.871060324123e-01 err = 6.0699425286e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 5.28e-06 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.24e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 1.03e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 76, time 754.21 s: f = -0.662514180025, ‖∇f‖ = 2.8220e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.871258251721e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.871258259952e-01 err = 1.7293852066e-04 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.871258260174e-01 err = 1.1346642231e-04 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.871258260216e-01 err = 1.0233945068e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.871258260223e-01 err = 6.0570493275e-05 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.871258260224e-01 err = 2.0896520923e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.871258260224e-01 err = 4.5655925705e-06 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.871258260224e-01 err = 8.5956434648e-07 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.871258260224e-01 err = 1.5327118351e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.871258260224e-01 err = 2.8484127698e-08 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.871258260224e-01 err = 6.4590159028e-09 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.871258260224e-01 err = 2.5185838514e-09 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.871258260224e-01 err = 1.0135315637e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.871258260224e-01 err = 4.0681619704e-10 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.871258260224e-01 err = 1.6292460926e-10 time = 0.00 sec -[ Info: CTMRG conv 15: obj = +4.871258260224e-01 err = 6.5156869516e-11 time = 0.07 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.86e-06 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.03e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 1.03e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 77, time 754.39 s: f = -0.662514206339, ‖∇f‖ = 2.0931e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.871297192460e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.871297195782e-01 err = 2.1211911635e-04 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.871297194628e-01 err = 1.4320092176e-04 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.871297194429e-01 err = 1.9926352688e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.871297194397e-01 err = 3.2429111048e-05 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.871297194392e-01 err = 1.4663659258e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.871297194391e-01 err = 3.5857813250e-06 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.871297194391e-01 err = 7.0178191046e-07 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.871297194391e-01 err = 1.2462503873e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.871297194391e-01 err = 2.1787859117e-08 time = 0.01 sec -[ Info: CTMRG 10: obj = +4.871297194391e-01 err = 4.0553879959e-09 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.871297194391e-01 err = 1.1212126372e-09 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.871297194391e-01 err = 4.2962250755e-10 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.871297194391e-01 err = 1.6958944823e-10 time = 0.00 sec -[ Info: CTMRG conv 14: obj = +4.871297194391e-01 err = 6.7374698962e-11 time = 0.07 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 5.31e-06 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.27e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 1.07e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 78, time 754.58 s: f = -0.662514231519, ‖∇f‖ = 2.6637e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.871403384801e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.871403574921e-01 err = 2.5568178996e-04 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.871403605819e-01 err = 2.0089994629e-04 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.871403611211e-01 err = 2.9754469798e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.871403612097e-01 err = 5.9599373811e-05 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.871403612240e-01 err = 2.6363572735e-05 time = 0.01 sec -[ Info: CTMRG 6: obj = +4.871403612263e-01 err = 5.9238042400e-06 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.871403612266e-01 err = 1.1086621617e-06 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.871403612267e-01 err = 2.0262400771e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.871403612267e-01 err = 7.5692988916e-08 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.871403612267e-01 err = 3.0759849754e-08 time = 0.01 sec -[ Info: CTMRG 11: obj = +4.871403612267e-01 err = 1.2466815181e-08 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.871403612267e-01 err = 5.0206957768e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.871403612267e-01 err = 2.0135864110e-09 time = 0.00 sec -[ Info: CTMRG 14: obj = +4.871403612267e-01 err = 8.0565433886e-10 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.871403612267e-01 err = 3.2190725787e-10 time = 0.01 sec -[ Info: CTMRG 16: obj = +4.871403612267e-01 err = 1.2851399791e-10 time = 0.00 sec -[ Info: CTMRG conv 17: obj = +4.871403612267e-01 err = 5.1280083750e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.79e-06 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.16e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 1.06e-07 -└ * number of operations = 6 -[ Info: CTMRG init: obj = +4.871355908543e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.871355966086e-01 err = 1.4046316207e-04 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.871355975438e-01 err = 1.1049674349e-04 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.871355977071e-01 err = 1.6372858084e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.871355977339e-01 err = 3.2766704582e-05 time = 0.01 sec -[ Info: CTMRG 5: obj = +4.871355977382e-01 err = 1.4493026864e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.871355977389e-01 err = 3.2535786842e-06 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.871355977390e-01 err = 6.0746278835e-07 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.871355977390e-01 err = 1.1048152143e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.871355977390e-01 err = 4.1498305040e-08 time = 0.01 sec -[ Info: CTMRG 10: obj = +4.871355977390e-01 err = 1.6854548372e-08 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.871355977390e-01 err = 6.8302721326e-09 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.871355977390e-01 err = 2.7507577208e-09 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.871355977390e-01 err = 1.1032683620e-09 time = 0.01 sec -[ Info: CTMRG 14: obj = +4.871355977390e-01 err = 4.4145680170e-10 time = 0.00 sec -[ Info: CTMRG 15: obj = +4.871355977390e-01 err = 1.7639427491e-10 time = 0.00 sec -[ Info: CTMRG conv 16: obj = +4.871355977390e-01 err = 7.0428609682e-11 time = 0.08 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.84e-06 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.12e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 1.03e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 79, time 754.98 s: f = -0.662514243124, ‖∇f‖ = 2.4156e-04, α = 5.50e-01, m = 16, nfg = 2 -[ Info: CTMRG init: obj = +4.871179793379e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.871179801697e-01 err = 1.5631360249e-04 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.871179801833e-01 err = 5.5606384689e-05 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.871179801852e-01 err = 1.4161299902e-04 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.871179801854e-01 err = 6.4294663733e-05 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.871179801855e-01 err = 1.9586641733e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.871179801855e-01 err = 4.0133955465e-06 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.871179801855e-01 err = 7.2141125870e-07 time = 0.01 sec -[ Info: CTMRG 8: obj = +4.871179801855e-01 err = 1.2115678362e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.871179801855e-01 err = 2.0142931321e-08 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.871179801855e-01 err = 3.6807478447e-09 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.871179801855e-01 err = 9.3804583294e-10 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.871179801855e-01 err = 3.2939576562e-10 time = 0.01 sec -[ Info: CTMRG 13: obj = +4.871179801855e-01 err = 1.2840573337e-10 time = 0.00 sec -[ Info: CTMRG conv 14: obj = +4.871179801855e-01 err = 5.1027997092e-11 time = 0.07 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.83e-06 -[ Info: BiCGStab linsolve in iteration 1.5: normres = 1.17e-06 -┌ Info: BiCGStab linsolve converged at iteration 2: -│ * norm of residual = 1.06e-07 -└ * number of operations = 6 -[ Info: LBFGS: iter 80, time 755.17 s: f = -0.662514255964, ‖∇f‖ = 1.4589e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.871073990611e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.871073992573e-01 err = 1.2520311614e-04 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.871073992474e-01 err = 3.9887951457e-05 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.871073992458e-01 err = 7.5472399281e-05 time = 0.01 sec -[ Info: CTMRG 4: obj = +4.871073992455e-01 err = 4.0831399145e-05 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.871073992454e-01 err = 1.1983311291e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.871073992454e-01 err = 2.4288228106e-06 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.871073992454e-01 err = 4.3266287791e-07 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.871073992454e-01 err = 7.3700330899e-08 time = 0.01 sec -[ Info: CTMRG 9: obj = +4.871073992454e-01 err = 1.3367391679e-08 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.871073992454e-01 err = 3.2342099574e-09 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.871073992454e-01 err = 1.1050350908e-09 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.871073992454e-01 err = 4.2985840603e-10 time = 0.00 sec -[ Info: CTMRG 13: obj = +4.871073992454e-01 err = 1.7132274257e-10 time = 0.01 sec -[ Info: CTMRG conv 14: obj = +4.871073992454e-01 err = 6.8479019651e-11 time = 0.07 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 4.30e-06 -┌ Info: BiCGStab linsolve converged at iteration 1.5: -│ * norm of residual = 9.20e-07 -└ * number of operations = 5 -[ Info: LBFGS: iter 81, time 755.35 s: f = -0.662514264597, ‖∇f‖ = 1.6299e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.870802265100e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.870802270952e-01 err = 1.5637536758e-04 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.870802270994e-01 err = 6.5932274507e-05 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.870802270998e-01 err = 8.4743946162e-05 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.870802270999e-01 err = 6.3767011841e-05 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.870802270999e-01 err = 1.8007628475e-05 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.870802270999e-01 err = 3.6762667212e-06 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.870802270999e-01 err = 6.8319004154e-07 time = 0.01 sec -[ Info: CTMRG 8: obj = +4.870802270999e-01 err = 1.2815259166e-07 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.870802270999e-01 err = 2.2222081395e-08 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.870802270999e-01 err = 3.8771168412e-09 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.870802270999e-01 err = 1.1224318440e-09 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.870802270999e-01 err = 4.1649202324e-10 time = 0.01 sec -[ Info: CTMRG 13: obj = +4.870802270999e-01 err = 1.6462481867e-10 time = 0.00 sec -[ Info: CTMRG conv 14: obj = +4.870802270999e-01 err = 6.5733103902e-11 time = 0.07 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 3.75e-06 -┌ Info: BiCGStab linsolve converged at iteration 1.5: -│ * norm of residual = 6.29e-07 -└ * number of operations = 5 -[ Info: LBFGS: iter 82, time 755.53 s: f = -0.662514270687, ‖∇f‖ = 2.0842e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.870861801606e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.870861801546e-01 err = 3.0026862223e-05 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.870861801521e-01 err = 1.0052445643e-05 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.870861801518e-01 err = 3.5172205110e-05 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.870861801518e-01 err = 1.7511339538e-05 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.870861801518e-01 err = 5.2661006646e-06 time = 0.01 sec -[ Info: CTMRG 6: obj = +4.870861801518e-01 err = 1.0545807128e-06 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.870861801518e-01 err = 1.8889459938e-07 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.870861801518e-01 err = 3.1188385446e-08 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.870861801518e-01 err = 4.9674504469e-09 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.870861801518e-01 err = 7.6165287749e-10 time = 0.01 sec -[ Info: CTMRG 11: obj = +4.870861801518e-01 err = 1.2997626631e-10 time = 0.00 sec -[ Info: CTMRG conv 12: obj = +4.870861801518e-01 err = 3.5947094377e-11 time = 0.06 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 3.77e-06 -┌ Info: BiCGStab linsolve converged at iteration 1.5: -│ * norm of residual = 6.21e-07 -└ * number of operations = 5 -[ Info: LBFGS: iter 83, time 755.70 s: f = -0.662514276005, ‖∇f‖ = 1.1227e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.870924286027e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.870924285770e-01 err = 5.1111427041e-05 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.870924285712e-01 err = 1.6995613204e-05 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.870924285707e-01 err = 4.5583186554e-05 time = 0.00 sec -[ Info: CTMRG 4: obj = +4.870924285706e-01 err = 2.2187857241e-05 time = 0.00 sec -[ Info: CTMRG 5: obj = +4.870924285706e-01 err = 6.7063783159e-06 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.870924285706e-01 err = 1.3203376049e-06 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.870924285706e-01 err = 2.3417684274e-07 time = 0.01 sec -[ Info: CTMRG 8: obj = +4.870924285706e-01 err = 3.8634842497e-08 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.870924285706e-01 err = 6.2564255420e-09 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.870924285706e-01 err = 1.0591197139e-09 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.870924285706e-01 err = 2.4363386038e-10 time = 0.00 sec -[ Info: CTMRG conv 12: obj = +4.870924285706e-01 err = 8.3649103606e-11 time = 0.06 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 3.92e-06 -┌ Info: BiCGStab linsolve converged at iteration 1.5: -│ * norm of residual = 7.05e-07 -└ * number of operations = 5 -[ Info: LBFGS: iter 84, time 755.91 s: f = -0.662514281099, ‖∇f‖ = 1.0747e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.870928381111e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.870928379488e-01 err = 2.8222048730e-05 time = 0.00 sec -[ Info: CTMRG 2: obj = +4.870928379327e-01 err = 1.9291761999e-05 time = 0.00 sec -[ Info: CTMRG 3: obj = +4.870928379304e-01 err = 1.9206061441e-05 time = 0.24 sec -[ Info: CTMRG 4: obj = +4.870928379300e-01 err = 4.1153580589e-06 time = 0.01 sec -[ Info: CTMRG 5: obj = +4.870928379299e-01 err = 1.5444182106e-06 time = 0.00 sec -[ Info: CTMRG 6: obj = +4.870928379299e-01 err = 3.2729482757e-07 time = 0.00 sec -[ Info: CTMRG 7: obj = +4.870928379299e-01 err = 6.1772540606e-08 time = 0.00 sec -[ Info: CTMRG 8: obj = +4.870928379299e-01 err = 1.2017085572e-08 time = 0.00 sec -[ Info: CTMRG 9: obj = +4.870928379299e-01 err = 2.8873364166e-09 time = 0.00 sec -[ Info: CTMRG 10: obj = +4.870928379299e-01 err = 9.2398739389e-10 time = 0.00 sec -[ Info: CTMRG 11: obj = +4.870928379299e-01 err = 3.4237484988e-10 time = 0.00 sec -[ Info: CTMRG 12: obj = +4.870928379299e-01 err = 1.3303805908e-10 time = 0.00 sec -[ Info: CTMRG conv 13: obj = +4.870928379299e-01 err = 5.2490247254e-11 time = 0.30 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 3.98e-06 -┌ Info: BiCGStab linsolve converged at iteration 1.5: -│ * norm of residual = 7.06e-07 -└ * number of operations = 5 -[ Info: LBFGS: iter 85, time 756.33 s: f = -0.662514284644, ‖∇f‖ = 1.0173e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +4.870856616218e-01 err = 1.0000e+00 -[ Info: CTMRG 1: obj = +4.870856604044e-01 err = 6.5977582010e-05 time = 0.01 sec -[ Info: CTMRG 2: obj = +4.870856602664e-01 err = 4.1250268645e-05 time = 0.01 sec -[ Info: CTMRG 3: obj = +4.870856602447e-01 err = 5.3496895553e-05 time = 0.01 sec -[ Info: CTMRG 4: obj = +4.870856602412e-01 err = 2.8889294878e-05 time = 0.01 sec -[ Info: CTMRG 5: obj = +4.870856602406e-01 err = 8.5942434633e-06 time = 0.01 sec -[ Info: CTMRG 6: obj = +4.870856602405e-01 err = 1.7822285215e-06 time = 0.01 sec -[ Info: CTMRG 7: obj = +4.870856602405e-01 err = 3.0751246919e-07 time = 0.01 sec -[ Info: CTMRG 8: obj = +4.870856602405e-01 err = 5.1833408219e-08 time = 0.01 sec -[ Info: CTMRG 9: obj = +4.870856602405e-01 err = 9.2340459614e-09 time = 0.01 sec -[ Info: CTMRG 10: obj = +4.870856602405e-01 err = 2.6588387991e-09 time = 0.01 sec -[ Info: CTMRG 11: obj = +4.870856602405e-01 err = 1.0354992143e-09 time = 0.01 sec -[ Info: CTMRG 12: obj = +4.870856602405e-01 err = 4.0936881781e-10 time = 0.01 sec -[ Info: CTMRG 13: obj = +4.870856602405e-01 err = 1.6260405180e-10 time = 0.01 sec -[ Info: CTMRG conv 14: obj = +4.870856602405e-01 err = 6.4747169783e-11 time = 0.11 sec -[ Info: BiCGStab linsolve starts with norm of residual = 2.48e-02 -[ Info: BiCGStab linsolve in iteration 1: normres = 3.90e-06 -┌ Info: BiCGStab linsolve converged at iteration 1.5: -│ * norm of residual = 5.43e-07 -└ * number of operations = 5 -[ Info: LBFGS: converged after 86 iterations and time 756.56 s: f = -0.662514291826, ‖∇f‖ = 8.8301e-05 +[ Info: LBFGS: iter 2, time 5.37 s: f = -0.501984649868, ‖∇f‖ = 5.3739e-01, α = 2.80e-01, m = 1, nfg = 2 +[ Info: LBFGS: iter 3, time 5.99 s: f = -0.523163971924, ‖∇f‖ = 3.9927e-01, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 4, time 7.32 s: f = -0.538654390178, ‖∇f‖ = 4.1552e-01, α = 2.29e-01, m = 3, nfg = 2 +[ Info: LBFGS: iter 5, time 10.35 s: f = -0.549821445064, ‖∇f‖ = 4.4002e-01, α = 6.90e-02, m = 4, nfg = 4 +[ Info: LBFGS: iter 6, time 11.80 s: f = -0.569016778155, ‖∇f‖ = 4.8450e-01, α = 2.26e-01, m = 5, nfg = 2 +[ Info: LBFGS: iter 7, time 12.46 s: f = -0.587127261652, ‖∇f‖ = 4.1972e-01, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 8, time 13.09 s: f = -0.600154758006, ‖∇f‖ = 2.1793e-01, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 9, time 13.71 s: f = -0.606883012825, ‖∇f‖ = 1.9566e-01, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 10, time 14.33 s: f = -0.625040022199, ‖∇f‖ = 3.0328e-01, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 11, time 14.94 s: f = -0.639164743235, ‖∇f‖ = 2.3076e-01, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 12, time 15.55 s: f = -0.647174335216, ‖∇f‖ = 2.6065e-01, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 13, time 16.21 s: f = -0.650338609163, ‖∇f‖ = 1.6108e-01, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 14, time 16.93 s: f = -0.654606007953, ‖∇f‖ = 7.7724e-02, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 15, time 17.53 s: f = -0.655962567656, ‖∇f‖ = 5.1320e-02, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 16, time 18.14 s: f = -0.657034966533, ‖∇f‖ = 5.6668e-02, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 17, time 18.77 s: f = -0.658609918816, ‖∇f‖ = 4.5267e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 18, time 19.36 s: f = -0.659421361772, ‖∇f‖ = 4.8752e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 19, time 19.97 s: f = -0.659584257676, ‖∇f‖ = 5.7745e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 20, time 20.56 s: f = -0.659811195031, ‖∇f‖ = 1.7740e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 21, time 21.16 s: f = -0.659874427409, ‖∇f‖ = 1.4673e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 22, time 22.38 s: f = -0.660072570659, ‖∇f‖ = 1.9320e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 23, time 22.95 s: f = -0.660232141902, ‖∇f‖ = 1.7545e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 24, time 23.56 s: f = -0.660380080163, ‖∇f‖ = 2.3752e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 25, time 24.15 s: f = -0.660461052221, ‖∇f‖ = 2.3596e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 26, time 24.74 s: f = -0.660554016679, ‖∇f‖ = 1.2681e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 27, time 25.33 s: f = -0.660617092333, ‖∇f‖ = 1.0485e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 28, time 25.95 s: f = -0.660813477825, ‖∇f‖ = 1.7986e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 29, time 26.58 s: f = -0.660960969686, ‖∇f‖ = 1.7471e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 30, time 27.22 s: f = -0.661039077160, ‖∇f‖ = 1.1401e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 31, time 27.85 s: f = -0.661087806652, ‖∇f‖ = 1.0339e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 32, time 28.46 s: f = -0.661121452359, ‖∇f‖ = 8.8764e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 33, time 29.08 s: f = -0.661180968072, ‖∇f‖ = 1.0798e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 34, time 30.34 s: f = -0.661206863491, ‖∇f‖ = 9.1298e-03, α = 5.16e-01, m = 16, nfg = 2 +[ Info: LBFGS: iter 35, time 30.96 s: f = -0.661226335408, ‖∇f‖ = 6.6169e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 36, time 31.60 s: f = -0.661260012209, ‖∇f‖ = 5.9848e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 37, time 32.21 s: f = -0.661268668988, ‖∇f‖ = 1.0826e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 38, time 32.81 s: f = -0.661283178602, ‖∇f‖ = 5.0739e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 39, time 33.42 s: f = -0.661293239500, ‖∇f‖ = 4.8729e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 40, time 34.04 s: f = -0.661307958912, ‖∇f‖ = 6.2349e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 41, time 34.66 s: f = -0.661342970541, ‖∇f‖ = 9.2762e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 42, time 35.28 s: f = -0.661417237192, ‖∇f‖ = 1.7461e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 43, time 35.93 s: f = -0.661494994773, ‖∇f‖ = 2.7924e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 44, time 36.56 s: f = -0.661665032445, ‖∇f‖ = 2.1193e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 45, time 37.20 s: f = -0.661840699875, ‖∇f‖ = 2.3535e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 46, time 37.83 s: f = -0.661983211854, ‖∇f‖ = 2.0945e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 47, time 38.48 s: f = -0.662069016591, ‖∇f‖ = 1.9084e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 48, time 39.11 s: f = -0.662233515834, ‖∇f‖ = 1.7527e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 49, time 40.41 s: f = -0.662332106545, ‖∇f‖ = 1.6912e-02, α = 5.23e-01, m = 16, nfg = 2 +[ Info: LBFGS: iter 50, time 41.05 s: f = -0.662397705763, ‖∇f‖ = 1.0361e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 51, time 41.68 s: f = -0.662434512495, ‖∇f‖ = 8.3812e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 52, time 42.32 s: f = -0.662459914679, ‖∇f‖ = 5.8461e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 53, time 42.97 s: f = -0.662475090799, ‖∇f‖ = 1.1955e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 54, time 43.61 s: f = -0.662490551714, ‖∇f‖ = 4.3803e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 55, time 44.25 s: f = -0.662494796646, ‖∇f‖ = 3.0803e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 56, time 44.89 s: f = -0.662500144159, ‖∇f‖ = 3.3935e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 57, time 45.54 s: f = -0.662501922158, ‖∇f‖ = 5.3636e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 58, time 46.17 s: f = -0.662504711089, ‖∇f‖ = 2.3876e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 59, time 46.82 s: f = -0.662506778078, ‖∇f‖ = 1.8200e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 60, time 47.45 s: f = -0.662508721362, ‖∇f‖ = 1.9946e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 61, time 48.08 s: f = -0.662510450644, ‖∇f‖ = 3.2749e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 62, time 48.70 s: f = -0.662510853517, ‖∇f‖ = 2.9884e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 63, time 49.32 s: f = -0.662511685410, ‖∇f‖ = 8.0551e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 64, time 49.94 s: f = -0.662511841022, ‖∇f‖ = 7.3596e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 65, time 50.56 s: f = -0.662512305957, ‖∇f‖ = 8.4091e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 66, time 51.18 s: f = -0.662512680347, ‖∇f‖ = 7.3318e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 67, time 52.41 s: f = -0.662512901164, ‖∇f‖ = 1.2648e-03, α = 4.44e-01, m = 16, nfg = 2 +[ Info: LBFGS: iter 68, time 53.03 s: f = -0.662513239918, ‖∇f‖ = 5.7061e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 69, time 53.65 s: f = -0.662513444109, ‖∇f‖ = 6.0192e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 70, time 54.28 s: f = -0.662513692106, ‖∇f‖ = 7.2056e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 71, time 54.91 s: f = -0.662513794204, ‖∇f‖ = 1.0926e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 72, time 55.53 s: f = -0.662513946704, ‖∇f‖ = 4.1373e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 73, time 56.15 s: f = -0.662514020708, ‖∇f‖ = 3.2774e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 74, time 56.77 s: f = -0.662514074542, ‖∇f‖ = 4.1795e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 75, time 57.40 s: f = -0.662514105503, ‖∇f‖ = 9.0816e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 76, time 58.03 s: f = -0.662514180025, ‖∇f‖ = 2.8220e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 77, time 58.66 s: f = -0.662514206339, ‖∇f‖ = 2.0931e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 78, time 59.27 s: f = -0.662514231519, ‖∇f‖ = 2.6637e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 79, time 60.51 s: f = -0.662514243124, ‖∇f‖ = 2.4156e-04, α = 5.50e-01, m = 16, nfg = 2 +[ Info: LBFGS: iter 80, time 61.13 s: f = -0.662514255964, ‖∇f‖ = 1.4589e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 81, time 61.73 s: f = -0.662514264597, ‖∇f‖ = 1.6299e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 82, time 62.32 s: f = -0.662514270687, ‖∇f‖ = 2.0842e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 83, time 62.94 s: f = -0.662514276005, ‖∇f‖ = 1.1227e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 84, time 63.53 s: f = -0.662514281099, ‖∇f‖ = 1.0747e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 85, time 64.13 s: f = -0.662514284644, ‖∇f‖ = 1.0173e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: converged after 86 iterations and time 64.73 s: f = -0.662514291826, ‖∇f‖ = 8.8301e-05 ```` diff --git a/docs/src/examples/2.boundary_mps/index.md b/docs/src/examples/2.boundary_mps/index.md index 1bbc7f4ac..7a2bebffe 100644 --- a/docs/src/examples/2.boundary_mps/index.md +++ b/docs/src/examples/2.boundary_mps/index.md @@ -6,9 +6,6 @@ EditURL = "../../../../examples/2.boundary_mps/main.jl" [![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//2.boundary_mps/main.ipynb) [![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//2.boundary_mps) -````julia -using Markdown -```` # Boundary MPS contractions using VUMPS and PEPOs @@ -38,7 +35,7 @@ peps₀ = InfinitePEPS(ComplexSpace(2), ComplexSpace(2)) ```` ```` -InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}(TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}[TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')): +InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}(TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}[TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')): [:, :, 1, 1, 1] = -0.5524390176345264 - 0.07357188568178248im 0.34014501646081047 - 0.7552574870030472im -0.5455245317233405 + 0.8946618856309984im 1.249282911658007 + 0.45352274131986825im @@ -81,7 +78,7 @@ transfer = InfiniteTransferPEPS(peps₀, 1, 1) ```` ```` -single site MPSKit.InfiniteMPO{Tuple{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}}: +single site InfiniteMPO{Tuple{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}}: ╷ ⋮ ┼ O[1]: (TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')), TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)'))) ╵ ⋮ @@ -119,7 +116,7 @@ mps, env, ϵ = leading_boundary(mps₀, transfer, VUMPS(; tol=1e-6, verbosity=2) ```` [ Info: VUMPS init: obj = +1.674563752306e+00 +3.035692829590e+00im err = 7.5576e-01 -[ Info: VUMPS conv 120: obj = +6.831610878163e+00 -1.001928853191e-08im err = 9.5332406967e-07 time = 5.64 sec +[ Info: VUMPS conv 120: obj = +6.831610878163e+00 -1.001928853191e-08im err = 9.5332406967e-07 time = 1.80 sec ```` @@ -146,7 +143,7 @@ norm_ctmrg = abs(norm(peps₀, env_ctmrg)) ```` [ Info: CTMRG init: obj = -1.495741317009e+01 +3.091851579630e-01im err = 1.0000e+00 -[ Info: CTMRG conv 30: obj = +6.831603585666e+00 err = 6.2262595140e-07 time = 0.23 sec +[ Info: CTMRG conv 30: obj = +6.831603585666e+00 err = 6.2262595140e-07 time = 0.28 sec abs(norm_vumps - norm_ctmrg) / norm_vumps = 1.0674637855860049e-6 ```` @@ -164,7 +161,7 @@ First, we construct a PEPS with a $2 \times 2$ unit cell using the `unitcell` ke argument and then define the corresponding transfer PEPS: ````julia -peps₀_2x2 = InfinitePEPS(ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2)) +peps₀_2x2 = InfinitePEPS(rand, ComplexF64, ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2)) transfer_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1); ```` @@ -180,11 +177,16 @@ env_ctmrg_2x2, = leading_boundary( ) norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2)) -@show abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps +@show abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps; ```` ```` -0.001753056153861759 +[ Info: VUMPS init: obj = +8.149302834396e+02 -8.860408249120e+01im err = 8.6172e-01 +[ Info: VUMPS conv 37: obj = +1.046633709901e+05 -1.858418959285e-05im err = 4.5282584466e-07 time = 2.10 sec +[ Info: CTMRG init: obj = -1.240261729401e+02 -1.672150510263e+01im err = 1.0000e+00 +[ Info: CTMRG conv 47: obj = +1.046633714846e+05 err = 1.6993045675e-07 time = 1.71 sec +abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps = 4.725134987376298e-9 + ```` Again, the results are compatible. Note that for larger unit cells and non-Hermitian PEPS @@ -225,7 +227,7 @@ transfer_pepo = InfiniteTransferPEPO(peps₀, pepo, 1, 1) ```` ```` -single site MPSKit.InfiniteMPO{Tuple{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 2, 4, Vector{ComplexF64}}}}: +single site InfiniteMPO{Tuple{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorMap{ComplexF64, ComplexSpace, 2, 4, Vector{ComplexF64}}}}: ╷ ⋮ ┼ O[1]: (TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')), TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')), TensorMap((ℂ^2 ⊗ (ℂ^2)') ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)'))) ╵ ⋮ @@ -242,10 +244,10 @@ norm_pepo = abs(prod(expectation_value(mps_pepo, transfer_pepo))); ```` ```` -[ Info: VUMPS init: obj = +2.488222368854e+01 +3.652981254368e-01im err = 9.0735e-01 -┌ Warning: VUMPS cancel 200: obj = +9.667589206130e+01 -1.135822593507e+00im err = 8.3337202584e-02 time = 30.62 sec +[ Info: VUMPS init: obj = +2.655321432467e+01 +3.760603778362e-01im err = 8.9759e-01 +┌ Warning: VUMPS cancel 200: obj = -2.194912861838e+01 -6.105468516794e+01im err = 5.7061338213e-01 time = 32.78 sec └ @ MPSKit ~/.julia/packages/MPSKit/EfZBD/src/algorithms/statmech/vumps.jl:51 -norm_pepo = 96.68256408894005 +norm_pepo = 64.88018825545267 ```` diff --git a/docs/src/examples/2.boundary_mps/main.ipynb b/docs/src/examples/2.boundary_mps/main.ipynb index 84d22dbb0..80510760a 100644 --- a/docs/src/examples/2.boundary_mps/main.ipynb +++ b/docs/src/examples/2.boundary_mps/main.ipynb @@ -4,7 +4,7 @@ "outputs": [], "cell_type": "code", "source": [ - "using Markdown" + "using Markdown #hide" ], "metadata": {}, "execution_count": null @@ -181,7 +181,7 @@ "outputs": [], "cell_type": "code", "source": [ - "peps₀_2x2 = InfinitePEPS(ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2))\n", + "peps₀_2x2 = InfinitePEPS(rand, ComplexF64, ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2))\n", "transfer_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1);" ], "metadata": {}, @@ -207,7 +207,7 @@ ")\n", "norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2))\n", "\n", - "@show abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps" + "@show abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps;" ], "metadata": {}, "execution_count": null diff --git a/docs/src/examples/3.bose_hubbard/index.md b/docs/src/examples/3.bose_hubbard/index.md index c69137477..433e0663f 100644 --- a/docs/src/examples/3.bose_hubbard/index.md +++ b/docs/src/examples/3.bose_hubbard/index.md @@ -6,9 +6,6 @@ EditURL = "../../../../examples/3.bose_hubbard/main.jl" [![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//3.bose_hubbard/main.ipynb) [![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//3.bose_hubbard) -````julia -using Markdown -```` # Optimizing the $U(1)$-symmetric Bose-Hubbard model @@ -64,8 +61,8 @@ physical_spaces = H.lattice ```` ```` -1×1 Matrix{TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}}: - Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1) +1×1 Matrix{GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}}: + Rep[U₁](0=>1, 1=>1, -1=>1) ```` Note that the physical space contains $U(1)$ charges -1, 0 and +1. Indeed, imposing a @@ -102,9 +99,9 @@ optimization framework in the usual way to find the ground state. So, we first s algorithms and their tolerances: ````julia -boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)) +boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace)) gradient_alg = (; tol=1e-6, maxiter=10, alg=:eigsolver, iterscheme=:diffgauge) -optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=200, ls_maxiter=2, ls_maxfg=2); +optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=150, ls_maxiter=2, ls_maxfg=2); ```` !!! note @@ -131,662 +128,179 @@ env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); ```` [ Info: CTMRG init: obj = +1.693461429863e+00 +8.390974048721e-02im err = 1.0000e+00 -[ Info: CTMRG conv 19: obj = +1.181834754305e+01 -1.514027570125e-11im err = 3.6943032119e-09 time = 6.77 sec +[ Info: CTMRG conv 19: obj = +1.181834754305e+01 -1.514027570125e-11im err = 3.6943032119e-09 time = 0.60 sec ```` And at last, we optimize (which might take a bit): ````julia -peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg) +peps, env, E, info = fixedpoint( + H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3 +) @show E; ```` ```` -[ Info: CTMRG init: obj = +6.242353178969e-02 err = 1.0000e+00 -[ Info: CTMRG conv 4: obj = +6.242353178968e-02 err = 5.3242429630e-11 time = 0.13 sec [ Info: LBFGS: initializing with f = 9.360531870693, ‖∇f‖ = 1.6944e+01 -┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Float64}`; +┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Float64}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 -[ Info: CTMRG init: obj = +6.240949771847e-02 err = 1.0000e+00 -[ Info: CTMRG conv 13: obj = +6.241448365552e-02 err = 9.9109245574e-09 time = 0.17 sec -[ Info: CTMRG init: obj = +6.237870901373e-02 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.250909523927e-02 err = 3.7008104828e-09 time = 0.16 sec -[ Info: CTMRG init: obj = +6.282962969748e-02 +4.542778772990e-13im err = 1.0000e+00 -[ Info: CTMRG conv 25: obj = +6.631935894614e-02 err = 6.4811816657e-09 time = 0.26 sec -[ Info: CTMRG init: obj = +7.333609757066e-02 +7.025628888643e-13im err = 1.0000e+00 -┌ Warning: CTMRG cancel 100: obj = +1.222846396868e-01 err = 9.4598744433e-06 time = 1.05 sec -└ @ PEPSKit ~/.julia/packages/PEPSKit/P7ER3/src/algorithms/ctmrg/ctmrg.jl:129 -[ Info: CTMRG init: obj = +6.248815924073e-02 err = 1.0000e+00 -[ Info: CTMRG conv 14: obj = +6.254210320788e-02 err = 5.8592754706e-09 time = 0.14 sec -[ Info: CTMRG init: obj = +6.245238566875e-02 err = 1.0000e+00 -[ Info: CTMRG conv 14: obj = +6.246617228050e-02 err = 3.9601332591e-09 time = 0.15 sec -[ Info: CTMRG init: obj = +7.503564551435e-02 err = 1.0000e+00 -┌ Warning: CTMRG cancel 100: obj = +9.980119603028e-02 err = 1.7005988492e-06 time = 1.06 sec -└ @ PEPSKit ~/.julia/packages/PEPSKit/P7ER3/src/algorithms/ctmrg/ctmrg.jl:129 -[ Info: LBFGS: iter 1, time 800.83 s: f = 0.124397324377, ‖∇f‖ = 6.2876e+00, α = 1.56e+02, m = 0, nfg = 7 -┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; +[ Info: LBFGS: iter 1, time 68.36 s: f = 0.124397324377, ‖∇f‖ = 6.2876e+00, α = 1.56e+02, m = 0, nfg = 7 +┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 -[ Info: CTMRG init: obj = +1.753936502020e-01 err = 1.0000e+00 -[ Info: CTMRG conv 55: obj = +1.733894725524e-01 err = 8.1365124077e-09 time = 0.62 sec -[ Info: CTMRG init: obj = +1.402751961848e-01 err = 1.0000e+00 -┌ Warning: CTMRG cancel 100: obj = +1.402868717464e-01 err = 1.1002578927e-05 time = 1.05 sec -└ @ PEPSKit ~/.julia/packages/PEPSKit/P7ER3/src/algorithms/ctmrg/ctmrg.jl:129 -[ Info: LBFGS: iter 2, time 819.10 s: f = 0.065740243544, ‖∇f‖ = 8.6301e+00, α = 5.34e-01, m = 1, nfg = 2 -[ Info: CTMRG init: obj = +1.864268466450e-01 err = 1.0000e+00 -[ Info: CTMRG conv 25: obj = +1.900559755493e-01 err = 4.6098787403e-09 time = 0.26 sec -[ Info: LBFGS: iter 3, time 820.69 s: f = -0.035484016742, ‖∇f‖ = 1.7043e+00, α = 1.00e+00, m = 2, nfg = 1 -[ Info: CTMRG init: obj = +1.843525493223e-01 err = 1.0000e+00 -[ Info: CTMRG conv 19: obj = +1.843555438547e-01 err = 6.0174972186e-09 time = 0.17 sec -[ Info: LBFGS: iter 4, time 822.01 s: f = -0.068142497162, ‖∇f‖ = 1.5153e+00, α = 1.00e+00, m = 3, nfg = 1 -[ Info: CTMRG init: obj = +1.205660214209e-01 err = 1.0000e+00 -[ Info: CTMRG conv 37: obj = +1.230027024040e-01 err = 8.1345079594e-09 time = 0.42 sec -[ Info: CTMRG init: obj = +1.777797347746e-01 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +1.777857216166e-01 err = 9.5736429674e-09 time = 0.19 sec -[ Info: CTMRG init: obj = +1.490804268869e-01 err = 1.0000e+00 -[ Info: CTMRG conv 26: obj = +1.494241241324e-01 err = 6.2342436828e-09 time = 0.28 sec -[ Info: LBFGS: iter 5, time 826.91 s: f = -0.161915006602, ‖∇f‖ = 1.4797e+00, α = 5.52e-01, m = 4, nfg = 3 -[ Info: CTMRG init: obj = +1.584441491329e-01 err = 1.0000e+00 -[ Info: CTMRG conv 19: obj = +1.585829116178e-01 err = 7.3150666982e-09 time = 0.20 sec -[ Info: LBFGS: iter 6, time 828.30 s: f = -0.192198031506, ‖∇f‖ = 9.0883e-01, α = 1.00e+00, m = 5, nfg = 1 -[ Info: CTMRG init: obj = +1.555986931082e-01 err = 1.0000e+00 -[ Info: CTMRG conv 21: obj = +1.559453587913e-01 err = 4.7549366621e-09 time = 0.21 sec -[ Info: LBFGS: iter 7, time 829.59 s: f = -0.205025430186, ‖∇f‖ = 1.4077e+00, α = 1.00e+00, m = 6, nfg = 1 -[ Info: CTMRG init: obj = +1.642012255794e-01 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +1.642477281365e-01 err = 8.4090087635e-09 time = 0.20 sec -[ Info: LBFGS: iter 8, time 830.89 s: f = -0.221962222995, ‖∇f‖ = 5.1030e-01, α = 1.00e+00, m = 7, nfg = 1 -[ Info: CTMRG init: obj = +1.699305880848e-01 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +1.699638761285e-01 err = 5.2636089744e-09 time = 0.17 sec -[ Info: LBFGS: iter 9, time 832.36 s: f = -0.228516635895, ‖∇f‖ = 4.0683e-01, α = 1.00e+00, m = 8, nfg = 1 -[ Info: CTMRG init: obj = +1.850735815256e-01 err = 1.0000e+00 -[ Info: CTMRG conv 14: obj = +1.851356199709e-01 err = 5.5067543930e-09 time = 0.14 sec -[ Info: LBFGS: iter 10, time 833.39 s: f = -0.238976021230, ‖∇f‖ = 2.5966e-01, α = 1.00e+00, m = 9, nfg = 1 -[ Info: CTMRG init: obj = +2.027068304089e-01 err = 1.0000e+00 -[ Info: CTMRG conv 13: obj = +2.027852287122e-01 err = 2.7944641112e-09 time = 0.14 sec -[ Info: LBFGS: iter 11, time 834.44 s: f = -0.245116064461, ‖∇f‖ = 3.7637e-01, α = 1.00e+00, m = 10, nfg = 1 -[ Info: CTMRG init: obj = +2.320245389893e-01 err = 1.0000e+00 -[ Info: CTMRG conv 10: obj = +2.321898571322e-01 err = 8.2007194775e-09 time = 0.11 sec -[ Info: LBFGS: iter 12, time 835.39 s: f = -0.252909139554, ‖∇f‖ = 3.4356e-01, α = 1.00e+00, m = 11, nfg = 1 -[ Info: CTMRG init: obj = +2.717013307419e-01 err = 1.0000e+00 -[ Info: CTMRG conv 9: obj = +2.720038319914e-01 err = 3.1708110696e-09 time = 0.09 sec -[ Info: LBFGS: iter 13, time 836.50 s: f = -0.260342387029, ‖∇f‖ = 2.9482e-01, α = 1.00e+00, m = 12, nfg = 1 -[ Info: CTMRG init: obj = +3.142116244338e-01 err = 1.0000e+00 -[ Info: CTMRG conv 8: obj = +3.146350793253e-01 err = 5.8852994747e-09 time = 0.07 sec -[ Info: LBFGS: iter 14, time 837.38 s: f = -0.265537731651, ‖∇f‖ = 2.5638e-01, α = 1.00e+00, m = 13, nfg = 1 -[ Info: CTMRG init: obj = +3.372181485668e-01 err = 1.0000e+00 -[ Info: CTMRG conv 8: obj = +3.374449695056e-01 err = 3.9399420036e-09 time = 0.07 sec -[ Info: LBFGS: iter 15, time 838.21 s: f = -0.268085955662, ‖∇f‖ = 1.4302e-01, α = 1.00e+00, m = 14, nfg = 1 -[ Info: CTMRG init: obj = +3.511358819550e-01 err = 1.0000e+00 -[ Info: CTMRG conv 8: obj = +3.512358490282e-01 err = 2.8080096982e-09 time = 0.08 sec -[ Info: LBFGS: iter 16, time 839.01 s: f = -0.269213801539, ‖∇f‖ = 9.4430e-02, α = 1.00e+00, m = 15, nfg = 1 -[ Info: CTMRG init: obj = +3.607127041006e-01 err = 1.0000e+00 -[ Info: CTMRG conv 8: obj = +3.607676677594e-01 err = 1.9984047107e-09 time = 0.08 sec -[ Info: LBFGS: iter 17, time 839.95 s: f = -0.270165070558, ‖∇f‖ = 7.6548e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +3.669365823186e-01 err = 1.0000e+00 -[ Info: CTMRG conv 8: obj = +3.669833353692e-01 err = 2.9609976008e-09 time = 0.07 sec -[ Info: LBFGS: iter 18, time 840.67 s: f = -0.270700725371, ‖∇f‖ = 8.1691e-02, α = 1.00e+00, m = 17, nfg = 1 -[ Info: CTMRG init: obj = +3.662821626355e-01 err = 1.0000e+00 -[ Info: CTMRG conv 8: obj = +3.662785214245e-01 err = 9.5463302733e-10 time = 0.08 sec -[ Info: LBFGS: iter 19, time 841.33 s: f = -0.271027470591, ‖∇f‖ = 4.3095e-02, α = 1.00e+00, m = 18, nfg = 1 -[ Info: CTMRG init: obj = +3.652544451924e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +3.652538502298e-01 err = 7.8623197014e-09 time = 0.08 sec -[ Info: LBFGS: iter 20, time 842.03 s: f = -0.271239343525, ‖∇f‖ = 4.0156e-02, α = 1.00e+00, m = 19, nfg = 1 -[ Info: CTMRG init: obj = +3.675947033282e-01 err = 1.0000e+00 -[ Info: CTMRG conv 8: obj = +3.675962363363e-01 err = 1.5798610291e-09 time = 0.09 sec -[ Info: LBFGS: iter 21, time 843.04 s: f = -0.271530179046, ‖∇f‖ = 5.9545e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +3.737427181841e-01 err = 1.0000e+00 -[ Info: CTMRG conv 8: obj = +3.737631616818e-01 err = 3.3856069217e-09 time = 0.06 sec -[ Info: LBFGS: iter 22, time 843.75 s: f = -0.271855643129, ‖∇f‖ = 5.4653e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +3.793177955257e-01 err = 1.0000e+00 -[ Info: CTMRG conv 8: obj = +3.793309874498e-01 err = 2.3841155460e-09 time = 0.10 sec -[ Info: LBFGS: iter 23, time 844.46 s: f = -0.272062163616, ‖∇f‖ = 3.1192e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +3.855276802897e-01 err = 1.0000e+00 -[ Info: CTMRG conv 8: obj = +3.855464418552e-01 err = 2.7835477038e-09 time = 0.09 sec -[ Info: LBFGS: iter 24, time 845.20 s: f = -0.272177598947, ‖∇f‖ = 3.2733e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +3.884945750065e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +3.884960623902e-01 err = 8.6715117074e-09 time = 0.08 sec -[ Info: LBFGS: iter 25, time 846.20 s: f = -0.272296901359, ‖∇f‖ = 3.2681e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +3.930849227646e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +3.930864681387e-01 err = 7.2244702258e-09 time = 0.05 sec -[ Info: LBFGS: iter 26, time 846.87 s: f = -0.272496091725, ‖∇f‖ = 3.3863e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +3.973131595676e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +3.973144781440e-01 err = 8.3712881010e-09 time = 0.08 sec -[ Info: LBFGS: iter 27, time 847.57 s: f = -0.272637326787, ‖∇f‖ = 2.0637e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +3.986958901805e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +3.986969801782e-01 err = 6.6737409627e-09 time = 0.09 sec -[ Info: LBFGS: iter 28, time 848.29 s: f = -0.272670103336, ‖∇f‖ = 2.1720e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +3.996067064404e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +3.996067526264e-01 err = 1.5899308014e-09 time = 0.07 sec -[ Info: LBFGS: iter 29, time 849.27 s: f = -0.272699141285, ‖∇f‖ = 1.5696e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.018837916115e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.018834369289e-01 err = 3.4335860175e-09 time = 0.05 sec -[ Info: LBFGS: iter 30, time 849.94 s: f = -0.272746811570, ‖∇f‖ = 2.3734e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.071011385726e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.070990570134e-01 err = 6.5552329812e-09 time = 0.05 sec -[ Info: LBFGS: iter 31, time 850.59 s: f = -0.272818112786, ‖∇f‖ = 3.1753e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.145240753004e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.145178808901e-01 err = 6.8052663533e-09 time = 0.08 sec -[ Info: LBFGS: iter 32, time 851.32 s: f = -0.272906643893, ‖∇f‖ = 2.5985e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.242551245171e-01 err = 1.0000e+00 -[ Info: CTMRG conv 8: obj = +4.242386562514e-01 err = 9.8539759844e-10 time = 0.08 sec -[ Info: LBFGS: iter 33, time 852.05 s: f = -0.272952554121, ‖∇f‖ = 4.4589e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.260999681855e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.260997173475e-01 err = 2.1123831393e-09 time = 0.38 sec -[ Info: LBFGS: iter 34, time 853.10 s: f = -0.273005267007, ‖∇f‖ = 9.9076e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.263395922801e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.263395940764e-01 err = 1.4406662993e-09 time = 0.09 sec -[ Info: LBFGS: iter 35, time 853.77 s: f = -0.273013070971, ‖∇f‖ = 8.2167e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.267340571890e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.267340095510e-01 err = 1.8605278064e-09 time = 0.07 sec -[ Info: LBFGS: iter 36, time 854.49 s: f = -0.273020751438, ‖∇f‖ = 9.8987e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.270278252693e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.270279916970e-01 err = 3.1989087010e-09 time = 0.07 sec -[ Info: LBFGS: iter 37, time 855.21 s: f = -0.273028647747, ‖∇f‖ = 1.5048e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.275457230483e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.275457274368e-01 err = 1.9224715076e-09 time = 0.07 sec -[ Info: LBFGS: iter 38, time 856.18 s: f = -0.273039550238, ‖∇f‖ = 7.4328e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.283093133458e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.283093311740e-01 err = 1.7195411799e-09 time = 0.06 sec -[ Info: LBFGS: iter 39, time 856.88 s: f = -0.273049748943, ‖∇f‖ = 8.1203e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.293602909349e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.293603320901e-01 err = 1.3448015618e-09 time = 0.08 sec -[ Info: LBFGS: iter 40, time 857.57 s: f = -0.273057542987, ‖∇f‖ = 1.0556e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.315340639040e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.315343813704e-01 err = 2.7317716643e-09 time = 0.08 sec -[ Info: LBFGS: iter 41, time 858.34 s: f = -0.273070228574, ‖∇f‖ = 1.2840e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.356033735656e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.356056142543e-01 err = 6.4345317970e-09 time = 0.07 sec -[ Info: LBFGS: iter 42, time 859.34 s: f = -0.273082077719, ‖∇f‖ = 1.1193e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.361087228120e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.361086699054e-01 err = 1.1521036128e-09 time = 0.06 sec -[ Info: LBFGS: iter 43, time 860.05 s: f = -0.273092996552, ‖∇f‖ = 8.1332e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.369765582804e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.369766520549e-01 err = 2.6684951030e-09 time = 0.08 sec -[ Info: LBFGS: iter 44, time 860.78 s: f = -0.273103912308, ‖∇f‖ = 1.2611e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.387686835133e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.387695437311e-01 err = 4.9139230079e-09 time = 0.08 sec -[ Info: LBFGS: iter 45, time 861.52 s: f = -0.273116383103, ‖∇f‖ = 1.4901e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.426689967922e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.426741768214e-01 err = 9.6216823102e-09 time = 0.09 sec -[ Info: LBFGS: iter 46, time 862.31 s: f = -0.273124864427, ‖∇f‖ = 2.0568e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.435228513815e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.435230477001e-01 err = 1.3938375485e-09 time = 0.32 sec -[ Info: LBFGS: iter 47, time 863.27 s: f = -0.273139111302, ‖∇f‖ = 7.0923e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.442359332390e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.442360624121e-01 err = 8.2102807253e-09 time = 0.05 sec -[ Info: LBFGS: iter 48, time 863.93 s: f = -0.273143969600, ‖∇f‖ = 4.7032e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.450671762927e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.450673528731e-01 err = 9.4782302337e-09 time = 0.06 sec -[ Info: LBFGS: iter 49, time 864.68 s: f = -0.273146563392, ‖∇f‖ = 4.8587e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.461659228579e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.461662107224e-01 err = 1.4651344945e-09 time = 0.08 sec -[ Info: LBFGS: iter 50, time 865.66 s: f = -0.273149681682, ‖∇f‖ = 4.4858e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.478197469584e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.478201251117e-01 err = 1.4263848945e-09 time = 0.06 sec -[ Info: LBFGS: iter 51, time 866.36 s: f = -0.273153535758, ‖∇f‖ = 6.1631e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.499444375418e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.499449995341e-01 err = 1.7222819789e-09 time = 0.08 sec -[ Info: LBFGS: iter 52, time 867.07 s: f = -0.273156987689, ‖∇f‖ = 4.5642e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.504547041087e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.504547220327e-01 err = 7.7826823112e-09 time = 0.07 sec -[ Info: LBFGS: iter 53, time 867.79 s: f = -0.273159364143, ‖∇f‖ = 3.9352e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.511021911515e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.511022771394e-01 err = 7.4953726522e-10 time = 0.09 sec -[ Info: LBFGS: iter 54, time 868.57 s: f = -0.273162378681, ‖∇f‖ = 5.2448e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.520921936956e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.520921967728e-01 err = 5.3039284811e-10 time = 0.31 sec -[ Info: LBFGS: iter 55, time 869.53 s: f = -0.273164685489, ‖∇f‖ = 7.9447e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.530357875303e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.530358010870e-01 err = 8.7429488510e-09 time = 0.05 sec -[ Info: LBFGS: iter 56, time 870.18 s: f = -0.273167770852, ‖∇f‖ = 4.5867e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.545882887291e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.545884315469e-01 err = 1.6054261815e-09 time = 0.09 sec -[ Info: LBFGS: iter 57, time 870.92 s: f = -0.273171004811, ‖∇f‖ = 4.0036e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.556787931045e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.556789973237e-01 err = 1.4934621828e-09 time = 0.09 sec -[ Info: LBFGS: iter 58, time 871.92 s: f = -0.273172734685, ‖∇f‖ = 5.1587e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.572978492667e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.572983075304e-01 err = 2.1649745710e-09 time = 0.06 sec -[ Info: LBFGS: iter 59, time 872.61 s: f = -0.273175277923, ‖∇f‖ = 5.2136e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.592789057454e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.592795996463e-01 err = 2.4538482534e-09 time = 0.08 sec -[ Info: LBFGS: iter 60, time 873.36 s: f = -0.273178436887, ‖∇f‖ = 4.5043e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.610203529605e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.610209113341e-01 err = 1.9923210396e-09 time = 0.07 sec -[ Info: LBFGS: iter 61, time 874.08 s: f = -0.273181599401, ‖∇f‖ = 4.1926e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.616536977817e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.616537604132e-01 err = 6.4830178495e-09 time = 0.07 sec -[ Info: LBFGS: iter 62, time 875.13 s: f = -0.273184127264, ‖∇f‖ = 3.5435e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.615991308044e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.615992366511e-01 err = 5.0404638781e-10 time = 0.06 sec -[ Info: LBFGS: iter 63, time 875.81 s: f = -0.273186580584, ‖∇f‖ = 3.2519e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.622036014559e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.622036743292e-01 err = 8.0180819642e-10 time = 0.06 sec -[ Info: LBFGS: iter 64, time 876.50 s: f = -0.273189436738, ‖∇f‖ = 6.9448e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.625455998697e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.625456196865e-01 err = 8.9687844711e-09 time = 0.07 sec -[ Info: LBFGS: iter 65, time 877.22 s: f = -0.273192692504, ‖∇f‖ = 4.6825e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.645067676136e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.645069109392e-01 err = 1.9375918118e-09 time = 0.09 sec -[ Info: LBFGS: iter 66, time 877.96 s: f = -0.273196715211, ‖∇f‖ = 4.7511e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.657748055462e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.657748482350e-01 err = 1.2394947561e-09 time = 0.37 sec -[ Info: LBFGS: iter 67, time 878.91 s: f = -0.273198196827, ‖∇f‖ = 5.4294e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.665064064468e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.665065369184e-01 err = 6.4068919881e-09 time = 0.07 sec -[ Info: LBFGS: iter 68, time 879.57 s: f = -0.273199435966, ‖∇f‖ = 2.8645e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.674195111640e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.674196890444e-01 err = 7.6716513054e-09 time = 0.06 sec -[ Info: LBFGS: iter 69, time 880.24 s: f = -0.273200799932, ‖∇f‖ = 2.4252e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.683160818296e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.683162051195e-01 err = 7.4930079200e-09 time = 0.08 sec -[ Info: LBFGS: iter 70, time 880.94 s: f = -0.273202184331, ‖∇f‖ = 3.0503e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.690638581817e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.690637699300e-01 err = 9.6440009281e-10 time = 0.07 sec -[ Info: LBFGS: iter 71, time 881.90 s: f = -0.273203318657, ‖∇f‖ = 7.2710e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.694434155331e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.694433572079e-01 err = 6.3638742883e-09 time = 0.05 sec -[ Info: LBFGS: iter 72, time 882.59 s: f = -0.273204976120, ‖∇f‖ = 2.8153e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.690025332347e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.690026028015e-01 err = 4.5405781107e-09 time = 0.07 sec -[ Info: LBFGS: iter 73, time 883.29 s: f = -0.273205613161, ‖∇f‖ = 2.0563e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.683640409461e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.683642070895e-01 err = 7.5729673107e-09 time = 0.06 sec -[ Info: LBFGS: iter 74, time 883.98 s: f = -0.273206541752, ‖∇f‖ = 2.6401e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.680812736007e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.680812878329e-01 err = 5.8296871295e-09 time = 0.06 sec -[ Info: LBFGS: iter 75, time 884.93 s: f = -0.273207825994, ‖∇f‖ = 3.3947e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.683658632583e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.683654640805e-01 err = 9.6410675213e-10 time = 0.06 sec -[ Info: LBFGS: iter 76, time 885.62 s: f = -0.273210784096, ‖∇f‖ = 5.5166e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.695632207222e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.695628536799e-01 err = 1.4863989272e-09 time = 0.07 sec -[ Info: LBFGS: iter 77, time 886.29 s: f = -0.273212703606, ‖∇f‖ = 5.9417e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.704381714894e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.704383900529e-01 err = 8.0609213295e-09 time = 0.06 sec -[ Info: LBFGS: iter 78, time 886.98 s: f = -0.273214840394, ‖∇f‖ = 2.5444e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.716629768178e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.716633806818e-01 err = 9.3022446537e-09 time = 0.06 sec -[ Info: LBFGS: iter 79, time 887.93 s: f = -0.273216186725, ‖∇f‖ = 2.5210e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.726362728301e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.726365646547e-01 err = 7.0379215850e-09 time = 0.05 sec -[ Info: LBFGS: iter 80, time 888.61 s: f = -0.273217132240, ‖∇f‖ = 2.9834e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.746270632342e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.746275390474e-01 err = 1.2462578943e-09 time = 0.07 sec -[ Info: LBFGS: iter 81, time 889.28 s: f = -0.273217860371, ‖∇f‖ = 8.6736e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.742606682887e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.742606864218e-01 err = 3.5846387007e-09 time = 0.06 sec -[ Info: LBFGS: iter 82, time 889.96 s: f = -0.273219978798, ‖∇f‖ = 2.8197e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.739168218451e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.739168525084e-01 err = 6.3378884097e-09 time = 0.06 sec -[ Info: LBFGS: iter 83, time 890.68 s: f = -0.273220887198, ‖∇f‖ = 1.4861e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.736949927381e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.736950134585e-01 err = 5.3980945320e-09 time = 0.05 sec -[ Info: LBFGS: iter 84, time 891.56 s: f = -0.273221346093, ‖∇f‖ = 1.9427e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.737094141910e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.737094093508e-01 err = 4.1427533982e-09 time = 0.05 sec -[ Info: LBFGS: iter 85, time 892.28 s: f = -0.273221865528, ‖∇f‖ = 1.7524e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.739498377882e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.739497241759e-01 err = 8.3094272741e-09 time = 0.06 sec -[ Info: LBFGS: iter 86, time 892.99 s: f = -0.273222181741, ‖∇f‖ = 5.3066e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.742275640120e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.742275861455e-01 err = 2.1070029154e-09 time = 0.07 sec -[ Info: LBFGS: iter 87, time 893.98 s: f = -0.273223246562, ‖∇f‖ = 1.9685e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.745615531112e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.745615970216e-01 err = 2.5255250793e-09 time = 0.05 sec -[ Info: LBFGS: iter 88, time 894.67 s: f = -0.273223705610, ‖∇f‖ = 2.3045e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.753529638533e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.753531654518e-01 err = 5.7678184307e-09 time = 0.07 sec -[ Info: LBFGS: iter 89, time 895.38 s: f = -0.273224556828, ‖∇f‖ = 2.5083e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.765772035582e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.765776837597e-01 err = 1.0124171631e-09 time = 0.08 sec -[ Info: LBFGS: iter 90, time 896.12 s: f = -0.273225646272, ‖∇f‖ = 4.2989e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.777304198473e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.777307237114e-01 err = 1.0180024105e-09 time = 0.08 sec -[ Info: LBFGS: iter 91, time 897.15 s: f = -0.273227256373, ‖∇f‖ = 2.7322e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.783240501999e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.783240673497e-01 err = 7.1416725880e-10 time = 0.06 sec -[ Info: LBFGS: iter 92, time 897.82 s: f = -0.273229828316, ‖∇f‖ = 2.2841e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.791322881259e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.791323312929e-01 err = 1.0389736817e-09 time = 0.09 sec -[ Info: LBFGS: iter 93, time 898.53 s: f = -0.273231704181, ‖∇f‖ = 2.4489e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.786596533113e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.786601089445e-01 err = 5.9830244732e-10 time = 0.09 sec -[ Info: CTMRG init: obj = +4.789662294135e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.789662889092e-01 err = 6.4853481779e-09 time = 0.07 sec -[ Info: LBFGS: iter 94, time 900.03 s: f = -0.273232179586, ‖∇f‖ = 2.5292e-03, α = 3.61e-01, m = 20, nfg = 2 -[ Info: CTMRG init: obj = +4.788074933549e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.788075351219e-01 err = 2.2631300753e-09 time = 0.07 sec -[ Info: LBFGS: iter 95, time 901.02 s: f = -0.273232651417, ‖∇f‖ = 1.6879e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.786080247497e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.786081498864e-01 err = 3.2395930512e-09 time = 0.05 sec -[ Info: LBFGS: iter 96, time 901.75 s: f = -0.273233247066, ‖∇f‖ = 1.8610e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.786842676431e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.786842578665e-01 err = 1.1277031841e-09 time = 0.06 sec -[ Info: LBFGS: iter 97, time 902.47 s: f = -0.273233724645, ‖∇f‖ = 2.3320e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.792106070878e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.792104764342e-01 err = 4.9994793879e-09 time = 0.06 sec -[ Info: LBFGS: iter 98, time 903.15 s: f = -0.273234496326, ‖∇f‖ = 2.1070e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.792807644559e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.792804289320e-01 err = 5.7368410925e-10 time = 0.07 sec -[ Info: LBFGS: iter 99, time 903.85 s: f = -0.273234942243, ‖∇f‖ = 4.3229e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.797988803658e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.797989152104e-01 err = 4.5762436281e-09 time = 0.07 sec -[ Info: LBFGS: iter 100, time 904.79 s: f = -0.273235872899, ‖∇f‖ = 1.0227e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.797019933537e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.797019858679e-01 err = 9.2179000290e-10 time = 0.10 sec -[ Info: LBFGS: iter 101, time 905.50 s: f = -0.273236083478, ‖∇f‖ = 8.8617e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.793891521133e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.793891740523e-01 err = 5.6337023713e-09 time = 0.06 sec -[ Info: LBFGS: iter 102, time 906.21 s: f = -0.273236502150, ‖∇f‖ = 1.2113e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.789744279460e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.789745607107e-01 err = 3.7058752456e-10 time = 0.09 sec -[ Info: CTMRG init: obj = +4.791677254254e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.791677641063e-01 err = 7.3689893544e-09 time = 0.07 sec -[ Info: LBFGS: iter 103, time 907.70 s: f = -0.273236852006, ‖∇f‖ = 2.2250e-03, α = 5.40e-01, m = 20, nfg = 2 -[ Info: CTMRG init: obj = +4.789276815767e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.789277231124e-01 err = 7.5306084214e-09 time = 0.07 sec -[ Info: LBFGS: iter 104, time 908.67 s: f = -0.273237309095, ‖∇f‖ = 1.5651e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.788843602719e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.788843637881e-01 err = 2.6405239504e-10 time = 0.11 sec -[ Info: LBFGS: iter 105, time 909.39 s: f = -0.273237826712, ‖∇f‖ = 1.7300e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.789798585945e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.789798340955e-01 err = 4.5254772597e-09 time = 0.08 sec -[ Info: LBFGS: iter 106, time 910.12 s: f = -0.273238151589, ‖∇f‖ = 1.4739e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.792964889500e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.792965031016e-01 err = 3.0861610133e-09 time = 0.07 sec -[ Info: LBFGS: iter 107, time 910.85 s: f = -0.273238452194, ‖∇f‖ = 1.3132e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.797585448501e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.797583969194e-01 err = 5.5138899038e-10 time = 0.09 sec -[ Info: LBFGS: iter 108, time 911.83 s: f = -0.273239083045, ‖∇f‖ = 3.6339e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.801830137612e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.801830200283e-01 err = 4.9330311249e-09 time = 0.05 sec -[ Info: LBFGS: iter 109, time 912.50 s: f = -0.273239925488, ‖∇f‖ = 1.6856e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.802634867190e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.802634639939e-01 err = 5.1863757945e-09 time = 0.08 sec -[ Info: LBFGS: iter 110, time 913.22 s: f = -0.273240465522, ‖∇f‖ = 1.3613e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.802760262834e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.802760076695e-01 err = 4.9382603595e-09 time = 0.07 sec -[ Info: LBFGS: iter 111, time 913.97 s: f = -0.273240934835, ‖∇f‖ = 2.3524e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.802939956932e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.802939410658e-01 err = 8.9304889036e-09 time = 0.06 sec -[ Info: LBFGS: iter 112, time 914.64 s: f = -0.273241253954, ‖∇f‖ = 2.3895e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.802973441785e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.802973435724e-01 err = 2.4216364455e-09 time = 0.07 sec -[ Info: LBFGS: iter 113, time 915.58 s: f = -0.273241593627, ‖∇f‖ = 1.3301e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.804014797027e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.804014788612e-01 err = 1.8737547985e-09 time = 0.09 sec -[ Info: LBFGS: iter 114, time 916.26 s: f = -0.273242108811, ‖∇f‖ = 1.2847e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.805466102721e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.805466013995e-01 err = 2.4328755928e-09 time = 0.06 sec -[ Info: LBFGS: iter 115, time 916.92 s: f = -0.273242449543, ‖∇f‖ = 1.3579e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.803090646228e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.803090968139e-01 err = 5.2955340458e-10 time = 0.08 sec -[ Info: CTMRG init: obj = +4.804639686484e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.804639727315e-01 err = 5.4757355659e-09 time = 0.06 sec -[ Info: LBFGS: iter 116, time 918.28 s: f = -0.273242675076, ‖∇f‖ = 2.3470e-03, α = 3.57e-01, m = 20, nfg = 2 -[ Info: CTMRG init: obj = +4.805754019387e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.805753859421e-01 err = 7.4466348840e-09 time = 0.07 sec -[ Info: LBFGS: iter 117, time 919.21 s: f = -0.273243104527, ‖∇f‖ = 1.2979e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.805735505394e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.805735313982e-01 err = 4.2148915555e-10 time = 0.11 sec -[ Info: LBFGS: iter 118, time 919.93 s: f = -0.273243436953, ‖∇f‖ = 1.2233e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.804710505169e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.804710342447e-01 err = 6.4482932714e-10 time = 0.08 sec -[ Info: LBFGS: iter 119, time 920.72 s: f = -0.273243761256, ‖∇f‖ = 1.6044e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.805019941032e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.805019970087e-01 err = 5.7035908358e-09 time = 0.06 sec -[ Info: LBFGS: iter 120, time 921.44 s: f = -0.273244062582, ‖∇f‖ = 1.7999e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.805364210841e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.805364298716e-01 err = 5.4422519760e-09 time = 0.07 sec -[ Info: LBFGS: iter 121, time 922.37 s: f = -0.273244428575, ‖∇f‖ = 1.3779e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.807559862614e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.807560378139e-01 err = 3.7379046929e-09 time = 0.05 sec -[ Info: LBFGS: iter 122, time 923.04 s: f = -0.273244941087, ‖∇f‖ = 1.6881e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.810722414880e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.810722899338e-01 err = 7.1509377999e-09 time = 0.06 sec -[ Info: LBFGS: iter 123, time 923.70 s: f = -0.273245490453, ‖∇f‖ = 1.8823e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.814299105464e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.814299327851e-01 err = 7.1850148357e-09 time = 0.06 sec -[ Info: LBFGS: iter 124, time 924.47 s: f = -0.273246014128, ‖∇f‖ = 1.3348e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.816345761873e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.816345765078e-01 err = 5.1886510131e-09 time = 0.08 sec -[ Info: LBFGS: iter 125, time 925.47 s: f = -0.273246415220, ‖∇f‖ = 1.6797e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.817457892273e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.817457676277e-01 err = 7.9942843277e-09 time = 0.05 sec -[ Info: LBFGS: iter 126, time 926.18 s: f = -0.273246886558, ‖∇f‖ = 1.9101e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.816486297860e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.816486220771e-01 err = 5.8526396306e-10 time = 0.07 sec -[ Info: LBFGS: iter 127, time 926.91 s: f = -0.273247578331, ‖∇f‖ = 2.6783e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.813734078208e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.813733741400e-01 err = 2.1140612736e-09 time = 0.08 sec -[ Info: LBFGS: iter 128, time 927.65 s: f = -0.273248596780, ‖∇f‖ = 4.2726e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.809326459337e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.809326329788e-01 err = 3.3469639206e-09 time = 0.07 sec -[ Info: LBFGS: iter 129, time 928.44 s: f = -0.273249248580, ‖∇f‖ = 3.4266e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.809941074596e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.809940893817e-01 err = 9.1754566530e-09 time = 0.29 sec -[ Info: LBFGS: iter 130, time 929.37 s: f = -0.273249798264, ‖∇f‖ = 1.3846e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.810122860248e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.810123085036e-01 err = 7.9488237170e-10 time = 0.09 sec -[ Info: LBFGS: iter 131, time 930.09 s: f = -0.273250091726, ‖∇f‖ = 1.3050e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.810105154042e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.810105224177e-01 err = 7.4451601923e-10 time = 0.09 sec -[ Info: LBFGS: iter 132, time 930.86 s: f = -0.273250298144, ‖∇f‖ = 1.7451e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.809813774018e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.809814217119e-01 err = 1.7143550686e-09 time = 0.09 sec -[ Info: LBFGS: iter 133, time 931.61 s: f = -0.273250674484, ‖∇f‖ = 1.8764e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.809589590340e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.809590192078e-01 err = 1.8391504148e-09 time = 0.08 sec -[ Info: LBFGS: iter 134, time 932.61 s: f = -0.273250849981, ‖∇f‖ = 2.5432e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.808955403058e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.808955449714e-01 err = 2.2951085914e-09 time = 0.05 sec -[ Info: LBFGS: iter 135, time 933.31 s: f = -0.273251094386, ‖∇f‖ = 1.0169e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.808431471175e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.808431483697e-01 err = 6.0541470008e-09 time = 0.07 sec -[ Info: LBFGS: iter 136, time 934.01 s: f = -0.273251250424, ‖∇f‖ = 1.1018e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.807421686570e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.807421786855e-01 err = 3.8423948125e-10 time = 0.08 sec -[ Info: LBFGS: iter 137, time 934.75 s: f = -0.273251472616, ‖∇f‖ = 1.7175e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.805501691108e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.805501937811e-01 err = 1.2032452024e-09 time = 0.09 sec -[ Info: LBFGS: iter 138, time 935.51 s: f = -0.273251802341, ‖∇f‖ = 1.9190e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.804289072221e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.804289531354e-01 err = 1.2177451389e-09 time = 0.08 sec -[ Info: CTMRG init: obj = +4.805208730891e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.805208760207e-01 err = 3.1793481864e-10 time = 0.11 sec -[ Info: LBFGS: iter 139, time 937.24 s: f = -0.273251940669, ‖∇f‖ = 2.5923e-03, α = 2.54e-01, m = 20, nfg = 2 -[ Info: CTMRG init: obj = +4.803946272888e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.803946461498e-01 err = 1.2157672579e-09 time = 0.07 sec -[ Info: LBFGS: iter 140, time 937.97 s: f = -0.273252255136, ‖∇f‖ = 1.6162e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.803241381625e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.803241574618e-01 err = 1.1802934031e-09 time = 0.09 sec -[ Info: LBFGS: iter 141, time 938.74 s: f = -0.273252593676, ‖∇f‖ = 9.5803e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.803546161524e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.803546361914e-01 err = 8.7972431541e-10 time = 0.08 sec -[ Info: LBFGS: iter 142, time 939.48 s: f = -0.273252841099, ‖∇f‖ = 1.5506e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.804182585835e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.804182806506e-01 err = 8.3811595962e-10 time = 0.08 sec -[ Info: LBFGS: iter 143, time 940.47 s: f = -0.273253128531, ‖∇f‖ = 2.2830e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.805261995241e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.805262097495e-01 err = 4.7700114831e-09 time = 0.10 sec -[ Info: LBFGS: iter 144, time 941.19 s: f = -0.273253470875, ‖∇f‖ = 1.3732e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.805616712670e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.805616822842e-01 err = 1.2044520669e-09 time = 0.07 sec -[ Info: LBFGS: iter 145, time 941.97 s: f = -0.273253787952, ‖∇f‖ = 1.4764e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.806272354494e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.806272279261e-01 err = 1.9225106931e-09 time = 0.06 sec -[ Info: LBFGS: iter 146, time 942.69 s: f = -0.273254080621, ‖∇f‖ = 1.9509e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.805717973510e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.805717949586e-01 err = 4.3409144020e-10 time = 0.08 sec -[ Info: LBFGS: iter 147, time 943.42 s: f = -0.273254306475, ‖∇f‖ = 1.9010e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.801673305193e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.801673335911e-01 err = 3.7575359203e-09 time = 0.36 sec -[ Info: LBFGS: iter 148, time 944.41 s: f = -0.273255277035, ‖∇f‖ = 2.1723e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.800445144046e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.800445745424e-01 err = 3.0499085824e-09 time = 0.08 sec -[ Info: LBFGS: iter 149, time 945.12 s: f = -0.273255976775, ‖∇f‖ = 2.3105e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.800359660106e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.800360016141e-01 err = 1.1855876964e-09 time = 0.08 sec -[ Info: LBFGS: iter 150, time 945.86 s: f = -0.273256484758, ‖∇f‖ = 1.2498e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.800064707408e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.800066140113e-01 err = 2.0245498571e-09 time = 0.08 sec -[ Info: LBFGS: iter 151, time 946.63 s: f = -0.273256936415, ‖∇f‖ = 1.2435e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.799563181331e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.799563788753e-01 err = 1.1719463343e-09 time = 0.07 sec -[ Info: LBFGS: iter 152, time 947.63 s: f = -0.273257194268, ‖∇f‖ = 1.5879e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.798930407799e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.798931268224e-01 err = 1.1396026674e-09 time = 0.06 sec -[ Info: LBFGS: iter 153, time 948.38 s: f = -0.273257492644, ‖∇f‖ = 1.2019e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.797802516360e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.797802819870e-01 err = 8.0552494762e-10 time = 0.07 sec -[ Info: LBFGS: iter 154, time 949.11 s: f = -0.273257706633, ‖∇f‖ = 1.2598e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.797768701253e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.797768714427e-01 err = 3.3382578990e-09 time = 0.07 sec -[ Info: LBFGS: iter 155, time 949.86 s: f = -0.273257863534, ‖∇f‖ = 1.2053e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.796659993069e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.796660368515e-01 err = 9.1008880966e-10 time = 0.07 sec -[ Info: LBFGS: iter 156, time 950.61 s: f = -0.273258179903, ‖∇f‖ = 1.2266e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.795411638633e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.795411850459e-01 err = 1.2512833434e-09 time = 0.08 sec -[ Info: LBFGS: iter 157, time 951.59 s: f = -0.273258423796, ‖∇f‖ = 1.9907e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.795802685592e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.795802885861e-01 err = 8.2245725331e-09 time = 0.10 sec -[ Info: LBFGS: iter 158, time 952.30 s: f = -0.273258732899, ‖∇f‖ = 1.0784e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.792877111859e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.792879760255e-01 err = 4.0009118433e-09 time = 0.07 sec -[ Info: LBFGS: iter 159, time 953.04 s: f = -0.273259186735, ‖∇f‖ = 1.6223e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.791975875972e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.791976321664e-01 err = 1.6716860412e-09 time = 0.07 sec -[ Info: LBFGS: iter 160, time 953.76 s: f = -0.273259592363, ‖∇f‖ = 1.6598e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.789064571829e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.789065644045e-01 err = 3.5932050759e-09 time = 0.09 sec -[ Info: LBFGS: iter 161, time 954.53 s: f = -0.273259817595, ‖∇f‖ = 3.7859e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.786811932101e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.786812583197e-01 err = 2.0205940886e-09 time = 0.09 sec -[ Info: LBFGS: iter 162, time 955.51 s: f = -0.273260282927, ‖∇f‖ = 9.1253e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.788559393609e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.788560073523e-01 err = 2.0974758634e-09 time = 0.10 sec -[ Info: LBFGS: iter 163, time 956.22 s: f = -0.273260379913, ‖∇f‖ = 7.4528e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.788376643167e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.788376636156e-01 err = 4.3116122365e-09 time = 0.06 sec -[ Info: LBFGS: iter 164, time 956.93 s: f = -0.273260551977, ‖∇f‖ = 6.2372e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.785975525078e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.785975539109e-01 err = 1.4094402103e-09 time = 0.07 sec -[ Info: LBFGS: iter 165, time 957.68 s: f = -0.273260703522, ‖∇f‖ = 2.8247e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.785447283809e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.785447317097e-01 err = 6.4005366060e-09 time = 0.06 sec -[ Info: LBFGS: iter 166, time 958.66 s: f = -0.273260965983, ‖∇f‖ = 7.7435e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.785616857991e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.785616855805e-01 err = 2.4400266361e-09 time = 0.05 sec -[ Info: LBFGS: iter 167, time 959.34 s: f = -0.273261029226, ‖∇f‖ = 6.0943e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.784706282454e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.784706362702e-01 err = 1.0967731972e-09 time = 0.08 sec -[ Info: LBFGS: iter 168, time 960.06 s: f = -0.273261217327, ‖∇f‖ = 6.3523e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.782868347547e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.782868052432e-01 err = 1.6148867721e-09 time = 0.09 sec -[ Info: LBFGS: iter 169, time 960.83 s: f = -0.273261413376, ‖∇f‖ = 2.2349e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.780984755793e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.780985167087e-01 err = 2.2970561742e-09 time = 0.07 sec -[ Info: LBFGS: iter 170, time 961.59 s: f = -0.273261694992, ‖∇f‖ = 8.1484e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.780266153849e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.780266154518e-01 err = 8.1891024560e-09 time = 0.07 sec -[ Info: LBFGS: iter 171, time 962.57 s: f = -0.273261835395, ‖∇f‖ = 7.1536e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.779268653137e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.779268609535e-01 err = 9.9986450086e-10 time = 0.10 sec -[ Info: LBFGS: iter 172, time 963.29 s: f = -0.273262028596, ‖∇f‖ = 1.0380e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.777985422147e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.777985306143e-01 err = 8.7770193229e-10 time = 0.07 sec -[ Info: LBFGS: iter 173, time 964.03 s: f = -0.273262181630, ‖∇f‖ = 1.1178e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.777370606901e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.777370633742e-01 err = 1.4143631977e-09 time = 0.08 sec -[ Info: LBFGS: iter 174, time 964.79 s: f = -0.273262422962, ‖∇f‖ = 1.0462e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.775641028873e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.775641014404e-01 err = 3.1561784283e-09 time = 0.07 sec -[ Info: LBFGS: iter 175, time 965.50 s: f = -0.273262837415, ‖∇f‖ = 1.1822e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.774748517265e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.774748352105e-01 err = 2.4478019594e-09 time = 0.07 sec -[ Info: LBFGS: iter 176, time 966.45 s: f = -0.273263042769, ‖∇f‖ = 2.2133e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.773219350857e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.773219260487e-01 err = 1.6189317245e-09 time = 0.11 sec -[ Info: LBFGS: iter 177, time 967.17 s: f = -0.273263279588, ‖∇f‖ = 8.7624e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.772854043848e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.772854020301e-01 err = 2.9822673611e-09 time = 0.07 sec -[ Info: LBFGS: iter 178, time 967.90 s: f = -0.273263449265, ‖∇f‖ = 1.0564e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.771758028625e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.771757836120e-01 err = 8.8142743730e-10 time = 0.09 sec -[ Info: LBFGS: iter 179, time 968.65 s: f = -0.273263776392, ‖∇f‖ = 1.6950e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.771302116662e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.771301874760e-01 err = 5.2541798786e-09 time = 0.06 sec -[ Info: LBFGS: iter 180, time 969.40 s: f = -0.273264059850, ‖∇f‖ = 1.5481e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.767996014124e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.767995959424e-01 err = 5.5848027818e-09 time = 0.07 sec -[ Info: CTMRG init: obj = +4.770208398690e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.770208392566e-01 err = 1.6681094467e-09 time = 0.10 sec -[ Info: LBFGS: iter 181, time 971.10 s: f = -0.273264187559, ‖∇f‖ = 1.2988e-03, α = 3.40e-01, m = 20, nfg = 2 -[ Info: CTMRG init: obj = +4.770440823632e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.770440797053e-01 err = 1.5739787613e-09 time = 0.06 sec -[ Info: LBFGS: iter 182, time 971.83 s: f = -0.273264310040, ‖∇f‖ = 5.0027e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.770117929246e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.770117950770e-01 err = 8.9575249608e-10 time = 0.07 sec -[ Info: LBFGS: iter 183, time 972.55 s: f = -0.273264350660, ‖∇f‖ = 5.8334e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.769971605641e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.769971621318e-01 err = 7.7748930713e-10 time = 0.07 sec -[ Info: LBFGS: iter 184, time 973.26 s: f = -0.273264392156, ‖∇f‖ = 7.4958e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.769083171394e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.769083261527e-01 err = 2.2158423859e-09 time = 0.07 sec -[ Info: LBFGS: iter 185, time 974.24 s: f = -0.273264466960, ‖∇f‖ = 1.5690e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.768678353976e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.768678382372e-01 err = 1.4134441577e-09 time = 0.11 sec -[ Info: LBFGS: iter 186, time 974.91 s: f = -0.273264575915, ‖∇f‖ = 8.7235e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.767879001421e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.767878991691e-01 err = 1.7814314057e-09 time = 0.09 sec -[ Info: LBFGS: iter 187, time 975.63 s: f = -0.273264679414, ‖∇f‖ = 5.2723e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.767421973633e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.767421945382e-01 err = 7.9236797418e-10 time = 0.07 sec -[ Info: LBFGS: iter 188, time 976.36 s: f = -0.273264731290, ‖∇f‖ = 6.4665e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.766872205654e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.766872174361e-01 err = 1.0396357887e-09 time = 0.07 sec -[ Info: LBFGS: iter 189, time 977.08 s: f = -0.273264767679, ‖∇f‖ = 9.9049e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.766967641060e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.766967637394e-01 err = 2.0981305723e-09 time = 0.36 sec -[ Info: LBFGS: iter 190, time 978.05 s: f = -0.273264818438, ‖∇f‖ = 5.8232e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.767219705006e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.767219689583e-01 err = 2.1271834938e-09 time = 0.08 sec -[ Info: LBFGS: iter 191, time 978.75 s: f = -0.273264883219, ‖∇f‖ = 5.0729e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.767527763688e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.767527741140e-01 err = 9.6804643183e-10 time = 0.06 sec -[ Info: LBFGS: iter 192, time 979.56 s: f = -0.273264932574, ‖∇f‖ = 7.3332e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.768092611055e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.768092546795e-01 err = 1.9216532006e-09 time = 0.06 sec -[ Info: LBFGS: iter 193, time 980.29 s: f = -0.273265008002, ‖∇f‖ = 8.3120e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.769703094195e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.769702847581e-01 err = 2.0268032020e-09 time = 0.07 sec -[ Info: LBFGS: iter 194, time 981.35 s: f = -0.273265046576, ‖∇f‖ = 1.6803e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.769516426028e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.769516416392e-01 err = 7.6116111015e-09 time = 0.05 sec -[ Info: LBFGS: iter 195, time 982.07 s: f = -0.273265157726, ‖∇f‖ = 5.2448e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.769446882418e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.769446879824e-01 err = 2.9030694112e-09 time = 0.07 sec -[ Info: LBFGS: iter 196, time 982.81 s: f = -0.273265202826, ‖∇f‖ = 5.7354e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.769545446496e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.769545416856e-01 err = 7.3607404224e-09 time = 0.06 sec -[ Info: LBFGS: iter 197, time 983.55 s: f = -0.273265259520, ‖∇f‖ = 8.1885e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.769849318412e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.769849242592e-01 err = 6.6225776188e-10 time = 0.07 sec -[ Info: LBFGS: iter 198, time 984.30 s: f = -0.273265334929, ‖∇f‖ = 8.0328e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.769764186629e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.769763223155e-01 err = 2.8607955001e-09 time = 0.07 sec -[ Info: CTMRG init: obj = +4.769817945901e-01 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +4.769817694585e-01 err = 1.3320949671e-09 time = 0.12 sec -[ Info: LBFGS: iter 199, time 986.02 s: f = -0.273265394805, ‖∇f‖ = 1.1434e-03, α = 5.11e-01, m = 20, nfg = 2 -[ Info: CTMRG init: obj = +4.770224767611e-01 err = 1.0000e+00 -[ Info: CTMRG conv 6: obj = +4.770224657374e-01 err = 6.8019993036e-09 time = 0.06 sec -┌ Warning: LBFGS: not converged to requested tol after 200 iterations and time 986.74 s: f = -0.273265481969, ‖∇f‖ = 5.2333e-04 +[ Info: LBFGS: iter 2, time 89.37 s: f = 0.065740243544, ‖∇f‖ = 8.6301e+00, α = 5.34e-01, m = 1, nfg = 2 +[ Info: LBFGS: iter 3, time 91.49 s: f = -0.035484016742, ‖∇f‖ = 1.7043e+00, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 4, time 93.49 s: f = -0.068142497162, ‖∇f‖ = 1.5153e+00, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 5, time 101.18 s: f = -0.161915006602, ‖∇f‖ = 1.4797e+00, α = 5.52e-01, m = 4, nfg = 3 +[ Info: LBFGS: iter 6, time 103.30 s: f = -0.192198031506, ‖∇f‖ = 9.0883e-01, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 7, time 105.34 s: f = -0.205025430186, ‖∇f‖ = 1.4077e+00, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 8, time 107.32 s: f = -0.221962222995, ‖∇f‖ = 5.1030e-01, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 9, time 109.92 s: f = -0.228516635895, ‖∇f‖ = 4.0683e-01, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 10, time 111.73 s: f = -0.238976021230, ‖∇f‖ = 2.5966e-01, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 11, time 113.50 s: f = -0.245116064461, ‖∇f‖ = 3.7637e-01, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 12, time 115.21 s: f = -0.252909139554, ‖∇f‖ = 3.4356e-01, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 13, time 116.74 s: f = -0.260342387029, ‖∇f‖ = 2.9482e-01, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 14, time 118.22 s: f = -0.265537731651, ‖∇f‖ = 2.5638e-01, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 15, time 120.30 s: f = -0.268085955662, ‖∇f‖ = 1.4302e-01, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 16, time 121.73 s: f = -0.269213801539, ‖∇f‖ = 9.4430e-02, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 17, time 123.01 s: f = -0.270165070558, ‖∇f‖ = 7.6548e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 18, time 124.32 s: f = -0.270700725371, ‖∇f‖ = 8.1691e-02, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 19, time 125.63 s: f = -0.271027470591, ‖∇f‖ = 4.3095e-02, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 20, time 126.92 s: f = -0.271239343525, ‖∇f‖ = 4.0156e-02, α = 1.00e+00, m = 19, nfg = 1 +[ Info: LBFGS: iter 21, time 128.90 s: f = -0.271530179046, ‖∇f‖ = 5.9545e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 22, time 130.23 s: f = -0.271855643129, ‖∇f‖ = 5.4653e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 23, time 131.51 s: f = -0.272062163616, ‖∇f‖ = 3.1192e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 24, time 132.82 s: f = -0.272177598947, ‖∇f‖ = 3.2733e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 25, time 134.11 s: f = -0.272296901359, ‖∇f‖ = 3.2681e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 26, time 135.40 s: f = -0.272496091725, ‖∇f‖ = 3.3863e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 27, time 137.34 s: f = -0.272637326787, ‖∇f‖ = 2.0637e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 28, time 138.62 s: f = -0.272670103336, ‖∇f‖ = 2.1720e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 29, time 139.91 s: f = -0.272699141285, ‖∇f‖ = 1.5696e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 30, time 141.22 s: f = -0.272746811570, ‖∇f‖ = 2.3734e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 31, time 142.51 s: f = -0.272818112786, ‖∇f‖ = 3.1753e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 32, time 143.81 s: f = -0.272906643893, ‖∇f‖ = 2.5985e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 33, time 145.13 s: f = -0.272952554121, ‖∇f‖ = 4.4589e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 34, time 147.07 s: f = -0.273005267007, ‖∇f‖ = 9.9076e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 35, time 148.35 s: f = -0.273013070971, ‖∇f‖ = 8.2167e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 36, time 149.64 s: f = -0.273020751438, ‖∇f‖ = 9.8987e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 37, time 150.95 s: f = -0.273028647747, ‖∇f‖ = 1.5048e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 38, time 152.25 s: f = -0.273039550238, ‖∇f‖ = 7.4328e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 39, time 153.55 s: f = -0.273049748943, ‖∇f‖ = 8.1203e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 40, time 154.84 s: f = -0.273057542987, ‖∇f‖ = 1.0556e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 41, time 156.78 s: f = -0.273070228574, ‖∇f‖ = 1.2840e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 42, time 158.06 s: f = -0.273082077719, ‖∇f‖ = 1.1193e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 43, time 159.34 s: f = -0.273092996552, ‖∇f‖ = 8.1332e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 44, time 160.64 s: f = -0.273103912308, ‖∇f‖ = 1.2611e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 45, time 161.94 s: f = -0.273116383103, ‖∇f‖ = 1.4901e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 46, time 163.23 s: f = -0.273124864427, ‖∇f‖ = 2.0568e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 47, time 164.53 s: f = -0.273139111302, ‖∇f‖ = 7.0923e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 48, time 166.46 s: f = -0.273143969600, ‖∇f‖ = 4.7032e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 49, time 167.72 s: f = -0.273146563392, ‖∇f‖ = 4.8587e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 50, time 169.01 s: f = -0.273149681682, ‖∇f‖ = 4.4858e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 51, time 170.32 s: f = -0.273153535758, ‖∇f‖ = 6.1631e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 52, time 171.63 s: f = -0.273156987689, ‖∇f‖ = 4.5642e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 53, time 172.93 s: f = -0.273159364143, ‖∇f‖ = 3.9352e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 54, time 174.22 s: f = -0.273162378681, ‖∇f‖ = 5.2448e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 55, time 176.18 s: f = -0.273164685489, ‖∇f‖ = 7.9447e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 56, time 177.46 s: f = -0.273167770852, ‖∇f‖ = 4.5867e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 57, time 178.77 s: f = -0.273171004811, ‖∇f‖ = 4.0036e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 58, time 180.07 s: f = -0.273172734685, ‖∇f‖ = 5.1587e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 59, time 181.38 s: f = -0.273175277923, ‖∇f‖ = 5.2136e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 60, time 182.69 s: f = -0.273178436887, ‖∇f‖ = 4.5043e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 61, time 184.02 s: f = -0.273181599401, ‖∇f‖ = 4.1926e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 62, time 186.03 s: f = -0.273184127264, ‖∇f‖ = 3.5435e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 63, time 187.31 s: f = -0.273186580584, ‖∇f‖ = 3.2519e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 64, time 188.61 s: f = -0.273189436738, ‖∇f‖ = 6.9448e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 65, time 189.90 s: f = -0.273192692504, ‖∇f‖ = 4.6825e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 66, time 191.20 s: f = -0.273196715211, ‖∇f‖ = 4.7511e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 67, time 192.50 s: f = -0.273198196827, ‖∇f‖ = 5.4294e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 68, time 193.79 s: f = -0.273199435966, ‖∇f‖ = 2.8645e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 69, time 195.71 s: f = -0.273200799932, ‖∇f‖ = 2.4252e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 70, time 196.99 s: f = -0.273202184331, ‖∇f‖ = 3.0503e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 71, time 198.30 s: f = -0.273203318657, ‖∇f‖ = 7.2710e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 72, time 199.59 s: f = -0.273204976120, ‖∇f‖ = 2.8153e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 73, time 200.88 s: f = -0.273205613161, ‖∇f‖ = 2.0563e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 74, time 202.15 s: f = -0.273206541752, ‖∇f‖ = 2.6401e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 75, time 203.45 s: f = -0.273207825994, ‖∇f‖ = 3.3947e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 76, time 205.42 s: f = -0.273210784096, ‖∇f‖ = 5.5166e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 77, time 206.71 s: f = -0.273212703606, ‖∇f‖ = 5.9417e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 78, time 207.99 s: f = -0.273214840394, ‖∇f‖ = 2.5444e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 79, time 209.28 s: f = -0.273216186725, ‖∇f‖ = 2.5210e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 80, time 210.57 s: f = -0.273217132240, ‖∇f‖ = 2.9834e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 81, time 211.88 s: f = -0.273217860371, ‖∇f‖ = 8.6736e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 82, time 213.17 s: f = -0.273219978798, ‖∇f‖ = 2.8197e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 83, time 215.10 s: f = -0.273220887198, ‖∇f‖ = 1.4861e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 84, time 216.41 s: f = -0.273221346093, ‖∇f‖ = 1.9427e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 85, time 217.68 s: f = -0.273221865528, ‖∇f‖ = 1.7524e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 86, time 218.95 s: f = -0.273222181741, ‖∇f‖ = 5.3066e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 87, time 220.24 s: f = -0.273223246562, ‖∇f‖ = 1.9685e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 88, time 221.54 s: f = -0.273223705610, ‖∇f‖ = 2.3045e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 89, time 223.47 s: f = -0.273224556828, ‖∇f‖ = 2.5083e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 90, time 224.80 s: f = -0.273225646272, ‖∇f‖ = 4.2989e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 91, time 226.09 s: f = -0.273227256373, ‖∇f‖ = 2.7322e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 92, time 227.40 s: f = -0.273229828316, ‖∇f‖ = 2.2841e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 93, time 228.86 s: f = -0.273231704181, ‖∇f‖ = 2.4489e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 94, time 232.19 s: f = -0.273232179586, ‖∇f‖ = 2.5292e-03, α = 3.61e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 95, time 233.47 s: f = -0.273232651417, ‖∇f‖ = 1.6879e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 96, time 234.79 s: f = -0.273233247066, ‖∇f‖ = 1.8610e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 97, time 236.09 s: f = -0.273233724645, ‖∇f‖ = 2.3320e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 98, time 237.39 s: f = -0.273234496326, ‖∇f‖ = 2.1070e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 99, time 238.70 s: f = -0.273234942243, ‖∇f‖ = 4.3229e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 100, time 239.98 s: f = -0.273235872899, ‖∇f‖ = 1.0227e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 101, time 241.92 s: f = -0.273236083478, ‖∇f‖ = 8.8617e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 102, time 243.21 s: f = -0.273236502150, ‖∇f‖ = 1.2113e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 103, time 245.84 s: f = -0.273236852006, ‖∇f‖ = 2.2250e-03, α = 5.40e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 104, time 247.13 s: f = -0.273237309095, ‖∇f‖ = 1.5651e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 105, time 248.47 s: f = -0.273237826712, ‖∇f‖ = 1.7300e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 106, time 249.76 s: f = -0.273238151589, ‖∇f‖ = 1.4739e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 107, time 251.70 s: f = -0.273238452194, ‖∇f‖ = 1.3132e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 108, time 253.01 s: f = -0.273239083045, ‖∇f‖ = 3.6339e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 109, time 254.30 s: f = -0.273239925488, ‖∇f‖ = 1.6856e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 110, time 255.60 s: f = -0.273240465522, ‖∇f‖ = 1.3613e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 111, time 256.90 s: f = -0.273240934835, ‖∇f‖ = 2.3524e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 112, time 258.22 s: f = -0.273241253954, ‖∇f‖ = 2.3895e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 113, time 259.55 s: f = -0.273241593627, ‖∇f‖ = 1.3301e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 114, time 261.55 s: f = -0.273242108811, ‖∇f‖ = 1.2847e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 115, time 262.86 s: f = -0.273242449543, ‖∇f‖ = 1.3579e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 116, time 265.50 s: f = -0.273242675076, ‖∇f‖ = 2.3470e-03, α = 3.57e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 117, time 266.81 s: f = -0.273243104527, ‖∇f‖ = 1.2979e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 118, time 268.13 s: f = -0.273243436953, ‖∇f‖ = 1.2233e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 119, time 269.48 s: f = -0.273243761256, ‖∇f‖ = 1.6044e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 120, time 271.45 s: f = -0.273244062582, ‖∇f‖ = 1.7999e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 121, time 272.74 s: f = -0.273244428575, ‖∇f‖ = 1.3779e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 122, time 274.04 s: f = -0.273244941087, ‖∇f‖ = 1.6881e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 123, time 275.34 s: f = -0.273245490453, ‖∇f‖ = 1.8823e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 124, time 276.64 s: f = -0.273246014128, ‖∇f‖ = 1.3348e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 125, time 277.96 s: f = -0.273246415220, ‖∇f‖ = 1.6797e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 126, time 279.27 s: f = -0.273246886558, ‖∇f‖ = 1.9101e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 127, time 281.26 s: f = -0.273247578331, ‖∇f‖ = 2.6783e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 128, time 282.56 s: f = -0.273248596780, ‖∇f‖ = 4.2726e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 129, time 283.87 s: f = -0.273249248580, ‖∇f‖ = 3.4266e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 130, time 285.18 s: f = -0.273249798264, ‖∇f‖ = 1.3846e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 131, time 286.50 s: f = -0.273250091726, ‖∇f‖ = 1.3050e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 132, time 287.81 s: f = -0.273250298144, ‖∇f‖ = 1.7451e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 133, time 289.13 s: f = -0.273250674484, ‖∇f‖ = 1.8764e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 134, time 291.11 s: f = -0.273250849981, ‖∇f‖ = 2.5432e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 135, time 292.38 s: f = -0.273251094386, ‖∇f‖ = 1.0169e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 136, time 293.67 s: f = -0.273251250424, ‖∇f‖ = 1.1018e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 137, time 294.99 s: f = -0.273251472616, ‖∇f‖ = 1.7175e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 138, time 296.32 s: f = -0.273251802341, ‖∇f‖ = 1.9190e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 139, time 298.97 s: f = -0.273251940669, ‖∇f‖ = 2.5923e-03, α = 2.54e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 140, time 300.94 s: f = -0.273252255136, ‖∇f‖ = 1.6162e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 141, time 302.31 s: f = -0.273252593676, ‖∇f‖ = 9.5803e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 142, time 303.66 s: f = -0.273252841099, ‖∇f‖ = 1.5506e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 143, time 305.01 s: f = -0.273253128531, ‖∇f‖ = 2.2830e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 144, time 306.32 s: f = -0.273253470875, ‖∇f‖ = 1.3732e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 145, time 307.66 s: f = -0.273253787952, ‖∇f‖ = 1.4764e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 146, time 308.97 s: f = -0.273254080621, ‖∇f‖ = 1.9509e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 147, time 310.97 s: f = -0.273254306475, ‖∇f‖ = 1.9010e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 148, time 312.30 s: f = -0.273255277035, ‖∇f‖ = 2.1723e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 149, time 313.65 s: f = -0.273255976775, ‖∇f‖ = 2.3105e-03, α = 1.00e+00, m = 20, nfg = 1 +┌ Warning: LBFGS: not converged to requested tol after 150 iterations and time 314.98 s: f = -0.273256484758, ‖∇f‖ = 1.2498e-03 └ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/lbfgs.jl:197 -E = -0.2732654819685406 +E = -0.27325648475803166 ```` @@ -800,7 +314,7 @@ E_ref = -0.273284888 ```` ```` -(E - E_ref) / E_ref = -7.101026186047375e-5 +(E - E_ref) / E_ref = -0.00010393272081822697 ```` diff --git a/docs/src/examples/3.bose_hubbard/main.ipynb b/docs/src/examples/3.bose_hubbard/main.ipynb index 9cb555b2d..2b703735d 100644 --- a/docs/src/examples/3.bose_hubbard/main.ipynb +++ b/docs/src/examples/3.bose_hubbard/main.ipynb @@ -4,7 +4,7 @@ "outputs": [], "cell_type": "code", "source": [ - "using Markdown" + "using Markdown #hide" ], "metadata": {}, "execution_count": null @@ -154,9 +154,9 @@ "outputs": [], "cell_type": "code", "source": [ - "boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace))\n", + "boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace))\n", "gradient_alg = (; tol=1e-6, maxiter=10, alg=:eigsolver, iterscheme=:diffgauge)\n", - "optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=200, ls_maxiter=2, ls_maxfg=2);" + "optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=150, ls_maxiter=2, ls_maxfg=2);" ], "metadata": {}, "execution_count": null @@ -204,7 +204,9 @@ "outputs": [], "cell_type": "code", "source": [ - "peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg)\n", + "peps, env, E, info = fixedpoint(\n", + " H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3\n", + ")\n", "@show E;" ], "metadata": {}, diff --git a/docs/src/examples/4.xxz/index.md b/docs/src/examples/4.xxz/index.md index 203ddd550..a65efe7c0 100644 --- a/docs/src/examples/4.xxz/index.md +++ b/docs/src/examples/4.xxz/index.md @@ -6,11 +6,8 @@ EditURL = "../../../../examples/4.xxz/main.jl" [![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//4.xxz/main.ipynb) [![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//4.xxz) -````julia -using Markdown -```` -# Néel order in the U(1)-symmetric XXZ model +# Néel order in the $U(1)$-symmetric XXZ model Here, we want to look at a special case of the Heisenberg model, where the $x$ and $y$ couplings are equal, called the XXZ model @@ -76,9 +73,9 @@ physical_spaces = H.lattice ```` ```` -2×2 Matrix{TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}}: - Rep[TensorKitSectors.U₁](0=>1, -1=>1) Rep[TensorKitSectors.U₁](0=>1, 1=>1) - Rep[TensorKitSectors.U₁](0=>1, 1=>1) Rep[TensorKitSectors.U₁](0=>1, -1=>1) +2×2 Matrix{GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}}: + Rep[U₁](0=>1, -1=>1) Rep[U₁](0=>1, 1=>1) + Rep[U₁](0=>1, 1=>1) Rep[U₁](0=>1, -1=>1) ```` ## Ground state search @@ -87,9 +84,9 @@ From this point onwards it's business as usual: Create an initial PEPS and envir (using the symmetric spaces), specify the algorithmic parameters and optimize: ````julia -boundary_alg = (; tol=1e-8, alg=:simultaneous, verbosity=2, trscheme=(; alg=:fixedspace)) +boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace)) gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge) -optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2) +optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=85, ls_maxiter=3, ls_maxfg=3) peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); @@ -97,7 +94,7 @@ env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); ```` [ Info: CTMRG init: obj = -1.121020187593e+04 -6.991066478500e+03im err = 1.0000e+00 -[ Info: CTMRG conv 26: obj = +6.369731502336e+03 -8.500319381710e-08im err = 7.5599921139e-09 time = 0.97 sec +[ Info: CTMRG conv 26: obj = +6.369731502336e+03 -8.500319381710e-08im err = 7.5599921139e-09 time = 2.09 sec ```` @@ -107,481 +104,123 @@ because symmetric tensors do create a bit of overhead (which does pay off at lar and environment dimensions): ````julia -peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg) +peps, env, E, info = fixedpoint( + H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3 +) @show E; ```` ```` -[ Info: CTMRG init: obj = +2.434421528081e-05 err = 1.0000e+00 -[ Info: CTMRG conv 4: obj = +2.434421528088e-05 err = 4.5912943585e-10 time = 0.18 sec [ Info: LBFGS: initializing with f = -0.033045967451, ‖∇f‖ = 3.2973e-01 -┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Float64}`; +┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Float64}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 -[ Info: CTMRG init: obj = +2.453223895159e-05 err = 1.0000e+00 -[ Info: CTMRG conv 19: obj = +2.453720354328e-05 err = 5.3853880385e-09 time = 0.70 sec -[ Info: CTMRG init: obj = +2.536991372204e-05 err = 1.0000e+00 -[ Info: CTMRG conv 21: obj = +2.551399135525e-05 err = 5.7602811253e-09 time = 1.01 sec -[ Info: CTMRG init: obj = +3.190392580620e-05 err = 1.0000e+00 -[ Info: CTMRG conv 23: obj = +3.871282989002e-05 err = 2.3099743648e-09 time = 0.80 sec -[ Info: CTMRG init: obj = +1.997307247185e-04 +1.744054390924e-14im err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +2.397713225168e-03 err = 8.6119116463e-09 time = 0.59 sec ┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: │ α = 2.50e+01, dϕ = -9.83e-03, ϕ - ϕ₀ = -1.52e-01 └ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 1, time 173.47 s: f = -0.185441286972, ‖∇f‖ = 1.8487e+00, α = 2.50e+01, m = 0, nfg = 4 -┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; +[ Info: LBFGS: iter 1, time 81.96 s: f = -0.185441286972, ‖∇f‖ = 1.8487e+00, α = 2.50e+01, m = 0, nfg = 4 +┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 -[ Info: CTMRG init: obj = +4.060460706144e-05 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +4.073280032714e-05 err = 8.7858583593e-09 time = 0.72 sec -[ Info: CTMRG init: obj = +4.950177698074e-05 err = 1.0000e+00 -[ Info: CTMRG conv 24: obj = +5.405071831250e-05 err = 4.1362491224e-09 time = 0.87 sec -[ Info: CTMRG init: obj = +1.459089235128e-04 err = 1.0000e+00 -[ Info: CTMRG conv 13: obj = +3.628610875102e-04 err = 7.1545714198e-09 time = 0.50 sec -[ Info: CTMRG init: obj = +1.067948187035e-02 err = 1.0000e+00 -[ Info: CTMRG conv 10: obj = +3.300787404705e-02 err = 2.7551053256e-09 time = 0.38 sec ┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: │ α = 2.50e+01, dϕ = -1.83e-03, ϕ - ϕ₀ = -3.94e-01 └ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 2, time 219.43 s: f = -0.579296056587, ‖∇f‖ = 5.7534e-01, α = 2.50e+01, m = 0, nfg = 4 -[ Info: CTMRG init: obj = +5.216577372581e-04 err = 1.0000e+00 -[ Info: CTMRG conv 12: obj = +5.262193467872e-04 err = 2.3063817877e-09 time = 0.43 sec -[ Info: LBFGS: iter 3, time 225.57 s: f = -0.613492668655, ‖∇f‖ = 3.3905e-01, α = 1.00e+00, m = 1, nfg = 1 -[ Info: CTMRG init: obj = +5.712313609937e-04 err = 1.0000e+00 -[ Info: CTMRG conv 12: obj = +5.762503340314e-04 err = 1.2560009849e-09 time = 0.44 sec -[ Info: LBFGS: iter 4, time 231.66 s: f = -0.638698278101, ‖∇f‖ = 2.2127e-01, α = 1.00e+00, m = 2, nfg = 1 -[ Info: CTMRG init: obj = +6.503993965962e-04 err = 1.0000e+00 -[ Info: CTMRG conv 12: obj = +6.672622988324e-04 err = 1.2420966253e-09 time = 0.42 sec -[ Info: LBFGS: iter 5, time 237.33 s: f = -0.650278206280, ‖∇f‖ = 1.9661e-01, α = 1.00e+00, m = 3, nfg = 1 -[ Info: CTMRG init: obj = +7.095032316279e-04 err = 1.0000e+00 -[ Info: CTMRG conv 11: obj = +7.107783954017e-04 err = 6.2073791690e-09 time = 0.40 sec -[ Info: LBFGS: iter 6, time 243.08 s: f = -0.654875781442, ‖∇f‖ = 7.1166e-02, α = 1.00e+00, m = 4, nfg = 1 -[ Info: CTMRG init: obj = +7.678769240767e-04 err = 1.0000e+00 -[ Info: CTMRG conv 11: obj = +7.677598689487e-04 err = 2.8083589443e-09 time = 0.42 sec -[ Info: LBFGS: iter 7, time 248.84 s: f = -0.656067729644, ‖∇f‖ = 5.1946e-02, α = 1.00e+00, m = 5, nfg = 1 -[ Info: CTMRG init: obj = +1.047392070849e-03 err = 1.0000e+00 -[ Info: CTMRG conv 11: obj = +1.045750152055e-03 err = 3.4449671849e-09 time = 0.42 sec -[ Info: LBFGS: iter 8, time 254.59 s: f = -0.659056547972, ‖∇f‖ = 5.4114e-02, α = 1.00e+00, m = 6, nfg = 1 -[ Info: CTMRG init: obj = +1.532812857985e-03 err = 1.0000e+00 -[ Info: CTMRG conv 11: obj = +1.525097438199e-03 err = 2.4326768610e-09 time = 0.38 sec -[ Info: LBFGS: iter 9, time 259.75 s: f = -0.660492187403, ‖∇f‖ = 1.0001e-01, α = 1.00e+00, m = 7, nfg = 1 -[ Info: CTMRG init: obj = +1.795787577321e-03 err = 1.0000e+00 -[ Info: CTMRG conv 10: obj = +1.794727275308e-03 err = 2.9197329251e-09 time = 0.36 sec -[ Info: LBFGS: iter 10, time 265.12 s: f = -0.662131899972, ‖∇f‖ = 3.0720e-02, α = 1.00e+00, m = 8, nfg = 1 -[ Info: CTMRG init: obj = +1.996305356333e-03 err = 1.0000e+00 -[ Info: CTMRG conv 10: obj = +1.995481173538e-03 err = 1.5914652201e-09 time = 0.37 sec -[ Info: LBFGS: iter 11, time 270.19 s: f = -0.662491636970, ‖∇f‖ = 2.1327e-02, α = 1.00e+00, m = 9, nfg = 1 -[ Info: CTMRG init: obj = +2.243383437860e-03 err = 1.0000e+00 -[ Info: CTMRG conv 10: obj = +2.242179147938e-03 err = 1.3840632855e-09 time = 0.37 sec -[ Info: LBFGS: iter 12, time 275.22 s: f = -0.662815874554, ‖∇f‖ = 2.0939e-02, α = 1.00e+00, m = 10, nfg = 1 -[ Info: CTMRG init: obj = +2.529321906303e-03 err = 1.0000e+00 -[ Info: CTMRG conv 10: obj = +2.527958437132e-03 err = 1.3943320526e-09 time = 0.38 sec -[ Info: LBFGS: iter 13, time 280.65 s: f = -0.663206295533, ‖∇f‖ = 2.3137e-02, α = 1.00e+00, m = 11, nfg = 1 -[ Info: CTMRG init: obj = +2.905364340563e-03 err = 1.0000e+00 -[ Info: CTMRG conv 10: obj = +2.902988231101e-03 err = 2.0819309387e-09 time = 0.39 sec -[ Info: LBFGS: iter 14, time 286.03 s: f = -0.663617412480, ‖∇f‖ = 3.2148e-02, α = 1.00e+00, m = 12, nfg = 1 -[ Info: CTMRG init: obj = +2.904272464292e-03 err = 1.0000e+00 -[ Info: CTMRG conv 10: obj = +2.905132091807e-03 err = 1.9716972635e-09 time = 0.39 sec -[ Info: LBFGS: iter 15, time 291.13 s: f = -0.663981399612, ‖∇f‖ = 2.1162e-02, α = 1.00e+00, m = 13, nfg = 1 -[ Info: CTMRG init: obj = +2.742432815679e-03 err = 1.0000e+00 -[ Info: CTMRG conv 11: obj = +2.745820290756e-03 err = 1.5265448213e-09 time = 0.38 sec -[ Info: LBFGS: iter 16, time 296.57 s: f = -0.664500170184, ‖∇f‖ = 3.0047e-02, α = 1.00e+00, m = 14, nfg = 1 -[ Info: CTMRG init: obj = +2.401849189969e-03 err = 1.0000e+00 -[ Info: CTMRG conv 12: obj = +2.405656778850e-03 err = 2.5894583460e-09 time = 0.46 sec -[ Info: LBFGS: iter 17, time 301.86 s: f = -0.665018204774, ‖∇f‖ = 3.4052e-02, α = 1.00e+00, m = 15, nfg = 1 -[ Info: CTMRG init: obj = +2.122203005349e-03 err = 1.0000e+00 -[ Info: CTMRG conv 12: obj = +2.121928393701e-03 err = 9.5870670882e-09 time = 0.44 sec -[ Info: LBFGS: iter 18, time 307.57 s: f = -0.665352132477, ‖∇f‖ = 4.0506e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: CTMRG init: obj = +2.072289083756e-03 err = 1.0000e+00 -[ Info: CTMRG conv 12: obj = +2.072594745594e-03 err = 4.5258473845e-09 time = 0.43 sec -[ Info: LBFGS: iter 19, time 313.22 s: f = -0.665708949595, ‖∇f‖ = 1.8115e-02, α = 1.00e+00, m = 17, nfg = 1 -[ Info: CTMRG init: obj = +2.162982716617e-03 err = 1.0000e+00 -[ Info: CTMRG conv 11: obj = +2.163052122686e-03 err = 5.9164202930e-09 time = 0.38 sec -[ Info: LBFGS: iter 20, time 319.05 s: f = -0.665851319983, ‖∇f‖ = 1.7887e-02, α = 1.00e+00, m = 18, nfg = 1 -[ Info: CTMRG init: obj = +2.220648043164e-03 err = 1.0000e+00 -[ Info: CTMRG conv 12: obj = +2.221583997885e-03 err = 5.4700111805e-09 time = 0.43 sec -[ Info: LBFGS: iter 21, time 324.88 s: f = -0.666077676932, ‖∇f‖ = 2.1504e-02, α = 1.00e+00, m = 19, nfg = 1 -[ Info: CTMRG init: obj = +2.452606638527e-03 err = 1.0000e+00 -[ Info: CTMRG conv 13: obj = +2.457433179381e-03 err = 7.8365492645e-09 time = 0.49 sec -[ Info: LBFGS: iter 22, time 330.78 s: f = -0.666415750625, ‖∇f‖ = 2.1742e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +2.618995877418e-03 err = 1.0000e+00 -[ Info: CTMRG conv 12: obj = +2.627247025253e-03 err = 5.4628097961e-09 time = 0.43 sec -[ Info: CTMRG init: obj = +2.517366578177e-03 err = 1.0000e+00 -[ Info: CTMRG conv 11: obj = +2.518273673784e-03 err = 8.0918301167e-09 time = 0.39 sec -[ Info: LBFGS: iter 23, time 342.43 s: f = -0.666535417444, ‖∇f‖ = 2.1053e-02, α = 3.37e-01, m = 20, nfg = 2 -[ Info: CTMRG init: obj = +2.575130612824e-03 err = 1.0000e+00 -[ Info: CTMRG conv 12: obj = +2.575296959997e-03 err = 5.8864311994e-09 time = 0.43 sec -[ Info: LBFGS: iter 24, time 348.22 s: f = -0.666677914685, ‖∇f‖ = 1.4107e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +2.640725585692e-03 err = 1.0000e+00 -[ Info: CTMRG conv 14: obj = +2.643147349459e-03 err = 2.1654459528e-09 time = 0.51 sec -[ Info: LBFGS: iter 25, time 354.02 s: f = -0.666880717597, ‖∇f‖ = 1.5936e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +2.677813236881e-03 err = 1.0000e+00 -[ Info: CTMRG conv 13: obj = +2.677409654697e-03 err = 7.1910371417e-09 time = 0.48 sec -[ Info: LBFGS: iter 26, time 359.89 s: f = -0.667020492218, ‖∇f‖ = 2.1705e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +2.714827500016e-03 err = 1.0000e+00 -[ Info: CTMRG conv 14: obj = +2.715087100998e-03 err = 3.4660002553e-09 time = 0.52 sec -[ Info: LBFGS: iter 27, time 365.73 s: f = -0.667174861341, ‖∇f‖ = 1.3538e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +2.870936188843e-03 err = 1.0000e+00 -[ Info: CTMRG conv 13: obj = +2.871152272950e-03 err = 4.4859828582e-09 time = 0.49 sec -[ Info: LBFGS: iter 28, time 371.84 s: f = -0.667242799138, ‖∇f‖ = 1.3749e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +2.894454117569e-03 err = 1.0000e+00 -[ Info: CTMRG conv 13: obj = +2.894497874679e-03 err = 2.8815190399e-09 time = 0.51 sec -[ Info: LBFGS: iter 29, time 377.75 s: f = -0.667289201830, ‖∇f‖ = 9.6270e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +2.992675491930e-03 err = 1.0000e+00 -[ Info: CTMRG conv 13: obj = +2.992923140174e-03 err = 5.1513256196e-09 time = 0.48 sec -[ Info: LBFGS: iter 30, time 383.74 s: f = -0.667382804207, ‖∇f‖ = 1.1004e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +3.166823421024e-03 err = 1.0000e+00 -[ Info: CTMRG conv 14: obj = +3.168045231564e-03 err = 1.9426667949e-09 time = 0.52 sec -[ Info: LBFGS: iter 31, time 389.50 s: f = -0.667514031651, ‖∇f‖ = 1.5020e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +3.391726443493e-03 err = 1.0000e+00 -[ Info: CTMRG conv 14: obj = +3.393587165917e-03 err = 4.1266089130e-09 time = 0.49 sec -[ Info: LBFGS: iter 32, time 395.39 s: f = -0.667654012398, ‖∇f‖ = 1.6237e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +3.608251780050e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +3.612137047877e-03 err = 5.5508459619e-09 time = 0.55 sec -[ Info: LBFGS: iter 33, time 401.25 s: f = -0.667695159156, ‖∇f‖ = 2.0278e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +3.567945490801e-03 err = 1.0000e+00 -[ Info: CTMRG conv 14: obj = +3.568212239514e-03 err = 4.2558976934e-09 time = 0.51 sec -[ Info: LBFGS: iter 34, time 407.49 s: f = -0.667791548479, ‖∇f‖ = 7.2359e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +3.560786709647e-03 err = 1.0000e+00 -[ Info: CTMRG conv 13: obj = +3.560744298718e-03 err = 9.7700409998e-09 time = 0.49 sec -[ Info: LBFGS: iter 35, time 413.61 s: f = -0.667831622740, ‖∇f‖ = 7.0221e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +3.612058119712e-03 err = 1.0000e+00 -[ Info: CTMRG conv 14: obj = +3.612096455450e-03 err = 9.4956185538e-09 time = 0.50 sec -[ Info: LBFGS: iter 36, time 419.79 s: f = -0.667897197556, ‖∇f‖ = 1.0611e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +3.748694446268e-03 err = 1.0000e+00 -[ Info: CTMRG conv 14: obj = +3.749410253030e-03 err = 8.1837906634e-09 time = 0.53 sec -[ Info: LBFGS: iter 37, time 426.04 s: f = -0.667974329902, ‖∇f‖ = 1.3520e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +3.932731964018e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +3.934152642199e-03 err = 4.4759136527e-09 time = 0.58 sec -[ Info: LBFGS: iter 38, time 432.14 s: f = -0.668044978527, ‖∇f‖ = 8.1835e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.075036525220e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +4.075095185707e-03 err = 4.9388492576e-09 time = 0.54 sec -[ Info: LBFGS: iter 39, time 438.40 s: f = -0.668096641090, ‖∇f‖ = 5.8523e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.249636465901e-03 err = 1.0000e+00 -[ Info: CTMRG conv 14: obj = +4.250516433969e-03 err = 9.0111357740e-09 time = 0.55 sec -[ Info: LBFGS: iter 40, time 444.50 s: f = -0.668140633648, ‖∇f‖ = 8.7357e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.408266209899e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +4.408238818952e-03 err = 9.3231498401e-09 time = 0.54 sec -[ Info: LBFGS: iter 41, time 450.71 s: f = -0.668191141610, ‖∇f‖ = 1.0519e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.597894504232e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +4.598301067090e-03 err = 8.3891599548e-09 time = 0.60 sec -[ Info: LBFGS: iter 42, time 456.88 s: f = -0.668251028839, ‖∇f‖ = 9.9323e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.696678230485e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +4.697823025374e-03 err = 8.0248890527e-09 time = 0.57 sec -[ Info: LBFGS: iter 43, time 462.72 s: f = -0.668287406221, ‖∇f‖ = 8.1822e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.650711531624e-03 err = 1.0000e+00 -[ Info: CTMRG conv 14: obj = +4.650746519732e-03 err = 6.7135782228e-09 time = 0.47 sec -[ Info: LBFGS: iter 44, time 468.42 s: f = -0.668312220264, ‖∇f‖ = 4.9144e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.625470238204e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +4.625513939090e-03 err = 4.9755202754e-09 time = 0.54 sec -[ Info: LBFGS: iter 45, time 474.22 s: f = -0.668335763877, ‖∇f‖ = 5.4414e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.669165659738e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +4.669545010290e-03 err = 2.7865418046e-09 time = 0.56 sec -[ Info: LBFGS: iter 46, time 480.47 s: f = -0.668372098383, ‖∇f‖ = 6.8595e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +4.882117118241e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +4.884335131166e-03 err = 8.3333297223e-09 time = 0.59 sec -[ Info: LBFGS: iter 47, time 486.78 s: f = -0.668431605944, ‖∇f‖ = 8.8807e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +5.309290623370e-03 err = 1.0000e+00 -[ Info: CTMRG conv 17: obj = +5.316323973446e-03 err = 8.0212919448e-09 time = 0.62 sec -[ Info: CTMRG init: obj = +5.119887535680e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +5.121775455646e-03 err = 6.2134661508e-09 time = 0.57 sec -[ Info: LBFGS: iter 48, time 498.87 s: f = -0.668464682116, ‖∇f‖ = 8.2571e-03, α = 5.24e-01, m = 20, nfg = 2 -[ Info: CTMRG init: obj = +5.273402134894e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +5.273723968011e-03 err = 3.4080188496e-09 time = 0.55 sec -[ Info: LBFGS: iter 49, time 504.67 s: f = -0.668492867254, ‖∇f‖ = 4.3005e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +5.434996342170e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +5.435269932189e-03 err = 9.7185194815e-09 time = 0.52 sec -[ Info: LBFGS: iter 50, time 510.48 s: f = -0.668513727270, ‖∇f‖ = 3.9910e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +5.535741796887e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +5.535812124729e-03 err = 7.5597802907e-09 time = 0.55 sec -[ Info: LBFGS: iter 51, time 516.41 s: f = -0.668532155485, ‖∇f‖ = 4.9090e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +5.721601939015e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +5.722494303974e-03 err = 9.0525500416e-09 time = 0.56 sec -[ Info: LBFGS: iter 52, time 522.37 s: f = -0.668564505110, ‖∇f‖ = 7.4817e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +5.854170952025e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +5.855570255032e-03 err = 6.0643662779e-09 time = 0.58 sec -[ Info: LBFGS: iter 53, time 528.39 s: f = -0.668593093779, ‖∇f‖ = 5.7300e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +5.807157999050e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +5.807180207336e-03 err = 6.8718778031e-09 time = 0.57 sec -[ Info: LBFGS: iter 54, time 534.30 s: f = -0.668613013637, ‖∇f‖ = 4.0964e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +5.777684965760e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +5.778327844031e-03 err = 6.8696167870e-09 time = 0.53 sec -[ Info: LBFGS: iter 55, time 540.15 s: f = -0.668634613224, ‖∇f‖ = 4.2489e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +5.776704820114e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +5.777004562734e-03 err = 7.3944931153e-09 time = 0.56 sec -[ Info: LBFGS: iter 56, time 546.08 s: f = -0.668649481004, ‖∇f‖ = 4.5912e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +5.856675141670e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +5.857261938207e-03 err = 5.2072352127e-09 time = 0.58 sec -[ Info: LBFGS: iter 57, time 552.10 s: f = -0.668670198485, ‖∇f‖ = 3.8195e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +5.995689940197e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +5.996264576639e-03 err = 6.8920420466e-09 time = 0.59 sec -[ Info: LBFGS: iter 58, time 558.08 s: f = -0.668688448995, ‖∇f‖ = 3.4508e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.099733436549e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.099798555351e-03 err = 4.5817148903e-09 time = 0.56 sec -[ Info: LBFGS: iter 59, time 564.00 s: f = -0.668696405392, ‖∇f‖ = 5.8372e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.115965920909e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +6.116008207532e-03 err = 4.0996420107e-09 time = 0.56 sec -[ Info: LBFGS: iter 60, time 570.39 s: f = -0.668706977023, ‖∇f‖ = 3.5019e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.154049968178e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +6.154040328233e-03 err = 4.3393809493e-09 time = 0.55 sec -[ Info: LBFGS: iter 61, time 576.75 s: f = -0.668721369553, ‖∇f‖ = 2.8608e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.180409862959e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +6.180481649061e-03 err = 6.7759235085e-09 time = 0.56 sec -[ Info: LBFGS: iter 62, time 583.14 s: f = -0.668732770821, ‖∇f‖ = 3.0068e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.216422621938e-03 err = 1.0000e+00 -[ Info: CTMRG conv 17: obj = +6.216968359833e-03 err = 3.5461853049e-09 time = 0.65 sec -[ Info: LBFGS: iter 63, time 589.47 s: f = -0.668738498959, ‖∇f‖ = 7.3212e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.221199582857e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.221285221433e-03 err = 4.3169649076e-09 time = 0.58 sec -[ Info: LBFGS: iter 64, time 595.63 s: f = -0.668752996535, ‖∇f‖ = 3.0434e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.242137977852e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.242318533556e-03 err = 4.6010616214e-09 time = 0.62 sec -[ Info: LBFGS: iter 65, time 602.00 s: f = -0.668762694601, ‖∇f‖ = 1.9787e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.289082932438e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.289343235396e-03 err = 5.8175591078e-09 time = 0.63 sec -[ Info: LBFGS: iter 66, time 608.31 s: f = -0.668773371271, ‖∇f‖ = 2.8034e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.398675130868e-03 err = 1.0000e+00 -[ Info: CTMRG conv 17: obj = +6.398833095649e-03 err = 4.5926394812e-09 time = 0.63 sec -[ Info: LBFGS: iter 67, time 614.61 s: f = -0.668783730169, ‖∇f‖ = 4.4007e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.490371007286e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.490358021783e-03 err = 6.5723120435e-09 time = 0.59 sec -[ Info: LBFGS: iter 68, time 620.49 s: f = -0.668794471804, ‖∇f‖ = 2.4210e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.535126515606e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +6.535148940005e-03 err = 7.7202755813e-09 time = 0.51 sec -[ Info: LBFGS: iter 69, time 626.32 s: f = -0.668800925048, ‖∇f‖ = 1.7114e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.595058098376e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.595020144173e-03 err = 3.8463595010e-09 time = 0.57 sec -[ Info: LBFGS: iter 70, time 632.22 s: f = -0.668808484765, ‖∇f‖ = 2.5442e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.629079062355e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.629041212706e-03 err = 4.2289764196e-09 time = 0.56 sec -[ Info: LBFGS: iter 71, time 638.44 s: f = -0.668813882136, ‖∇f‖ = 3.7919e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.639171252265e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.639210497400e-03 err = 3.7366899617e-09 time = 0.59 sec -[ Info: LBFGS: iter 72, time 644.68 s: f = -0.668819791141, ‖∇f‖ = 2.1652e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.654973412141e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.655339377376e-03 err = 7.5374087983e-09 time = 0.61 sec -[ Info: LBFGS: iter 73, time 650.69 s: f = -0.668826145765, ‖∇f‖ = 1.9093e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.662806120898e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.662814498802e-03 err = 3.3848722633e-09 time = 0.60 sec -[ Info: LBFGS: iter 74, time 656.72 s: f = -0.668830491901, ‖∇f‖ = 2.4506e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.702717314521e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +6.702719872350e-03 err = 9.3358252520e-09 time = 0.56 sec -[ Info: LBFGS: iter 75, time 662.62 s: f = -0.668836964982, ‖∇f‖ = 2.6465e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.755435653801e-03 err = 1.0000e+00 -[ Info: CTMRG conv 17: obj = +6.755466254550e-03 err = 4.1759687247e-09 time = 0.63 sec -[ Info: CTMRG init: obj = +6.724498871765e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.724503911311e-03 err = 5.4391737468e-09 time = 0.63 sec -[ Info: LBFGS: iter 76, time 675.39 s: f = -0.668840404782, ‖∇f‖ = 3.1398e-03, α = 3.87e-01, m = 20, nfg = 2 -[ Info: CTMRG init: obj = +6.769517301888e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.769508414086e-03 err = 5.1735891627e-09 time = 0.59 sec -[ Info: LBFGS: iter 77, time 681.45 s: f = -0.668843872314, ‖∇f‖ = 3.1246e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.802028757627e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.802028595034e-03 err = 6.3599636500e-09 time = 0.60 sec -[ Info: LBFGS: iter 78, time 687.52 s: f = -0.668847211574, ‖∇f‖ = 2.4091e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.816904509594e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.816904040071e-03 err = 3.2048624166e-09 time = 0.60 sec -[ Info: LBFGS: iter 79, time 693.54 s: f = -0.668850327797, ‖∇f‖ = 2.0185e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.900461182865e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.900570345503e-03 err = 4.2595997369e-09 time = 0.65 sec -[ Info: LBFGS: iter 80, time 699.67 s: f = -0.668852132421, ‖∇f‖ = 4.1279e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: CTMRG init: obj = +6.912967976917e-03 err = 1.0000e+00 -[ Info: CTMRG conv 17: obj = +6.913007896384e-03 err = 6.0275386485e-09 time = 0.62 sec -[ Info: CTMRG init: obj = +6.910412300869e-03 err = 1.0000e+00 -[ Info: CTMRG conv 17: obj = +6.910433755449e-03 err = 4.3218398488e-09 time = 0.62 sec -[ Info: CTMRG init: obj = +6.901253491862e-03 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +6.901253321410e-03 err = 2.0427380336e-09 time = 0.52 sec -[ Info: LBFGS: iter 81, time 718.23 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 4.20e-02, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.72 sec -[ Info: CTMRG init: obj = +6.903715176268e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777121e-03 err = 4.0082178383e-09 time = 0.66 sec -[ Info: CTMRG init: obj = +6.904105837467e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486670e-03 err = 5.2863114192e-09 time = 0.59 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 82, time 737.05 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.76 sec -[ Info: CTMRG init: obj = +6.903715176279e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777131e-03 err = 4.0082185801e-09 time = 0.68 sec -[ Info: CTMRG init: obj = +6.904105837342e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486544e-03 err = 5.2863118416e-09 time = 0.58 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 83, time 756.63 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.71 sec -[ Info: CTMRG init: obj = +6.903715176288e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777140e-03 err = 4.0082195479e-09 time = 0.66 sec -[ Info: CTMRG init: obj = +6.904105837343e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486545e-03 err = 5.2863124904e-09 time = 0.61 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 84, time 776.38 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.74 sec -[ Info: CTMRG init: obj = +6.903715176298e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777150e-03 err = 4.0082209060e-09 time = 0.68 sec -[ Info: CTMRG init: obj = +6.904105837280e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486481e-03 err = 5.2863111416e-09 time = 0.58 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 85, time 796.20 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.74 sec -[ Info: CTMRG init: obj = +6.903715176296e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777149e-03 err = 4.0082189483e-09 time = 0.66 sec -[ Info: CTMRG init: obj = +6.904105837102e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486302e-03 err = 5.2863118722e-09 time = 0.60 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 86, time 816.05 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.74 sec -[ Info: CTMRG init: obj = +6.903715176290e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777143e-03 err = 4.0082193245e-09 time = 0.66 sec -[ Info: CTMRG init: obj = +6.904105837270e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486472e-03 err = 5.2863100503e-09 time = 0.58 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 87, time 835.56 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.71 sec -[ Info: CTMRG init: obj = +6.903715176296e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777148e-03 err = 4.0082200300e-09 time = 0.65 sec -[ Info: CTMRG init: obj = +6.904105837224e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486425e-03 err = 5.2863111525e-09 time = 0.57 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 88, time 854.74 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.72 sec -[ Info: CTMRG init: obj = +6.903715176315e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777166e-03 err = 4.0082194363e-09 time = 0.65 sec -[ Info: CTMRG init: obj = +6.904105837312e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486514e-03 err = 5.2863100478e-09 time = 0.57 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 89, time 874.42 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.69 sec -[ Info: CTMRG init: obj = +6.903715176263e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777116e-03 err = 4.0082172169e-09 time = 0.62 sec -[ Info: CTMRG init: obj = +6.904105837338e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486540e-03 err = 5.2863119129e-09 time = 0.58 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 90, time 893.28 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.75 sec -[ Info: CTMRG init: obj = +6.903715176276e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777129e-03 err = 4.0082175126e-09 time = 0.65 sec -[ Info: CTMRG init: obj = +6.904105837251e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486452e-03 err = 5.2863111569e-09 time = 0.58 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 91, time 913.14 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.77 sec -[ Info: CTMRG init: obj = +6.903715176272e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777125e-03 err = 4.0082181074e-09 time = 0.68 sec -[ Info: CTMRG init: obj = +6.904105837232e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486434e-03 err = 5.2863134906e-09 time = 0.58 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 92, time 933.21 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.73 sec -[ Info: CTMRG init: obj = +6.903715176283e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777136e-03 err = 4.0082201639e-09 time = 0.68 sec -[ Info: CTMRG init: obj = +6.904105837346e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486548e-03 err = 5.2863126347e-09 time = 0.58 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 93, time 952.50 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.72 sec -[ Info: CTMRG init: obj = +6.903715176277e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777130e-03 err = 4.0082177395e-09 time = 0.64 sec -[ Info: CTMRG init: obj = +6.904105837321e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486523e-03 err = 5.2863123948e-09 time = 0.60 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 94, time 972.36 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.78 sec -[ Info: CTMRG init: obj = +6.903715176301e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777153e-03 err = 4.0082202712e-09 time = 0.66 sec -[ Info: CTMRG init: obj = +6.904105837315e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486517e-03 err = 5.2863110108e-09 time = 0.60 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 95, time 992.67 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.73 sec -[ Info: CTMRG init: obj = +6.903715176310e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777162e-03 err = 4.0082201146e-09 time = 0.65 sec -[ Info: CTMRG init: obj = +6.904105837264e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486466e-03 err = 5.2863115583e-09 time = 0.55 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 96, time 1012.35 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.74 sec -[ Info: CTMRG init: obj = +6.903715176248e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777101e-03 err = 4.0082187020e-09 time = 0.67 sec -[ Info: CTMRG init: obj = +6.904105837262e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486464e-03 err = 5.2863108791e-09 time = 0.56 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 97, time 1032.65 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.79 sec -[ Info: CTMRG init: obj = +6.903715176342e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777193e-03 err = 4.0082195840e-09 time = 0.68 sec -[ Info: CTMRG init: obj = +6.904105837350e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486552e-03 err = 5.2863133708e-09 time = 0.58 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 98, time 1052.51 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.77 sec -[ Info: CTMRG init: obj = +6.903715176276e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777128e-03 err = 4.0082194381e-09 time = 0.64 sec -[ Info: CTMRG init: obj = +6.904105837352e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486554e-03 err = 5.2863122797e-09 time = 0.56 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 99, time 1072.16 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -[ Info: CTMRG init: obj = +6.520833675208e-03 err = 1.0000e+00 -[ Info: CTMRG conv 20: obj = +6.527453546061e-03 err = 9.6395155728e-09 time = 0.78 sec -[ Info: CTMRG init: obj = +6.903715176277e-03 err = 1.0000e+00 -[ Info: CTMRG conv 18: obj = +6.903870777129e-03 err = 4.0082200112e-09 time = 0.70 sec -[ Info: CTMRG init: obj = +6.904105837289e-03 err = 1.0000e+00 -[ Info: CTMRG conv 16: obj = +6.904113486491e-03 err = 5.2863126525e-09 time = 0.60 sec -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -┌ Warning: LBFGS: not converged to requested tol after 100 iterations and time 1092.27 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02 +[ Info: LBFGS: iter 2, time 139.01 s: f = -0.579296056587, ‖∇f‖ = 5.7534e-01, α = 2.50e+01, m = 0, nfg = 4 +[ Info: LBFGS: iter 3, time 147.91 s: f = -0.613492668655, ‖∇f‖ = 3.3905e-01, α = 1.00e+00, m = 1, nfg = 1 +[ Info: LBFGS: iter 4, time 155.93 s: f = -0.638698278101, ‖∇f‖ = 2.2127e-01, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 5, time 164.77 s: f = -0.650278206280, ‖∇f‖ = 1.9661e-01, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 6, time 173.00 s: f = -0.654875781442, ‖∇f‖ = 7.1166e-02, α = 1.00e+00, m = 4, nfg = 1 +[ Info: LBFGS: iter 7, time 181.88 s: f = -0.656067729644, ‖∇f‖ = 5.1946e-02, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 8, time 190.01 s: f = -0.659056547972, ‖∇f‖ = 5.4114e-02, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 9, time 198.16 s: f = -0.660492187403, ‖∇f‖ = 1.0001e-01, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 10, time 205.43 s: f = -0.662131899972, ‖∇f‖ = 3.0720e-02, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 11, time 213.51 s: f = -0.662491636970, ‖∇f‖ = 2.1327e-02, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 12, time 220.80 s: f = -0.662815874554, ‖∇f‖ = 2.0939e-02, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 13, time 228.87 s: f = -0.663206295533, ‖∇f‖ = 2.3137e-02, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 14, time 236.16 s: f = -0.663617412480, ‖∇f‖ = 3.2148e-02, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 15, time 244.23 s: f = -0.663981399612, ‖∇f‖ = 2.1162e-02, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 16, time 251.62 s: f = -0.664500170184, ‖∇f‖ = 3.0047e-02, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 17, time 259.80 s: f = -0.665018204774, ‖∇f‖ = 3.4052e-02, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 18, time 267.91 s: f = -0.665352132477, ‖∇f‖ = 4.0506e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 19, time 276.74 s: f = -0.665708949595, ‖∇f‖ = 1.8115e-02, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 20, time 284.74 s: f = -0.665851319983, ‖∇f‖ = 1.7887e-02, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 21, time 293.66 s: f = -0.666077676932, ‖∇f‖ = 2.1504e-02, α = 1.00e+00, m = 19, nfg = 1 +[ Info: LBFGS: iter 22, time 301.95 s: f = -0.666415750625, ‖∇f‖ = 2.1742e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 23, time 319.57 s: f = -0.666535417444, ‖∇f‖ = 2.1053e-02, α = 3.37e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 24, time 328.83 s: f = -0.666677914685, ‖∇f‖ = 1.4107e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 25, time 337.42 s: f = -0.666880717597, ‖∇f‖ = 1.5936e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 26, time 346.84 s: f = -0.667020492218, ‖∇f‖ = 2.1705e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 27, time 355.47 s: f = -0.667174861341, ‖∇f‖ = 1.3538e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 28, time 364.80 s: f = -0.667242799138, ‖∇f‖ = 1.3749e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 29, time 373.39 s: f = -0.667289201830, ‖∇f‖ = 9.6270e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 30, time 382.70 s: f = -0.667382804207, ‖∇f‖ = 1.1004e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 31, time 391.35 s: f = -0.667514031651, ‖∇f‖ = 1.5020e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 32, time 400.73 s: f = -0.667654012398, ‖∇f‖ = 1.6237e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 33, time 409.44 s: f = -0.667695159156, ‖∇f‖ = 2.0278e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 34, time 418.69 s: f = -0.667791548479, ‖∇f‖ = 7.2359e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 35, time 427.10 s: f = -0.667831622740, ‖∇f‖ = 7.0221e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 36, time 436.35 s: f = -0.667897197556, ‖∇f‖ = 1.0611e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 37, time 444.91 s: f = -0.667974329902, ‖∇f‖ = 1.3520e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 38, time 454.41 s: f = -0.668044978527, ‖∇f‖ = 8.1835e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 39, time 463.08 s: f = -0.668096641090, ‖∇f‖ = 5.8523e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 40, time 474.36 s: f = -0.668140633648, ‖∇f‖ = 8.7357e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 41, time 485.42 s: f = -0.668191141610, ‖∇f‖ = 1.0519e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 42, time 497.24 s: f = -0.668251028839, ‖∇f‖ = 9.9323e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 43, time 508.60 s: f = -0.668287406221, ‖∇f‖ = 8.1822e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 44, time 520.51 s: f = -0.668312220264, ‖∇f‖ = 4.9144e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 45, time 531.38 s: f = -0.668335763877, ‖∇f‖ = 5.4414e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 46, time 540.97 s: f = -0.668372098383, ‖∇f‖ = 6.8595e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 47, time 549.63 s: f = -0.668431605944, ‖∇f‖ = 8.8807e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 48, time 567.86 s: f = -0.668464682116, ‖∇f‖ = 8.2571e-03, α = 5.24e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 49, time 577.42 s: f = -0.668492867254, ‖∇f‖ = 4.3005e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 50, time 586.10 s: f = -0.668513727270, ‖∇f‖ = 3.9910e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 51, time 595.51 s: f = -0.668532155485, ‖∇f‖ = 4.9090e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 52, time 604.13 s: f = -0.668564505110, ‖∇f‖ = 7.4817e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 53, time 613.65 s: f = -0.668593093779, ‖∇f‖ = 5.7300e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 54, time 622.26 s: f = -0.668613013637, ‖∇f‖ = 4.0964e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 55, time 631.67 s: f = -0.668634613224, ‖∇f‖ = 4.2489e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 56, time 640.31 s: f = -0.668649481004, ‖∇f‖ = 4.5912e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 57, time 650.03 s: f = -0.668670198485, ‖∇f‖ = 3.8195e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 58, time 658.82 s: f = -0.668688448995, ‖∇f‖ = 3.4508e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 59, time 668.38 s: f = -0.668696405392, ‖∇f‖ = 5.8372e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 60, time 677.09 s: f = -0.668706977023, ‖∇f‖ = 3.5019e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 61, time 686.54 s: f = -0.668721369553, ‖∇f‖ = 2.8608e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 62, time 695.13 s: f = -0.668732770821, ‖∇f‖ = 3.0068e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 63, time 704.62 s: f = -0.668738498959, ‖∇f‖ = 7.3212e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 64, time 713.61 s: f = -0.668752996535, ‖∇f‖ = 3.0434e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 65, time 723.01 s: f = -0.668762694601, ‖∇f‖ = 1.9787e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 66, time 731.88 s: f = -0.668773371271, ‖∇f‖ = 2.8034e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 67, time 741.54 s: f = -0.668783730169, ‖∇f‖ = 4.4007e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 68, time 750.34 s: f = -0.668794471804, ‖∇f‖ = 2.4210e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 69, time 759.94 s: f = -0.668800925048, ‖∇f‖ = 1.7114e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 70, time 768.74 s: f = -0.668808484765, ‖∇f‖ = 2.5442e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 71, time 778.43 s: f = -0.668813882136, ‖∇f‖ = 3.7919e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 72, time 787.17 s: f = -0.668819791141, ‖∇f‖ = 2.1652e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 73, time 796.73 s: f = -0.668826145765, ‖∇f‖ = 1.9093e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 74, time 805.39 s: f = -0.668830491901, ‖∇f‖ = 2.4506e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 75, time 814.87 s: f = -0.668836964982, ‖∇f‖ = 2.6465e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 76, time 833.41 s: f = -0.668840404782, ‖∇f‖ = 3.1398e-03, α = 3.87e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 77, time 842.18 s: f = -0.668843872314, ‖∇f‖ = 3.1246e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 78, time 851.69 s: f = -0.668847211574, ‖∇f‖ = 2.4091e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 79, time 860.43 s: f = -0.668850327797, ‖∇f‖ = 2.0185e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 80, time 870.17 s: f = -0.668852132421, ‖∇f‖ = 4.1279e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 81, time 897.81 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 4.20e-02, m = 20, nfg = 3 +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 82, time 926.31 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 83, time 954.24 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 84, time 983.38 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +┌ Warning: LBFGS: not converged to requested tol after 85 iterations and time 1011.99 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02 └ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/lbfgs.jl:197 E = -0.6688553292829834 diff --git a/docs/src/examples/4.xxz/main.ipynb b/docs/src/examples/4.xxz/main.ipynb index d2ea2d76a..7f6e66329 100644 --- a/docs/src/examples/4.xxz/main.ipynb +++ b/docs/src/examples/4.xxz/main.ipynb @@ -4,7 +4,7 @@ "outputs": [], "cell_type": "code", "source": [ - "using Markdown" + "using Markdown #hide" ], "metadata": {}, "execution_count": null @@ -12,7 +12,7 @@ { "cell_type": "markdown", "source": [ - "# Néel order in the U(1)-symmetric XXZ model\n", + "# Néel order in the $U(1)$-symmetric XXZ model\n", "\n", "Here, we want to look at a special case of the Heisenberg model, where the $x$ and $y$\n", "couplings are equal, called the XXZ model\n", @@ -130,7 +130,7 @@ "source": [ "boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace))\n", "gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge)\n", - "optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2)\n", + "optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=85, ls_maxiter=3, ls_maxfg=3)\n", "\n", "peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces)\n", "env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...);" @@ -152,7 +152,9 @@ "outputs": [], "cell_type": "code", "source": [ - "peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg)\n", + "peps, env, E, info = fixedpoint(\n", + " H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3\n", + ")\n", "@show E;" ], "metadata": {}, diff --git a/docs/src/examples/5.fermi_hubbard/index.md b/docs/src/examples/5.fermi_hubbard/index.md new file mode 100644 index 000000000..36ce36b3a --- /dev/null +++ b/docs/src/examples/5.fermi_hubbard/index.md @@ -0,0 +1,244 @@ +```@meta +EditURL = "../../../../examples/5.fermi_hubbard/main.jl" +``` + +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//5.fermi_hubbard/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//5.fermi_hubbard/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//5.fermi_hubbard) + + +# Fermi-Hubbard model with $f\mathbb{Z}_2 \boxtimes U(1)$ symmetry, at large $U$ and half-filling + +In this example, we will demonstrate how to handle fermionic PEPS tensors and how to +optimize them. To that end, we consider the two-dimensional Hubbard model + +```math +H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- + +c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i +``` + +where $\sigma \in \{\uparrow,\downarrow\}$ and $n_{i,\sigma} = c_{i,\sigma}^+ c_{i,\sigma}^-$ +is the fermionic number operator. As in previous examples, using fermionic degrees of freedom +is a matter of creating tensors with the right symmetry sectors - the rest of the simulation +workflow remains the same. + +First though, we make the example deterministic by seeding the RNG, and we make our imports: + +````julia +using Random +using TensorKit, PEPSKit +using MPSKit: add_physical_charge +Random.seed!(2928528937); +```` + +## Defining the fermionic Hamiltonian + +Let us start by fixing the parameters of the Hubbard model. We're going to use a hopping of +$t=1$ and a large $U=8$ on a $2 \times 2$ unit cell: + +````julia +t = 1.0 +U = 8.0 +lattice = InfiniteSquare(2, 2); +```` + +In order to create fermionic tensors, one needs to define symmetry sectors using TensorKit's +`FermionParity`. Not only do we want use fermion parity but we also want our +particles to exploit the global $U(1)$ symmetry. The combined product sector can be obtained +using the [Deligne product](https://jutho.github.io/TensorKit.jl/stable/lib/sectors/#TensorKitSectors.deligneproduct-Tuple{Sector,%20Sector}), +called through `⊠` which is obtained by typing `\boxtimes+TAB`. We will not impose any extra +spin symmetry, so we have: + +````julia +fermion = fℤ₂ +particle_symmetry = U1Irrep +spin_symmetry = Trivial +S = fermion ⊠ particle_symmetry +```` + +```` +ProductSector{Tuple{FermionParity, U1Irrep}} +```` + +The next step is defining graded virtual PEPS and environment spaces using `S`. Here we also +use the symmetry sector to impose half-filling. That is all we need to define the Hubbard +Hamiltonian: + +````julia +D, χ = 1, 1 +V_peps = Vect[S]((0, 0) => 2 * D, (1, 1) => D, (1, -1) => D) +V_env = Vect[S]( + (0, 0) => 4 * χ, (1, -1) => 2 * χ, (1, 1) => 2 * χ, (0, 2) => χ, (0, -2) => χ +) +S_aux = S((1, -1)) +H₀ = hubbard_model(ComplexF64, particle_symmetry, spin_symmetry, lattice; t, U) +H = add_physical_charge(H₀, fill(S_aux, size(H₀.lattice)...)); +```` + +## Finding the ground state + +Again, the procedure of ground state optimization is very similar to before. First, we +define all algorithmic parameters: + +````julia +boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace)) +gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge) +optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=80, ls_maxiter=3, ls_maxfg=3) +```` + +```` +(tol = 0.0001, alg = :lbfgs, maxiter = 80, ls_maxiter = 3, ls_maxfg = 3) +```` + +Second, we initialize a PEPS state and environment (which we converge) constructed from +symmetric physical and virtual spaces: + +````julia +physical_spaces = H.lattice +virtual_spaces = fill(V_peps, size(lattice)...) +peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) +env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); +```` + +```` +[ Info: CTMRG init: obj = +1.089691795517e+05 -1.031847476500e+05im err = 1.0000e+00 +[ Info: CTMRG conv 26: obj = +8.359116284442e+04 -2.209308149759e-07im err = 7.4963852327e-09 time = 1.72 sec + +```` + +And third, we start the ground state search (this does take quite long): + +````julia +peps, env, E, info = fixedpoint( + H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3 +) +@show E; +```` + +```` +[ Info: LBFGS: initializing with f = 6.680719803101, ‖∇f‖ = 9.5851e+00 +┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorMap{ComplexF64, GradedSpace{ProductSector{Tuple{FermionParity, U1Irrep}}, TensorKit.SortedVectorDict{ProductSector{Tuple{FermionParity, U1Irrep}}, Int64}}, 1, 4, Vector{ComplexF64}}}, Float64}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 +┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: +│ α = 2.50e+01, dϕ = -1.49e-01, ϕ - ϕ₀ = -2.88e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 1, time 71.29 s: f = 3.801336885086, ‖∇f‖ = 2.3457e+01, α = 2.50e+01, m = 0, nfg = 4 +┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorMap{ComplexF64, GradedSpace{ProductSector{Tuple{FermionParity, U1Irrep}}, TensorKit.SortedVectorDict{ProductSector{Tuple{FermionParity, U1Irrep}}, Int64}}, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, GradedSpace{ProductSector{Tuple{FermionParity, U1Irrep}}, TensorKit.SortedVectorDict{ProductSector{Tuple{FermionParity, U1Irrep}}, Int64}}, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 +┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: +│ α = 2.50e+01, dϕ = -5.73e-03, ϕ - ϕ₀ = -3.81e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 2, time 122.63 s: f = -0.009717029459, ‖∇f‖ = 3.2049e+00, α = 2.50e+01, m = 0, nfg = 4 +[ Info: LBFGS: iter 3, time 134.34 s: f = -0.115193722670, ‖∇f‖ = 2.7846e+00, α = 1.00e+00, m = 1, nfg = 1 +[ Info: LBFGS: iter 4, time 145.23 s: f = -0.616409716851, ‖∇f‖ = 2.3680e+00, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 5, time 156.06 s: f = -0.817798399433, ‖∇f‖ = 1.9112e+00, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 6, time 166.77 s: f = -0.990279759337, ‖∇f‖ = 2.3790e+00, α = 1.00e+00, m = 4, nfg = 1 +[ Info: LBFGS: iter 7, time 176.62 s: f = -1.142781186573, ‖∇f‖ = 1.5680e+00, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 8, time 185.65 s: f = -1.238252443477, ‖∇f‖ = 3.5020e+00, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 9, time 194.43 s: f = -1.438152734653, ‖∇f‖ = 1.3366e+00, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 10, time 204.31 s: f = -1.523106583487, ‖∇f‖ = 1.3495e+00, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 11, time 222.04 s: f = -1.619309135102, ‖∇f‖ = 1.1948e+00, α = 1.72e-01, m = 9, nfg = 2 +[ Info: LBFGS: iter 12, time 240.81 s: f = -1.681436596876, ‖∇f‖ = 9.4842e-01, α = 2.37e-01, m = 10, nfg = 2 +[ Info: LBFGS: iter 13, time 249.75 s: f = -1.720664496573, ‖∇f‖ = 1.4227e+00, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 14, time 258.70 s: f = -1.770786384177, ‖∇f‖ = 6.2727e-01, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 15, time 267.73 s: f = -1.807472303371, ‖∇f‖ = 5.1285e-01, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 16, time 277.56 s: f = -1.859749181748, ‖∇f‖ = 7.1361e-01, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 17, time 286.53 s: f = -1.893132087361, ‖∇f‖ = 6.7317e-01, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 18, time 295.80 s: f = -1.923092881224, ‖∇f‖ = 5.5354e-01, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 19, time 304.76 s: f = -1.948135813135, ‖∇f‖ = 4.7674e-01, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 20, time 314.57 s: f = -1.969521615479, ‖∇f‖ = 4.1602e-01, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 21, time 323.68 s: f = -1.982569425643, ‖∇f‖ = 4.5188e-01, α = 1.00e+00, m = 19, nfg = 1 +[ Info: LBFGS: iter 22, time 332.65 s: f = -1.994023077610, ‖∇f‖ = 3.1544e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 23, time 341.71 s: f = -2.002841830905, ‖∇f‖ = 3.0502e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 24, time 351.59 s: f = -2.014066310582, ‖∇f‖ = 3.3498e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 25, time 360.71 s: f = -2.022003043413, ‖∇f‖ = 4.3896e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 26, time 369.80 s: f = -2.030108717392, ‖∇f‖ = 2.0527e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 27, time 378.93 s: f = -2.035064147211, ‖∇f‖ = 1.6295e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 28, time 389.67 s: f = -2.038644470340, ‖∇f‖ = 1.6908e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 29, time 398.79 s: f = -2.041287690928, ‖∇f‖ = 2.4233e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 30, time 407.81 s: f = -2.044963035952, ‖∇f‖ = 1.2134e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 31, time 416.86 s: f = -2.046709236508, ‖∇f‖ = 9.5293e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 32, time 426.74 s: f = -2.048704733827, ‖∇f‖ = 1.0554e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 33, time 435.83 s: f = -2.049753805875, ‖∇f‖ = 1.7672e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 34, time 444.84 s: f = -2.051012660993, ‖∇f‖ = 6.4429e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 35, time 453.91 s: f = -2.051487370981, ‖∇f‖ = 4.8991e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 36, time 463.83 s: f = -2.051906999941, ‖∇f‖ = 6.2050e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 37, time 472.88 s: f = -2.052351426534, ‖∇f‖ = 9.2731e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 38, time 481.96 s: f = -2.052848312522, ‖∇f‖ = 4.8571e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 39, time 490.98 s: f = -2.053135862679, ‖∇f‖ = 3.5616e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 40, time 500.79 s: f = -2.053405789539, ‖∇f‖ = 4.2302e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 41, time 509.87 s: f = -2.053600753566, ‖∇f‖ = 5.7965e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 42, time 518.97 s: f = -2.053812280854, ‖∇f‖ = 3.2230e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 43, time 528.15 s: f = -2.054009907356, ‖∇f‖ = 3.1640e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 44, time 538.31 s: f = -2.054189837590, ‖∇f‖ = 4.1575e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 45, time 547.45 s: f = -2.054332733432, ‖∇f‖ = 6.9193e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 46, time 556.49 s: f = -2.054519400845, ‖∇f‖ = 2.9113e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 47, time 565.56 s: f = -2.054613033662, ‖∇f‖ = 2.5330e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 48, time 575.48 s: f = -2.054720913698, ‖∇f‖ = 3.1755e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 49, time 584.57 s: f = -2.054879195070, ‖∇f‖ = 3.4648e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 50, time 593.69 s: f = -2.054968252492, ‖∇f‖ = 8.4876e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 51, time 602.62 s: f = -2.055240579153, ‖∇f‖ = 3.1534e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 52, time 612.56 s: f = -2.055381107398, ‖∇f‖ = 2.5668e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 53, time 621.69 s: f = -2.055572782456, ‖∇f‖ = 3.8027e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 54, time 630.87 s: f = -2.055872532380, ‖∇f‖ = 4.6489e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 55, time 639.99 s: f = -2.056396587816, ‖∇f‖ = 8.8052e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 56, time 650.21 s: f = -2.056855859558, ‖∇f‖ = 8.3624e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 57, time 659.33 s: f = -2.057479262333, ‖∇f‖ = 4.4470e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 58, time 668.49 s: f = -2.057912152061, ‖∇f‖ = 5.9296e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 59, time 677.62 s: f = -2.058287008863, ‖∇f‖ = 6.0141e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 60, time 687.77 s: f = -2.058998497280, ‖∇f‖ = 6.2194e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 61, time 706.16 s: f = -2.059474789738, ‖∇f‖ = 1.0077e-01, α = 4.81e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 62, time 715.09 s: f = -2.060082192514, ‖∇f‖ = 6.8325e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 63, time 725.00 s: f = -2.060482721863, ‖∇f‖ = 7.3259e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 64, time 734.39 s: f = -2.060740013280, ‖∇f‖ = 9.5135e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 65, time 743.57 s: f = -2.061313322733, ‖∇f‖ = 7.1706e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 66, time 752.71 s: f = -2.061712546612, ‖∇f‖ = 5.4970e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 67, time 762.80 s: f = -2.062080105542, ‖∇f‖ = 5.4651e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 68, time 771.90 s: f = -2.062377423092, ‖∇f‖ = 7.0780e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 69, time 790.05 s: f = -2.062702057386, ‖∇f‖ = 9.7500e-02, α = 5.01e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 70, time 799.85 s: f = -2.063176089747, ‖∇f‖ = 7.1783e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 71, time 808.93 s: f = -2.063937979922, ‖∇f‖ = 8.8528e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 72, time 817.94 s: f = -2.064211612845, ‖∇f‖ = 8.9468e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 73, time 826.94 s: f = -2.064625801997, ‖∇f‖ = 8.5359e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 74, time 836.93 s: f = -2.065216197065, ‖∇f‖ = 8.9020e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 75, time 846.12 s: f = -2.065871494784, ‖∇f‖ = 1.0651e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 76, time 855.26 s: f = -2.066880037398, ‖∇f‖ = 1.4447e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 77, time 886.46 s: f = -2.067848102521, ‖∇f‖ = 2.0648e-01, α = 5.31e-01, m = 20, nfg = 3 +┌ Warning: Linesearch not converged after 2 iterations and 4 function evaluations: +│ α = 0.00e+00, dϕ = -9.88e-03, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 78, time 925.19 s: f = -2.067848102521, ‖∇f‖ = 2.0648e-01, α = 0.00e+00, m = 20, nfg = 4 +┌ Warning: Linesearch not converged after 2 iterations and 4 function evaluations: +│ α = 0.00e+00, dϕ = -9.88e-03, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 79, time 963.83 s: f = -2.067848102521, ‖∇f‖ = 2.0648e-01, α = 0.00e+00, m = 20, nfg = 4 +┌ Warning: Linesearch not converged after 2 iterations and 4 function evaluations: +│ α = 0.00e+00, dϕ = -9.88e-03, ϕ - ϕ₀ = 0.00e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +┌ Warning: LBFGS: not converged to requested tol after 80 iterations and time 1002.56 s: f = -2.067848102521, ‖∇f‖ = 2.0648e-01 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/lbfgs.jl:197 +E = -2.0678481025209448 + +```` + +Finally, let's compare the obtained energy against a reference energy from a QMC study by +[Qin et al.](@cite qin_benchmark_2016). With the parameters specified above, they obtain an +energy of $E_\text{ref} \approx 4 \times -0.5244140625 = -2.09765625$ (the factor 4 comes +from the $2 \times 2$ unit cell that we use here). Thus, we find: + +````julia +E_ref = -2.09765625 +@show (E - E_ref) / E_ref; +```` + +```` +(E - E_ref) / E_ref = -0.01421021555798537 + +```` + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/docs/src/examples/5.fermi_hubbard/main.ipynb b/docs/src/examples/5.fermi_hubbard/main.ipynb new file mode 100644 index 000000000..3feef894b --- /dev/null +++ b/docs/src/examples/5.fermi_hubbard/main.ipynb @@ -0,0 +1,221 @@ +{ + "cells": [ + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Markdown #hide" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "# Fermi-Hubbard model with $f\\mathbb{Z}_2 \\boxtimes U(1)$ symmetry, at large $U$ and half-filling\n", + "\n", + "In this example, we will demonstrate how to handle fermionic PEPS tensors and how to\n", + "optimize them. To that end, we consider the two-dimensional Hubbard model\n", + "\n", + "$$\n", + "H = -t \\sum_{\\langle i,j \\rangle} \\sum_{\\sigma} \\left( c_{i,\\sigma}^+ c_{j,\\sigma}^- +\n", + "c_{i,\\sigma}^- c_{j,\\sigma}^+ \\right) + U \\sum_i n_{i,\\uparrow}n_{i,\\downarrow} - \\mu \\sum_i n_i\n", + "$$\n", + "\n", + "where $\\sigma \\in \\{\\uparrow,\\downarrow\\}$ and $n_{i,\\sigma} = c_{i,\\sigma}^+ c_{i,\\sigma}^-$\n", + "is the fermionic number operator. As in previous examples, using fermionic degrees of freedom\n", + "is a matter of creating tensors with the right symmetry sectors - the rest of the simulation\n", + "workflow remains the same.\n", + "\n", + "First though, we make the example deterministic by seeding the RNG, and we make our imports:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Random\n", + "using TensorKit, PEPSKit\n", + "using MPSKit: add_physical_charge\n", + "Random.seed!(2928528937);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Defining the fermionic Hamiltonian\n", + "\n", + "Let us start by fixing the parameters of the Hubbard model. We're going to use a hopping of\n", + "$t=1$ and a large $U=8$ on a $2 \\times 2$ unit cell:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "t = 1.0\n", + "U = 8.0\n", + "lattice = InfiniteSquare(2, 2);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "In order to create fermionic tensors, one needs to define symmetry sectors using TensorKit's\n", + "`FermionParity`. Not only do we want use fermion parity but we also want our\n", + "particles to exploit the global $U(1)$ symmetry. The combined product sector can be obtained\n", + "using the [Deligne product](https://jutho.github.io/TensorKit.jl/stable/lib/sectors/#TensorKitSectors.deligneproduct-Tuple{Sector,%20Sector}),\n", + "called through `⊠` which is obtained by typing `\\boxtimes+TAB`. We will not impose any extra\n", + "spin symmetry, so we have:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "fermion = fℤ₂\n", + "particle_symmetry = U1Irrep\n", + "spin_symmetry = Trivial\n", + "S = fermion ⊠ particle_symmetry" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "The next step is defining graded virtual PEPS and environment spaces using `S`. Here we also\n", + "use the symmetry sector to impose half-filling. That is all we need to define the Hubbard\n", + "Hamiltonian:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "D, χ = 1, 1\n", + "V_peps = Vect[S]((0, 0) => 2 * D, (1, 1) => D, (1, -1) => D)\n", + "V_env = Vect[S](\n", + " (0, 0) => 4 * χ, (1, -1) => 2 * χ, (1, 1) => 2 * χ, (0, 2) => χ, (0, -2) => χ\n", + ")\n", + "S_aux = S((1, -1))\n", + "H₀ = hubbard_model(ComplexF64, particle_symmetry, spin_symmetry, lattice; t, U)\n", + "H = add_physical_charge(H₀, fill(S_aux, size(H₀.lattice)...));" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Finding the ground state\n", + "\n", + "Again, the procedure of ground state optimization is very similar to before. First, we\n", + "define all algorithmic parameters:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace))\n", + "gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge)\n", + "optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=80, ls_maxiter=3, ls_maxfg=3)" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Second, we initialize a PEPS state and environment (which we converge) constructed from\n", + "symmetric physical and virtual spaces:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "physical_spaces = H.lattice\n", + "virtual_spaces = fill(V_peps, size(lattice)...)\n", + "peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces)\n", + "env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "And third, we start the ground state search (this does take quite long):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "peps, env, E, info = fixedpoint(\n", + " H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3\n", + ")\n", + "@show E;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Finally, let's compare the obtained energy against a reference energy from a QMC study by\n", + "[Qin et al.](@cite qin_benchmark_2016). With the parameters specified above, they obtain an\n", + "energy of $E_\\text{ref} \\approx 4 \\times -0.5244140625 = -2.09765625$ (the factor 4 comes\n", + "from the $2 \\times 2$ unit cell that we use here). Thus, we find:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "E_ref = -2.09765625\n", + "@show (E - E_ref) / E_ref;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "---\n", + "\n", + "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" + ], + "metadata": {} + } + ], + "nbformat_minor": 3, + "metadata": { + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.11.4" + }, + "kernelspec": { + "name": "julia-1.11", + "display_name": "Julia 1.11.4", + "language": "julia" + } + }, + "nbformat": 4 +} diff --git a/docs/src/examples/6.hubbard_su/index.md b/docs/src/examples/6.hubbard_su/index.md new file mode 100644 index 000000000..07df66cfc --- /dev/null +++ b/docs/src/examples/6.hubbard_su/index.md @@ -0,0 +1,215 @@ +```@meta +EditURL = "../../../../examples/6.hubbard_su/main.jl" +``` + +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//6.hubbard_su/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//6.hubbard_su/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//6.hubbard_su) + + +# Hubbard model imaginary time evolution using simple update + +Once again, we consider the Hubbard model but this time we obtain the ground-state PEPS by +imaginary time evoluation. In particular, we'll use the [`SimpleUpdate`](@ref) algorithm. +As a reminder, we define the Hubbard model as + +```math +H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- + +c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i +``` + +with $\sigma \in \{\uparrow,\downarrow\}$ and $n_{i,\sigma} = c_{i,\sigma}^+ c_{i,\sigma}^-$. + +Let's get started by seeding the RNG and importing the required modules: + +````julia +using Random +using TensorKit, PEPSKit +Random.seed!(12329348592498); +```` + +## Defining the Hamiltonian + +First, we define the Hubbard model at $t=1$ hopping and $U=6$ using `Trivial` sectors for +the particle and spin symmetries, and set $\mu = U/2$ for half-filling. The model will be +constructed on a $2 \times 2$ unit cell, so we have: + +````julia +t = 1 +U = 6 +Nr, Nc = 2, 2 +H = hubbard_model(Float64, Trivial, Trivial, InfiniteSquare(Nr, Nc); t, U, mu=U / 2); +```` + +## Running the simple update algorithm + +Next, we'll specify the virtual PEPS bond dimension and define the fermionic physical and +virtual spaces. The simple update algorithm evolves an infinite PEPS with weights on the +virtual bonds, so we here need to intialize an [`InfiniteWeightPEPS`](@ref). By default, +the bond weights will be identity. Unlike in the other examples, we here use tensors with +real `Float64` entries: + +````julia +Dbond = 8 +physical_space = Vect[fℤ₂](0 => 2, 1 => 2) +virtual_space = Vect[fℤ₂](0 => Dbond / 2, 1 => Dbond / 2) +wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, virtual_space; unitcell=(Nr, Nc)); +```` + +Before starting the simple update routine, we normalize the vertex tensors of `wpeps` by +dividing with the maximal vertex element (using the infinity norm): + +````julia +for ind in CartesianIndices(wpeps.vertices) + wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf) +end +```` + +Let's set algorithm parameters: The plan is to successively decrease the time interval of +the Trotter-Suzuki as well as the convergence tolerance such that we obtain a more accurate +result at each iteration. To run the simple update, we call [`simpleupdate`](@ref) where we +use the keyword `bipartite=false` - meaning that we use the full $2 \times 2$ unit cell +without assuming a bipartite structure. Thus, we can start evolving: + +````julia +dts = [1e-2, 1e-3, 4e-4, 1e-4] +tols = [1e-6, 1e-8, 1e-8, 1e-8] +maxiter = 20000 + +for (n, (dt, tol)) in enumerate(zip(dts, tols)) + trscheme = truncerr(1e-10) & truncdim(Dbond) + alg = SimpleUpdate(dt, tol, maxiter, trscheme) + global wpeps, = simpleupdate(wpeps, H, alg; bipartite=false) +end +```` + +```` +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1 : dt = 1e-02, weight diff = 2.355e+00, time = 0.035 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 500 : dt = 1e-02, weight diff = 3.984e-04, time = 0.015 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1000 : dt = 1e-02, weight diff = 2.866e-06, time = 0.026 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU conv 1061 : dt = 1e-02, weight diff = 9.956e-07, time = 18.859 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1 : dt = 1e-03, weight diff = 6.070e-03, time = 0.026 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 500 : dt = 1e-03, weight diff = 1.874e-06, time = 0.026 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1000 : dt = 1e-03, weight diff = 6.437e-07, time = 0.025 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1500 : dt = 1e-03, weight diff = 2.591e-07, time = 0.025 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 2000 : dt = 1e-03, weight diff = 1.053e-07, time = 0.024 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 2500 : dt = 1e-03, weight diff = 4.280e-08, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 3000 : dt = 1e-03, weight diff = 1.741e-08, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU conv 3309 : dt = 1e-03, weight diff = 9.983e-09, time = 56.826 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1 : dt = 4e-04, weight diff = 4.030e-04, time = 0.013 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 500 : dt = 4e-04, weight diff = 1.776e-07, time = 0.025 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1000 : dt = 4e-04, weight diff = 7.091e-08, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1500 : dt = 4e-04, weight diff = 3.997e-08, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 2000 : dt = 4e-04, weight diff = 2.622e-08, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 2500 : dt = 4e-04, weight diff = 1.796e-08, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 3000 : dt = 4e-04, weight diff = 1.245e-08, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU conv 3303 : dt = 4e-04, weight diff = 9.997e-09, time = 55.910 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1 : dt = 1e-04, weight diff = 2.014e-04, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 500 : dt = 1e-04, weight diff = 5.664e-08, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1000 : dt = 1e-04, weight diff = 4.106e-08, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1500 : dt = 1e-04, weight diff = 3.033e-08, time = 0.025 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 2000 : dt = 1e-04, weight diff = 2.290e-08, time = 0.025 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 2500 : dt = 1e-04, weight diff = 1.773e-08, time = 0.013 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 3000 : dt = 1e-04, weight diff = 1.410e-08, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 3500 : dt = 1e-04, weight diff = 1.152e-08, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU conv 3893 : dt = 1e-04, weight diff = 9.997e-09, time = 66.184 sec + +```` + +To obtain the evolved `InfiniteWeightPEPS` as an actual PEPS without weights on the bonds, +we can just call the following constructor: + +````julia +peps = InfinitePEPS(wpeps); +```` + +## Computing the ground-state energy + +In order to compute the energy expectation value with evolved PEPS, we need to converge a +CTMRG environment on it. We first converge an environment with a small enviroment dimension +and then use that to initialize another run with bigger environment dimension. We'll use +`trscheme=truncdim(χ)` for that such that the dimension is increased during the second CTMRG +run: + +````julia +χenv₀, χenv = 6, 16 +env_space = Vect[fℤ₂](0 => χenv₀ / 2, 1 => χenv₀ / 2) + +env = CTMRGEnv(rand, Float64, peps, env_space) +for χ in [χenv₀, χenv] + global env, = leading_boundary( + env, peps; alg=:sequential, tol=1e-5, trscheme=truncdim(χ) + ) +end +```` + +```` +[ Info: CTMRG init: obj = -6.089565139446e-05 err = 1.0000e+00 +┌ Warning: CTMRG cancel 100: obj = +2.298063654998e-16 err = 1.5276303328e-02 time = 25.32 sec +└ @ PEPSKit ~/.julia/packages/PEPSKit/P7ER3/src/algorithms/ctmrg/ctmrg.jl:129 +[ Info: CTMRG init: obj = +2.298063654998e-16 err = 1.0000e+00 +[ Info: CTMRG conv 11: obj = +1.597194080782e-13 err = 8.9907750067e-06 time = 25.07 sec + +```` + +We measure the energy by computing the `H` expectation value, where we have to make sure to +normalize with respect to the unit cell to obtain the energy per site: + +````julia +E = expectation_value(peps, H, env) / (Nr * Nc) +@show E; +```` + +```` +E = -3.6333025702476567 + +```` + +Finally, we can compare the obtained ground-state energy against the literature, namely the +QMC estimates from [Qin et al.](@cite qin_benchmark_2016). We find that the results generally +agree: + +````julia +Es_exact = Dict(0 => -1.62, 2 => -0.176, 4 => 0.8603, 6 => -0.6567, 8 => -0.5243) +E_exact = Es_exact[U] - U / 2 +@show (E - E_exact) / E_exact; +```` + +```` +(E - E_exact) / E_exact = -0.006398509517418207 + +```` + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/docs/src/examples/6.hubbard_su/main.ipynb b/docs/src/examples/6.hubbard_su/main.ipynb new file mode 100644 index 000000000..a2d3fcaa0 --- /dev/null +++ b/docs/src/examples/6.hubbard_su/main.ipynb @@ -0,0 +1,248 @@ +{ + "cells": [ + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Markdown #hide" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "# Hubbard model imaginary time evolution using simple update\n", + "\n", + "Once again, we consider the Hubbard model but this time we obtain the ground-state PEPS by\n", + "imaginary time evoluation. In particular, we'll use the `SimpleUpdate` algorithm.\n", + "As a reminder, we define the Hubbard model as\n", + "\n", + "$$\n", + "H = -t \\sum_{\\langle i,j \\rangle} \\sum_{\\sigma} \\left( c_{i,\\sigma}^+ c_{j,\\sigma}^- +\n", + "c_{i,\\sigma}^- c_{j,\\sigma}^+ \\right) + U \\sum_i n_{i,\\uparrow}n_{i,\\downarrow} - \\mu \\sum_i n_i\n", + "$$\n", + "\n", + "with $\\sigma \\in \\{\\uparrow,\\downarrow\\}$ and $n_{i,\\sigma} = c_{i,\\sigma}^+ c_{i,\\sigma}^-$.\n", + "\n", + "Let's get started by seeding the RNG and importing the required modules:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Random\n", + "using TensorKit, PEPSKit\n", + "Random.seed!(12329348592498);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Defining the Hamiltonian\n", + "\n", + "First, we define the Hubbard model at $t=1$ hopping and $U=6$ using `Trivial` sectors for\n", + "the particle and spin symmetries, and set $\\mu = U/2$ for half-filling. The model will be\n", + "constructed on a $2 \\times 2$ unit cell, so we have:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "t = 1\n", + "U = 6\n", + "Nr, Nc = 2, 2\n", + "H = hubbard_model(Float64, Trivial, Trivial, InfiniteSquare(Nr, Nc); t, U, mu=U / 2);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Running the simple update algorithm\n", + "\n", + "Next, we'll specify the virtual PEPS bond dimension and define the fermionic physical and\n", + "virtual spaces. The simple update algorithm evolves an infinite PEPS with weights on the\n", + "virtual bonds, so we here need to intialize an `InfiniteWeightPEPS`. By default,\n", + "the bond weights will be identity. Unlike in the other examples, we here use tensors with\n", + "real `Float64` entries:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "Dbond = 8\n", + "physical_space = Vect[fℤ₂](0 => 2, 1 => 2)\n", + "virtual_space = Vect[fℤ₂](0 => Dbond / 2, 1 => Dbond / 2)\n", + "wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, virtual_space; unitcell=(Nr, Nc));" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Before starting the simple update routine, we normalize the vertex tensors of `wpeps` by\n", + "dividing with the maximal vertex element (using the infinity norm):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "for ind in CartesianIndices(wpeps.vertices)\n", + " wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf)\n", + "end" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Let's set algorithm parameters: The plan is to successively decrease the time interval of\n", + "the Trotter-Suzuki as well as the convergence tolerance such that we obtain a more accurate\n", + "result at each iteration. To run the simple update, we call `simpleupdate` where we\n", + "use the keyword `bipartite=false` - meaning that we use the full $2 \\times 2$ unit cell\n", + "without assuming a bipartite structure. Thus, we can start evolving:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "dts = [1e-2, 1e-3, 4e-4, 1e-4]\n", + "tols = [1e-6, 1e-8, 1e-8, 1e-8]\n", + "maxiter = 20000\n", + "\n", + "for (n, (dt, tol)) in enumerate(zip(dts, tols))\n", + " trscheme = truncerr(1e-10) & truncdim(Dbond)\n", + " alg = SimpleUpdate(dt, tol, maxiter, trscheme)\n", + " global wpeps, = simpleupdate(wpeps, H, alg; bipartite=false)\n", + "end" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "To obtain the evolved `InfiniteWeightPEPS` as an actual PEPS without weights on the bonds,\n", + "we can just call the following constructor:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "peps = InfinitePEPS(wpeps);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Computing the ground-state energy\n", + "\n", + "In order to compute the energy expectation value with evolved PEPS, we need to converge a\n", + "CTMRG environment on it. We first converge an environment with a small enviroment dimension\n", + "and then use that to initialize another run with bigger environment dimension. We'll use\n", + "`trscheme=truncdim(χ)` for that such that the dimension is increased during the second CTMRG\n", + "run:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "χenv₀, χenv = 6, 16\n", + "env_space = Vect[fℤ₂](0 => χenv₀ / 2, 1 => χenv₀ / 2)\n", + "\n", + "env = CTMRGEnv(rand, Float64, peps, env_space)\n", + "for χ in [χenv₀, χenv]\n", + " global env, = leading_boundary(\n", + " env, peps; alg=:sequential, tol=1e-5, trscheme=truncdim(χ)\n", + " )\n", + "end" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "We measure the energy by computing the `H` expectation value, where we have to make sure to\n", + "normalize with respect to the unit cell to obtain the energy per site:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "E = expectation_value(peps, H, env) / (Nr * Nc)\n", + "@show E;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Finally, we can compare the obtained ground-state energy against the literature, namely the\n", + "QMC estimates from [Qin et al.](@cite qin_benchmark_2016). We find that the results generally\n", + "agree:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "Es_exact = Dict(0 => -1.62, 2 => -0.176, 4 => 0.8603, 6 => -0.6567, 8 => -0.5243)\n", + "E_exact = Es_exact[U] - U / 2\n", + "@show (E - E_exact) / E_exact;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "---\n", + "\n", + "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" + ], + "metadata": {} + } + ], + "nbformat_minor": 3, + "metadata": { + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.11.4" + }, + "kernelspec": { + "name": "julia-1.11", + "display_name": "Julia 1.11.4", + "language": "julia" + } + }, + "nbformat": 4 +} diff --git a/docs/src/examples/7.heisenberg_su/index.md b/docs/src/examples/7.heisenberg_su/index.md new file mode 100644 index 000000000..25a4c1d77 --- /dev/null +++ b/docs/src/examples/7.heisenberg_su/index.md @@ -0,0 +1,212 @@ +```@meta +EditURL = "../../../../examples/7.heisenberg_su/main.jl" +``` + +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//7.heisenberg_su/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//7.heisenberg_su/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//7.heisenberg_su) + + +# Simple update for the Heisenberg model + +In this next example, we will use [`SimpleUpdate`](@ref) imaginary time evolution to treat +the two-dimensional Heisenberg model once again: + +```math +H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j. +``` + +In the previous examples, we used a sublattice rotation to simulate antiferromagnetic +Hamiltonian on a single-site unit cell. Here, we will instead use a $2 \times 2$ unit cell +and set $J_x=J_y=J_z=1$. + +Let's get started by seeding the RNG and importing all required modules: + +````julia +using Random +import Statistics: mean +using TensorKit, PEPSKit +import MPSKitModels: S_x, S_y, S_z, S_exchange +Random.seed!(0); +```` + +## Defining the Hamiltonian + +To construct the Heisenberg Hamiltonian as just discussed, we'll use `heisenberg_XYZ` and, +in addition, make it real (`real` and `imag` works for `LocalOperator`s) since we want to +use PEPS and environments with real entries. We can either initialize the Hamiltonian with +no internal symmetries (`symm = Trivial`) or use the global $U(1)$ symmetry +(`symm = U1Irrep`): + +````julia +symm = Trivial ## ∈ {Trivial, U1Irrep} +Nr, Nc = 2, 2 +H = real(heisenberg_XYZ(ComplexF64, symm, InfiniteSquare(Nr, Nc); Jx=1, Jy=1, Jz=1)); +```` + +## Simple updating + +We proceed by initializing a random weighted PEPS that will be evolved. Again, we'll +normalize its vertex tensors. First though, we need to take of defining the appropriate +(symmetric) spaces: + +````julia +Dbond = 4 +χenv = 16 +if symm == Trivial + physical_space = ℂ^2 + bond_space = ℂ^Dbond + env_space = ℂ^χenv +elseif symm == U1Irrep + physical_space = ℂ[U1Irrep](1//2 => 1, -1//2 => 1) + bond_space = ℂ[U1Irrep](0 => Dbond ÷ 2, 1//2 => Dbond ÷ 4, -1//2 => Dbond ÷ 4) + env_space = ℂ[U1Irrep](0 => χenv ÷ 2, 1//2 => χenv ÷ 4, -1//2 => χenv ÷ 4) +else + error("not implemented") +end + +wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, bond_space; unitcell=(Nr, Nc)) +for ind in CartesianIndices(wpeps.vertices) + wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf) +end +```` + +Next, we can start the `SimpleUpdate` routine, successively decreasing the time intervals +and singular value convergence tolerances. Note that TensorKit allows to combine SVD +truncation schemes, which we use here to set a maximal bond dimension and at the same time +fix a truncation error (if that can be reached by remaining below `Dbond`): + +````julia +dts = [1e-2, 1e-3, 4e-4] +tols = [1e-6, 1e-8, 1e-8] +maxiter = 10000 +trscheme_peps = truncerr(1e-10) & truncdim(Dbond) + +for (dt, tol) in zip(dts, tols) + alg = SimpleUpdate(dt, tol, maxiter, trscheme_peps) + result = simpleupdate(wpeps, H, alg; bipartite=true) + global wpeps = result[1] +end +```` + +```` +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 1 : dt = 1e-02, weight diff = 1.683e+00, time = 8.361 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 500 : dt = 1e-02, weight diff = 3.879e-06, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU conv 596 : dt = 1e-02, weight diff = 9.933e-07, time = 9.634 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 1 : dt = 1e-03, weight diff = 2.135e-03, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 500 : dt = 1e-03, weight diff = 9.632e-07, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 1000 : dt = 1e-03, weight diff = 2.415e-07, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 1500 : dt = 1e-03, weight diff = 6.291e-08, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 2000 : dt = 1e-03, weight diff = 1.683e-08, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU conv 2205 : dt = 1e-03, weight diff = 9.978e-09, time = 4.524 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 1 : dt = 4e-04, weight diff = 1.418e-04, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 500 : dt = 4e-04, weight diff = 6.377e-08, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 1000 : dt = 4e-04, weight diff = 3.544e-08, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 1500 : dt = 4e-04, weight diff = 2.013e-08, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 2000 : dt = 4e-04, weight diff = 1.157e-08, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU conv 2133 : dt = 4e-04, weight diff = 9.999e-09, time = 4.429 sec + +```` + +## Computing the ground-state energy and magnetizations + +In order to compute observable expectation values, we need to converge a CTMRG environment +on the evolved PEPS. Let's do so: + +````julia +peps = InfinitePEPS(wpeps) ## absorb the weights +env₀ = CTMRGEnv(rand, Float64, peps, env_space) +trscheme_env = truncerr(1e-10) & truncdim(χenv) +env, = leading_boundary( + env₀, + peps; + alg=:sequential, + projector_alg=:fullinfinite, + tol=1e-10, + trscheme=trscheme_env, +); +```` + +```` +[ Info: CTMRG init: obj = +8.705922473442e-05 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +9.514115680898e-01 err = 3.3105929548e-11 time = 9.35 sec + +```` + +Finally, we'll measure the energy and different magnetizations. For the magnetizations, +the plan is to compute the expectation values unit cell entry-wise in different spin +directions: + +````julia +function compute_mags(peps::InfinitePEPS, env::CTMRGEnv) + lattice = collect(space(t, 1) for t in peps.A) + + # detect symmetry on physical axis + symm = sectortype(space(peps.A[1, 1])) + if symm == Trivial + S_ops = real.([S_x(symm), im * S_y(symm), S_z(symm)]) + elseif symm == U1Irrep + S_ops = real.([S_z(symm)]) ## only Sz preserves + end + + return [ + collect( + expectation_value( + peps, LocalOperator(lattice, (CartesianIndex(r, c),) => S), env + ) for (r, c) in Iterators.product(1:size(peps, 1), 1:size(peps, 2)) + ) for S in S_ops + ] +end + +E = expectation_value(peps, H, env) / (Nr * Nc) +Ms = compute_mags(peps, env) +M_norms = collect(norm([m[r, c] for m in Ms]) for (r, c) in Iterators.product(1:Nr, 1:Nc)) +@show E Ms M_norms; +```` + +```` +E = -0.6674685583160916 +Ms = [[0.03199644951239792 -0.029802620495572755; -0.029802620502593708 0.03199644954611694], [2.289729198376439e-12 -1.051667672083661e-12; -2.117130756284402e-12 8.869747853359352e-13], [0.3755961090665969 -0.3757765476186198; -0.3757765476169762 0.37559610906659047]] +M_norms = [0.3769565093314697 0.37695650933306873; 0.3769565093319854 0.37695650933432534] + +```` + +To assess the results, we will benchmark against data from [Corboz](@cite corboz_variational_2016), +which use manual gradients to perform a variational optimization of the Heisenberg model. +In particular, for the energy and magnetization they find $E_\text{ref} = -0.6675$ and +$M_\text{ref} = 0.3767$. Looking at the relative errors, we find general agreement, although +the accuracy is limited by the methodological limitations of the simple update algorithm as +well as finite bond dimension effects and a lacking extrapolation: + +````julia +E_ref = -0.6675 +M_ref = 0.3767 +@show (E - E_ref) / E_ref +@show (mean(M_norms) - M_ref) / E_ref; +```` + +```` +(E - E_ref) / E_ref = -4.71036463046289e-5 +(mean(M_norms) - M_ref) / E_ref = -0.00038428364451283597 + +```` + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/docs/src/examples/7.heisenberg_su/main.ipynb b/docs/src/examples/7.heisenberg_su/main.ipynb new file mode 100644 index 000000000..4fee8d9e7 --- /dev/null +++ b/docs/src/examples/7.heisenberg_su/main.ipynb @@ -0,0 +1,253 @@ +{ + "cells": [ + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Markdown #hide" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "# Simple update for the Heisenberg model\n", + "\n", + "In this next example, we will use `SimpleUpdate` imaginary time evolution to treat\n", + "the two-dimensional Heisenberg model once again:\n", + "\n", + "$$\n", + "H = \\sum_{\\langle i,j \\rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j.\n", + "$$\n", + "\n", + "In the previous examples, we used a sublattice rotation to simulate antiferromagnetic\n", + "Hamiltonian on a single-site unit cell. Here, we will instead use a $2 \\times 2$ unit cell\n", + "and set $J_x=J_y=J_z=1$.\n", + "\n", + "Let's get started by seeding the RNG and importing all required modules:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Random\n", + "import Statistics: mean\n", + "using TensorKit, PEPSKit\n", + "import MPSKitModels: S_x, S_y, S_z, S_exchange\n", + "Random.seed!(0);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Defining the Hamiltonian\n", + "\n", + "To construct the Heisenberg Hamiltonian as just discussed, we'll use `heisenberg_XYZ` and,\n", + "in addition, make it real (`real` and `imag` works for `LocalOperator`s) since we want to\n", + "use PEPS and environments with real entries. We can either initialize the Hamiltonian with\n", + "no internal symmetries (`symm = Trivial`) or use the global $U(1)$ symmetry\n", + "(`symm = U1Irrep`):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "symm = Trivial ## ∈ {Trivial, U1Irrep}\n", + "Nr, Nc = 2, 2\n", + "H = real(heisenberg_XYZ(ComplexF64, symm, InfiniteSquare(Nr, Nc); Jx=1, Jy=1, Jz=1));" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Simple updating\n", + "\n", + "We proceed by initializing a random weighted PEPS that will be evolved. Again, we'll\n", + "normalize its vertex tensors. First though, we need to take of defining the appropriate\n", + "(symmetric) spaces:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "Dbond = 4\n", + "χenv = 16\n", + "if symm == Trivial\n", + " physical_space = ℂ^2\n", + " bond_space = ℂ^Dbond\n", + " env_space = ℂ^χenv\n", + "elseif symm == U1Irrep\n", + " physical_space = ℂ[U1Irrep](1//2 => 1, -1//2 => 1)\n", + " bond_space = ℂ[U1Irrep](0 => Dbond ÷ 2, 1//2 => Dbond ÷ 4, -1//2 => Dbond ÷ 4)\n", + " env_space = ℂ[U1Irrep](0 => χenv ÷ 2, 1//2 => χenv ÷ 4, -1//2 => χenv ÷ 4)\n", + "else\n", + " error(\"not implemented\")\n", + "end\n", + "\n", + "wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, bond_space; unitcell=(Nr, Nc))\n", + "for ind in CartesianIndices(wpeps.vertices)\n", + " wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf)\n", + "end" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Next, we can start the `SimpleUpdate` routine, successively decreasing the time intervals\n", + "and singular value convergence tolerances. Note that TensorKit allows to combine SVD\n", + "truncation schemes, which we use here to set a maximal bond dimension and at the same time\n", + "fix a truncation error (if that can be reached by remaining below `Dbond`):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "dts = [1e-2, 1e-3, 4e-4]\n", + "tols = [1e-6, 1e-8, 1e-8]\n", + "maxiter = 10000\n", + "trscheme_peps = truncerr(1e-10) & truncdim(Dbond)\n", + "\n", + "for (dt, tol) in zip(dts, tols)\n", + " alg = SimpleUpdate(dt, tol, maxiter, trscheme_peps)\n", + " result = simpleupdate(wpeps, H, alg; bipartite=true)\n", + " global wpeps = result[1]\n", + "end" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Computing the ground-state energy and magnetizations\n", + "\n", + "In order to compute observable expectation values, we need to converge a CTMRG environment\n", + "on the evolved PEPS. Let's do so:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "peps = InfinitePEPS(wpeps) ## absorb the weights\n", + "env₀ = CTMRGEnv(rand, Float64, peps, env_space)\n", + "trscheme_env = truncerr(1e-10) & truncdim(χenv)\n", + "env, = leading_boundary(\n", + " env₀,\n", + " peps;\n", + " alg=:sequential,\n", + " projector_alg=:fullinfinite,\n", + " tol=1e-10,\n", + " trscheme=trscheme_env,\n", + ");" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Finally, we'll measure the energy and different magnetizations. For the magnetizations,\n", + "the plan is to compute the expectation values unit cell entry-wise in different spin\n", + "directions:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "function compute_mags(peps::InfinitePEPS, env::CTMRGEnv)\n", + " lattice = collect(space(t, 1) for t in peps.A)\n", + "\n", + " # detect symmetry on physical axis\n", + " symm = sectortype(space(peps.A[1, 1]))\n", + " if symm == Trivial\n", + " S_ops = real.([S_x(symm), im * S_y(symm), S_z(symm)])\n", + " elseif symm == U1Irrep\n", + " S_ops = real.([S_z(symm)]) ## only Sz preserves \n", + " end\n", + "\n", + " return [\n", + " collect(\n", + " expectation_value(\n", + " peps, LocalOperator(lattice, (CartesianIndex(r, c),) => S), env\n", + " ) for (r, c) in Iterators.product(1:size(peps, 1), 1:size(peps, 2))\n", + " ) for S in S_ops\n", + " ]\n", + "end\n", + "\n", + "E = expectation_value(peps, H, env) / (Nr * Nc)\n", + "Ms = compute_mags(peps, env)\n", + "M_norms = collect(norm([m[r, c] for m in Ms]) for (r, c) in Iterators.product(1:Nr, 1:Nc))\n", + "@show E Ms M_norms;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "To assess the results, we will benchmark against data from Corboz,\n", + "which use manual gradients to perform a variational optimization of the Heisenberg model.\n", + "In particular, for the energy and magnetization they find $E_\\text{ref} = -0.6675$ and\n", + "$M_\\text{ref} = 0.3767$. Looking at the relative errors, we find general agreement, although\n", + "the accuracy is limited by the methodological limitations of the simple update algorithm as\n", + "well as finite bond dimension effects and a lacking extrapolation:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "E_ref = -0.6675\n", + "M_ref = 0.3767\n", + "@show (E - E_ref) / E_ref\n", + "@show (mean(M_norms) - M_ref) / E_ref;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "---\n", + "\n", + "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" + ], + "metadata": {} + } + ], + "nbformat_minor": 3, + "metadata": { + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.11.4" + }, + "kernelspec": { + "name": "julia-1.11", + "display_name": "Julia 1.11.4", + "language": "julia" + } + }, + "nbformat": 4 +} diff --git a/docs/src/examples/8.ising_partition_function/index.md b/docs/src/examples/8.ising_partition_function/index.md new file mode 100644 index 000000000..79af2fb5d --- /dev/null +++ b/docs/src/examples/8.ising_partition_function/index.md @@ -0,0 +1,205 @@ +```@meta +EditURL = "../../../../examples/8.ising_partition_function/main.jl" +``` + +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//8.ising_partition_function/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//8.ising_partition_function/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//8.ising_partition_function) + + +# 2D classical Ising partition function using CTMRG + +All previous examples dealt with quantum systems, describing their states by `InfinitePEPS` +that can be contracted using CTMRG or VUMPS techniques. Here, we shift our focus towards +classical physics and consider the 2D classical Ising model with the partition function + +```math +\mathcal{Z}(\beta) = \sum_{\{s\}} \exp(-\beta H(s)) \text{ with } H(s) = -J \sum_{\langle i, j \rangle} s_i s_j . +``` + +The idea is to encode the partition function into an infinite square lattice of rank-4 +tensors which can then be contracted using CTMRG. These rank-4 tensors are represented by +[`InfinitePartitionFunction`](@ref) states, as we will see. + +But first, let's seed the RNG and import all required modules: + +````julia +using Random, LinearAlgebra +using TensorKit, PEPSKit +using QuadGK +Random.seed!(234923); +```` + +## Defining the partition function + +The first step is to define the rank-4 tensor that, when contracted on a square lattice, +evaluates to the partition function value at a given $\beta$. Since we later want to compute +the magnetization and energy, we define the appropriate rank-4 tensors as well: + +````julia +function classical_ising(; beta=log(1 + sqrt(2)) / 2, J=1.0) + K = beta * J + + # Boltzmann weights + t = ComplexF64[exp(K) exp(-K); exp(-K) exp(K)] + r = eigen(t) + nt = r.vectors * sqrt(Diagonal(r.values)) * r.vectors + + # local partition function tensor + O = zeros(2, 2, 2, 2) + O[1, 1, 1, 1] = 1 + O[2, 2, 2, 2] = 1 + @tensor o[-1 -2; -3 -4] := O[3 4; 2 1] * nt[-3; 3] * nt[-4; 4] * nt[-2; 2] * nt[-1; 1] + + # magnetization tensor + M = copy(O) + M[2, 2, 2, 2] *= -1 + @tensor m[-1 -2; -3 -4] := M[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * nt[-3; 3] * nt[-4; 4] + + # bond interaction tensor and energy-per-site tensor + e = ComplexF64[-J J; J -J] .* nt + @tensor e_hor[-1 -2; -3 -4] := + O[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * nt[-3; 3] * e[-4; 4] + @tensor e_vert[-1 -2; -3 -4] := + O[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * e[-3; 3] * nt[-4; 4] + e = e_hor + e_vert + + # fixed tensor map space for all three + TMS = ℂ^2 ⊗ ℂ^2 ← ℂ^2 ⊗ ℂ^2 + + return TensorMap(o, TMS), TensorMap(m, TMS), TensorMap(e, TMS) +end; +```` + +So let's initialize these tensors at inverse temperature ``\beta=0.6`` and construct the +corresponding `InfinitePartitionFunction`: + +````julia +beta = 0.6 +O, M, E = classical_ising(; beta) +Z = InfinitePartitionFunction(O) +```` + +```` +InfinitePartitionFunction{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 2, 2, Vector{ComplexF64}}}(TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 2, 2, Vector{ComplexF64}}[TensorMap((ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)): +[:, :, 1, 1] = + 3.169519816780443 + 0.0im 0.4999999999999995 + 0.0im + 0.4999999999999995 + 0.0im 0.1505971059561009 + 0.0im + +[:, :, 2, 1] = + 0.4999999999999995 + 0.0im 0.1505971059561009 + 0.0im + 0.1505971059561009 + 0.0im 0.4999999999999995 + 0.0im + +[:, :, 1, 2] = + 0.4999999999999995 + 0.0im 0.1505971059561009 + 0.0im + 0.1505971059561009 + 0.0im 0.4999999999999995 + 0.0im + +[:, :, 2, 2] = + 0.1505971059561009 + 0.0im 0.4999999999999995 + 0.0im + 0.4999999999999995 + 0.0im 3.169519816780443 + 0.0im +;;]) +```` + +## Contracting the partition function + +Next, we can contract the partition function as per usual by constructing a `CTMRGEnv` with +a specified environment dimension (or space) and calling `leading_boundary` with appropriate +settings: + +````julia +χenv = 20 +env₀ = CTMRGEnv(Z, χenv) +env, = leading_boundary(env₀, Z; tol=1e-8, maxiter=500); +```` + +```` +[ Info: CTMRG init: obj = +1.784252138312e+00 -1.557258880375e+00im err = 1.0000e+00 +[ Info: CTMRG conv 63: obj = +3.353928644031e+00 err = 4.5903314811e-09 time = 4.11 sec + +```` + +Note that CTMRG environments for partition functions differ from the PEPS environments only +by the edge tensors - instead of two legs connecting the edges and the PEPS-PEPS sandwich, +there is only one leg connecting the edges and the partition function tensor: + +````julia +space.(env.edges) +```` + +```` +4×1×1 Array{TensorKit.TensorMapSpace{TensorKit.ComplexSpace, 2, 1}, 3}: +[:, :, 1] = + (ℂ^20 ⊗ ℂ^2) ← ℂ^20 + (ℂ^20 ⊗ ℂ^2) ← ℂ^20 + (ℂ^20 ⊗ (ℂ^2)') ← ℂ^20 + (ℂ^20 ⊗ (ℂ^2)') ← ℂ^20 +```` + +To compute the value of the partition function, we have to contract `Z` with the converged +environment using [`network_value`](@ref). Additionally, we will compute the magnetization +and energy (per site), again using [`expectation_value`](@ref) but this time also specifying +the index in the unit cell, where we want to insert the local tensor: + +````julia +λ = network_value(Z, env) +m = expectation_value(Z, (1, 1) => M, env) +e = expectation_value(Z, (1, 1) => E, env) +@show λ m e; +```` + +```` +λ = 3.353928644031379 - 3.523927224091531e-16im +m = 0.9736086674403001 + 1.8262157316829647e-17im +e = -1.8637796145082437 - 1.4609725853463717e-16im + +```` + +## Comparing against the exact Onsager solution + +In order to assess our results, we will compare against the +[exact Onsager solution](https://en.wikipedia.org/wiki/Square_lattice_Ising_model#Exact_solution). +To that end, we compute the exact free energy, magnetization and energy per site (where +`quadgk` performs the integral from $0$ to $\pi/2$): + +````julia +function classical_ising_exact(; beta=log(1 + sqrt(2)) / 2, J=1.0) + K = beta * J + + k = 1 / sinh(2 * K)^2 + F = quadgk( + theta -> log(cosh(2 * K)^2 + 1 / k * sqrt(1 + k^2 - 2 * k * cos(2 * theta))), 0, pi + )[1] + f = -1 / beta * (log(2) / 2 + 1 / (2 * pi) * F) + + m = 1 - (sinh(2 * K))^(-4) > 0 ? (1 - (sinh(2 * K))^(-4))^(1 / 8) : 0 + + E = quadgk(theta -> 1 / sqrt(1 - (4 * k) * (1 + k)^(-2) * sin(theta)^2), 0, pi / 2)[1] + e = -J * cosh(2 * K) / sinh(2 * K) * (1 + 2 / pi * (2 * tanh(2 * K)^2 - 1) * E) + + return f, m, e +end + +f_exact, m_exact, e_exact = classical_ising_exact(; beta); +```` + +And indeed, we do find agreement between the exact and CTMRG values (keeping in mind that +energy accuracy is limited by the environment dimension and the lack of proper +extrapolation): + +````julia +@show (-log(λ) / beta - f_exact) / f_exact +@show (abs(m) - abs(m_exact)) / abs(m_exact) +@show (e - e_exact) / e_exact; +```` + +```` +(-(log(λ)) / beta - f_exact) / f_exact = -4.4037086931770186e-16 - 8.682408747331889e-17im +(abs(m) - abs(m_exact)) / abs(m_exact) = -4.561270094458082e-16 +(e - e_exact) / e_exact = -0.023732068099090543 + 7.652732508485748e-17im + +```` + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/docs/src/examples/8.ising_partition_function/main.ipynb b/docs/src/examples/8.ising_partition_function/main.ipynb new file mode 100644 index 000000000..4e0040cc1 --- /dev/null +++ b/docs/src/examples/8.ising_partition_function/main.ipynb @@ -0,0 +1,260 @@ +{ + "cells": [ + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Markdown #hide" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "# 2D classical Ising partition function using CTMRG\n", + "\n", + "All previous examples dealt with quantum systems, describing their states by `InfinitePEPS`\n", + "that can be contracted using CTMRG or VUMPS techniques. Here, we shift our focus towards\n", + "classical physics and consider the 2D classical Ising model with the partition function\n", + "\n", + "$$\n", + "\\mathcal{Z}(\\beta) = \\sum_{\\{s\\}} \\exp(-\\beta H(s)) \\text{ with } H(s) = -J \\sum_{\\langle i, j \\rangle} s_i s_j .\n", + "$$\n", + "\n", + "The idea is to encode the partition function into an infinite square lattice of rank-4\n", + "tensors which can then be contracted using CTMRG. These rank-4 tensors are represented by\n", + "`InfinitePartitionFunction` states, as we will see.\n", + "\n", + "But first, let's seed the RNG and import all required modules:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Random, LinearAlgebra\n", + "using TensorKit, PEPSKit\n", + "using QuadGK\n", + "Random.seed!(234923);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Defining the partition function\n", + "\n", + "The first step is to define the rank-4 tensor that, when contracted on a square lattice,\n", + "evaluates to the partition function value at a given $\\beta$. Since we later want to compute\n", + "the magnetization and energy, we define the appropriate rank-4 tensors as well:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "function classical_ising(; beta=log(1 + sqrt(2)) / 2, J=1.0)\n", + " K = beta * J\n", + "\n", + " # Boltzmann weights\n", + " t = ComplexF64[exp(K) exp(-K); exp(-K) exp(K)]\n", + " r = eigen(t)\n", + " nt = r.vectors * sqrt(Diagonal(r.values)) * r.vectors\n", + "\n", + " # local partition function tensor\n", + " O = zeros(2, 2, 2, 2)\n", + " O[1, 1, 1, 1] = 1\n", + " O[2, 2, 2, 2] = 1\n", + " @tensor o[-1 -2; -3 -4] := O[3 4; 2 1] * nt[-3; 3] * nt[-4; 4] * nt[-2; 2] * nt[-1; 1]\n", + "\n", + " # magnetization tensor\n", + " M = copy(O)\n", + " M[2, 2, 2, 2] *= -1\n", + " @tensor m[-1 -2; -3 -4] := M[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * nt[-3; 3] * nt[-4; 4]\n", + "\n", + " # bond interaction tensor and energy-per-site tensor\n", + " e = ComplexF64[-J J; J -J] .* nt\n", + " @tensor e_hor[-1 -2; -3 -4] :=\n", + " O[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * nt[-3; 3] * e[-4; 4]\n", + " @tensor e_vert[-1 -2; -3 -4] :=\n", + " O[1 2; 3 4] * nt[-1; 1] * nt[-2; 2] * e[-3; 3] * nt[-4; 4]\n", + " e = e_hor + e_vert\n", + "\n", + " # fixed tensor map space for all three\n", + " TMS = ℂ^2 ⊗ ℂ^2 ← ℂ^2 ⊗ ℂ^2\n", + "\n", + " return TensorMap(o, TMS), TensorMap(m, TMS), TensorMap(e, TMS)\n", + "end;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "So let's initialize these tensors at inverse temperature $\\beta=0.6$ and construct the\n", + "corresponding `InfinitePartitionFunction`:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "beta = 0.6\n", + "O, M, E = classical_ising(; beta)\n", + "Z = InfinitePartitionFunction(O)" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Contracting the partition function\n", + "\n", + "Next, we can contract the partition function as per usual by constructing a `CTMRGEnv` with\n", + "a specified environment dimension (or space) and calling `leading_boundary` with appropriate\n", + "settings:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "χenv = 20\n", + "env₀ = CTMRGEnv(Z, χenv)\n", + "env, = leading_boundary(env₀, Z; tol=1e-8, maxiter=500);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Note that CTMRG environments for partition functions differ from the PEPS environments only\n", + "by the edge tensors - instead of two legs connecting the edges and the PEPS-PEPS sandwich,\n", + "there is only one leg connecting the edges and the partition function tensor:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "space.(env.edges)" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "To compute the value of the partition function, we have to contract `Z` with the converged\n", + "environment using `network_value`. Additionally, we will compute the magnetization\n", + "and energy (per site), again using `expectation_value` but this time also specifying\n", + "the index in the unit cell, where we want to insert the local tensor:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "λ = network_value(Z, env)\n", + "m = expectation_value(Z, (1, 1) => M, env)\n", + "e = expectation_value(Z, (1, 1) => E, env)\n", + "@show λ m e;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Comparing against the exact Onsager solution\n", + "\n", + "In order to assess our results, we will compare against the\n", + "[exact Onsager solution](https://en.wikipedia.org/wiki/Square_lattice_Ising_model#Exact_solution).\n", + "To that end, we compute the exact free energy, magnetization and energy per site (where\n", + "`quadgk` performs the integral from $0$ to $\\pi/2$):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "function classical_ising_exact(; beta=log(1 + sqrt(2)) / 2, J=1.0)\n", + " K = beta * J\n", + "\n", + " k = 1 / sinh(2 * K)^2\n", + " F = quadgk(\n", + " theta -> log(cosh(2 * K)^2 + 1 / k * sqrt(1 + k^2 - 2 * k * cos(2 * theta))), 0, pi\n", + " )[1]\n", + " f = -1 / beta * (log(2) / 2 + 1 / (2 * pi) * F)\n", + "\n", + " m = 1 - (sinh(2 * K))^(-4) > 0 ? (1 - (sinh(2 * K))^(-4))^(1 / 8) : 0\n", + "\n", + " E = quadgk(theta -> 1 / sqrt(1 - (4 * k) * (1 + k)^(-2) * sin(theta)^2), 0, pi / 2)[1]\n", + " e = -J * cosh(2 * K) / sinh(2 * K) * (1 + 2 / pi * (2 * tanh(2 * K)^2 - 1) * E)\n", + "\n", + " return f, m, e\n", + "end\n", + "\n", + "f_exact, m_exact, e_exact = classical_ising_exact(; beta);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "And indeed, we do find agreement between the exact and CTMRG values (keeping in mind that\n", + "energy accuracy is limited by the environment dimension and the lack of proper\n", + "extrapolation):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "@show (-log(λ) / beta - f_exact) / f_exact\n", + "@show (abs(m) - abs(m_exact)) / abs(m_exact)\n", + "@show (e - e_exact) / e_exact;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "---\n", + "\n", + "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" + ], + "metadata": {} + } + ], + "nbformat_minor": 3, + "metadata": { + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.11.4" + }, + "kernelspec": { + "name": "julia-1.11", + "display_name": "Julia 1.11.4", + "language": "julia" + } + }, + "nbformat": 4 +} diff --git a/examples/2.boundary_mps/main.jl b/examples/2.boundary_mps/main.jl index 42053c798..8566b8bac 100644 --- a/examples/2.boundary_mps/main.jl +++ b/examples/2.boundary_mps/main.jl @@ -84,7 +84,7 @@ First, we construct a PEPS with a $2 \times 2$ unit cell using the `unitcell` ke argument and then define the corresponding transfer PEPS: """ -peps₀_2x2 = InfinitePEPS(ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2)) +peps₀_2x2 = InfinitePEPS(rand, ComplexF64, ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2)) transfer_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1); md""" @@ -100,7 +100,7 @@ env_ctmrg_2x2, = leading_boundary( ) norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2)) -@show abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps +@show abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps; md""" Again, the results are compatible. Note that for larger unit cells and non-Hermitian PEPS diff --git a/examples/3.bose_hubbard/main.jl b/examples/3.bose_hubbard/main.jl index 3dd13b1d3..16e4fb174 100644 --- a/examples/3.bose_hubbard/main.jl +++ b/examples/3.bose_hubbard/main.jl @@ -89,7 +89,7 @@ algorithms and their tolerances: boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace)) gradient_alg = (; tol=1e-6, maxiter=10, alg=:eigsolver, iterscheme=:diffgauge) -optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=200, ls_maxiter=2, ls_maxfg=2); +optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=150, ls_maxiter=2, ls_maxfg=2); md""" !!! note @@ -117,7 +117,9 @@ md""" And at last, we optimize (which might take a bit): """ -peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg) +peps, env, E, info = fixedpoint( + H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3 +) @show E; md""" diff --git a/examples/4.xxz/main.jl b/examples/4.xxz/main.jl index a629d9727..9528f4878 100644 --- a/examples/4.xxz/main.jl +++ b/examples/4.xxz/main.jl @@ -73,7 +73,7 @@ From this point onwards it's business as usual: Create an initial PEPS and envir boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace)) gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge) -optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2) +optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=85, ls_maxiter=3, ls_maxfg=3) peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); @@ -85,7 +85,9 @@ because symmetric tensors do create a bit of overhead (which does pay off at lar and environment dimensions): """ -peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg) +peps, env, E, info = fixedpoint( + H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3 +) @show E; md""" diff --git a/examples/5.fermi_hubbard/main.jl b/examples/5.fermi_hubbard/main.jl index fb38d0f2e..a70e9ed60 100644 --- a/examples/5.fermi_hubbard/main.jl +++ b/examples/5.fermi_hubbard/main.jl @@ -36,7 +36,7 @@ lattice = InfiniteSquare(2, 2); md""" In order to create fermionic tensors, one needs to define symmetry sectors using TensorKit's -[`FermionParity`](@extref). Not only do we want use fermion parity but we also want our +`FermionParity`. Not only do we want use fermion parity but we also want our particles to exploit the global $U(1)$ symmetry. The combined product sector can be obtained using the [Deligne product](https://jutho.github.io/TensorKit.jl/stable/lib/sectors/#TensorKitSectors.deligneproduct-Tuple{Sector,%20Sector}), called through `⊠` which is obtained by typing `\boxtimes+TAB`. We will not impose any extra @@ -72,7 +72,7 @@ define all algorithmic parameters: boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace)) gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge) -optimizer_alg = (; tol=1e-4, alg=:lbfgs, verbosity=3, maxiter=100, ls_maxiter=2, ls_maxfg=2) +optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=80, ls_maxiter=3, ls_maxfg=3) md""" Second, we initialize a PEPS state and environment (which we converge) constructed from @@ -88,7 +88,9 @@ md""" And third, we start the ground state search (this does take quite long): """ -peps, env, E, info = fixedpoint(H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg) +peps, env, E, info = fixedpoint( + H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3 +) @show E; md""" diff --git a/examples/6.hubbard_su/main.jl b/examples/6.hubbard_su/main.jl index c83587366..2ce76699e 100644 --- a/examples/6.hubbard_su/main.jl +++ b/examples/6.hubbard_su/main.jl @@ -18,7 +18,7 @@ Let's get started by seeding the RNG and importing the required modules: using Random using TensorKit, PEPSKit -Random.seed!(1298351928); +Random.seed!(12329348592498); md""" ## Defining the Hamiltonian @@ -92,7 +92,7 @@ and then use that to initialize another run with bigger environment dimension. W run: """ -χenv₀, χenv = 6, 20 +χenv₀, χenv = 6, 16 env_space = Vect[fℤ₂](0 => χenv₀ / 2, 1 => χenv₀ / 2) env = CTMRGEnv(rand, Float64, peps, env_space) diff --git a/examples/7.heisenberg_su/main.jl b/examples/7.heisenberg_su/main.jl index b65ef1576..c69bf85fd 100644 --- a/examples/7.heisenberg_su/main.jl +++ b/examples/7.heisenberg_su/main.jl @@ -132,7 +132,7 @@ M_norms = collect(norm([m[r, c] for m in Ms]) for (r, c) in Iterators.product(1: @show E Ms M_norms; md""" -To assess the results, we will benchmark against data from [Corboz](@ref corboz_variational_2016), +To assess the results, we will benchmark against data from [Corboz](@cite corboz_variational_2016), which use manual gradients to perform a variational optimization of the Heisenberg model. In particular, for the energy and magnetization they find $E_\text{ref} = -0.6675$ and $M_\text{ref} = 0.3767$. Looking at the relative errors, we find general agreement, although diff --git a/examples/Cache.toml b/examples/Cache.toml index bec3964d8..4bed7667a 100644 --- a/examples/Cache.toml +++ b/examples/Cache.toml @@ -1,2 +1,9 @@ ["./"] +"4.xxz" = "9015d85ff87c5165142c64c7031275bab78e3d84620d2e13d0d69f054f7f9438" +"7.heisenberg_su" = "81b1ae29382d60e83dc2f2a19a04fbd95db79380e0128f0082fdea01ef1f8fe2" +"5.fermi_hubbard" = "47f460382333676f6f0997d68f104901fb108072640861930f44ff8b526b5f11" +"8.ising_partition_function" = "80d767919ddfdf2fe8bc531367a2b86d1dfa1d42a7c2ed5197f9cee3422dc035" "1.heisenberg" = "aefc6c22bcacdb0b5b69ff1b64e57a0f1debe8778a2d683f4efcadcfccb28b7c" +"2.boundary_mps" = "497e7b378946319995bac90abba7f3f83b95cc93e0423af6d488049861796e10" +"3.bose_hubbard" = "a4eae524b73b5795d9b13af09d31b625adcff9814f3c25cc3b001d20f12bef95" +"6.hubbard_su" = "d3831deed0a8c68324ae312d5c2b79434a8e50d3dde932f42c77951272f74a9b" diff --git a/examples/Project.toml b/examples/Project.toml index cc32cd917..c29979984 100644 --- a/examples/Project.toml +++ b/examples/Project.toml @@ -2,6 +2,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502" +MPSKitModels = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" From 9062da8baaecbe18e0036101643e340720328eb9 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 18 Apr 2025 14:11:55 +0200 Subject: [PATCH 051/113] Stabilize boundary MPS example --- docs/src/examples/2.boundary_mps/index.md | 67 +++++++++++---------- docs/src/examples/2.boundary_mps/main.ipynb | 6 +- examples/2.boundary_mps/main.jl | 6 +- 3 files changed, 42 insertions(+), 37 deletions(-) diff --git a/docs/src/examples/2.boundary_mps/index.md b/docs/src/examples/2.boundary_mps/index.md index 7a2bebffe..80a2d2b86 100644 --- a/docs/src/examples/2.boundary_mps/index.md +++ b/docs/src/examples/2.boundary_mps/index.md @@ -28,45 +28,47 @@ using TensorKit, PEPSKit, MPSKit ## Computing a PEPS norm -We start by initializing a random initial infinite PEPS: +We start by initializing a random initial infinite PEPS. Let us use uniformly distributed +complex entries using `rand` (which sometimes lead to better convergence than Gaussian +distributed `randn` elements): ````julia -peps₀ = InfinitePEPS(ComplexSpace(2), ComplexSpace(2)) +peps₀ = InfinitePEPS(rand, ComplexF64, ComplexSpace(2), ComplexSpace(2)) ```` ```` InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}(TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}[TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')): [:, :, 1, 1, 1] = - -0.5524390176345264 - 0.07357188568178248im 0.34014501646081047 - 0.7552574870030472im - -0.5455245317233405 + 0.8946618856309984im 1.249282911658007 + 0.45352274131986825im + 0.8343040072662887 + 0.15425705836788395im 0.4612746978522435 + 0.7411151918989216im + 0.6640771294125087 + 0.4428356798799721im 0.9163597170532635 + 0.24145695415210522im [:, :, 2, 1, 1] = - 0.33621043661988675 + 0.4400876608299719im -0.9866664087107284 - 0.28688827761325675im - -0.0077250067072679235 + 1.7380910495900947im -0.19071062901939098 - 1.1367500834118434im + 0.44289651954161835 + 0.5968081052313008im 0.5473659268881094 + 0.37528062658773764im + 0.00644367423621961 + 0.9414462569909486im 0.36006028879229457 + 0.6157267258321241im [:, :, 1, 2, 1] = - -0.09149850722392933 + 0.3560942836258964im 1.6255618447281441 - 0.5689426732891244im - -0.19309251474097275 - 0.32363899914302613im -0.025356816648697236 + 0.5632279168368712im + 0.04956065285909117 + 0.26119820734171617im 0.9153298540884296 + 0.3990244910357601im + 0.17944112964295234 + 0.4233545106724528im 0.020358359069476473 + 0.6501897922267199im [:, :, 2, 2, 1] = - 0.07675114584269166 - 0.011479824536308164im -0.17779977372973318 + 1.1379201927122535im - -1.0116302866282385 - 0.9253070687198848im 1.1649047337212566 + 0.9936369101208083im + 0.040493161136161526 + 0.03501665486055905im 0.2591040734810338 + 0.8830094105726012im + 0.781658280511654 + 0.9662812119384394im 0.8169988652653896 + 0.674481616952991im [:, :, 1, 1, 2] = - 0.2510676919806213 - 0.182052326055189im -0.5792402993550532 - 0.4309109406268341im - 0.04501645227038913 - 0.8140971172854408im -0.5608346802110794 + 0.21262550530307248im + 0.2242833355717867 + 0.14929928451790686im 0.6883051212688887 + 0.588769359105893im + 0.046322385671192734 + 0.8543796191082029im 0.6437874016748227 + 0.257253015722232im [:, :, 2, 1, 2] = - 1.5061767210554262 + 0.17190948125245623im -0.8001234458239143 + 0.6764943808639017im - -0.8176938467062373 - 0.40919675695722396im -0.6692181340575689 + 0.6923370271564298im + 0.8719996187768273 + 0.25052026742300637im 0.5714417314833022 + 0.9944321644519715im + 0.4273547968422168 + 0.6068478826937488im 0.4946426302106661 + 0.8353867377249198im [:, :, 1, 2, 2] = - -0.16556382071485704 + 0.2540132491548349im 0.05546115732751907 + 0.3723175507964387im - -0.29883021417599165 - 0.07229462525164528im -1.200173153698329 - 0.45509299328832953im + 0.6857354516279699 + 0.0952105576480895im 0.14591923452838773 + 0.0853564870114002im + 0.6779060054394721 + 0.4947495895268207im 0.9280821860668365 + 0.931316796924268im [:, :, 2, 2, 2] = - 0.289873563752043 + 0.44718981087960125im 0.018357838612906643 + 0.9634127683557584im - 0.5128282969211142 - 0.2865462937979091im -0.44278618042821827 + 0.2612084385439659im + 0.3716373366637086 + 0.2556099109043021im 0.7954831107819061 + 0.016909518973250215im + 0.9376161032047406 + 0.6320864548041844im 0.7900851372111909 + 0.5457560526661245im ;;]) ```` @@ -115,8 +117,8 @@ mps, env, ϵ = leading_boundary(mps₀, transfer, VUMPS(; tol=1e-6, verbosity=2) ```` ```` -[ Info: VUMPS init: obj = +1.674563752306e+00 +3.035692829590e+00im err = 7.5576e-01 -[ Info: VUMPS conv 120: obj = +6.831610878163e+00 -1.001928853191e-08im err = 9.5332406967e-07 time = 1.80 sec +[ Info: VUMPS init: obj = +5.052950412844e+00 +1.493192627823e-02im err = 8.4684e-01 +[ Info: VUMPS conv 4: obj = +1.744071150138e+01 +2.417441557995e-08im err = 1.9047772246e-07 time = 0.10 sec ```` @@ -128,7 +130,7 @@ norm_vumps = abs(prod(expectation_value(mps, transfer))) ```` ```` -6.831610878163006 +17.440711501378814 ```` This can be compared to the result obtained using CTMRG, where we see that the results match: @@ -142,9 +144,9 @@ norm_ctmrg = abs(norm(peps₀, env_ctmrg)) ```` ```` -[ Info: CTMRG init: obj = -1.495741317009e+01 +3.091851579630e-01im err = 1.0000e+00 -[ Info: CTMRG conv 30: obj = +6.831603585666e+00 err = 6.2262595140e-07 time = 0.28 sec -abs(norm_vumps - norm_ctmrg) / norm_vumps = 1.0674637855860049e-6 +[ Info: CTMRG init: obj = -5.556349490423e-01 +1.605938670370e+00im err = 1.0000e+00 +[ Info: CTMRG conv 37: obj = +1.744071151099e+01 err = 3.2056303631e-07 time = 0.33 sec +abs(norm_vumps - norm_ctmrg) / norm_vumps = 5.510360046158767e-10 ```` @@ -181,11 +183,11 @@ norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2)) ```` ```` -[ Info: VUMPS init: obj = +8.149302834396e+02 -8.860408249120e+01im err = 8.6172e-01 -[ Info: VUMPS conv 37: obj = +1.046633709901e+05 -1.858418959285e-05im err = 4.5282584466e-07 time = 2.10 sec -[ Info: CTMRG init: obj = -1.240261729401e+02 -1.672150510263e+01im err = 1.0000e+00 -[ Info: CTMRG conv 47: obj = +1.046633714846e+05 err = 1.6993045675e-07 time = 1.71 sec -abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps = 4.725134987376298e-9 +[ Info: VUMPS init: obj = +6.668046237341e+02 -1.267878277078e+01im err = 8.7901e-01 +[ Info: VUMPS conv 69: obj = +9.723958968917e+04 -3.481605377714e-03im err = 6.3841720875e-07 time = 3.90 sec +[ Info: CTMRG init: obj = +1.074898090007e+03 -2.096255594496e+02im err = 1.0000e+00 +[ Info: CTMRG conv 41: obj = +9.723959008610e+04 err = 6.0518230963e-07 time = 1.50 sec +abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps = 4.082014263000404e-9 ```` @@ -244,10 +246,9 @@ norm_pepo = abs(prod(expectation_value(mps_pepo, transfer_pepo))); ```` ```` -[ Info: VUMPS init: obj = +2.655321432467e+01 +3.760603778362e-01im err = 8.9759e-01 -┌ Warning: VUMPS cancel 200: obj = -2.194912861838e+01 -6.105468516794e+01im err = 5.7061338213e-01 time = 32.78 sec -└ @ MPSKit ~/.julia/packages/MPSKit/EfZBD/src/algorithms/statmech/vumps.jl:51 -norm_pepo = 64.88018825545267 +[ Info: VUMPS init: obj = +3.309203535702e+01 -4.227375981212e-01im err = 9.3280e-01 +[ Info: VUMPS conv 5: obj = +2.483696258643e+02 +2.387851822319e-07im err = 5.0174146749e-08 time = 0.47 sec +norm_pepo = 248.36962586428106 ```` diff --git a/docs/src/examples/2.boundary_mps/main.ipynb b/docs/src/examples/2.boundary_mps/main.ipynb index 80510760a..6e37b5b2b 100644 --- a/docs/src/examples/2.boundary_mps/main.ipynb +++ b/docs/src/examples/2.boundary_mps/main.ipynb @@ -53,7 +53,9 @@ "source": [ "## Computing a PEPS norm\n", "\n", - "We start by initializing a random initial infinite PEPS:" + "We start by initializing a random initial infinite PEPS. Let us use uniformly distributed\n", + "complex entries using `rand` (which sometimes lead to better convergence than Gaussian\n", + "distributed `randn` elements):" ], "metadata": {} }, @@ -61,7 +63,7 @@ "outputs": [], "cell_type": "code", "source": [ - "peps₀ = InfinitePEPS(ComplexSpace(2), ComplexSpace(2))" + "peps₀ = InfinitePEPS(rand, ComplexF64, ComplexSpace(2), ComplexSpace(2))" ], "metadata": {}, "execution_count": null diff --git a/examples/2.boundary_mps/main.jl b/examples/2.boundary_mps/main.jl index 8566b8bac..79b16ddde 100644 --- a/examples/2.boundary_mps/main.jl +++ b/examples/2.boundary_mps/main.jl @@ -21,10 +21,12 @@ using TensorKit, PEPSKit, MPSKit md""" ## Computing a PEPS norm -We start by initializing a random initial infinite PEPS: +We start by initializing a random initial infinite PEPS. Let us use uniformly distributed +complex entries using `rand` (which sometimes lead to better convergence than Gaussian +distributed `randn` elements): """ -peps₀ = InfinitePEPS(ComplexSpace(2), ComplexSpace(2)) +peps₀ = InfinitePEPS(rand, ComplexF64, ComplexSpace(2), ComplexSpace(2)) md""" To compute its norm, we need to construct the transfer operator corresponding to From 11e9adf5083344e11d457c0f778f4475f57c0154 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 18 Apr 2025 14:20:02 +0200 Subject: [PATCH 052/113] Update example make.jl to filter out directories --- examples/make.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/make.jl b/examples/make.jl index 1c97581a6..250f9b935 100644 --- a/examples/make.jl +++ b/examples/make.jl @@ -91,7 +91,7 @@ function build_example(root, name) end function build(root="./") - examples = readdir(joinpath(@__DIR__, root)) + examples = filter(isdir, readdir(joinpath(@__DIR__, root))) # filter out directories to ignore Cache.toml, etc. return map(ex -> build_example(root, ex), examples) end From 29b1f931ed52bbf13d04231e295360091ab6e0fb Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Fri, 18 Apr 2025 14:20:22 +0200 Subject: [PATCH 053/113] Format --- examples/2.boundary_mps/main.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/2.boundary_mps/main.jl b/examples/2.boundary_mps/main.jl index 79b16ddde..6416537b1 100644 --- a/examples/2.boundary_mps/main.jl +++ b/examples/2.boundary_mps/main.jl @@ -86,7 +86,9 @@ First, we construct a PEPS with a $2 \times 2$ unit cell using the `unitcell` ke argument and then define the corresponding transfer PEPS: """ -peps₀_2x2 = InfinitePEPS(rand, ComplexF64, ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2)) +peps₀_2x2 = InfinitePEPS( + rand, ComplexF64, ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2) +) transfer_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1); md""" From 073c3717f6aa7bd7de4712936d5ae81e15099454 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Mon, 21 Apr 2025 17:33:09 +0200 Subject: [PATCH 054/113] Rename `j1_j2` to `j1_j2_model` --- docs/make.jl | 11 +-- src/PEPSKit.jl | 2 +- src/operators/models.jl | 142 ++++++++++++++++++------------------ test/examples/j1j2_model.jl | 2 +- 4 files changed, 79 insertions(+), 78 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 757451337..06772afbe 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -56,11 +56,12 @@ makedocs(; pages=[ "Home" => "index.md", "Manual" => [ - "man/states.md", - "man/environments.md", - "man/operators.md", - "man/peps_optimization.md", - "man/symmetries.md", + # "man/states.md", + # "man/environments.md", + # "man/operators.md", + # "man/peps_optimization.md", + # "man/symmetries.md", + "man/models.md", "man/multi_threading.md", "man/precompilation.md", ], diff --git a/src/PEPSKit.jl b/src/PEPSKit.jl index 86e41fc82..a3106f633 100644 --- a/src/PEPSKit.jl +++ b/src/PEPSKit.jl @@ -95,7 +95,7 @@ export ReflectDepth, ReflectWidth, Rotate, RotateReflect export symmetrize!, symmetrize_retract_and_finalize! export showtypeofgrad export InfiniteSquare, vertices, nearest_neighbours, next_nearest_neighbours -export transverse_field_ising, heisenberg_XYZ, heisenberg_XXZ, j1_j2, bose_hubbard_model +export transverse_field_ising, heisenberg_XYZ, heisenberg_XXZ, j1_j2_model, bose_hubbard_model export pwave_superconductor, hubbard_model, tj_model end # module diff --git a/src/operators/models.jl b/src/operators/models.jl index 43200e422..c8e84c4eb 100644 --- a/src/operators/models.jl +++ b/src/operators/models.jl @@ -73,77 +73,6 @@ function MPSKitModels.heisenberg_XXZ( ) end -""" - j1_j2([elt::Type{T}, symm::Type{S},] lattice::InfiniteSquare; - J1=1.0, J2=1.0, spin=1//2, sublattice=true) - -Square lattice J₁-J₂ model. The `sublattice` kwarg enables a single site unit cell via a -sublattice rotation. -""" -function j1_j2(lattice::InfiniteSquare; kwargs...) - return j1_j2(ComplexF64, Trivial, lattice; kwargs...) -end -function j1_j2( - T::Type{<:Number}, - S::Type{<:Sector}, - lattice::InfiniteSquare; - J1=1.0, - J2=1.0, - spin=1//2, - sublattice=true, -) - term_AA = S_xx(T, S; spin) + S_yy(T, S; spin) + S_zz(T, S; spin) - term_AB = if sublattice - -S_xx(T, S; spin) + S_yy(T, S; spin) - S_zz(T, S; spin) # Apply sublattice rotation - else - term_AA - end - spaces = fill(domain(term_AA)[1], (lattice.Nrows, lattice.Ncols)) - return LocalOperator( - spaces, - (neighbor => J1 * term_AB for neighbor in nearest_neighbours(lattice))..., - (neighbor => J2 * term_AA for neighbor in next_nearest_neighbours(lattice))..., - ) -end - -""" - pwave_superconductor([T=ComplexF64,] lattice::InfiniteSquare; t=1, μ=2, Δ=1, unitcell=(1, 1)) - -Square lattice p-wave superconductor model. -""" -function pwave_superconductor(lattice::InfiniteSquare; kwargs...) - return pwave_superconductor(ComplexF64, lattice; kwargs...) -end -function pwave_superconductor( - T::Type{<:Number}, lattice::InfiniteSquare; t::Number=1, μ::Number=2, Δ::Number=1 -) - physical_space = Vect[FermionParity](0 => 1, 1 => 1) - spaces = fill(physical_space, (lattice.Nrows, lattice.Ncols)) - - # on-site - h0 = zeros(T, physical_space ← physical_space) - block(h0, FermionParity(1)) .= -μ - - # two-site (x-direction) - hx = zeros(T, physical_space^2 ← physical_space^2) - block(hx, FermionParity(0)) .= [0 -Δ; -Δ 0] - block(hx, FermionParity(1)) .= [0 -t; -t 0] - - # two-site (y-direction) - hy = zeros(T, physical_space^2 ← physical_space^2) - block(hy, FermionParity(0)) .= [0 Δ*im; -Δ*im 0] - block(hy, FermionParity(1)) .= [0 -t; -t 0] - - x_neighbors = filter(n -> n[2].I[2] > n[1].I[2], nearest_neighbours(lattice)) - y_neighbors = filter(n -> n[2].I[1] > n[1].I[1], nearest_neighbours(lattice)) - return LocalOperator( - spaces, - ((idx,) => h0 for idx in vertices(lattice))..., - (neighbor => hx for neighbor in x_neighbors)..., - (neighbor => hy for neighbor in y_neighbors)..., - ) -end - function MPSKitModels.hubbard_model( T::Type{<:Number}, particle_symmetry::Type{<:Sector}, @@ -229,3 +158,74 @@ function MPSKitModels.tj_model( end return nearest_neighbour_hamiltonian(fill(pspace, size(lattice)), h) end + +""" + j1_j2_model([elt::Type{T}, symm::Type{S},] lattice::InfiniteSquare; + J1=1.0, J2=1.0, spin=1//2, sublattice=true) + +Square lattice J₁-J₂ model. The `sublattice` kwarg enables a single site unit cell via a +sublattice rotation. +""" +function j1_j2_model(lattice::InfiniteSquare; kwargs...) + return j1_j2_model(ComplexF64, Trivial, lattice; kwargs...) +end +function j1_j2_model( + T::Type{<:Number}, + S::Type{<:Sector}, + lattice::InfiniteSquare; + J1=1.0, + J2=1.0, + spin=1//2, + sublattice=true, +) + term_AA = S_xx(T, S; spin) + S_yy(T, S; spin) + S_zz(T, S; spin) + term_AB = if sublattice + -S_xx(T, S; spin) + S_yy(T, S; spin) - S_zz(T, S; spin) # Apply sublattice rotation + else + term_AA + end + spaces = fill(domain(term_AA)[1], (lattice.Nrows, lattice.Ncols)) + return LocalOperator( + spaces, + (neighbor => J1 * term_AB for neighbor in nearest_neighbours(lattice))..., + (neighbor => J2 * term_AA for neighbor in next_nearest_neighbours(lattice))..., + ) +end + +""" + pwave_superconductor([T=ComplexF64,] lattice::InfiniteSquare; t=1, μ=2, Δ=1, unitcell=(1, 1)) + +Square lattice p-wave superconductor model. +""" +function pwave_superconductor(lattice::InfiniteSquare; kwargs...) + return pwave_superconductor(ComplexF64, lattice; kwargs...) +end +function pwave_superconductor( + T::Type{<:Number}, lattice::InfiniteSquare; t::Number=1, μ::Number=2, Δ::Number=1 +) + physical_space = Vect[FermionParity](0 => 1, 1 => 1) + spaces = fill(physical_space, (lattice.Nrows, lattice.Ncols)) + + # on-site + h0 = zeros(T, physical_space ← physical_space) + block(h0, FermionParity(1)) .= -μ + + # two-site (x-direction) + hx = zeros(T, physical_space^2 ← physical_space^2) + block(hx, FermionParity(0)) .= [0 -Δ; -Δ 0] + block(hx, FermionParity(1)) .= [0 -t; -t 0] + + # two-site (y-direction) + hy = zeros(T, physical_space^2 ← physical_space^2) + block(hy, FermionParity(0)) .= [0 Δ*im; -Δ*im 0] + block(hy, FermionParity(1)) .= [0 -t; -t 0] + + x_neighbors = filter(n -> n[2].I[2] > n[1].I[2], nearest_neighbours(lattice)) + y_neighbors = filter(n -> n[2].I[1] > n[1].I[1], nearest_neighbours(lattice)) + return LocalOperator( + spaces, + ((idx,) => h0 for idx in vertices(lattice))..., + (neighbor => hx for neighbor in x_neighbors)..., + (neighbor => hy for neighbor in y_neighbors)..., + ) +end diff --git a/test/examples/j1j2_model.jl b/test/examples/j1j2_model.jl index bd886bb19..9f6511680 100644 --- a/test/examples/j1j2_model.jl +++ b/test/examples/j1j2_model.jl @@ -11,7 +11,7 @@ using OptimKit # initialize states Random.seed!(91283219347) -H = j1_j2(InfiniteSquare(); J2=0.25) +H = j1_j2_model(InfiniteSquare(); J2=0.25) peps₀ = product_peps(2, χbond; noise_amp=1e-1) peps₀ = symmetrize!(peps₀, RotateReflect()) env₀, = leading_boundary(CTMRGEnv(peps₀, ComplexSpace(χenv)), peps₀) From 3f09c26ea28793cdcd80230a0b0f63d90eebb120 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Mon, 21 Apr 2025 17:52:39 +0200 Subject: [PATCH 055/113] Update j1_j2_model and pwave_superconductor docstrings --- src/operators/models.jl | 42 ++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/src/operators/models.jl b/src/operators/models.jl index c8e84c4eb..82a373cb2 100644 --- a/src/operators/models.jl +++ b/src/operators/models.jl @@ -1,5 +1,8 @@ -## Model Hamiltonians -# ------------------- + +# +## Tools for defining Hamiltonians +# + """ nearest_neighbour_hamiltonian(lattice::Matrix{S}, h::AbstractTensorMap{T,S,2,2}) where {S,T} @@ -19,6 +22,10 @@ function nearest_neighbour_hamiltonian( return LocalOperator(lattice, terms...) end +# +## MPSKitModels.jl re-exports +# + function MPSKitModels.transverse_field_ising( T::Type{<:Number}, S::Union{Type{Trivial},Type{Z2Irrep}}, @@ -159,12 +166,25 @@ function MPSKitModels.tj_model( return nearest_neighbour_hamiltonian(fill(pspace, size(lattice)), h) end +# +## Models not yet defined in MPSKitModels +# + """ j1_j2_model([elt::Type{T}, symm::Type{S},] lattice::InfiniteSquare; - J1=1.0, J2=1.0, spin=1//2, sublattice=true) + J1=1.0, J2=1.0, spin=1//2, sublattice=true) -Square lattice J₁-J₂ model. The `sublattice` kwarg enables a single site unit cell via a -sublattice rotation. +Square lattice ``J_1\\text{-}J_2`` model, defined by the Hamiltonian + +```math +H = J_1 \\sum_{\\langle i,j \\rangle} \\vec{S}_i \\cdot \\vec{S}_j ++ J_2 \\sum_{\\langle\\langle i,j \\rangle\\rangle} \\vec{S}_i \\cdot \\vec{S}_j, +``` + +where ``\\vec{S}_i = (S_i^x, S_i^y, S_i^z)``. We denote the nearest and next-nearest neighbor +terms using ``\\langle i,j \\rangle`` and ``\\langle\\langle i,j \\rangle\\rangle``, +respectively. The `sublattice` kwarg enables a single-site unit cell ground state via a +unitary sublattice rotation. """ function j1_j2_model(lattice::InfiniteSquare; kwargs...) return j1_j2_model(ComplexF64, Trivial, lattice; kwargs...) @@ -193,9 +213,17 @@ function j1_j2_model( end """ - pwave_superconductor([T=ComplexF64,] lattice::InfiniteSquare; t=1, μ=2, Δ=1, unitcell=(1, 1)) + pwave_superconductor([T=ComplexF64,] lattice::InfiniteSquare; t=1, μ=2, Δ=1) + +Square lattice ``p``-wave superconductor model, defined by the Hamiltonian + +```math + H = -\\sum_{\\langle i,j \\rangle} \\left( t c_i^\\dagger c_j + + \\Delta c_i c_j + \\text{h.c.} \\right) - \\mu \\sum_i n_i, +``` -Square lattice p-wave superconductor model. +where ``t`` is the hopping amplitude, ``\\Delta`` specifies the superconducting gap, ``\\mu`` +is the chemical potential, and ``n_i = c_i^\\dagger c_i`` is the fermionic number operator. """ function pwave_superconductor(lattice::InfiniteSquare; kwargs...) return pwave_superconductor(ComplexF64, lattice; kwargs...) From 3d18e3c1cbfac2aaeec40dfd718ac32c0b722891 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Mon, 21 Apr 2025 18:32:56 +0200 Subject: [PATCH 056/113] Add a Models Manual section --- docs/src/man/manual.md | 56 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 docs/src/man/manual.md diff --git a/docs/src/man/manual.md b/docs/src/man/manual.md new file mode 100644 index 000000000..0ca247ee5 --- /dev/null +++ b/docs/src/man/manual.md @@ -0,0 +1,56 @@ +# Models + +PEPSKit implements physical models through the [MPSKitModels.jl](https://quantumkithub.github.io/MPSKitModels.jl/dev/) package as [`LocalOperator`](@ref) structs. +Here, we want to explain how users can define their own Hamiltonians and provide a list of +already implemented models. + +## Implementing custom models + +In order to define custom Hamiltonians, we leverage several of the useful tools provided in MPSKitModels. +In particular, we use many of the pre-defined [operators](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/operators/), which is especially useful when defining models with symmetric and fermionic tensors, since most of these operators can take a symmetry [`Sector`](@extref) as an argument, returning the appropriate symmetric `TensorMap`. +In order to specify the lattice on which the Hamiltonian is defined, we construct two-dimensional lattices as subtypes of `MPSKitModels.AbstractLattice`. +Note that so far, all models are defined on infinite square lattices, see [`InfiniteSquare`](@ref), but in the future, we plan to support other lattice geometries as well. +In order to specify tensors acting on particular lattice sites, there are a couple of handy methods that we want to point to: see `vertices`, `nearest_neighbors` and `next_nearest_neighbors` defined [here](https://github.com/QuantumKitHub/PEPSKit.jl/blob/master/src/operators/lattices/squarelattice.jl). + +For a simple example on how to implement a custom model, let's look at the implementation of the [`transverse_field_ising`](@ref) model: + +```julia +function MPSKitModels.transverse_field_ising( + T::Type{<:Number}, + S::Union{Type{Trivial},Type{Z2Irrep}}, + lattice::InfiniteSquare; + J=1.0, + g=1.0, +) + ZZ = rmul!(σᶻᶻ(T, S), -J) + X = rmul!(σˣ(T, S), g * -J) + spaces = fill(domain(X)[1], (lattice.Nrows, lattice.Ncols)) + return LocalOperator( + spaces, + (neighbor => ZZ for neighbor in nearest_neighbours(lattice))..., + ((idx,) => X for idx in vertices(lattice))..., + ) +end +``` + +This provides a good recipe for defining a model: + +1. Define the locally-acting tensors as `TensorMap`s. +2. Construct a matrix of the physical spaces these `TensorMap`s act on based on the lattice geometry. +3. Return a `LocalOperator` where we specify on which sites (e.g. on-site, nearest neighbor, etc.) the local tensors act. + +For more model implementations, check the [PEPSKit repository](https://github.com/QuantumKitHub/PEPSKit.jl/blob/master/src/operators/models.jl). + +## Implemented models + +While PEPSKit provides an interface for specifying custom Hamiltonians, it also provides a number of [pre-defined models](https://github.com/QuantumKitHub/PEPSKit.jl/blob/master/src/operators/models.jl). Some of these are models already defined in [MPSKitModels](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/), which are overloaded for two-dimensional lattices and re-exported, but there are new additions as well. The following models are provided: + +```@docs +heisenberg_XYZ +heisenberg_XXZ +j1_j2_model +hubbard_model +bose_hubbard_model +tj_model +pwave_superconductor +``` From 7d4a0e676bd2ff4591f40d3c7bb0ed7fc3791a7e Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Mon, 21 Apr 2025 18:58:00 +0200 Subject: [PATCH 057/113] Add multi-threading Manual page --- docs/src/man/multi_threading.md | 21 +++++++++++++++++++-- src/PEPSKit.jl | 3 ++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/src/man/multi_threading.md b/docs/src/man/multi_threading.md index 52e5e57be..242710d50 100644 --- a/docs/src/man/multi_threading.md +++ b/docs/src/man/multi_threading.md @@ -1,4 +1,21 @@ # Multi-threading -!!! note - This section is still under construction. +Before detailing the multi-threading capabilities of PEPSKit, there are some general remarks to be made about parallelism in Julia. +In particular, it is important to know the interaction of Julia threads and BLAS threads, and that the BLAS thread behavior is inconsistent among different vendors. +Since these details have been explained many times elsewhere, we here want to point towards the [MPSKit docs](https://quantumkithub.github.io/MPSKit.jl/stable/man/parallelism/), which provide a good rundown of the threading behavior and what to be aware of. + +## Multi-threading in PEPSKit + +PEPSKit's multi-threading features are provided through [OhMyThreads.jl](https://juliafolds2.github.io/OhMyThreads.jl/stable/). +In addition, we also supply a differentiable parallel map, which parallelizes not only the forward pass but also the reverse pass of the map application, see [`dtmap`](@ref). +The threading behaviour can be specified through a global `scheduler` that is interfaced through the [`set_scheduler!`](@ref) function: + +```@docs +set_scheduler! +``` + +By default, the OhMyThreads machinery will be used to parallelize certain parts of the code, if Julia started with multiple threads. Cases where PEPSKit can leverage parallel threads are: + +- CTMRG steps using the `:simultaneous` scheme, where we parallelize over all unit cell coordinates and spatial directions +- The reverse pass of these parallelized CTMRG steps +- Evaluating expectation values of observables, where we parallelize over the terms contained in the `LocalOperator` diff --git a/src/PEPSKit.jl b/src/PEPSKit.jl index a3106f633..b82600655 100644 --- a/src/PEPSKit.jl +++ b/src/PEPSKit.jl @@ -95,7 +95,8 @@ export ReflectDepth, ReflectWidth, Rotate, RotateReflect export symmetrize!, symmetrize_retract_and_finalize! export showtypeofgrad export InfiniteSquare, vertices, nearest_neighbours, next_nearest_neighbours -export transverse_field_ising, heisenberg_XYZ, heisenberg_XXZ, j1_j2_model, bose_hubbard_model +export transverse_field_ising, + heisenberg_XYZ, heisenberg_XXZ, j1_j2_model, bose_hubbard_model export pwave_superconductor, hubbard_model, tj_model end # module From 32b78354f68eb7abd1774c15f7268380bca33930 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Mon, 21 Apr 2025 19:01:18 +0200 Subject: [PATCH 058/113] Update docs index --- docs/src/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 852929ec1..2904e2943 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -54,11 +54,11 @@ For a more in-depth explanation of this simple example, check the [Optimizing th ## Table of contents -A detailed rundown of PEPSKit's features can be found in the Manual section, including: +A detailed rundown of PEPSKit's features can be found in the Manual section (not yet complete - coming soon™), including: ```@contents -Pages = ["man/states.md", "man/environments.md", "man/operators.md", "man/peps_optimization.md", "man/symmetries.md", "man/multi_threading.md", "man/precompilation.md"] +Pages = ["man/models.md", "man/multi_threading.md", "man/precompilation.md"] Depth = 1 ``` -Additionally, we provide a list of commented example notebooks in the Examples section. +Additionally, we provide a list of commented examples in the Examples section which showcases most of PEPSKit's capabilities in action. From c94d7254cd7f89497c1897f43a79c0d12476fbfa Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Mon, 21 Apr 2025 19:19:24 +0200 Subject: [PATCH 059/113] Fix model Manual page --- docs/src/man/{manual.md => models.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/src/man/{manual.md => models.md} (100%) diff --git a/docs/src/man/manual.md b/docs/src/man/models.md similarity index 100% rename from docs/src/man/manual.md rename to docs/src/man/models.md From e3c31978634003484ec929212e776b795e91c8f0 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Tue, 22 Apr 2025 00:10:23 +0200 Subject: [PATCH 060/113] Fix docs crossref problems --- docs/src/man/models.md | 20 +++++++++++++------- docs/src/man/multi_threading.md | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/docs/src/man/models.md b/docs/src/man/models.md index 0ca247ee5..ac3ae816a 100644 --- a/docs/src/man/models.md +++ b/docs/src/man/models.md @@ -7,12 +7,12 @@ already implemented models. ## Implementing custom models In order to define custom Hamiltonians, we leverage several of the useful tools provided in MPSKitModels. -In particular, we use many of the pre-defined [operators](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/operators/), which is especially useful when defining models with symmetric and fermionic tensors, since most of these operators can take a symmetry [`Sector`](@extref) as an argument, returning the appropriate symmetric `TensorMap`. +In particular, we use many of the pre-defined [operators](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/operators/), which is especially useful when defining models with symmetric and fermionic tensors, since most of these operators can take a symmetry as an argument, returning the appropriate symmetric `TensorMap`. In order to specify the lattice on which the Hamiltonian is defined, we construct two-dimensional lattices as subtypes of `MPSKitModels.AbstractLattice`. Note that so far, all models are defined on infinite square lattices, see [`InfiniteSquare`](@ref), but in the future, we plan to support other lattice geometries as well. In order to specify tensors acting on particular lattice sites, there are a couple of handy methods that we want to point to: see `vertices`, `nearest_neighbors` and `next_nearest_neighbors` defined [here](https://github.com/QuantumKitHub/PEPSKit.jl/blob/master/src/operators/lattices/squarelattice.jl). -For a simple example on how to implement a custom model, let's look at the implementation of the [`transverse_field_ising`](@ref) model: +For a simple example on how to implement a custom model, let's look at the implementation of the `transverse_field_ising` model: ```julia function MPSKitModels.transverse_field_ising( @@ -45,12 +45,18 @@ For more model implementations, check the [PEPSKit repository](https://github.co While PEPSKit provides an interface for specifying custom Hamiltonians, it also provides a number of [pre-defined models](https://github.com/QuantumKitHub/PEPSKit.jl/blob/master/src/operators/models.jl). Some of these are models already defined in [MPSKitModels](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/), which are overloaded for two-dimensional lattices and re-exported, but there are new additions as well. The following models are provided: +### MPSKitModels.jl models + +- [`transverse_field_ising`](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.transverse_field_ising) +- [`heisenberg_XYZ`](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.heisenberg_XYZ) +- [`heisenberg_XXZ`](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.heisenberg_XXZ) +- [`hubbard_model`](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.hubbard_model) +- [`bose_hubbard_model`](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.bose_hubbard_model) +- [`tj_model`](https://github.com/QuantumKitHub/MPSKitModels.jl/blob/dadd066ff6588c8491d33ce9b812033f3bb4a970/src/models/hamiltonians.jl#L400) + +### PEPSKit.jl models + ```@docs -heisenberg_XYZ -heisenberg_XXZ j1_j2_model -hubbard_model -bose_hubbard_model -tj_model pwave_superconductor ``` diff --git a/docs/src/man/multi_threading.md b/docs/src/man/multi_threading.md index 242710d50..8d15f67c1 100644 --- a/docs/src/man/multi_threading.md +++ b/docs/src/man/multi_threading.md @@ -7,7 +7,7 @@ Since these details have been explained many times elsewhere, we here want to po ## Multi-threading in PEPSKit PEPSKit's multi-threading features are provided through [OhMyThreads.jl](https://juliafolds2.github.io/OhMyThreads.jl/stable/). -In addition, we also supply a differentiable parallel map, which parallelizes not only the forward pass but also the reverse pass of the map application, see [`dtmap`](@ref). +In addition, we also supply a differentiable parallel map, which parallelizes not only the forward pass but also the reverse pass of the map application, see [`PEPSKit.dtmap`](@ref). The threading behaviour can be specified through a global `scheduler` that is interfaced through the [`set_scheduler!`](@ref) function: ```@docs From 8180afdaf170e398db869219e88a54326eba8b2c Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Tue, 22 Apr 2025 10:56:39 +0200 Subject: [PATCH 061/113] Add Examples index page --- docs/make.jl | 10 +--------- docs/src/examples/index.md | 8 ++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 docs/src/examples/index.md diff --git a/docs/make.jl b/docs/make.jl index 06772afbe..7fcc119f2 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -12,9 +12,6 @@ using DocumenterCitations using DocumenterInterLinks using PEPSKit -# examples -example_dir = joinpath(@__DIR__, "src", "examples") - # bibliography bibpath = joinpath(@__DIR__, "src", "assets", "pepskit.bib") bib = CitationBibliography(bibpath; style=:authoryear) @@ -42,11 +39,6 @@ mathengine = MathJax3( ), ) -# built examples target directories -example_pages = map(readdir(joinpath(@__DIR__, "src", "examples"))) do dir - return joinpath("examples", dir, "index.md") -end - makedocs(; modules=[PEPSKit], sitename="PEPSKit.jl", @@ -65,7 +57,7 @@ makedocs(; "man/multi_threading.md", "man/precompilation.md", ], - "Examples" => example_pages, + "Examples" => "examples/index.md", "Library" => "lib/lib.md", "References" => "references.md", ], diff --git a/docs/src/examples/index.md b/docs/src/examples/index.md new file mode 100644 index 000000000..ee3f138c0 --- /dev/null +++ b/docs/src/examples/index.md @@ -0,0 +1,8 @@ +# Examples + +Here we provide a number of commented example pages that serve as short tutorials on how to use PEPSKit in various situations. Applications span from two-dimensional quantum models, including fermionic Hamiltonians, to classical three-dimensional statistical mechanics: + +```@contents +Pages = map(file -> joinpath(file, "index.md"), readdir("./")) +Depth = 1 +``` From 409e1ce58ec5d7b2a5befe0a49caa9ae298bec8f Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Tue, 22 Apr 2025 11:01:49 +0200 Subject: [PATCH 062/113] Add small cosmetic improvements --- docs/src/index.md | 2 +- docs/src/man/multi_threading.md | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 2904e2943..393bbd646 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -54,7 +54,7 @@ For a more in-depth explanation of this simple example, check the [Optimizing th ## Table of contents -A detailed rundown of PEPSKit's features can be found in the Manual section (not yet complete - coming soon™), including: +A detailed rundown of PEPSKit's features can be found in the Manual section (not yet complete, more coming soon™), including: ```@contents Pages = ["man/models.md", "man/multi_threading.md", "man/precompilation.md"] diff --git a/docs/src/man/multi_threading.md b/docs/src/man/multi_threading.md index 8d15f67c1..4a9a620bc 100644 --- a/docs/src/man/multi_threading.md +++ b/docs/src/man/multi_threading.md @@ -4,8 +4,6 @@ Before detailing the multi-threading capabilities of PEPSKit, there are some gen In particular, it is important to know the interaction of Julia threads and BLAS threads, and that the BLAS thread behavior is inconsistent among different vendors. Since these details have been explained many times elsewhere, we here want to point towards the [MPSKit docs](https://quantumkithub.github.io/MPSKit.jl/stable/man/parallelism/), which provide a good rundown of the threading behavior and what to be aware of. -## Multi-threading in PEPSKit - PEPSKit's multi-threading features are provided through [OhMyThreads.jl](https://juliafolds2.github.io/OhMyThreads.jl/stable/). In addition, we also supply a differentiable parallel map, which parallelizes not only the forward pass but also the reverse pass of the map application, see [`PEPSKit.dtmap`](@ref). The threading behaviour can be specified through a global `scheduler` that is interfaced through the [`set_scheduler!`](@ref) function: From 85abd2309946fa8360931e18039ab0e98e54771e Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Tue, 22 Apr 2025 11:12:29 +0200 Subject: [PATCH 063/113] Fix multithreading typos --- docs/make.jl | 2 +- docs/src/index.md | 2 +- docs/src/man/{multi_threading.md => multithreading.md} | 6 +++--- src/Defaults.jl | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) rename docs/src/man/{multi_threading.md => multithreading.md} (81%) diff --git a/docs/make.jl b/docs/make.jl index 7fcc119f2..cae7804f8 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -54,7 +54,7 @@ makedocs(; # "man/peps_optimization.md", # "man/symmetries.md", "man/models.md", - "man/multi_threading.md", + "man/multithreading.md", "man/precompilation.md", ], "Examples" => "examples/index.md", diff --git a/docs/src/index.md b/docs/src/index.md index 393bbd646..f80436fa5 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -57,7 +57,7 @@ For a more in-depth explanation of this simple example, check the [Optimizing th A detailed rundown of PEPSKit's features can be found in the Manual section (not yet complete, more coming soon™), including: ```@contents -Pages = ["man/models.md", "man/multi_threading.md", "man/precompilation.md"] +Pages = ["man/models.md", "man/multithreading.md", "man/precompilation.md"] Depth = 1 ``` diff --git a/docs/src/man/multi_threading.md b/docs/src/man/multithreading.md similarity index 81% rename from docs/src/man/multi_threading.md rename to docs/src/man/multithreading.md index 4a9a620bc..764ebbd21 100644 --- a/docs/src/man/multi_threading.md +++ b/docs/src/man/multithreading.md @@ -1,10 +1,10 @@ -# Multi-threading +# Multithreading -Before detailing the multi-threading capabilities of PEPSKit, there are some general remarks to be made about parallelism in Julia. +Before detailing the multithreading capabilities of PEPSKit, there are some general remarks to be made about parallelism in Julia. In particular, it is important to know the interaction of Julia threads and BLAS threads, and that the BLAS thread behavior is inconsistent among different vendors. Since these details have been explained many times elsewhere, we here want to point towards the [MPSKit docs](https://quantumkithub.github.io/MPSKit.jl/stable/man/parallelism/), which provide a good rundown of the threading behavior and what to be aware of. -PEPSKit's multi-threading features are provided through [OhMyThreads.jl](https://juliafolds2.github.io/OhMyThreads.jl/stable/). +PEPSKit's multithreading features are provided through [OhMyThreads.jl](https://juliafolds2.github.io/OhMyThreads.jl/stable/). In addition, we also supply a differentiable parallel map, which parallelizes not only the forward pass but also the reverse pass of the map application, see [`PEPSKit.dtmap`](@ref). The threading behaviour can be specified through a global `scheduler` that is interfaced through the [`set_scheduler!`](@ref) function: diff --git a/src/Defaults.jl b/src/Defaults.jl index 8aa30afe1..31ebc6209 100644 --- a/src/Defaults.jl +++ b/src/Defaults.jl @@ -74,7 +74,7 @@ Module containing default algorithm parameter values and arguments. ## OhMyThreads scheduler -- `scheduler=Ref{Scheduler}(...)` : Multi-threading scheduler which can be accessed via `set_scheduler!`. +- `scheduler=Ref{Scheduler}(...)` : Multithreading scheduler which can be accessed via `set_scheduler!`. """ module Defaults @@ -129,7 +129,7 @@ const scheduler = Ref{Scheduler}() """ set_scheduler!([scheduler]; kwargs...) -Set `OhMyThreads` multi-threading scheduler parameters. +Set `OhMyThreads` multithreading scheduler parameters. The function either accepts a `scheduler` as an `OhMyThreads.Scheduler` or as a symbol where the corresponding parameters are specificed as keyword arguments. From 9f14584aa5a51c98834e604dfab53720d37169ba Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 24 Apr 2025 10:44:21 +0200 Subject: [PATCH 064/113] Fix docs generation --- src/Defaults.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Defaults.jl b/src/Defaults.jl index 0b9b264fa..9e80248cd 100644 --- a/src/Defaults.jl +++ b/src/Defaults.jl @@ -30,7 +30,7 @@ Module containing default algorithm parameter values and arguments. * `svd_rrule_min_krylovdim=$(Defaults.svd_rrule_min_krylovdim)` : Minimal Krylov dimension of the reverse-rule algorithm (if it is a Krylov algorithm). * `svd_rrule_verbosity=$(Defaults.svd_rrule_verbosity)` : SVD gradient output verbosity. * `svd_rrule_alg=:$(Defaults.svd_rrule_alg)` : Reverse-rule algorithm for the SVD gradient. - - `:full`: Uses a modified version of TensorKit's reverse-rule for `tsvd` which doesn't solve any linear problem and instead requires access to the full SVD, see [`FullSVDReverseRule`](@ref). + - `:full`: Uses a modified version of TensorKit's reverse-rule for `tsvd` which doesn't solve any linear problem and instead requires access to the full SVD, see [`PEPSKit.FullSVDReverseRule`](@ref). - `:gmres`: GMRES iterative linear solver, see the [KrylovKit docs](https://jutho.github.io/KrylovKit.jl/stable/man/algorithms/#KrylovKit.GMRES) for details - `:bicgstab`: BiCGStab iterative linear solver, see the [KrylovKit docs](https://jutho.github.io/KrylovKit.jl/stable/man/algorithms/#KrylovKit.BiCGStab) for details - `:arnoldi`: Arnoldi Krylov algorithm, see the [KrylovKit docs](https://jutho.github.io/KrylovKit.jl/stable/man/algorithms/#KrylovKit.Arnoldi) for details From 594d697fd3677199709e6da50eb099e9aaffdf30 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 24 Apr 2025 10:44:32 +0200 Subject: [PATCH 065/113] Add MPSKitModels interlinks and external references --- docs/make.jl | 2 +- docs/src/man/models.md | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index cae7804f8..8003195cf 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -22,7 +22,7 @@ links = InterLinks( "TensorKit" => "https://jutho.github.io/TensorKit.jl/stable/", "KrylovKit" => "https://jutho.github.io/KrylovKit.jl/stable/", "MPSKit" => "https://quantumkithub.github.io/MPSKit.jl/stable/", - # "MPSKitModels" => "https://quantumkithub.github.io/MPSKitModels.jl/", + "MPSKitModels" => "https://quantumkithub.github.io/MPSKitModels.jl/dev/", # "Zygote" => "https://fluxml.ai/Zygote.jl/stable/", "ChainRulesCore" => "https://juliadiff.org/ChainRulesCore.jl/stable/", ) diff --git a/docs/src/man/models.md b/docs/src/man/models.md index ac3ae816a..fa33da988 100644 --- a/docs/src/man/models.md +++ b/docs/src/man/models.md @@ -7,12 +7,12 @@ already implemented models. ## Implementing custom models In order to define custom Hamiltonians, we leverage several of the useful tools provided in MPSKitModels. -In particular, we use many of the pre-defined [operators](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/operators/), which is especially useful when defining models with symmetric and fermionic tensors, since most of these operators can take a symmetry as an argument, returning the appropriate symmetric `TensorMap`. -In order to specify the lattice on which the Hamiltonian is defined, we construct two-dimensional lattices as subtypes of `MPSKitModels.AbstractLattice`. +In particular, we use many of the pre-defined [operators](@extref MPSKitModels Operators), which is especially useful when defining models with symmetric and fermionic tensors, since most of these operators can take a symmetry as an argument, returning the appropriate symmetric `TensorMap`. +In order to specify the lattice on which the Hamiltonian is defined, we construct two-dimensional lattices as subtypes of [`MPSKitModels.AbstractLattice`](@extref). Note that so far, all models are defined on infinite square lattices, see [`InfiniteSquare`](@ref), but in the future, we plan to support other lattice geometries as well. In order to specify tensors acting on particular lattice sites, there are a couple of handy methods that we want to point to: see `vertices`, `nearest_neighbors` and `next_nearest_neighbors` defined [here](https://github.com/QuantumKitHub/PEPSKit.jl/blob/master/src/operators/lattices/squarelattice.jl). -For a simple example on how to implement a custom model, let's look at the implementation of the `transverse_field_ising` model: +For a simple example on how to implement a custom model, let's look at the implementation of the [`MPSKitModels.transverse_field_ising`](@extref) model: ```julia function MPSKitModels.transverse_field_ising( @@ -43,16 +43,16 @@ For more model implementations, check the [PEPSKit repository](https://github.co ## Implemented models -While PEPSKit provides an interface for specifying custom Hamiltonians, it also provides a number of [pre-defined models](https://github.com/QuantumKitHub/PEPSKit.jl/blob/master/src/operators/models.jl). Some of these are models already defined in [MPSKitModels](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/), which are overloaded for two-dimensional lattices and re-exported, but there are new additions as well. The following models are provided: +While PEPSKit provides an interface for specifying custom Hamiltonians, it also provides a number of [pre-defined models](https://github.com/QuantumKitHub/PEPSKit.jl/blob/master/src/operators/models.jl). Some of these are models already defined in [MPSKitModels](@extref MPSKitModels Models), which are overloaded for two-dimensional lattices and re-exported, but there are new additions as well. The following models are provided: ### MPSKitModels.jl models -- [`transverse_field_ising`](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.transverse_field_ising) -- [`heisenberg_XYZ`](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.heisenberg_XYZ) -- [`heisenberg_XXZ`](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.heisenberg_XXZ) -- [`hubbard_model`](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.hubbard_model) -- [`bose_hubbard_model`](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.bose_hubbard_model) -- [`tj_model`](https://github.com/QuantumKitHub/MPSKitModels.jl/blob/dadd066ff6588c8491d33ce9b812033f3bb4a970/src/models/hamiltonians.jl#L400) +- [`MPSKitModels.transverse_field_ising`](@extref) +- [`MPSKitModels.heisenberg_XYZ`](@extref) +- [`MPSKitModels.heisenberg_XXZ`](@extref) +- [`MPSKitModels.hubbard_model`](@extref) +- [`MPSKitModels.bose_hubbard_model`](@extref) +- [`MPSKitModels.tj_model`](@extref) ### PEPSKit.jl models From 666ffbd25f509905387c91164a6a5e11be12f356 Mon Sep 17 00:00:00 2001 From: Lukas Devos Date: Thu, 24 Apr 2025 08:11:31 -0400 Subject: [PATCH 066/113] Add MPSKitModels docstrings --- docs/make.jl | 8 +++++--- docs/src/man/models.md | 14 ++++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 8003195cf..4bcfe1a39 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -11,13 +11,14 @@ using Documenter using DocumenterCitations using DocumenterInterLinks using PEPSKit +using MPSKitModels: MPSKitModels # used for docstrings # bibliography bibpath = joinpath(@__DIR__, "src", "assets", "pepskit.bib") bib = CitationBibliography(bibpath; style=:authoryear) # interlinks -# Zygote and MPSKitModels didn't update to documenter v1 yet... +# Zygote didn't update to documenter v1 yet... links = InterLinks( "TensorKit" => "https://jutho.github.io/TensorKit.jl/stable/", "KrylovKit" => "https://jutho.github.io/KrylovKit.jl/stable/", @@ -40,7 +41,7 @@ mathengine = MathJax3( ) makedocs(; - modules=[PEPSKit], + modules=[PEPSKit, MPSKitModels], sitename="PEPSKit.jl", format=Documenter.HTML(; prettyurls=get(ENV, "CI", nothing) == "true", mathengine, size_threshold=1024000 @@ -61,7 +62,8 @@ makedocs(; "Library" => "lib/lib.md", "References" => "references.md", ], - checkdocs=:exports, + checkdocs=:none, + # checkdocs_ignored_modules=[MPSKitModels], # doesn't seem to work... plugins=[bib, links], ) diff --git a/docs/src/man/models.md b/docs/src/man/models.md index fa33da988..63c706f43 100644 --- a/docs/src/man/models.md +++ b/docs/src/man/models.md @@ -47,12 +47,14 @@ While PEPSKit provides an interface for specifying custom Hamiltonians, it also ### MPSKitModels.jl models -- [`MPSKitModels.transverse_field_ising`](@extref) -- [`MPSKitModels.heisenberg_XYZ`](@extref) -- [`MPSKitModels.heisenberg_XXZ`](@extref) -- [`MPSKitModels.hubbard_model`](@extref) -- [`MPSKitModels.bose_hubbard_model`](@extref) -- [`MPSKitModels.tj_model`](@extref) +```@docs +MPSKitModels.transverse_field_ising +MPSKitModels.heisenberg_XYZ +MPSKitModels.heisenberg_XXZ +MPSKitModels.hubbard_model +MPSKitModels.bose_hubbard_model +MPSKitModels.tj_model +``` ### PEPSKit.jl models From a75da4759a5b35b5ed3ace7baa279b397603c68e Mon Sep 17 00:00:00 2001 From: Yue Zhengyuan Date: Sun, 27 Apr 2025 23:45:20 +0800 Subject: [PATCH 067/113] Fix hopping term formula of Hubbard model --- examples/5.fermi_hubbard/main.jl | 2 +- examples/6.hubbard_su/main.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/5.fermi_hubbard/main.jl b/examples/5.fermi_hubbard/main.jl index a70e9ed60..6dce003bd 100644 --- a/examples/5.fermi_hubbard/main.jl +++ b/examples/5.fermi_hubbard/main.jl @@ -6,7 +6,7 @@ In this example, we will demonstrate how to handle fermionic PEPS tensors and ho optimize them. To that end, we consider the two-dimensional Hubbard model ```math -H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- + +H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- - c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i ``` diff --git a/examples/6.hubbard_su/main.jl b/examples/6.hubbard_su/main.jl index 2ce76699e..914868661 100644 --- a/examples/6.hubbard_su/main.jl +++ b/examples/6.hubbard_su/main.jl @@ -1,13 +1,13 @@ using Markdown #hide md""" -# Hubbard model imaginary time evolution using simple update +# Simple update for the Fermi-Hubbard model at half-filling Once again, we consider the Hubbard model but this time we obtain the ground-state PEPS by imaginary time evoluation. In particular, we'll use the [`SimpleUpdate`](@ref) algorithm. As a reminder, we define the Hubbard model as ```math -H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- + +H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- - c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i ``` From a7fd1a3579cc130b866acd7556ae242c2f090db8 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Mon, 28 Apr 2025 18:39:19 +0200 Subject: [PATCH 068/113] Fix `examples/make.jl` --- examples/make.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/make.jl b/examples/make.jl index 250f9b935..d0dff952d 100644 --- a/examples/make.jl +++ b/examples/make.jl @@ -90,7 +90,8 @@ function build_example(root, name) end end -function build(root="./") +function build(root="") + cd(@__DIR__) examples = filter(isdir, readdir(joinpath(@__DIR__, root))) # filter out directories to ignore Cache.toml, etc. return map(ex -> build_example(root, ex), examples) end From 2292b6e2353f1724a6d109529026350b3d805b7a Mon Sep 17 00:00:00 2001 From: leburgel Date: Tue, 29 Apr 2025 07:26:29 +0200 Subject: [PATCH 069/113] Add 3D stat mech example --- docs/src/assets/pepskit.bib | 39 ++++++ examples/3d_ising/main.jl | 266 ++++++++++++++++++++++++++++++++++++ examples/Project.toml | 3 + examples/README.md | 2 +- 4 files changed, 309 insertions(+), 1 deletion(-) create mode 100644 examples/3d_ising/main.jl diff --git a/docs/src/assets/pepskit.bib b/docs/src/assets/pepskit.bib index c890cc9a9..528317809 100644 --- a/docs/src/assets/pepskit.bib +++ b/docs/src/assets/pepskit.bib @@ -84,3 +84,42 @@ @article{corboz_variational_2016 doi = {10.1103/PhysRevB.94.035133}, url = {https://link.aps.org/doi/10.1103/PhysRevB.94.035133} } + +@article{haegeman_diagonalizing_2017, + title = {Diagonalizing {{Transfer Matrices}} and {{Matrix Product Operators}}: {{A Medley}} of {{Exact}} and {{Computational Methods}}}, + shorttitle = {Diagonalizing {{Transfer Matrices}} and {{Matrix Product Operators}}}, + author = {Haegeman, Jutho and Verstraete, Frank}, + year = {2017}, + journal = {Annual Review of Condensed Matter Physics}, + volume = {8}, + number = {1}, + pages = {355--406}, + doi = {10.1146/annurev-conmatphys-031016-025507}, + keywords = {Bethe ansatz,entanglement,equilibrium and nonequilibrium statistical physics,fusion tensor categories,many-body physics,quantum spin chains,tensor networks} +} + +@article{vanderstraeten_tangentspace_2019, + title = {Tangent-Space Methods for Uniform Matrix Product States}, + author = {Vanderstraeten, Laurens and Haegeman, Jutho and Verstraete, Frank}, + year = {2019}, + month = jan, + journal = {SciPost Physics Lecture Notes}, + pages = {007}, + issn = {2590-1990}, + doi = {10.21468/SciPostPhysLectNotes.7}, + langid = {english}, + language = {en} +} + +@article{hasenbusch_monte_2001, +author = {HASENBUSCH, MARTIN}, +title = {MONTE CARLO STUDIES OF THE THREE-DIMENSIONAL ISING MODEL IN EQUILIBRIUM}, +journal = {International Journal of Modern Physics C}, +volume = {12}, +number = {07}, +pages = {911-1009}, +year = {2001}, +doi = {10.1142/S0129183101002383}, +URL = {https://doi.org/10.1142/S0129183101002383}, +eprint = {https://doi.org/10.1142/S0129183101002383}, +} diff --git a/examples/3d_ising/main.jl b/examples/3d_ising/main.jl new file mode 100644 index 000000000..803d0706c --- /dev/null +++ b/examples/3d_ising/main.jl @@ -0,0 +1,266 @@ +using Markdown #hide +md""" +# The 3D classical Ising model + +In a previous example we have already demonstrated an application of PEPSKit.jl to the study +of two-dimensional classical statistical mechanics models. In this example, we will take +this one step further, and showcase how one can use PEPSKit.jl to study three-dimensional +classical statistical mechanics models. We will demonstrate this for the specific case of +the three-dimensional classical Ising model, but the same techniques can be applied to other +three-dimensional classical models as well. + +The workflow showcased in this example is a bit more experimental and less 'black-box' than +previous examples. Therefore it also serves as a demonstration of some of the more internal +functionality of PEPSKit.jl, and how one can adapt it to different or less 'standard' kinds +of problems. + +Let us consider again the partition function of the classical Ising model, + +```math +\mathcal{Z}(\beta) = \sum_{\{s\}} \exp(-\beta H(s)) \text{ with } H(s) = -J \sum_{\langle i, j \rangle} s_i s_j . +``` + +where now the classical spins $s_i \in \{+1, -1\}$ are located on the vertices $i$ of a +three-dimensional cubic lattice. The partition function of this model can be represented as +a 3D tensor network with a rank-6 tensor at each vertex of the lattice. Such a network can +be contracted by finding the fixed point of the corresponding transfer operator, in exactly +the same spirit as the boundary MPS methods demonstrated in a previous example. + +Let's start by making the example deterministic and we doing our imports: +""" + +using Random +using LinearAlgebra +using PEPSKit, TensorKit +using KrylovKit, OptimKit, Zygote + +Random.seed!(81812781144); + +md""" +## Defining the partition function + +Just as in the 2D case, the first step is to define the partition function as a tensor +network. The procedure is exactly the same as before, the only difference being that now +every spin participates in interactions associated to six links adjacent to that site. This +means that the partition function can be written as an infinite 3D network with a single +constituent rank-6 [`PEPOTensor`](@ref) `O` located at each site of the cubic lattice. To +verify our example we will check the magnetization and energy, so we also define the +corresponding rank-6 tensors `M` and `E` while we're at it. +""" + +function three_dimensional_classical_ising(; beta, J=1.0) + K = beta * J + + # Boltzmann weights + t = ComplexF64[exp(K) exp(-K); exp(-K) exp(K)] + r = eigen(t) + q = r.vectors * sqrt(LinearAlgebra.Diagonal(r.values)) * r.vectors + + # local partition function tensor + O = zeros(2, 2, 2, 2, 2, 2) + O[1, 1, 1, 1, 1, 1] = 1 + O[2, 2, 2, 2, 2, 2] = 1 + @tensor o[-1 -2; -3 -4 -5 -6] := + O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] + + # magnetization tensor + M = copy(O) + M[2, 2, 2, 2, 2, 2] *= -1 + @tensor m[-1 -2; -3 -4 -5 -6] := + M[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] + + # bond interaction tensor and energy-per-site tensor + e = ComplexF64[-J J; J -J] .* q + @tensor e_x[-1 -2; -3 -4 -5 -6] := + O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * e[-4; 4] * q[-5; 5] * q[-6; 6] + @tensor e_y[-1 -2; -3 -4 -5 -6] := + O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * e[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] + @tensor e_z[-1 -2; -3 -4 -5 -6] := + O[1 2; 3 4 5 6] * e[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] + e = e_x + e_y + e_z + + # fixed tensor map space for all three + TMS = ℂ^2 ⊗ (ℂ^2)' ← ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)' + + return TensorMap(o, TMS), TensorMap(m, TMS), TensorMap(e, TMS) +end + +md""" +Let's initialize these tensors at inverse temperature ``\beta=0.2391``, which corresponds to a slightly +lower temperature than the critical value ``\beta_c=0.2216544…`` +""" + +beta = 0.2391 +O, M, E = three_dimensional_classical_ising(; beta) +O isa PEPSKit.PEPOTensor + +md""" +## Contracting the partition function + +To contract our infinite 3D partition function, we first reinterpret it as an infinite power +of a slice-to-slice transfer operator ``T``, where ``T`` can be seen as an infinite 2D +projected entangled-pair operator (PEPO) consisting of the rank-6 tensor `O` at each site of +an infinite 3D square lattice. In the same spirit as the boundary MPS approach, all we need +to contract the whole partition function is to find the leading eigenvector of this PEPO. +The fixed point of such a PEPO exactly corresponds to a PEPS, and for the case of a +Hermitian transfer operator we can find this PEPS through [variational optimization](@cite +vanderstraeten_residual_2018). + +Indeed, for a Hermition transfer operator ``T`` we can formulate the eigenvalue equation as +for a fixed point PEPS ``|\psi\rangle`` as a variational problem + +```math +|\psi\rangle = \text{argmin}_{|\psi\rangle} - \lim_{N \to ∞} \frac{1}{N} \log \left( \frac{\langle \psi | T | \psi \rangle}{\langle \psi | \psi \rangle} \right) +``` +where ``N`` is the diverging number of sites of the 2D transfer operator ``T``. + +### Defining the cost function + +Using PEPSKit.jl, this cost function and its gradient can be easily computed, after which we can use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it. +recognize the denominator ``\langle \psi | \psi \rangle`` as the familiar PEPS norm, where +we can compute the norm per site as the [`network_value`](@ref) of the corresponding +[`InfiniteSquareNetwork`](@ref) by contracting it with the CTMRG algorithm. Similarly, the +numerator ``\langle \psi | T | \psi \rangle`` is nothing more than an +`InfiniteSquareNetwork` consisting of three layers corresponding to the ket, transfer +operator and bra objects. This object can be constructed and contracted in a straightforward +way, after we can again compute its `network_value`. + +So to define our cost function, we just need to construct the transfer operator as an +[`InfinitePEPO`](@ref) and specify a contraction algorithm we can use to compute the values +of the two relevant 2D networks. In addition, we'll specify the specific reverse rule +algorithm that will be used to compute the gradient of this cost function +""" + +boundary_alg = SimultaneousCTMRG(; maxiter=150, tol=1e-8, verbosity=2) +rrule_alg = EigSolver(; + solver_alg=KrylovKit.Arnoldi(; maxiter=30, tol=1e-6, eager=true), iterscheme=:diffgauge +) +T = InfinitePEPO(O) + +function pepo_costfun((psi, env2, env3)) + # use Zygote to compute the gradient automatically + E, gs = withgradient(psi) do ψ + # construct the PEPS norm network + n2 = InfiniteSquareNetwork(ψ) + # contract this network + env2′, info = PEPSKit.hook_pullback( + leading_boundary, env2, n2, boundary_alg; alg_rrule=rrule_alg + ) + # construct the PEPS-PEPO-PEPS overlap network + n3 = InfiniteSquareNetwork(ψ, T) + # contract this network + env3′, info = PEPSKit.hook_pullback( + leading_boundary, env3, n3, boundary_alg; alg_rrule=rrule_alg + ) + # update the environments for reuse + PEPSKit.ignore_derivatives() do + PEPSKit.update!(env2, env2′) + PEPSKit.update!(env3, env3′) + end + # compute the network values per site + λ3 = network_value(n3, env3) + λ2 = network_value(n2, env2) + # use this to compute the actual cost function + return -log(real(λ3 / λ2)) + end + g = only(gs) + return E, g +end + +md""" +There are a few things to note about this cost function definition. Since we will pass +it to the `optimize` method from OptimKit.jl, we require it to return both our cost function +and the corresponding gradient. To do this, we simply use the `withgradient` method from +Zygote.jl to automatically compute the gradient of the cost function straight from the +primal computation. Since our cost function involves contraction using `leading_boundary`, +we also have to specify exactly how Zygote should handle the backpropagation of the gradient +through this function. This can be done using the [`PEPSKit.hook_pullback`](@ref) function from +PEPSKit.jl, which allows to hook into the pullback of a given function by specifying a +specific algorithm for the pullback computation. Here, we opted to use an Arnoldi method to +solve the linear problem defining the gradient of the network contraction at its fixed +point. This is exactly the workflow underlying [`PEPSKit.fixedpoint`](@ref) internally, and +more info on particular gradient algorithms can be found in the corresponding docstring. + +### Characterizing the optimization manifold + +In order to make the best use of OptimKit.jl, we should specify some properties of the +manifold on which we are optimizing. Looking at our cost function defined above, a point on +our optimization manifold corresponds to a `Tuple` of three objects. The first is an +`InfinitePEPS` encoding the fixed point we are actually optimizing, while the second and +third are `CTMRGEnv` objects corresponding to the environments of the double and triple +layer networks ``\langle \psi | \psi \rangle`` and ``\langle \psi | T | \psi \rangle`` +respectively. While the environments are just there so we can reuse them between subsequent +contractions and we don't need to think about them much, optimizing over the manifold of +`InfinitePEPS` requires a bit more care. + +In particular, we need to define two kinds of operations on this manifold: a retraction and +a transport. The retraction, corresponding to the `retract` keyword argument of +`OptimKit.optimize`, specifies how to move from a point on a manifold along a given descent +direction to obtain a new manifold point. The transport, corresponding to the `transport!` +keyword argument of `OptimKit.optimize`, specifies how to transport a descent direction at a +given manifold point to a valid descent direction at a different manifold point according to +the appropriate metric. In PEPSKit.jl, these two procedures are defined through the +[`PEPSKit.peps_retract`](@ref) and [`PEPSKit.peps_transport!`](@ref) methods. While it is +instructive to read the corresponding docstrings in order to understand what these actually +do, here we can just blindly reuse them where the only difference is that we have to pass +along an extra environment since our cost function requires two distinct contractions as +opposed to the setting of Hamiltonian PEPS optimization. +""" + +function pepo_retract(x, η, α) + x´_partial, ξ = PEPSKit.peps_retract(x[1:2], η, α) + x´ = (x´_partial..., deepcopy(x[3])) + return x´, ξ +end +function pepo_transport!(ξ, x, η, α, x´) + return PEPSKit.peps_transport!(ξ, x[1:2], η, α, x´[1:2]) +end + +md""" +### Finding the fixed point + +All that is left then is to specify the virtual spaces of the PEPS and the two environments, +initialize them in the appropriate way, choose an optimization algortithm and call the +`optimize` function from OptimKit.jl to get our desired PEPS fixed point. """ + +Vpeps = ℂ^2 +Venv = ℂ^12 + +psi0 = initializePEPS(T, Vpeps) +env2_0 = CTMRGEnv(InfiniteSquareNetwork(psi0), Venv) +env3_0 = CTMRGEnv(InfiniteSquareNetwork(psi0, T), Venv) + +optimizer_alg = LBFGS(32; maxiter=50, gradtol=1e-5, verbosity=3) + +(psi_final, env2_final, env3_final), f, = optimize( + pepo_costfun, + (psi0, env2_0, env3_0), + optimizer_alg; + inner=PEPSKit.real_inner, + retract=pepo_retract, + (transport!)=(pepo_transport!), +) + +md""" +### Verifying the result + +Having found the fixed point, we have essentially contracted the entire partition function +and we can start computing observables. The free energy per site for example is just given by +the final value of the cost function we have just optimized. +""" + +@show f + +md""" +As another check, we can compute the magnetization per site and compare it to a [reference +value obtaind through Monte-Carlo simulations](@cite hasenbusch_monte_2001). +""" + +n3_final = InfiniteSquareNetwork(psi_final, T) +num = PEPSKit.contract_local_tensor((1, 1, 1), M, n3_final, env3_final) +denom = PEPSKit._contract_site((1, 1), n3_final, env3_final) +m = abs(num / denom) + +m_ref = 0.667162 + +@show abs(m - m_ref) diff --git a/examples/Project.toml b/examples/Project.toml index c29979984..b66b36c4a 100644 --- a/examples/Project.toml +++ b/examples/Project.toml @@ -1,10 +1,13 @@ [deps] +KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502" MPSKitModels = "ca635005-6f8c-4cd1-b51d-8491250ef2ab" +OptimKit = "77e91f04-9b3b-57a6-a776-40b61faaebe0" PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb" QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec" +Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" diff --git a/examples/README.md b/examples/README.md index 7a728316c..242429b06 100644 --- a/examples/README.md +++ b/examples/README.md @@ -11,7 +11,7 @@ generation, run: ``julia examples/make.jl` By default, this will only generate files when the input file has not changed. This is -achieved by keeping a checksum of the `main.jl` file in each example in a `cache.toml`. +achieved by keeping a checksum of the `main.jl` file in each example in a `Cache.toml`. Total recompilation can be achieved by deleting this file, or alternatively you can just delete the entries for which you wish to generate new files. From 206903b912efd5e76d492ceb32c4276e3826c0a7 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Tue, 29 Apr 2025 10:51:24 +0200 Subject: [PATCH 070/113] Update README key features Co-authored-by: Lukas Devos --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d6c09d40..60aa9ed45 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ pkg> add PEPSKit ## Key features - Construction and manipulation of infinite projected entangled-pair states (PEPS) -- Contraction of infinite PEPS using the corner transfer matrix renormalization group (CTMRG) and variational uniform matrix product states (VUMPS) +- Contraction of infinite PEPS using the corner transfer matrix renormalization group (CTMRG) and boundary MPS methods - Native support for symmetric tensors through [TensorKit](https://github.com/Jutho/TensorKit.jl), including fermionic tensors - PEPS optimization using automatic differentiation (AD) provided through [Zygote](https://fluxml.ai/Zygote.jl/stable/) - Imaginary time evolution algorithms From 4561b5dc843f2bb611fcd73019950e9ef75fcefb Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Tue, 29 Apr 2025 11:02:04 +0200 Subject: [PATCH 071/113] Update examples/make.jl Co-authored-by: Lukas Devos --- examples/make.jl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/make.jl b/examples/make.jl index d0dff952d..a682a6494 100644 --- a/examples/make.jl +++ b/examples/make.jl @@ -91,9 +91,10 @@ function build_example(root, name) end function build(root="") - cd(@__DIR__) - examples = filter(isdir, readdir(joinpath(@__DIR__, root))) # filter out directories to ignore Cache.toml, etc. - return map(ex -> build_example(root, ex), examples) + return cd(@__DIR__) do + examples = filter(isdir, readdir(joinpath(@__DIR__, root))) # filter out directories to ignore Cache.toml, etc. + return map(ex -> build_example(root, ex), examples) + end end # ---------------------------------------------------------------------------------------- # From c1744a1f5e58c77bb0054c818c45f0bb26348531 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Tue, 29 Apr 2025 11:52:16 +0200 Subject: [PATCH 072/113] Fix make.jl root to repair Cache.toml --- examples/make.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/make.jl b/examples/make.jl index a682a6494..438ad2cdd 100644 --- a/examples/make.jl +++ b/examples/make.jl @@ -90,7 +90,7 @@ function build_example(root, name) end end -function build(root="") +function build(root="./") return cd(@__DIR__) do examples = filter(isdir, readdir(joinpath(@__DIR__, root))) # filter out directories to ignore Cache.toml, etc. return map(ex -> build_example(root, ex), examples) From 7c5af70489b22f9feaf016e9473ff27c8d2405e4 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Tue, 29 Apr 2025 11:52:55 +0200 Subject: [PATCH 073/113] Fix 3D Ising example --- examples/{3d_ising => 9.3d_ising}/main.jl | 43 ++++++++++++----------- 1 file changed, 22 insertions(+), 21 deletions(-) rename examples/{3d_ising => 9.3d_ising}/main.jl (93%) diff --git a/examples/3d_ising/main.jl b/examples/9.3d_ising/main.jl similarity index 93% rename from examples/3d_ising/main.jl rename to examples/9.3d_ising/main.jl index 803d0706c..512f3d21a 100644 --- a/examples/3d_ising/main.jl +++ b/examples/9.3d_ising/main.jl @@ -43,7 +43,7 @@ Just as in the 2D case, the first step is to define the partition function as a network. The procedure is exactly the same as before, the only difference being that now every spin participates in interactions associated to six links adjacent to that site. This means that the partition function can be written as an infinite 3D network with a single -constituent rank-6 [`PEPOTensor`](@ref) `O` located at each site of the cubic lattice. To +constituent rank-6 [`PEPSKit.PEPOTensor`](@ref) `O` located at each site of the cubic lattice. To verify our example we will check the magnetization and energy, so we also define the corresponding rank-6 tensors `M` and `E` while we're at it. """ @@ -51,25 +51,25 @@ corresponding rank-6 tensors `M` and `E` while we're at it. function three_dimensional_classical_ising(; beta, J=1.0) K = beta * J - # Boltzmann weights + ## Boltzmann weights t = ComplexF64[exp(K) exp(-K); exp(-K) exp(K)] r = eigen(t) q = r.vectors * sqrt(LinearAlgebra.Diagonal(r.values)) * r.vectors - # local partition function tensor + ## local partition function tensor O = zeros(2, 2, 2, 2, 2, 2) O[1, 1, 1, 1, 1, 1] = 1 O[2, 2, 2, 2, 2, 2] = 1 @tensor o[-1 -2; -3 -4 -5 -6] := O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] - # magnetization tensor + ## magnetization tensor M = copy(O) M[2, 2, 2, 2, 2, 2] *= -1 @tensor m[-1 -2; -3 -4 -5 -6] := M[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] - # bond interaction tensor and energy-per-site tensor + ## bond interaction tensor and energy-per-site tensor e = ComplexF64[-J J; J -J] .* q @tensor e_x[-1 -2; -3 -4 -5 -6] := O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * e[-4; 4] * q[-5; 5] * q[-6; 6] @@ -79,11 +79,11 @@ function three_dimensional_classical_ising(; beta, J=1.0) O[1 2; 3 4 5 6] * e[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] e = e_x + e_y + e_z - # fixed tensor map space for all three + ## fixed tensor map space for all three TMS = ℂ^2 ⊗ (ℂ^2)' ← ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)' return TensorMap(o, TMS), TensorMap(m, TMS), TensorMap(e, TMS) -end +end; md""" Let's initialize these tensors at inverse temperature ``\beta=0.2391``, which corresponds to a slightly @@ -131,41 +131,41 @@ of the two relevant 2D networks. In addition, we'll specify the specific reverse algorithm that will be used to compute the gradient of this cost function """ -boundary_alg = SimultaneousCTMRG(; maxiter=150, tol=1e-8, verbosity=2) +boundary_alg = SimultaneousCTMRG(; maxiter=150, tol=1e-8, verbosity=1) rrule_alg = EigSolver(; solver_alg=KrylovKit.Arnoldi(; maxiter=30, tol=1e-6, eager=true), iterscheme=:diffgauge ) T = InfinitePEPO(O) function pepo_costfun((psi, env2, env3)) - # use Zygote to compute the gradient automatically + ## use Zygote to compute the gradient automatically E, gs = withgradient(psi) do ψ - # construct the PEPS norm network + ## construct the PEPS norm network n2 = InfiniteSquareNetwork(ψ) - # contract this network + ## contract this network env2′, info = PEPSKit.hook_pullback( leading_boundary, env2, n2, boundary_alg; alg_rrule=rrule_alg ) - # construct the PEPS-PEPO-PEPS overlap network + ## construct the PEPS-PEPO-PEPS overlap network n3 = InfiniteSquareNetwork(ψ, T) - # contract this network + ## contract this network env3′, info = PEPSKit.hook_pullback( leading_boundary, env3, n3, boundary_alg; alg_rrule=rrule_alg ) - # update the environments for reuse + ## update the environments for reuse PEPSKit.ignore_derivatives() do PEPSKit.update!(env2, env2′) PEPSKit.update!(env3, env3′) end - # compute the network values per site + ## compute the network values per site λ3 = network_value(n3, env3) λ2 = network_value(n2, env2) - # use this to compute the actual cost function + ## use this to compute the actual cost function return -log(real(λ3 / λ2)) end g = only(gs) return E, g -end +end; md""" There are a few things to note about this cost function definition. Since we will pass @@ -214,14 +214,15 @@ function pepo_retract(x, η, α) end function pepo_transport!(ξ, x, η, α, x´) return PEPSKit.peps_transport!(ξ, x[1:2], η, α, x´[1:2]) -end +end; md""" ### Finding the fixed point All that is left then is to specify the virtual spaces of the PEPS and the two environments, initialize them in the appropriate way, choose an optimization algortithm and call the -`optimize` function from OptimKit.jl to get our desired PEPS fixed point. """ +`optimize` function from OptimKit.jl to get our desired PEPS fixed point. +""" Vpeps = ℂ^2 Venv = ℂ^12 @@ -230,7 +231,7 @@ psi0 = initializePEPS(T, Vpeps) env2_0 = CTMRGEnv(InfiniteSquareNetwork(psi0), Venv) env3_0 = CTMRGEnv(InfiniteSquareNetwork(psi0, T), Venv) -optimizer_alg = LBFGS(32; maxiter=50, gradtol=1e-5, verbosity=3) +optimizer_alg = LBFGS(32; maxiter=100, gradtol=1e-5, verbosity=3) (psi_final, env2_final, env3_final), f, = optimize( pepo_costfun, @@ -239,7 +240,7 @@ optimizer_alg = LBFGS(32; maxiter=50, gradtol=1e-5, verbosity=3) inner=PEPSKit.real_inner, retract=pepo_retract, (transport!)=(pepo_transport!), -) +); md""" ### Verifying the result From d763e6504461bcc5c85afd43b90dc94a40267ca1 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Tue, 29 Apr 2025 13:57:03 +0200 Subject: [PATCH 074/113] Remove example numbers, update boundary MPS example --- docs/src/examples/1.heisenberg/index.md | 414 ------------------ docs/src/examples/1.heisenberg/main.ipynb | 392 ----------------- .../index.md | 21 +- .../main.ipynb | 0 docs/src/examples/3.bose_hubbard/index.md | 324 -------------- .../3d_ising_partition_function/index.md | 380 ++++++++++++++++ .../3d_ising_partition_function/main.ipynb | 384 ++++++++++++++++ docs/src/examples/4.xxz/index.md | 238 ---------- docs/src/examples/4.xxz/main.ipynb | 199 --------- docs/src/examples/5.fermi_hubbard/index.md | 244 ----------- docs/src/examples/5.fermi_hubbard/main.ipynb | 221 ---------- docs/src/examples/6.hubbard_su/index.md | 215 --------- docs/src/examples/6.hubbard_su/main.ipynb | 248 ----------- docs/src/examples/7.heisenberg_su/index.md | 212 --------- docs/src/examples/7.heisenberg_su/main.ipynb | 253 ----------- docs/src/examples/bose_hubbard/index.md | 330 ++++++++++++++ .../main.ipynb | 0 .../{2.boundary_mps => boundary_mps}/index.md | 38 +- .../main.ipynb | 10 +- docs/src/examples/index.md | 12 +- .../main.jl | 0 .../main.jl | 0 examples/Cache.toml | 12 +- .../{3.bose_hubbard => bose_hubbard}/main.jl | 0 examples/boundary_mps.jl | 86 ---- .../{2.boundary_mps => boundary_mps}/main.jl | 6 +- .../main.jl | 0 examples/{1.heisenberg => heisenberg}/main.jl | 0 .../main.jl | 0 examples/{6.hubbard_su => hubbard_su}/main.jl | 0 examples/{4.xxz => xxz}/main.jl | 0 31 files changed, 1152 insertions(+), 3087 deletions(-) delete mode 100644 docs/src/examples/1.heisenberg/index.md delete mode 100644 docs/src/examples/1.heisenberg/main.ipynb rename docs/src/examples/{8.ising_partition_function => 2d_ising_partition_function}/index.md (93%) rename docs/src/examples/{8.ising_partition_function => 2d_ising_partition_function}/main.ipynb (100%) delete mode 100644 docs/src/examples/3.bose_hubbard/index.md create mode 100644 docs/src/examples/3d_ising_partition_function/index.md create mode 100644 docs/src/examples/3d_ising_partition_function/main.ipynb delete mode 100644 docs/src/examples/4.xxz/index.md delete mode 100644 docs/src/examples/4.xxz/main.ipynb delete mode 100644 docs/src/examples/5.fermi_hubbard/index.md delete mode 100644 docs/src/examples/5.fermi_hubbard/main.ipynb delete mode 100644 docs/src/examples/6.hubbard_su/index.md delete mode 100644 docs/src/examples/6.hubbard_su/main.ipynb delete mode 100644 docs/src/examples/7.heisenberg_su/index.md delete mode 100644 docs/src/examples/7.heisenberg_su/main.ipynb create mode 100644 docs/src/examples/bose_hubbard/index.md rename docs/src/examples/{3.bose_hubbard => bose_hubbard}/main.ipynb (100%) rename docs/src/examples/{2.boundary_mps => boundary_mps}/index.md (86%) rename docs/src/examples/{2.boundary_mps => boundary_mps}/main.ipynb (96%) rename examples/{8.ising_partition_function => 2d_ising_partition_function}/main.jl (100%) rename examples/{9.3d_ising => 3d_ising_partition_function}/main.jl (100%) rename examples/{3.bose_hubbard => bose_hubbard}/main.jl (100%) delete mode 100644 examples/boundary_mps.jl rename examples/{2.boundary_mps => boundary_mps}/main.jl (96%) rename examples/{5.fermi_hubbard => fermi_hubbard}/main.jl (100%) rename examples/{1.heisenberg => heisenberg}/main.jl (100%) rename examples/{7.heisenberg_su => heisenberg_su}/main.jl (100%) rename examples/{6.hubbard_su => hubbard_su}/main.jl (100%) rename examples/{4.xxz => xxz}/main.jl (100%) diff --git a/docs/src/examples/1.heisenberg/index.md b/docs/src/examples/1.heisenberg/index.md deleted file mode 100644 index d30928d00..000000000 --- a/docs/src/examples/1.heisenberg/index.md +++ /dev/null @@ -1,414 +0,0 @@ -```@meta -EditURL = "../../../../examples/1.heisenberg/main.jl" -``` - -[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//1.heisenberg/main.ipynb) -[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//1.heisenberg/main.ipynb) -[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//1.heisenberg) - - -# [Optimizing the 2D Heisenberg model](@id examples_heisenberg) - -In this example we want to provide a basic rundown of PEPSKit's optimization workflow for -PEPS. To that end, we will consider the two-dimensional Heisenberg model on a square lattice - -```math -H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j -``` - -Here, we want to set $J_x=J_y=J_z=1$ where the Heisenberg model is in the antiferromagnetic -regime. Due to the bipartite sublattice structure of antiferromagnetic order one needs a -PEPS ansatz with a $2 \times 2$ unit cell. This can be circumvented by performing a unitary -sublattice rotation on all B-sites resulting in a change of parameters to -$(J_x, J_y, J_z)=(-1, 1, -1)$. This gives us a unitarily equivalent Hamiltonian (with the -same spectrum) with a ground state on a single-site unit cell. - -Let us get started by fixing the random seed of this example to make it deterministic: - -````julia -using Random -Random.seed!(123456789); -```` - -We're going to need only two packages: `TensorKit`, since we use that for all the underlying -tensor operations, and `PEPSKit` itself. So let us import these: - -````julia -using TensorKit, PEPSKit -```` - -## Defining the Heisenberg Hamiltonian - -To create the sublattice rotated Heisenberg Hamiltonian on an infinite square lattice, we use -the `heisenberg_XYZ` method from [MPSKitModels](https://quantumkithub.github.io/MPSKitModels.jl/dev/) -which is redefined for the `InfiniteSquare` and reexported in PEPSKit: - -````julia -H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1) -```` - -```` -LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 2, 2, Vector{ComplexF64}}}, Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 2, 2, Vector{ComplexF64}}}}, TensorKit.ComplexSpace}(TensorKit.ComplexSpace[ℂ^2;;], ((CartesianIndex(1, 1), CartesianIndex(1, 2)) => TensorMap((ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)): -[:, :, 1, 1] = - -0.25 + 0.0im 0.0 + 0.0im - 0.0 + 0.0im -0.5 + 0.0im - -[:, :, 2, 1] = - 0.0 + 0.0im 0.0 + 0.0im - 0.25 + 0.0im 0.0 + 0.0im - -[:, :, 1, 2] = - 0.0 + 0.0im 0.25 + 0.0im - 0.0 + 0.0im 0.0 + 0.0im - -[:, :, 2, 2] = - -0.5 + 0.0im 0.0 + 0.0im - 0.0 + 0.0im -0.25 + 0.0im -, (CartesianIndex(1, 1), CartesianIndex(2, 1)) => TensorMap((ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)): -[:, :, 1, 1] = - -0.25 + 0.0im 0.0 + 0.0im - 0.0 + 0.0im -0.5 + 0.0im - -[:, :, 2, 1] = - 0.0 + 0.0im 0.0 + 0.0im - 0.25 + 0.0im 0.0 + 0.0im - -[:, :, 1, 2] = - 0.0 + 0.0im 0.25 + 0.0im - 0.0 + 0.0im 0.0 + 0.0im - -[:, :, 2, 2] = - -0.5 + 0.0im 0.0 + 0.0im - 0.0 + 0.0im -0.25 + 0.0im -)) -```` - -## Setting up the algorithms and initial guesses - -Next, we set the simulation parameters. During optimization, the PEPS will be contracted -using CTMRG and the PEPS gradient will be computed by differentiating through the CTMRG -routine using AD. Since the algorithmic stack that implements this is rather elaborate, -the amount of settings one can configure is also quite large. To reduce this complexity, -PEPSKit defaults to (presumably) reasonable settings which also dynamically adapts to the -user-specified parameters. - -First, we set the bond dimension `Dbond` of the virtual PEPS indices and the environment -dimension `χenv` of the virtual corner and transfer matrix indices. - -````julia -Dbond = 2 -χenv = 16; -```` - -To configure the CTMRG algorithm, we create a `NamedTuple` containing different keyword -arguments. To see a description of all arguments, see the docstring of -[`leading_boundary`](@ref). Here, we want to converge the CTMRG environments up to a -specific tolerance and during the CTMRG run keep all index dimensions fixed: - -````julia -boundary_alg = (; tol=1e-10, trscheme=(; alg=:fixedspace)); -```` - -Let us also configure the optimizer algorithm. We are going to optimize the PEPS using the -L-BFGS optimizer from [OptimKit](https://github.com/Jutho/OptimKit.jl). Again, we specify -the convergence tolerance (for the gradient norm) as well as the maximal number of iterations -and the BFGS memory size (which is used to approximate the Hessian): - -````julia -optimizer_alg = (; alg=:lbfgs, tol=1e-4, maxiter=100, lbfgs_memory=16); -```` - -Additionally, during optimization, we want to reuse the previous CTMRG environment to -initialize the CTMRG run of the current optimization step using the `reuse_env` argument. -And to control the output information, we set the `verbosity`: - -````julia -reuse_env = true -verbosity = 3; -```` - -Next, we initialize a random PEPS which will be used as an initial guess for the -optimization. To get a PEPS with physical dimension 2 (since we have a spin-1/2 Hamiltonian) -with complex-valued random Gaussian entries, we set: - -````julia -peps₀ = InfinitePEPS(randn, ComplexF64, 2, Dbond) -```` - -```` -InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}(TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}[TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')): -[:, :, 1, 1, 1] = - 0.07382174258286094 + 0.12820373667088403im 0.7897519397510839 + 0.9113654266438473im - 0.2553716885006697 - 0.4358399804354269im -1.0272416446076236 - 0.12635062198157215im - -[:, :, 2, 1, 1] = - 0.16833628450178303 - 0.10088950122180829im -0.9702030532300809 + 0.010730752411986726im - -1.6804460553576506 + 0.29081053879369084im 0.6844811667615024 + 0.09101537356941222im - -[:, :, 1, 2, 1] = - 0.5085938050744258 + 0.3786892551842583im 1.0020057959636561 - 1.4704891009758718im - -0.6153328223084331 + 0.10417896606055738im 0.6024931811537675 - 1.0348374874397468im - -[:, :, 2, 2, 1] = - -0.027201695938305456 + 0.5778042099380925im 0.09232089635078945 + 0.6143070126937361im - 1.0707115218777772 - 0.5747168579241235im -0.5819741818511422 - 0.9842624134267605im - -[:, :, 1, 1, 2] = - 1.2332543810053822 - 1.7783531996396438im 0.8887723728085348 + 0.7809798723615474im - 1.2251189302516847 - 0.6853683793073324im 1.5333834584675397 - 0.13856216581406375im - -[:, :, 2, 1, 2] = - 0.1406381347783769 + 0.6630243440357264im -0.7294596235434386 + 0.40327909254711103im - 0.7212056487788236 + 0.24320971945037498im 0.9991347929322827 + 0.0017902515981375842im - -[:, :, 1, 2, 2] = - 0.34282910982693904 - 0.4865238029567361im 0.9380949844871762 - 0.6985342237892025im - -0.7437083517319159 - 0.6895708849529253im -0.8981092940164176 + 0.9720706252141459im - -[:, :, 2, 2, 2] = - -0.8897079923413616 - 0.7145412189457411im 0.07771261045117502 - 0.6400190994609709im - -1.6099412157243007 + 0.8855200965611144im 0.7357380595021633 + 0.4626916850143416im -;;]) -```` - -The last thing we need before we can start the optimization is an initial CTMRG environment. -Typically, a random environment which we converge on `peps₀` serves as a good starting point. -To contract a PEPS starting from an environment using CTMRG, we call [`leading_boundary`](@ref): - -````julia -env_random = CTMRGEnv(randn, ComplexF64, peps₀, ℂ^χenv); -env₀, info_ctmrg = leading_boundary(env_random, peps₀; boundary_alg...); -```` - -```` -[ Info: CTMRG init: obj = -2.749614463601e+00 +3.639628057806e+00im err = 1.0000e+00 -[ Info: CTMRG conv 27: obj = +9.727103564786e+00 err = 2.6201184615e-11 time = 0.30 sec - -```` - -Besides the converged environment, `leading_boundary` also returns a `NamedTuple` of -informational quantities such as the last (maximal) SVD truncation error: - -````julia -@show info_ctmrg.truncation_error; -```` - -```` -info_ctmrg.truncation_error = 0.0017032153529848298 - -```` - -## Ground state search - -Finally, we can start the optimization by calling [`fixedpoint`](@ref) on `H` with our -settings for the boundary (CTMRG) algorithm and the optimizer. This might take a while -(especially the precompilation of AD code in this case): - -````julia -peps, env, E, info_opt = fixedpoint( - H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity -); -```` - -```` -[ Info: LBFGS: initializing with f = 0.000601645310, ‖∇f‖ = 9.3547e-01 -┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Float64}`; -│ this fallback will disappear in future versions of VectorInterface.jl -└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 -[ Info: LBFGS: iter 1, time 4.15 s: f = -0.489796540851, ‖∇f‖ = 6.0022e-01, α = 5.94e+01, m = 0, nfg = 5 -┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; -│ this fallback will disappear in future versions of VectorInterface.jl -└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 -[ Info: LBFGS: iter 2, time 5.37 s: f = -0.501984649868, ‖∇f‖ = 5.3739e-01, α = 2.80e-01, m = 1, nfg = 2 -[ Info: LBFGS: iter 3, time 5.99 s: f = -0.523163971924, ‖∇f‖ = 3.9927e-01, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 4, time 7.32 s: f = -0.538654390178, ‖∇f‖ = 4.1552e-01, α = 2.29e-01, m = 3, nfg = 2 -[ Info: LBFGS: iter 5, time 10.35 s: f = -0.549821445064, ‖∇f‖ = 4.4002e-01, α = 6.90e-02, m = 4, nfg = 4 -[ Info: LBFGS: iter 6, time 11.80 s: f = -0.569016778155, ‖∇f‖ = 4.8450e-01, α = 2.26e-01, m = 5, nfg = 2 -[ Info: LBFGS: iter 7, time 12.46 s: f = -0.587127261652, ‖∇f‖ = 4.1972e-01, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 8, time 13.09 s: f = -0.600154758006, ‖∇f‖ = 2.1793e-01, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 9, time 13.71 s: f = -0.606883012825, ‖∇f‖ = 1.9566e-01, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 10, time 14.33 s: f = -0.625040022199, ‖∇f‖ = 3.0328e-01, α = 1.00e+00, m = 9, nfg = 1 -[ Info: LBFGS: iter 11, time 14.94 s: f = -0.639164743235, ‖∇f‖ = 2.3076e-01, α = 1.00e+00, m = 10, nfg = 1 -[ Info: LBFGS: iter 12, time 15.55 s: f = -0.647174335216, ‖∇f‖ = 2.6065e-01, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 13, time 16.21 s: f = -0.650338609163, ‖∇f‖ = 1.6108e-01, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 14, time 16.93 s: f = -0.654606007953, ‖∇f‖ = 7.7724e-02, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 15, time 17.53 s: f = -0.655962567656, ‖∇f‖ = 5.1320e-02, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 16, time 18.14 s: f = -0.657034966533, ‖∇f‖ = 5.6668e-02, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 17, time 18.77 s: f = -0.658609918816, ‖∇f‖ = 4.5267e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 18, time 19.36 s: f = -0.659421361772, ‖∇f‖ = 4.8752e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 19, time 19.97 s: f = -0.659584257676, ‖∇f‖ = 5.7745e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 20, time 20.56 s: f = -0.659811195031, ‖∇f‖ = 1.7740e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 21, time 21.16 s: f = -0.659874427409, ‖∇f‖ = 1.4673e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 22, time 22.38 s: f = -0.660072570659, ‖∇f‖ = 1.9320e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 23, time 22.95 s: f = -0.660232141902, ‖∇f‖ = 1.7545e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 24, time 23.56 s: f = -0.660380080163, ‖∇f‖ = 2.3752e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 25, time 24.15 s: f = -0.660461052221, ‖∇f‖ = 2.3596e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 26, time 24.74 s: f = -0.660554016679, ‖∇f‖ = 1.2681e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 27, time 25.33 s: f = -0.660617092333, ‖∇f‖ = 1.0485e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 28, time 25.95 s: f = -0.660813477825, ‖∇f‖ = 1.7986e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 29, time 26.58 s: f = -0.660960969686, ‖∇f‖ = 1.7471e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 30, time 27.22 s: f = -0.661039077160, ‖∇f‖ = 1.1401e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 31, time 27.85 s: f = -0.661087806652, ‖∇f‖ = 1.0339e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 32, time 28.46 s: f = -0.661121452359, ‖∇f‖ = 8.8764e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 33, time 29.08 s: f = -0.661180968072, ‖∇f‖ = 1.0798e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 34, time 30.34 s: f = -0.661206863491, ‖∇f‖ = 9.1298e-03, α = 5.16e-01, m = 16, nfg = 2 -[ Info: LBFGS: iter 35, time 30.96 s: f = -0.661226335408, ‖∇f‖ = 6.6169e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 36, time 31.60 s: f = -0.661260012209, ‖∇f‖ = 5.9848e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 37, time 32.21 s: f = -0.661268668988, ‖∇f‖ = 1.0826e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 38, time 32.81 s: f = -0.661283178602, ‖∇f‖ = 5.0739e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 39, time 33.42 s: f = -0.661293239500, ‖∇f‖ = 4.8729e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 40, time 34.04 s: f = -0.661307958912, ‖∇f‖ = 6.2349e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 41, time 34.66 s: f = -0.661342970541, ‖∇f‖ = 9.2762e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 42, time 35.28 s: f = -0.661417237192, ‖∇f‖ = 1.7461e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 43, time 35.93 s: f = -0.661494994773, ‖∇f‖ = 2.7924e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 44, time 36.56 s: f = -0.661665032445, ‖∇f‖ = 2.1193e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 45, time 37.20 s: f = -0.661840699875, ‖∇f‖ = 2.3535e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 46, time 37.83 s: f = -0.661983211854, ‖∇f‖ = 2.0945e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 47, time 38.48 s: f = -0.662069016591, ‖∇f‖ = 1.9084e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 48, time 39.11 s: f = -0.662233515834, ‖∇f‖ = 1.7527e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 49, time 40.41 s: f = -0.662332106545, ‖∇f‖ = 1.6912e-02, α = 5.23e-01, m = 16, nfg = 2 -[ Info: LBFGS: iter 50, time 41.05 s: f = -0.662397705763, ‖∇f‖ = 1.0361e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 51, time 41.68 s: f = -0.662434512495, ‖∇f‖ = 8.3812e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 52, time 42.32 s: f = -0.662459914679, ‖∇f‖ = 5.8461e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 53, time 42.97 s: f = -0.662475090799, ‖∇f‖ = 1.1955e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 54, time 43.61 s: f = -0.662490551714, ‖∇f‖ = 4.3803e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 55, time 44.25 s: f = -0.662494796646, ‖∇f‖ = 3.0803e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 56, time 44.89 s: f = -0.662500144159, ‖∇f‖ = 3.3935e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 57, time 45.54 s: f = -0.662501922158, ‖∇f‖ = 5.3636e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 58, time 46.17 s: f = -0.662504711089, ‖∇f‖ = 2.3876e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 59, time 46.82 s: f = -0.662506778078, ‖∇f‖ = 1.8200e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 60, time 47.45 s: f = -0.662508721362, ‖∇f‖ = 1.9946e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 61, time 48.08 s: f = -0.662510450644, ‖∇f‖ = 3.2749e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 62, time 48.70 s: f = -0.662510853517, ‖∇f‖ = 2.9884e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 63, time 49.32 s: f = -0.662511685410, ‖∇f‖ = 8.0551e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 64, time 49.94 s: f = -0.662511841022, ‖∇f‖ = 7.3596e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 65, time 50.56 s: f = -0.662512305957, ‖∇f‖ = 8.4091e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 66, time 51.18 s: f = -0.662512680347, ‖∇f‖ = 7.3318e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 67, time 52.41 s: f = -0.662512901164, ‖∇f‖ = 1.2648e-03, α = 4.44e-01, m = 16, nfg = 2 -[ Info: LBFGS: iter 68, time 53.03 s: f = -0.662513239918, ‖∇f‖ = 5.7061e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 69, time 53.65 s: f = -0.662513444109, ‖∇f‖ = 6.0192e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 70, time 54.28 s: f = -0.662513692106, ‖∇f‖ = 7.2056e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 71, time 54.91 s: f = -0.662513794204, ‖∇f‖ = 1.0926e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 72, time 55.53 s: f = -0.662513946704, ‖∇f‖ = 4.1373e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 73, time 56.15 s: f = -0.662514020708, ‖∇f‖ = 3.2774e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 74, time 56.77 s: f = -0.662514074542, ‖∇f‖ = 4.1795e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 75, time 57.40 s: f = -0.662514105503, ‖∇f‖ = 9.0816e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 76, time 58.03 s: f = -0.662514180025, ‖∇f‖ = 2.8220e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 77, time 58.66 s: f = -0.662514206339, ‖∇f‖ = 2.0931e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 78, time 59.27 s: f = -0.662514231519, ‖∇f‖ = 2.6637e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 79, time 60.51 s: f = -0.662514243124, ‖∇f‖ = 2.4156e-04, α = 5.50e-01, m = 16, nfg = 2 -[ Info: LBFGS: iter 80, time 61.13 s: f = -0.662514255964, ‖∇f‖ = 1.4589e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 81, time 61.73 s: f = -0.662514264597, ‖∇f‖ = 1.6299e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 82, time 62.32 s: f = -0.662514270687, ‖∇f‖ = 2.0842e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 83, time 62.94 s: f = -0.662514276005, ‖∇f‖ = 1.1227e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 84, time 63.53 s: f = -0.662514281099, ‖∇f‖ = 1.0747e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 85, time 64.13 s: f = -0.662514284644, ‖∇f‖ = 1.0173e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: converged after 86 iterations and time 64.73 s: f = -0.662514291826, ‖∇f‖ = 8.8301e-05 - -```` - -Note that `fixedpoint` returns the final optimized PEPS, the last converged environment, -the final energy estimate as well as a `NamedTuple` of diagnostics. This allows us to, e.g., -analyze the number of cost function calls or the history of gradient norms to evaluate -the convergence rate: - -````julia -@show info_opt.fg_evaluations info_opt.gradnorms[1:10:end]; -```` - -```` -info_opt.fg_evaluations = 101 -info_opt.gradnorms[1:10:end] = [0.9354746780119341, 0.30327773685601944, 0.01774018270739478, 0.011400758285761247, 0.006234905315448026, 0.010361182129783082, 0.0019945520233835886, 0.0007205561049739842, 0.00014589086981901128] - -```` - -Let's now compare the optimized energy against an accurate Quantum Monte Carlo estimate by -[Sandvik](@cite sandvik_computational_2011), where the energy per site was found to be -$E_{\text{ref}}=−0.6694421$. From our simple optimization we find: - -````julia -@show E; -```` - -```` -E = -0.6625142918261725 - -```` - -While this energy is in the right ballpark, there is still quite some deviation from the -accurate reference energy. This, however, can be attributed to the small bond dimension - an -optimization with larger bond dimension would approach this value much more closely. - -A more reasonable comparison would be against another finite bond dimension PEPS simulation. -For example, Juraj Hasik's data from $J_1\text{-}J_2$ -[PEPS simulations](https://github.com/jurajHasik/j1j2_ipeps_states/blob/main/single-site_pg-C4v-A1/j20.0/state_1s_A1_j20.0_D2_chi_opt48.dat) -yields $E_{D=2,\chi=16}=-0.660231\dots$ which is more in line with what we find here. - -## Compute the correlation lengths and transfer matrix spectra - -In practice, in order to obtain an accurate and variational energy estimate, one would need -to compute multiple energies at different environment dimensions and extrapolate in, e.g., -the correlation length or the second gap of the transfer matrix spectrum. For that, we would -need the [`correlation_length`](@ref) function, which computes the horizontal and vertical -correlation lengths and transfer matrix spectra for all unit cell coordinates: - -````julia -ξ_h, ξ_v, λ_h, λ_v = correlation_length(peps, env) -@show ξ_h ξ_v; -```` - -```` -ξ_h = [1.0343456168037697] -ξ_v = [1.0242117798450008] - -```` - -## Computing observables - -As a last thing, we want to see how we can compute expectation values of observables, given -the optimized PEPS and its CTMRG environment. To compute, e.g., the magnetization, we first -need to define the observable as a `TensorMap`: - -````julia -σ_z = TensorMap([1.0 0.0; 0.0 -1.0], ℂ^2, ℂ^2) -```` - -```` -TensorMap(ℂ^2 ← ℂ^2): - 1.0 0.0 - 0.0 -1.0 - -```` - -In order to be able to contract it with the PEPS and environment, we define need to define a -`LocalOperator` and specify on which physical spaces and sites the observable acts. That way, -the PEPS-environment-operator contraction gets automatically generated (also works for -multi-site operators!). See the [`LocalOperator`](@ref) docstring for more details. -The magnetization is just a single-site observable, so we have: - -````julia -M = LocalOperator(fill(ℂ^2, 1, 1), (CartesianIndex(1, 1),) => σ_z) -```` - -```` -LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}}, TensorKit.TensorMap{Float64, TensorKit.ComplexSpace, 1, 1, Vector{Float64}}}}, TensorKit.ComplexSpace}(TensorKit.ComplexSpace[ℂ^2;;], ((CartesianIndex(1, 1),) => TensorMap(ℂ^2 ← ℂ^2): - 1.0 0.0 - 0.0 -1.0 -,)) -```` - -Finally, to evaluate the expecation value on the `LocalOperator`, we call: - -````julia -@show expectation_value(peps, M, env); -```` - -```` -expectation_value(peps, M, env) = -0.7533587094249098 - 3.448382721363169e-16im - -```` - ---- - -*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* - diff --git a/docs/src/examples/1.heisenberg/main.ipynb b/docs/src/examples/1.heisenberg/main.ipynb deleted file mode 100644 index 5c50a5495..000000000 --- a/docs/src/examples/1.heisenberg/main.ipynb +++ /dev/null @@ -1,392 +0,0 @@ -{ - "cells": [ - { - "outputs": [], - "cell_type": "code", - "source": [ - "using Markdown #hide" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "# Optimizing the 2D Heisenberg model\n", - "\n", - "In this example we want to provide a basic rundown of PEPSKit's optimization workflow for\n", - "PEPS. To that end, we will consider the two-dimensional Heisenberg model on a square lattice\n", - "\n", - "$$\n", - "H = \\sum_{\\langle i,j \\rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j\n", - "$$\n", - "\n", - "Here, we want to set $J_x=J_y=J_z=1$ where the Heisenberg model is in the antiferromagnetic\n", - "regime. Due to the bipartite sublattice structure of antiferromagnetic order one needs a\n", - "PEPS ansatz with a $2 \\times 2$ unit cell. This can be circumvented by performing a unitary\n", - "sublattice rotation on all B-sites resulting in a change of parameters to\n", - "$(J_x, J_y, J_z)=(-1, 1, -1)$. This gives us a unitarily equivalent Hamiltonian (with the\n", - "same spectrum) with a ground state on a single-site unit cell.\n", - "\n", - "Let us get started by fixing the random seed of this example to make it deterministic:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "using Random\n", - "Random.seed!(123456789);" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "We're going to need only two packages: `TensorKit`, since we use that for all the underlying\n", - "tensor operations, and `PEPSKit` itself. So let us import these:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "using TensorKit, PEPSKit" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "## Defining the Heisenberg Hamiltonian\n", - "\n", - "To create the sublattice rotated Heisenberg Hamiltonian on an infinite square lattice, we use\n", - "the `heisenberg_XYZ` method from [MPSKitModels](https://quantumkithub.github.io/MPSKitModels.jl/dev/)\n", - "which is redefined for the `InfiniteSquare` and reexported in PEPSKit:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1)" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "## Setting up the algorithms and initial guesses\n", - "\n", - "Next, we set the simulation parameters. During optimization, the PEPS will be contracted\n", - "using CTMRG and the PEPS gradient will be computed by differentiating through the CTMRG\n", - "routine using AD. Since the algorithmic stack that implements this is rather elaborate,\n", - "the amount of settings one can configure is also quite large. To reduce this complexity,\n", - "PEPSKit defaults to (presumably) reasonable settings which also dynamically adapts to the\n", - "user-specified parameters.\n", - "\n", - "First, we set the bond dimension `Dbond` of the virtual PEPS indices and the environment\n", - "dimension `χenv` of the virtual corner and transfer matrix indices." - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "Dbond = 2\n", - "χenv = 16;" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "To configure the CTMRG algorithm, we create a `NamedTuple` containing different keyword\n", - "arguments. To see a description of all arguments, see the docstring of\n", - "`leading_boundary`. Here, we want to converge the CTMRG environments up to a\n", - "specific tolerance and during the CTMRG run keep all index dimensions fixed:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "boundary_alg = (; tol=1e-10, trscheme=(; alg=:fixedspace));" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Let us also configure the optimizer algorithm. We are going to optimize the PEPS using the\n", - "L-BFGS optimizer from [OptimKit](https://github.com/Jutho/OptimKit.jl). Again, we specify\n", - "the convergence tolerance (for the gradient norm) as well as the maximal number of iterations\n", - "and the BFGS memory size (which is used to approximate the Hessian):" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "optimizer_alg = (; alg=:lbfgs, tol=1e-4, maxiter=100, lbfgs_memory=16);" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Additionally, during optimization, we want to reuse the previous CTMRG environment to\n", - "initialize the CTMRG run of the current optimization step using the `reuse_env` argument.\n", - "And to control the output information, we set the `verbosity`:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "reuse_env = true\n", - "verbosity = 3;" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Next, we initialize a random PEPS which will be used as an initial guess for the\n", - "optimization. To get a PEPS with physical dimension 2 (since we have a spin-1/2 Hamiltonian)\n", - "with complex-valued random Gaussian entries, we set:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "peps₀ = InfinitePEPS(randn, ComplexF64, 2, Dbond)" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "The last thing we need before we can start the optimization is an initial CTMRG environment.\n", - "Typically, a random environment which we converge on `peps₀` serves as a good starting point.\n", - "To contract a PEPS starting from an environment using CTMRG, we call `leading_boundary`:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "env_random = CTMRGEnv(randn, ComplexF64, peps₀, ℂ^χenv);\n", - "env₀, info_ctmrg = leading_boundary(env_random, peps₀; boundary_alg...);" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Besides the converged environment, `leading_boundary` also returns a `NamedTuple` of\n", - "informational quantities such as the last (maximal) SVD truncation error:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "@show info_ctmrg.truncation_error;" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "## Ground state search\n", - "\n", - "Finally, we can start the optimization by calling `fixedpoint` on `H` with our\n", - "settings for the boundary (CTMRG) algorithm and the optimizer. This might take a while\n", - "(especially the precompilation of AD code in this case):" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "peps, env, E, info_opt = fixedpoint(\n", - " H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity\n", - ");" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Note that `fixedpoint` returns the final optimized PEPS, the last converged environment,\n", - "the final energy estimate as well as a `NamedTuple` of diagnostics. This allows us to, e.g.,\n", - "analyze the number of cost function calls or the history of gradient norms to evaluate\n", - "the convergence rate:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "@show info_opt.fg_evaluations info_opt.gradnorms[1:10:end];" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Let's now compare the optimized energy against an accurate Quantum Monte Carlo estimate by\n", - "[Sandvik](@cite sandvik_computational_2011), where the energy per site was found to be\n", - "$E_{\\text{ref}}=−0.6694421$. From our simple optimization we find:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "@show E;" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "While this energy is in the right ballpark, there is still quite some deviation from the\n", - "accurate reference energy. This, however, can be attributed to the small bond dimension - an\n", - "optimization with larger bond dimension would approach this value much more closely.\n", - "\n", - "A more reasonable comparison would be against another finite bond dimension PEPS simulation.\n", - "For example, Juraj Hasik's data from $J_1\\text{-}J_2$\n", - "[PEPS simulations](https://github.com/jurajHasik/j1j2_ipeps_states/blob/main/single-site_pg-C4v-A1/j20.0/state_1s_A1_j20.0_D2_chi_opt48.dat)\n", - "yields $E_{D=2,\\chi=16}=-0.660231\\dots$ which is more in line with what we find here.\n", - "\n", - "## Compute the correlation lengths and transfer matrix spectra\n", - "\n", - "In practice, in order to obtain an accurate and variational energy estimate, one would need\n", - "to compute multiple energies at different environment dimensions and extrapolate in, e.g.,\n", - "the correlation length or the second gap of the transfer matrix spectrum. For that, we would\n", - "need the `correlation_length` function, which computes the horizontal and vertical\n", - "correlation lengths and transfer matrix spectra for all unit cell coordinates:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "ξ_h, ξ_v, λ_h, λ_v = correlation_length(peps, env)\n", - "@show ξ_h ξ_v;" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "## Computing observables\n", - "\n", - "As a last thing, we want to see how we can compute expectation values of observables, given\n", - "the optimized PEPS and its CTMRG environment. To compute, e.g., the magnetization, we first\n", - "need to define the observable as a `TensorMap`:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "σ_z = TensorMap([1.0 0.0; 0.0 -1.0], ℂ^2, ℂ^2)" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "In order to be able to contract it with the PEPS and environment, we define need to define a\n", - "`LocalOperator` and specify on which physical spaces and sites the observable acts. That way,\n", - "the PEPS-environment-operator contraction gets automatically generated (also works for\n", - "multi-site operators!). See the `LocalOperator` docstring for more details.\n", - "The magnetization is just a single-site observable, so we have:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "M = LocalOperator(fill(ℂ^2, 1, 1), (CartesianIndex(1, 1),) => σ_z)" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Finally, to evaluate the expecation value on the `LocalOperator`, we call:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "@show expectation_value(peps, M, env);" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "---\n", - "\n", - "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" - ], - "metadata": {} - } - ], - "nbformat_minor": 3, - "metadata": { - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.11.4" - }, - "kernelspec": { - "name": "julia-1.11", - "display_name": "Julia 1.11.4", - "language": "julia" - } - }, - "nbformat": 4 -} diff --git a/docs/src/examples/8.ising_partition_function/index.md b/docs/src/examples/2d_ising_partition_function/index.md similarity index 93% rename from docs/src/examples/8.ising_partition_function/index.md rename to docs/src/examples/2d_ising_partition_function/index.md index 79af2fb5d..42ab7d320 100644 --- a/docs/src/examples/8.ising_partition_function/index.md +++ b/docs/src/examples/2d_ising_partition_function/index.md @@ -1,10 +1,10 @@ ```@meta -EditURL = "../../../../examples/8.ising_partition_function/main.jl" +EditURL = "../../../../examples/2d_ising_partition_function/main.jl" ``` -[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//8.ising_partition_function/main.ipynb) -[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//8.ising_partition_function/main.ipynb) -[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//8.ising_partition_function) +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//2d_ising_partition_function/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//2d_ising_partition_function/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//2d_ising_partition_function) # 2D classical Ising partition function using CTMRG @@ -30,6 +30,13 @@ using QuadGK Random.seed!(234923); ```` +```` +Precompiling QuadGK... + 656.5 ms ✓ QuadGK + 1 dependency successfully precompiled in 1 seconds. 12 already precompiled. + +```` + ## Defining the partition function The first step is to define the rank-4 tensor that, when contracted on a square lattice, @@ -114,7 +121,7 @@ env, = leading_boundary(env₀, Z; tol=1e-8, maxiter=500); ```` [ Info: CTMRG init: obj = +1.784252138312e+00 -1.557258880375e+00im err = 1.0000e+00 -[ Info: CTMRG conv 63: obj = +3.353928644031e+00 err = 4.5903314811e-09 time = 4.11 sec +[ Info: CTMRG conv 63: obj = +3.353928644031e+00 err = 4.5903314811e-09 time = 6.45 sec ```` @@ -148,7 +155,7 @@ e = expectation_value(Z, (1, 1) => E, env) ```` ```` -λ = 3.353928644031379 - 3.523927224091531e-16im +λ = 3.3539286440313782 - 5.873212040152551e-16im m = 0.9736086674403001 + 1.8262157316829647e-17im e = -1.8637796145082437 - 1.4609725853463717e-16im @@ -193,7 +200,7 @@ extrapolation): ```` ```` -(-(log(λ)) / beta - f_exact) / f_exact = -4.4037086931770186e-16 - 8.682408747331889e-17im +(-(log(λ)) / beta - f_exact) / f_exact = -6.605563039765528e-16 - 1.447068124555315e-16im (abs(m) - abs(m_exact)) / abs(m_exact) = -4.561270094458082e-16 (e - e_exact) / e_exact = -0.023732068099090543 + 7.652732508485748e-17im diff --git a/docs/src/examples/8.ising_partition_function/main.ipynb b/docs/src/examples/2d_ising_partition_function/main.ipynb similarity index 100% rename from docs/src/examples/8.ising_partition_function/main.ipynb rename to docs/src/examples/2d_ising_partition_function/main.ipynb diff --git a/docs/src/examples/3.bose_hubbard/index.md b/docs/src/examples/3.bose_hubbard/index.md deleted file mode 100644 index 433e0663f..000000000 --- a/docs/src/examples/3.bose_hubbard/index.md +++ /dev/null @@ -1,324 +0,0 @@ -```@meta -EditURL = "../../../../examples/3.bose_hubbard/main.jl" -``` - -[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//3.bose_hubbard/main.ipynb) -[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//3.bose_hubbard/main.ipynb) -[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//3.bose_hubbard) - - -# Optimizing the $U(1)$-symmetric Bose-Hubbard model - -This example demonstrates the simulation of the two-dimensional Bose-Hubbard model. In -particular, the point will be to showcase the use of internal symmetries and finite -particle densities in PEPS ground state searches. As we will see, incorporating symmetries -into the simulation consists of initializing a symmetric Hamiltonian, PEPS state and CTM -environment - made possible through TensorKit. - -But first let's seed the RNG and import the required modules: - -````julia -using Random -using TensorKit, PEPSKit -using MPSKit: add_physical_charge -Random.seed!(2928528935); -```` - -## Defining the model - -We will construct the Bose-Hubbard model Hamiltonian through the -[`bose_hubbard_model`](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.bose_hubbard_model), -function from MPSKitModels as reexported by PEPSKit. We'll simulate the model in its -Mott-insulating phase where the ratio $U/t$ is large, since in this phase we expect the -ground state to be well approximated by a PEPS with a manifest global $U(1)$ symmetry. -Furthermore, we'll impose a cutoff at 2 bosons per site, set the chemical potential to zero -and use a simple $1 \times 1$ unit cell: - -````julia -t = 1.0 -U = 30.0 -cutoff = 2 -mu = 0.0 -lattice = InfiniteSquare(1, 1); -```` - -Next, we impose an explicit global $U(1)$ symmetry as well as a fixed particle number -density in our simulations. We can do this by setting the `symmetry` argument of the -Hamiltonian constructor to `U1Irrep` and passing one as the particle number density -keyword argument `n`: - -````julia -symmetry = U1Irrep -n = 1 -H = bose_hubbard_model(ComplexF64, symmetry, lattice; cutoff, t, U, n); -```` - -Before we continue, it might be interesting to inspect the corresponding lattice physical -spaces (which is here just a $1 \times 1$ matrix due to the single-site unit cell): - -````julia -physical_spaces = H.lattice -```` - -```` -1×1 Matrix{GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}}: - Rep[U₁](0=>1, 1=>1, -1=>1) -```` - -Note that the physical space contains $U(1)$ charges -1, 0 and +1. Indeed, imposing a -particle number density of +1 corresponds to shifting the physical charges by -1 to -'re-center' the physical charges around the desired density. When we do this with a cutoff -of two bosons per site, i.e. starting from $U(1)$ charges 0, 1 and 2 on the physical level, -we indeed get the observed charges. - -## Characterizing the virtual spaces - -When running PEPS simulations with explicit internal symmetries, specifying the structure of -the virtual spaces of the PEPS and its environment becomes a bit more involved. For the -environment, one could in principle allow the virtual space to be chosen dynamically during -the boundary contraction using CTMRG by using a truncation scheme that allows for this -(e.g. using `alg=:truncdim` or `alg=:truncbelow` to truncate to a fixed total bond dimension -or singular value cutoff respectively). For the PEPS virtual space however, the structure -has to be specified before the optimization. - -While there are a host of techniques to do this in an informed way (e.g. starting from a -simple update result), here we just specify the virtual space manually. Since we're dealing -with a model at unit filling our physical space only contains integer $U(1)$ irreps. -Therefore, we'll build our PEPS and environment spaces using integer $U(1)$ irreps centered -around the zero charge: - -````julia -V_peps = U1Space(0 => 2, 1 => 1, -1 => 1) -V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2); -```` - -## Finding the ground state - -Having defined our Hamiltonian and spaces, it is just a matter of plugging this into the -optimization framework in the usual way to find the ground state. So, we first specify all -algorithms and their tolerances: - -````julia -boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace)) -gradient_alg = (; tol=1e-6, maxiter=10, alg=:eigsolver, iterscheme=:diffgauge) -optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=150, ls_maxiter=2, ls_maxfg=2); -```` - -!!! note - Taking CTMRG gradients and optimizing symmetric tensors tends to be more problematic - than with dense tensors. In particular, this means that one frequently needs to tweak - the `boundary_alg`, `gradient_alg` and `optimizer_alg` settings. There rarely is a - general-purpose set of settings which will always work, so instead one has to adjust - the simulation settings for each specific application. For example, it might help to - switch between the CTMRG flavors `alg=:simultaneous` and `alg=:sequential` to - improve convergence. The evaluation of the CTMRG gradient can be instable, so there it - is advised to try the different `iterscheme=:diffgauge` and `iterscheme=:fixed` schemes - as well as different `alg` keywords. Of course the tolerances of the algorithms and - their subalgorithms also have to be compatible. For more details on the available - options, see the [`fixedpoint`](@ref) docstring. - -Keep in mind that the PEPS is constructed from a unit cell of spaces, so we have to make a -matrix of `V_peps` spaces: - -````julia -virtual_spaces = fill(V_peps, size(lattice)...) -peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) -env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); -```` - -```` -[ Info: CTMRG init: obj = +1.693461429863e+00 +8.390974048721e-02im err = 1.0000e+00 -[ Info: CTMRG conv 19: obj = +1.181834754305e+01 -1.514027570125e-11im err = 3.6943032119e-09 time = 0.60 sec - -```` - -And at last, we optimize (which might take a bit): - -````julia -peps, env, E, info = fixedpoint( - H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3 -) -@show E; -```` - -```` -[ Info: LBFGS: initializing with f = 9.360531870693, ‖∇f‖ = 1.6944e+01 -┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Float64}`; -│ this fallback will disappear in future versions of VectorInterface.jl -└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 -[ Info: LBFGS: iter 1, time 68.36 s: f = 0.124397324377, ‖∇f‖ = 6.2876e+00, α = 1.56e+02, m = 0, nfg = 7 -┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; -│ this fallback will disappear in future versions of VectorInterface.jl -└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 -[ Info: LBFGS: iter 2, time 89.37 s: f = 0.065740243544, ‖∇f‖ = 8.6301e+00, α = 5.34e-01, m = 1, nfg = 2 -[ Info: LBFGS: iter 3, time 91.49 s: f = -0.035484016742, ‖∇f‖ = 1.7043e+00, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 4, time 93.49 s: f = -0.068142497162, ‖∇f‖ = 1.5153e+00, α = 1.00e+00, m = 3, nfg = 1 -[ Info: LBFGS: iter 5, time 101.18 s: f = -0.161915006602, ‖∇f‖ = 1.4797e+00, α = 5.52e-01, m = 4, nfg = 3 -[ Info: LBFGS: iter 6, time 103.30 s: f = -0.192198031506, ‖∇f‖ = 9.0883e-01, α = 1.00e+00, m = 5, nfg = 1 -[ Info: LBFGS: iter 7, time 105.34 s: f = -0.205025430186, ‖∇f‖ = 1.4077e+00, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 8, time 107.32 s: f = -0.221962222995, ‖∇f‖ = 5.1030e-01, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 9, time 109.92 s: f = -0.228516635895, ‖∇f‖ = 4.0683e-01, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 10, time 111.73 s: f = -0.238976021230, ‖∇f‖ = 2.5966e-01, α = 1.00e+00, m = 9, nfg = 1 -[ Info: LBFGS: iter 11, time 113.50 s: f = -0.245116064461, ‖∇f‖ = 3.7637e-01, α = 1.00e+00, m = 10, nfg = 1 -[ Info: LBFGS: iter 12, time 115.21 s: f = -0.252909139554, ‖∇f‖ = 3.4356e-01, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 13, time 116.74 s: f = -0.260342387029, ‖∇f‖ = 2.9482e-01, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 14, time 118.22 s: f = -0.265537731651, ‖∇f‖ = 2.5638e-01, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 15, time 120.30 s: f = -0.268085955662, ‖∇f‖ = 1.4302e-01, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 16, time 121.73 s: f = -0.269213801539, ‖∇f‖ = 9.4430e-02, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 17, time 123.01 s: f = -0.270165070558, ‖∇f‖ = 7.6548e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 18, time 124.32 s: f = -0.270700725371, ‖∇f‖ = 8.1691e-02, α = 1.00e+00, m = 17, nfg = 1 -[ Info: LBFGS: iter 19, time 125.63 s: f = -0.271027470591, ‖∇f‖ = 4.3095e-02, α = 1.00e+00, m = 18, nfg = 1 -[ Info: LBFGS: iter 20, time 126.92 s: f = -0.271239343525, ‖∇f‖ = 4.0156e-02, α = 1.00e+00, m = 19, nfg = 1 -[ Info: LBFGS: iter 21, time 128.90 s: f = -0.271530179046, ‖∇f‖ = 5.9545e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 22, time 130.23 s: f = -0.271855643129, ‖∇f‖ = 5.4653e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 23, time 131.51 s: f = -0.272062163616, ‖∇f‖ = 3.1192e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 24, time 132.82 s: f = -0.272177598947, ‖∇f‖ = 3.2733e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 25, time 134.11 s: f = -0.272296901359, ‖∇f‖ = 3.2681e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 26, time 135.40 s: f = -0.272496091725, ‖∇f‖ = 3.3863e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 27, time 137.34 s: f = -0.272637326787, ‖∇f‖ = 2.0637e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 28, time 138.62 s: f = -0.272670103336, ‖∇f‖ = 2.1720e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 29, time 139.91 s: f = -0.272699141285, ‖∇f‖ = 1.5696e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 30, time 141.22 s: f = -0.272746811570, ‖∇f‖ = 2.3734e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 31, time 142.51 s: f = -0.272818112786, ‖∇f‖ = 3.1753e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 32, time 143.81 s: f = -0.272906643893, ‖∇f‖ = 2.5985e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 33, time 145.13 s: f = -0.272952554121, ‖∇f‖ = 4.4589e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 34, time 147.07 s: f = -0.273005267007, ‖∇f‖ = 9.9076e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 35, time 148.35 s: f = -0.273013070971, ‖∇f‖ = 8.2167e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 36, time 149.64 s: f = -0.273020751438, ‖∇f‖ = 9.8987e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 37, time 150.95 s: f = -0.273028647747, ‖∇f‖ = 1.5048e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 38, time 152.25 s: f = -0.273039550238, ‖∇f‖ = 7.4328e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 39, time 153.55 s: f = -0.273049748943, ‖∇f‖ = 8.1203e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 40, time 154.84 s: f = -0.273057542987, ‖∇f‖ = 1.0556e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 41, time 156.78 s: f = -0.273070228574, ‖∇f‖ = 1.2840e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 42, time 158.06 s: f = -0.273082077719, ‖∇f‖ = 1.1193e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 43, time 159.34 s: f = -0.273092996552, ‖∇f‖ = 8.1332e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 44, time 160.64 s: f = -0.273103912308, ‖∇f‖ = 1.2611e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 45, time 161.94 s: f = -0.273116383103, ‖∇f‖ = 1.4901e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 46, time 163.23 s: f = -0.273124864427, ‖∇f‖ = 2.0568e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 47, time 164.53 s: f = -0.273139111302, ‖∇f‖ = 7.0923e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 48, time 166.46 s: f = -0.273143969600, ‖∇f‖ = 4.7032e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 49, time 167.72 s: f = -0.273146563392, ‖∇f‖ = 4.8587e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 50, time 169.01 s: f = -0.273149681682, ‖∇f‖ = 4.4858e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 51, time 170.32 s: f = -0.273153535758, ‖∇f‖ = 6.1631e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 52, time 171.63 s: f = -0.273156987689, ‖∇f‖ = 4.5642e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 53, time 172.93 s: f = -0.273159364143, ‖∇f‖ = 3.9352e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 54, time 174.22 s: f = -0.273162378681, ‖∇f‖ = 5.2448e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 55, time 176.18 s: f = -0.273164685489, ‖∇f‖ = 7.9447e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 56, time 177.46 s: f = -0.273167770852, ‖∇f‖ = 4.5867e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 57, time 178.77 s: f = -0.273171004811, ‖∇f‖ = 4.0036e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 58, time 180.07 s: f = -0.273172734685, ‖∇f‖ = 5.1587e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 59, time 181.38 s: f = -0.273175277923, ‖∇f‖ = 5.2136e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 60, time 182.69 s: f = -0.273178436887, ‖∇f‖ = 4.5043e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 61, time 184.02 s: f = -0.273181599401, ‖∇f‖ = 4.1926e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 62, time 186.03 s: f = -0.273184127264, ‖∇f‖ = 3.5435e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 63, time 187.31 s: f = -0.273186580584, ‖∇f‖ = 3.2519e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 64, time 188.61 s: f = -0.273189436738, ‖∇f‖ = 6.9448e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 65, time 189.90 s: f = -0.273192692504, ‖∇f‖ = 4.6825e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 66, time 191.20 s: f = -0.273196715211, ‖∇f‖ = 4.7511e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 67, time 192.50 s: f = -0.273198196827, ‖∇f‖ = 5.4294e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 68, time 193.79 s: f = -0.273199435966, ‖∇f‖ = 2.8645e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 69, time 195.71 s: f = -0.273200799932, ‖∇f‖ = 2.4252e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 70, time 196.99 s: f = -0.273202184331, ‖∇f‖ = 3.0503e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 71, time 198.30 s: f = -0.273203318657, ‖∇f‖ = 7.2710e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 72, time 199.59 s: f = -0.273204976120, ‖∇f‖ = 2.8153e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 73, time 200.88 s: f = -0.273205613161, ‖∇f‖ = 2.0563e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 74, time 202.15 s: f = -0.273206541752, ‖∇f‖ = 2.6401e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 75, time 203.45 s: f = -0.273207825994, ‖∇f‖ = 3.3947e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 76, time 205.42 s: f = -0.273210784096, ‖∇f‖ = 5.5166e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 77, time 206.71 s: f = -0.273212703606, ‖∇f‖ = 5.9417e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 78, time 207.99 s: f = -0.273214840394, ‖∇f‖ = 2.5444e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 79, time 209.28 s: f = -0.273216186725, ‖∇f‖ = 2.5210e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 80, time 210.57 s: f = -0.273217132240, ‖∇f‖ = 2.9834e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 81, time 211.88 s: f = -0.273217860371, ‖∇f‖ = 8.6736e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 82, time 213.17 s: f = -0.273219978798, ‖∇f‖ = 2.8197e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 83, time 215.10 s: f = -0.273220887198, ‖∇f‖ = 1.4861e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 84, time 216.41 s: f = -0.273221346093, ‖∇f‖ = 1.9427e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 85, time 217.68 s: f = -0.273221865528, ‖∇f‖ = 1.7524e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 86, time 218.95 s: f = -0.273222181741, ‖∇f‖ = 5.3066e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 87, time 220.24 s: f = -0.273223246562, ‖∇f‖ = 1.9685e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 88, time 221.54 s: f = -0.273223705610, ‖∇f‖ = 2.3045e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 89, time 223.47 s: f = -0.273224556828, ‖∇f‖ = 2.5083e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 90, time 224.80 s: f = -0.273225646272, ‖∇f‖ = 4.2989e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 91, time 226.09 s: f = -0.273227256373, ‖∇f‖ = 2.7322e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 92, time 227.40 s: f = -0.273229828316, ‖∇f‖ = 2.2841e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 93, time 228.86 s: f = -0.273231704181, ‖∇f‖ = 2.4489e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 94, time 232.19 s: f = -0.273232179586, ‖∇f‖ = 2.5292e-03, α = 3.61e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 95, time 233.47 s: f = -0.273232651417, ‖∇f‖ = 1.6879e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 96, time 234.79 s: f = -0.273233247066, ‖∇f‖ = 1.8610e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 97, time 236.09 s: f = -0.273233724645, ‖∇f‖ = 2.3320e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 98, time 237.39 s: f = -0.273234496326, ‖∇f‖ = 2.1070e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 99, time 238.70 s: f = -0.273234942243, ‖∇f‖ = 4.3229e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 100, time 239.98 s: f = -0.273235872899, ‖∇f‖ = 1.0227e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 101, time 241.92 s: f = -0.273236083478, ‖∇f‖ = 8.8617e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 102, time 243.21 s: f = -0.273236502150, ‖∇f‖ = 1.2113e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 103, time 245.84 s: f = -0.273236852006, ‖∇f‖ = 2.2250e-03, α = 5.40e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 104, time 247.13 s: f = -0.273237309095, ‖∇f‖ = 1.5651e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 105, time 248.47 s: f = -0.273237826712, ‖∇f‖ = 1.7300e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 106, time 249.76 s: f = -0.273238151589, ‖∇f‖ = 1.4739e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 107, time 251.70 s: f = -0.273238452194, ‖∇f‖ = 1.3132e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 108, time 253.01 s: f = -0.273239083045, ‖∇f‖ = 3.6339e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 109, time 254.30 s: f = -0.273239925488, ‖∇f‖ = 1.6856e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 110, time 255.60 s: f = -0.273240465522, ‖∇f‖ = 1.3613e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 111, time 256.90 s: f = -0.273240934835, ‖∇f‖ = 2.3524e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 112, time 258.22 s: f = -0.273241253954, ‖∇f‖ = 2.3895e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 113, time 259.55 s: f = -0.273241593627, ‖∇f‖ = 1.3301e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 114, time 261.55 s: f = -0.273242108811, ‖∇f‖ = 1.2847e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 115, time 262.86 s: f = -0.273242449543, ‖∇f‖ = 1.3579e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 116, time 265.50 s: f = -0.273242675076, ‖∇f‖ = 2.3470e-03, α = 3.57e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 117, time 266.81 s: f = -0.273243104527, ‖∇f‖ = 1.2979e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 118, time 268.13 s: f = -0.273243436953, ‖∇f‖ = 1.2233e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 119, time 269.48 s: f = -0.273243761256, ‖∇f‖ = 1.6044e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 120, time 271.45 s: f = -0.273244062582, ‖∇f‖ = 1.7999e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 121, time 272.74 s: f = -0.273244428575, ‖∇f‖ = 1.3779e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 122, time 274.04 s: f = -0.273244941087, ‖∇f‖ = 1.6881e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 123, time 275.34 s: f = -0.273245490453, ‖∇f‖ = 1.8823e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 124, time 276.64 s: f = -0.273246014128, ‖∇f‖ = 1.3348e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 125, time 277.96 s: f = -0.273246415220, ‖∇f‖ = 1.6797e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 126, time 279.27 s: f = -0.273246886558, ‖∇f‖ = 1.9101e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 127, time 281.26 s: f = -0.273247578331, ‖∇f‖ = 2.6783e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 128, time 282.56 s: f = -0.273248596780, ‖∇f‖ = 4.2726e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 129, time 283.87 s: f = -0.273249248580, ‖∇f‖ = 3.4266e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 130, time 285.18 s: f = -0.273249798264, ‖∇f‖ = 1.3846e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 131, time 286.50 s: f = -0.273250091726, ‖∇f‖ = 1.3050e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 132, time 287.81 s: f = -0.273250298144, ‖∇f‖ = 1.7451e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 133, time 289.13 s: f = -0.273250674484, ‖∇f‖ = 1.8764e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 134, time 291.11 s: f = -0.273250849981, ‖∇f‖ = 2.5432e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 135, time 292.38 s: f = -0.273251094386, ‖∇f‖ = 1.0169e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 136, time 293.67 s: f = -0.273251250424, ‖∇f‖ = 1.1018e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 137, time 294.99 s: f = -0.273251472616, ‖∇f‖ = 1.7175e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 138, time 296.32 s: f = -0.273251802341, ‖∇f‖ = 1.9190e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 139, time 298.97 s: f = -0.273251940669, ‖∇f‖ = 2.5923e-03, α = 2.54e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 140, time 300.94 s: f = -0.273252255136, ‖∇f‖ = 1.6162e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 141, time 302.31 s: f = -0.273252593676, ‖∇f‖ = 9.5803e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 142, time 303.66 s: f = -0.273252841099, ‖∇f‖ = 1.5506e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 143, time 305.01 s: f = -0.273253128531, ‖∇f‖ = 2.2830e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 144, time 306.32 s: f = -0.273253470875, ‖∇f‖ = 1.3732e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 145, time 307.66 s: f = -0.273253787952, ‖∇f‖ = 1.4764e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 146, time 308.97 s: f = -0.273254080621, ‖∇f‖ = 1.9509e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 147, time 310.97 s: f = -0.273254306475, ‖∇f‖ = 1.9010e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 148, time 312.30 s: f = -0.273255277035, ‖∇f‖ = 2.1723e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 149, time 313.65 s: f = -0.273255976775, ‖∇f‖ = 2.3105e-03, α = 1.00e+00, m = 20, nfg = 1 -┌ Warning: LBFGS: not converged to requested tol after 150 iterations and time 314.98 s: f = -0.273256484758, ‖∇f‖ = 1.2498e-03 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/lbfgs.jl:197 -E = -0.27325648475803166 - -```` - -We can compare our PEPS result to the energy obtained using a cylinder-MPS calculation -using a cylinder circumference of $L_y = 7$ and a bond dimension of 446, which yields -$E = -0.273284888$: - -````julia -E_ref = -0.273284888 -@show (E - E_ref) / E_ref; -```` - -```` -(E - E_ref) / E_ref = -0.00010393272081822697 - -```` - ---- - -*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* - diff --git a/docs/src/examples/3d_ising_partition_function/index.md b/docs/src/examples/3d_ising_partition_function/index.md new file mode 100644 index 000000000..cc0cf6d0a --- /dev/null +++ b/docs/src/examples/3d_ising_partition_function/index.md @@ -0,0 +1,380 @@ +```@meta +EditURL = "../../../../examples/3d_ising_partition_function/main.jl" +``` + +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//3d_ising_partition_function/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//3d_ising_partition_function/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//3d_ising_partition_function) + + +# The 3D classical Ising model + +In a previous example we have already demonstrated an application of PEPSKit.jl to the study +of two-dimensional classical statistical mechanics models. In this example, we will take +this one step further, and showcase how one can use PEPSKit.jl to study three-dimensional +classical statistical mechanics models. We will demonstrate this for the specific case of +the three-dimensional classical Ising model, but the same techniques can be applied to other +three-dimensional classical models as well. + +The workflow showcased in this example is a bit more experimental and less 'black-box' than +previous examples. Therefore it also serves as a demonstration of some of the more internal +functionality of PEPSKit.jl, and how one can adapt it to different or less 'standard' kinds +of problems. + +Let us consider again the partition function of the classical Ising model, + +```math +\mathcal{Z}(\beta) = \sum_{\{s\}} \exp(-\beta H(s)) \text{ with } H(s) = -J \sum_{\langle i, j \rangle} s_i s_j . +``` + +where now the classical spins $s_i \in \{+1, -1\}$ are located on the vertices $i$ of a +three-dimensional cubic lattice. The partition function of this model can be represented as +a 3D tensor network with a rank-6 tensor at each vertex of the lattice. Such a network can +be contracted by finding the fixed point of the corresponding transfer operator, in exactly +the same spirit as the boundary MPS methods demonstrated in a previous example. + +Let's start by making the example deterministic and we doing our imports: + +````julia +using Random +using LinearAlgebra +using PEPSKit, TensorKit +using KrylovKit, OptimKit, Zygote + +Random.seed!(81812781144); +```` + +## Defining the partition function + +Just as in the 2D case, the first step is to define the partition function as a tensor +network. The procedure is exactly the same as before, the only difference being that now +every spin participates in interactions associated to six links adjacent to that site. This +means that the partition function can be written as an infinite 3D network with a single +constituent rank-6 [`PEPSKit.PEPOTensor`](@ref) `O` located at each site of the cubic lattice. To +verify our example we will check the magnetization and energy, so we also define the +corresponding rank-6 tensors `M` and `E` while we're at it. + +````julia +function three_dimensional_classical_ising(; beta, J=1.0) + K = beta * J + + # Boltzmann weights + t = ComplexF64[exp(K) exp(-K); exp(-K) exp(K)] + r = eigen(t) + q = r.vectors * sqrt(LinearAlgebra.Diagonal(r.values)) * r.vectors + + # local partition function tensor + O = zeros(2, 2, 2, 2, 2, 2) + O[1, 1, 1, 1, 1, 1] = 1 + O[2, 2, 2, 2, 2, 2] = 1 + @tensor o[-1 -2; -3 -4 -5 -6] := + O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] + + # magnetization tensor + M = copy(O) + M[2, 2, 2, 2, 2, 2] *= -1 + @tensor m[-1 -2; -3 -4 -5 -6] := + M[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] + + # bond interaction tensor and energy-per-site tensor + e = ComplexF64[-J J; J -J] .* q + @tensor e_x[-1 -2; -3 -4 -5 -6] := + O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * e[-4; 4] * q[-5; 5] * q[-6; 6] + @tensor e_y[-1 -2; -3 -4 -5 -6] := + O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * e[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] + @tensor e_z[-1 -2; -3 -4 -5 -6] := + O[1 2; 3 4 5 6] * e[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6] + e = e_x + e_y + e_z + + # fixed tensor map space for all three + TMS = ℂ^2 ⊗ (ℂ^2)' ← ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)' + + return TensorMap(o, TMS), TensorMap(m, TMS), TensorMap(e, TMS) +end; +```` + +Let's initialize these tensors at inverse temperature ``\beta=0.2391``, which corresponds to a slightly +lower temperature than the critical value ``\beta_c=0.2216544…`` + +````julia +beta = 0.2391 +O, M, E = three_dimensional_classical_ising(; beta) +O isa PEPSKit.PEPOTensor +```` + +```` +true +```` + +## Contracting the partition function + +To contract our infinite 3D partition function, we first reinterpret it as an infinite power +of a slice-to-slice transfer operator ``T``, where ``T`` can be seen as an infinite 2D +projected entangled-pair operator (PEPO) consisting of the rank-6 tensor `O` at each site of +an infinite 3D square lattice. In the same spirit as the boundary MPS approach, all we need +to contract the whole partition function is to find the leading eigenvector of this PEPO. +The fixed point of such a PEPO exactly corresponds to a PEPS, and for the case of a +Hermitian transfer operator we can find this PEPS through [variational optimization](@cite +vanderstraeten_residual_2018). + +Indeed, for a Hermition transfer operator ``T`` we can formulate the eigenvalue equation as +for a fixed point PEPS ``|\psi\rangle`` as a variational problem + +```math +|\psi\rangle = \text{argmin}_{|\psi\rangle} - \lim_{N \to ∞} \frac{1}{N} \log \left( \frac{\langle \psi | T | \psi \rangle}{\langle \psi | \psi \rangle} \right) +``` +where ``N`` is the diverging number of sites of the 2D transfer operator ``T``. + +### Defining the cost function + +Using PEPSKit.jl, this cost function and its gradient can be easily computed, after which we can use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it. +recognize the denominator ``\langle \psi | \psi \rangle`` as the familiar PEPS norm, where +we can compute the norm per site as the [`network_value`](@ref) of the corresponding +[`InfiniteSquareNetwork`](@ref) by contracting it with the CTMRG algorithm. Similarly, the +numerator ``\langle \psi | T | \psi \rangle`` is nothing more than an +`InfiniteSquareNetwork` consisting of three layers corresponding to the ket, transfer +operator and bra objects. This object can be constructed and contracted in a straightforward +way, after we can again compute its `network_value`. + +So to define our cost function, we just need to construct the transfer operator as an +[`InfinitePEPO`](@ref) and specify a contraction algorithm we can use to compute the values +of the two relevant 2D networks. In addition, we'll specify the specific reverse rule +algorithm that will be used to compute the gradient of this cost function + +````julia +boundary_alg = SimultaneousCTMRG(; maxiter=150, tol=1e-8, verbosity=1) +rrule_alg = EigSolver(; + solver_alg=KrylovKit.Arnoldi(; maxiter=30, tol=1e-6, eager=true), iterscheme=:diffgauge +) +T = InfinitePEPO(O) + +function pepo_costfun((psi, env2, env3)) + # use Zygote to compute the gradient automatically + E, gs = withgradient(psi) do ψ + # construct the PEPS norm network + n2 = InfiniteSquareNetwork(ψ) + # contract this network + env2′, info = PEPSKit.hook_pullback( + leading_boundary, env2, n2, boundary_alg; alg_rrule=rrule_alg + ) + # construct the PEPS-PEPO-PEPS overlap network + n3 = InfiniteSquareNetwork(ψ, T) + # contract this network + env3′, info = PEPSKit.hook_pullback( + leading_boundary, env3, n3, boundary_alg; alg_rrule=rrule_alg + ) + # update the environments for reuse + PEPSKit.ignore_derivatives() do + PEPSKit.update!(env2, env2′) + PEPSKit.update!(env3, env3′) + end + # compute the network values per site + λ3 = network_value(n3, env3) + λ2 = network_value(n2, env2) + # use this to compute the actual cost function + return -log(real(λ3 / λ2)) + end + g = only(gs) + return E, g +end; +```` + +There are a few things to note about this cost function definition. Since we will pass +it to the `optimize` method from OptimKit.jl, we require it to return both our cost function +and the corresponding gradient. To do this, we simply use the `withgradient` method from +Zygote.jl to automatically compute the gradient of the cost function straight from the +primal computation. Since our cost function involves contraction using `leading_boundary`, +we also have to specify exactly how Zygote should handle the backpropagation of the gradient +through this function. This can be done using the [`PEPSKit.hook_pullback`](@ref) function from +PEPSKit.jl, which allows to hook into the pullback of a given function by specifying a +specific algorithm for the pullback computation. Here, we opted to use an Arnoldi method to +solve the linear problem defining the gradient of the network contraction at its fixed +point. This is exactly the workflow underlying [`PEPSKit.fixedpoint`](@ref) internally, and +more info on particular gradient algorithms can be found in the corresponding docstring. + +### Characterizing the optimization manifold + +In order to make the best use of OptimKit.jl, we should specify some properties of the +manifold on which we are optimizing. Looking at our cost function defined above, a point on +our optimization manifold corresponds to a `Tuple` of three objects. The first is an +`InfinitePEPS` encoding the fixed point we are actually optimizing, while the second and +third are `CTMRGEnv` objects corresponding to the environments of the double and triple +layer networks ``\langle \psi | \psi \rangle`` and ``\langle \psi | T | \psi \rangle`` +respectively. While the environments are just there so we can reuse them between subsequent +contractions and we don't need to think about them much, optimizing over the manifold of +`InfinitePEPS` requires a bit more care. + +In particular, we need to define two kinds of operations on this manifold: a retraction and +a transport. The retraction, corresponding to the `retract` keyword argument of +`OptimKit.optimize`, specifies how to move from a point on a manifold along a given descent +direction to obtain a new manifold point. The transport, corresponding to the `transport!` +keyword argument of `OptimKit.optimize`, specifies how to transport a descent direction at a +given manifold point to a valid descent direction at a different manifold point according to +the appropriate metric. In PEPSKit.jl, these two procedures are defined through the +[`PEPSKit.peps_retract`](@ref) and [`PEPSKit.peps_transport!`](@ref) methods. While it is +instructive to read the corresponding docstrings in order to understand what these actually +do, here we can just blindly reuse them where the only difference is that we have to pass +along an extra environment since our cost function requires two distinct contractions as +opposed to the setting of Hamiltonian PEPS optimization. + +````julia +function pepo_retract(x, η, α) + x´_partial, ξ = PEPSKit.peps_retract(x[1:2], η, α) + x´ = (x´_partial..., deepcopy(x[3])) + return x´, ξ +end +function pepo_transport!(ξ, x, η, α, x´) + return PEPSKit.peps_transport!(ξ, x[1:2], η, α, x´[1:2]) +end; +```` + +### Finding the fixed point + +All that is left then is to specify the virtual spaces of the PEPS and the two environments, +initialize them in the appropriate way, choose an optimization algortithm and call the +`optimize` function from OptimKit.jl to get our desired PEPS fixed point. + +````julia +Vpeps = ℂ^2 +Venv = ℂ^12 + +psi0 = initializePEPS(T, Vpeps) +env2_0 = CTMRGEnv(InfiniteSquareNetwork(psi0), Venv) +env3_0 = CTMRGEnv(InfiniteSquareNetwork(psi0, T), Venv) + +optimizer_alg = LBFGS(32; maxiter=100, gradtol=1e-5, verbosity=3) + +(psi_final, env2_final, env3_final), f, = optimize( + pepo_costfun, + (psi0, env2_0, env3_0), + optimizer_alg; + inner=PEPSKit.real_inner, + retract=pepo_retract, + (transport!)=(pepo_transport!), +); +```` + +```` +[ Info: LBFGS: initializing with f = -0.554073395182, ‖∇f‖ = 7.7844e-01 +┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Float64}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 +┌ Warning: CTMRG cancel 150: obj = +1.702942228759e+01 +1.443123501028e-07im err = 2.4386740892e-05 time = 2.48 sec +└ @ PEPSKit ~/repos/PEPSKit.jl/src/algorithms/ctmrg/ctmrg.jl:155 +[ Info: LBFGS: iter 1, time 109.52 s: f = -0.777080930369, ‖∇f‖ = 3.1305e-02, α = 7.10e+02, m = 0, nfg = 7 +┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 +[ Info: LBFGS: iter 2, time 111.21 s: f = -0.784111515961, ‖∇f‖ = 2.0103e-02, α = 1.00e+00, m = 1, nfg = 1 +[ Info: LBFGS: iter 3, time 111.53 s: f = -0.792705733484, ‖∇f‖ = 2.3327e-02, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 4, time 111.79 s: f = -0.796289732476, ‖∇f‖ = 2.2475e-02, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 5, time 111.99 s: f = -0.799674902374, ‖∇f‖ = 7.0288e-03, α = 1.00e+00, m = 4, nfg = 1 +[ Info: LBFGS: iter 6, time 112.18 s: f = -0.800082100121, ‖∇f‖ = 1.2717e-03, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 7, time 112.40 s: f = -0.800110603125, ‖∇f‖ = 1.3384e-03, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 8, time 112.58 s: f = -0.800262201996, ‖∇f‖ = 2.4945e-03, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 9, time 112.77 s: f = -0.800450505448, ‖∇f‖ = 2.9259e-03, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 10, time 112.98 s: f = -0.800764917087, ‖∇f‖ = 1.7221e-03, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 11, time 113.20 s: f = -0.800876048838, ‖∇f‖ = 2.2475e-03, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 12, time 113.39 s: f = -0.801100867467, ‖∇f‖ = 1.5561e-03, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 13, time 113.61 s: f = -0.801317048856, ‖∇f‖ = 1.1561e-03, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 14, time 113.82 s: f = -0.801373050545, ‖∇f‖ = 7.1300e-04, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 15, time 114.02 s: f = -0.801388615264, ‖∇f‖ = 2.8462e-04, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 16, time 114.23 s: f = -0.801394633333, ‖∇f‖ = 2.7607e-04, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 17, time 114.42 s: f = -0.801408061564, ‖∇f‖ = 3.6096e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 18, time 114.65 s: f = -0.801509542169, ‖∇f‖ = 1.9822e-03, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 19, time 114.90 s: f = -0.801578405251, ‖∇f‖ = 1.8040e-03, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 20, time 115.79 s: f = -0.801694524424, ‖∇f‖ = 2.9356e-03, α = 5.48e-01, m = 19, nfg = 3 +[ Info: LBFGS: iter 21, time 116.41 s: f = -0.801761920683, ‖∇f‖ = 1.1993e-03, α = 3.82e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 22, time 116.69 s: f = -0.801797785494, ‖∇f‖ = 6.0337e-04, α = 1.00e+00, m = 21, nfg = 1 +[ Info: LBFGS: iter 23, time 117.28 s: f = -0.801808747834, ‖∇f‖ = 3.7053e-04, α = 5.24e-01, m = 22, nfg = 2 +[ Info: LBFGS: iter 24, time 117.56 s: f = -0.801812729173, ‖∇f‖ = 3.0781e-04, α = 1.00e+00, m = 23, nfg = 1 +[ Info: LBFGS: iter 25, time 117.85 s: f = -0.801816445211, ‖∇f‖ = 2.9994e-04, α = 1.00e+00, m = 24, nfg = 1 +[ Info: LBFGS: iter 26, time 118.13 s: f = -0.801824713130, ‖∇f‖ = 3.6496e-04, α = 1.00e+00, m = 25, nfg = 1 +[ Info: LBFGS: iter 27, time 118.45 s: f = -0.801839673823, ‖∇f‖ = 5.4222e-04, α = 1.00e+00, m = 26, nfg = 1 +[ Info: LBFGS: iter 28, time 118.77 s: f = -0.801857478904, ‖∇f‖ = 2.7917e-04, α = 1.00e+00, m = 27, nfg = 1 +[ Info: LBFGS: iter 29, time 119.08 s: f = -0.801864555224, ‖∇f‖ = 1.2319e-04, α = 1.00e+00, m = 28, nfg = 1 +[ Info: LBFGS: iter 30, time 119.38 s: f = -0.801865598736, ‖∇f‖ = 8.6048e-05, α = 1.00e+00, m = 29, nfg = 1 +[ Info: LBFGS: iter 31, time 119.68 s: f = -0.801867571755, ‖∇f‖ = 8.8636e-05, α = 1.00e+00, m = 30, nfg = 1 +[ Info: LBFGS: iter 32, time 119.99 s: f = -0.801870393528, ‖∇f‖ = 2.6554e-04, α = 1.00e+00, m = 31, nfg = 1 +[ Info: LBFGS: iter 33, time 120.34 s: f = -0.801874797039, ‖∇f‖ = 2.7841e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 34, time 120.68 s: f = -0.801877566644, ‖∇f‖ = 1.8523e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 35, time 121.00 s: f = -0.801878506245, ‖∇f‖ = 2.0638e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 36, time 121.31 s: f = -0.801878995097, ‖∇f‖ = 5.6081e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 37, time 121.62 s: f = -0.801879153573, ‖∇f‖ = 6.2356e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 38, time 121.94 s: f = -0.801879355075, ‖∇f‖ = 6.0528e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 39, time 122.25 s: f = -0.801880115100, ‖∇f‖ = 6.2768e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 40, time 122.58 s: f = -0.801881475065, ‖∇f‖ = 6.2301e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 41, time 122.94 s: f = -0.801882272425, ‖∇f‖ = 9.5267e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 42, time 123.26 s: f = -0.801882600033, ‖∇f‖ = 5.1283e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 43, time 123.58 s: f = -0.801882711875, ‖∇f‖ = 2.6091e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 44, time 123.87 s: f = -0.801882805828, ‖∇f‖ = 2.9316e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 45, time 124.15 s: f = -0.801883027060, ‖∇f‖ = 2.7982e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 46, time 124.45 s: f = -0.801883402178, ‖∇f‖ = 3.8102e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 47, time 124.78 s: f = -0.801883718321, ‖∇f‖ = 5.3658e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 48, time 125.09 s: f = -0.801883962887, ‖∇f‖ = 2.8728e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 49, time 125.43 s: f = -0.801884158085, ‖∇f‖ = 3.0680e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 50, time 125.77 s: f = -0.801884385940, ‖∇f‖ = 4.1973e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 51, time 126.12 s: f = -0.801884810459, ‖∇f‖ = 6.8881e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 52, time 126.47 s: f = -0.801885011014, ‖∇f‖ = 3.8651e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 53, time 126.80 s: f = -0.801885126625, ‖∇f‖ = 1.9013e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 54, time 127.13 s: f = -0.801885186489, ‖∇f‖ = 3.2919e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 55, time 127.48 s: f = -0.801885309713, ‖∇f‖ = 4.8521e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 56, time 127.83 s: f = -0.801885491631, ‖∇f‖ = 1.1478e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 57, time 128.20 s: f = -0.801885912857, ‖∇f‖ = 7.7221e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 58, time 128.57 s: f = -0.801886451980, ‖∇f‖ = 6.5316e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 59, time 128.94 s: f = -0.801886639804, ‖∇f‖ = 5.1567e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 60, time 129.63 s: f = -0.801886699372, ‖∇f‖ = 4.5540e-05, α = 3.68e-01, m = 32, nfg = 2 +[ Info: LBFGS: iter 61, time 129.92 s: f = -0.801886723993, ‖∇f‖ = 2.1992e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 62, time 130.22 s: f = -0.801886735202, ‖∇f‖ = 1.8064e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 63, time 130.55 s: f = -0.801886771395, ‖∇f‖ = 3.8651e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 64, time 130.86 s: f = -0.801886801952, ‖∇f‖ = 4.2630e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 65, time 131.16 s: f = -0.801886837856, ‖∇f‖ = 3.9318e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 66, time 131.46 s: f = -0.801886916784, ‖∇f‖ = 3.8747e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 67, time 131.78 s: f = -0.801887030055, ‖∇f‖ = 3.7139e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 68, time 132.12 s: f = -0.801887141198, ‖∇f‖ = 5.7017e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 69, time 132.83 s: f = -0.801887199205, ‖∇f‖ = 3.0700e-05, α = 5.24e-01, m = 32, nfg = 2 +[ Info: LBFGS: iter 70, time 133.16 s: f = -0.801887246613, ‖∇f‖ = 1.3885e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 71, time 133.49 s: f = -0.801887263716, ‖∇f‖ = 1.5769e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 72, time 133.83 s: f = -0.801887319464, ‖∇f‖ = 2.1424e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 73, time 134.17 s: f = -0.801887406143, ‖∇f‖ = 1.9896e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 74, time 134.86 s: f = -0.801887467460, ‖∇f‖ = 1.9800e-05, α = 3.61e-01, m = 32, nfg = 2 +[ Info: LBFGS: converged after 75 iterations and time 135.20 s: f = -0.801887535670, ‖∇f‖ = 9.9339e-06 + +```` + +### Verifying the result + +Having found the fixed point, we have essentially contracted the entire partition function +and we can start computing observables. The free energy per site for example is just given by +the final value of the cost function we have just optimized. + +````julia +@show f +```` + +```` +-0.8018875356698865 +```` + +As another check, we can compute the magnetization per site and compare it to a [reference +value obtaind through Monte-Carlo simulations](@cite hasenbusch_monte_2001). + +````julia +n3_final = InfiniteSquareNetwork(psi_final, T) +num = PEPSKit.contract_local_tensor((1, 1, 1), M, n3_final, env3_final) +denom = PEPSKit._contract_site((1, 1), n3_final, env3_final) +m = abs(num / denom) + +m_ref = 0.667162 + +@show abs(m - m_ref) +```` + +```` +0.00011315204780193433 +```` + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/docs/src/examples/3d_ising_partition_function/main.ipynb b/docs/src/examples/3d_ising_partition_function/main.ipynb new file mode 100644 index 000000000..92148e21c --- /dev/null +++ b/docs/src/examples/3d_ising_partition_function/main.ipynb @@ -0,0 +1,384 @@ +{ + "cells": [ + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Markdown #hide" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "# The 3D classical Ising model\n", + "\n", + "In a previous example we have already demonstrated an application of PEPSKit.jl to the study\n", + "of two-dimensional classical statistical mechanics models. In this example, we will take\n", + "this one step further, and showcase how one can use PEPSKit.jl to study three-dimensional\n", + "classical statistical mechanics models. We will demonstrate this for the specific case of\n", + "the three-dimensional classical Ising model, but the same techniques can be applied to other\n", + "three-dimensional classical models as well.\n", + "\n", + "The workflow showcased in this example is a bit more experimental and less 'black-box' than\n", + "previous examples. Therefore it also serves as a demonstration of some of the more internal\n", + "functionality of PEPSKit.jl, and how one can adapt it to different or less 'standard' kinds\n", + "of problems.\n", + "\n", + "Let us consider again the partition function of the classical Ising model,\n", + "\n", + "$$\n", + "\\mathcal{Z}(\\beta) = \\sum_{\\{s\\}} \\exp(-\\beta H(s)) \\text{ with } H(s) = -J \\sum_{\\langle i, j \\rangle} s_i s_j .\n", + "$$\n", + "\n", + "where now the classical spins $s_i \\in \\{+1, -1\\}$ are located on the vertices $i$ of a\n", + "three-dimensional cubic lattice. The partition function of this model can be represented as\n", + "a 3D tensor network with a rank-6 tensor at each vertex of the lattice. Such a network can\n", + "be contracted by finding the fixed point of the corresponding transfer operator, in exactly\n", + "the same spirit as the boundary MPS methods demonstrated in a previous example.\n", + "\n", + "Let's start by making the example deterministic and we doing our imports:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Random\n", + "using LinearAlgebra\n", + "using PEPSKit, TensorKit\n", + "using KrylovKit, OptimKit, Zygote\n", + "\n", + "Random.seed!(81812781144);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Defining the partition function\n", + "\n", + "Just as in the 2D case, the first step is to define the partition function as a tensor\n", + "network. The procedure is exactly the same as before, the only difference being that now\n", + "every spin participates in interactions associated to six links adjacent to that site. This\n", + "means that the partition function can be written as an infinite 3D network with a single\n", + "constituent rank-6 `PEPSKit.PEPOTensor` `O` located at each site of the cubic lattice. To\n", + "verify our example we will check the magnetization and energy, so we also define the\n", + "corresponding rank-6 tensors `M` and `E` while we're at it." + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "function three_dimensional_classical_ising(; beta, J=1.0)\n", + " K = beta * J\n", + "\n", + " # Boltzmann weights\n", + " t = ComplexF64[exp(K) exp(-K); exp(-K) exp(K)]\n", + " r = eigen(t)\n", + " q = r.vectors * sqrt(LinearAlgebra.Diagonal(r.values)) * r.vectors\n", + "\n", + " # local partition function tensor\n", + " O = zeros(2, 2, 2, 2, 2, 2)\n", + " O[1, 1, 1, 1, 1, 1] = 1\n", + " O[2, 2, 2, 2, 2, 2] = 1\n", + " @tensor o[-1 -2; -3 -4 -5 -6] :=\n", + " O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6]\n", + "\n", + " # magnetization tensor\n", + " M = copy(O)\n", + " M[2, 2, 2, 2, 2, 2] *= -1\n", + " @tensor m[-1 -2; -3 -4 -5 -6] :=\n", + " M[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6]\n", + "\n", + " # bond interaction tensor and energy-per-site tensor\n", + " e = ComplexF64[-J J; J -J] .* q\n", + " @tensor e_x[-1 -2; -3 -4 -5 -6] :=\n", + " O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * q[-3; 3] * e[-4; 4] * q[-5; 5] * q[-6; 6]\n", + " @tensor e_y[-1 -2; -3 -4 -5 -6] :=\n", + " O[1 2; 3 4 5 6] * q[-1; 1] * q[-2; 2] * e[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6]\n", + " @tensor e_z[-1 -2; -3 -4 -5 -6] :=\n", + " O[1 2; 3 4 5 6] * e[-1; 1] * q[-2; 2] * q[-3; 3] * q[-4; 4] * q[-5; 5] * q[-6; 6]\n", + " e = e_x + e_y + e_z\n", + "\n", + " # fixed tensor map space for all three\n", + " TMS = ℂ^2 ⊗ (ℂ^2)' ← ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)'\n", + "\n", + " return TensorMap(o, TMS), TensorMap(m, TMS), TensorMap(e, TMS)\n", + "end;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Let's initialize these tensors at inverse temperature $\\beta=0.2391$, which corresponds to a slightly\n", + "lower temperature than the critical value $\\beta_c=0.2216544…$" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "beta = 0.2391\n", + "O, M, E = three_dimensional_classical_ising(; beta)\n", + "O isa PEPSKit.PEPOTensor" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Contracting the partition function\n", + "\n", + "To contract our infinite 3D partition function, we first reinterpret it as an infinite power\n", + "of a slice-to-slice transfer operator $T$, where $T$ can be seen as an infinite 2D\n", + "projected entangled-pair operator (PEPO) consisting of the rank-6 tensor `O` at each site of\n", + "an infinite 3D square lattice. In the same spirit as the boundary MPS approach, all we need\n", + "to contract the whole partition function is to find the leading eigenvector of this PEPO.\n", + "The fixed point of such a PEPO exactly corresponds to a PEPS, and for the case of a\n", + "Hermitian transfer operator we can find this PEPS through [variational optimization](@cite\n", + "vanderstraeten_residual_2018).\n", + "\n", + "Indeed, for a Hermition transfer operator $T$ we can formulate the eigenvalue equation as\n", + "for a fixed point PEPS $|\\psi\\rangle$ as a variational problem\n", + "\n", + "$$\n", + "|\\psi\\rangle = \\text{argmin}_{|\\psi\\rangle} - \\lim_{N \\to ∞} \\frac{1}{N} \\log \\left( \\frac{\\langle \\psi | T | \\psi \\rangle}{\\langle \\psi | \\psi \\rangle} \\right)\n", + "$$\n", + "where $N$ is the diverging number of sites of the 2D transfer operator $T$.\n", + "\n", + "### Defining the cost function\n", + "\n", + "Using PEPSKit.jl, this cost function and its gradient can be easily computed, after which we can use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it.\n", + "recognize the denominator $\\langle \\psi | \\psi \\rangle$ as the familiar PEPS norm, where\n", + "we can compute the norm per site as the `network_value` of the corresponding\n", + "`InfiniteSquareNetwork` by contracting it with the CTMRG algorithm. Similarly, the\n", + "numerator $\\langle \\psi | T | \\psi \\rangle$ is nothing more than an\n", + "`InfiniteSquareNetwork` consisting of three layers corresponding to the ket, transfer\n", + "operator and bra objects. This object can be constructed and contracted in a straightforward\n", + "way, after we can again compute its `network_value`.\n", + "\n", + "So to define our cost function, we just need to construct the transfer operator as an\n", + "`InfinitePEPO` and specify a contraction algorithm we can use to compute the values\n", + "of the two relevant 2D networks. In addition, we'll specify the specific reverse rule\n", + "algorithm that will be used to compute the gradient of this cost function" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "boundary_alg = SimultaneousCTMRG(; maxiter=150, tol=1e-8, verbosity=1)\n", + "rrule_alg = EigSolver(;\n", + " solver_alg=KrylovKit.Arnoldi(; maxiter=30, tol=1e-6, eager=true), iterscheme=:diffgauge\n", + ")\n", + "T = InfinitePEPO(O)\n", + "\n", + "function pepo_costfun((psi, env2, env3))\n", + " # use Zygote to compute the gradient automatically\n", + " E, gs = withgradient(psi) do ψ\n", + " # construct the PEPS norm network\n", + " n2 = InfiniteSquareNetwork(ψ)\n", + " # contract this network\n", + " env2′, info = PEPSKit.hook_pullback(\n", + " leading_boundary, env2, n2, boundary_alg; alg_rrule=rrule_alg\n", + " )\n", + " # construct the PEPS-PEPO-PEPS overlap network\n", + " n3 = InfiniteSquareNetwork(ψ, T)\n", + " # contract this network\n", + " env3′, info = PEPSKit.hook_pullback(\n", + " leading_boundary, env3, n3, boundary_alg; alg_rrule=rrule_alg\n", + " )\n", + " # update the environments for reuse\n", + " PEPSKit.ignore_derivatives() do\n", + " PEPSKit.update!(env2, env2′)\n", + " PEPSKit.update!(env3, env3′)\n", + " end\n", + " # compute the network values per site\n", + " λ3 = network_value(n3, env3)\n", + " λ2 = network_value(n2, env2)\n", + " # use this to compute the actual cost function\n", + " return -log(real(λ3 / λ2))\n", + " end\n", + " g = only(gs)\n", + " return E, g\n", + "end;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "There are a few things to note about this cost function definition. Since we will pass\n", + "it to the `optimize` method from OptimKit.jl, we require it to return both our cost function\n", + "and the corresponding gradient. To do this, we simply use the `withgradient` method from\n", + "Zygote.jl to automatically compute the gradient of the cost function straight from the\n", + "primal computation. Since our cost function involves contraction using `leading_boundary`,\n", + "we also have to specify exactly how Zygote should handle the backpropagation of the gradient\n", + "through this function. This can be done using the `PEPSKit.hook_pullback` function from\n", + "PEPSKit.jl, which allows to hook into the pullback of a given function by specifying a\n", + "specific algorithm for the pullback computation. Here, we opted to use an Arnoldi method to\n", + "solve the linear problem defining the gradient of the network contraction at its fixed\n", + "point. This is exactly the workflow underlying `PEPSKit.fixedpoint` internally, and\n", + "more info on particular gradient algorithms can be found in the corresponding docstring.\n", + "\n", + "### Characterizing the optimization manifold\n", + "\n", + "In order to make the best use of OptimKit.jl, we should specify some properties of the\n", + "manifold on which we are optimizing. Looking at our cost function defined above, a point on\n", + "our optimization manifold corresponds to a `Tuple` of three objects. The first is an\n", + "`InfinitePEPS` encoding the fixed point we are actually optimizing, while the second and\n", + "third are `CTMRGEnv` objects corresponding to the environments of the double and triple\n", + "layer networks $\\langle \\psi | \\psi \\rangle$ and $\\langle \\psi | T | \\psi \\rangle$\n", + "respectively. While the environments are just there so we can reuse them between subsequent\n", + "contractions and we don't need to think about them much, optimizing over the manifold of\n", + "`InfinitePEPS` requires a bit more care.\n", + "\n", + "In particular, we need to define two kinds of operations on this manifold: a retraction and\n", + "a transport. The retraction, corresponding to the `retract` keyword argument of\n", + "`OptimKit.optimize`, specifies how to move from a point on a manifold along a given descent\n", + "direction to obtain a new manifold point. The transport, corresponding to the `transport!`\n", + "keyword argument of `OptimKit.optimize`, specifies how to transport a descent direction at a\n", + "given manifold point to a valid descent direction at a different manifold point according to\n", + "the appropriate metric. In PEPSKit.jl, these two procedures are defined through the\n", + "`PEPSKit.peps_retract` and `PEPSKit.peps_transport!` methods. While it is\n", + "instructive to read the corresponding docstrings in order to understand what these actually\n", + "do, here we can just blindly reuse them where the only difference is that we have to pass\n", + "along an extra environment since our cost function requires two distinct contractions as\n", + "opposed to the setting of Hamiltonian PEPS optimization." + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "function pepo_retract(x, η, α)\n", + " x´_partial, ξ = PEPSKit.peps_retract(x[1:2], η, α)\n", + " x´ = (x´_partial..., deepcopy(x[3]))\n", + " return x´, ξ\n", + "end\n", + "function pepo_transport!(ξ, x, η, α, x´)\n", + " return PEPSKit.peps_transport!(ξ, x[1:2], η, α, x´[1:2])\n", + "end;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "### Finding the fixed point\n", + "\n", + "All that is left then is to specify the virtual spaces of the PEPS and the two environments,\n", + "initialize them in the appropriate way, choose an optimization algortithm and call the\n", + "`optimize` function from OptimKit.jl to get our desired PEPS fixed point." + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "Vpeps = ℂ^2\n", + "Venv = ℂ^12\n", + "\n", + "psi0 = initializePEPS(T, Vpeps)\n", + "env2_0 = CTMRGEnv(InfiniteSquareNetwork(psi0), Venv)\n", + "env3_0 = CTMRGEnv(InfiniteSquareNetwork(psi0, T), Venv)\n", + "\n", + "optimizer_alg = LBFGS(32; maxiter=100, gradtol=1e-5, verbosity=3)\n", + "\n", + "(psi_final, env2_final, env3_final), f, = optimize(\n", + " pepo_costfun,\n", + " (psi0, env2_0, env3_0),\n", + " optimizer_alg;\n", + " inner=PEPSKit.real_inner,\n", + " retract=pepo_retract,\n", + " (transport!)=(pepo_transport!),\n", + ");" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "### Verifying the result\n", + "\n", + "Having found the fixed point, we have essentially contracted the entire partition function\n", + "and we can start computing observables. The free energy per site for example is just given by\n", + "the final value of the cost function we have just optimized." + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "@show f" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "As another check, we can compute the magnetization per site and compare it to a [reference\n", + "value obtaind through Monte-Carlo simulations](@cite hasenbusch_monte_2001)." + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "n3_final = InfiniteSquareNetwork(psi_final, T)\n", + "num = PEPSKit.contract_local_tensor((1, 1, 1), M, n3_final, env3_final)\n", + "denom = PEPSKit._contract_site((1, 1), n3_final, env3_final)\n", + "m = abs(num / denom)\n", + "\n", + "m_ref = 0.667162\n", + "\n", + "@show abs(m - m_ref)" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "---\n", + "\n", + "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" + ], + "metadata": {} + } + ], + "nbformat_minor": 3, + "metadata": { + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.11.4" + }, + "kernelspec": { + "name": "julia-1.11", + "display_name": "Julia 1.11.4", + "language": "julia" + } + }, + "nbformat": 4 +} diff --git a/docs/src/examples/4.xxz/index.md b/docs/src/examples/4.xxz/index.md deleted file mode 100644 index a65efe7c0..000000000 --- a/docs/src/examples/4.xxz/index.md +++ /dev/null @@ -1,238 +0,0 @@ -```@meta -EditURL = "../../../../examples/4.xxz/main.jl" -``` - -[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//4.xxz/main.ipynb) -[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//4.xxz/main.ipynb) -[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//4.xxz) - - -# Néel order in the $U(1)$-symmetric XXZ model - -Here, we want to look at a special case of the Heisenberg model, where the $x$ and $y$ -couplings are equal, called the XXZ model - -```math -H_0 = J \big(\sum_{\langle i, j \rangle} S_i^x S_j^x + S_i^y S_j^y + \Delta S_i^z S_j^z \big) . -``` - -For appropriate $\Delta$, the model enters an antiferromagnetic phase (Néel order) which we -will force by adding staggered magnetic charges to ``H_0``. Furthermore, since the XXZ -Hamiltonian obeys a $U(1)$ symmetry, we will make use of that and work with $U(1)$-symmetric -PEPS and CTMRG environments. For simplicity, we will consider spin-$1/2$ operators. - -But first, let's make this example deterministic and import the required packages: - -````julia -using Random -using TensorKit, PEPSKit -using MPSKit: add_physical_charge -Random.seed!(2928528935); -```` - -## Constructing the model - -Let us define the $U(1)$-symmetric XXZ Hamiltonian on a $2 \times 2$ unit cell with the -parameters: - -````julia -J = 1.0 -Delta = 1.0 -spin = 1//2 -symmetry = U1Irrep -lattice = InfiniteSquare(2, 2) -H₀ = heisenberg_XXZ(ComplexF64, symmetry, lattice; J, Delta, spin); -```` - -This ensures that our PEPS ansatz can support the bipartite Néel order. As discussed above, -we encode the Néel order directly in the ansatz by adding staggered auxiliary physical -charges: - -````julia -S_aux = [ - U1Irrep(-1//2) U1Irrep(1//2) - U1Irrep(1//2) U1Irrep(-1//2) -] -H = add_physical_charge(H₀, S_aux); -```` - -## Specifying the symmetric virtual spaces - -Before we create an initial PEPS and CTM environment, we need to think about which -symmetric spaces we need to construct. Since we want to exploit the global $U(1)$ symmetry -of the model, we will use TensorKit's `U1Space`s where we specify dimensions for each -symmetry sector. From the virtual spaces, we will need to construct a unit cell (a matrix) -of spaces which will be supplied to the PEPS constructor. The same is true for the physical -spaces, which can be extracted directly from the Hamiltonian `LocalOperator`: - -````julia -V_peps = U1Space(0 => 2, 1 => 1, -1 => 1) -V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2) -virtual_spaces = fill(V_peps, size(lattice)...) -physical_spaces = H.lattice -```` - -```` -2×2 Matrix{GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}}: - Rep[U₁](0=>1, -1=>1) Rep[U₁](0=>1, 1=>1) - Rep[U₁](0=>1, 1=>1) Rep[U₁](0=>1, -1=>1) -```` - -## Ground state search - -From this point onwards it's business as usual: Create an initial PEPS and environment -(using the symmetric spaces), specify the algorithmic parameters and optimize: - -````julia -boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace)) -gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge) -optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=85, ls_maxiter=3, ls_maxfg=3) - -peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) -env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); -```` - -```` -[ Info: CTMRG init: obj = -1.121020187593e+04 -6.991066478500e+03im err = 1.0000e+00 -[ Info: CTMRG conv 26: obj = +6.369731502336e+03 -8.500319381710e-08im err = 7.5599921139e-09 time = 2.09 sec - -```` - -Finally, we can optimize the PEPS with respect to the XXZ Hamiltonian. Note that the -optimization might take a while since precompilation of symmetric AD code takes longer and -because symmetric tensors do create a bit of overhead (which does pay off at larger bond -and environment dimensions): - -````julia -peps, env, E, info = fixedpoint( - H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3 -) -@show E; -```` - -```` -[ Info: LBFGS: initializing with f = -0.033045967451, ‖∇f‖ = 3.2973e-01 -┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Float64}`; -│ this fallback will disappear in future versions of VectorInterface.jl -└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 -┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: -│ α = 2.50e+01, dϕ = -9.83e-03, ϕ - ϕ₀ = -1.52e-01 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 1, time 81.96 s: f = -0.185441286972, ‖∇f‖ = 1.8487e+00, α = 2.50e+01, m = 0, nfg = 4 -┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, GradedSpace{U1Irrep, TensorKit.SortedVectorDict{U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; -│ this fallback will disappear in future versions of VectorInterface.jl -└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 -┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: -│ α = 2.50e+01, dϕ = -1.83e-03, ϕ - ϕ₀ = -3.94e-01 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 2, time 139.01 s: f = -0.579296056587, ‖∇f‖ = 5.7534e-01, α = 2.50e+01, m = 0, nfg = 4 -[ Info: LBFGS: iter 3, time 147.91 s: f = -0.613492668655, ‖∇f‖ = 3.3905e-01, α = 1.00e+00, m = 1, nfg = 1 -[ Info: LBFGS: iter 4, time 155.93 s: f = -0.638698278101, ‖∇f‖ = 2.2127e-01, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 5, time 164.77 s: f = -0.650278206280, ‖∇f‖ = 1.9661e-01, α = 1.00e+00, m = 3, nfg = 1 -[ Info: LBFGS: iter 6, time 173.00 s: f = -0.654875781442, ‖∇f‖ = 7.1166e-02, α = 1.00e+00, m = 4, nfg = 1 -[ Info: LBFGS: iter 7, time 181.88 s: f = -0.656067729644, ‖∇f‖ = 5.1946e-02, α = 1.00e+00, m = 5, nfg = 1 -[ Info: LBFGS: iter 8, time 190.01 s: f = -0.659056547972, ‖∇f‖ = 5.4114e-02, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 9, time 198.16 s: f = -0.660492187403, ‖∇f‖ = 1.0001e-01, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 10, time 205.43 s: f = -0.662131899972, ‖∇f‖ = 3.0720e-02, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 11, time 213.51 s: f = -0.662491636970, ‖∇f‖ = 2.1327e-02, α = 1.00e+00, m = 9, nfg = 1 -[ Info: LBFGS: iter 12, time 220.80 s: f = -0.662815874554, ‖∇f‖ = 2.0939e-02, α = 1.00e+00, m = 10, nfg = 1 -[ Info: LBFGS: iter 13, time 228.87 s: f = -0.663206295533, ‖∇f‖ = 2.3137e-02, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 14, time 236.16 s: f = -0.663617412480, ‖∇f‖ = 3.2148e-02, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 15, time 244.23 s: f = -0.663981399612, ‖∇f‖ = 2.1162e-02, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 16, time 251.62 s: f = -0.664500170184, ‖∇f‖ = 3.0047e-02, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 17, time 259.80 s: f = -0.665018204774, ‖∇f‖ = 3.4052e-02, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 18, time 267.91 s: f = -0.665352132477, ‖∇f‖ = 4.0506e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 19, time 276.74 s: f = -0.665708949595, ‖∇f‖ = 1.8115e-02, α = 1.00e+00, m = 17, nfg = 1 -[ Info: LBFGS: iter 20, time 284.74 s: f = -0.665851319983, ‖∇f‖ = 1.7887e-02, α = 1.00e+00, m = 18, nfg = 1 -[ Info: LBFGS: iter 21, time 293.66 s: f = -0.666077676932, ‖∇f‖ = 2.1504e-02, α = 1.00e+00, m = 19, nfg = 1 -[ Info: LBFGS: iter 22, time 301.95 s: f = -0.666415750625, ‖∇f‖ = 2.1742e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 23, time 319.57 s: f = -0.666535417444, ‖∇f‖ = 2.1053e-02, α = 3.37e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 24, time 328.83 s: f = -0.666677914685, ‖∇f‖ = 1.4107e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 25, time 337.42 s: f = -0.666880717597, ‖∇f‖ = 1.5936e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 26, time 346.84 s: f = -0.667020492218, ‖∇f‖ = 2.1705e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 27, time 355.47 s: f = -0.667174861341, ‖∇f‖ = 1.3538e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 28, time 364.80 s: f = -0.667242799138, ‖∇f‖ = 1.3749e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 29, time 373.39 s: f = -0.667289201830, ‖∇f‖ = 9.6270e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 30, time 382.70 s: f = -0.667382804207, ‖∇f‖ = 1.1004e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 31, time 391.35 s: f = -0.667514031651, ‖∇f‖ = 1.5020e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 32, time 400.73 s: f = -0.667654012398, ‖∇f‖ = 1.6237e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 33, time 409.44 s: f = -0.667695159156, ‖∇f‖ = 2.0278e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 34, time 418.69 s: f = -0.667791548479, ‖∇f‖ = 7.2359e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 35, time 427.10 s: f = -0.667831622740, ‖∇f‖ = 7.0221e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 36, time 436.35 s: f = -0.667897197556, ‖∇f‖ = 1.0611e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 37, time 444.91 s: f = -0.667974329902, ‖∇f‖ = 1.3520e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 38, time 454.41 s: f = -0.668044978527, ‖∇f‖ = 8.1835e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 39, time 463.08 s: f = -0.668096641090, ‖∇f‖ = 5.8523e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 40, time 474.36 s: f = -0.668140633648, ‖∇f‖ = 8.7357e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 41, time 485.42 s: f = -0.668191141610, ‖∇f‖ = 1.0519e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 42, time 497.24 s: f = -0.668251028839, ‖∇f‖ = 9.9323e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 43, time 508.60 s: f = -0.668287406221, ‖∇f‖ = 8.1822e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 44, time 520.51 s: f = -0.668312220264, ‖∇f‖ = 4.9144e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 45, time 531.38 s: f = -0.668335763877, ‖∇f‖ = 5.4414e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 46, time 540.97 s: f = -0.668372098383, ‖∇f‖ = 6.8595e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 47, time 549.63 s: f = -0.668431605944, ‖∇f‖ = 8.8807e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 48, time 567.86 s: f = -0.668464682116, ‖∇f‖ = 8.2571e-03, α = 5.24e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 49, time 577.42 s: f = -0.668492867254, ‖∇f‖ = 4.3005e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 50, time 586.10 s: f = -0.668513727270, ‖∇f‖ = 3.9910e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 51, time 595.51 s: f = -0.668532155485, ‖∇f‖ = 4.9090e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 52, time 604.13 s: f = -0.668564505110, ‖∇f‖ = 7.4817e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 53, time 613.65 s: f = -0.668593093779, ‖∇f‖ = 5.7300e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 54, time 622.26 s: f = -0.668613013637, ‖∇f‖ = 4.0964e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 55, time 631.67 s: f = -0.668634613224, ‖∇f‖ = 4.2489e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 56, time 640.31 s: f = -0.668649481004, ‖∇f‖ = 4.5912e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 57, time 650.03 s: f = -0.668670198485, ‖∇f‖ = 3.8195e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 58, time 658.82 s: f = -0.668688448995, ‖∇f‖ = 3.4508e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 59, time 668.38 s: f = -0.668696405392, ‖∇f‖ = 5.8372e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 60, time 677.09 s: f = -0.668706977023, ‖∇f‖ = 3.5019e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 61, time 686.54 s: f = -0.668721369553, ‖∇f‖ = 2.8608e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 62, time 695.13 s: f = -0.668732770821, ‖∇f‖ = 3.0068e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 63, time 704.62 s: f = -0.668738498959, ‖∇f‖ = 7.3212e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 64, time 713.61 s: f = -0.668752996535, ‖∇f‖ = 3.0434e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 65, time 723.01 s: f = -0.668762694601, ‖∇f‖ = 1.9787e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 66, time 731.88 s: f = -0.668773371271, ‖∇f‖ = 2.8034e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 67, time 741.54 s: f = -0.668783730169, ‖∇f‖ = 4.4007e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 68, time 750.34 s: f = -0.668794471804, ‖∇f‖ = 2.4210e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 69, time 759.94 s: f = -0.668800925048, ‖∇f‖ = 1.7114e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 70, time 768.74 s: f = -0.668808484765, ‖∇f‖ = 2.5442e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 71, time 778.43 s: f = -0.668813882136, ‖∇f‖ = 3.7919e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 72, time 787.17 s: f = -0.668819791141, ‖∇f‖ = 2.1652e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 73, time 796.73 s: f = -0.668826145765, ‖∇f‖ = 1.9093e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 74, time 805.39 s: f = -0.668830491901, ‖∇f‖ = 2.4506e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 75, time 814.87 s: f = -0.668836964982, ‖∇f‖ = 2.6465e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 76, time 833.41 s: f = -0.668840404782, ‖∇f‖ = 3.1398e-03, α = 3.87e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 77, time 842.18 s: f = -0.668843872314, ‖∇f‖ = 3.1246e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 78, time 851.69 s: f = -0.668847211574, ‖∇f‖ = 2.4091e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 79, time 860.43 s: f = -0.668850327797, ‖∇f‖ = 2.0185e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 80, time 870.17 s: f = -0.668852132421, ‖∇f‖ = 4.1279e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 81, time 897.81 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 4.20e-02, m = 20, nfg = 3 -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 82, time 926.31 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 83, time 954.24 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 84, time 983.38 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02, α = 0.00e+00, m = 20, nfg = 3 -┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 0.00e+00, dϕ = -8.64e-04, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -┌ Warning: LBFGS: not converged to requested tol after 85 iterations and time 1011.99 s: f = -0.668855329283, ‖∇f‖ = 3.7864e-02 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/lbfgs.jl:197 -E = -0.6688553292829834 - -```` - -Note that for the specified parameters $J=\Delta=1$, we simulated the same Hamiltonian as -in the [Heisenberg example](@ref examples_heisenberg). In that example, with a non-symmetric -$D=2$ PEPS simulation, we reached a ground-state energy of around $E_\text{D=2} = -0.6625\dots$. -Again comparing against [Sandvik's](@cite sandvik_computational_2011) accurate QMC estimate -``E_{\text{ref}}=−0.6694421``, we see that we already got closer to the reference energy. - ---- - -*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* - diff --git a/docs/src/examples/4.xxz/main.ipynb b/docs/src/examples/4.xxz/main.ipynb deleted file mode 100644 index 7f6e66329..000000000 --- a/docs/src/examples/4.xxz/main.ipynb +++ /dev/null @@ -1,199 +0,0 @@ -{ - "cells": [ - { - "outputs": [], - "cell_type": "code", - "source": [ - "using Markdown #hide" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "# Néel order in the $U(1)$-symmetric XXZ model\n", - "\n", - "Here, we want to look at a special case of the Heisenberg model, where the $x$ and $y$\n", - "couplings are equal, called the XXZ model\n", - "\n", - "$$\n", - "H_0 = J \\big(\\sum_{\\langle i, j \\rangle} S_i^x S_j^x + S_i^y S_j^y + \\Delta S_i^z S_j^z \\big) .\n", - "$$\n", - "\n", - "For appropriate $\\Delta$, the model enters an antiferromagnetic phase (Néel order) which we\n", - "will force by adding staggered magnetic charges to $H_0$. Furthermore, since the XXZ\n", - "Hamiltonian obeys a $U(1)$ symmetry, we will make use of that and work with $U(1)$-symmetric\n", - "PEPS and CTMRG environments. For simplicity, we will consider spin-$1/2$ operators.\n", - "\n", - "But first, let's make this example deterministic and import the required packages:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "using Random\n", - "using TensorKit, PEPSKit\n", - "using MPSKit: add_physical_charge\n", - "Random.seed!(2928528935);" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "## Constructing the model\n", - "\n", - "Let us define the $U(1)$-symmetric XXZ Hamiltonian on a $2 \\times 2$ unit cell with the\n", - "parameters:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "J = 1.0\n", - "Delta = 1.0\n", - "spin = 1//2\n", - "symmetry = U1Irrep\n", - "lattice = InfiniteSquare(2, 2)\n", - "H₀ = heisenberg_XXZ(ComplexF64, symmetry, lattice; J, Delta, spin);" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "This ensures that our PEPS ansatz can support the bipartite Néel order. As discussed above,\n", - "we encode the Néel order directly in the ansatz by adding staggered auxiliary physical\n", - "charges:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "S_aux = [\n", - " U1Irrep(-1//2) U1Irrep(1//2)\n", - " U1Irrep(1//2) U1Irrep(-1//2)\n", - "]\n", - "H = add_physical_charge(H₀, S_aux);" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "## Specifying the symmetric virtual spaces\n", - "\n", - "Before we create an initial PEPS and CTM environment, we need to think about which\n", - "symmetric spaces we need to construct. Since we want to exploit the global $U(1)$ symmetry\n", - "of the model, we will use TensorKit's `U1Space`s where we specify dimensions for each\n", - "symmetry sector. From the virtual spaces, we will need to construct a unit cell (a matrix)\n", - "of spaces which will be supplied to the PEPS constructor. The same is true for the physical\n", - "spaces, which can be extracted directly from the Hamiltonian `LocalOperator`:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "V_peps = U1Space(0 => 2, 1 => 1, -1 => 1)\n", - "V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2)\n", - "virtual_spaces = fill(V_peps, size(lattice)...)\n", - "physical_spaces = H.lattice" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "## Ground state search\n", - "\n", - "From this point onwards it's business as usual: Create an initial PEPS and environment\n", - "(using the symmetric spaces), specify the algorithmic parameters and optimize:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace))\n", - "gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge)\n", - "optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=85, ls_maxiter=3, ls_maxfg=3)\n", - "\n", - "peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces)\n", - "env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...);" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Finally, we can optimize the PEPS with respect to the XXZ Hamiltonian. Note that the\n", - "optimization might take a while since precompilation of symmetric AD code takes longer and\n", - "because symmetric tensors do create a bit of overhead (which does pay off at larger bond\n", - "and environment dimensions):" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "peps, env, E, info = fixedpoint(\n", - " H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3\n", - ")\n", - "@show E;" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Note that for the specified parameters $J=\\Delta=1$, we simulated the same Hamiltonian as\n", - "in the Heisenberg example. In that example, with a non-symmetric\n", - "$D=2$ PEPS simulation, we reached a ground-state energy of around $E_\\text{D=2} = -0.6625\\dots$.\n", - "Again comparing against [Sandvik's](@cite sandvik_computational_2011) accurate QMC estimate\n", - "$E_{\\text{ref}}=−0.6694421$, we see that we already got closer to the reference energy." - ], - "metadata": {} - }, - { - "cell_type": "markdown", - "source": [ - "---\n", - "\n", - "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" - ], - "metadata": {} - } - ], - "nbformat_minor": 3, - "metadata": { - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.11.4" - }, - "kernelspec": { - "name": "julia-1.11", - "display_name": "Julia 1.11.4", - "language": "julia" - } - }, - "nbformat": 4 -} diff --git a/docs/src/examples/5.fermi_hubbard/index.md b/docs/src/examples/5.fermi_hubbard/index.md deleted file mode 100644 index 36ce36b3a..000000000 --- a/docs/src/examples/5.fermi_hubbard/index.md +++ /dev/null @@ -1,244 +0,0 @@ -```@meta -EditURL = "../../../../examples/5.fermi_hubbard/main.jl" -``` - -[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//5.fermi_hubbard/main.ipynb) -[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//5.fermi_hubbard/main.ipynb) -[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//5.fermi_hubbard) - - -# Fermi-Hubbard model with $f\mathbb{Z}_2 \boxtimes U(1)$ symmetry, at large $U$ and half-filling - -In this example, we will demonstrate how to handle fermionic PEPS tensors and how to -optimize them. To that end, we consider the two-dimensional Hubbard model - -```math -H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- + -c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i -``` - -where $\sigma \in \{\uparrow,\downarrow\}$ and $n_{i,\sigma} = c_{i,\sigma}^+ c_{i,\sigma}^-$ -is the fermionic number operator. As in previous examples, using fermionic degrees of freedom -is a matter of creating tensors with the right symmetry sectors - the rest of the simulation -workflow remains the same. - -First though, we make the example deterministic by seeding the RNG, and we make our imports: - -````julia -using Random -using TensorKit, PEPSKit -using MPSKit: add_physical_charge -Random.seed!(2928528937); -```` - -## Defining the fermionic Hamiltonian - -Let us start by fixing the parameters of the Hubbard model. We're going to use a hopping of -$t=1$ and a large $U=8$ on a $2 \times 2$ unit cell: - -````julia -t = 1.0 -U = 8.0 -lattice = InfiniteSquare(2, 2); -```` - -In order to create fermionic tensors, one needs to define symmetry sectors using TensorKit's -`FermionParity`. Not only do we want use fermion parity but we also want our -particles to exploit the global $U(1)$ symmetry. The combined product sector can be obtained -using the [Deligne product](https://jutho.github.io/TensorKit.jl/stable/lib/sectors/#TensorKitSectors.deligneproduct-Tuple{Sector,%20Sector}), -called through `⊠` which is obtained by typing `\boxtimes+TAB`. We will not impose any extra -spin symmetry, so we have: - -````julia -fermion = fℤ₂ -particle_symmetry = U1Irrep -spin_symmetry = Trivial -S = fermion ⊠ particle_symmetry -```` - -```` -ProductSector{Tuple{FermionParity, U1Irrep}} -```` - -The next step is defining graded virtual PEPS and environment spaces using `S`. Here we also -use the symmetry sector to impose half-filling. That is all we need to define the Hubbard -Hamiltonian: - -````julia -D, χ = 1, 1 -V_peps = Vect[S]((0, 0) => 2 * D, (1, 1) => D, (1, -1) => D) -V_env = Vect[S]( - (0, 0) => 4 * χ, (1, -1) => 2 * χ, (1, 1) => 2 * χ, (0, 2) => χ, (0, -2) => χ -) -S_aux = S((1, -1)) -H₀ = hubbard_model(ComplexF64, particle_symmetry, spin_symmetry, lattice; t, U) -H = add_physical_charge(H₀, fill(S_aux, size(H₀.lattice)...)); -```` - -## Finding the ground state - -Again, the procedure of ground state optimization is very similar to before. First, we -define all algorithmic parameters: - -````julia -boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace)) -gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge) -optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=80, ls_maxiter=3, ls_maxfg=3) -```` - -```` -(tol = 0.0001, alg = :lbfgs, maxiter = 80, ls_maxiter = 3, ls_maxfg = 3) -```` - -Second, we initialize a PEPS state and environment (which we converge) constructed from -symmetric physical and virtual spaces: - -````julia -physical_spaces = H.lattice -virtual_spaces = fill(V_peps, size(lattice)...) -peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) -env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); -```` - -```` -[ Info: CTMRG init: obj = +1.089691795517e+05 -1.031847476500e+05im err = 1.0000e+00 -[ Info: CTMRG conv 26: obj = +8.359116284442e+04 -2.209308149759e-07im err = 7.4963852327e-09 time = 1.72 sec - -```` - -And third, we start the ground state search (this does take quite long): - -````julia -peps, env, E, info = fixedpoint( - H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3 -) -@show E; -```` - -```` -[ Info: LBFGS: initializing with f = 6.680719803101, ‖∇f‖ = 9.5851e+00 -┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorMap{ComplexF64, GradedSpace{ProductSector{Tuple{FermionParity, U1Irrep}}, TensorKit.SortedVectorDict{ProductSector{Tuple{FermionParity, U1Irrep}}, Int64}}, 1, 4, Vector{ComplexF64}}}, Float64}`; -│ this fallback will disappear in future versions of VectorInterface.jl -└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 -┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: -│ α = 2.50e+01, dϕ = -1.49e-01, ϕ - ϕ₀ = -2.88e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 1, time 71.29 s: f = 3.801336885086, ‖∇f‖ = 2.3457e+01, α = 2.50e+01, m = 0, nfg = 4 -┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorMap{ComplexF64, GradedSpace{ProductSector{Tuple{FermionParity, U1Irrep}}, TensorKit.SortedVectorDict{ProductSector{Tuple{FermionParity, U1Irrep}}, Int64}}, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, GradedSpace{ProductSector{Tuple{FermionParity, U1Irrep}}, TensorKit.SortedVectorDict{ProductSector{Tuple{FermionParity, U1Irrep}}, Int64}}, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; -│ this fallback will disappear in future versions of VectorInterface.jl -└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 -┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: -│ α = 2.50e+01, dϕ = -5.73e-03, ϕ - ϕ₀ = -3.81e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 2, time 122.63 s: f = -0.009717029459, ‖∇f‖ = 3.2049e+00, α = 2.50e+01, m = 0, nfg = 4 -[ Info: LBFGS: iter 3, time 134.34 s: f = -0.115193722670, ‖∇f‖ = 2.7846e+00, α = 1.00e+00, m = 1, nfg = 1 -[ Info: LBFGS: iter 4, time 145.23 s: f = -0.616409716851, ‖∇f‖ = 2.3680e+00, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 5, time 156.06 s: f = -0.817798399433, ‖∇f‖ = 1.9112e+00, α = 1.00e+00, m = 3, nfg = 1 -[ Info: LBFGS: iter 6, time 166.77 s: f = -0.990279759337, ‖∇f‖ = 2.3790e+00, α = 1.00e+00, m = 4, nfg = 1 -[ Info: LBFGS: iter 7, time 176.62 s: f = -1.142781186573, ‖∇f‖ = 1.5680e+00, α = 1.00e+00, m = 5, nfg = 1 -[ Info: LBFGS: iter 8, time 185.65 s: f = -1.238252443477, ‖∇f‖ = 3.5020e+00, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 9, time 194.43 s: f = -1.438152734653, ‖∇f‖ = 1.3366e+00, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 10, time 204.31 s: f = -1.523106583487, ‖∇f‖ = 1.3495e+00, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 11, time 222.04 s: f = -1.619309135102, ‖∇f‖ = 1.1948e+00, α = 1.72e-01, m = 9, nfg = 2 -[ Info: LBFGS: iter 12, time 240.81 s: f = -1.681436596876, ‖∇f‖ = 9.4842e-01, α = 2.37e-01, m = 10, nfg = 2 -[ Info: LBFGS: iter 13, time 249.75 s: f = -1.720664496573, ‖∇f‖ = 1.4227e+00, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 14, time 258.70 s: f = -1.770786384177, ‖∇f‖ = 6.2727e-01, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 15, time 267.73 s: f = -1.807472303371, ‖∇f‖ = 5.1285e-01, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 16, time 277.56 s: f = -1.859749181748, ‖∇f‖ = 7.1361e-01, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 17, time 286.53 s: f = -1.893132087361, ‖∇f‖ = 6.7317e-01, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 18, time 295.80 s: f = -1.923092881224, ‖∇f‖ = 5.5354e-01, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 19, time 304.76 s: f = -1.948135813135, ‖∇f‖ = 4.7674e-01, α = 1.00e+00, m = 17, nfg = 1 -[ Info: LBFGS: iter 20, time 314.57 s: f = -1.969521615479, ‖∇f‖ = 4.1602e-01, α = 1.00e+00, m = 18, nfg = 1 -[ Info: LBFGS: iter 21, time 323.68 s: f = -1.982569425643, ‖∇f‖ = 4.5188e-01, α = 1.00e+00, m = 19, nfg = 1 -[ Info: LBFGS: iter 22, time 332.65 s: f = -1.994023077610, ‖∇f‖ = 3.1544e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 23, time 341.71 s: f = -2.002841830905, ‖∇f‖ = 3.0502e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 24, time 351.59 s: f = -2.014066310582, ‖∇f‖ = 3.3498e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 25, time 360.71 s: f = -2.022003043413, ‖∇f‖ = 4.3896e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 26, time 369.80 s: f = -2.030108717392, ‖∇f‖ = 2.0527e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 27, time 378.93 s: f = -2.035064147211, ‖∇f‖ = 1.6295e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 28, time 389.67 s: f = -2.038644470340, ‖∇f‖ = 1.6908e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 29, time 398.79 s: f = -2.041287690928, ‖∇f‖ = 2.4233e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 30, time 407.81 s: f = -2.044963035952, ‖∇f‖ = 1.2134e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 31, time 416.86 s: f = -2.046709236508, ‖∇f‖ = 9.5293e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 32, time 426.74 s: f = -2.048704733827, ‖∇f‖ = 1.0554e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 33, time 435.83 s: f = -2.049753805875, ‖∇f‖ = 1.7672e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 34, time 444.84 s: f = -2.051012660993, ‖∇f‖ = 6.4429e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 35, time 453.91 s: f = -2.051487370981, ‖∇f‖ = 4.8991e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 36, time 463.83 s: f = -2.051906999941, ‖∇f‖ = 6.2050e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 37, time 472.88 s: f = -2.052351426534, ‖∇f‖ = 9.2731e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 38, time 481.96 s: f = -2.052848312522, ‖∇f‖ = 4.8571e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 39, time 490.98 s: f = -2.053135862679, ‖∇f‖ = 3.5616e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 40, time 500.79 s: f = -2.053405789539, ‖∇f‖ = 4.2302e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 41, time 509.87 s: f = -2.053600753566, ‖∇f‖ = 5.7965e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 42, time 518.97 s: f = -2.053812280854, ‖∇f‖ = 3.2230e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 43, time 528.15 s: f = -2.054009907356, ‖∇f‖ = 3.1640e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 44, time 538.31 s: f = -2.054189837590, ‖∇f‖ = 4.1575e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 45, time 547.45 s: f = -2.054332733432, ‖∇f‖ = 6.9193e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 46, time 556.49 s: f = -2.054519400845, ‖∇f‖ = 2.9113e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 47, time 565.56 s: f = -2.054613033662, ‖∇f‖ = 2.5330e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 48, time 575.48 s: f = -2.054720913698, ‖∇f‖ = 3.1755e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 49, time 584.57 s: f = -2.054879195070, ‖∇f‖ = 3.4648e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 50, time 593.69 s: f = -2.054968252492, ‖∇f‖ = 8.4876e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 51, time 602.62 s: f = -2.055240579153, ‖∇f‖ = 3.1534e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 52, time 612.56 s: f = -2.055381107398, ‖∇f‖ = 2.5668e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 53, time 621.69 s: f = -2.055572782456, ‖∇f‖ = 3.8027e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 54, time 630.87 s: f = -2.055872532380, ‖∇f‖ = 4.6489e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 55, time 639.99 s: f = -2.056396587816, ‖∇f‖ = 8.8052e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 56, time 650.21 s: f = -2.056855859558, ‖∇f‖ = 8.3624e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 57, time 659.33 s: f = -2.057479262333, ‖∇f‖ = 4.4470e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 58, time 668.49 s: f = -2.057912152061, ‖∇f‖ = 5.9296e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 59, time 677.62 s: f = -2.058287008863, ‖∇f‖ = 6.0141e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 60, time 687.77 s: f = -2.058998497280, ‖∇f‖ = 6.2194e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 61, time 706.16 s: f = -2.059474789738, ‖∇f‖ = 1.0077e-01, α = 4.81e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 62, time 715.09 s: f = -2.060082192514, ‖∇f‖ = 6.8325e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 63, time 725.00 s: f = -2.060482721863, ‖∇f‖ = 7.3259e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 64, time 734.39 s: f = -2.060740013280, ‖∇f‖ = 9.5135e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 65, time 743.57 s: f = -2.061313322733, ‖∇f‖ = 7.1706e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 66, time 752.71 s: f = -2.061712546612, ‖∇f‖ = 5.4970e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 67, time 762.80 s: f = -2.062080105542, ‖∇f‖ = 5.4651e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 68, time 771.90 s: f = -2.062377423092, ‖∇f‖ = 7.0780e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 69, time 790.05 s: f = -2.062702057386, ‖∇f‖ = 9.7500e-02, α = 5.01e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 70, time 799.85 s: f = -2.063176089747, ‖∇f‖ = 7.1783e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 71, time 808.93 s: f = -2.063937979922, ‖∇f‖ = 8.8528e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 72, time 817.94 s: f = -2.064211612845, ‖∇f‖ = 8.9468e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 73, time 826.94 s: f = -2.064625801997, ‖∇f‖ = 8.5359e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 74, time 836.93 s: f = -2.065216197065, ‖∇f‖ = 8.9020e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 75, time 846.12 s: f = -2.065871494784, ‖∇f‖ = 1.0651e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 76, time 855.26 s: f = -2.066880037398, ‖∇f‖ = 1.4447e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 77, time 886.46 s: f = -2.067848102521, ‖∇f‖ = 2.0648e-01, α = 5.31e-01, m = 20, nfg = 3 -┌ Warning: Linesearch not converged after 2 iterations and 4 function evaluations: -│ α = 0.00e+00, dϕ = -9.88e-03, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 78, time 925.19 s: f = -2.067848102521, ‖∇f‖ = 2.0648e-01, α = 0.00e+00, m = 20, nfg = 4 -┌ Warning: Linesearch not converged after 2 iterations and 4 function evaluations: -│ α = 0.00e+00, dϕ = -9.88e-03, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 79, time 963.83 s: f = -2.067848102521, ‖∇f‖ = 2.0648e-01, α = 0.00e+00, m = 20, nfg = 4 -┌ Warning: Linesearch not converged after 2 iterations and 4 function evaluations: -│ α = 0.00e+00, dϕ = -9.88e-03, ϕ - ϕ₀ = 0.00e+00 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -┌ Warning: LBFGS: not converged to requested tol after 80 iterations and time 1002.56 s: f = -2.067848102521, ‖∇f‖ = 2.0648e-01 -└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/lbfgs.jl:197 -E = -2.0678481025209448 - -```` - -Finally, let's compare the obtained energy against a reference energy from a QMC study by -[Qin et al.](@cite qin_benchmark_2016). With the parameters specified above, they obtain an -energy of $E_\text{ref} \approx 4 \times -0.5244140625 = -2.09765625$ (the factor 4 comes -from the $2 \times 2$ unit cell that we use here). Thus, we find: - -````julia -E_ref = -2.09765625 -@show (E - E_ref) / E_ref; -```` - -```` -(E - E_ref) / E_ref = -0.01421021555798537 - -```` - ---- - -*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* - diff --git a/docs/src/examples/5.fermi_hubbard/main.ipynb b/docs/src/examples/5.fermi_hubbard/main.ipynb deleted file mode 100644 index 3feef894b..000000000 --- a/docs/src/examples/5.fermi_hubbard/main.ipynb +++ /dev/null @@ -1,221 +0,0 @@ -{ - "cells": [ - { - "outputs": [], - "cell_type": "code", - "source": [ - "using Markdown #hide" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "# Fermi-Hubbard model with $f\\mathbb{Z}_2 \\boxtimes U(1)$ symmetry, at large $U$ and half-filling\n", - "\n", - "In this example, we will demonstrate how to handle fermionic PEPS tensors and how to\n", - "optimize them. To that end, we consider the two-dimensional Hubbard model\n", - "\n", - "$$\n", - "H = -t \\sum_{\\langle i,j \\rangle} \\sum_{\\sigma} \\left( c_{i,\\sigma}^+ c_{j,\\sigma}^- +\n", - "c_{i,\\sigma}^- c_{j,\\sigma}^+ \\right) + U \\sum_i n_{i,\\uparrow}n_{i,\\downarrow} - \\mu \\sum_i n_i\n", - "$$\n", - "\n", - "where $\\sigma \\in \\{\\uparrow,\\downarrow\\}$ and $n_{i,\\sigma} = c_{i,\\sigma}^+ c_{i,\\sigma}^-$\n", - "is the fermionic number operator. As in previous examples, using fermionic degrees of freedom\n", - "is a matter of creating tensors with the right symmetry sectors - the rest of the simulation\n", - "workflow remains the same.\n", - "\n", - "First though, we make the example deterministic by seeding the RNG, and we make our imports:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "using Random\n", - "using TensorKit, PEPSKit\n", - "using MPSKit: add_physical_charge\n", - "Random.seed!(2928528937);" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "## Defining the fermionic Hamiltonian\n", - "\n", - "Let us start by fixing the parameters of the Hubbard model. We're going to use a hopping of\n", - "$t=1$ and a large $U=8$ on a $2 \\times 2$ unit cell:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "t = 1.0\n", - "U = 8.0\n", - "lattice = InfiniteSquare(2, 2);" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "In order to create fermionic tensors, one needs to define symmetry sectors using TensorKit's\n", - "`FermionParity`. Not only do we want use fermion parity but we also want our\n", - "particles to exploit the global $U(1)$ symmetry. The combined product sector can be obtained\n", - "using the [Deligne product](https://jutho.github.io/TensorKit.jl/stable/lib/sectors/#TensorKitSectors.deligneproduct-Tuple{Sector,%20Sector}),\n", - "called through `⊠` which is obtained by typing `\\boxtimes+TAB`. We will not impose any extra\n", - "spin symmetry, so we have:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "fermion = fℤ₂\n", - "particle_symmetry = U1Irrep\n", - "spin_symmetry = Trivial\n", - "S = fermion ⊠ particle_symmetry" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "The next step is defining graded virtual PEPS and environment spaces using `S`. Here we also\n", - "use the symmetry sector to impose half-filling. That is all we need to define the Hubbard\n", - "Hamiltonian:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "D, χ = 1, 1\n", - "V_peps = Vect[S]((0, 0) => 2 * D, (1, 1) => D, (1, -1) => D)\n", - "V_env = Vect[S](\n", - " (0, 0) => 4 * χ, (1, -1) => 2 * χ, (1, 1) => 2 * χ, (0, 2) => χ, (0, -2) => χ\n", - ")\n", - "S_aux = S((1, -1))\n", - "H₀ = hubbard_model(ComplexF64, particle_symmetry, spin_symmetry, lattice; t, U)\n", - "H = add_physical_charge(H₀, fill(S_aux, size(H₀.lattice)...));" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "## Finding the ground state\n", - "\n", - "Again, the procedure of ground state optimization is very similar to before. First, we\n", - "define all algorithmic parameters:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace))\n", - "gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge)\n", - "optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=80, ls_maxiter=3, ls_maxfg=3)" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Second, we initialize a PEPS state and environment (which we converge) constructed from\n", - "symmetric physical and virtual spaces:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "physical_spaces = H.lattice\n", - "virtual_spaces = fill(V_peps, size(lattice)...)\n", - "peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces)\n", - "env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...);" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "And third, we start the ground state search (this does take quite long):" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "peps, env, E, info = fixedpoint(\n", - " H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3\n", - ")\n", - "@show E;" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Finally, let's compare the obtained energy against a reference energy from a QMC study by\n", - "[Qin et al.](@cite qin_benchmark_2016). With the parameters specified above, they obtain an\n", - "energy of $E_\\text{ref} \\approx 4 \\times -0.5244140625 = -2.09765625$ (the factor 4 comes\n", - "from the $2 \\times 2$ unit cell that we use here). Thus, we find:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "E_ref = -2.09765625\n", - "@show (E - E_ref) / E_ref;" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "---\n", - "\n", - "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" - ], - "metadata": {} - } - ], - "nbformat_minor": 3, - "metadata": { - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.11.4" - }, - "kernelspec": { - "name": "julia-1.11", - "display_name": "Julia 1.11.4", - "language": "julia" - } - }, - "nbformat": 4 -} diff --git a/docs/src/examples/6.hubbard_su/index.md b/docs/src/examples/6.hubbard_su/index.md deleted file mode 100644 index 07df66cfc..000000000 --- a/docs/src/examples/6.hubbard_su/index.md +++ /dev/null @@ -1,215 +0,0 @@ -```@meta -EditURL = "../../../../examples/6.hubbard_su/main.jl" -``` - -[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//6.hubbard_su/main.ipynb) -[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//6.hubbard_su/main.ipynb) -[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//6.hubbard_su) - - -# Hubbard model imaginary time evolution using simple update - -Once again, we consider the Hubbard model but this time we obtain the ground-state PEPS by -imaginary time evoluation. In particular, we'll use the [`SimpleUpdate`](@ref) algorithm. -As a reminder, we define the Hubbard model as - -```math -H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- + -c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i -``` - -with $\sigma \in \{\uparrow,\downarrow\}$ and $n_{i,\sigma} = c_{i,\sigma}^+ c_{i,\sigma}^-$. - -Let's get started by seeding the RNG and importing the required modules: - -````julia -using Random -using TensorKit, PEPSKit -Random.seed!(12329348592498); -```` - -## Defining the Hamiltonian - -First, we define the Hubbard model at $t=1$ hopping and $U=6$ using `Trivial` sectors for -the particle and spin symmetries, and set $\mu = U/2$ for half-filling. The model will be -constructed on a $2 \times 2$ unit cell, so we have: - -````julia -t = 1 -U = 6 -Nr, Nc = 2, 2 -H = hubbard_model(Float64, Trivial, Trivial, InfiniteSquare(Nr, Nc); t, U, mu=U / 2); -```` - -## Running the simple update algorithm - -Next, we'll specify the virtual PEPS bond dimension and define the fermionic physical and -virtual spaces. The simple update algorithm evolves an infinite PEPS with weights on the -virtual bonds, so we here need to intialize an [`InfiniteWeightPEPS`](@ref). By default, -the bond weights will be identity. Unlike in the other examples, we here use tensors with -real `Float64` entries: - -````julia -Dbond = 8 -physical_space = Vect[fℤ₂](0 => 2, 1 => 2) -virtual_space = Vect[fℤ₂](0 => Dbond / 2, 1 => Dbond / 2) -wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, virtual_space; unitcell=(Nr, Nc)); -```` - -Before starting the simple update routine, we normalize the vertex tensors of `wpeps` by -dividing with the maximal vertex element (using the infinity norm): - -````julia -for ind in CartesianIndices(wpeps.vertices) - wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf) -end -```` - -Let's set algorithm parameters: The plan is to successively decrease the time interval of -the Trotter-Suzuki as well as the convergence tolerance such that we obtain a more accurate -result at each iteration. To run the simple update, we call [`simpleupdate`](@ref) where we -use the keyword `bipartite=false` - meaning that we use the full $2 \times 2$ unit cell -without assuming a bipartite structure. Thus, we can start evolving: - -````julia -dts = [1e-2, 1e-3, 4e-4, 1e-4] -tols = [1e-6, 1e-8, 1e-8, 1e-8] -maxiter = 20000 - -for (n, (dt, tol)) in enumerate(zip(dts, tols)) - trscheme = truncerr(1e-10) & truncdim(Dbond) - alg = SimpleUpdate(dt, tol, maxiter, trscheme) - global wpeps, = simpleupdate(wpeps, H, alg; bipartite=false) -end -```` - -```` -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1 : dt = 1e-02, weight diff = 2.355e+00, time = 0.035 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 500 : dt = 1e-02, weight diff = 3.984e-04, time = 0.015 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1000 : dt = 1e-02, weight diff = 2.866e-06, time = 0.026 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU conv 1061 : dt = 1e-02, weight diff = 9.956e-07, time = 18.859 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1 : dt = 1e-03, weight diff = 6.070e-03, time = 0.026 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 500 : dt = 1e-03, weight diff = 1.874e-06, time = 0.026 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1000 : dt = 1e-03, weight diff = 6.437e-07, time = 0.025 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1500 : dt = 1e-03, weight diff = 2.591e-07, time = 0.025 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 2000 : dt = 1e-03, weight diff = 1.053e-07, time = 0.024 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 2500 : dt = 1e-03, weight diff = 4.280e-08, time = 0.014 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 3000 : dt = 1e-03, weight diff = 1.741e-08, time = 0.014 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU conv 3309 : dt = 1e-03, weight diff = 9.983e-09, time = 56.826 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1 : dt = 4e-04, weight diff = 4.030e-04, time = 0.013 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 500 : dt = 4e-04, weight diff = 1.776e-07, time = 0.025 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1000 : dt = 4e-04, weight diff = 7.091e-08, time = 0.014 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1500 : dt = 4e-04, weight diff = 3.997e-08, time = 0.014 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 2000 : dt = 4e-04, weight diff = 2.622e-08, time = 0.014 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 2500 : dt = 4e-04, weight diff = 1.796e-08, time = 0.014 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 3000 : dt = 4e-04, weight diff = 1.245e-08, time = 0.014 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU conv 3303 : dt = 4e-04, weight diff = 9.997e-09, time = 55.910 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1 : dt = 1e-04, weight diff = 2.014e-04, time = 0.014 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 500 : dt = 1e-04, weight diff = 5.664e-08, time = 0.014 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1000 : dt = 1e-04, weight diff = 4.106e-08, time = 0.014 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1500 : dt = 1e-04, weight diff = 3.033e-08, time = 0.025 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 2000 : dt = 1e-04, weight diff = 2.290e-08, time = 0.025 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 2500 : dt = 1e-04, weight diff = 1.773e-08, time = 0.013 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 3000 : dt = 1e-04, weight diff = 1.410e-08, time = 0.014 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 3500 : dt = 1e-04, weight diff = 1.152e-08, time = 0.014 sec -[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU conv 3893 : dt = 1e-04, weight diff = 9.997e-09, time = 66.184 sec - -```` - -To obtain the evolved `InfiniteWeightPEPS` as an actual PEPS without weights on the bonds, -we can just call the following constructor: - -````julia -peps = InfinitePEPS(wpeps); -```` - -## Computing the ground-state energy - -In order to compute the energy expectation value with evolved PEPS, we need to converge a -CTMRG environment on it. We first converge an environment with a small enviroment dimension -and then use that to initialize another run with bigger environment dimension. We'll use -`trscheme=truncdim(χ)` for that such that the dimension is increased during the second CTMRG -run: - -````julia -χenv₀, χenv = 6, 16 -env_space = Vect[fℤ₂](0 => χenv₀ / 2, 1 => χenv₀ / 2) - -env = CTMRGEnv(rand, Float64, peps, env_space) -for χ in [χenv₀, χenv] - global env, = leading_boundary( - env, peps; alg=:sequential, tol=1e-5, trscheme=truncdim(χ) - ) -end -```` - -```` -[ Info: CTMRG init: obj = -6.089565139446e-05 err = 1.0000e+00 -┌ Warning: CTMRG cancel 100: obj = +2.298063654998e-16 err = 1.5276303328e-02 time = 25.32 sec -└ @ PEPSKit ~/.julia/packages/PEPSKit/P7ER3/src/algorithms/ctmrg/ctmrg.jl:129 -[ Info: CTMRG init: obj = +2.298063654998e-16 err = 1.0000e+00 -[ Info: CTMRG conv 11: obj = +1.597194080782e-13 err = 8.9907750067e-06 time = 25.07 sec - -```` - -We measure the energy by computing the `H` expectation value, where we have to make sure to -normalize with respect to the unit cell to obtain the energy per site: - -````julia -E = expectation_value(peps, H, env) / (Nr * Nc) -@show E; -```` - -```` -E = -3.6333025702476567 - -```` - -Finally, we can compare the obtained ground-state energy against the literature, namely the -QMC estimates from [Qin et al.](@cite qin_benchmark_2016). We find that the results generally -agree: - -````julia -Es_exact = Dict(0 => -1.62, 2 => -0.176, 4 => 0.8603, 6 => -0.6567, 8 => -0.5243) -E_exact = Es_exact[U] - U / 2 -@show (E - E_exact) / E_exact; -```` - -```` -(E - E_exact) / E_exact = -0.006398509517418207 - -```` - ---- - -*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* - diff --git a/docs/src/examples/6.hubbard_su/main.ipynb b/docs/src/examples/6.hubbard_su/main.ipynb deleted file mode 100644 index a2d3fcaa0..000000000 --- a/docs/src/examples/6.hubbard_su/main.ipynb +++ /dev/null @@ -1,248 +0,0 @@ -{ - "cells": [ - { - "outputs": [], - "cell_type": "code", - "source": [ - "using Markdown #hide" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "# Hubbard model imaginary time evolution using simple update\n", - "\n", - "Once again, we consider the Hubbard model but this time we obtain the ground-state PEPS by\n", - "imaginary time evoluation. In particular, we'll use the `SimpleUpdate` algorithm.\n", - "As a reminder, we define the Hubbard model as\n", - "\n", - "$$\n", - "H = -t \\sum_{\\langle i,j \\rangle} \\sum_{\\sigma} \\left( c_{i,\\sigma}^+ c_{j,\\sigma}^- +\n", - "c_{i,\\sigma}^- c_{j,\\sigma}^+ \\right) + U \\sum_i n_{i,\\uparrow}n_{i,\\downarrow} - \\mu \\sum_i n_i\n", - "$$\n", - "\n", - "with $\\sigma \\in \\{\\uparrow,\\downarrow\\}$ and $n_{i,\\sigma} = c_{i,\\sigma}^+ c_{i,\\sigma}^-$.\n", - "\n", - "Let's get started by seeding the RNG and importing the required modules:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "using Random\n", - "using TensorKit, PEPSKit\n", - "Random.seed!(12329348592498);" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "## Defining the Hamiltonian\n", - "\n", - "First, we define the Hubbard model at $t=1$ hopping and $U=6$ using `Trivial` sectors for\n", - "the particle and spin symmetries, and set $\\mu = U/2$ for half-filling. The model will be\n", - "constructed on a $2 \\times 2$ unit cell, so we have:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "t = 1\n", - "U = 6\n", - "Nr, Nc = 2, 2\n", - "H = hubbard_model(Float64, Trivial, Trivial, InfiniteSquare(Nr, Nc); t, U, mu=U / 2);" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "## Running the simple update algorithm\n", - "\n", - "Next, we'll specify the virtual PEPS bond dimension and define the fermionic physical and\n", - "virtual spaces. The simple update algorithm evolves an infinite PEPS with weights on the\n", - "virtual bonds, so we here need to intialize an `InfiniteWeightPEPS`. By default,\n", - "the bond weights will be identity. Unlike in the other examples, we here use tensors with\n", - "real `Float64` entries:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "Dbond = 8\n", - "physical_space = Vect[fℤ₂](0 => 2, 1 => 2)\n", - "virtual_space = Vect[fℤ₂](0 => Dbond / 2, 1 => Dbond / 2)\n", - "wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, virtual_space; unitcell=(Nr, Nc));" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Before starting the simple update routine, we normalize the vertex tensors of `wpeps` by\n", - "dividing with the maximal vertex element (using the infinity norm):" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "for ind in CartesianIndices(wpeps.vertices)\n", - " wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf)\n", - "end" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Let's set algorithm parameters: The plan is to successively decrease the time interval of\n", - "the Trotter-Suzuki as well as the convergence tolerance such that we obtain a more accurate\n", - "result at each iteration. To run the simple update, we call `simpleupdate` where we\n", - "use the keyword `bipartite=false` - meaning that we use the full $2 \\times 2$ unit cell\n", - "without assuming a bipartite structure. Thus, we can start evolving:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "dts = [1e-2, 1e-3, 4e-4, 1e-4]\n", - "tols = [1e-6, 1e-8, 1e-8, 1e-8]\n", - "maxiter = 20000\n", - "\n", - "for (n, (dt, tol)) in enumerate(zip(dts, tols))\n", - " trscheme = truncerr(1e-10) & truncdim(Dbond)\n", - " alg = SimpleUpdate(dt, tol, maxiter, trscheme)\n", - " global wpeps, = simpleupdate(wpeps, H, alg; bipartite=false)\n", - "end" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "To obtain the evolved `InfiniteWeightPEPS` as an actual PEPS without weights on the bonds,\n", - "we can just call the following constructor:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "peps = InfinitePEPS(wpeps);" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "## Computing the ground-state energy\n", - "\n", - "In order to compute the energy expectation value with evolved PEPS, we need to converge a\n", - "CTMRG environment on it. We first converge an environment with a small enviroment dimension\n", - "and then use that to initialize another run with bigger environment dimension. We'll use\n", - "`trscheme=truncdim(χ)` for that such that the dimension is increased during the second CTMRG\n", - "run:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "χenv₀, χenv = 6, 16\n", - "env_space = Vect[fℤ₂](0 => χenv₀ / 2, 1 => χenv₀ / 2)\n", - "\n", - "env = CTMRGEnv(rand, Float64, peps, env_space)\n", - "for χ in [χenv₀, χenv]\n", - " global env, = leading_boundary(\n", - " env, peps; alg=:sequential, tol=1e-5, trscheme=truncdim(χ)\n", - " )\n", - "end" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "We measure the energy by computing the `H` expectation value, where we have to make sure to\n", - "normalize with respect to the unit cell to obtain the energy per site:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "E = expectation_value(peps, H, env) / (Nr * Nc)\n", - "@show E;" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Finally, we can compare the obtained ground-state energy against the literature, namely the\n", - "QMC estimates from [Qin et al.](@cite qin_benchmark_2016). We find that the results generally\n", - "agree:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "Es_exact = Dict(0 => -1.62, 2 => -0.176, 4 => 0.8603, 6 => -0.6567, 8 => -0.5243)\n", - "E_exact = Es_exact[U] - U / 2\n", - "@show (E - E_exact) / E_exact;" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "---\n", - "\n", - "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" - ], - "metadata": {} - } - ], - "nbformat_minor": 3, - "metadata": { - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.11.4" - }, - "kernelspec": { - "name": "julia-1.11", - "display_name": "Julia 1.11.4", - "language": "julia" - } - }, - "nbformat": 4 -} diff --git a/docs/src/examples/7.heisenberg_su/index.md b/docs/src/examples/7.heisenberg_su/index.md deleted file mode 100644 index 25a4c1d77..000000000 --- a/docs/src/examples/7.heisenberg_su/index.md +++ /dev/null @@ -1,212 +0,0 @@ -```@meta -EditURL = "../../../../examples/7.heisenberg_su/main.jl" -``` - -[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//7.heisenberg_su/main.ipynb) -[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//7.heisenberg_su/main.ipynb) -[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//7.heisenberg_su) - - -# Simple update for the Heisenberg model - -In this next example, we will use [`SimpleUpdate`](@ref) imaginary time evolution to treat -the two-dimensional Heisenberg model once again: - -```math -H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j. -``` - -In the previous examples, we used a sublattice rotation to simulate antiferromagnetic -Hamiltonian on a single-site unit cell. Here, we will instead use a $2 \times 2$ unit cell -and set $J_x=J_y=J_z=1$. - -Let's get started by seeding the RNG and importing all required modules: - -````julia -using Random -import Statistics: mean -using TensorKit, PEPSKit -import MPSKitModels: S_x, S_y, S_z, S_exchange -Random.seed!(0); -```` - -## Defining the Hamiltonian - -To construct the Heisenberg Hamiltonian as just discussed, we'll use `heisenberg_XYZ` and, -in addition, make it real (`real` and `imag` works for `LocalOperator`s) since we want to -use PEPS and environments with real entries. We can either initialize the Hamiltonian with -no internal symmetries (`symm = Trivial`) or use the global $U(1)$ symmetry -(`symm = U1Irrep`): - -````julia -symm = Trivial ## ∈ {Trivial, U1Irrep} -Nr, Nc = 2, 2 -H = real(heisenberg_XYZ(ComplexF64, symm, InfiniteSquare(Nr, Nc); Jx=1, Jy=1, Jz=1)); -```` - -## Simple updating - -We proceed by initializing a random weighted PEPS that will be evolved. Again, we'll -normalize its vertex tensors. First though, we need to take of defining the appropriate -(symmetric) spaces: - -````julia -Dbond = 4 -χenv = 16 -if symm == Trivial - physical_space = ℂ^2 - bond_space = ℂ^Dbond - env_space = ℂ^χenv -elseif symm == U1Irrep - physical_space = ℂ[U1Irrep](1//2 => 1, -1//2 => 1) - bond_space = ℂ[U1Irrep](0 => Dbond ÷ 2, 1//2 => Dbond ÷ 4, -1//2 => Dbond ÷ 4) - env_space = ℂ[U1Irrep](0 => χenv ÷ 2, 1//2 => χenv ÷ 4, -1//2 => χenv ÷ 4) -else - error("not implemented") -end - -wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, bond_space; unitcell=(Nr, Nc)) -for ind in CartesianIndices(wpeps.vertices) - wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf) -end -```` - -Next, we can start the `SimpleUpdate` routine, successively decreasing the time intervals -and singular value convergence tolerances. Note that TensorKit allows to combine SVD -truncation schemes, which we use here to set a maximal bond dimension and at the same time -fix a truncation error (if that can be reached by remaining below `Dbond`): - -````julia -dts = [1e-2, 1e-3, 4e-4] -tols = [1e-6, 1e-8, 1e-8] -maxiter = 10000 -trscheme_peps = truncerr(1e-10) & truncdim(Dbond) - -for (dt, tol) in zip(dts, tols) - alg = SimpleUpdate(dt, tol, maxiter, trscheme_peps) - result = simpleupdate(wpeps, H, alg; bipartite=true) - global wpeps = result[1] -end -```` - -```` -[ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 1 : dt = 1e-02, weight diff = 1.683e+00, time = 8.361 sec -[ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 500 : dt = 1e-02, weight diff = 3.879e-06, time = 0.002 sec -[ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU conv 596 : dt = 1e-02, weight diff = 9.933e-07, time = 9.634 sec -[ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 1 : dt = 1e-03, weight diff = 2.135e-03, time = 0.002 sec -[ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 500 : dt = 1e-03, weight diff = 9.632e-07, time = 0.002 sec -[ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 1000 : dt = 1e-03, weight diff = 2.415e-07, time = 0.002 sec -[ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 1500 : dt = 1e-03, weight diff = 6.291e-08, time = 0.002 sec -[ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 2000 : dt = 1e-03, weight diff = 1.683e-08, time = 0.002 sec -[ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU conv 2205 : dt = 1e-03, weight diff = 9.978e-09, time = 4.524 sec -[ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 1 : dt = 4e-04, weight diff = 1.418e-04, time = 0.002 sec -[ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 500 : dt = 4e-04, weight diff = 6.377e-08, time = 0.002 sec -[ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 1000 : dt = 4e-04, weight diff = 3.544e-08, time = 0.002 sec -[ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 1500 : dt = 4e-04, weight diff = 2.013e-08, time = 0.002 sec -[ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 2000 : dt = 4e-04, weight diff = 1.157e-08, time = 0.002 sec -[ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU conv 2133 : dt = 4e-04, weight diff = 9.999e-09, time = 4.429 sec - -```` - -## Computing the ground-state energy and magnetizations - -In order to compute observable expectation values, we need to converge a CTMRG environment -on the evolved PEPS. Let's do so: - -````julia -peps = InfinitePEPS(wpeps) ## absorb the weights -env₀ = CTMRGEnv(rand, Float64, peps, env_space) -trscheme_env = truncerr(1e-10) & truncdim(χenv) -env, = leading_boundary( - env₀, - peps; - alg=:sequential, - projector_alg=:fullinfinite, - tol=1e-10, - trscheme=trscheme_env, -); -```` - -```` -[ Info: CTMRG init: obj = +8.705922473442e-05 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +9.514115680898e-01 err = 3.3105929548e-11 time = 9.35 sec - -```` - -Finally, we'll measure the energy and different magnetizations. For the magnetizations, -the plan is to compute the expectation values unit cell entry-wise in different spin -directions: - -````julia -function compute_mags(peps::InfinitePEPS, env::CTMRGEnv) - lattice = collect(space(t, 1) for t in peps.A) - - # detect symmetry on physical axis - symm = sectortype(space(peps.A[1, 1])) - if symm == Trivial - S_ops = real.([S_x(symm), im * S_y(symm), S_z(symm)]) - elseif symm == U1Irrep - S_ops = real.([S_z(symm)]) ## only Sz preserves - end - - return [ - collect( - expectation_value( - peps, LocalOperator(lattice, (CartesianIndex(r, c),) => S), env - ) for (r, c) in Iterators.product(1:size(peps, 1), 1:size(peps, 2)) - ) for S in S_ops - ] -end - -E = expectation_value(peps, H, env) / (Nr * Nc) -Ms = compute_mags(peps, env) -M_norms = collect(norm([m[r, c] for m in Ms]) for (r, c) in Iterators.product(1:Nr, 1:Nc)) -@show E Ms M_norms; -```` - -```` -E = -0.6674685583160916 -Ms = [[0.03199644951239792 -0.029802620495572755; -0.029802620502593708 0.03199644954611694], [2.289729198376439e-12 -1.051667672083661e-12; -2.117130756284402e-12 8.869747853359352e-13], [0.3755961090665969 -0.3757765476186198; -0.3757765476169762 0.37559610906659047]] -M_norms = [0.3769565093314697 0.37695650933306873; 0.3769565093319854 0.37695650933432534] - -```` - -To assess the results, we will benchmark against data from [Corboz](@cite corboz_variational_2016), -which use manual gradients to perform a variational optimization of the Heisenberg model. -In particular, for the energy and magnetization they find $E_\text{ref} = -0.6675$ and -$M_\text{ref} = 0.3767$. Looking at the relative errors, we find general agreement, although -the accuracy is limited by the methodological limitations of the simple update algorithm as -well as finite bond dimension effects and a lacking extrapolation: - -````julia -E_ref = -0.6675 -M_ref = 0.3767 -@show (E - E_ref) / E_ref -@show (mean(M_norms) - M_ref) / E_ref; -```` - -```` -(E - E_ref) / E_ref = -4.71036463046289e-5 -(mean(M_norms) - M_ref) / E_ref = -0.00038428364451283597 - -```` - ---- - -*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* - diff --git a/docs/src/examples/7.heisenberg_su/main.ipynb b/docs/src/examples/7.heisenberg_su/main.ipynb deleted file mode 100644 index 4fee8d9e7..000000000 --- a/docs/src/examples/7.heisenberg_su/main.ipynb +++ /dev/null @@ -1,253 +0,0 @@ -{ - "cells": [ - { - "outputs": [], - "cell_type": "code", - "source": [ - "using Markdown #hide" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "# Simple update for the Heisenberg model\n", - "\n", - "In this next example, we will use `SimpleUpdate` imaginary time evolution to treat\n", - "the two-dimensional Heisenberg model once again:\n", - "\n", - "$$\n", - "H = \\sum_{\\langle i,j \\rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j.\n", - "$$\n", - "\n", - "In the previous examples, we used a sublattice rotation to simulate antiferromagnetic\n", - "Hamiltonian on a single-site unit cell. Here, we will instead use a $2 \\times 2$ unit cell\n", - "and set $J_x=J_y=J_z=1$.\n", - "\n", - "Let's get started by seeding the RNG and importing all required modules:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "using Random\n", - "import Statistics: mean\n", - "using TensorKit, PEPSKit\n", - "import MPSKitModels: S_x, S_y, S_z, S_exchange\n", - "Random.seed!(0);" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "## Defining the Hamiltonian\n", - "\n", - "To construct the Heisenberg Hamiltonian as just discussed, we'll use `heisenberg_XYZ` and,\n", - "in addition, make it real (`real` and `imag` works for `LocalOperator`s) since we want to\n", - "use PEPS and environments with real entries. We can either initialize the Hamiltonian with\n", - "no internal symmetries (`symm = Trivial`) or use the global $U(1)$ symmetry\n", - "(`symm = U1Irrep`):" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "symm = Trivial ## ∈ {Trivial, U1Irrep}\n", - "Nr, Nc = 2, 2\n", - "H = real(heisenberg_XYZ(ComplexF64, symm, InfiniteSquare(Nr, Nc); Jx=1, Jy=1, Jz=1));" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "## Simple updating\n", - "\n", - "We proceed by initializing a random weighted PEPS that will be evolved. Again, we'll\n", - "normalize its vertex tensors. First though, we need to take of defining the appropriate\n", - "(symmetric) spaces:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "Dbond = 4\n", - "χenv = 16\n", - "if symm == Trivial\n", - " physical_space = ℂ^2\n", - " bond_space = ℂ^Dbond\n", - " env_space = ℂ^χenv\n", - "elseif symm == U1Irrep\n", - " physical_space = ℂ[U1Irrep](1//2 => 1, -1//2 => 1)\n", - " bond_space = ℂ[U1Irrep](0 => Dbond ÷ 2, 1//2 => Dbond ÷ 4, -1//2 => Dbond ÷ 4)\n", - " env_space = ℂ[U1Irrep](0 => χenv ÷ 2, 1//2 => χenv ÷ 4, -1//2 => χenv ÷ 4)\n", - "else\n", - " error(\"not implemented\")\n", - "end\n", - "\n", - "wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, bond_space; unitcell=(Nr, Nc))\n", - "for ind in CartesianIndices(wpeps.vertices)\n", - " wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf)\n", - "end" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Next, we can start the `SimpleUpdate` routine, successively decreasing the time intervals\n", - "and singular value convergence tolerances. Note that TensorKit allows to combine SVD\n", - "truncation schemes, which we use here to set a maximal bond dimension and at the same time\n", - "fix a truncation error (if that can be reached by remaining below `Dbond`):" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "dts = [1e-2, 1e-3, 4e-4]\n", - "tols = [1e-6, 1e-8, 1e-8]\n", - "maxiter = 10000\n", - "trscheme_peps = truncerr(1e-10) & truncdim(Dbond)\n", - "\n", - "for (dt, tol) in zip(dts, tols)\n", - " alg = SimpleUpdate(dt, tol, maxiter, trscheme_peps)\n", - " result = simpleupdate(wpeps, H, alg; bipartite=true)\n", - " global wpeps = result[1]\n", - "end" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "## Computing the ground-state energy and magnetizations\n", - "\n", - "In order to compute observable expectation values, we need to converge a CTMRG environment\n", - "on the evolved PEPS. Let's do so:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "peps = InfinitePEPS(wpeps) ## absorb the weights\n", - "env₀ = CTMRGEnv(rand, Float64, peps, env_space)\n", - "trscheme_env = truncerr(1e-10) & truncdim(χenv)\n", - "env, = leading_boundary(\n", - " env₀,\n", - " peps;\n", - " alg=:sequential,\n", - " projector_alg=:fullinfinite,\n", - " tol=1e-10,\n", - " trscheme=trscheme_env,\n", - ");" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Finally, we'll measure the energy and different magnetizations. For the magnetizations,\n", - "the plan is to compute the expectation values unit cell entry-wise in different spin\n", - "directions:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "function compute_mags(peps::InfinitePEPS, env::CTMRGEnv)\n", - " lattice = collect(space(t, 1) for t in peps.A)\n", - "\n", - " # detect symmetry on physical axis\n", - " symm = sectortype(space(peps.A[1, 1]))\n", - " if symm == Trivial\n", - " S_ops = real.([S_x(symm), im * S_y(symm), S_z(symm)])\n", - " elseif symm == U1Irrep\n", - " S_ops = real.([S_z(symm)]) ## only Sz preserves \n", - " end\n", - "\n", - " return [\n", - " collect(\n", - " expectation_value(\n", - " peps, LocalOperator(lattice, (CartesianIndex(r, c),) => S), env\n", - " ) for (r, c) in Iterators.product(1:size(peps, 1), 1:size(peps, 2))\n", - " ) for S in S_ops\n", - " ]\n", - "end\n", - "\n", - "E = expectation_value(peps, H, env) / (Nr * Nc)\n", - "Ms = compute_mags(peps, env)\n", - "M_norms = collect(norm([m[r, c] for m in Ms]) for (r, c) in Iterators.product(1:Nr, 1:Nc))\n", - "@show E Ms M_norms;" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "To assess the results, we will benchmark against data from Corboz,\n", - "which use manual gradients to perform a variational optimization of the Heisenberg model.\n", - "In particular, for the energy and magnetization they find $E_\\text{ref} = -0.6675$ and\n", - "$M_\\text{ref} = 0.3767$. Looking at the relative errors, we find general agreement, although\n", - "the accuracy is limited by the methodological limitations of the simple update algorithm as\n", - "well as finite bond dimension effects and a lacking extrapolation:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "E_ref = -0.6675\n", - "M_ref = 0.3767\n", - "@show (E - E_ref) / E_ref\n", - "@show (mean(M_norms) - M_ref) / E_ref;" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "---\n", - "\n", - "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" - ], - "metadata": {} - } - ], - "nbformat_minor": 3, - "metadata": { - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.11.4" - }, - "kernelspec": { - "name": "julia-1.11", - "display_name": "Julia 1.11.4", - "language": "julia" - } - }, - "nbformat": 4 -} diff --git a/docs/src/examples/bose_hubbard/index.md b/docs/src/examples/bose_hubbard/index.md new file mode 100644 index 000000000..96ab71647 --- /dev/null +++ b/docs/src/examples/bose_hubbard/index.md @@ -0,0 +1,330 @@ +```@meta +EditURL = "../../../../examples/bose_hubbard/main.jl" +``` + +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//bose_hubbard/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//bose_hubbard/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//bose_hubbard) + + +# Optimizing the $U(1)$-symmetric Bose-Hubbard model + +This example demonstrates the simulation of the two-dimensional Bose-Hubbard model. In +particular, the point will be to showcase the use of internal symmetries and finite +particle densities in PEPS ground state searches. As we will see, incorporating symmetries +into the simulation consists of initializing a symmetric Hamiltonian, PEPS state and CTM +environment - made possible through TensorKit. + +But first let's seed the RNG and import the required modules: + +````julia +using Random +using TensorKit, PEPSKit +using MPSKit: add_physical_charge +Random.seed!(2928528935); +```` + +## Defining the model + +We will construct the Bose-Hubbard model Hamiltonian through the +[`bose_hubbard_model`](https://quantumkithub.github.io/MPSKitModels.jl/dev/man/models/#MPSKitModels.bose_hubbard_model), +function from MPSKitModels as reexported by PEPSKit. We'll simulate the model in its +Mott-insulating phase where the ratio $U/t$ is large, since in this phase we expect the +ground state to be well approximated by a PEPS with a manifest global $U(1)$ symmetry. +Furthermore, we'll impose a cutoff at 2 bosons per site, set the chemical potential to zero +and use a simple $1 \times 1$ unit cell: + +````julia +t = 1.0 +U = 30.0 +cutoff = 2 +mu = 0.0 +lattice = InfiniteSquare(1, 1); +```` + +Next, we impose an explicit global $U(1)$ symmetry as well as a fixed particle number +density in our simulations. We can do this by setting the `symmetry` argument of the +Hamiltonian constructor to `U1Irrep` and passing one as the particle number density +keyword argument `n`: + +````julia +symmetry = U1Irrep +n = 1 +H = bose_hubbard_model(ComplexF64, symmetry, lattice; cutoff, t, U, n); +```` + +Before we continue, it might be interesting to inspect the corresponding lattice physical +spaces (which is here just a $1 \times 1$ matrix due to the single-site unit cell): + +````julia +physical_spaces = H.lattice +```` + +```` +1×1 Matrix{TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}}: + Rep[TensorKitSectors.U₁](0=>1, 1=>1, -1=>1) +```` + +Note that the physical space contains $U(1)$ charges -1, 0 and +1. Indeed, imposing a +particle number density of +1 corresponds to shifting the physical charges by -1 to +'re-center' the physical charges around the desired density. When we do this with a cutoff +of two bosons per site, i.e. starting from $U(1)$ charges 0, 1 and 2 on the physical level, +we indeed get the observed charges. + +## Characterizing the virtual spaces + +When running PEPS simulations with explicit internal symmetries, specifying the structure of +the virtual spaces of the PEPS and its environment becomes a bit more involved. For the +environment, one could in principle allow the virtual space to be chosen dynamically during +the boundary contraction using CTMRG by using a truncation scheme that allows for this +(e.g. using `alg=:truncdim` or `alg=:truncbelow` to truncate to a fixed total bond dimension +or singular value cutoff respectively). For the PEPS virtual space however, the structure +has to be specified before the optimization. + +While there are a host of techniques to do this in an informed way (e.g. starting from a +simple update result), here we just specify the virtual space manually. Since we're dealing +with a model at unit filling our physical space only contains integer $U(1)$ irreps. +Therefore, we'll build our PEPS and environment spaces using integer $U(1)$ irreps centered +around the zero charge: + +````julia +V_peps = U1Space(0 => 2, 1 => 1, -1 => 1) +V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2); +```` + +## Finding the ground state + +Having defined our Hamiltonian and spaces, it is just a matter of plugging this into the +optimization framework in the usual way to find the ground state. So, we first specify all +algorithms and their tolerances: + +````julia +boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace)) +gradient_alg = (; tol=1e-6, maxiter=10, alg=:eigsolver, iterscheme=:diffgauge) +optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=150, ls_maxiter=2, ls_maxfg=2); +```` + +!!! note + Taking CTMRG gradients and optimizing symmetric tensors tends to be more problematic + than with dense tensors. In particular, this means that one frequently needs to tweak + the `boundary_alg`, `gradient_alg` and `optimizer_alg` settings. There rarely is a + general-purpose set of settings which will always work, so instead one has to adjust + the simulation settings for each specific application. For example, it might help to + switch between the CTMRG flavors `alg=:simultaneous` and `alg=:sequential` to + improve convergence. The evaluation of the CTMRG gradient can be instable, so there it + is advised to try the different `iterscheme=:diffgauge` and `iterscheme=:fixed` schemes + as well as different `alg` keywords. Of course the tolerances of the algorithms and + their subalgorithms also have to be compatible. For more details on the available + options, see the [`fixedpoint`](@ref) docstring. + +Keep in mind that the PEPS is constructed from a unit cell of spaces, so we have to make a +matrix of `V_peps` spaces: + +````julia +virtual_spaces = fill(V_peps, size(lattice)...) +peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) +env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); +```` + +```` +[ Info: CTMRG init: obj = +1.693461429863e+00 +8.390974048721e-02im err = 1.0000e+00 +[ Info: CTMRG conv 19: obj = +1.181834754305e+01 -1.514255254857e-11im err = 3.6943032119e-09 time = 6.37 sec + +```` + +And at last, we optimize (which might take a bit): + +````julia +peps, env, E, info = fixedpoint( + H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3 +) +@show E; +```` + +```` +[ Info: LBFGS: initializing with f = 9.360531870693, ‖∇f‖ = 1.6957e+01 +┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Float64}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 +[ Info: LBFGS: iter 1, time 864.30 s: f = 0.112865330403, ‖∇f‖ = 5.9876e+00, α = 1.56e+02, m = 0, nfg = 7 +┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 +[ Info: LBFGS: iter 2, time 877.76 s: f = 0.031016651818, ‖∇f‖ = 4.7981e+00, α = 5.55e-01, m = 1, nfg = 2 +[ Info: LBFGS: iter 3, time 880.35 s: f = -0.073286659944, ‖∇f‖ = 1.4991e+00, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 4, time 882.72 s: f = -0.113074511097, ‖∇f‖ = 1.4104e+00, α = 1.00e+00, m = 3, nfg = 1 +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 4.53e-02, dϕ = -5.09e-01, ϕ - ϕ₀ = -2.42e-02 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 5, time 890.49 s: f = -0.137293934550, ‖∇f‖ = 1.3317e+00, α = 4.53e-02, m = 4, nfg = 3 +┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: +│ α = 4.19e-02, dϕ = -3.58e-01, ϕ - ϕ₀ = -1.56e-02 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 6, time 898.25 s: f = -0.152882613133, ‖∇f‖ = 1.2515e+00, α = 4.19e-02, m = 5, nfg = 3 +[ Info: LBFGS: iter 7, time 909.09 s: f = -0.167778524643, ‖∇f‖ = 3.0370e+00, α = 3.97e-01, m = 6, nfg = 4 +[ Info: LBFGS: iter 8, time 911.54 s: f = -0.200610144885, ‖∇f‖ = 8.4562e-01, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 9, time 913.95 s: f = -0.214869049363, ‖∇f‖ = 5.6088e-01, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 10, time 916.55 s: f = -0.222910672089, ‖∇f‖ = 9.8015e-01, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 11, time 918.70 s: f = -0.230707833300, ‖∇f‖ = 4.2302e-01, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 12, time 920.65 s: f = -0.238105633372, ‖∇f‖ = 2.5801e-01, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 13, time 922.56 s: f = -0.247331854867, ‖∇f‖ = 3.2459e-01, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 14, time 924.13 s: f = -0.253845651144, ‖∇f‖ = 2.4014e-01, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 15, time 925.05 s: f = -0.261289607017, ‖∇f‖ = 3.3777e-01, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 16, time 925.99 s: f = -0.267178486858, ‖∇f‖ = 2.0556e-01, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 17, time 927.21 s: f = -0.269417408686, ‖∇f‖ = 1.4442e-01, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 18, time 928.06 s: f = -0.270255942689, ‖∇f‖ = 7.8602e-02, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 19, time 928.87 s: f = -0.270672366603, ‖∇f‖ = 6.3259e-02, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 20, time 929.68 s: f = -0.271220543802, ‖∇f‖ = 8.8755e-02, α = 1.00e+00, m = 19, nfg = 1 +[ Info: LBFGS: iter 21, time 930.93 s: f = -0.271543527453, ‖∇f‖ = 4.5233e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 22, time 931.73 s: f = -0.271650756946, ‖∇f‖ = 3.4057e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 23, time 932.53 s: f = -0.271894826592, ‖∇f‖ = 3.1507e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 24, time 933.33 s: f = -0.272056350007, ‖∇f‖ = 3.7796e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 25, time 934.55 s: f = -0.272233548851, ‖∇f‖ = 2.8370e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 26, time 935.37 s: f = -0.272383908712, ‖∇f‖ = 2.2903e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 27, time 936.20 s: f = -0.272455167221, ‖∇f‖ = 4.0448e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 28, time 937.00 s: f = -0.272553540301, ‖∇f‖ = 2.1431e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 29, time 938.21 s: f = -0.272695812729, ‖∇f‖ = 2.3543e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 30, time 939.02 s: f = -0.272771651851, ‖∇f‖ = 2.0076e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 31, time 939.81 s: f = -0.272799750606, ‖∇f‖ = 4.7874e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 32, time 940.62 s: f = -0.272878619780, ‖∇f‖ = 1.7612e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 33, time 941.83 s: f = -0.272929741282, ‖∇f‖ = 1.5455e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 34, time 942.63 s: f = -0.273001510559, ‖∇f‖ = 2.3641e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 35, time 943.43 s: f = -0.273050577801, ‖∇f‖ = 1.6253e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 36, time 944.23 s: f = -0.273061460544, ‖∇f‖ = 2.5195e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 37, time 945.44 s: f = -0.273079875270, ‖∇f‖ = 7.2299e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 38, time 946.24 s: f = -0.273083995266, ‖∇f‖ = 6.2322e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 39, time 947.04 s: f = -0.273091490830, ‖∇f‖ = 7.8002e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 40, time 947.85 s: f = -0.273097801979, ‖∇f‖ = 9.2495e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 41, time 949.06 s: f = -0.273103085883, ‖∇f‖ = 5.9273e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 42, time 949.89 s: f = -0.273106428950, ‖∇f‖ = 5.6938e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 43, time 950.69 s: f = -0.273111266609, ‖∇f‖ = 9.0725e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 44, time 951.52 s: f = -0.273121071175, ‖∇f‖ = 1.2386e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 45, time 952.75 s: f = -0.273137645098, ‖∇f‖ = 1.2942e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 46, time 954.38 s: f = -0.273141136808, ‖∇f‖ = 1.4282e-02, α = 1.35e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 47, time 955.21 s: f = -0.273154777599, ‖∇f‖ = 7.0317e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 48, time 956.45 s: f = -0.273161148021, ‖∇f‖ = 3.4952e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 49, time 957.25 s: f = -0.273164175099, ‖∇f‖ = 4.7738e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 50, time 958.05 s: f = -0.273166242670, ‖∇f‖ = 5.4242e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 51, time 958.87 s: f = -0.273168481006, ‖∇f‖ = 3.6862e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 52, time 960.08 s: f = -0.273172228386, ‖∇f‖ = 4.8463e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 53, time 960.89 s: f = -0.273174650673, ‖∇f‖ = 6.4469e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 54, time 961.70 s: f = -0.273178852481, ‖∇f‖ = 7.4990e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 55, time 962.53 s: f = -0.273186651745, ‖∇f‖ = 8.2158e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 56, time 963.75 s: f = -0.273190544009, ‖∇f‖ = 8.6751e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 57, time 964.56 s: f = -0.273194527074, ‖∇f‖ = 2.7365e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 58, time 965.37 s: f = -0.273195816168, ‖∇f‖ = 2.9114e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 59, time 966.18 s: f = -0.273197625913, ‖∇f‖ = 3.0896e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 60, time 967.41 s: f = -0.273198605154, ‖∇f‖ = 1.0394e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 61, time 968.22 s: f = -0.273202461926, ‖∇f‖ = 3.0652e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 62, time 969.02 s: f = -0.273203714519, ‖∇f‖ = 2.0133e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 63, time 969.84 s: f = -0.273204828019, ‖∇f‖ = 2.5951e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 64, time 971.87 s: f = -0.273205465822, ‖∇f‖ = 4.1444e-03, α = 4.87e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 65, time 972.65 s: f = -0.273206458356, ‖∇f‖ = 2.9919e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 66, time 973.47 s: f = -0.273208249293, ‖∇f‖ = 1.6948e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 67, time 974.69 s: f = -0.273208839969, ‖∇f‖ = 3.0193e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 68, time 975.49 s: f = -0.273209433106, ‖∇f‖ = 1.8534e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 69, time 976.27 s: f = -0.273210019598, ‖∇f‖ = 1.7898e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 70, time 977.09 s: f = -0.273211075315, ‖∇f‖ = 2.7930e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 71, time 978.32 s: f = -0.273212703695, ‖∇f‖ = 3.6612e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 72, time 979.12 s: f = -0.273214163920, ‖∇f‖ = 6.1973e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 73, time 979.94 s: f = -0.273216147362, ‖∇f‖ = 2.7120e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 74, time 980.73 s: f = -0.273217199407, ‖∇f‖ = 2.2842e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 75, time 981.95 s: f = -0.273218358117, ‖∇f‖ = 3.0566e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 76, time 982.76 s: f = -0.273219638996, ‖∇f‖ = 3.8811e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 77, time 983.57 s: f = -0.273221240011, ‖∇f‖ = 4.4440e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 78, time 984.38 s: f = -0.273222619191, ‖∇f‖ = 2.8356e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 79, time 985.61 s: f = -0.273223777532, ‖∇f‖ = 2.2842e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 80, time 986.43 s: f = -0.273224631407, ‖∇f‖ = 2.6013e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 81, time 987.24 s: f = -0.273225621866, ‖∇f‖ = 2.7625e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 82, time 988.05 s: f = -0.273226222472, ‖∇f‖ = 2.5785e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 83, time 989.25 s: f = -0.273226603039, ‖∇f‖ = 1.2203e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 84, time 990.08 s: f = -0.273226890308, ‖∇f‖ = 1.1848e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 85, time 990.90 s: f = -0.273227256564, ‖∇f‖ = 1.8281e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 86, time 991.73 s: f = -0.273227922952, ‖∇f‖ = 2.0191e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 87, time 993.80 s: f = -0.273228177117, ‖∇f‖ = 2.7409e-03, α = 3.30e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 88, time 994.60 s: f = -0.273228564518, ‖∇f‖ = 1.5762e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 89, time 995.41 s: f = -0.273228984011, ‖∇f‖ = 1.3435e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 90, time 996.63 s: f = -0.273229366257, ‖∇f‖ = 1.9460e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 91, time 997.45 s: f = -0.273230207912, ‖∇f‖ = 2.9080e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 92, time 998.27 s: f = -0.273231202568, ‖∇f‖ = 3.4541e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 93, time 999.09 s: f = -0.273232085510, ‖∇f‖ = 1.8388e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 94, time 1000.31 s: f = -0.273232631167, ‖∇f‖ = 1.1594e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 95, time 1001.12 s: f = -0.273232992148, ‖∇f‖ = 1.7787e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 96, time 1001.92 s: f = -0.273233316686, ‖∇f‖ = 1.5449e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 97, time 1002.73 s: f = -0.273233676058, ‖∇f‖ = 1.8482e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 98, time 1003.93 s: f = -0.273233957076, ‖∇f‖ = 1.5452e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 99, time 1004.72 s: f = -0.273234130308, ‖∇f‖ = 1.2047e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 100, time 1005.53 s: f = -0.273234491906, ‖∇f‖ = 1.3723e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 101, time 1006.35 s: f = -0.273234862722, ‖∇f‖ = 2.2468e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 102, time 1007.57 s: f = -0.273235395986, ‖∇f‖ = 1.8201e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 103, time 1008.37 s: f = -0.273235884374, ‖∇f‖ = 1.7284e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 104, time 1009.18 s: f = -0.273236273215, ‖∇f‖ = 1.3732e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 105, time 1009.99 s: f = -0.273236575790, ‖∇f‖ = 1.4651e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 106, time 1011.19 s: f = -0.273236948216, ‖∇f‖ = 1.8153e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 107, time 1012.02 s: f = -0.273237435467, ‖∇f‖ = 2.6401e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 108, time 1012.84 s: f = -0.273237969174, ‖∇f‖ = 1.3197e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 109, time 1013.67 s: f = -0.273238333588, ‖∇f‖ = 1.0300e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 110, time 1014.92 s: f = -0.273238606412, ‖∇f‖ = 1.3512e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 111, time 1015.73 s: f = -0.273238763494, ‖∇f‖ = 2.0868e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 112, time 1016.54 s: f = -0.273238992097, ‖∇f‖ = 1.0034e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 113, time 1017.35 s: f = -0.273239242010, ‖∇f‖ = 1.0445e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 114, time 1018.57 s: f = -0.273239539038, ‖∇f‖ = 1.4904e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 115, time 1019.40 s: f = -0.273239986741, ‖∇f‖ = 1.4425e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 116, time 1021.07 s: f = -0.273240116483, ‖∇f‖ = 1.9754e-03, α = 2.24e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 117, time 1022.30 s: f = -0.273240380183, ‖∇f‖ = 9.8175e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 118, time 1023.10 s: f = -0.273240575426, ‖∇f‖ = 8.6345e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 119, time 1023.89 s: f = -0.273240832012, ‖∇f‖ = 1.4287e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 120, time 1025.08 s: f = -0.273241210750, ‖∇f‖ = 1.8219e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 121, time 1026.69 s: f = -0.273241482573, ‖∇f‖ = 2.4856e-03, α = 5.47e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 122, time 1027.52 s: f = -0.273241934058, ‖∇f‖ = 1.5033e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 123, time 1028.76 s: f = -0.273242166393, ‖∇f‖ = 1.2112e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 124, time 1029.60 s: f = -0.273242322900, ‖∇f‖ = 1.0134e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 125, time 1030.42 s: f = -0.273242508033, ‖∇f‖ = 1.0745e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 126, time 1031.25 s: f = -0.273242887106, ‖∇f‖ = 2.1256e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 127, time 1032.50 s: f = -0.273243341793, ‖∇f‖ = 1.6582e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 128, time 1033.36 s: f = -0.273243624575, ‖∇f‖ = 1.0434e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 129, time 1034.21 s: f = -0.273243926598, ‖∇f‖ = 1.0170e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 130, time 1035.04 s: f = -0.273244130570, ‖∇f‖ = 1.7663e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 131, time 1036.26 s: f = -0.273244384615, ‖∇f‖ = 1.4424e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 132, time 1037.09 s: f = -0.273244721419, ‖∇f‖ = 1.5925e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 133, time 1037.89 s: f = -0.273244883706, ‖∇f‖ = 1.0143e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 134, time 1038.72 s: f = -0.273244978610, ‖∇f‖ = 9.4449e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 135, time 1039.94 s: f = -0.273245503204, ‖∇f‖ = 1.2344e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 136, time 1040.77 s: f = -0.273245739413, ‖∇f‖ = 2.7009e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 137, time 1041.57 s: f = -0.273246059451, ‖∇f‖ = 1.4108e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 138, time 1042.39 s: f = -0.273246259501, ‖∇f‖ = 6.7238e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 139, time 1043.60 s: f = -0.273246408570, ‖∇f‖ = 9.2687e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 140, time 1044.40 s: f = -0.273246576606, ‖∇f‖ = 1.2150e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 141, time 1045.21 s: f = -0.273246729060, ‖∇f‖ = 1.3157e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 142, time 1046.03 s: f = -0.273246873413, ‖∇f‖ = 7.6123e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 143, time 1047.24 s: f = -0.273247027465, ‖∇f‖ = 7.9430e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 144, time 1048.05 s: f = -0.273247180548, ‖∇f‖ = 1.0894e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 145, time 1048.85 s: f = -0.273247387426, ‖∇f‖ = 2.2553e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 146, time 1049.65 s: f = -0.273247645050, ‖∇f‖ = 1.1468e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 147, time 1050.86 s: f = -0.273247846912, ‖∇f‖ = 9.1650e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 148, time 1051.65 s: f = -0.273248001067, ‖∇f‖ = 8.8945e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 149, time 1052.47 s: f = -0.273248315567, ‖∇f‖ = 1.2684e-03, α = 1.00e+00, m = 20, nfg = 1 +┌ Warning: LBFGS: not converged to requested tol after 150 iterations and time 1054.49 s: f = -0.273248467359, ‖∇f‖ = 1.1430e-03 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/lbfgs.jl:197 +E = -0.2732484673593871 + +```` + +We can compare our PEPS result to the energy obtained using a cylinder-MPS calculation +using a cylinder circumference of $L_y = 7$ and a bond dimension of 446, which yields +$E = -0.273284888$: + +````julia +E_ref = -0.273284888 +@show (E - E_ref) / E_ref; +```` + +```` +(E - E_ref) / E_ref = -0.00013326986676584008 + +```` + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/docs/src/examples/3.bose_hubbard/main.ipynb b/docs/src/examples/bose_hubbard/main.ipynb similarity index 100% rename from docs/src/examples/3.bose_hubbard/main.ipynb rename to docs/src/examples/bose_hubbard/main.ipynb diff --git a/docs/src/examples/2.boundary_mps/index.md b/docs/src/examples/boundary_mps/index.md similarity index 86% rename from docs/src/examples/2.boundary_mps/index.md rename to docs/src/examples/boundary_mps/index.md index 80a2d2b86..bcdbf46f3 100644 --- a/docs/src/examples/2.boundary_mps/index.md +++ b/docs/src/examples/boundary_mps/index.md @@ -1,10 +1,10 @@ ```@meta -EditURL = "../../../../examples/2.boundary_mps/main.jl" +EditURL = "../../../../examples/boundary_mps/main.jl" ``` -[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//2.boundary_mps/main.ipynb) -[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//2.boundary_mps/main.ipynb) -[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//2.boundary_mps) +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//boundary_mps/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//boundary_mps/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//boundary_mps) # Boundary MPS contractions using VUMPS and PEPOs @@ -37,7 +37,7 @@ peps₀ = InfinitePEPS(rand, ComplexF64, ComplexSpace(2), ComplexSpace(2)) ```` ```` -InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}(TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}[TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')): +InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}(TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}[TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')): [:, :, 1, 1, 1] = 0.8343040072662887 + 0.15425705836788395im 0.4612746978522435 + 0.7411151918989216im 0.6640771294125087 + 0.4428356798799721im 0.9163597170532635 + 0.24145695415210522im @@ -80,7 +80,7 @@ transfer = InfiniteTransferPEPS(peps₀, 1, 1) ```` ```` -single site InfiniteMPO{Tuple{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}}: +single site MPSKit.InfiniteMPO{Tuple{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}}: ╷ ⋮ ┼ O[1]: (TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')), TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)'))) ╵ ⋮ @@ -92,7 +92,7 @@ encodes the norm of the state. To that end, let us first we build an initial gue boundary MPS, choosing a bond dimension of 20: ````julia -mps₀ = initializeMPS(transfer, [ComplexSpace(20)]) +mps₀ = initialize_mps(transfer, [ComplexSpace(20)]) ```` ```` @@ -118,7 +118,7 @@ mps, env, ϵ = leading_boundary(mps₀, transfer, VUMPS(; tol=1e-6, verbosity=2) ```` [ Info: VUMPS init: obj = +5.052950412844e+00 +1.493192627823e-02im err = 8.4684e-01 -[ Info: VUMPS conv 4: obj = +1.744071150138e+01 +2.417441557995e-08im err = 1.9047772246e-07 time = 0.10 sec +[ Info: VUMPS conv 4: obj = +1.744071150138e+01 +2.417441557995e-08im err = 1.9047772246e-07 time = 4.31 sec ```` @@ -145,8 +145,8 @@ norm_ctmrg = abs(norm(peps₀, env_ctmrg)) ```` [ Info: CTMRG init: obj = -5.556349490423e-01 +1.605938670370e+00im err = 1.0000e+00 -[ Info: CTMRG conv 37: obj = +1.744071151099e+01 err = 3.2056303631e-07 time = 0.33 sec -abs(norm_vumps - norm_ctmrg) / norm_vumps = 5.510360046158767e-10 +[ Info: CTMRG conv 37: obj = +1.744071151099e+01 err = 3.2056303631e-07 time = 5.81 sec +abs(norm_vumps - norm_ctmrg) / norm_vumps = 5.510362083182129e-10 ```` @@ -163,14 +163,16 @@ First, we construct a PEPS with a $2 \times 2$ unit cell using the `unitcell` ke argument and then define the corresponding transfer PEPS: ````julia -peps₀_2x2 = InfinitePEPS(rand, ComplexF64, ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2)) +peps₀_2x2 = InfinitePEPS( + rand, ComplexF64, ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2) +) transfer_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1); ```` Now, the procedure is the same as before: We compute the norm once using VUMPS, once using CTMRG and then compare. ````julia -mps₀_2x2 = initializeMPS(transfer_2x2, fill(ComplexSpace(20), 2, 2)) +mps₀_2x2 = initialize_mps(transfer_2x2, fill(ComplexSpace(20), 2, 2)) mps_2x2, = leading_boundary(mps₀_2x2, transfer_2x2, VUMPS(; tol=1e-6, verbosity=2)) norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, transfer_2x2))) @@ -184,10 +186,10 @@ norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2)) ```` [ Info: VUMPS init: obj = +6.668046237341e+02 -1.267878277078e+01im err = 8.7901e-01 -[ Info: VUMPS conv 69: obj = +9.723958968917e+04 -3.481605377714e-03im err = 6.3841720875e-07 time = 3.90 sec +[ Info: VUMPS conv 69: obj = +9.723958968917e+04 -3.481605377714e-03im err = 6.3841720875e-07 time = 4.18 sec [ Info: CTMRG init: obj = +1.074898090007e+03 -2.096255594496e+02im err = 1.0000e+00 -[ Info: CTMRG conv 41: obj = +9.723959008610e+04 err = 6.0518230963e-07 time = 1.50 sec -abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps = 4.082014263000404e-9 +[ Info: CTMRG conv 41: obj = +9.723959008610e+04 err = 6.0518230963e-07 time = 1.73 sec +abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps = 4.08201516090106e-9 ```` @@ -229,7 +231,7 @@ transfer_pepo = InfiniteTransferPEPO(peps₀, pepo, 1, 1) ```` ```` -single site InfiniteMPO{Tuple{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorMap{ComplexF64, ComplexSpace, 2, 4, Vector{ComplexF64}}}}: +single site MPSKit.InfiniteMPO{Tuple{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 2, 4, Vector{ComplexF64}}}}: ╷ ⋮ ┼ O[1]: (TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')), TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')), TensorMap((ℂ^2 ⊗ (ℂ^2)') ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)'))) ╵ ⋮ @@ -239,7 +241,7 @@ single site InfiniteMPO{Tuple{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{C As before, we converge the boundary MPS using VUMPS and then compute the expectation value: ````julia -mps₀_pepo = initializeMPS(transfer_pepo, [ComplexSpace(20)]) +mps₀_pepo = initialize_mps(transfer_pepo, [ComplexSpace(20)]) mps_pepo, = leading_boundary(mps₀_pepo, transfer_pepo, VUMPS(; tol=1e-6, verbosity=2)) norm_pepo = abs(prod(expectation_value(mps_pepo, transfer_pepo))); @show norm_pepo; @@ -247,7 +249,7 @@ norm_pepo = abs(prod(expectation_value(mps_pepo, transfer_pepo))); ```` [ Info: VUMPS init: obj = +3.309203535702e+01 -4.227375981212e-01im err = 9.3280e-01 -[ Info: VUMPS conv 5: obj = +2.483696258643e+02 +2.387851822319e-07im err = 5.0174146749e-08 time = 0.47 sec +[ Info: VUMPS conv 5: obj = +2.483696258643e+02 +2.387851822319e-07im err = 5.0174146749e-08 time = 2.84 sec norm_pepo = 248.36962586428106 ```` diff --git a/docs/src/examples/2.boundary_mps/main.ipynb b/docs/src/examples/boundary_mps/main.ipynb similarity index 96% rename from docs/src/examples/2.boundary_mps/main.ipynb rename to docs/src/examples/boundary_mps/main.ipynb index 6e37b5b2b..4c0654149 100644 --- a/docs/src/examples/2.boundary_mps/main.ipynb +++ b/docs/src/examples/boundary_mps/main.ipynb @@ -98,7 +98,7 @@ "outputs": [], "cell_type": "code", "source": [ - "mps₀ = initializeMPS(transfer, [ComplexSpace(20)])" + "mps₀ = initialize_mps(transfer, [ComplexSpace(20)])" ], "metadata": {}, "execution_count": null @@ -183,7 +183,9 @@ "outputs": [], "cell_type": "code", "source": [ - "peps₀_2x2 = InfinitePEPS(rand, ComplexF64, ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2))\n", + "peps₀_2x2 = InfinitePEPS(\n", + " rand, ComplexF64, ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2)\n", + ")\n", "transfer_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1);" ], "metadata": {}, @@ -200,7 +202,7 @@ "outputs": [], "cell_type": "code", "source": [ - "mps₀_2x2 = initializeMPS(transfer_2x2, fill(ComplexSpace(20), 2, 2))\n", + "mps₀_2x2 = initialize_mps(transfer_2x2, fill(ComplexSpace(20), 2, 2))\n", "mps_2x2, = leading_boundary(mps₀_2x2, transfer_2x2, VUMPS(; tol=1e-6, verbosity=2))\n", "norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, transfer_2x2)))\n", "\n", @@ -282,7 +284,7 @@ "outputs": [], "cell_type": "code", "source": [ - "mps₀_pepo = initializeMPS(transfer_pepo, [ComplexSpace(20)])\n", + "mps₀_pepo = initialize_mps(transfer_pepo, [ComplexSpace(20)])\n", "mps_pepo, = leading_boundary(mps₀_pepo, transfer_pepo, VUMPS(; tol=1e-6, verbosity=2))\n", "norm_pepo = abs(prod(expectation_value(mps_pepo, transfer_pepo)));\n", "@show norm_pepo;" diff --git a/docs/src/examples/index.md b/docs/src/examples/index.md index ee3f138c0..6dee91b49 100644 --- a/docs/src/examples/index.md +++ b/docs/src/examples/index.md @@ -3,6 +3,16 @@ Here we provide a number of commented example pages that serve as short tutorials on how to use PEPSKit in various situations. Applications span from two-dimensional quantum models, including fermionic Hamiltonians, to classical three-dimensional statistical mechanics: ```@contents -Pages = map(file -> joinpath(file, "index.md"), readdir("./")) +Pages = [ + "heisenberg/index.md", + "bose_hubbard/index.md", + "xxz/index.md", + "fermi_hubbard/index.md", + "heisenberg_su/index.md", + "hubbard_su/index.md", + "2d_ising_partition_function/index.md", + "3d_ising_partition_function/index.md", + "boundary_mps/index.md", +] Depth = 1 ``` diff --git a/examples/8.ising_partition_function/main.jl b/examples/2d_ising_partition_function/main.jl similarity index 100% rename from examples/8.ising_partition_function/main.jl rename to examples/2d_ising_partition_function/main.jl diff --git a/examples/9.3d_ising/main.jl b/examples/3d_ising_partition_function/main.jl similarity index 100% rename from examples/9.3d_ising/main.jl rename to examples/3d_ising_partition_function/main.jl diff --git a/examples/Cache.toml b/examples/Cache.toml index 4bed7667a..cdf97651b 100644 --- a/examples/Cache.toml +++ b/examples/Cache.toml @@ -1,9 +1,5 @@ ["./"] -"4.xxz" = "9015d85ff87c5165142c64c7031275bab78e3d84620d2e13d0d69f054f7f9438" -"7.heisenberg_su" = "81b1ae29382d60e83dc2f2a19a04fbd95db79380e0128f0082fdea01ef1f8fe2" -"5.fermi_hubbard" = "47f460382333676f6f0997d68f104901fb108072640861930f44ff8b526b5f11" -"8.ising_partition_function" = "80d767919ddfdf2fe8bc531367a2b86d1dfa1d42a7c2ed5197f9cee3422dc035" -"1.heisenberg" = "aefc6c22bcacdb0b5b69ff1b64e57a0f1debe8778a2d683f4efcadcfccb28b7c" -"2.boundary_mps" = "497e7b378946319995bac90abba7f3f83b95cc93e0423af6d488049861796e10" -"3.bose_hubbard" = "a4eae524b73b5795d9b13af09d31b625adcff9814f3c25cc3b001d20f12bef95" -"6.hubbard_su" = "d3831deed0a8c68324ae312d5c2b79434a8e50d3dde932f42c77951272f74a9b" +bose_hubbard = "2d25bbc749632d5e194c8405e1309f37af8e7d5d680eed393fa2cf975f6d0619" +2d_ising_partition_function = "acafb9139119ccc89fb928b18c55ea9e827f676a737e34a84850666f8ca35702" +3d_ising_partition_function = "55e6501df7b73ea3ee8030e78b46ab24261e337354dfa2a74dbc77638b9bba9c" +boundary_mps = "fd8f0378c5261ae37b8d3862fb28a0b7f2697cbaf5c65f4e768bf95720683e8d" diff --git a/examples/3.bose_hubbard/main.jl b/examples/bose_hubbard/main.jl similarity index 100% rename from examples/3.bose_hubbard/main.jl rename to examples/bose_hubbard/main.jl diff --git a/examples/boundary_mps.jl b/examples/boundary_mps.jl deleted file mode 100644 index 68c1ccb0f..000000000 --- a/examples/boundary_mps.jl +++ /dev/null @@ -1,86 +0,0 @@ -using Random -using PEPSKit -using TensorKit -using MPSKit -using LinearAlgebra - -include("ising_pepo.jl") - -# This example demonstrates some boundary-MPS methods for working with 2D projected -# entangled-pair states and operators. - -## Computing a PEPS norm - -# We start by initializing a random initial infinite PEPS -Random.seed!(29384293742893) -peps = InfinitePEPS(ComplexSpace(2), ComplexSpace(2)) - -# To compute its norm, we start by constructing the transfer operator corresponding to -# the partition function representing the overlap -T = InfiniteTransferPEPS(peps, 1, 1) - -# We then find its leading boundary MPS fixed point, where the corresponding eigenvalue -# encodes the norm of the state - -# Fist we build an initial guess for the boundary MPS, choosing a bond dimension of 20 -mps = initialize_mps(T, [ComplexSpace(20)]) - -# We then find the leading boundary MPS fixed point using the VUMPS algorithm -mps, env, ϵ = leading_boundary(mps, T, VUMPS()) - -# The norm of the state per unit cell is then given by the expectation value -N = abs(prod(expectation_value(mps, T))) - -# This can be compared to the result obtained using the CTMRG algorithm -ctm, = leading_boundary( - peps, SimultaneousCTMRG(; verbosity=1), CTMRGEnv(peps, ComplexSpace(20)) -) -N´ = abs(norm(peps, ctm)) - -@show abs(N - N´) / N - -## Working with unit cells - -# For PEPS with non-trivial unit cells, the principle is exactly the same. -# The only difference is that now the transfer operator of the PEPS norm partition function -# has multiple lines, each of which can be represented by an `InfiniteTransferPEPS` object. -# Such a multi-line transfer operator is represented by a `MultilineTransferPEPS` object. -# In this case, the boundary MPS is an `MultilineMPS` object, which should be initialized -# by specifying a virtual space for each site in the partition function unit cell. - -peps2 = InfinitePEPS(ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2)) -T2 = PEPSKit.MultilineTransferPEPS(peps2, 1) - -mps2 = initialize_mps(T2, fill(ComplexSpace(20), 2, 2)) -mps2, env2, ϵ = leading_boundary(mps2, T2, VUMPS()) -N2 = abs(prod(expectation_value(mps2, T2))) - -ctm2, = leading_boundary( - peps2, SimultaneousCTMRG(; verbosity=1), CTMRGEnv(peps2, ComplexSpace(20)) -) -N2´ = abs(norm(peps2, ctm2)) - -@show abs(N2 - N2´) / N2 - -# Note that for larger unit cells and non-Hermitian PEPS the VUMPS algorithm may become -# unstable, in which case the CTMRG algorithm is recommended. - -## Contracting PEPO overlaps - -# Using exactly the same machinery, we can contract partition functions which encode the -# expectation value of a PEPO for a given PEPS state. -# As an example, we can consider the overlap of the PEPO correponding to the partition -# function of 3D classical ising model with our random PEPS from before and evaluate -# . - -pepo = ising_pepo(1) -T3 = InfiniteTransferPEPO(peps, pepo, 1, 1) - -mps3 = initialize_mps(T3, [ComplexSpace(20)]) -mps3, env3, ϵ = leading_boundary(mps3, T3, VUMPS()) -@show N3 = abs(prod(expectation_value(mps3, T3))) - -# These objects and routines can be used to optimize PEPS fixed points of 3D partition -# functions, see for example https://arxiv.org/abs/1805.10598 - -nothing diff --git a/examples/2.boundary_mps/main.jl b/examples/boundary_mps/main.jl similarity index 96% rename from examples/2.boundary_mps/main.jl rename to examples/boundary_mps/main.jl index 6416537b1..f45cdac94 100644 --- a/examples/2.boundary_mps/main.jl +++ b/examples/boundary_mps/main.jl @@ -41,7 +41,7 @@ encodes the norm of the state. To that end, let us first we build an initial gue boundary MPS, choosing a bond dimension of 20: """ -mps₀ = initializeMPS(transfer, [ComplexSpace(20)]) +mps₀ = initialize_mps(transfer, [ComplexSpace(20)]) md""" Note that this will just construct a MPS with random Gaussian entries based on the virtual @@ -95,7 +95,7 @@ md""" Now, the procedure is the same as before: We compute the norm once using VUMPS, once using CTMRG and then compare. """ -mps₀_2x2 = initializeMPS(transfer_2x2, fill(ComplexSpace(20), 2, 2)) +mps₀_2x2 = initialize_mps(transfer_2x2, fill(ComplexSpace(20), 2, 2)) mps_2x2, = leading_boundary(mps₀_2x2, transfer_2x2, VUMPS(; tol=1e-6, verbosity=2)) norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, transfer_2x2))) @@ -147,7 +147,7 @@ md""" As before, we converge the boundary MPS using VUMPS and then compute the expectation value: """ -mps₀_pepo = initializeMPS(transfer_pepo, [ComplexSpace(20)]) +mps₀_pepo = initialize_mps(transfer_pepo, [ComplexSpace(20)]) mps_pepo, = leading_boundary(mps₀_pepo, transfer_pepo, VUMPS(; tol=1e-6, verbosity=2)) norm_pepo = abs(prod(expectation_value(mps_pepo, transfer_pepo))); @show norm_pepo; diff --git a/examples/5.fermi_hubbard/main.jl b/examples/fermi_hubbard/main.jl similarity index 100% rename from examples/5.fermi_hubbard/main.jl rename to examples/fermi_hubbard/main.jl diff --git a/examples/1.heisenberg/main.jl b/examples/heisenberg/main.jl similarity index 100% rename from examples/1.heisenberg/main.jl rename to examples/heisenberg/main.jl diff --git a/examples/7.heisenberg_su/main.jl b/examples/heisenberg_su/main.jl similarity index 100% rename from examples/7.heisenberg_su/main.jl rename to examples/heisenberg_su/main.jl diff --git a/examples/6.hubbard_su/main.jl b/examples/hubbard_su/main.jl similarity index 100% rename from examples/6.hubbard_su/main.jl rename to examples/hubbard_su/main.jl diff --git a/examples/4.xxz/main.jl b/examples/xxz/main.jl similarity index 100% rename from examples/4.xxz/main.jl rename to examples/xxz/main.jl From 479b3936896d76306769cd5934d82f1bfa408bb0 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Tue, 29 Apr 2025 15:22:19 +0200 Subject: [PATCH 075/113] Update docs index key features as well --- docs/src/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/index.md b/docs/src/index.md index f80436fa5..04584e4f1 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -15,7 +15,7 @@ pkg> add PEPSKit ## Key features - Construction and manipulation of infinite projected entangled-pair states (PEPS) -- Contraction of infinite PEPS using the corner transfer matrix renormalization group (CTMRG) and variational uniform matrix product states (VUMPS) +- Contraction of infinite PEPS using the corner transfer matrix renormalization group (CTMRG) and boundary MPS methods - Native support for symmetric tensors through [TensorKit](https://github.com/Jutho/TensorKit.jl), including fermionic tensors - PEPS optimization using automatic differentiation (AD) provided through [Zygote](https://fluxml.ai/Zygote.jl/stable/) - Imaginary time evolution algorithms From 1758aa5feca31488cf7a1f02f9a5d351dd9694c4 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Tue, 29 Apr 2025 15:22:27 +0200 Subject: [PATCH 076/113] Add remaining rendered examples --- docs/src/examples/fermi_hubbard/index.md | 235 ++++++++++++ docs/src/examples/fermi_hubbard/main.ipynb | 221 +++++++++++ docs/src/examples/heisenberg/index.md | 412 +++++++++++++++++++++ docs/src/examples/heisenberg/main.ipynb | 392 ++++++++++++++++++++ docs/src/examples/heisenberg_su/index.md | 212 +++++++++++ docs/src/examples/heisenberg_su/main.ipynb | 253 +++++++++++++ docs/src/examples/hubbard_su/index.md | 215 +++++++++++ docs/src/examples/hubbard_su/main.ipynb | 248 +++++++++++++ docs/src/examples/xxz/index.md | 226 +++++++++++ docs/src/examples/xxz/main.ipynb | 199 ++++++++++ examples/Cache.toml | 5 + 11 files changed, 2618 insertions(+) create mode 100644 docs/src/examples/fermi_hubbard/index.md create mode 100644 docs/src/examples/fermi_hubbard/main.ipynb create mode 100644 docs/src/examples/heisenberg/index.md create mode 100644 docs/src/examples/heisenberg/main.ipynb create mode 100644 docs/src/examples/heisenberg_su/index.md create mode 100644 docs/src/examples/heisenberg_su/main.ipynb create mode 100644 docs/src/examples/hubbard_su/index.md create mode 100644 docs/src/examples/hubbard_su/main.ipynb create mode 100644 docs/src/examples/xxz/index.md create mode 100644 docs/src/examples/xxz/main.ipynb diff --git a/docs/src/examples/fermi_hubbard/index.md b/docs/src/examples/fermi_hubbard/index.md new file mode 100644 index 000000000..31ea8674a --- /dev/null +++ b/docs/src/examples/fermi_hubbard/index.md @@ -0,0 +1,235 @@ +```@meta +EditURL = "../../../../examples/fermi_hubbard/main.jl" +``` + +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//fermi_hubbard/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//fermi_hubbard/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//fermi_hubbard) + + +# Fermi-Hubbard model with $f\mathbb{Z}_2 \boxtimes U(1)$ symmetry, at large $U$ and half-filling + +In this example, we will demonstrate how to handle fermionic PEPS tensors and how to +optimize them. To that end, we consider the two-dimensional Hubbard model + +```math +H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- - +c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i +``` + +where $\sigma \in \{\uparrow,\downarrow\}$ and $n_{i,\sigma} = c_{i,\sigma}^+ c_{i,\sigma}^-$ +is the fermionic number operator. As in previous examples, using fermionic degrees of freedom +is a matter of creating tensors with the right symmetry sectors - the rest of the simulation +workflow remains the same. + +First though, we make the example deterministic by seeding the RNG, and we make our imports: + +````julia +using Random +using TensorKit, PEPSKit +using MPSKit: add_physical_charge +Random.seed!(2928528937); +```` + +## Defining the fermionic Hamiltonian + +Let us start by fixing the parameters of the Hubbard model. We're going to use a hopping of +$t=1$ and a large $U=8$ on a $2 \times 2$ unit cell: + +````julia +t = 1.0 +U = 8.0 +lattice = InfiniteSquare(2, 2); +```` + +In order to create fermionic tensors, one needs to define symmetry sectors using TensorKit's +`FermionParity`. Not only do we want use fermion parity but we also want our +particles to exploit the global $U(1)$ symmetry. The combined product sector can be obtained +using the [Deligne product](https://jutho.github.io/TensorKit.jl/stable/lib/sectors/#TensorKitSectors.deligneproduct-Tuple{Sector,%20Sector}), +called through `⊠` which is obtained by typing `\boxtimes+TAB`. We will not impose any extra +spin symmetry, so we have: + +````julia +fermion = fℤ₂ +particle_symmetry = U1Irrep +spin_symmetry = Trivial +S = fermion ⊠ particle_symmetry +```` + +```` +TensorKitSectors.ProductSector{Tuple{TensorKitSectors.FermionParity, TensorKitSectors.U1Irrep}} +```` + +The next step is defining graded virtual PEPS and environment spaces using `S`. Here we also +use the symmetry sector to impose half-filling. That is all we need to define the Hubbard +Hamiltonian: + +````julia +D, χ = 1, 1 +V_peps = Vect[S]((0, 0) => 2 * D, (1, 1) => D, (1, -1) => D) +V_env = Vect[S]( + (0, 0) => 4 * χ, (1, -1) => 2 * χ, (1, 1) => 2 * χ, (0, 2) => χ, (0, -2) => χ +) +S_aux = S((1, -1)) +H₀ = hubbard_model(ComplexF64, particle_symmetry, spin_symmetry, lattice; t, U) +H = add_physical_charge(H₀, fill(S_aux, size(H₀.lattice)...)); +```` + +## Finding the ground state + +Again, the procedure of ground state optimization is very similar to before. First, we +define all algorithmic parameters: + +````julia +boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace)) +gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge) +optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=80, ls_maxiter=3, ls_maxfg=3) +```` + +```` +(tol = 0.0001, alg = :lbfgs, maxiter = 80, ls_maxiter = 3, ls_maxfg = 3) +```` + +Second, we initialize a PEPS state and environment (which we converge) constructed from +symmetric physical and virtual spaces: + +````julia +physical_spaces = H.lattice +virtual_spaces = fill(V_peps, size(lattice)...) +peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) +env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); +```` + +```` +[ Info: CTMRG init: obj = +5.484842275412e+04 +4.469243203539e+04im err = 1.0000e+00 +[ Info: CTMRG conv 26: obj = +8.371681846538e+04 -3.791428753175e-07im err = 7.4963852327e-09 time = 8.54 sec + +```` + +And third, we start the ground state search (this does take quite long): + +````julia +peps, env, E, info = fixedpoint( + H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3 +) +@show E; +```` + +```` +[ Info: LBFGS: initializing with f = 6.680719803101, ‖∇f‖ = 9.5842e+00 +┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.ProductSector{Tuple{TensorKitSectors.FermionParity, TensorKitSectors.U1Irrep}}, TensorKit.SortedVectorDict{TensorKitSectors.ProductSector{Tuple{TensorKitSectors.FermionParity, TensorKitSectors.U1Irrep}}, Int64}}, 1, 4, Vector{ComplexF64}}}, Float64}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 +┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: +│ α = 2.50e+01, dϕ = -1.49e-01, ϕ - ϕ₀ = -2.88e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 1, time 955.42 s: f = 3.801394787694, ‖∇f‖ = 2.3457e+01, α = 2.50e+01, m = 0, nfg = 4 +┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.ProductSector{Tuple{TensorKitSectors.FermionParity, TensorKitSectors.U1Irrep}}, TensorKit.SortedVectorDict{TensorKitSectors.ProductSector{Tuple{TensorKitSectors.FermionParity, TensorKitSectors.U1Irrep}}, Int64}}, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.ProductSector{Tuple{TensorKitSectors.FermionParity, TensorKitSectors.U1Irrep}}, TensorKit.SortedVectorDict{TensorKitSectors.ProductSector{Tuple{TensorKitSectors.FermionParity, TensorKitSectors.U1Irrep}}, Int64}}, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 +┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: +│ α = 2.50e+01, dϕ = -5.73e-03, ϕ - ϕ₀ = -3.81e+00 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 2, time 1011.68 s: f = -0.009753189324, ‖∇f‖ = 3.2047e+00, α = 2.50e+01, m = 0, nfg = 4 +[ Info: LBFGS: iter 3, time 1020.91 s: f = -0.115219717423, ‖∇f‖ = 2.7847e+00, α = 1.00e+00, m = 1, nfg = 1 +[ Info: LBFGS: iter 4, time 1029.61 s: f = -0.616462986123, ‖∇f‖ = 2.3685e+00, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 5, time 1037.43 s: f = -0.817865359874, ‖∇f‖ = 1.9095e+00, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 6, time 1044.81 s: f = -0.990425015686, ‖∇f‖ = 2.3830e+00, α = 1.00e+00, m = 4, nfg = 1 +[ Info: LBFGS: iter 7, time 1051.68 s: f = -1.142986439459, ‖∇f‖ = 1.5684e+00, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 8, time 1058.34 s: f = -1.239591181120, ‖∇f‖ = 3.4861e+00, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 9, time 1064.29 s: f = -1.438708542563, ‖∇f‖ = 1.3377e+00, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 10, time 1070.87 s: f = -1.524142766825, ‖∇f‖ = 1.3499e+00, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 11, time 1083.72 s: f = -1.620143211649, ‖∇f‖ = 1.1928e+00, α = 1.75e-01, m = 9, nfg = 2 +[ Info: LBFGS: iter 12, time 1096.24 s: f = -1.682030774949, ‖∇f‖ = 9.4585e-01, α = 2.41e-01, m = 10, nfg = 2 +[ Info: LBFGS: iter 13, time 1102.22 s: f = -1.722173660258, ‖∇f‖ = 1.3961e+00, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 14, time 1108.73 s: f = -1.771649839243, ‖∇f‖ = 6.2967e-01, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 15, time 1114.74 s: f = -1.809425620292, ‖∇f‖ = 5.1874e-01, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 16, time 1121.44 s: f = -1.860257660187, ‖∇f‖ = 7.0707e-01, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 17, time 1127.36 s: f = -1.894073433816, ‖∇f‖ = 6.7099e-01, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 18, time 1133.92 s: f = -1.923565778264, ‖∇f‖ = 5.6311e-01, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 19, time 1139.83 s: f = -1.948747056517, ‖∇f‖ = 4.7890e-01, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 20, time 1146.40 s: f = -1.969585552903, ‖∇f‖ = 4.1660e-01, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 21, time 1152.44 s: f = -1.982637358938, ‖∇f‖ = 4.3422e-01, α = 1.00e+00, m = 19, nfg = 1 +[ Info: LBFGS: iter 22, time 1159.01 s: f = -1.993882710416, ‖∇f‖ = 3.1362e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 23, time 1165.05 s: f = -2.002938619798, ‖∇f‖ = 3.0798e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 24, time 1171.70 s: f = -2.014146064233, ‖∇f‖ = 3.3262e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 25, time 1177.90 s: f = -2.022239330954, ‖∇f‖ = 4.2937e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 26, time 1184.55 s: f = -2.030245493641, ‖∇f‖ = 2.0179e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 27, time 1190.57 s: f = -2.035169726141, ‖∇f‖ = 1.6346e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 28, time 1198.05 s: f = -2.038915730445, ‖∇f‖ = 1.6570e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 29, time 1204.18 s: f = -2.041961016975, ‖∇f‖ = 2.2790e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 30, time 1210.81 s: f = -2.045467456219, ‖∇f‖ = 1.0966e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 31, time 1216.81 s: f = -2.047243458561, ‖∇f‖ = 9.2405e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 32, time 1223.40 s: f = -2.049202803483, ‖∇f‖ = 1.2184e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 33, time 1229.55 s: f = -2.050191917638, ‖∇f‖ = 1.3044e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 34, time 1236.28 s: f = -2.050986114708, ‖∇f‖ = 5.9665e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 35, time 1242.29 s: f = -2.051548091457, ‖∇f‖ = 5.5253e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 36, time 1248.94 s: f = -2.051993308206, ‖∇f‖ = 6.2588e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 37, time 1254.93 s: f = -2.052324002624, ‖∇f‖ = 1.1928e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 38, time 1261.55 s: f = -2.052936230102, ‖∇f‖ = 4.9216e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 39, time 1267.62 s: f = -2.053164325823, ‖∇f‖ = 3.3410e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 40, time 1274.63 s: f = -2.053418129203, ‖∇f‖ = 3.7314e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 41, time 1281.04 s: f = -2.053649981748, ‖∇f‖ = 6.3612e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 42, time 1288.03 s: f = -2.053879953203, ‖∇f‖ = 3.4038e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 43, time 1294.19 s: f = -2.054050515673, ‖∇f‖ = 2.9152e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 44, time 1300.90 s: f = -2.054259903099, ‖∇f‖ = 3.9095e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 45, time 1307.08 s: f = -2.054388805929, ‖∇f‖ = 6.7475e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 46, time 1313.89 s: f = -2.054563154978, ‖∇f‖ = 3.0486e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 47, time 1320.10 s: f = -2.054666133101, ‖∇f‖ = 2.3929e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 48, time 1327.11 s: f = -2.054764670097, ‖∇f‖ = 2.9961e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 49, time 1333.39 s: f = -2.054936790198, ‖∇f‖ = 3.5407e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 50, time 1345.97 s: f = -2.055058405443, ‖∇f‖ = 5.1106e-02, α = 5.17e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 51, time 1352.51 s: f = -2.055253894176, ‖∇f‖ = 3.1080e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 52, time 1358.46 s: f = -2.055461219872, ‖∇f‖ = 2.9077e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 53, time 1365.09 s: f = -2.055733194309, ‖∇f‖ = 4.5784e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 54, time 1371.09 s: f = -2.055960164237, ‖∇f‖ = 7.1631e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 55, time 1377.71 s: f = -2.056334000687, ‖∇f‖ = 5.1447e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 56, time 1383.71 s: f = -2.056801416149, ‖∇f‖ = 4.8803e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 57, time 1390.38 s: f = -2.057222872354, ‖∇f‖ = 5.7077e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 58, time 1396.39 s: f = -2.057705132019, ‖∇f‖ = 8.5536e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 59, time 1403.02 s: f = -2.058233824137, ‖∇f‖ = 6.6099e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 60, time 1409.04 s: f = -2.058618411767, ‖∇f‖ = 8.2058e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 61, time 1415.83 s: f = -2.058860905381, ‖∇f‖ = 8.8034e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 62, time 1421.91 s: f = -2.059344181668, ‖∇f‖ = 6.7163e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 63, time 1428.66 s: f = -2.059884025175, ‖∇f‖ = 1.1005e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 64, time 1434.76 s: f = -2.060366638147, ‖∇f‖ = 7.3906e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 65, time 1441.44 s: f = -2.060748895891, ‖∇f‖ = 5.7350e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 66, time 1447.53 s: f = -2.061217694695, ‖∇f‖ = 1.0218e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 67, time 1454.24 s: f = -2.061747836243, ‖∇f‖ = 6.5473e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 68, time 1460.31 s: f = -2.061935488163, ‖∇f‖ = 7.7435e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 69, time 1467.07 s: f = -2.062292588164, ‖∇f‖ = 1.1031e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 70, time 1473.20 s: f = -2.062776748901, ‖∇f‖ = 8.7133e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 71, time 1479.94 s: f = -2.063311285039, ‖∇f‖ = 6.3871e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 72, time 1486.01 s: f = -2.063848732928, ‖∇f‖ = 7.8582e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 73, time 1492.69 s: f = -2.064428066762, ‖∇f‖ = 8.0994e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 74, time 1498.82 s: f = -2.064797991263, ‖∇f‖ = 2.1328e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 75, time 1505.51 s: f = -2.065223995463, ‖∇f‖ = 1.0827e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 76, time 1511.60 s: f = -2.065622191643, ‖∇f‖ = 7.4192e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 77, time 1518.32 s: f = -2.066318151347, ‖∇f‖ = 9.4270e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 78, time 1532.05 s: f = -2.067468309902, ‖∇f‖ = 1.5613e-01, α = 4.14e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 79, time 1546.45 s: f = -2.068248367388, ‖∇f‖ = 1.9031e-01, α = 2.81e-01, m = 20, nfg = 2 +┌ Warning: LBFGS: not converged to requested tol after 80 iterations and time 1558.17 s: f = -2.069293119751, ‖∇f‖ = 3.6413e-01 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/lbfgs.jl:197 +E = -2.0692931197508764 + +```` + +Finally, let's compare the obtained energy against a reference energy from a QMC study by +[Qin et al.](@cite qin_benchmark_2016). With the parameters specified above, they obtain an +energy of $E_\text{ref} \approx 4 \times -0.5244140625 = -2.09765625$ (the factor 4 comes +from the $2 \times 2$ unit cell that we use here). Thus, we find: + +````julia +E_ref = -2.09765625 +@show (E - E_ref) / E_ref; +```` + +```` +(E - E_ref) / E_ref = -0.013521343284498413 + +```` + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/docs/src/examples/fermi_hubbard/main.ipynb b/docs/src/examples/fermi_hubbard/main.ipynb new file mode 100644 index 000000000..287b949c3 --- /dev/null +++ b/docs/src/examples/fermi_hubbard/main.ipynb @@ -0,0 +1,221 @@ +{ + "cells": [ + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Markdown #hide" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "# Fermi-Hubbard model with $f\\mathbb{Z}_2 \\boxtimes U(1)$ symmetry, at large $U$ and half-filling\n", + "\n", + "In this example, we will demonstrate how to handle fermionic PEPS tensors and how to\n", + "optimize them. To that end, we consider the two-dimensional Hubbard model\n", + "\n", + "$$\n", + "H = -t \\sum_{\\langle i,j \\rangle} \\sum_{\\sigma} \\left( c_{i,\\sigma}^+ c_{j,\\sigma}^- -\n", + "c_{i,\\sigma}^- c_{j,\\sigma}^+ \\right) + U \\sum_i n_{i,\\uparrow}n_{i,\\downarrow} - \\mu \\sum_i n_i\n", + "$$\n", + "\n", + "where $\\sigma \\in \\{\\uparrow,\\downarrow\\}$ and $n_{i,\\sigma} = c_{i,\\sigma}^+ c_{i,\\sigma}^-$\n", + "is the fermionic number operator. As in previous examples, using fermionic degrees of freedom\n", + "is a matter of creating tensors with the right symmetry sectors - the rest of the simulation\n", + "workflow remains the same.\n", + "\n", + "First though, we make the example deterministic by seeding the RNG, and we make our imports:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Random\n", + "using TensorKit, PEPSKit\n", + "using MPSKit: add_physical_charge\n", + "Random.seed!(2928528937);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Defining the fermionic Hamiltonian\n", + "\n", + "Let us start by fixing the parameters of the Hubbard model. We're going to use a hopping of\n", + "$t=1$ and a large $U=8$ on a $2 \\times 2$ unit cell:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "t = 1.0\n", + "U = 8.0\n", + "lattice = InfiniteSquare(2, 2);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "In order to create fermionic tensors, one needs to define symmetry sectors using TensorKit's\n", + "`FermionParity`. Not only do we want use fermion parity but we also want our\n", + "particles to exploit the global $U(1)$ symmetry. The combined product sector can be obtained\n", + "using the [Deligne product](https://jutho.github.io/TensorKit.jl/stable/lib/sectors/#TensorKitSectors.deligneproduct-Tuple{Sector,%20Sector}),\n", + "called through `⊠` which is obtained by typing `\\boxtimes+TAB`. We will not impose any extra\n", + "spin symmetry, so we have:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "fermion = fℤ₂\n", + "particle_symmetry = U1Irrep\n", + "spin_symmetry = Trivial\n", + "S = fermion ⊠ particle_symmetry" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "The next step is defining graded virtual PEPS and environment spaces using `S`. Here we also\n", + "use the symmetry sector to impose half-filling. That is all we need to define the Hubbard\n", + "Hamiltonian:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "D, χ = 1, 1\n", + "V_peps = Vect[S]((0, 0) => 2 * D, (1, 1) => D, (1, -1) => D)\n", + "V_env = Vect[S](\n", + " (0, 0) => 4 * χ, (1, -1) => 2 * χ, (1, 1) => 2 * χ, (0, 2) => χ, (0, -2) => χ\n", + ")\n", + "S_aux = S((1, -1))\n", + "H₀ = hubbard_model(ComplexF64, particle_symmetry, spin_symmetry, lattice; t, U)\n", + "H = add_physical_charge(H₀, fill(S_aux, size(H₀.lattice)...));" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Finding the ground state\n", + "\n", + "Again, the procedure of ground state optimization is very similar to before. First, we\n", + "define all algorithmic parameters:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace))\n", + "gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge)\n", + "optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=80, ls_maxiter=3, ls_maxfg=3)" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Second, we initialize a PEPS state and environment (which we converge) constructed from\n", + "symmetric physical and virtual spaces:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "physical_spaces = H.lattice\n", + "virtual_spaces = fill(V_peps, size(lattice)...)\n", + "peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces)\n", + "env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "And third, we start the ground state search (this does take quite long):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "peps, env, E, info = fixedpoint(\n", + " H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3\n", + ")\n", + "@show E;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Finally, let's compare the obtained energy against a reference energy from a QMC study by\n", + "[Qin et al.](@cite qin_benchmark_2016). With the parameters specified above, they obtain an\n", + "energy of $E_\\text{ref} \\approx 4 \\times -0.5244140625 = -2.09765625$ (the factor 4 comes\n", + "from the $2 \\times 2$ unit cell that we use here). Thus, we find:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "E_ref = -2.09765625\n", + "@show (E - E_ref) / E_ref;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "---\n", + "\n", + "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" + ], + "metadata": {} + } + ], + "nbformat_minor": 3, + "metadata": { + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.11.4" + }, + "kernelspec": { + "name": "julia-1.11", + "display_name": "Julia 1.11.4", + "language": "julia" + } + }, + "nbformat": 4 +} diff --git a/docs/src/examples/heisenberg/index.md b/docs/src/examples/heisenberg/index.md new file mode 100644 index 000000000..c4456d48c --- /dev/null +++ b/docs/src/examples/heisenberg/index.md @@ -0,0 +1,412 @@ +```@meta +EditURL = "../../../../examples/heisenberg/main.jl" +``` + +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//heisenberg/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//heisenberg/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//heisenberg) + + +# [Optimizing the 2D Heisenberg model](@id examples_heisenberg) + +In this example we want to provide a basic rundown of PEPSKit's optimization workflow for +PEPS. To that end, we will consider the two-dimensional Heisenberg model on a square lattice + +```math +H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j +``` + +Here, we want to set $J_x=J_y=J_z=1$ where the Heisenberg model is in the antiferromagnetic +regime. Due to the bipartite sublattice structure of antiferromagnetic order one needs a +PEPS ansatz with a $2 \times 2$ unit cell. This can be circumvented by performing a unitary +sublattice rotation on all B-sites resulting in a change of parameters to +$(J_x, J_y, J_z)=(-1, 1, -1)$. This gives us a unitarily equivalent Hamiltonian (with the +same spectrum) with a ground state on a single-site unit cell. + +Let us get started by fixing the random seed of this example to make it deterministic: + +````julia +using Random +Random.seed!(123456789); +```` + +We're going to need only two packages: `TensorKit`, since we use that for all the underlying +tensor operations, and `PEPSKit` itself. So let us import these: + +````julia +using TensorKit, PEPSKit +```` + +## Defining the Heisenberg Hamiltonian + +To create the sublattice rotated Heisenberg Hamiltonian on an infinite square lattice, we use +the `heisenberg_XYZ` method from [MPSKitModels](https://quantumkithub.github.io/MPSKitModels.jl/dev/) +which is redefined for the `InfiniteSquare` and reexported in PEPSKit: + +````julia +H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1) +```` + +```` +LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 2, 2, Vector{ComplexF64}}}, Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 2, 2, Vector{ComplexF64}}}}, TensorKit.ComplexSpace}(TensorKit.ComplexSpace[ℂ^2;;], ((CartesianIndex(1, 1), CartesianIndex(1, 2)) => TensorMap((ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)): +[:, :, 1, 1] = + -0.25 + 0.0im 0.0 + 0.0im + 0.0 + 0.0im -0.5 + 0.0im + +[:, :, 2, 1] = + 0.0 + 0.0im 0.0 + 0.0im + 0.25 + 0.0im 0.0 + 0.0im + +[:, :, 1, 2] = + 0.0 + 0.0im 0.25 + 0.0im + 0.0 + 0.0im 0.0 + 0.0im + +[:, :, 2, 2] = + -0.5 + 0.0im 0.0 + 0.0im + 0.0 + 0.0im -0.25 + 0.0im +, (CartesianIndex(1, 1), CartesianIndex(2, 1)) => TensorMap((ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)): +[:, :, 1, 1] = + -0.25 + 0.0im 0.0 + 0.0im + 0.0 + 0.0im -0.5 + 0.0im + +[:, :, 2, 1] = + 0.0 + 0.0im 0.0 + 0.0im + 0.25 + 0.0im 0.0 + 0.0im + +[:, :, 1, 2] = + 0.0 + 0.0im 0.25 + 0.0im + 0.0 + 0.0im 0.0 + 0.0im + +[:, :, 2, 2] = + -0.5 + 0.0im 0.0 + 0.0im + 0.0 + 0.0im -0.25 + 0.0im +)) +```` + +## Setting up the algorithms and initial guesses + +Next, we set the simulation parameters. During optimization, the PEPS will be contracted +using CTMRG and the PEPS gradient will be computed by differentiating through the CTMRG +routine using AD. Since the algorithmic stack that implements this is rather elaborate, +the amount of settings one can configure is also quite large. To reduce this complexity, +PEPSKit defaults to (presumably) reasonable settings which also dynamically adapts to the +user-specified parameters. + +First, we set the bond dimension `Dbond` of the virtual PEPS indices and the environment +dimension `χenv` of the virtual corner and transfer matrix indices. + +````julia +Dbond = 2 +χenv = 16; +```` + +To configure the CTMRG algorithm, we create a `NamedTuple` containing different keyword +arguments. To see a description of all arguments, see the docstring of +[`leading_boundary`](@ref). Here, we want to converge the CTMRG environments up to a +specific tolerance and during the CTMRG run keep all index dimensions fixed: + +````julia +boundary_alg = (; tol=1e-10, trscheme=(; alg=:fixedspace)); +```` + +Let us also configure the optimizer algorithm. We are going to optimize the PEPS using the +L-BFGS optimizer from [OptimKit](https://github.com/Jutho/OptimKit.jl). Again, we specify +the convergence tolerance (for the gradient norm) as well as the maximal number of iterations +and the BFGS memory size (which is used to approximate the Hessian): + +````julia +optimizer_alg = (; alg=:lbfgs, tol=1e-4, maxiter=100, lbfgs_memory=16); +```` + +Additionally, during optimization, we want to reuse the previous CTMRG environment to +initialize the CTMRG run of the current optimization step using the `reuse_env` argument. +And to control the output information, we set the `verbosity`: + +````julia +reuse_env = true +verbosity = 3; +```` + +Next, we initialize a random PEPS which will be used as an initial guess for the +optimization. To get a PEPS with physical dimension 2 (since we have a spin-1/2 Hamiltonian) +with complex-valued random Gaussian entries, we set: + +````julia +peps₀ = InfinitePEPS(randn, ComplexF64, 2, Dbond) +```` + +```` +InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}(TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}[TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')): +[:, :, 1, 1, 1] = + 0.07382174258286094 + 0.12820373667088403im 0.7897519397510839 + 0.9113654266438473im + 0.2553716885006697 - 0.4358399804354269im -1.0272416446076236 - 0.12635062198157215im + +[:, :, 2, 1, 1] = + 0.16833628450178303 - 0.10088950122180829im -0.9702030532300809 + 0.010730752411986726im + -1.6804460553576506 + 0.29081053879369084im 0.6844811667615024 + 0.09101537356941222im + +[:, :, 1, 2, 1] = + 0.5085938050744258 + 0.3786892551842583im 1.0020057959636561 - 1.4704891009758718im + -0.6153328223084331 + 0.10417896606055738im 0.6024931811537675 - 1.0348374874397468im + +[:, :, 2, 2, 1] = + -0.027201695938305456 + 0.5778042099380925im 0.09232089635078945 + 0.6143070126937361im + 1.0707115218777772 - 0.5747168579241235im -0.5819741818511422 - 0.9842624134267605im + +[:, :, 1, 1, 2] = + 1.2332543810053822 - 1.7783531996396438im 0.8887723728085348 + 0.7809798723615474im + 1.2251189302516847 - 0.6853683793073324im 1.5333834584675397 - 0.13856216581406375im + +[:, :, 2, 1, 2] = + 0.1406381347783769 + 0.6630243440357264im -0.7294596235434386 + 0.40327909254711103im + 0.7212056487788236 + 0.24320971945037498im 0.9991347929322827 + 0.0017902515981375842im + +[:, :, 1, 2, 2] = + 0.34282910982693904 - 0.4865238029567361im 0.9380949844871762 - 0.6985342237892025im + -0.7437083517319159 - 0.6895708849529253im -0.8981092940164176 + 0.9720706252141459im + +[:, :, 2, 2, 2] = + -0.8897079923413616 - 0.7145412189457411im 0.07771261045117502 - 0.6400190994609709im + -1.6099412157243007 + 0.8855200965611144im 0.7357380595021633 + 0.4626916850143416im +;;]) +```` + +The last thing we need before we can start the optimization is an initial CTMRG environment. +Typically, a random environment which we converge on `peps₀` serves as a good starting point. +To contract a PEPS starting from an environment using CTMRG, we call [`leading_boundary`](@ref): + +````julia +env_random = CTMRGEnv(randn, ComplexF64, peps₀, ℂ^χenv); +env₀, info_ctmrg = leading_boundary(env_random, peps₀; boundary_alg...); +```` + +```` +[ Info: CTMRG init: obj = -2.749614463601e+00 +3.639628057806e+00im err = 1.0000e+00 +[ Info: CTMRG conv 27: obj = +9.727103564786e+00 err = 2.6201184615e-11 time = 0.18 sec + +```` + +Besides the converged environment, `leading_boundary` also returns a `NamedTuple` of +informational quantities such as the last (maximal) SVD truncation error: + +````julia +@show info_ctmrg.truncation_error; +```` + +```` +info_ctmrg.truncation_error = 0.0017032153529848298 + +```` + +## Ground state search + +Finally, we can start the optimization by calling [`fixedpoint`](@ref) on `H` with our +settings for the boundary (CTMRG) algorithm and the optimizer. This might take a while +(especially the precompilation of AD code in this case): + +````julia +peps, env, E, info_opt = fixedpoint( + H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity +); +```` + +```` +[ Info: LBFGS: initializing with f = 0.000601645310, ‖∇f‖ = 9.3548e-01 +┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Float64}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 +[ Info: LBFGS: iter 1, time 643.76 s: f = -0.489783740840, ‖∇f‖ = 6.0020e-01, α = 5.94e+01, m = 0, nfg = 5 +┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 +[ Info: LBFGS: iter 2, time 645.35 s: f = -0.501971411096, ‖∇f‖ = 5.3738e-01, α = 2.80e-01, m = 1, nfg = 2 +[ Info: LBFGS: iter 3, time 645.66 s: f = -0.523152816264, ‖∇f‖ = 3.9922e-01, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 4, time 646.32 s: f = -0.538652145758, ‖∇f‖ = 4.1551e-01, α = 2.29e-01, m = 3, nfg = 2 +[ Info: LBFGS: iter 5, time 648.06 s: f = -0.549861364689, ‖∇f‖ = 4.4015e-01, α = 6.94e-02, m = 4, nfg = 4 +[ Info: LBFGS: iter 6, time 648.85 s: f = -0.568951023367, ‖∇f‖ = 4.8339e-01, α = 2.24e-01, m = 5, nfg = 2 +[ Info: LBFGS: iter 7, time 649.62 s: f = -0.586980871663, ‖∇f‖ = 4.2463e-01, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 8, time 649.99 s: f = -0.599970185661, ‖∇f‖ = 2.1955e-01, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 9, time 650.27 s: f = -0.606725496115, ‖∇f‖ = 1.9384e-01, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 10, time 650.51 s: f = -0.624986498009, ‖∇f‖ = 2.9776e-01, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 11, time 650.76 s: f = -0.638747320059, ‖∇f‖ = 2.3382e-01, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 12, time 651.01 s: f = -0.645577148853, ‖∇f‖ = 2.9937e-01, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 13, time 651.24 s: f = -0.650891062410, ‖∇f‖ = 1.4746e-01, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 14, time 651.49 s: f = -0.654569099868, ‖∇f‖ = 7.0690e-02, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 15, time 651.74 s: f = -0.655949603239, ‖∇f‖ = 5.0977e-02, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 16, time 651.99 s: f = -0.657146001976, ‖∇f‖ = 5.8056e-02, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 17, time 652.25 s: f = -0.658558478454, ‖∇f‖ = 5.0388e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 18, time 652.49 s: f = -0.659302065828, ‖∇f‖ = 4.0776e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 19, time 652.73 s: f = -0.659633838354, ‖∇f‖ = 2.2380e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 20, time 652.96 s: f = -0.659776177694, ‖∇f‖ = 2.1511e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 21, time 653.20 s: f = -0.659916031911, ‖∇f‖ = 2.0498e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 22, time 653.45 s: f = -0.660181523751, ‖∇f‖ = 1.7235e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 23, time 653.70 s: f = -0.660350536401, ‖∇f‖ = 1.8928e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 24, time 653.94 s: f = -0.660447076769, ‖∇f‖ = 1.0330e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 25, time 654.19 s: f = -0.660521574522, ‖∇f‖ = 1.0448e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 26, time 654.44 s: f = -0.660656071716, ‖∇f‖ = 1.8768e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 27, time 654.71 s: f = -0.660756412995, ‖∇f‖ = 3.2183e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 28, time 654.98 s: f = -0.660925447420, ‖∇f‖ = 1.3371e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 29, time 655.37 s: f = -0.661000634324, ‖∇f‖ = 9.8866e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 30, time 656.06 s: f = -0.661046316490, ‖∇f‖ = 9.1513e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 31, time 656.41 s: f = -0.661128304094, ‖∇f‖ = 9.6895e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 32, time 656.71 s: f = -0.661169144566, ‖∇f‖ = 1.3492e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 33, time 656.98 s: f = -0.661204525845, ‖∇f‖ = 9.6996e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 34, time 657.23 s: f = -0.661224003573, ‖∇f‖ = 6.2892e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 35, time 657.50 s: f = -0.661247137140, ‖∇f‖ = 4.4514e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 36, time 657.76 s: f = -0.661266456453, ‖∇f‖ = 5.3015e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 37, time 658.02 s: f = -0.661280686254, ‖∇f‖ = 9.2298e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 38, time 658.28 s: f = -0.661298851672, ‖∇f‖ = 5.9013e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 39, time 658.54 s: f = -0.661320547122, ‖∇f‖ = 6.2443e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 40, time 658.80 s: f = -0.661344887326, ‖∇f‖ = 9.9129e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 41, time 659.07 s: f = -0.661398950542, ‖∇f‖ = 1.6285e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 42, time 659.35 s: f = -0.661483277766, ‖∇f‖ = 1.6233e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 43, time 659.63 s: f = -0.661583013010, ‖∇f‖ = 2.8186e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 44, time 659.92 s: f = -0.661670888522, ‖∇f‖ = 3.9725e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 45, time 660.20 s: f = -0.661865434012, ‖∇f‖ = 1.3200e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 46, time 660.47 s: f = -0.661977354471, ‖∇f‖ = 1.5881e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 47, time 660.75 s: f = -0.662102076782, ‖∇f‖ = 2.0290e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 48, time 661.31 s: f = -0.662190125548, ‖∇f‖ = 2.2873e-02, α = 4.61e-01, m = 16, nfg = 2 +[ Info: LBFGS: iter 49, time 661.60 s: f = -0.662306892721, ‖∇f‖ = 1.3813e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 50, time 661.88 s: f = -0.662376465537, ‖∇f‖ = 1.9902e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 51, time 662.63 s: f = -0.662419493776, ‖∇f‖ = 1.2249e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 52, time 662.96 s: f = -0.662439251412, ‖∇f‖ = 7.3806e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 53, time 663.31 s: f = -0.662463629284, ‖∇f‖ = 5.1806e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 54, time 663.57 s: f = -0.662484473404, ‖∇f‖ = 4.6461e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 55, time 664.09 s: f = -0.662490501784, ‖∇f‖ = 6.3694e-03, α = 4.07e-01, m = 16, nfg = 2 +[ Info: LBFGS: iter 56, time 664.36 s: f = -0.662497687998, ‖∇f‖ = 2.9285e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 57, time 664.63 s: f = -0.662500949854, ‖∇f‖ = 2.1234e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 58, time 664.91 s: f = -0.662503723196, ‖∇f‖ = 4.1203e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 59, time 665.17 s: f = -0.662505780051, ‖∇f‖ = 3.0872e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 60, time 665.43 s: f = -0.662507116565, ‖∇f‖ = 1.9618e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 61, time 665.69 s: f = -0.662509290310, ‖∇f‖ = 1.5747e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 62, time 665.96 s: f = -0.662510568937, ‖∇f‖ = 1.3099e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 63, time 666.22 s: f = -0.662511109974, ‖∇f‖ = 2.7217e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 64, time 666.49 s: f = -0.662511878793, ‖∇f‖ = 1.0320e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 65, time 666.76 s: f = -0.662512042147, ‖∇f‖ = 5.9753e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 66, time 667.01 s: f = -0.662512275118, ‖∇f‖ = 6.6602e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 67, time 667.27 s: f = -0.662512678161, ‖∇f‖ = 9.0498e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 68, time 667.53 s: f = -0.662513114911, ‖∇f‖ = 1.8006e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 69, time 667.80 s: f = -0.662513454844, ‖∇f‖ = 9.5988e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 70, time 668.05 s: f = -0.662513639773, ‖∇f‖ = 5.2576e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 71, time 668.31 s: f = -0.662513713403, ‖∇f‖ = 4.0696e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 72, time 668.56 s: f = -0.662513818843, ‖∇f‖ = 4.8084e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 73, time 668.83 s: f = -0.662513978848, ‖∇f‖ = 6.8463e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 74, time 669.87 s: f = -0.662514066816, ‖∇f‖ = 5.2125e-04, α = 5.38e-01, m = 16, nfg = 2 +[ Info: LBFGS: iter 75, time 670.22 s: f = -0.662514122809, ‖∇f‖ = 3.2924e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 76, time 670.45 s: f = -0.662514184291, ‖∇f‖ = 2.7038e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 77, time 670.70 s: f = -0.662514214654, ‖∇f‖ = 4.6682e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 78, time 670.96 s: f = -0.662514242510, ‖∇f‖ = 2.7698e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 79, time 671.20 s: f = -0.662514253309, ‖∇f‖ = 1.6244e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 80, time 671.44 s: f = -0.662514263613, ‖∇f‖ = 1.2004e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 81, time 671.68 s: f = -0.662514271751, ‖∇f‖ = 1.4760e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 82, time 671.93 s: f = -0.662514281056, ‖∇f‖ = 1.6558e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 83, time 672.18 s: f = -0.662514283704, ‖∇f‖ = 2.1824e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: converged after 84 iterations and time 672.43 s: f = -0.662514288424, ‖∇f‖ = 5.9513e-05 + +```` + +Note that `fixedpoint` returns the final optimized PEPS, the last converged environment, +the final energy estimate as well as a `NamedTuple` of diagnostics. This allows us to, e.g., +analyze the number of cost function calls or the history of gradient norms to evaluate +the convergence rate: + +````julia +@show info_opt.fg_evaluations info_opt.gradnorms[1:10:end]; +```` + +```` +info_opt.fg_evaluations = 98 +info_opt.gradnorms[1:10:end] = [0.9354758925982428, 0.2977564979129917, 0.021510752143210195, 0.009151302712640632, 0.009912940904896769, 0.019901533415930574, 0.0019617677308353, 0.0005257609002981095, 0.00012003941670625574] + +```` + +Let's now compare the optimized energy against an accurate Quantum Monte Carlo estimate by +[Sandvik](@cite sandvik_computational_2011), where the energy per site was found to be +$E_{\text{ref}}=−0.6694421$. From our simple optimization we find: + +````julia +@show E; +```` + +```` +E = -0.6625142884244373 + +```` + +While this energy is in the right ballpark, there is still quite some deviation from the +accurate reference energy. This, however, can be attributed to the small bond dimension - an +optimization with larger bond dimension would approach this value much more closely. + +A more reasonable comparison would be against another finite bond dimension PEPS simulation. +For example, Juraj Hasik's data from $J_1\text{-}J_2$ +[PEPS simulations](https://github.com/jurajHasik/j1j2_ipeps_states/blob/main/single-site_pg-C4v-A1/j20.0/state_1s_A1_j20.0_D2_chi_opt48.dat) +yields $E_{D=2,\chi=16}=-0.660231\dots$ which is more in line with what we find here. + +## Compute the correlation lengths and transfer matrix spectra + +In practice, in order to obtain an accurate and variational energy estimate, one would need +to compute multiple energies at different environment dimensions and extrapolate in, e.g., +the correlation length or the second gap of the transfer matrix spectrum. For that, we would +need the [`correlation_length`](@ref) function, which computes the horizontal and vertical +correlation lengths and transfer matrix spectra for all unit cell coordinates: + +````julia +ξ_h, ξ_v, λ_h, λ_v = correlation_length(peps, env) +@show ξ_h ξ_v; +```` + +```` +ξ_h = [1.034117934253177] +ξ_v = [1.0240816290840877] + +```` + +## Computing observables + +As a last thing, we want to see how we can compute expectation values of observables, given +the optimized PEPS and its CTMRG environment. To compute, e.g., the magnetization, we first +need to define the observable as a `TensorMap`: + +````julia +σ_z = TensorMap([1.0 0.0; 0.0 -1.0], ℂ^2, ℂ^2) +```` + +```` +TensorMap(ℂ^2 ← ℂ^2): + 1.0 0.0 + 0.0 -1.0 + +```` + +In order to be able to contract it with the PEPS and environment, we define need to define a +`LocalOperator` and specify on which physical spaces and sites the observable acts. That way, +the PEPS-environment-operator contraction gets automatically generated (also works for +multi-site operators!). See the [`LocalOperator`](@ref) docstring for more details. +The magnetization is just a single-site observable, so we have: + +````julia +M = LocalOperator(fill(ℂ^2, 1, 1), (CartesianIndex(1, 1),) => σ_z) +```` + +```` +LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}}, TensorKit.TensorMap{Float64, TensorKit.ComplexSpace, 1, 1, Vector{Float64}}}}, TensorKit.ComplexSpace}(TensorKit.ComplexSpace[ℂ^2;;], ((CartesianIndex(1, 1),) => TensorMap(ℂ^2 ← ℂ^2): + 1.0 0.0 + 0.0 -1.0 +,)) +```` + +Finally, to evaluate the expecation value on the `LocalOperator`, we call: + +````julia +@show expectation_value(peps, M, env); +```` + +```` +expectation_value(peps, M, env) = -0.7554296202981441 + 2.541461125039123e-16im + +```` + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/docs/src/examples/heisenberg/main.ipynb b/docs/src/examples/heisenberg/main.ipynb new file mode 100644 index 000000000..5c50a5495 --- /dev/null +++ b/docs/src/examples/heisenberg/main.ipynb @@ -0,0 +1,392 @@ +{ + "cells": [ + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Markdown #hide" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "# Optimizing the 2D Heisenberg model\n", + "\n", + "In this example we want to provide a basic rundown of PEPSKit's optimization workflow for\n", + "PEPS. To that end, we will consider the two-dimensional Heisenberg model on a square lattice\n", + "\n", + "$$\n", + "H = \\sum_{\\langle i,j \\rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j\n", + "$$\n", + "\n", + "Here, we want to set $J_x=J_y=J_z=1$ where the Heisenberg model is in the antiferromagnetic\n", + "regime. Due to the bipartite sublattice structure of antiferromagnetic order one needs a\n", + "PEPS ansatz with a $2 \\times 2$ unit cell. This can be circumvented by performing a unitary\n", + "sublattice rotation on all B-sites resulting in a change of parameters to\n", + "$(J_x, J_y, J_z)=(-1, 1, -1)$. This gives us a unitarily equivalent Hamiltonian (with the\n", + "same spectrum) with a ground state on a single-site unit cell.\n", + "\n", + "Let us get started by fixing the random seed of this example to make it deterministic:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Random\n", + "Random.seed!(123456789);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "We're going to need only two packages: `TensorKit`, since we use that for all the underlying\n", + "tensor operations, and `PEPSKit` itself. So let us import these:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "using TensorKit, PEPSKit" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Defining the Heisenberg Hamiltonian\n", + "\n", + "To create the sublattice rotated Heisenberg Hamiltonian on an infinite square lattice, we use\n", + "the `heisenberg_XYZ` method from [MPSKitModels](https://quantumkithub.github.io/MPSKitModels.jl/dev/)\n", + "which is redefined for the `InfiniteSquare` and reexported in PEPSKit:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "H = heisenberg_XYZ(InfiniteSquare(); Jx=-1, Jy=1, Jz=-1)" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Setting up the algorithms and initial guesses\n", + "\n", + "Next, we set the simulation parameters. During optimization, the PEPS will be contracted\n", + "using CTMRG and the PEPS gradient will be computed by differentiating through the CTMRG\n", + "routine using AD. Since the algorithmic stack that implements this is rather elaborate,\n", + "the amount of settings one can configure is also quite large. To reduce this complexity,\n", + "PEPSKit defaults to (presumably) reasonable settings which also dynamically adapts to the\n", + "user-specified parameters.\n", + "\n", + "First, we set the bond dimension `Dbond` of the virtual PEPS indices and the environment\n", + "dimension `χenv` of the virtual corner and transfer matrix indices." + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "Dbond = 2\n", + "χenv = 16;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "To configure the CTMRG algorithm, we create a `NamedTuple` containing different keyword\n", + "arguments. To see a description of all arguments, see the docstring of\n", + "`leading_boundary`. Here, we want to converge the CTMRG environments up to a\n", + "specific tolerance and during the CTMRG run keep all index dimensions fixed:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "boundary_alg = (; tol=1e-10, trscheme=(; alg=:fixedspace));" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Let us also configure the optimizer algorithm. We are going to optimize the PEPS using the\n", + "L-BFGS optimizer from [OptimKit](https://github.com/Jutho/OptimKit.jl). Again, we specify\n", + "the convergence tolerance (for the gradient norm) as well as the maximal number of iterations\n", + "and the BFGS memory size (which is used to approximate the Hessian):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "optimizer_alg = (; alg=:lbfgs, tol=1e-4, maxiter=100, lbfgs_memory=16);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Additionally, during optimization, we want to reuse the previous CTMRG environment to\n", + "initialize the CTMRG run of the current optimization step using the `reuse_env` argument.\n", + "And to control the output information, we set the `verbosity`:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "reuse_env = true\n", + "verbosity = 3;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Next, we initialize a random PEPS which will be used as an initial guess for the\n", + "optimization. To get a PEPS with physical dimension 2 (since we have a spin-1/2 Hamiltonian)\n", + "with complex-valued random Gaussian entries, we set:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "peps₀ = InfinitePEPS(randn, ComplexF64, 2, Dbond)" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "The last thing we need before we can start the optimization is an initial CTMRG environment.\n", + "Typically, a random environment which we converge on `peps₀` serves as a good starting point.\n", + "To contract a PEPS starting from an environment using CTMRG, we call `leading_boundary`:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "env_random = CTMRGEnv(randn, ComplexF64, peps₀, ℂ^χenv);\n", + "env₀, info_ctmrg = leading_boundary(env_random, peps₀; boundary_alg...);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Besides the converged environment, `leading_boundary` also returns a `NamedTuple` of\n", + "informational quantities such as the last (maximal) SVD truncation error:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "@show info_ctmrg.truncation_error;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Ground state search\n", + "\n", + "Finally, we can start the optimization by calling `fixedpoint` on `H` with our\n", + "settings for the boundary (CTMRG) algorithm and the optimizer. This might take a while\n", + "(especially the precompilation of AD code in this case):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "peps, env, E, info_opt = fixedpoint(\n", + " H, peps₀, env₀; boundary_alg, optimizer_alg, reuse_env, verbosity\n", + ");" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Note that `fixedpoint` returns the final optimized PEPS, the last converged environment,\n", + "the final energy estimate as well as a `NamedTuple` of diagnostics. This allows us to, e.g.,\n", + "analyze the number of cost function calls or the history of gradient norms to evaluate\n", + "the convergence rate:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "@show info_opt.fg_evaluations info_opt.gradnorms[1:10:end];" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Let's now compare the optimized energy against an accurate Quantum Monte Carlo estimate by\n", + "[Sandvik](@cite sandvik_computational_2011), where the energy per site was found to be\n", + "$E_{\\text{ref}}=−0.6694421$. From our simple optimization we find:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "@show E;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "While this energy is in the right ballpark, there is still quite some deviation from the\n", + "accurate reference energy. This, however, can be attributed to the small bond dimension - an\n", + "optimization with larger bond dimension would approach this value much more closely.\n", + "\n", + "A more reasonable comparison would be against another finite bond dimension PEPS simulation.\n", + "For example, Juraj Hasik's data from $J_1\\text{-}J_2$\n", + "[PEPS simulations](https://github.com/jurajHasik/j1j2_ipeps_states/blob/main/single-site_pg-C4v-A1/j20.0/state_1s_A1_j20.0_D2_chi_opt48.dat)\n", + "yields $E_{D=2,\\chi=16}=-0.660231\\dots$ which is more in line with what we find here.\n", + "\n", + "## Compute the correlation lengths and transfer matrix spectra\n", + "\n", + "In practice, in order to obtain an accurate and variational energy estimate, one would need\n", + "to compute multiple energies at different environment dimensions and extrapolate in, e.g.,\n", + "the correlation length or the second gap of the transfer matrix spectrum. For that, we would\n", + "need the `correlation_length` function, which computes the horizontal and vertical\n", + "correlation lengths and transfer matrix spectra for all unit cell coordinates:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "ξ_h, ξ_v, λ_h, λ_v = correlation_length(peps, env)\n", + "@show ξ_h ξ_v;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Computing observables\n", + "\n", + "As a last thing, we want to see how we can compute expectation values of observables, given\n", + "the optimized PEPS and its CTMRG environment. To compute, e.g., the magnetization, we first\n", + "need to define the observable as a `TensorMap`:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "σ_z = TensorMap([1.0 0.0; 0.0 -1.0], ℂ^2, ℂ^2)" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "In order to be able to contract it with the PEPS and environment, we define need to define a\n", + "`LocalOperator` and specify on which physical spaces and sites the observable acts. That way,\n", + "the PEPS-environment-operator contraction gets automatically generated (also works for\n", + "multi-site operators!). See the `LocalOperator` docstring for more details.\n", + "The magnetization is just a single-site observable, so we have:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "M = LocalOperator(fill(ℂ^2, 1, 1), (CartesianIndex(1, 1),) => σ_z)" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Finally, to evaluate the expecation value on the `LocalOperator`, we call:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "@show expectation_value(peps, M, env);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "---\n", + "\n", + "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" + ], + "metadata": {} + } + ], + "nbformat_minor": 3, + "metadata": { + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.11.4" + }, + "kernelspec": { + "name": "julia-1.11", + "display_name": "Julia 1.11.4", + "language": "julia" + } + }, + "nbformat": 4 +} diff --git a/docs/src/examples/heisenberg_su/index.md b/docs/src/examples/heisenberg_su/index.md new file mode 100644 index 000000000..7d5ca74aa --- /dev/null +++ b/docs/src/examples/heisenberg_su/index.md @@ -0,0 +1,212 @@ +```@meta +EditURL = "../../../../examples/heisenberg_su/main.jl" +``` + +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//heisenberg_su/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//heisenberg_su/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//heisenberg_su) + + +# Simple update for the Heisenberg model + +In this next example, we will use [`SimpleUpdate`](@ref) imaginary time evolution to treat +the two-dimensional Heisenberg model once again: + +```math +H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j. +``` + +In the previous examples, we used a sublattice rotation to simulate antiferromagnetic +Hamiltonian on a single-site unit cell. Here, we will instead use a $2 \times 2$ unit cell +and set $J_x=J_y=J_z=1$. + +Let's get started by seeding the RNG and importing all required modules: + +````julia +using Random +import Statistics: mean +using TensorKit, PEPSKit +import MPSKitModels: S_x, S_y, S_z, S_exchange +Random.seed!(0); +```` + +## Defining the Hamiltonian + +To construct the Heisenberg Hamiltonian as just discussed, we'll use `heisenberg_XYZ` and, +in addition, make it real (`real` and `imag` works for `LocalOperator`s) since we want to +use PEPS and environments with real entries. We can either initialize the Hamiltonian with +no internal symmetries (`symm = Trivial`) or use the global $U(1)$ symmetry +(`symm = U1Irrep`): + +````julia +symm = Trivial ## ∈ {Trivial, U1Irrep} +Nr, Nc = 2, 2 +H = real(heisenberg_XYZ(ComplexF64, symm, InfiniteSquare(Nr, Nc); Jx=1, Jy=1, Jz=1)); +```` + +## Simple updating + +We proceed by initializing a random weighted PEPS that will be evolved. Again, we'll +normalize its vertex tensors. First though, we need to take of defining the appropriate +(symmetric) spaces: + +````julia +Dbond = 4 +χenv = 16 +if symm == Trivial + physical_space = ℂ^2 + bond_space = ℂ^Dbond + env_space = ℂ^χenv +elseif symm == U1Irrep + physical_space = ℂ[U1Irrep](1//2 => 1, -1//2 => 1) + bond_space = ℂ[U1Irrep](0 => Dbond ÷ 2, 1//2 => Dbond ÷ 4, -1//2 => Dbond ÷ 4) + env_space = ℂ[U1Irrep](0 => χenv ÷ 2, 1//2 => χenv ÷ 4, -1//2 => χenv ÷ 4) +else + error("not implemented") +end + +wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, bond_space; unitcell=(Nr, Nc)) +for ind in CartesianIndices(wpeps.vertices) + wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf) +end +```` + +Next, we can start the `SimpleUpdate` routine, successively decreasing the time intervals +and singular value convergence tolerances. Note that TensorKit allows to combine SVD +truncation schemes, which we use here to set a maximal bond dimension and at the same time +fix a truncation error (if that can be reached by remaining below `Dbond`): + +````julia +dts = [1e-2, 1e-3, 4e-4] +tols = [1e-6, 1e-8, 1e-8] +maxiter = 10000 +trscheme_peps = truncerr(1e-10) & truncdim(Dbond) + +for (dt, tol) in zip(dts, tols) + alg = SimpleUpdate(dt, tol, maxiter, trscheme_peps) + result = simpleupdate(wpeps, H, alg; bipartite=true) + global wpeps = result[1] +end +```` + +```` +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 1 : dt = 1e-02, weight diff = 1.683e+00, time = 10.318 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 500 : dt = 1e-02, weight diff = 3.879e-06, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU conv 596 : dt = 1e-02, weight diff = 9.933e-07, time = 11.765 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 1 : dt = 1e-03, weight diff = 2.135e-03, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 500 : dt = 1e-03, weight diff = 9.632e-07, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 1000 : dt = 1e-03, weight diff = 2.415e-07, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 1500 : dt = 1e-03, weight diff = 6.291e-08, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 2000 : dt = 1e-03, weight diff = 1.683e-08, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU conv 2205 : dt = 1e-03, weight diff = 9.978e-09, time = 4.599 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 1 : dt = 4e-04, weight diff = 1.418e-04, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 500 : dt = 4e-04, weight diff = 6.377e-08, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 1000 : dt = 4e-04, weight diff = 3.544e-08, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 1500 : dt = 4e-04, weight diff = 2.013e-08, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU iter 2000 : dt = 4e-04, weight diff = 1.157e-08, time = 0.002 sec +[ Info: Space of x-weight at [1, 1] = ℂ^4 +[ Info: SU conv 2133 : dt = 4e-04, weight diff = 9.999e-09, time = 4.428 sec + +```` + +## Computing the ground-state energy and magnetizations + +In order to compute observable expectation values, we need to converge a CTMRG environment +on the evolved PEPS. Let's do so: + +````julia +peps = InfinitePEPS(wpeps) ## absorb the weights +env₀ = CTMRGEnv(rand, Float64, peps, env_space) +trscheme_env = truncerr(1e-10) & truncdim(χenv) +env, = leading_boundary( + env₀, + peps; + alg=:sequential, + projector_alg=:fullinfinite, + tol=1e-10, + trscheme=trscheme_env, +); +```` + +```` +[ Info: CTMRG init: obj = +8.705922473442e-05 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +9.514115680898e-01 err = 3.3105929548e-11 time = 9.37 sec + +```` + +Finally, we'll measure the energy and different magnetizations. For the magnetizations, +the plan is to compute the expectation values unit cell entry-wise in different spin +directions: + +````julia +function compute_mags(peps::InfinitePEPS, env::CTMRGEnv) + lattice = collect(space(t, 1) for t in peps.A) + + # detect symmetry on physical axis + symm = sectortype(space(peps.A[1, 1])) + if symm == Trivial + S_ops = real.([S_x(symm), im * S_y(symm), S_z(symm)]) + elseif symm == U1Irrep + S_ops = real.([S_z(symm)]) ## only Sz preserves + end + + return [ + collect( + expectation_value( + peps, LocalOperator(lattice, (CartesianIndex(r, c),) => S), env + ) for (r, c) in Iterators.product(1:size(peps, 1), 1:size(peps, 2)) + ) for S in S_ops + ] +end + +E = expectation_value(peps, H, env) / (Nr * Nc) +Ms = compute_mags(peps, env) +M_norms = collect(norm([m[r, c] for m in Ms]) for (r, c) in Iterators.product(1:Nr, 1:Nc)) +@show E Ms M_norms; +```` + +```` +E = -0.6674685583160916 +Ms = [[0.03199644951239792 -0.029802620495572755; -0.029802620502593708 0.03199644954611694], [2.289729198376439e-12 -1.051667672083661e-12; -2.117130756284402e-12 8.869747853359352e-13], [0.3755961090665969 -0.3757765476186198; -0.3757765476169762 0.37559610906659047]] +M_norms = [0.3769565093314697 0.37695650933306873; 0.3769565093319854 0.37695650933432534] + +```` + +To assess the results, we will benchmark against data from [Corboz](@cite corboz_variational_2016), +which use manual gradients to perform a variational optimization of the Heisenberg model. +In particular, for the energy and magnetization they find $E_\text{ref} = -0.6675$ and +$M_\text{ref} = 0.3767$. Looking at the relative errors, we find general agreement, although +the accuracy is limited by the methodological limitations of the simple update algorithm as +well as finite bond dimension effects and a lacking extrapolation: + +````julia +E_ref = -0.6675 +M_ref = 0.3767 +@show (E - E_ref) / E_ref +@show (mean(M_norms) - M_ref) / E_ref; +```` + +```` +(E - E_ref) / E_ref = -4.71036463046289e-5 +(mean(M_norms) - M_ref) / E_ref = -0.00038428364451283597 + +```` + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/docs/src/examples/heisenberg_su/main.ipynb b/docs/src/examples/heisenberg_su/main.ipynb new file mode 100644 index 000000000..315a6f115 --- /dev/null +++ b/docs/src/examples/heisenberg_su/main.ipynb @@ -0,0 +1,253 @@ +{ + "cells": [ + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Markdown #hide" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "# Simple update for the Heisenberg model\n", + "\n", + "In this next example, we will use `SimpleUpdate` imaginary time evolution to treat\n", + "the two-dimensional Heisenberg model once again:\n", + "\n", + "$$\n", + "H = \\sum_{\\langle i,j \\rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j.\n", + "$$\n", + "\n", + "In the previous examples, we used a sublattice rotation to simulate antiferromagnetic\n", + "Hamiltonian on a single-site unit cell. Here, we will instead use a $2 \\times 2$ unit cell\n", + "and set $J_x=J_y=J_z=1$.\n", + "\n", + "Let's get started by seeding the RNG and importing all required modules:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Random\n", + "import Statistics: mean\n", + "using TensorKit, PEPSKit\n", + "import MPSKitModels: S_x, S_y, S_z, S_exchange\n", + "Random.seed!(0);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Defining the Hamiltonian\n", + "\n", + "To construct the Heisenberg Hamiltonian as just discussed, we'll use `heisenberg_XYZ` and,\n", + "in addition, make it real (`real` and `imag` works for `LocalOperator`s) since we want to\n", + "use PEPS and environments with real entries. We can either initialize the Hamiltonian with\n", + "no internal symmetries (`symm = Trivial`) or use the global $U(1)$ symmetry\n", + "(`symm = U1Irrep`):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "symm = Trivial ## ∈ {Trivial, U1Irrep}\n", + "Nr, Nc = 2, 2\n", + "H = real(heisenberg_XYZ(ComplexF64, symm, InfiniteSquare(Nr, Nc); Jx=1, Jy=1, Jz=1));" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Simple updating\n", + "\n", + "We proceed by initializing a random weighted PEPS that will be evolved. Again, we'll\n", + "normalize its vertex tensors. First though, we need to take of defining the appropriate\n", + "(symmetric) spaces:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "Dbond = 4\n", + "χenv = 16\n", + "if symm == Trivial\n", + " physical_space = ℂ^2\n", + " bond_space = ℂ^Dbond\n", + " env_space = ℂ^χenv\n", + "elseif symm == U1Irrep\n", + " physical_space = ℂ[U1Irrep](1//2 => 1, -1//2 => 1)\n", + " bond_space = ℂ[U1Irrep](0 => Dbond ÷ 2, 1//2 => Dbond ÷ 4, -1//2 => Dbond ÷ 4)\n", + " env_space = ℂ[U1Irrep](0 => χenv ÷ 2, 1//2 => χenv ÷ 4, -1//2 => χenv ÷ 4)\n", + "else\n", + " error(\"not implemented\")\n", + "end\n", + "\n", + "wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, bond_space; unitcell=(Nr, Nc))\n", + "for ind in CartesianIndices(wpeps.vertices)\n", + " wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf)\n", + "end" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Next, we can start the `SimpleUpdate` routine, successively decreasing the time intervals\n", + "and singular value convergence tolerances. Note that TensorKit allows to combine SVD\n", + "truncation schemes, which we use here to set a maximal bond dimension and at the same time\n", + "fix a truncation error (if that can be reached by remaining below `Dbond`):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "dts = [1e-2, 1e-3, 4e-4]\n", + "tols = [1e-6, 1e-8, 1e-8]\n", + "maxiter = 10000\n", + "trscheme_peps = truncerr(1e-10) & truncdim(Dbond)\n", + "\n", + "for (dt, tol) in zip(dts, tols)\n", + " alg = SimpleUpdate(dt, tol, maxiter, trscheme_peps)\n", + " result = simpleupdate(wpeps, H, alg; bipartite=true)\n", + " global wpeps = result[1]\n", + "end" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Computing the ground-state energy and magnetizations\n", + "\n", + "In order to compute observable expectation values, we need to converge a CTMRG environment\n", + "on the evolved PEPS. Let's do so:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "peps = InfinitePEPS(wpeps) ## absorb the weights\n", + "env₀ = CTMRGEnv(rand, Float64, peps, env_space)\n", + "trscheme_env = truncerr(1e-10) & truncdim(χenv)\n", + "env, = leading_boundary(\n", + " env₀,\n", + " peps;\n", + " alg=:sequential,\n", + " projector_alg=:fullinfinite,\n", + " tol=1e-10,\n", + " trscheme=trscheme_env,\n", + ");" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Finally, we'll measure the energy and different magnetizations. For the magnetizations,\n", + "the plan is to compute the expectation values unit cell entry-wise in different spin\n", + "directions:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "function compute_mags(peps::InfinitePEPS, env::CTMRGEnv)\n", + " lattice = collect(space(t, 1) for t in peps.A)\n", + "\n", + " # detect symmetry on physical axis\n", + " symm = sectortype(space(peps.A[1, 1]))\n", + " if symm == Trivial\n", + " S_ops = real.([S_x(symm), im * S_y(symm), S_z(symm)])\n", + " elseif symm == U1Irrep\n", + " S_ops = real.([S_z(symm)]) ## only Sz preserves \n", + " end\n", + "\n", + " return [\n", + " collect(\n", + " expectation_value(\n", + " peps, LocalOperator(lattice, (CartesianIndex(r, c),) => S), env\n", + " ) for (r, c) in Iterators.product(1:size(peps, 1), 1:size(peps, 2))\n", + " ) for S in S_ops\n", + " ]\n", + "end\n", + "\n", + "E = expectation_value(peps, H, env) / (Nr * Nc)\n", + "Ms = compute_mags(peps, env)\n", + "M_norms = collect(norm([m[r, c] for m in Ms]) for (r, c) in Iterators.product(1:Nr, 1:Nc))\n", + "@show E Ms M_norms;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "To assess the results, we will benchmark against data from [Corboz](@cite corboz_variational_2016),\n", + "which use manual gradients to perform a variational optimization of the Heisenberg model.\n", + "In particular, for the energy and magnetization they find $E_\\text{ref} = -0.6675$ and\n", + "$M_\\text{ref} = 0.3767$. Looking at the relative errors, we find general agreement, although\n", + "the accuracy is limited by the methodological limitations of the simple update algorithm as\n", + "well as finite bond dimension effects and a lacking extrapolation:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "E_ref = -0.6675\n", + "M_ref = 0.3767\n", + "@show (E - E_ref) / E_ref\n", + "@show (mean(M_norms) - M_ref) / E_ref;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "---\n", + "\n", + "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" + ], + "metadata": {} + } + ], + "nbformat_minor": 3, + "metadata": { + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.11.4" + }, + "kernelspec": { + "name": "julia-1.11", + "display_name": "Julia 1.11.4", + "language": "julia" + } + }, + "nbformat": 4 +} diff --git a/docs/src/examples/hubbard_su/index.md b/docs/src/examples/hubbard_su/index.md new file mode 100644 index 000000000..35873d3be --- /dev/null +++ b/docs/src/examples/hubbard_su/index.md @@ -0,0 +1,215 @@ +```@meta +EditURL = "../../../../examples/hubbard_su/main.jl" +``` + +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//hubbard_su/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//hubbard_su/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//hubbard_su) + + +# Simple update for the Fermi-Hubbard model at half-filling + +Once again, we consider the Hubbard model but this time we obtain the ground-state PEPS by +imaginary time evoluation. In particular, we'll use the [`SimpleUpdate`](@ref) algorithm. +As a reminder, we define the Hubbard model as + +```math +H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( c_{i,\sigma}^+ c_{j,\sigma}^- - +c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \mu \sum_i n_i +``` + +with $\sigma \in \{\uparrow,\downarrow\}$ and $n_{i,\sigma} = c_{i,\sigma}^+ c_{i,\sigma}^-$. + +Let's get started by seeding the RNG and importing the required modules: + +````julia +using Random +using TensorKit, PEPSKit +Random.seed!(12329348592498); +```` + +## Defining the Hamiltonian + +First, we define the Hubbard model at $t=1$ hopping and $U=6$ using `Trivial` sectors for +the particle and spin symmetries, and set $\mu = U/2$ for half-filling. The model will be +constructed on a $2 \times 2$ unit cell, so we have: + +````julia +t = 1 +U = 6 +Nr, Nc = 2, 2 +H = hubbard_model(Float64, Trivial, Trivial, InfiniteSquare(Nr, Nc); t, U, mu=U / 2); +```` + +## Running the simple update algorithm + +Next, we'll specify the virtual PEPS bond dimension and define the fermionic physical and +virtual spaces. The simple update algorithm evolves an infinite PEPS with weights on the +virtual bonds, so we here need to intialize an [`InfiniteWeightPEPS`](@ref). By default, +the bond weights will be identity. Unlike in the other examples, we here use tensors with +real `Float64` entries: + +````julia +Dbond = 8 +physical_space = Vect[fℤ₂](0 => 2, 1 => 2) +virtual_space = Vect[fℤ₂](0 => Dbond / 2, 1 => Dbond / 2) +wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, virtual_space; unitcell=(Nr, Nc)); +```` + +Before starting the simple update routine, we normalize the vertex tensors of `wpeps` by +dividing with the maximal vertex element (using the infinity norm): + +````julia +for ind in CartesianIndices(wpeps.vertices) + wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf) +end +```` + +Let's set algorithm parameters: The plan is to successively decrease the time interval of +the Trotter-Suzuki as well as the convergence tolerance such that we obtain a more accurate +result at each iteration. To run the simple update, we call [`simpleupdate`](@ref) where we +use the keyword `bipartite=false` - meaning that we use the full $2 \times 2$ unit cell +without assuming a bipartite structure. Thus, we can start evolving: + +````julia +dts = [1e-2, 1e-3, 4e-4, 1e-4] +tols = [1e-6, 1e-8, 1e-8, 1e-8] +maxiter = 20000 + +for (n, (dt, tol)) in enumerate(zip(dts, tols)) + trscheme = truncerr(1e-10) & truncdim(Dbond) + alg = SimpleUpdate(dt, tol, maxiter, trscheme) + global wpeps, = simpleupdate(wpeps, H, alg; bipartite=false) +end +```` + +```` +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1 : dt = 1e-02, weight diff = 2.355e+00, time = 19.337 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 500 : dt = 1e-02, weight diff = 3.984e-04, time = 0.018 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1000 : dt = 1e-02, weight diff = 2.866e-06, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU conv 1061 : dt = 1e-02, weight diff = 9.956e-07, time = 37.285 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1 : dt = 1e-03, weight diff = 6.070e-03, time = 0.028 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 500 : dt = 1e-03, weight diff = 1.874e-06, time = 0.018 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1000 : dt = 1e-03, weight diff = 6.437e-07, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1500 : dt = 1e-03, weight diff = 2.591e-07, time = 0.019 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 2000 : dt = 1e-03, weight diff = 1.053e-07, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 2500 : dt = 1e-03, weight diff = 4.280e-08, time = 0.017 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 3000 : dt = 1e-03, weight diff = 1.741e-08, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU conv 3309 : dt = 1e-03, weight diff = 9.983e-09, time = 52.464 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1 : dt = 4e-04, weight diff = 4.030e-04, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 500 : dt = 4e-04, weight diff = 1.776e-07, time = 0.018 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1000 : dt = 4e-04, weight diff = 7.091e-08, time = 0.018 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1500 : dt = 4e-04, weight diff = 3.997e-08, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 2000 : dt = 4e-04, weight diff = 2.622e-08, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 2500 : dt = 4e-04, weight diff = 1.796e-08, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 3000 : dt = 4e-04, weight diff = 1.245e-08, time = 0.013 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU conv 3303 : dt = 4e-04, weight diff = 9.997e-09, time = 52.091 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1 : dt = 1e-04, weight diff = 2.014e-04, time = 0.018 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 500 : dt = 1e-04, weight diff = 5.664e-08, time = 0.017 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1000 : dt = 1e-04, weight diff = 4.106e-08, time = 0.018 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 1500 : dt = 1e-04, weight diff = 3.033e-08, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 2000 : dt = 1e-04, weight diff = 2.290e-08, time = 0.019 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 2500 : dt = 1e-04, weight diff = 1.773e-08, time = 0.017 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 3000 : dt = 1e-04, weight diff = 1.410e-08, time = 0.017 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU iter 3500 : dt = 1e-04, weight diff = 1.152e-08, time = 0.014 sec +[ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) +[ Info: SU conv 3893 : dt = 1e-04, weight diff = 9.997e-09, time = 60.906 sec + +```` + +To obtain the evolved `InfiniteWeightPEPS` as an actual PEPS without weights on the bonds, +we can just call the following constructor: + +````julia +peps = InfinitePEPS(wpeps); +```` + +## Computing the ground-state energy + +In order to compute the energy expectation value with evolved PEPS, we need to converge a +CTMRG environment on it. We first converge an environment with a small enviroment dimension +and then use that to initialize another run with bigger environment dimension. We'll use +`trscheme=truncdim(χ)` for that such that the dimension is increased during the second CTMRG +run: + +````julia +χenv₀, χenv = 6, 16 +env_space = Vect[fℤ₂](0 => χenv₀ / 2, 1 => χenv₀ / 2) + +env = CTMRGEnv(rand, Float64, peps, env_space) +for χ in [χenv₀, χenv] + global env, = leading_boundary( + env, peps; alg=:sequential, tol=1e-5, trscheme=truncdim(χ) + ) +end +```` + +```` +[ Info: CTMRG init: obj = -1.024524714591e-07 err = 1.0000e+00 +┌ Warning: CTMRG cancel 100: obj = +6.005578535112e-01 err = 1.5276303328e-02 time = 33.41 sec +└ @ PEPSKit ~/repos/PEPSKit.jl/src/algorithms/ctmrg/ctmrg.jl:155 +[ Info: CTMRG init: obj = +6.005578535112e-01 err = 1.0000e+00 +[ Info: CTMRG conv 11: obj = +5.888235791615e-01 err = 8.9907750067e-06 time = 25.75 sec + +```` + +We measure the energy by computing the `H` expectation value, where we have to make sure to +normalize with respect to the unit cell to obtain the energy per site: + +````julia +E = expectation_value(peps, H, env) / (Nr * Nc) +@show E; +```` + +```` +E = -3.6333025702476567 + +```` + +Finally, we can compare the obtained ground-state energy against the literature, namely the +QMC estimates from [Qin et al.](@cite qin_benchmark_2016). We find that the results generally +agree: + +````julia +Es_exact = Dict(0 => -1.62, 2 => -0.176, 4 => 0.8603, 6 => -0.6567, 8 => -0.5243) +E_exact = Es_exact[U] - U / 2 +@show (E - E_exact) / E_exact; +```` + +```` +(E - E_exact) / E_exact = -0.006398509517418207 + +```` + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/docs/src/examples/hubbard_su/main.ipynb b/docs/src/examples/hubbard_su/main.ipynb new file mode 100644 index 000000000..fbedecbdf --- /dev/null +++ b/docs/src/examples/hubbard_su/main.ipynb @@ -0,0 +1,248 @@ +{ + "cells": [ + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Markdown #hide" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "# Simple update for the Fermi-Hubbard model at half-filling\n", + "\n", + "Once again, we consider the Hubbard model but this time we obtain the ground-state PEPS by\n", + "imaginary time evoluation. In particular, we'll use the `SimpleUpdate` algorithm.\n", + "As a reminder, we define the Hubbard model as\n", + "\n", + "$$\n", + "H = -t \\sum_{\\langle i,j \\rangle} \\sum_{\\sigma} \\left( c_{i,\\sigma}^+ c_{j,\\sigma}^- -\n", + "c_{i,\\sigma}^- c_{j,\\sigma}^+ \\right) + U \\sum_i n_{i,\\uparrow}n_{i,\\downarrow} - \\mu \\sum_i n_i\n", + "$$\n", + "\n", + "with $\\sigma \\in \\{\\uparrow,\\downarrow\\}$ and $n_{i,\\sigma} = c_{i,\\sigma}^+ c_{i,\\sigma}^-$.\n", + "\n", + "Let's get started by seeding the RNG and importing the required modules:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Random\n", + "using TensorKit, PEPSKit\n", + "Random.seed!(12329348592498);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Defining the Hamiltonian\n", + "\n", + "First, we define the Hubbard model at $t=1$ hopping and $U=6$ using `Trivial` sectors for\n", + "the particle and spin symmetries, and set $\\mu = U/2$ for half-filling. The model will be\n", + "constructed on a $2 \\times 2$ unit cell, so we have:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "t = 1\n", + "U = 6\n", + "Nr, Nc = 2, 2\n", + "H = hubbard_model(Float64, Trivial, Trivial, InfiniteSquare(Nr, Nc); t, U, mu=U / 2);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Running the simple update algorithm\n", + "\n", + "Next, we'll specify the virtual PEPS bond dimension and define the fermionic physical and\n", + "virtual spaces. The simple update algorithm evolves an infinite PEPS with weights on the\n", + "virtual bonds, so we here need to intialize an `InfiniteWeightPEPS`. By default,\n", + "the bond weights will be identity. Unlike in the other examples, we here use tensors with\n", + "real `Float64` entries:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "Dbond = 8\n", + "physical_space = Vect[fℤ₂](0 => 2, 1 => 2)\n", + "virtual_space = Vect[fℤ₂](0 => Dbond / 2, 1 => Dbond / 2)\n", + "wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, virtual_space; unitcell=(Nr, Nc));" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Before starting the simple update routine, we normalize the vertex tensors of `wpeps` by\n", + "dividing with the maximal vertex element (using the infinity norm):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "for ind in CartesianIndices(wpeps.vertices)\n", + " wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf)\n", + "end" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Let's set algorithm parameters: The plan is to successively decrease the time interval of\n", + "the Trotter-Suzuki as well as the convergence tolerance such that we obtain a more accurate\n", + "result at each iteration. To run the simple update, we call `simpleupdate` where we\n", + "use the keyword `bipartite=false` - meaning that we use the full $2 \\times 2$ unit cell\n", + "without assuming a bipartite structure. Thus, we can start evolving:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "dts = [1e-2, 1e-3, 4e-4, 1e-4]\n", + "tols = [1e-6, 1e-8, 1e-8, 1e-8]\n", + "maxiter = 20000\n", + "\n", + "for (n, (dt, tol)) in enumerate(zip(dts, tols))\n", + " trscheme = truncerr(1e-10) & truncdim(Dbond)\n", + " alg = SimpleUpdate(dt, tol, maxiter, trscheme)\n", + " global wpeps, = simpleupdate(wpeps, H, alg; bipartite=false)\n", + "end" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "To obtain the evolved `InfiniteWeightPEPS` as an actual PEPS without weights on the bonds,\n", + "we can just call the following constructor:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "peps = InfinitePEPS(wpeps);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Computing the ground-state energy\n", + "\n", + "In order to compute the energy expectation value with evolved PEPS, we need to converge a\n", + "CTMRG environment on it. We first converge an environment with a small enviroment dimension\n", + "and then use that to initialize another run with bigger environment dimension. We'll use\n", + "`trscheme=truncdim(χ)` for that such that the dimension is increased during the second CTMRG\n", + "run:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "χenv₀, χenv = 6, 16\n", + "env_space = Vect[fℤ₂](0 => χenv₀ / 2, 1 => χenv₀ / 2)\n", + "\n", + "env = CTMRGEnv(rand, Float64, peps, env_space)\n", + "for χ in [χenv₀, χenv]\n", + " global env, = leading_boundary(\n", + " env, peps; alg=:sequential, tol=1e-5, trscheme=truncdim(χ)\n", + " )\n", + "end" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "We measure the energy by computing the `H` expectation value, where we have to make sure to\n", + "normalize with respect to the unit cell to obtain the energy per site:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "E = expectation_value(peps, H, env) / (Nr * Nc)\n", + "@show E;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Finally, we can compare the obtained ground-state energy against the literature, namely the\n", + "QMC estimates from [Qin et al.](@cite qin_benchmark_2016). We find that the results generally\n", + "agree:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "Es_exact = Dict(0 => -1.62, 2 => -0.176, 4 => 0.8603, 6 => -0.6567, 8 => -0.5243)\n", + "E_exact = Es_exact[U] - U / 2\n", + "@show (E - E_exact) / E_exact;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "---\n", + "\n", + "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" + ], + "metadata": {} + } + ], + "nbformat_minor": 3, + "metadata": { + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.11.4" + }, + "kernelspec": { + "name": "julia-1.11", + "display_name": "Julia 1.11.4", + "language": "julia" + } + }, + "nbformat": 4 +} diff --git a/docs/src/examples/xxz/index.md b/docs/src/examples/xxz/index.md new file mode 100644 index 000000000..89b26d097 --- /dev/null +++ b/docs/src/examples/xxz/index.md @@ -0,0 +1,226 @@ +```@meta +EditURL = "../../../../examples/xxz/main.jl" +``` + +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//xxz/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//xxz/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//xxz) + + +# Néel order in the $U(1)$-symmetric XXZ model + +Here, we want to look at a special case of the Heisenberg model, where the $x$ and $y$ +couplings are equal, called the XXZ model + +```math +H_0 = J \big(\sum_{\langle i, j \rangle} S_i^x S_j^x + S_i^y S_j^y + \Delta S_i^z S_j^z \big) . +``` + +For appropriate $\Delta$, the model enters an antiferromagnetic phase (Néel order) which we +will force by adding staggered magnetic charges to ``H_0``. Furthermore, since the XXZ +Hamiltonian obeys a $U(1)$ symmetry, we will make use of that and work with $U(1)$-symmetric +PEPS and CTMRG environments. For simplicity, we will consider spin-$1/2$ operators. + +But first, let's make this example deterministic and import the required packages: + +````julia +using Random +using TensorKit, PEPSKit +using MPSKit: add_physical_charge +Random.seed!(2928528935); +```` + +## Constructing the model + +Let us define the $U(1)$-symmetric XXZ Hamiltonian on a $2 \times 2$ unit cell with the +parameters: + +````julia +J = 1.0 +Delta = 1.0 +spin = 1//2 +symmetry = U1Irrep +lattice = InfiniteSquare(2, 2) +H₀ = heisenberg_XXZ(ComplexF64, symmetry, lattice; J, Delta, spin); +```` + +This ensures that our PEPS ansatz can support the bipartite Néel order. As discussed above, +we encode the Néel order directly in the ansatz by adding staggered auxiliary physical +charges: + +````julia +S_aux = [ + U1Irrep(-1//2) U1Irrep(1//2) + U1Irrep(1//2) U1Irrep(-1//2) +] +H = add_physical_charge(H₀, S_aux); +```` + +## Specifying the symmetric virtual spaces + +Before we create an initial PEPS and CTM environment, we need to think about which +symmetric spaces we need to construct. Since we want to exploit the global $U(1)$ symmetry +of the model, we will use TensorKit's `U1Space`s where we specify dimensions for each +symmetry sector. From the virtual spaces, we will need to construct a unit cell (a matrix) +of spaces which will be supplied to the PEPS constructor. The same is true for the physical +spaces, which can be extracted directly from the Hamiltonian `LocalOperator`: + +````julia +V_peps = U1Space(0 => 2, 1 => 1, -1 => 1) +V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2) +virtual_spaces = fill(V_peps, size(lattice)...) +physical_spaces = H.lattice +```` + +```` +2×2 Matrix{TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}}: + Rep[TensorKitSectors.U₁](0=>1, -1=>1) Rep[TensorKitSectors.U₁](0=>1, 1=>1) + Rep[TensorKitSectors.U₁](0=>1, 1=>1) Rep[TensorKitSectors.U₁](0=>1, -1=>1) +```` + +## Ground state search + +From this point onwards it's business as usual: Create an initial PEPS and environment +(using the symmetric spaces), specify the algorithmic parameters and optimize: + +````julia +boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace)) +gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge) +optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=85, ls_maxiter=3, ls_maxfg=3) + +peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) +env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); +```` + +```` +[ Info: CTMRG init: obj = -1.121020187593e+04 -6.991066478499e+03im err = 1.0000e+00 +[ Info: CTMRG conv 26: obj = +6.369731502336e+03 -8.500546755386e-08im err = 7.5599921139e-09 time = 8.69 sec + +```` + +Finally, we can optimize the PEPS with respect to the XXZ Hamiltonian. Note that the +optimization might take a while since precompilation of symmetric AD code takes longer and +because symmetric tensors do create a bit of overhead (which does pay off at larger bond +and environment dimensions): + +````julia +peps, env, E, info = fixedpoint( + H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3 +) +@show E; +```` + +```` +[ Info: LBFGS: initializing with f = -0.033045967451, ‖∇f‖ = 3.2952e-01 +┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Float64}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 +┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: +│ α = 2.50e+01, dϕ = -9.90e-03, ϕ - ϕ₀ = -1.53e-01 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 1, time 808.38 s: f = -0.185750019542, ‖∇f‖ = 1.8647e+00, α = 2.50e+01, m = 0, nfg = 4 +┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; +│ this fallback will disappear in future versions of VectorInterface.jl +└ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 +┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: +│ α = 2.50e+01, dϕ = -1.84e-03, ϕ - ϕ₀ = -3.93e-01 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 +[ Info: LBFGS: iter 2, time 857.60 s: f = -0.579230108476, ‖∇f‖ = 5.7732e-01, α = 2.50e+01, m = 0, nfg = 4 +[ Info: LBFGS: iter 3, time 868.75 s: f = -0.613445426304, ‖∇f‖ = 3.3947e-01, α = 1.00e+00, m = 1, nfg = 1 +[ Info: LBFGS: iter 4, time 880.15 s: f = -0.638685295144, ‖∇f‖ = 2.2104e-01, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 5, time 891.56 s: f = -0.650336962208, ‖∇f‖ = 1.9524e-01, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 6, time 902.39 s: f = -0.654880752783, ‖∇f‖ = 7.1842e-02, α = 1.00e+00, m = 4, nfg = 1 +[ Info: LBFGS: iter 7, time 912.20 s: f = -0.656075650331, ‖∇f‖ = 5.2129e-02, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 8, time 922.70 s: f = -0.659041890147, ‖∇f‖ = 5.3917e-02, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 9, time 933.30 s: f = -0.660552875456, ‖∇f‖ = 9.6848e-02, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 10, time 943.09 s: f = -0.662163341463, ‖∇f‖ = 2.9524e-02, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 11, time 953.68 s: f = -0.662506513828, ‖∇f‖ = 2.1440e-02, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 12, time 964.33 s: f = -0.662847746095, ‖∇f‖ = 2.0917e-02, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 13, time 974.26 s: f = -0.663230218002, ‖∇f‖ = 2.5387e-02, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 14, time 980.64 s: f = -0.663678142653, ‖∇f‖ = 2.2924e-02, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 15, time 987.02 s: f = -0.664034475269, ‖∇f‖ = 2.1574e-02, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 16, time 997.52 s: f = -0.664687988771, ‖∇f‖ = 2.7632e-02, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 17, time 1020.76 s: f = -0.664947633065, ‖∇f‖ = 3.2552e-02, α = 4.47e-01, m = 15, nfg = 2 +[ Info: LBFGS: iter 18, time 1031.65 s: f = -0.665379251393, ‖∇f‖ = 2.5817e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 19, time 1043.13 s: f = -0.665603907305, ‖∇f‖ = 2.4951e-02, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 20, time 1054.48 s: f = -0.665762559605, ‖∇f‖ = 1.5130e-02, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 21, time 1065.68 s: f = -0.666003995146, ‖∇f‖ = 1.6565e-02, α = 1.00e+00, m = 19, nfg = 1 +[ Info: LBFGS: iter 22, time 1076.34 s: f = -0.666347181648, ‖∇f‖ = 2.3025e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 23, time 1088.47 s: f = -0.666599630335, ‖∇f‖ = 2.3462e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 24, time 1100.74 s: f = -0.666793651525, ‖∇f‖ = 2.1908e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 25, time 1112.91 s: f = -0.666949601577, ‖∇f‖ = 1.0867e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 26, time 1125.12 s: f = -0.667058133735, ‖∇f‖ = 1.2475e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 27, time 1136.45 s: f = -0.667165497296, ‖∇f‖ = 1.4340e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 28, time 1147.86 s: f = -0.667263554939, ‖∇f‖ = 1.5667e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 29, time 1159.14 s: f = -0.667357062063, ‖∇f‖ = 8.8494e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 30, time 1170.29 s: f = -0.667450569240, ‖∇f‖ = 1.1496e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 31, time 1182.11 s: f = -0.667569394671, ‖∇f‖ = 1.3976e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 32, time 1194.13 s: f = -0.667657944766, ‖∇f‖ = 2.2321e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 33, time 1205.47 s: f = -0.667799360459, ‖∇f‖ = 8.7543e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 34, time 1217.47 s: f = -0.667852887856, ‖∇f‖ = 6.6668e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 35, time 1229.64 s: f = -0.667926685233, ‖∇f‖ = 1.1902e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 36, time 1242.59 s: f = -0.667979135052, ‖∇f‖ = 1.6349e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 37, time 1249.99 s: f = -0.668039789983, ‖∇f‖ = 9.3108e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 38, time 1261.95 s: f = -0.668087921855, ‖∇f‖ = 5.4669e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 39, time 1274.08 s: f = -0.668109250700, ‖∇f‖ = 6.6628e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 40, time 1281.58 s: f = -0.668159589044, ‖∇f‖ = 9.3986e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 41, time 1288.46 s: f = -0.668230776691, ‖∇f‖ = 1.1534e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 42, time 1300.78 s: f = -0.668277979949, ‖∇f‖ = 1.0707e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 43, time 1313.19 s: f = -0.668314491012, ‖∇f‖ = 4.4476e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 44, time 1325.48 s: f = -0.668333048195, ‖∇f‖ = 5.0062e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 45, time 1337.91 s: f = -0.668357479998, ‖∇f‖ = 7.1015e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 46, time 1349.38 s: f = -0.668412792965, ‖∇f‖ = 9.9323e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 47, time 1373.92 s: f = -0.668439289699, ‖∇f‖ = 1.1349e-02, α = 4.53e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 48, time 1386.29 s: f = -0.668482319738, ‖∇f‖ = 6.5163e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 49, time 1398.51 s: f = -0.668507687742, ‖∇f‖ = 3.4077e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 50, time 1409.94 s: f = -0.668523331148, ‖∇f‖ = 4.4119e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 51, time 1422.07 s: f = -0.668544159952, ‖∇f‖ = 6.8178e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 52, time 1434.33 s: f = -0.668572411228, ‖∇f‖ = 8.9225e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 53, time 1447.43 s: f = -0.668603530102, ‖∇f‖ = 5.4599e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 54, time 1460.33 s: f = -0.668626672236, ‖∇f‖ = 3.2841e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 55, time 1471.90 s: f = -0.668639698673, ‖∇f‖ = 4.2163e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 56, time 1484.21 s: f = -0.668655954756, ‖∇f‖ = 5.4299e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 57, time 1496.56 s: f = -0.668673395222, ‖∇f‖ = 5.4970e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 58, time 1508.06 s: f = -0.668687854178, ‖∇f‖ = 3.7476e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 59, time 1520.29 s: f = -0.668698487673, ‖∇f‖ = 3.3854e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 60, time 1532.55 s: f = -0.668705111514, ‖∇f‖ = 3.8959e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 61, time 1545.51 s: f = -0.668720251413, ‖∇f‖ = 4.7426e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 62, time 1557.82 s: f = -0.668726232684, ‖∇f‖ = 7.2528e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 63, time 1570.65 s: f = -0.668739847818, ‖∇f‖ = 2.5815e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 64, time 1583.68 s: f = -0.668746591101, ‖∇f‖ = 2.1675e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 65, time 1595.79 s: f = -0.668754620918, ‖∇f‖ = 3.0368e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 66, time 1608.17 s: f = -0.668767041464, ‖∇f‖ = 3.2464e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 67, time 1633.44 s: f = -0.668775239596, ‖∇f‖ = 4.1610e-03, α = 4.24e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 68, time 1646.37 s: f = -0.668784522482, ‖∇f‖ = 2.0585e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 69, time 1658.66 s: f = -0.668792875861, ‖∇f‖ = 2.5737e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 70, time 1671.00 s: f = -0.668799555353, ‖∇f‖ = 3.0991e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 71, time 1683.96 s: f = -0.668807510786, ‖∇f‖ = 3.9740e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 72, time 1697.16 s: f = -0.668815529198, ‖∇f‖ = 2.8312e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 73, time 1709.35 s: f = -0.668820072176, ‖∇f‖ = 1.8277e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 74, time 1722.17 s: f = -0.668823045663, ‖∇f‖ = 2.1189e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 75, time 1735.22 s: f = -0.668829224417, ‖∇f‖ = 3.3000e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 76, time 1748.24 s: f = -0.668834661996, ‖∇f‖ = 3.3841e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 77, time 1761.10 s: f = -0.668839125190, ‖∇f‖ = 1.5494e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 78, time 1774.64 s: f = -0.668842178047, ‖∇f‖ = 1.8074e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 79, time 1788.22 s: f = -0.668846182434, ‖∇f‖ = 2.1704e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 80, time 1801.30 s: f = -0.668849851199, ‖∇f‖ = 4.3895e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 81, time 1814.28 s: f = -0.668854730352, ‖∇f‖ = 1.9014e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 82, time 1827.19 s: f = -0.668857445978, ‖∇f‖ = 1.6213e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 83, time 1840.79 s: f = -0.668861083091, ‖∇f‖ = 2.1544e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 84, time 1853.61 s: f = -0.668865914837, ‖∇f‖ = 2.4867e-03, α = 1.00e+00, m = 20, nfg = 1 +┌ Warning: LBFGS: not converged to requested tol after 85 iterations and time 1866.53 s: f = -0.668869945971, ‖∇f‖ = 4.5125e-03 +└ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/lbfgs.jl:197 +E = -0.6688699459708735 + +```` + +Note that for the specified parameters $J=\Delta=1$, we simulated the same Hamiltonian as +in the [Heisenberg example](@ref examples_heisenberg). In that example, with a non-symmetric +$D=2$ PEPS simulation, we reached a ground-state energy of around $E_\text{D=2} = -0.6625\dots$. +Again comparing against [Sandvik's](@cite sandvik_computational_2011) accurate QMC estimate +``E_{\text{ref}}=−0.6694421``, we see that we already got closer to the reference energy. + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/docs/src/examples/xxz/main.ipynb b/docs/src/examples/xxz/main.ipynb new file mode 100644 index 000000000..7f6e66329 --- /dev/null +++ b/docs/src/examples/xxz/main.ipynb @@ -0,0 +1,199 @@ +{ + "cells": [ + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Markdown #hide" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "# Néel order in the $U(1)$-symmetric XXZ model\n", + "\n", + "Here, we want to look at a special case of the Heisenberg model, where the $x$ and $y$\n", + "couplings are equal, called the XXZ model\n", + "\n", + "$$\n", + "H_0 = J \\big(\\sum_{\\langle i, j \\rangle} S_i^x S_j^x + S_i^y S_j^y + \\Delta S_i^z S_j^z \\big) .\n", + "$$\n", + "\n", + "For appropriate $\\Delta$, the model enters an antiferromagnetic phase (Néel order) which we\n", + "will force by adding staggered magnetic charges to $H_0$. Furthermore, since the XXZ\n", + "Hamiltonian obeys a $U(1)$ symmetry, we will make use of that and work with $U(1)$-symmetric\n", + "PEPS and CTMRG environments. For simplicity, we will consider spin-$1/2$ operators.\n", + "\n", + "But first, let's make this example deterministic and import the required packages:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "using Random\n", + "using TensorKit, PEPSKit\n", + "using MPSKit: add_physical_charge\n", + "Random.seed!(2928528935);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Constructing the model\n", + "\n", + "Let us define the $U(1)$-symmetric XXZ Hamiltonian on a $2 \\times 2$ unit cell with the\n", + "parameters:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "J = 1.0\n", + "Delta = 1.0\n", + "spin = 1//2\n", + "symmetry = U1Irrep\n", + "lattice = InfiniteSquare(2, 2)\n", + "H₀ = heisenberg_XXZ(ComplexF64, symmetry, lattice; J, Delta, spin);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "This ensures that our PEPS ansatz can support the bipartite Néel order. As discussed above,\n", + "we encode the Néel order directly in the ansatz by adding staggered auxiliary physical\n", + "charges:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "S_aux = [\n", + " U1Irrep(-1//2) U1Irrep(1//2)\n", + " U1Irrep(1//2) U1Irrep(-1//2)\n", + "]\n", + "H = add_physical_charge(H₀, S_aux);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Specifying the symmetric virtual spaces\n", + "\n", + "Before we create an initial PEPS and CTM environment, we need to think about which\n", + "symmetric spaces we need to construct. Since we want to exploit the global $U(1)$ symmetry\n", + "of the model, we will use TensorKit's `U1Space`s where we specify dimensions for each\n", + "symmetry sector. From the virtual spaces, we will need to construct a unit cell (a matrix)\n", + "of spaces which will be supplied to the PEPS constructor. The same is true for the physical\n", + "spaces, which can be extracted directly from the Hamiltonian `LocalOperator`:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "V_peps = U1Space(0 => 2, 1 => 1, -1 => 1)\n", + "V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2)\n", + "virtual_spaces = fill(V_peps, size(lattice)...)\n", + "physical_spaces = H.lattice" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "## Ground state search\n", + "\n", + "From this point onwards it's business as usual: Create an initial PEPS and environment\n", + "(using the symmetric spaces), specify the algorithmic parameters and optimize:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "boundary_alg = (; tol=1e-8, alg=:simultaneous, trscheme=(; alg=:fixedspace))\n", + "gradient_alg = (; tol=1e-6, alg=:eigsolver, maxiter=10, iterscheme=:diffgauge)\n", + "optimizer_alg = (; tol=1e-4, alg=:lbfgs, maxiter=85, ls_maxiter=3, ls_maxfg=3)\n", + "\n", + "peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces)\n", + "env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Finally, we can optimize the PEPS with respect to the XXZ Hamiltonian. Note that the\n", + "optimization might take a while since precompilation of symmetric AD code takes longer and\n", + "because symmetric tensors do create a bit of overhead (which does pay off at larger bond\n", + "and environment dimensions):" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ + "peps, env, E, info = fixedpoint(\n", + " H, peps₀, env₀; boundary_alg, gradient_alg, optimizer_alg, verbosity=3\n", + ")\n", + "@show E;" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Note that for the specified parameters $J=\\Delta=1$, we simulated the same Hamiltonian as\n", + "in the Heisenberg example. In that example, with a non-symmetric\n", + "$D=2$ PEPS simulation, we reached a ground-state energy of around $E_\\text{D=2} = -0.6625\\dots$.\n", + "Again comparing against [Sandvik's](@cite sandvik_computational_2011) accurate QMC estimate\n", + "$E_{\\text{ref}}=−0.6694421$, we see that we already got closer to the reference energy." + ], + "metadata": {} + }, + { + "cell_type": "markdown", + "source": [ + "---\n", + "\n", + "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" + ], + "metadata": {} + } + ], + "nbformat_minor": 3, + "metadata": { + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.11.4" + }, + "kernelspec": { + "name": "julia-1.11", + "display_name": "Julia 1.11.4", + "language": "julia" + } + }, + "nbformat": 4 +} diff --git a/examples/Cache.toml b/examples/Cache.toml index cdf97651b..23f342756 100644 --- a/examples/Cache.toml +++ b/examples/Cache.toml @@ -1,5 +1,10 @@ ["./"] bose_hubbard = "2d25bbc749632d5e194c8405e1309f37af8e7d5d680eed393fa2cf975f6d0619" +hubbard_su = "27bb6bc05ae104080e6048f9f1ae84b086bea034b794d7997baf6da9e2d2f257" 2d_ising_partition_function = "acafb9139119ccc89fb928b18c55ea9e827f676a737e34a84850666f8ca35702" 3d_ising_partition_function = "55e6501df7b73ea3ee8030e78b46ab24261e337354dfa2a74dbc77638b9bba9c" boundary_mps = "fd8f0378c5261ae37b8d3862fb28a0b7f2697cbaf5c65f4e768bf95720683e8d" +heisenberg_su = "27d48d1b9dfbc600c3cfa829f3bb5708f21e95ea92da2930afdf6973fb3bcaec" +xxz = "8319d9b985dcf48b5bcdf992b44923a5f8fe8fc7e83be3d55eeddfe07048fb03" +fermi_hubbard = "958a68a2395a3fae6aaee4b1b3376c3b47a28609ecb29257b778b8b83c937316" +heisenberg = "65ccc80fefe009ef3a626e497e3d054fbc1a8f92d40cef3cb8a5bf6254a6a57f" From 2867fbef0af2649544093b302a633f6b0e8b3e88 Mon Sep 17 00:00:00 2001 From: Lukas Devos Date: Tue, 29 Apr 2025 09:42:37 -0400 Subject: [PATCH 077/113] Improve sidebar for examples --- docs/make.jl | 19 ++++++++++++++++++- docs/src/examples/index.md | 37 +++++++++++++++++++++++++------------ 2 files changed, 43 insertions(+), 13 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 4bcfe1a39..a6dcbbeaf 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -40,6 +40,16 @@ mathengine = MathJax3( ), ) +# examples pages +examples_optimization = + joinpath.(["heisenberg", "bose_hubbard", "xxz", "fermi_hubbard"], Ref("index.md")) +examples_time_evolution = joinpath.(["heisenberg_su", "hubbard_su"], Ref("index.md")) +examples_partition_functions = + joinpath.( + ["2d_ising_partition_function", "3d_ising_partition_function"], Ref("index.md") + ) +examples_boundary_mps = joinpath.(["boundary_mps"], Ref("index.md")) + makedocs(; modules=[PEPSKit, MPSKitModels], sitename="PEPSKit.jl", @@ -58,7 +68,14 @@ makedocs(; "man/multithreading.md", "man/precompilation.md", ], - "Examples" => "examples/index.md", + "Examples" => [ + "examples/index.md", + "Optimization" => joinpath.(Ref("examples"), examples_optimization), + "Time Evolution" => joinpath.(Ref("examples"), examples_time_evolution), + "Partition Functions" => + joinpath.(Ref("examples"), examples_partition_functions), + "Boundary MPS" => joinpath.(Ref("examples"), examples_boundary_mps), + ], "Library" => "lib/lib.md", "References" => "references.md", ], diff --git a/docs/src/examples/index.md b/docs/src/examples/index.md index 6dee91b49..b861541c9 100644 --- a/docs/src/examples/index.md +++ b/docs/src/examples/index.md @@ -1,18 +1,31 @@ -# Examples +# Overview Here we provide a number of commented example pages that serve as short tutorials on how to use PEPSKit in various situations. Applications span from two-dimensional quantum models, including fermionic Hamiltonians, to classical three-dimensional statistical mechanics: +## Optimization + +```@contents +Pages = Main.examples_optimization +Depth = 1 +``` + +## Time Evolution + +```@contents +Pages = Main.examples_time_evolution +Depth = 1 +``` + +## Partition Functions + +```@contents +Pages = Main.examples_partition_functions +Depth = 1 +``` + +## Boundary MPS + ```@contents -Pages = [ - "heisenberg/index.md", - "bose_hubbard/index.md", - "xxz/index.md", - "fermi_hubbard/index.md", - "heisenberg_su/index.md", - "hubbard_su/index.md", - "2d_ising_partition_function/index.md", - "3d_ising_partition_function/index.md", - "boundary_mps/index.md", -] +Pages = Main.examples_boundary_mps Depth = 1 ``` From e45264d0af1188b1c6d6ddb0ba2e231529c3a71c Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Wed, 30 Apr 2025 11:53:44 +0200 Subject: [PATCH 078/113] Rename `LocalOperator` to `PEPSKit.LocalOperator` in models.md --- docs/src/man/models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/man/models.md b/docs/src/man/models.md index 63c706f43..465ceb2c1 100644 --- a/docs/src/man/models.md +++ b/docs/src/man/models.md @@ -1,6 +1,6 @@ # Models -PEPSKit implements physical models through the [MPSKitModels.jl](https://quantumkithub.github.io/MPSKitModels.jl/dev/) package as [`LocalOperator`](@ref) structs. +PEPSKit implements physical models through the [MPSKitModels.jl](https://quantumkithub.github.io/MPSKitModels.jl/dev/) package as [`PEPSKit.LocalOperator`](@ref) structs. Here, we want to explain how users can define their own Hamiltonians and provide a list of already implemented models. From dde71c47df0c6137150979d24fdbcd8bb0876f2a Mon Sep 17 00:00:00 2001 From: leburgel Date: Wed, 30 Apr 2025 21:49:36 +0200 Subject: [PATCH 079/113] Edit partition function and boundary MPS examples --- docs/src/assets/pepskit.bib | 11 + .../2d_ising_partition_function/index.md | 75 +++-- .../2d_ising_partition_function/main.ipynb | 58 ++-- .../3d_ising_partition_function/index.md | 240 +++++++------- .../3d_ising_partition_function/main.ipynb | 84 ++--- docs/src/examples/bose_hubbard/index.md | 312 +++++++++--------- docs/src/examples/bose_hubbard/main.ipynb | 6 +- docs/src/examples/boundary_mps/index.md | 119 ++++--- docs/src/examples/boundary_mps/main.ipynb | 114 ++++--- examples/2d_ising_partition_function/main.jl | 52 +-- examples/3d_ising_partition_function/main.jl | 80 ++--- examples/Cache.toml | 8 +- examples/boundary_mps/main.jl | 91 ++--- examples/heisenberg/main.jl | 2 +- 14 files changed, 670 insertions(+), 582 deletions(-) diff --git a/docs/src/assets/pepskit.bib b/docs/src/assets/pepskit.bib index 528317809..7ddd43a77 100644 --- a/docs/src/assets/pepskit.bib +++ b/docs/src/assets/pepskit.bib @@ -123,3 +123,14 @@ @article{hasenbusch_monte_2001 URL = {https://doi.org/10.1142/S0129183101002383}, eprint = {https://doi.org/10.1142/S0129183101002383}, } + +@article{vanderstraeten_variational_2021, + title = {Variational Contractions of Projected Entangled-Pair States}, + author = {Vanderstraeten, Laurens and Burgelman, Lander and Ponsioen, Boris and Van Damme, Maarten and Vanhecke, Bram and Corboz, Philippe and Haegeman, Jutho and Verstraete, Frank}, + year = {2021}, + month = oct, + journal = {arXiv:2110.12726}, + eprint = {2110.12726}, + archiveprefix = {arXiv}, + keywords = {Condensed Matter - Strongly Correlated Electrons,Quantum Physics} +} diff --git a/docs/src/examples/2d_ising_partition_function/index.md b/docs/src/examples/2d_ising_partition_function/index.md index 42ab7d320..e0fdda008 100644 --- a/docs/src/examples/2d_ising_partition_function/index.md +++ b/docs/src/examples/2d_ising_partition_function/index.md @@ -7,19 +7,22 @@ EditURL = "../../../../examples/2d_ising_partition_function/main.jl" [![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//2d_ising_partition_function) -# 2D classical Ising partition function using CTMRG +# The 2D classical Ising model using CTMRG All previous examples dealt with quantum systems, describing their states by `InfinitePEPS` -that can be contracted using CTMRG or VUMPS techniques. Here, we shift our focus towards -classical physics and consider the 2D classical Ising model with the partition function +that can be contracted using CTMRG or [boundary MPS techniques](@ref e_boundary_mps). Here, +we shift our focus towards classical physics and consider the 2D classical Ising model with +the partition function ```math \mathcal{Z}(\beta) = \sum_{\{s\}} \exp(-\beta H(s)) \text{ with } H(s) = -J \sum_{\langle i, j \rangle} s_i s_j . ``` -The idea is to encode the partition function into an infinite square lattice of rank-4 -tensors which can then be contracted using CTMRG. These rank-4 tensors are represented by -[`InfinitePartitionFunction`](@ref) states, as we will see. +where the classical spins $s_i \in \{+1, -1\}$ are located on the vertices $i$ of a 2D +square lattice. The idea is to encode the partition function as an infinite square network +consisting of local rank-4 tensors, which can then be contracted using CTMRG. An infinite +square network of these rank-4 tensors can be represented as an +[`InfinitePartitionFunction`](@ref) object, as we will see. But first, let's seed the RNG and import all required modules: @@ -30,18 +33,19 @@ using QuadGK Random.seed!(234923); ```` -```` -Precompiling QuadGK... - 656.5 ms ✓ QuadGK - 1 dependency successfully precompiled in 1 seconds. 12 already precompiled. - -```` - ## Defining the partition function The first step is to define the rank-4 tensor that, when contracted on a square lattice, -evaluates to the partition function value at a given $\beta$. Since we later want to compute -the magnetization and energy, we define the appropriate rank-4 tensors as well: +evaluates to the partition function value at a given $\beta$. This is done through a +[fairly generic procedure](@cite haegeman_diagonalizing_2017) where the interaction weights +are distributed among vertex tensors in an appropriate way. Concretely, here we first define +a 'link' matrix containing the Boltzmann weights associated to all possible spin +configurations across a given link on the lattice. Next, we define site tensors as +delta-tensors that ensiure that the spin value on all adjacent links is the same. Since we +only want tensors on the sites in the end, we can symmetrically absorb the link weight +tensors into the site tensors, which gives us exactly the kind of network we're looking for. +Since we later want to compute the magnetization and energy to check our results, we define +the appropriate rank-4 tensors here as well while we're at it. ````julia function classical_ising(; beta=log(1 + sqrt(2)) / 2, J=1.0) @@ -78,12 +82,13 @@ function classical_ising(; beta=log(1 + sqrt(2)) / 2, J=1.0) end; ```` -So let's initialize these tensors at inverse temperature ``\beta=0.6`` and construct the -corresponding `InfinitePartitionFunction`: +So let's initialize these tensors at inverse temperature ``\beta=0.6``, check that +they are indeed rank-4 and construct the corresponding `InfinitePartitionFunction`: ````julia beta = 0.6 O, M, E = classical_ising(; beta) +@show space(O) Z = InfinitePartitionFunction(O) ```` @@ -110,24 +115,25 @@ InfinitePartitionFunction{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace ## Contracting the partition function Next, we can contract the partition function as per usual by constructing a `CTMRGEnv` with -a specified environment dimension (or space) and calling `leading_boundary` with appropriate +a specified environment virtual space and calling `leading_boundary` with appropriate settings: ````julia -χenv = 20 -env₀ = CTMRGEnv(Z, χenv) +Venv = ℂ^20 +env₀ = CTMRGEnv(Z, Venv) env, = leading_boundary(env₀, Z; tol=1e-8, maxiter=500); ```` ```` -[ Info: CTMRG init: obj = +1.784252138312e+00 -1.557258880375e+00im err = 1.0000e+00 -[ Info: CTMRG conv 63: obj = +3.353928644031e+00 err = 4.5903314811e-09 time = 6.45 sec +[ Info: CTMRG init: obj = +1.767587313024e+00 -1.536527975696e+00im err = 1.0000e+00 +[ Info: CTMRG conv 62: obj = +3.353928644031e+00 err = 4.7636155793e-09 time = 6.03 sec ```` Note that CTMRG environments for partition functions differ from the PEPS environments only -by the edge tensors - instead of two legs connecting the edges and the PEPS-PEPS sandwich, -there is only one leg connecting the edges and the partition function tensor: +by the edge tensors. Instead of two legs connecting the edges and the PEPS-PEPS sandwich, +there is only one leg connecting the edges and the partition function tensor, meaning that +the edge tensors are now rank-3: ````julia space.(env.edges) @@ -145,7 +151,7 @@ space.(env.edges) To compute the value of the partition function, we have to contract `Z` with the converged environment using [`network_value`](@ref). Additionally, we will compute the magnetization and energy (per site), again using [`expectation_value`](@ref) but this time also specifying -the index in the unit cell, where we want to insert the local tensor: +the index in the unit cell where we want to insert the local tensor: ````julia λ = network_value(Z, env) @@ -155,18 +161,19 @@ e = expectation_value(Z, (1, 1) => E, env) ```` ```` -λ = 3.3539286440313782 - 5.873212040152551e-16im -m = 0.9736086674403001 + 1.8262157316829647e-17im -e = -1.8637796145082437 - 1.4609725853463717e-16im +λ = 3.3539286440313765 - 3.486341495761219e-16im +m = 0.9736086674403004 + 7.16942808669034e-17im +e = -1.8637796145082448 + 0.0im ```` ## Comparing against the exact Onsager solution In order to assess our results, we will compare against the -[exact Onsager solution](https://en.wikipedia.org/wiki/Square_lattice_Ising_model#Exact_solution). -To that end, we compute the exact free energy, magnetization and energy per site (where -`quadgk` performs the integral from $0$ to $\pi/2$): +[exact Onsager solution](https://en.wikipedia.org/wiki/Square_lattice_Ising_model#Exact_solution) +of the 2D classical Ising model. To that end, we compute the exact free energy, +magnetization and energy per site (where we use `quadgk` to perform integrals of an +auxiliary variable from $0$ to $\pi/2$): ````julia function classical_ising_exact(; beta=log(1 + sqrt(2)) / 2, J=1.0) @@ -200,9 +207,9 @@ extrapolation): ```` ```` -(-(log(λ)) / beta - f_exact) / f_exact = -6.605563039765528e-16 - 1.447068124555315e-16im -(abs(m) - abs(m_exact)) / abs(m_exact) = -4.561270094458082e-16 -(e - e_exact) / e_exact = -0.023732068099090543 + 7.652732508485748e-17im +(-(log(λ)) / beta - f_exact) / f_exact = -1.1009271732942546e-15 - 8.58980335690302e-17im +(abs(m) - abs(m_exact)) / abs(m_exact) = -1.1403175236145204e-16 +(e - e_exact) / e_exact = -0.02373206809908996 - 0.0im ```` diff --git a/docs/src/examples/2d_ising_partition_function/main.ipynb b/docs/src/examples/2d_ising_partition_function/main.ipynb index 4e0040cc1..5ae5c568d 100644 --- a/docs/src/examples/2d_ising_partition_function/main.ipynb +++ b/docs/src/examples/2d_ising_partition_function/main.ipynb @@ -12,19 +12,22 @@ { "cell_type": "markdown", "source": [ - "# 2D classical Ising partition function using CTMRG\n", + "# The 2D classical Ising model using CTMRG\n", "\n", "All previous examples dealt with quantum systems, describing their states by `InfinitePEPS`\n", - "that can be contracted using CTMRG or VUMPS techniques. Here, we shift our focus towards\n", - "classical physics and consider the 2D classical Ising model with the partition function\n", + "that can be contracted using CTMRG or boundary MPS techniques. Here,\n", + "we shift our focus towards classical physics and consider the 2D classical Ising model with\n", + "the partition function\n", "\n", "$$\n", "\\mathcal{Z}(\\beta) = \\sum_{\\{s\\}} \\exp(-\\beta H(s)) \\text{ with } H(s) = -J \\sum_{\\langle i, j \\rangle} s_i s_j .\n", "$$\n", "\n", - "The idea is to encode the partition function into an infinite square lattice of rank-4\n", - "tensors which can then be contracted using CTMRG. These rank-4 tensors are represented by\n", - "`InfinitePartitionFunction` states, as we will see.\n", + "where the classical spins $s_i \\in \\{+1, -1\\}$ are located on the vertices $i$ of a 2D\n", + "square lattice. The idea is to encode the partition function as an infinite square network\n", + "consisting of local rank-4 tensors, which can then be contracted using CTMRG. An infinite\n", + "square network of these rank-4 tensors can be represented as an\n", + "`InfinitePartitionFunction` object, as we will see.\n", "\n", "But first, let's seed the RNG and import all required modules:" ], @@ -48,8 +51,16 @@ "## Defining the partition function\n", "\n", "The first step is to define the rank-4 tensor that, when contracted on a square lattice,\n", - "evaluates to the partition function value at a given $\\beta$. Since we later want to compute\n", - "the magnetization and energy, we define the appropriate rank-4 tensors as well:" + "evaluates to the partition function value at a given $\\beta$. This is done through a\n", + "[fairly generic procedure](@cite haegeman_diagonalizing_2017) where the interaction weights\n", + "are distributed among vertex tensors in an appropriate way. Concretely, here we first define\n", + "a 'link' matrix containing the Boltzmann weights associated to all possible spin\n", + "configurations across a given link on the lattice. Next, we define site tensors as\n", + "delta-tensors that ensiure that the spin value on all adjacent links is the same. Since we\n", + "only want tensors on the sites in the end, we can symmetrically absorb the link weight\n", + "tensors into the site tensors, which gives us exactly the kind of network we're looking for.\n", + "Since we later want to compute the magnetization and energy to check our results, we define\n", + "the appropriate rank-4 tensors here as well while we're at it." ], "metadata": {} }, @@ -96,8 +107,8 @@ { "cell_type": "markdown", "source": [ - "So let's initialize these tensors at inverse temperature $\\beta=0.6$ and construct the\n", - "corresponding `InfinitePartitionFunction`:" + "So let's initialize these tensors at inverse temperature $\\beta=0.6$, check that\n", + "they are indeed rank-4 and construct the corresponding `InfinitePartitionFunction`:" ], "metadata": {} }, @@ -107,6 +118,7 @@ "source": [ "beta = 0.6\n", "O, M, E = classical_ising(; beta)\n", + "@show space(O)\n", "Z = InfinitePartitionFunction(O)" ], "metadata": {}, @@ -118,7 +130,7 @@ "## Contracting the partition function\n", "\n", "Next, we can contract the partition function as per usual by constructing a `CTMRGEnv` with\n", - "a specified environment dimension (or space) and calling `leading_boundary` with appropriate\n", + "a specified environment virtual space and calling `leading_boundary` with appropriate\n", "settings:" ], "metadata": {} @@ -127,8 +139,8 @@ "outputs": [], "cell_type": "code", "source": [ - "χenv = 20\n", - "env₀ = CTMRGEnv(Z, χenv)\n", + "Venv = ℂ^20\n", + "env₀ = CTMRGEnv(Z, Venv)\n", "env, = leading_boundary(env₀, Z; tol=1e-8, maxiter=500);" ], "metadata": {}, @@ -138,8 +150,9 @@ "cell_type": "markdown", "source": [ "Note that CTMRG environments for partition functions differ from the PEPS environments only\n", - "by the edge tensors - instead of two legs connecting the edges and the PEPS-PEPS sandwich,\n", - "there is only one leg connecting the edges and the partition function tensor:" + "by the edge tensors. Instead of two legs connecting the edges and the PEPS-PEPS sandwich,\n", + "there is only one leg connecting the edges and the partition function tensor, meaning that\n", + "the edge tensors are now rank-3:" ], "metadata": {} }, @@ -158,7 +171,7 @@ "To compute the value of the partition function, we have to contract `Z` with the converged\n", "environment using `network_value`. Additionally, we will compute the magnetization\n", "and energy (per site), again using `expectation_value` but this time also specifying\n", - "the index in the unit cell, where we want to insert the local tensor:" + "the index in the unit cell where we want to insert the local tensor:" ], "metadata": {} }, @@ -180,9 +193,10 @@ "## Comparing against the exact Onsager solution\n", "\n", "In order to assess our results, we will compare against the\n", - "[exact Onsager solution](https://en.wikipedia.org/wiki/Square_lattice_Ising_model#Exact_solution).\n", - "To that end, we compute the exact free energy, magnetization and energy per site (where\n", - "`quadgk` performs the integral from $0$ to $\\pi/2$):" + "[exact Onsager solution](https://en.wikipedia.org/wiki/Square_lattice_Ising_model#Exact_solution)\n", + "of the 2D classical Ising model. To that end, we compute the exact free energy,\n", + "magnetization and energy per site (where we use `quadgk` to perform integrals of an\n", + "auxiliary variable from $0$ to $\\pi/2$):" ], "metadata": {} }, @@ -248,11 +262,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.11.4" + "version": "1.10.4" }, "kernelspec": { - "name": "julia-1.11", - "display_name": "Julia 1.11.4", + "name": "julia-1.10", + "display_name": "Julia 1.10.4", "language": "julia" } }, diff --git a/docs/src/examples/3d_ising_partition_function/index.md b/docs/src/examples/3d_ising_partition_function/index.md index cc0cf6d0a..ff50a94e1 100644 --- a/docs/src/examples/3d_ising_partition_function/index.md +++ b/docs/src/examples/3d_ising_partition_function/index.md @@ -7,19 +7,17 @@ EditURL = "../../../../examples/3d_ising_partition_function/main.jl" [![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//3d_ising_partition_function) -# The 3D classical Ising model +# [The 3D classical Ising model](@id e_3d_ising) In a previous example we have already demonstrated an application of PEPSKit.jl to the study -of two-dimensional classical statistical mechanics models. In this example, we will take -this one step further, and showcase how one can use PEPSKit.jl to study three-dimensional -classical statistical mechanics models. We will demonstrate this for the specific case of -the three-dimensional classical Ising model, but the same techniques can be applied to other -three-dimensional classical models as well. +of 2D classical statistical mechanics models. In this example, we will take this one step +further, and showcase how one can use PEPSKit.jl to study 3D classical statistical mechanics +models. We will demonstrate this for the specific case of the 3D classical Ising model, but +the same techniques can be applied to other 3D classical models as well. The workflow showcased in this example is a bit more experimental and less 'black-box' than previous examples. Therefore it also serves as a demonstration of some of the more internal -functionality of PEPSKit.jl, and how one can adapt it to different or less 'standard' kinds -of problems. +functionality of PEPSKit.jl, and how one can adapt it to less 'standard' kinds of problems. Let us consider again the partition function of the classical Ising model, @@ -27,11 +25,11 @@ Let us consider again the partition function of the classical Ising model, \mathcal{Z}(\beta) = \sum_{\{s\}} \exp(-\beta H(s)) \text{ with } H(s) = -J \sum_{\langle i, j \rangle} s_i s_j . ``` -where now the classical spins $s_i \in \{+1, -1\}$ are located on the vertices $i$ of a -three-dimensional cubic lattice. The partition function of this model can be represented as -a 3D tensor network with a rank-6 tensor at each vertex of the lattice. Such a network can -be contracted by finding the fixed point of the corresponding transfer operator, in exactly -the same spirit as the boundary MPS methods demonstrated in a previous example. +where now the classical spins $s_i \in \{+1, -1\}$ are located on the vertices $i$ of a 3D +cubic lattice. The partition function of this model can be represented as a 3D tensor +network with a rank-6 tensor at each vertex of the lattice. Such a network can be contracted +by finding the fixed point of the corresponding transfer operator, in exactly the same +spirit as the [boundary MPS methods](@ref e_boundary_mps) demonstrated in another example. Let's start by making the example deterministic and we doing our imports: @@ -50,9 +48,9 @@ Just as in the 2D case, the first step is to define the partition function as a network. The procedure is exactly the same as before, the only difference being that now every spin participates in interactions associated to six links adjacent to that site. This means that the partition function can be written as an infinite 3D network with a single -constituent rank-6 [`PEPSKit.PEPOTensor`](@ref) `O` located at each site of the cubic lattice. To -verify our example we will check the magnetization and energy, so we also define the -corresponding rank-6 tensors `M` and `E` while we're at it. +constituent rank-6 [`PEPSKit.PEPOTensor`](@ref) `O` located at each site of the cubic +lattice. To verify our example we will check the magnetization and energy, so we also define +the corresponding rank-6 tensors `M` and `E` while we're at it. ````julia function three_dimensional_classical_ising(; beta, J=1.0) @@ -93,8 +91,8 @@ function three_dimensional_classical_ising(; beta, J=1.0) end; ```` -Let's initialize these tensors at inverse temperature ``\beta=0.2391``, which corresponds to a slightly -lower temperature than the critical value ``\beta_c=0.2216544…`` +Let's initialize these tensors at inverse temperature ``\beta=0.2391``, which corresponds to +a slightly lower temperature than the critical value ``\beta_c=0.2216544…`` ````julia beta = 0.2391 @@ -110,10 +108,10 @@ true To contract our infinite 3D partition function, we first reinterpret it as an infinite power of a slice-to-slice transfer operator ``T``, where ``T`` can be seen as an infinite 2D -projected entangled-pair operator (PEPO) consisting of the rank-6 tensor `O` at each site of -an infinite 3D square lattice. In the same spirit as the boundary MPS approach, all we need -to contract the whole partition function is to find the leading eigenvector of this PEPO. -The fixed point of such a PEPO exactly corresponds to a PEPS, and for the case of a +projected entangled-pair operator (PEPO) which consists of the rank-6 tensor `O` at each +site of an infinite 2D square lattice. In the same spirit as the boundary MPS approach, all +we need to contract the whole partition function is to find the leading eigenvector of this +PEPO. The fixed point of such a PEPO exactly corresponds to a PEPS, and for the case of a Hermitian transfer operator we can find this PEPS through [variational optimization](@cite vanderstraeten_residual_2018). @@ -121,25 +119,27 @@ Indeed, for a Hermition transfer operator ``T`` we can formulate the eigenvalue for a fixed point PEPS ``|\psi\rangle`` as a variational problem ```math -|\psi\rangle = \text{argmin}_{|\psi\rangle} - \lim_{N \to ∞} \frac{1}{N} \log \left( \frac{\langle \psi | T | \psi \rangle}{\langle \psi | \psi \rangle} \right) +|\psi\rangle = \text{argmin}_{|\psi\rangle} \left ( \lim_{N \to ∞} - \frac{1}{N} \log \left( \frac{\langle \psi | T | \psi \rangle}{\langle \psi | \psi \rangle} \right) \right ) ``` where ``N`` is the diverging number of sites of the 2D transfer operator ``T``. ### Defining the cost function -Using PEPSKit.jl, this cost function and its gradient can be easily computed, after which we can use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it. -recognize the denominator ``\langle \psi | \psi \rangle`` as the familiar PEPS norm, where -we can compute the norm per site as the [`network_value`](@ref) of the corresponding -[`InfiniteSquareNetwork`](@ref) by contracting it with the CTMRG algorithm. Similarly, the -numerator ``\langle \psi | T | \psi \rangle`` is nothing more than an +Using PEPSKit.jl, this cost function and its gradient can be easily computed, after which we +can use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it. We can +immediately recognize the denominator ``\langle \psi | \psi \rangle`` as the familiar PEPS +norm, where we can compute the norm per site as the [`network_value`](@ref) of the +corresponding [`InfiniteSquareNetwork`](@ref) by contracting it with the CTMRG algorithm. +Similarly, the numerator ``\langle \psi | T | \psi \rangle`` is nothing more than an `InfiniteSquareNetwork` consisting of three layers corresponding to the ket, transfer -operator and bra objects. This object can be constructed and contracted in a straightforward -way, after we can again compute its `network_value`. +operator and bra objects. This object can also be constructed and contracted in a +straightforward way, after we can again compute its `network_value`. So to define our cost function, we just need to construct the transfer operator as an -[`InfinitePEPO`](@ref) and specify a contraction algorithm we can use to compute the values -of the two relevant 2D networks. In addition, we'll specify the specific reverse rule -algorithm that will be used to compute the gradient of this cost function +[`InfinitePEPO`](@ref), contruct the both relevant infinite 2D contractible networks from +the current PEPS and this transfer operator, and specify a contraction algorithm we can use +to compute the values of these two networks. In addition, we'll specify the specific reverse +rule algorithm that will be used to compute the gradient of this cost function. ````julia boundary_alg = SimultaneousCTMRG(; maxiter=150, tol=1e-8, verbosity=1) @@ -179,13 +179,13 @@ function pepo_costfun((psi, env2, env3)) end; ```` -There are a few things to note about this cost function definition. Since we will pass -it to the `optimize` method from OptimKit.jl, we require it to return both our cost function -and the corresponding gradient. To do this, we simply use the `withgradient` method from -Zygote.jl to automatically compute the gradient of the cost function straight from the -primal computation. Since our cost function involves contraction using `leading_boundary`, -we also have to specify exactly how Zygote should handle the backpropagation of the gradient -through this function. This can be done using the [`PEPSKit.hook_pullback`](@ref) function from +There are a few things to note about this cost function definition. Since we will pass it to +the `OptimKit.optimize`, we require it to return both our cost function and the +corresponding gradient. To do this, we simply use the `withgradient` method from Zygote.jl +to automatically compute the gradient of the cost function straight from the primal +computation. Since our cost function involves contractions using `leading_boundary`, we also +have to specify exactly how Zygote should handle the backpropagation of the gradient through +this function. This can be done using the [`PEPSKit.hook_pullback`](@ref) function from PEPSKit.jl, which allows to hook into the pullback of a given function by specifying a specific algorithm for the pullback computation. Here, we opted to use an Arnoldi method to solve the linear problem defining the gradient of the network contraction at its fixed @@ -259,86 +259,88 @@ optimizer_alg = LBFGS(32; maxiter=100, gradtol=1e-5, verbosity=3) ┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Float64}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 -┌ Warning: CTMRG cancel 150: obj = +1.702942228759e+01 +1.443123501028e-07im err = 2.4386740892e-05 time = 2.48 sec -└ @ PEPSKit ~/repos/PEPSKit.jl/src/algorithms/ctmrg/ctmrg.jl:155 -[ Info: LBFGS: iter 1, time 109.52 s: f = -0.777080930369, ‖∇f‖ = 3.1305e-02, α = 7.10e+02, m = 0, nfg = 7 +┌ Warning: CTMRG cancel 150: obj = +1.702942227203e+01 +1.438609955721e-07im err = 2.4390784904e-05 time = 9.24 sec +└ @ PEPSKit ~/git/PEPSKit.jl/src/algorithms/ctmrg/ctmrg.jl:155 +[ Info: LBFGS: iter 1, time 144.38 s: f = -0.777080930424, ‖∇f‖ = 3.1305e-02, α = 7.10e+02, m = 0, nfg = 7 ┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 -[ Info: LBFGS: iter 2, time 111.21 s: f = -0.784111515961, ‖∇f‖ = 2.0103e-02, α = 1.00e+00, m = 1, nfg = 1 -[ Info: LBFGS: iter 3, time 111.53 s: f = -0.792705733484, ‖∇f‖ = 2.3327e-02, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 4, time 111.79 s: f = -0.796289732476, ‖∇f‖ = 2.2475e-02, α = 1.00e+00, m = 3, nfg = 1 -[ Info: LBFGS: iter 5, time 111.99 s: f = -0.799674902374, ‖∇f‖ = 7.0288e-03, α = 1.00e+00, m = 4, nfg = 1 -[ Info: LBFGS: iter 6, time 112.18 s: f = -0.800082100121, ‖∇f‖ = 1.2717e-03, α = 1.00e+00, m = 5, nfg = 1 -[ Info: LBFGS: iter 7, time 112.40 s: f = -0.800110603125, ‖∇f‖ = 1.3384e-03, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 8, time 112.58 s: f = -0.800262201996, ‖∇f‖ = 2.4945e-03, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 9, time 112.77 s: f = -0.800450505448, ‖∇f‖ = 2.9259e-03, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 10, time 112.98 s: f = -0.800764917087, ‖∇f‖ = 1.7221e-03, α = 1.00e+00, m = 9, nfg = 1 -[ Info: LBFGS: iter 11, time 113.20 s: f = -0.800876048838, ‖∇f‖ = 2.2475e-03, α = 1.00e+00, m = 10, nfg = 1 -[ Info: LBFGS: iter 12, time 113.39 s: f = -0.801100867467, ‖∇f‖ = 1.5561e-03, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 13, time 113.61 s: f = -0.801317048856, ‖∇f‖ = 1.1561e-03, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 14, time 113.82 s: f = -0.801373050545, ‖∇f‖ = 7.1300e-04, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 15, time 114.02 s: f = -0.801388615264, ‖∇f‖ = 2.8462e-04, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 16, time 114.23 s: f = -0.801394633333, ‖∇f‖ = 2.7607e-04, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 17, time 114.42 s: f = -0.801408061564, ‖∇f‖ = 3.6096e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 18, time 114.65 s: f = -0.801509542169, ‖∇f‖ = 1.9822e-03, α = 1.00e+00, m = 17, nfg = 1 -[ Info: LBFGS: iter 19, time 114.90 s: f = -0.801578405251, ‖∇f‖ = 1.8040e-03, α = 1.00e+00, m = 18, nfg = 1 -[ Info: LBFGS: iter 20, time 115.79 s: f = -0.801694524424, ‖∇f‖ = 2.9356e-03, α = 5.48e-01, m = 19, nfg = 3 -[ Info: LBFGS: iter 21, time 116.41 s: f = -0.801761920683, ‖∇f‖ = 1.1993e-03, α = 3.82e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 22, time 116.69 s: f = -0.801797785494, ‖∇f‖ = 6.0337e-04, α = 1.00e+00, m = 21, nfg = 1 -[ Info: LBFGS: iter 23, time 117.28 s: f = -0.801808747834, ‖∇f‖ = 3.7053e-04, α = 5.24e-01, m = 22, nfg = 2 -[ Info: LBFGS: iter 24, time 117.56 s: f = -0.801812729173, ‖∇f‖ = 3.0781e-04, α = 1.00e+00, m = 23, nfg = 1 -[ Info: LBFGS: iter 25, time 117.85 s: f = -0.801816445211, ‖∇f‖ = 2.9994e-04, α = 1.00e+00, m = 24, nfg = 1 -[ Info: LBFGS: iter 26, time 118.13 s: f = -0.801824713130, ‖∇f‖ = 3.6496e-04, α = 1.00e+00, m = 25, nfg = 1 -[ Info: LBFGS: iter 27, time 118.45 s: f = -0.801839673823, ‖∇f‖ = 5.4222e-04, α = 1.00e+00, m = 26, nfg = 1 -[ Info: LBFGS: iter 28, time 118.77 s: f = -0.801857478904, ‖∇f‖ = 2.7917e-04, α = 1.00e+00, m = 27, nfg = 1 -[ Info: LBFGS: iter 29, time 119.08 s: f = -0.801864555224, ‖∇f‖ = 1.2319e-04, α = 1.00e+00, m = 28, nfg = 1 -[ Info: LBFGS: iter 30, time 119.38 s: f = -0.801865598736, ‖∇f‖ = 8.6048e-05, α = 1.00e+00, m = 29, nfg = 1 -[ Info: LBFGS: iter 31, time 119.68 s: f = -0.801867571755, ‖∇f‖ = 8.8636e-05, α = 1.00e+00, m = 30, nfg = 1 -[ Info: LBFGS: iter 32, time 119.99 s: f = -0.801870393528, ‖∇f‖ = 2.6554e-04, α = 1.00e+00, m = 31, nfg = 1 -[ Info: LBFGS: iter 33, time 120.34 s: f = -0.801874797039, ‖∇f‖ = 2.7841e-04, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 34, time 120.68 s: f = -0.801877566644, ‖∇f‖ = 1.8523e-04, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 35, time 121.00 s: f = -0.801878506245, ‖∇f‖ = 2.0638e-04, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 36, time 121.31 s: f = -0.801878995097, ‖∇f‖ = 5.6081e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 37, time 121.62 s: f = -0.801879153573, ‖∇f‖ = 6.2356e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 38, time 121.94 s: f = -0.801879355075, ‖∇f‖ = 6.0528e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 39, time 122.25 s: f = -0.801880115100, ‖∇f‖ = 6.2768e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 40, time 122.58 s: f = -0.801881475065, ‖∇f‖ = 6.2301e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 41, time 122.94 s: f = -0.801882272425, ‖∇f‖ = 9.5267e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 42, time 123.26 s: f = -0.801882600033, ‖∇f‖ = 5.1283e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 43, time 123.58 s: f = -0.801882711875, ‖∇f‖ = 2.6091e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 44, time 123.87 s: f = -0.801882805828, ‖∇f‖ = 2.9316e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 45, time 124.15 s: f = -0.801883027060, ‖∇f‖ = 2.7982e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 46, time 124.45 s: f = -0.801883402178, ‖∇f‖ = 3.8102e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 47, time 124.78 s: f = -0.801883718321, ‖∇f‖ = 5.3658e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 48, time 125.09 s: f = -0.801883962887, ‖∇f‖ = 2.8728e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 49, time 125.43 s: f = -0.801884158085, ‖∇f‖ = 3.0680e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 50, time 125.77 s: f = -0.801884385940, ‖∇f‖ = 4.1973e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 51, time 126.12 s: f = -0.801884810459, ‖∇f‖ = 6.8881e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 52, time 126.47 s: f = -0.801885011014, ‖∇f‖ = 3.8651e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 53, time 126.80 s: f = -0.801885126625, ‖∇f‖ = 1.9013e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 54, time 127.13 s: f = -0.801885186489, ‖∇f‖ = 3.2919e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 55, time 127.48 s: f = -0.801885309713, ‖∇f‖ = 4.8521e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 56, time 127.83 s: f = -0.801885491631, ‖∇f‖ = 1.1478e-04, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 57, time 128.20 s: f = -0.801885912857, ‖∇f‖ = 7.7221e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 58, time 128.57 s: f = -0.801886451980, ‖∇f‖ = 6.5316e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 59, time 128.94 s: f = -0.801886639804, ‖∇f‖ = 5.1567e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 60, time 129.63 s: f = -0.801886699372, ‖∇f‖ = 4.5540e-05, α = 3.68e-01, m = 32, nfg = 2 -[ Info: LBFGS: iter 61, time 129.92 s: f = -0.801886723993, ‖∇f‖ = 2.1992e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 62, time 130.22 s: f = -0.801886735202, ‖∇f‖ = 1.8064e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 63, time 130.55 s: f = -0.801886771395, ‖∇f‖ = 3.8651e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 64, time 130.86 s: f = -0.801886801952, ‖∇f‖ = 4.2630e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 65, time 131.16 s: f = -0.801886837856, ‖∇f‖ = 3.9318e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 66, time 131.46 s: f = -0.801886916784, ‖∇f‖ = 3.8747e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 67, time 131.78 s: f = -0.801887030055, ‖∇f‖ = 3.7139e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 68, time 132.12 s: f = -0.801887141198, ‖∇f‖ = 5.7017e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 69, time 132.83 s: f = -0.801887199205, ‖∇f‖ = 3.0700e-05, α = 5.24e-01, m = 32, nfg = 2 -[ Info: LBFGS: iter 70, time 133.16 s: f = -0.801887246613, ‖∇f‖ = 1.3885e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 71, time 133.49 s: f = -0.801887263716, ‖∇f‖ = 1.5769e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 72, time 133.83 s: f = -0.801887319464, ‖∇f‖ = 2.1424e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 73, time 134.17 s: f = -0.801887406143, ‖∇f‖ = 1.9896e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 74, time 134.86 s: f = -0.801887467460, ‖∇f‖ = 1.9800e-05, α = 3.61e-01, m = 32, nfg = 2 -[ Info: LBFGS: converged after 75 iterations and time 135.20 s: f = -0.801887535670, ‖∇f‖ = 9.9339e-06 +[ Info: LBFGS: iter 2, time 147.50 s: f = -0.784111515920, ‖∇f‖ = 2.0103e-02, α = 1.00e+00, m = 1, nfg = 1 +[ Info: LBFGS: iter 3, time 148.61 s: f = -0.792705733264, ‖∇f‖ = 2.3327e-02, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 4, time 149.51 s: f = -0.796289732161, ‖∇f‖ = 2.2475e-02, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 5, time 150.24 s: f = -0.799674902231, ‖∇f‖ = 7.0288e-03, α = 1.00e+00, m = 4, nfg = 1 +[ Info: LBFGS: iter 6, time 150.90 s: f = -0.800082100115, ‖∇f‖ = 1.2717e-03, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 7, time 151.69 s: f = -0.800110603120, ‖∇f‖ = 1.3384e-03, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 8, time 152.35 s: f = -0.800262202003, ‖∇f‖ = 2.4945e-03, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 9, time 153.02 s: f = -0.800450505439, ‖∇f‖ = 2.9259e-03, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 10, time 154.51 s: f = -0.800764917063, ‖∇f‖ = 1.7221e-03, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 11, time 155.29 s: f = -0.800876048822, ‖∇f‖ = 2.2475e-03, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 12, time 155.96 s: f = -0.801100867388, ‖∇f‖ = 1.5561e-03, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 13, time 156.75 s: f = -0.801317048785, ‖∇f‖ = 1.1561e-03, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 14, time 157.56 s: f = -0.801373050522, ‖∇f‖ = 7.1300e-04, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 15, time 158.53 s: f = -0.801388615258, ‖∇f‖ = 2.8462e-04, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 16, time 159.46 s: f = -0.801394633326, ‖∇f‖ = 2.7607e-04, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 17, time 160.33 s: f = -0.801408061547, ‖∇f‖ = 3.6096e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 18, time 161.44 s: f = -0.801509542237, ‖∇f‖ = 1.9822e-03, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 19, time 162.56 s: f = -0.801578405298, ‖∇f‖ = 1.8040e-03, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 20, time 166.52 s: f = -0.801694524832, ‖∇f‖ = 2.9356e-03, α = 5.48e-01, m = 19, nfg = 3 +[ Info: LBFGS: iter 21, time 168.81 s: f = -0.801761920585, ‖∇f‖ = 1.1993e-03, α = 3.82e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 22, time 169.89 s: f = -0.801797785496, ‖∇f‖ = 6.0337e-04, α = 1.00e+00, m = 21, nfg = 1 +[ Info: LBFGS: iter 23, time 172.11 s: f = -0.801808747834, ‖∇f‖ = 3.7053e-04, α = 5.24e-01, m = 22, nfg = 2 +[ Info: LBFGS: iter 24, time 173.16 s: f = -0.801812729196, ‖∇f‖ = 3.0781e-04, α = 1.00e+00, m = 23, nfg = 1 +[ Info: LBFGS: iter 25, time 174.21 s: f = -0.801816445181, ‖∇f‖ = 2.9994e-04, α = 1.00e+00, m = 24, nfg = 1 +[ Info: LBFGS: iter 26, time 175.24 s: f = -0.801824712580, ‖∇f‖ = 3.6497e-04, α = 1.00e+00, m = 25, nfg = 1 +[ Info: LBFGS: iter 27, time 176.42 s: f = -0.801839673918, ‖∇f‖ = 5.4217e-04, α = 1.00e+00, m = 26, nfg = 1 +[ Info: LBFGS: iter 28, time 177.59 s: f = -0.801857480042, ‖∇f‖ = 2.7918e-04, α = 1.00e+00, m = 27, nfg = 1 +[ Info: LBFGS: iter 29, time 178.76 s: f = -0.801864556175, ‖∇f‖ = 1.2323e-04, α = 1.00e+00, m = 28, nfg = 1 +[ Info: LBFGS: iter 30, time 179.86 s: f = -0.801865599394, ‖∇f‖ = 8.6049e-05, α = 1.00e+00, m = 29, nfg = 1 +[ Info: LBFGS: iter 31, time 181.16 s: f = -0.801867571015, ‖∇f‖ = 8.8673e-05, α = 1.00e+00, m = 30, nfg = 1 +[ Info: LBFGS: iter 32, time 182.36 s: f = -0.801870391456, ‖∇f‖ = 2.6510e-04, α = 1.00e+00, m = 31, nfg = 1 +[ Info: LBFGS: iter 33, time 183.60 s: f = -0.801874799763, ‖∇f‖ = 2.7836e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 34, time 184.85 s: f = -0.801877566434, ‖∇f‖ = 1.8512e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 35, time 186.03 s: f = -0.801878506140, ‖∇f‖ = 2.0603e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 36, time 187.13 s: f = -0.801878994665, ‖∇f‖ = 5.6086e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 37, time 188.25 s: f = -0.801879153394, ‖∇f‖ = 6.2420e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 38, time 189.35 s: f = -0.801879354902, ‖∇f‖ = 6.0532e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 39, time 190.46 s: f = -0.801880114487, ‖∇f‖ = 6.2680e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 40, time 191.69 s: f = -0.801881471358, ‖∇f‖ = 6.2392e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 41, time 192.98 s: f = -0.801882270540, ‖∇f‖ = 9.4942e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 42, time 194.10 s: f = -0.801882598674, ‖∇f‖ = 5.1910e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 43, time 195.22 s: f = -0.801882711254, ‖∇f‖ = 2.6275e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 44, time 196.27 s: f = -0.801882805203, ‖∇f‖ = 2.9425e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 45, time 197.29 s: f = -0.801883026107, ‖∇f‖ = 2.7910e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 46, time 198.44 s: f = -0.801883400172, ‖∇f‖ = 3.7426e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 47, time 199.61 s: f = -0.801883717581, ‖∇f‖ = 5.4717e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 48, time 200.77 s: f = -0.801883966703, ‖∇f‖ = 2.9045e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 49, time 201.95 s: f = -0.801884163647, ‖∇f‖ = 3.0661e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 50, time 203.18 s: f = -0.801884391105, ‖∇f‖ = 4.1905e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 51, time 204.55 s: f = -0.801884815983, ‖∇f‖ = 6.9018e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 52, time 205.72 s: f = -0.801885013427, ‖∇f‖ = 3.8025e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 53, time 206.89 s: f = -0.801885126302, ‖∇f‖ = 1.9306e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 54, time 208.06 s: f = -0.801885184513, ‖∇f‖ = 3.3083e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 55, time 209.30 s: f = -0.801885308658, ‖∇f‖ = 4.9014e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 56, time 210.56 s: f = -0.801885502272, ‖∇f‖ = 1.1303e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 57, time 211.87 s: f = -0.801885922461, ‖∇f‖ = 7.5880e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 58, time 213.22 s: f = -0.801886457901, ‖∇f‖ = 7.2957e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 59, time 214.50 s: f = -0.801886614664, ‖∇f‖ = 6.8816e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 60, time 216.92 s: f = -0.801886696733, ‖∇f‖ = 3.0687e-05, α = 4.26e-01, m = 32, nfg = 2 +[ Info: LBFGS: iter 61, time 218.01 s: f = -0.801886716271, ‖∇f‖ = 2.1581e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 62, time 219.10 s: f = -0.801886732686, ‖∇f‖ = 1.7659e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 63, time 220.30 s: f = -0.801886790357, ‖∇f‖ = 4.1045e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 64, time 221.53 s: f = -0.801886827022, ‖∇f‖ = 4.0831e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 65, time 222.57 s: f = -0.801886871472, ‖∇f‖ = 4.1034e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 66, time 223.64 s: f = -0.801886949562, ‖∇f‖ = 5.1171e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 67, time 224.79 s: f = -0.801887066612, ‖∇f‖ = 4.5902e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 68, time 226.00 s: f = -0.801887172301, ‖∇f‖ = 7.4810e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 69, time 227.33 s: f = -0.801887249759, ‖∇f‖ = 3.9619e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 70, time 228.45 s: f = -0.801887292124, ‖∇f‖ = 1.3999e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 71, time 229.64 s: f = -0.801887312574, ‖∇f‖ = 1.0813e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 72, time 230.93 s: f = -0.801887349749, ‖∇f‖ = 1.1335e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 73, time 232.31 s: f = -0.801887427066, ‖∇f‖ = 1.9028e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 74, time 233.68 s: f = -0.801887495625, ‖∇f‖ = 1.9286e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 75, time 237.82 s: f = -0.801887521350, ‖∇f‖ = 2.5284e-05, α = 5.43e-01, m = 32, nfg = 2 +[ Info: LBFGS: iter 76, time 239.82 s: f = -0.801887560129, ‖∇f‖ = 2.7094e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: converged after 77 iterations and time 241.32 s: f = -0.801887571684, ‖∇f‖ = 7.8819e-06 ```` @@ -353,7 +355,7 @@ the final value of the cost function we have just optimized. ```` ```` --0.8018875356698865 +-0.8018875716841548 ```` As another check, we can compute the magnetization per site and compare it to a [reference @@ -371,7 +373,7 @@ m_ref = 0.667162 ```` ```` -0.00011315204780193433 +0.00011017609950225715 ```` --- diff --git a/docs/src/examples/3d_ising_partition_function/main.ipynb b/docs/src/examples/3d_ising_partition_function/main.ipynb index 92148e21c..835e66790 100644 --- a/docs/src/examples/3d_ising_partition_function/main.ipynb +++ b/docs/src/examples/3d_ising_partition_function/main.ipynb @@ -15,16 +15,14 @@ "# The 3D classical Ising model\n", "\n", "In a previous example we have already demonstrated an application of PEPSKit.jl to the study\n", - "of two-dimensional classical statistical mechanics models. In this example, we will take\n", - "this one step further, and showcase how one can use PEPSKit.jl to study three-dimensional\n", - "classical statistical mechanics models. We will demonstrate this for the specific case of\n", - "the three-dimensional classical Ising model, but the same techniques can be applied to other\n", - "three-dimensional classical models as well.\n", + "of 2D classical statistical mechanics models. In this example, we will take this one step\n", + "further, and showcase how one can use PEPSKit.jl to study 3D classical statistical mechanics\n", + "models. We will demonstrate this for the specific case of the 3D classical Ising model, but\n", + "the same techniques can be applied to other 3D classical models as well.\n", "\n", "The workflow showcased in this example is a bit more experimental and less 'black-box' than\n", "previous examples. Therefore it also serves as a demonstration of some of the more internal\n", - "functionality of PEPSKit.jl, and how one can adapt it to different or less 'standard' kinds\n", - "of problems.\n", + "functionality of PEPSKit.jl, and how one can adapt it to less 'standard' kinds of problems.\n", "\n", "Let us consider again the partition function of the classical Ising model,\n", "\n", @@ -32,11 +30,11 @@ "\\mathcal{Z}(\\beta) = \\sum_{\\{s\\}} \\exp(-\\beta H(s)) \\text{ with } H(s) = -J \\sum_{\\langle i, j \\rangle} s_i s_j .\n", "$$\n", "\n", - "where now the classical spins $s_i \\in \\{+1, -1\\}$ are located on the vertices $i$ of a\n", - "three-dimensional cubic lattice. The partition function of this model can be represented as\n", - "a 3D tensor network with a rank-6 tensor at each vertex of the lattice. Such a network can\n", - "be contracted by finding the fixed point of the corresponding transfer operator, in exactly\n", - "the same spirit as the boundary MPS methods demonstrated in a previous example.\n", + "where now the classical spins $s_i \\in \\{+1, -1\\}$ are located on the vertices $i$ of a 3D\n", + "cubic lattice. The partition function of this model can be represented as a 3D tensor\n", + "network with a rank-6 tensor at each vertex of the lattice. Such a network can be contracted\n", + "by finding the fixed point of the corresponding transfer operator, in exactly the same\n", + "spirit as the boundary MPS methods demonstrated in another example.\n", "\n", "Let's start by making the example deterministic and we doing our imports:" ], @@ -65,9 +63,9 @@ "network. The procedure is exactly the same as before, the only difference being that now\n", "every spin participates in interactions associated to six links adjacent to that site. This\n", "means that the partition function can be written as an infinite 3D network with a single\n", - "constituent rank-6 `PEPSKit.PEPOTensor` `O` located at each site of the cubic lattice. To\n", - "verify our example we will check the magnetization and energy, so we also define the\n", - "corresponding rank-6 tensors `M` and `E` while we're at it." + "constituent rank-6 `PEPSKit.PEPOTensor` `O` located at each site of the cubic\n", + "lattice. To verify our example we will check the magnetization and energy, so we also define\n", + "the corresponding rank-6 tensors `M` and `E` while we're at it." ], "metadata": {} }, @@ -118,8 +116,8 @@ { "cell_type": "markdown", "source": [ - "Let's initialize these tensors at inverse temperature $\\beta=0.2391$, which corresponds to a slightly\n", - "lower temperature than the critical value $\\beta_c=0.2216544…$" + "Let's initialize these tensors at inverse temperature $\\beta=0.2391$, which corresponds to\n", + "a slightly lower temperature than the critical value $\\beta_c=0.2216544…$" ], "metadata": {} }, @@ -141,10 +139,10 @@ "\n", "To contract our infinite 3D partition function, we first reinterpret it as an infinite power\n", "of a slice-to-slice transfer operator $T$, where $T$ can be seen as an infinite 2D\n", - "projected entangled-pair operator (PEPO) consisting of the rank-6 tensor `O` at each site of\n", - "an infinite 3D square lattice. In the same spirit as the boundary MPS approach, all we need\n", - "to contract the whole partition function is to find the leading eigenvector of this PEPO.\n", - "The fixed point of such a PEPO exactly corresponds to a PEPS, and for the case of a\n", + "projected entangled-pair operator (PEPO) which consists of the rank-6 tensor `O` at each\n", + "site of an infinite 2D square lattice. In the same spirit as the boundary MPS approach, all\n", + "we need to contract the whole partition function is to find the leading eigenvector of this\n", + "PEPO. The fixed point of such a PEPO exactly corresponds to a PEPS, and for the case of a\n", "Hermitian transfer operator we can find this PEPS through [variational optimization](@cite\n", "vanderstraeten_residual_2018).\n", "\n", @@ -152,25 +150,27 @@ "for a fixed point PEPS $|\\psi\\rangle$ as a variational problem\n", "\n", "$$\n", - "|\\psi\\rangle = \\text{argmin}_{|\\psi\\rangle} - \\lim_{N \\to ∞} \\frac{1}{N} \\log \\left( \\frac{\\langle \\psi | T | \\psi \\rangle}{\\langle \\psi | \\psi \\rangle} \\right)\n", + "|\\psi\\rangle = \\text{argmin}_{|\\psi\\rangle} \\left ( \\lim_{N \\to ∞} - \\frac{1}{N} \\log \\left( \\frac{\\langle \\psi | T | \\psi \\rangle}{\\langle \\psi | \\psi \\rangle} \\right) \\right )\n", "$$\n", "where $N$ is the diverging number of sites of the 2D transfer operator $T$.\n", "\n", "### Defining the cost function\n", "\n", - "Using PEPSKit.jl, this cost function and its gradient can be easily computed, after which we can use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it.\n", - "recognize the denominator $\\langle \\psi | \\psi \\rangle$ as the familiar PEPS norm, where\n", - "we can compute the norm per site as the `network_value` of the corresponding\n", - "`InfiniteSquareNetwork` by contracting it with the CTMRG algorithm. Similarly, the\n", - "numerator $\\langle \\psi | T | \\psi \\rangle$ is nothing more than an\n", + "Using PEPSKit.jl, this cost function and its gradient can be easily computed, after which we\n", + "can use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it. We can\n", + "immediately recognize the denominator $\\langle \\psi | \\psi \\rangle$ as the familiar PEPS\n", + "norm, where we can compute the norm per site as the `network_value` of the\n", + "corresponding `InfiniteSquareNetwork` by contracting it with the CTMRG algorithm.\n", + "Similarly, the numerator $\\langle \\psi | T | \\psi \\rangle$ is nothing more than an\n", "`InfiniteSquareNetwork` consisting of three layers corresponding to the ket, transfer\n", - "operator and bra objects. This object can be constructed and contracted in a straightforward\n", - "way, after we can again compute its `network_value`.\n", + "operator and bra objects. This object can also be constructed and contracted in a\n", + "straightforward way, after we can again compute its `network_value`.\n", "\n", "So to define our cost function, we just need to construct the transfer operator as an\n", - "`InfinitePEPO` and specify a contraction algorithm we can use to compute the values\n", - "of the two relevant 2D networks. In addition, we'll specify the specific reverse rule\n", - "algorithm that will be used to compute the gradient of this cost function" + "`InfinitePEPO`, contruct the both relevant infinite 2D contractible networks from\n", + "the current PEPS and this transfer operator, and specify a contraction algorithm we can use\n", + "to compute the values of these two networks. In addition, we'll specify the specific reverse\n", + "rule algorithm that will be used to compute the gradient of this cost function." ], "metadata": {} }, @@ -220,13 +220,13 @@ { "cell_type": "markdown", "source": [ - "There are a few things to note about this cost function definition. Since we will pass\n", - "it to the `optimize` method from OptimKit.jl, we require it to return both our cost function\n", - "and the corresponding gradient. To do this, we simply use the `withgradient` method from\n", - "Zygote.jl to automatically compute the gradient of the cost function straight from the\n", - "primal computation. Since our cost function involves contraction using `leading_boundary`,\n", - "we also have to specify exactly how Zygote should handle the backpropagation of the gradient\n", - "through this function. This can be done using the `PEPSKit.hook_pullback` function from\n", + "There are a few things to note about this cost function definition. Since we will pass it to\n", + "the `OptimKit.optimize`, we require it to return both our cost function and the\n", + "corresponding gradient. To do this, we simply use the `withgradient` method from Zygote.jl\n", + "to automatically compute the gradient of the cost function straight from the primal\n", + "computation. Since our cost function involves contractions using `leading_boundary`, we also\n", + "have to specify exactly how Zygote should handle the backpropagation of the gradient through\n", + "this function. This can be done using the `PEPSKit.hook_pullback` function from\n", "PEPSKit.jl, which allows to hook into the pullback of a given function by specifying a\n", "specific algorithm for the pullback computation. Here, we opted to use an Arnoldi method to\n", "solve the linear problem defining the gradient of the network contraction at its fixed\n", @@ -372,11 +372,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.11.4" + "version": "1.10.4" }, "kernelspec": { - "name": "julia-1.11", - "display_name": "Julia 1.11.4", + "name": "julia-1.10", + "display_name": "Julia 1.10.4", "language": "julia" } }, diff --git a/docs/src/examples/bose_hubbard/index.md b/docs/src/examples/bose_hubbard/index.md index 96ab71647..9b26dd4bf 100644 --- a/docs/src/examples/bose_hubbard/index.md +++ b/docs/src/examples/bose_hubbard/index.md @@ -127,8 +127,8 @@ env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); ```` ```` -[ Info: CTMRG init: obj = +1.693461429863e+00 +8.390974048721e-02im err = 1.0000e+00 -[ Info: CTMRG conv 19: obj = +1.181834754305e+01 -1.514255254857e-11im err = 3.6943032119e-09 time = 6.37 sec +[ Info: CTMRG init: obj = +1.696011117279e+00 +7.895649499440e-02im err = 1.0000e+00 +[ Info: CTMRG conv 19: obj = +1.181834754305e+01 -1.525384139600e-11im err = 3.7197306424e-09 time = 1.27 sec ```` @@ -142,171 +142,171 @@ peps, env, E, info = fixedpoint( ```` ```` -[ Info: LBFGS: initializing with f = 9.360531870693, ‖∇f‖ = 1.6957e+01 +[ Info: LBFGS: initializing with f = 9.360531870688, ‖∇f‖ = 1.6957e+01 ┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Float64}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 -[ Info: LBFGS: iter 1, time 864.30 s: f = 0.112865330403, ‖∇f‖ = 5.9876e+00, α = 1.56e+02, m = 0, nfg = 7 +[ Info: LBFGS: iter 1, time 1425.57 s: f = 0.112865963396, ‖∇f‖ = 5.9876e+00, α = 1.56e+02, m = 0, nfg = 7 ┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 -[ Info: LBFGS: iter 2, time 877.76 s: f = 0.031016651818, ‖∇f‖ = 4.7981e+00, α = 5.55e-01, m = 1, nfg = 2 -[ Info: LBFGS: iter 3, time 880.35 s: f = -0.073286659944, ‖∇f‖ = 1.4991e+00, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 4, time 882.72 s: f = -0.113074511097, ‖∇f‖ = 1.4104e+00, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 2, time 1462.43 s: f = 0.031010339650, ‖∇f‖ = 4.7933e+00, α = 5.55e-01, m = 1, nfg = 2 +[ Info: LBFGS: iter 3, time 1468.51 s: f = -0.073336754293, ‖∇f‖ = 1.4989e+00, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 4, time 1476.82 s: f = -0.113156779559, ‖∇f‖ = 1.4101e+00, α = 1.00e+00, m = 3, nfg = 1 ┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: │ α = 4.53e-02, dϕ = -5.09e-01, ϕ - ϕ₀ = -2.42e-02 └ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 5, time 890.49 s: f = -0.137293934550, ‖∇f‖ = 1.3317e+00, α = 4.53e-02, m = 4, nfg = 3 +[ Info: LBFGS: iter 5, time 1496.49 s: f = -0.137358553717, ‖∇f‖ = 1.3312e+00, α = 4.53e-02, m = 4, nfg = 3 ┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 4.19e-02, dϕ = -3.58e-01, ϕ - ϕ₀ = -1.56e-02 +│ α = 4.20e-02, dϕ = -3.57e-01, ϕ - ϕ₀ = -1.56e-02 └ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 6, time 898.25 s: f = -0.152882613133, ‖∇f‖ = 1.2515e+00, α = 4.19e-02, m = 5, nfg = 3 -[ Info: LBFGS: iter 7, time 909.09 s: f = -0.167778524643, ‖∇f‖ = 3.0370e+00, α = 3.97e-01, m = 6, nfg = 4 -[ Info: LBFGS: iter 8, time 911.54 s: f = -0.200610144885, ‖∇f‖ = 8.4562e-01, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 9, time 913.95 s: f = -0.214869049363, ‖∇f‖ = 5.6088e-01, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 10, time 916.55 s: f = -0.222910672089, ‖∇f‖ = 9.8015e-01, α = 1.00e+00, m = 9, nfg = 1 -[ Info: LBFGS: iter 11, time 918.70 s: f = -0.230707833300, ‖∇f‖ = 4.2302e-01, α = 1.00e+00, m = 10, nfg = 1 -[ Info: LBFGS: iter 12, time 920.65 s: f = -0.238105633372, ‖∇f‖ = 2.5801e-01, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 13, time 922.56 s: f = -0.247331854867, ‖∇f‖ = 3.2459e-01, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 14, time 924.13 s: f = -0.253845651144, ‖∇f‖ = 2.4014e-01, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 15, time 925.05 s: f = -0.261289607017, ‖∇f‖ = 3.3777e-01, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 16, time 925.99 s: f = -0.267178486858, ‖∇f‖ = 2.0556e-01, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 17, time 927.21 s: f = -0.269417408686, ‖∇f‖ = 1.4442e-01, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 18, time 928.06 s: f = -0.270255942689, ‖∇f‖ = 7.8602e-02, α = 1.00e+00, m = 17, nfg = 1 -[ Info: LBFGS: iter 19, time 928.87 s: f = -0.270672366603, ‖∇f‖ = 6.3259e-02, α = 1.00e+00, m = 18, nfg = 1 -[ Info: LBFGS: iter 20, time 929.68 s: f = -0.271220543802, ‖∇f‖ = 8.8755e-02, α = 1.00e+00, m = 19, nfg = 1 -[ Info: LBFGS: iter 21, time 930.93 s: f = -0.271543527453, ‖∇f‖ = 4.5233e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 22, time 931.73 s: f = -0.271650756946, ‖∇f‖ = 3.4057e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 23, time 932.53 s: f = -0.271894826592, ‖∇f‖ = 3.1507e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 24, time 933.33 s: f = -0.272056350007, ‖∇f‖ = 3.7796e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 25, time 934.55 s: f = -0.272233548851, ‖∇f‖ = 2.8370e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 26, time 935.37 s: f = -0.272383908712, ‖∇f‖ = 2.2903e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 27, time 936.20 s: f = -0.272455167221, ‖∇f‖ = 4.0448e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 28, time 937.00 s: f = -0.272553540301, ‖∇f‖ = 2.1431e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 29, time 938.21 s: f = -0.272695812729, ‖∇f‖ = 2.3543e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 30, time 939.02 s: f = -0.272771651851, ‖∇f‖ = 2.0076e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 31, time 939.81 s: f = -0.272799750606, ‖∇f‖ = 4.7874e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 32, time 940.62 s: f = -0.272878619780, ‖∇f‖ = 1.7612e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 33, time 941.83 s: f = -0.272929741282, ‖∇f‖ = 1.5455e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 34, time 942.63 s: f = -0.273001510559, ‖∇f‖ = 2.3641e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 35, time 943.43 s: f = -0.273050577801, ‖∇f‖ = 1.6253e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 36, time 944.23 s: f = -0.273061460544, ‖∇f‖ = 2.5195e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 37, time 945.44 s: f = -0.273079875270, ‖∇f‖ = 7.2299e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 38, time 946.24 s: f = -0.273083995266, ‖∇f‖ = 6.2322e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 39, time 947.04 s: f = -0.273091490830, ‖∇f‖ = 7.8002e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 40, time 947.85 s: f = -0.273097801979, ‖∇f‖ = 9.2495e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 41, time 949.06 s: f = -0.273103085883, ‖∇f‖ = 5.9273e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 42, time 949.89 s: f = -0.273106428950, ‖∇f‖ = 5.6938e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 43, time 950.69 s: f = -0.273111266609, ‖∇f‖ = 9.0725e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 44, time 951.52 s: f = -0.273121071175, ‖∇f‖ = 1.2386e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 45, time 952.75 s: f = -0.273137645098, ‖∇f‖ = 1.2942e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 46, time 954.38 s: f = -0.273141136808, ‖∇f‖ = 1.4282e-02, α = 1.35e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 47, time 955.21 s: f = -0.273154777599, ‖∇f‖ = 7.0317e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 48, time 956.45 s: f = -0.273161148021, ‖∇f‖ = 3.4952e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 49, time 957.25 s: f = -0.273164175099, ‖∇f‖ = 4.7738e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 50, time 958.05 s: f = -0.273166242670, ‖∇f‖ = 5.4242e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 51, time 958.87 s: f = -0.273168481006, ‖∇f‖ = 3.6862e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 52, time 960.08 s: f = -0.273172228386, ‖∇f‖ = 4.8463e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 53, time 960.89 s: f = -0.273174650673, ‖∇f‖ = 6.4469e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 54, time 961.70 s: f = -0.273178852481, ‖∇f‖ = 7.4990e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 55, time 962.53 s: f = -0.273186651745, ‖∇f‖ = 8.2158e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 56, time 963.75 s: f = -0.273190544009, ‖∇f‖ = 8.6751e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 57, time 964.56 s: f = -0.273194527074, ‖∇f‖ = 2.7365e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 58, time 965.37 s: f = -0.273195816168, ‖∇f‖ = 2.9114e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 59, time 966.18 s: f = -0.273197625913, ‖∇f‖ = 3.0896e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 60, time 967.41 s: f = -0.273198605154, ‖∇f‖ = 1.0394e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 61, time 968.22 s: f = -0.273202461926, ‖∇f‖ = 3.0652e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 62, time 969.02 s: f = -0.273203714519, ‖∇f‖ = 2.0133e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 63, time 969.84 s: f = -0.273204828019, ‖∇f‖ = 2.5951e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 64, time 971.87 s: f = -0.273205465822, ‖∇f‖ = 4.1444e-03, α = 4.87e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 65, time 972.65 s: f = -0.273206458356, ‖∇f‖ = 2.9919e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 66, time 973.47 s: f = -0.273208249293, ‖∇f‖ = 1.6948e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 67, time 974.69 s: f = -0.273208839969, ‖∇f‖ = 3.0193e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 68, time 975.49 s: f = -0.273209433106, ‖∇f‖ = 1.8534e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 69, time 976.27 s: f = -0.273210019598, ‖∇f‖ = 1.7898e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 70, time 977.09 s: f = -0.273211075315, ‖∇f‖ = 2.7930e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 71, time 978.32 s: f = -0.273212703695, ‖∇f‖ = 3.6612e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 72, time 979.12 s: f = -0.273214163920, ‖∇f‖ = 6.1973e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 73, time 979.94 s: f = -0.273216147362, ‖∇f‖ = 2.7120e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 74, time 980.73 s: f = -0.273217199407, ‖∇f‖ = 2.2842e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 75, time 981.95 s: f = -0.273218358117, ‖∇f‖ = 3.0566e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 76, time 982.76 s: f = -0.273219638996, ‖∇f‖ = 3.8811e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 77, time 983.57 s: f = -0.273221240011, ‖∇f‖ = 4.4440e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 78, time 984.38 s: f = -0.273222619191, ‖∇f‖ = 2.8356e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 79, time 985.61 s: f = -0.273223777532, ‖∇f‖ = 2.2842e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 80, time 986.43 s: f = -0.273224631407, ‖∇f‖ = 2.6013e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 81, time 987.24 s: f = -0.273225621866, ‖∇f‖ = 2.7625e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 82, time 988.05 s: f = -0.273226222472, ‖∇f‖ = 2.5785e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 83, time 989.25 s: f = -0.273226603039, ‖∇f‖ = 1.2203e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 84, time 990.08 s: f = -0.273226890308, ‖∇f‖ = 1.1848e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 85, time 990.90 s: f = -0.273227256564, ‖∇f‖ = 1.8281e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 86, time 991.73 s: f = -0.273227922952, ‖∇f‖ = 2.0191e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 87, time 993.80 s: f = -0.273228177117, ‖∇f‖ = 2.7409e-03, α = 3.30e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 88, time 994.60 s: f = -0.273228564518, ‖∇f‖ = 1.5762e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 89, time 995.41 s: f = -0.273228984011, ‖∇f‖ = 1.3435e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 90, time 996.63 s: f = -0.273229366257, ‖∇f‖ = 1.9460e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 91, time 997.45 s: f = -0.273230207912, ‖∇f‖ = 2.9080e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 92, time 998.27 s: f = -0.273231202568, ‖∇f‖ = 3.4541e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 93, time 999.09 s: f = -0.273232085510, ‖∇f‖ = 1.8388e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 94, time 1000.31 s: f = -0.273232631167, ‖∇f‖ = 1.1594e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 95, time 1001.12 s: f = -0.273232992148, ‖∇f‖ = 1.7787e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 96, time 1001.92 s: f = -0.273233316686, ‖∇f‖ = 1.5449e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 97, time 1002.73 s: f = -0.273233676058, ‖∇f‖ = 1.8482e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 98, time 1003.93 s: f = -0.273233957076, ‖∇f‖ = 1.5452e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 99, time 1004.72 s: f = -0.273234130308, ‖∇f‖ = 1.2047e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 100, time 1005.53 s: f = -0.273234491906, ‖∇f‖ = 1.3723e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 101, time 1006.35 s: f = -0.273234862722, ‖∇f‖ = 2.2468e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 102, time 1007.57 s: f = -0.273235395986, ‖∇f‖ = 1.8201e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 103, time 1008.37 s: f = -0.273235884374, ‖∇f‖ = 1.7284e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 104, time 1009.18 s: f = -0.273236273215, ‖∇f‖ = 1.3732e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 105, time 1009.99 s: f = -0.273236575790, ‖∇f‖ = 1.4651e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 106, time 1011.19 s: f = -0.273236948216, ‖∇f‖ = 1.8153e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 107, time 1012.02 s: f = -0.273237435467, ‖∇f‖ = 2.6401e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 108, time 1012.84 s: f = -0.273237969174, ‖∇f‖ = 1.3197e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 109, time 1013.67 s: f = -0.273238333588, ‖∇f‖ = 1.0300e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 110, time 1014.92 s: f = -0.273238606412, ‖∇f‖ = 1.3512e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 111, time 1015.73 s: f = -0.273238763494, ‖∇f‖ = 2.0868e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 112, time 1016.54 s: f = -0.273238992097, ‖∇f‖ = 1.0034e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 113, time 1017.35 s: f = -0.273239242010, ‖∇f‖ = 1.0445e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 114, time 1018.57 s: f = -0.273239539038, ‖∇f‖ = 1.4904e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 115, time 1019.40 s: f = -0.273239986741, ‖∇f‖ = 1.4425e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 116, time 1021.07 s: f = -0.273240116483, ‖∇f‖ = 1.9754e-03, α = 2.24e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 117, time 1022.30 s: f = -0.273240380183, ‖∇f‖ = 9.8175e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 118, time 1023.10 s: f = -0.273240575426, ‖∇f‖ = 8.6345e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 119, time 1023.89 s: f = -0.273240832012, ‖∇f‖ = 1.4287e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 120, time 1025.08 s: f = -0.273241210750, ‖∇f‖ = 1.8219e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 121, time 1026.69 s: f = -0.273241482573, ‖∇f‖ = 2.4856e-03, α = 5.47e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 122, time 1027.52 s: f = -0.273241934058, ‖∇f‖ = 1.5033e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 123, time 1028.76 s: f = -0.273242166393, ‖∇f‖ = 1.2112e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 124, time 1029.60 s: f = -0.273242322900, ‖∇f‖ = 1.0134e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 125, time 1030.42 s: f = -0.273242508033, ‖∇f‖ = 1.0745e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 126, time 1031.25 s: f = -0.273242887106, ‖∇f‖ = 2.1256e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 127, time 1032.50 s: f = -0.273243341793, ‖∇f‖ = 1.6582e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 128, time 1033.36 s: f = -0.273243624575, ‖∇f‖ = 1.0434e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 129, time 1034.21 s: f = -0.273243926598, ‖∇f‖ = 1.0170e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 130, time 1035.04 s: f = -0.273244130570, ‖∇f‖ = 1.7663e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 131, time 1036.26 s: f = -0.273244384615, ‖∇f‖ = 1.4424e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 132, time 1037.09 s: f = -0.273244721419, ‖∇f‖ = 1.5925e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 133, time 1037.89 s: f = -0.273244883706, ‖∇f‖ = 1.0143e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 134, time 1038.72 s: f = -0.273244978610, ‖∇f‖ = 9.4449e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 135, time 1039.94 s: f = -0.273245503204, ‖∇f‖ = 1.2344e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 136, time 1040.77 s: f = -0.273245739413, ‖∇f‖ = 2.7009e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 137, time 1041.57 s: f = -0.273246059451, ‖∇f‖ = 1.4108e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 138, time 1042.39 s: f = -0.273246259501, ‖∇f‖ = 6.7238e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 139, time 1043.60 s: f = -0.273246408570, ‖∇f‖ = 9.2687e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 140, time 1044.40 s: f = -0.273246576606, ‖∇f‖ = 1.2150e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 141, time 1045.21 s: f = -0.273246729060, ‖∇f‖ = 1.3157e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 142, time 1046.03 s: f = -0.273246873413, ‖∇f‖ = 7.6123e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 143, time 1047.24 s: f = -0.273247027465, ‖∇f‖ = 7.9430e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 144, time 1048.05 s: f = -0.273247180548, ‖∇f‖ = 1.0894e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 145, time 1048.85 s: f = -0.273247387426, ‖∇f‖ = 2.2553e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 146, time 1049.65 s: f = -0.273247645050, ‖∇f‖ = 1.1468e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 147, time 1050.86 s: f = -0.273247846912, ‖∇f‖ = 9.1650e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 148, time 1051.65 s: f = -0.273248001067, ‖∇f‖ = 8.8945e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 149, time 1052.47 s: f = -0.273248315567, ‖∇f‖ = 1.2684e-03, α = 1.00e+00, m = 20, nfg = 1 -┌ Warning: LBFGS: not converged to requested tol after 150 iterations and time 1054.49 s: f = -0.273248467359, ‖∇f‖ = 1.1430e-03 +[ Info: LBFGS: iter 6, time 1514.64 s: f = -0.152937922237, ‖∇f‖ = 1.2509e+00, α = 4.20e-02, m = 5, nfg = 3 +[ Info: LBFGS: iter 7, time 1538.19 s: f = -0.167923544087, ‖∇f‖ = 3.0315e+00, α = 3.97e-01, m = 6, nfg = 4 +[ Info: LBFGS: iter 8, time 1544.27 s: f = -0.200656150027, ‖∇f‖ = 8.4469e-01, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 9, time 1550.09 s: f = -0.214889985053, ‖∇f‖ = 5.6025e-01, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 10, time 1555.20 s: f = -0.222943109801, ‖∇f‖ = 9.7822e-01, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 11, time 1560.12 s: f = -0.230726654816, ‖∇f‖ = 4.2339e-01, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 12, time 1564.37 s: f = -0.238162325681, ‖∇f‖ = 2.5749e-01, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 13, time 1568.87 s: f = -0.247343408520, ‖∇f‖ = 3.2371e-01, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 14, time 1572.04 s: f = -0.253866737463, ‖∇f‖ = 2.4010e-01, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 15, time 1574.25 s: f = -0.261289395453, ‖∇f‖ = 3.4176e-01, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 16, time 1576.55 s: f = -0.267194174286, ‖∇f‖ = 2.0409e-01, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 17, time 1579.49 s: f = -0.269427456764, ‖∇f‖ = 1.4197e-01, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 18, time 1582.43 s: f = -0.270261160270, ‖∇f‖ = 7.8704e-02, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 19, time 1585.67 s: f = -0.270680108511, ‖∇f‖ = 6.2948e-02, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 20, time 1587.48 s: f = -0.271217770832, ‖∇f‖ = 9.0237e-02, α = 1.00e+00, m = 19, nfg = 1 +[ Info: LBFGS: iter 21, time 1589.30 s: f = -0.271547867503, ‖∇f‖ = 4.3177e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 22, time 1591.06 s: f = -0.271652426217, ‖∇f‖ = 3.3993e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 23, time 1592.87 s: f = -0.271919640568, ‖∇f‖ = 3.6522e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 24, time 1595.28 s: f = -0.272079486038, ‖∇f‖ = 4.0652e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 25, time 1597.07 s: f = -0.272236289070, ‖∇f‖ = 2.8052e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 26, time 1598.85 s: f = -0.272374999395, ‖∇f‖ = 2.3005e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 27, time 1600.57 s: f = -0.272451064713, ‖∇f‖ = 2.8468e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 28, time 1602.31 s: f = -0.272553269910, ‖∇f‖ = 2.2120e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 29, time 1604.70 s: f = -0.272753621227, ‖∇f‖ = 2.5836e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 30, time 1606.49 s: f = -0.272791434353, ‖∇f‖ = 3.8796e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 31, time 1608.64 s: f = -0.272830578966, ‖∇f‖ = 1.7177e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 32, time 1610.36 s: f = -0.272860065057, ‖∇f‖ = 1.0765e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 33, time 1612.11 s: f = -0.272917839871, ‖∇f‖ = 1.7521e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 34, time 1614.49 s: f = -0.272987230891, ‖∇f‖ = 2.0873e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 35, time 1618.14 s: f = -0.273018580221, ‖∇f‖ = 2.6969e-02, α = 4.93e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 36, time 1619.92 s: f = -0.273067382640, ‖∇f‖ = 1.0394e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 37, time 1621.67 s: f = -0.273081112333, ‖∇f‖ = 6.3470e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 38, time 1624.62 s: f = -0.273087245911, ‖∇f‖ = 9.2635e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 39, time 1627.04 s: f = -0.273091551053, ‖∇f‖ = 5.4087e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 40, time 1628.83 s: f = -0.273095914939, ‖∇f‖ = 4.9572e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 41, time 1630.65 s: f = -0.273099955057, ‖∇f‖ = 6.8773e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 42, time 1632.49 s: f = -0.273103689409, ‖∇f‖ = 5.7556e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 43, time 1635.42 s: f = -0.273109236879, ‖∇f‖ = 6.0202e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 44, time 1637.40 s: f = -0.273117603189, ‖∇f‖ = 1.3781e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 45, time 1639.26 s: f = -0.273127462131, ‖∇f‖ = 8.3496e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 46, time 1641.14 s: f = -0.273135749952, ‖∇f‖ = 7.4036e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 47, time 1643.02 s: f = -0.273146331612, ‖∇f‖ = 8.4981e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 48, time 1646.14 s: f = -0.273156439074, ‖∇f‖ = 1.0154e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 49, time 1648.15 s: f = -0.273161861296, ‖∇f‖ = 9.8380e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 50, time 1650.64 s: f = -0.273166241637, ‖∇f‖ = 4.6402e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 51, time 1652.47 s: f = -0.273167844104, ‖∇f‖ = 2.8874e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 52, time 1654.33 s: f = -0.273169393956, ‖∇f‖ = 3.8294e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 53, time 1656.30 s: f = -0.273172294889, ‖∇f‖ = 5.1406e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 54, time 1658.20 s: f = -0.273176654891, ‖∇f‖ = 5.3195e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 55, time 1662.84 s: f = -0.273178415582, ‖∇f‖ = 6.2372e-03, α = 2.39e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 56, time 1664.87 s: f = -0.273182983220, ‖∇f‖ = 3.8458e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 57, time 1667.76 s: f = -0.273187408223, ‖∇f‖ = 4.3379e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 58, time 1670.67 s: f = -0.273193071706, ‖∇f‖ = 4.4117e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 59, time 1677.19 s: f = -0.273196045493, ‖∇f‖ = 7.7711e-03, α = 5.06e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 60, time 1680.08 s: f = -0.273199424947, ‖∇f‖ = 4.9415e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 61, time 1683.00 s: f = -0.273202267976, ‖∇f‖ = 3.1402e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 62, time 1685.95 s: f = -0.273203233848, ‖∇f‖ = 2.8294e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 63, time 1688.99 s: f = -0.273204600698, ‖∇f‖ = 2.5656e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 64, time 1690.74 s: f = -0.273204925101, ‖∇f‖ = 5.2974e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 65, time 1692.46 s: f = -0.273205966860, ‖∇f‖ = 2.2643e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 66, time 1694.15 s: f = -0.273206609644, ‖∇f‖ = 2.0621e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 67, time 1696.07 s: f = -0.273207765008, ‖∇f‖ = 3.3333e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 68, time 1698.43 s: f = -0.273209290000, ‖∇f‖ = 3.6314e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 69, time 1700.21 s: f = -0.273210336569, ‖∇f‖ = 6.9802e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 70, time 1702.00 s: f = -0.273212030217, ‖∇f‖ = 1.7588e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 71, time 1703.84 s: f = -0.273212480151, ‖∇f‖ = 1.4240e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 72, time 1705.62 s: f = -0.273213078023, ‖∇f‖ = 2.0765e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 73, time 1707.64 s: f = -0.273213880125, ‖∇f‖ = 3.5718e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 74, time 1709.94 s: f = -0.273215045145, ‖∇f‖ = 2.5061e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 75, time 1711.78 s: f = -0.273216916331, ‖∇f‖ = 1.9910e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 76, time 1714.09 s: f = -0.273218689353, ‖∇f‖ = 4.3844e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 77, time 1715.84 s: f = -0.273220202940, ‖∇f‖ = 4.1041e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 78, time 1718.07 s: f = -0.273221806934, ‖∇f‖ = 3.5949e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 79, time 1720.70 s: f = -0.273222485563, ‖∇f‖ = 6.0992e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 80, time 1722.96 s: f = -0.273223791530, ‖∇f‖ = 1.9925e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 81, time 1725.87 s: f = -0.273224262076, ‖∇f‖ = 1.5944e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 82, time 1727.62 s: f = -0.273224852979, ‖∇f‖ = 2.0007e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 83, time 1729.37 s: f = -0.273225773728, ‖∇f‖ = 2.1761e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 84, time 1733.14 s: f = -0.273226388165, ‖∇f‖ = 2.9882e-03, α = 5.20e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 85, time 1735.79 s: f = -0.273227173575, ‖∇f‖ = 1.8724e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 86, time 1737.55 s: f = -0.273227751786, ‖∇f‖ = 1.7098e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 87, time 1739.32 s: f = -0.273228422942, ‖∇f‖ = 1.5751e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 88, time 1742.26 s: f = -0.273229395977, ‖∇f‖ = 1.8136e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 89, time 1747.19 s: f = -0.273229821385, ‖∇f‖ = 2.4985e-03, α = 3.36e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 90, time 1749.35 s: f = -0.273230528832, ‖∇f‖ = 1.6082e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 91, time 1751.23 s: f = -0.273231112443, ‖∇f‖ = 1.5216e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 92, time 1753.03 s: f = -0.273231613563, ‖∇f‖ = 2.6699e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 93, time 1754.77 s: f = -0.273232215697, ‖∇f‖ = 1.4347e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 94, time 1757.16 s: f = -0.273233125782, ‖∇f‖ = 1.7764e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 95, time 1758.93 s: f = -0.273233450052, ‖∇f‖ = 2.7567e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 96, time 1760.68 s: f = -0.273233803468, ‖∇f‖ = 1.2666e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 97, time 1762.45 s: f = -0.273234086238, ‖∇f‖ = 1.0932e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 98, time 1764.25 s: f = -0.273234487308, ‖∇f‖ = 1.5990e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 99, time 1766.67 s: f = -0.273234975900, ‖∇f‖ = 1.6599e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 100, time 1770.23 s: f = -0.273235076855, ‖∇f‖ = 1.8653e-03, α = 1.62e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 101, time 1772.10 s: f = -0.273235308827, ‖∇f‖ = 9.8269e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 102, time 1773.99 s: f = -0.273235461843, ‖∇f‖ = 8.3532e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 103, time 1776.37 s: f = -0.273235703016, ‖∇f‖ = 1.3504e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 104, time 1778.12 s: f = -0.273236030970, ‖∇f‖ = 1.7152e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 105, time 1779.89 s: f = -0.273236666544, ‖∇f‖ = 1.9163e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 106, time 1781.63 s: f = -0.273237201871, ‖∇f‖ = 2.0606e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 107, time 1783.47 s: f = -0.273237605262, ‖∇f‖ = 1.2100e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 108, time 1785.84 s: f = -0.273237923146, ‖∇f‖ = 1.1911e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 109, time 1787.60 s: f = -0.273238474676, ‖∇f‖ = 1.5922e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 110, time 1789.38 s: f = -0.273239020165, ‖∇f‖ = 3.5400e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 111, time 1791.17 s: f = -0.273239721493, ‖∇f‖ = 1.5841e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 112, time 1792.95 s: f = -0.273240056185, ‖∇f‖ = 8.1807e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 113, time 1795.44 s: f = -0.273240176875, ‖∇f‖ = 8.2119e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 114, time 1797.22 s: f = -0.273240388391, ‖∇f‖ = 9.1300e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 115, time 1798.98 s: f = -0.273240719099, ‖∇f‖ = 1.3486e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 116, time 1800.75 s: f = -0.273241124067, ‖∇f‖ = 1.8644e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 117, time 1802.52 s: f = -0.273241441776, ‖∇f‖ = 1.1376e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 118, time 1805.03 s: f = -0.273241674928, ‖∇f‖ = 1.0744e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 119, time 1807.43 s: f = -0.273242054196, ‖∇f‖ = 1.3968e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 120, time 1809.19 s: f = -0.273242373511, ‖∇f‖ = 3.4093e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 121, time 1810.97 s: f = -0.273242838731, ‖∇f‖ = 1.6035e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 122, time 1813.28 s: f = -0.273243220149, ‖∇f‖ = 1.0189e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 123, time 1815.64 s: f = -0.273243410574, ‖∇f‖ = 1.0299e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 124, time 1818.49 s: f = -0.273243873822, ‖∇f‖ = 1.5353e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 125, time 1822.08 s: f = -0.273244136936, ‖∇f‖ = 1.3969e-03, α = 4.63e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 126, time 1824.72 s: f = -0.273244383827, ‖∇f‖ = 6.9496e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 127, time 1826.72 s: f = -0.273244536785, ‖∇f‖ = 6.2695e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 128, time 1828.67 s: f = -0.273244685913, ‖∇f‖ = 1.3081e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 129, time 1830.62 s: f = -0.273244940432, ‖∇f‖ = 9.2142e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 130, time 1832.67 s: f = -0.273245349898, ‖∇f‖ = 9.5066e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 131, time 1835.35 s: f = -0.273245602436, ‖∇f‖ = 2.1118e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 132, time 1837.11 s: f = -0.273245856212, ‖∇f‖ = 9.4425e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 133, time 1838.84 s: f = -0.273245974747, ‖∇f‖ = 7.2475e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 134, time 1840.59 s: f = -0.273246213451, ‖∇f‖ = 1.0622e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 135, time 1842.36 s: f = -0.273246353289, ‖∇f‖ = 2.1630e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 136, time 1844.66 s: f = -0.273246531186, ‖∇f‖ = 1.0798e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 137, time 1846.38 s: f = -0.273246646636, ‖∇f‖ = 5.4376e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 138, time 1848.11 s: f = -0.273246688623, ‖∇f‖ = 5.9696e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 139, time 1849.88 s: f = -0.273246849584, ‖∇f‖ = 1.0371e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 140, time 1851.66 s: f = -0.273246989170, ‖∇f‖ = 2.0820e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 141, time 1853.95 s: f = -0.273247216059, ‖∇f‖ = 1.2002e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 142, time 1855.75 s: f = -0.273247413465, ‖∇f‖ = 7.8638e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 143, time 1857.53 s: f = -0.273247523052, ‖∇f‖ = 7.4363e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 144, time 1859.32 s: f = -0.273247723357, ‖∇f‖ = 9.7224e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 145, time 1861.14 s: f = -0.273247872194, ‖∇f‖ = 2.6987e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 146, time 1863.03 s: f = -0.273248167442, ‖∇f‖ = 1.3795e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 147, time 1865.26 s: f = -0.273248387392, ‖∇f‖ = 8.2588e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 148, time 1867.08 s: f = -0.273248518043, ‖∇f‖ = 8.5059e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 149, time 1868.86 s: f = -0.273248701939, ‖∇f‖ = 9.1018e-04, α = 1.00e+00, m = 20, nfg = 1 +┌ Warning: LBFGS: not converged to requested tol after 150 iterations and time 1871.22 s: f = -0.273248873410, ‖∇f‖ = 1.7740e-03 └ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/lbfgs.jl:197 -E = -0.2732484673593871 +E = -0.2732488734104027 ```` @@ -320,7 +320,7 @@ E_ref = -0.273284888 ```` ```` -(E - E_ref) / E_ref = -0.00013326986676584008 +(E - E_ref) / E_ref = -0.00013178405092523278 ```` diff --git a/docs/src/examples/bose_hubbard/main.ipynb b/docs/src/examples/bose_hubbard/main.ipynb index 2b703735d..918f4ef96 100644 --- a/docs/src/examples/bose_hubbard/main.ipynb +++ b/docs/src/examples/bose_hubbard/main.ipynb @@ -247,11 +247,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.11.4" + "version": "1.10.4" }, "kernelspec": { - "name": "julia-1.11", - "display_name": "Julia 1.11.4", + "name": "julia-1.10", + "display_name": "Julia 1.10.4", "language": "julia" } }, diff --git a/docs/src/examples/boundary_mps/index.md b/docs/src/examples/boundary_mps/index.md index bcdbf46f3..7300a2918 100644 --- a/docs/src/examples/boundary_mps/index.md +++ b/docs/src/examples/boundary_mps/index.md @@ -7,30 +7,33 @@ EditURL = "../../../../examples/boundary_mps/main.jl" [![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//boundary_mps) -# Boundary MPS contractions using VUMPS and PEPOs +# [Boundary MPS contractions of 2D networks] (@id e_boundary_mps) -Instead of using CTMRG to contract an infinite PEPS, one can also use an boundary MPSs -ansatz to contract the infinite network. In particular, we will here use VUMPS to do so. +Instead of using CTMRG to contract the network encoding the norm of an infinite PEPS, one +can also use so-called [boundary MPS methods](@cite haegeman_diagonalizing_2017) to contract +this network. In this example, we will demonstrate how to use [the VUMPS algorithm](@cite +vanderstraeten_tangentspace_2019) to do so. Before we start, we'll fix the random seed for reproducability: ````julia using Random Random.seed!(29384293742893); -```` -Besides `TensorKit` and `PEPSKit`, we here also need [`MPSKit`](https://quantumkithub.github.io/MPSKit.jl/stable/) -which implements the VUMPS algorithm as well as the required MPS operations: +md""" Besides `TensorKit` and `PEPSKit`, here we also need to load the +[`MPSKit.jl`](https://quantumkithub.github.io/MPSKit.jl/stable/) package which implements a +host of tools for working with 1D matrix product states (MPS), including the VUMPS +algorithm: +""" -````julia using TensorKit, PEPSKit, MPSKit ```` ## Computing a PEPS norm -We start by initializing a random initial infinite PEPS. Let us use uniformly distributed -complex entries using `rand` (which sometimes lead to better convergence than Gaussian -distributed `randn` elements): +We start by initializing a random infinite PEPS. Let us use uniformly distributed complex +entries using `rand` (which sometimes lead to better convergence than Gaussian distributed +`randn` elements): ````julia peps₀ = InfinitePEPS(rand, ComplexF64, ComplexSpace(2), ComplexSpace(2)) @@ -72,11 +75,21 @@ InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vecto ;;]) ```` -To compute its norm, we need to construct the transfer operator corresponding to -the partition function representing the overlap $\langle \psi_\text{PEPS} | \psi_\text{PEPS} \rangle$: +To compute its norm, usually we would construct a double-layer `InfiniteSquareNetwork` which +encodes the bra-ket PEPS overlap and then contract this infinite square network, for example +using CTMRG. Here however, we will use another approach. If we take out a single row of this +infinite norm network, we can interpret it as a 2D row-to-row transfer operator ``T``. Here, +this transfer operator consists of an effective local rank-4 tensor at every site of a 2D +square lattice, where the local effective tensor is given by the contraction of a bra and +ket [`PEPSKit.PEPSTensor`](@ref) across their physical leg. Since the network we want to +contract can be interpreted as the infinite power of ``T``, we can contract it by finding +its leading eigenvector as a 1D MPS, which we call the boundary MPS. + +In PEPSKit.jl, we can directly contruct the transfer operator corresponding to a PEPS norm +network from a given infinite PEPS as an [`InfiniteTransferPEPS`](@ref) object. ````julia -transfer = InfiniteTransferPEPS(peps₀, 1, 1) +T = InfiniteTransferPEPS(peps₀, 1, 1) ```` ```` @@ -87,12 +100,14 @@ single site MPSKit.InfiniteMPO{Tuple{TensorKit.TensorMap{ComplexF64, TensorKit.C ```` -We then find its leading boundary MPS fixed point, where the corresponding eigenvalue -encodes the norm of the state. To that end, let us first we build an initial guess for the -boundary MPS, choosing a bond dimension of 20: +Since we'll find the leading eigenvector of ``T`` as a boundary MPS, we first need to +initialize an initial guess to supply to our algorithm. We can do this using the +[`initialize_mps`](@ref) function, which constructs a random MPS with a specific virtual +space for a given transfer operator. Here, we'll build an initial guess for the boundary MPS +with a bond dimension of 20: ````julia -mps₀ = initialize_mps(transfer, [ComplexSpace(20)]) +mps₀ = initialize_mps(T, [ComplexSpace(20)]) ```` ```` @@ -104,21 +119,21 @@ single site InfiniteMPS: ```` -Note that this will just construct a MPS with random Gaussian entries based on the virtual +Note that this will just construct a MPS with random Gaussian entries based on the physical spaces of the supplied transfer operator. Of course, one might come up with a better initial guess (leading to better convergence) depending on the application. To find the leading -boundary MPS fixed point, we call [`leading_boundary`](@ref) using the [VUMPS](@extref) -algorithm from MPSKit. Note that, by default, `leading_boundary` uses CTMRG where the -settings are supplied as keyword arguments, so in the present case we need to supply the -VUMPS algorithm struct explicitly: +boundary MPS fixed point, we call [`leading_boundary`](@ref) using the +[`MPSKit.VUMPS`](@extref) algorithm from MPSKit. Note that, by default, `leading_boundary` +uses CTMRG where the settings are supplied as keyword arguments, so in the present case we +need to supply the VUMPS algorithm struct explicitly: ````julia -mps, env, ϵ = leading_boundary(mps₀, transfer, VUMPS(; tol=1e-6, verbosity=2)); +mps, env, ϵ = leading_boundary(mps₀, T, VUMPS(; tol=1e-6, verbosity=2)); ```` ```` [ Info: VUMPS init: obj = +5.052950412844e+00 +1.493192627823e-02im err = 8.4684e-01 -[ Info: VUMPS conv 4: obj = +1.744071150138e+01 +2.417441557995e-08im err = 1.9047772246e-07 time = 4.31 sec +[ Info: VUMPS conv 4: obj = +1.744071150138e+01 +2.417441166152e-08im err = 1.9047772248e-07 time = 0.94 sec ```` @@ -126,11 +141,11 @@ The norm of the state per unit cell is then given by the expectation value $\langle \psi_\text{MPS} | \mathbb{T} | \psi_\text{MPS} \rangle$: ````julia -norm_vumps = abs(prod(expectation_value(mps, transfer))) +norm_vumps = abs(prod(expectation_value(mps, T))) ```` ```` -17.440711501378814 +17.440711501378782 ```` This can be compared to the result obtained using CTMRG, where we see that the results match: @@ -144,37 +159,37 @@ norm_ctmrg = abs(norm(peps₀, env_ctmrg)) ```` ```` -[ Info: CTMRG init: obj = -5.556349490423e-01 +1.605938670370e+00im err = 1.0000e+00 -[ Info: CTMRG conv 37: obj = +1.744071151099e+01 err = 3.2056303631e-07 time = 5.81 sec -abs(norm_vumps - norm_ctmrg) / norm_vumps = 5.510362083182129e-10 +[ Info: CTMRG init: obj = -5.571758356204e-01 +1.608051219314e+00im err = 1.0000e+00 +[ Info: CTMRG conv 31: obj = +1.744071151099e+01 err = 1.5225866698e-07 time = 2.49 sec +abs(norm_vumps - norm_ctmrg) / norm_vumps = 5.510376342345678e-10 ```` ## Working with unit cells For PEPS with non-trivial unit cells, the principle is exactly the same. The only difference -is that now the transfer operator of the PEPS norm partition function has multiple lines, -each of which can be represented by an [`InfiniteTransferPEPS`](@ref) object. Such a -multi-line transfer operator is represented by a `MultilineTransferPEPS` object. In this +is that now the transfer operator of the PEPS norm partition function has multiple rows or +'lines', each of which can be represented by an [`InfiniteTransferPEPS`](@ref) object. Such +a multi-line transfer operator is represented by a `MultilineTransferPEPS` object. In this case, the boundary MPS is an [`MultilineMPS`](@extref) object, which should be initialized by specifying a virtual space for each site in the partition function unit cell. First, we construct a PEPS with a $2 \times 2$ unit cell using the `unitcell` keyword -argument and then define the corresponding transfer PEPS: +argument and then define the corresponding transfer operator: ````julia peps₀_2x2 = InfinitePEPS( rand, ComplexF64, ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2) ) -transfer_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1); +T_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1); ```` Now, the procedure is the same as before: We compute the norm once using VUMPS, once using CTMRG and then compare. ````julia -mps₀_2x2 = initialize_mps(transfer_2x2, fill(ComplexSpace(20), 2, 2)) -mps_2x2, = leading_boundary(mps₀_2x2, transfer_2x2, VUMPS(; tol=1e-6, verbosity=2)) -norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, transfer_2x2))) +mps₀_2x2 = initialize_mps(T_2x2, fill(ComplexSpace(20), 2, 2)) +mps_2x2, = leading_boundary(mps₀_2x2, T_2x2, VUMPS(; tol=1e-6, verbosity=2)) +norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, T_2x2))) env_ctmrg_2x2, = leading_boundary( CTMRGEnv(peps₀_2x2, ComplexSpace(20)), peps₀_2x2; tol=1e-6, verbosity=2 @@ -185,24 +200,26 @@ norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2)) ```` ```` -[ Info: VUMPS init: obj = +6.668046237341e+02 -1.267878277078e+01im err = 8.7901e-01 -[ Info: VUMPS conv 69: obj = +9.723958968917e+04 -3.481605377714e-03im err = 6.3841720875e-07 time = 4.18 sec -[ Info: CTMRG init: obj = +1.074898090007e+03 -2.096255594496e+02im err = 1.0000e+00 -[ Info: CTMRG conv 41: obj = +9.723959008610e+04 err = 6.0518230963e-07 time = 1.73 sec -abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps = 4.08201516090106e-9 +[ Info: VUMPS init: obj = +6.462580940431e+02 -1.088925136214e+02im err = 8.6506e-01 +┌ Warning: VUMPS cancel 200: obj = +9.724487741058e+04 +1.904137949329e+00im err = 5.9545749280e-04 time = 1.61 min +└ @ MPSKit ~/.julia/packages/MPSKit/EfZBD/src/algorithms/statmech/vumps.jl:51 +[ Info: CTMRG init: obj = -7.927906985598e-02 +1.728135792446e+00im err = 1.0000e+00 +[ Info: CTMRG conv 53: obj = +9.723959008610e+04 err = 1.8278113657e-07 time = 9.86 sec +abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps = 5.437143071679346e-5 ```` Again, the results are compatible. Note that for larger unit cells and non-Hermitian PEPS -the VUMPS algorithm may become unstable, in which case the CTMRG algorithm is recommended. +[the VUMPS algorithm may become unstable](@cite vanderstraeten_variational_2021), in which +case the CTMRG algorithm is recommended. ## Contracting PEPO overlaps -Using exactly the same machinery, we can contract partition functions which encode the -expectation value of a PEPO for a given PEPS state. As an example, we can consider the -overlap of the PEPO correponding to the partition function of 3D classical Ising model with -our random PEPS from before and evaluate the overlap -$\langle \psi_\text{PEPS} | O_\text{PEPO} | \psi_\text{PEPS} \rangle$. +Using exactly the same machinery, we can contract 2D networks which encode the expectation +value of a PEPO for a given PEPS state. As an example, we can consider the overlap of the +PEPO correponding to the partition function of [3D classical Ising model](@ref e_3d_ising) +with our random PEPS from before and evaluate the overlap $\langle \psi_\text{PEPS} | +O_\text{PEPO} | \psi_\text{PEPS} \rangle$. The classical Ising PEPO is defined as follows: @@ -248,9 +265,9 @@ norm_pepo = abs(prod(expectation_value(mps_pepo, transfer_pepo))); ```` ```` -[ Info: VUMPS init: obj = +3.309203535702e+01 -4.227375981212e-01im err = 9.3280e-01 -[ Info: VUMPS conv 5: obj = +2.483696258643e+02 +2.387851822319e-07im err = 5.0174146749e-08 time = 2.84 sec -norm_pepo = 248.36962586428106 +[ Info: VUMPS init: obj = +3.726983052001e+01 +3.098676794848e-02im err = 9.2460e-01 +[ Info: VUMPS conv 5: obj = +2.483696260467e+02 +5.249041643967e-07im err = 1.7125391303e-08 time = 4.32 sec +norm_pepo = 248.36962604668662 ```` diff --git a/docs/src/examples/boundary_mps/main.ipynb b/docs/src/examples/boundary_mps/main.ipynb index 4c0654149..8e4dd70d3 100644 --- a/docs/src/examples/boundary_mps/main.ipynb +++ b/docs/src/examples/boundary_mps/main.ipynb @@ -12,10 +12,12 @@ { "cell_type": "markdown", "source": [ - "# Boundary MPS contractions using VUMPS and PEPOs\n", + "# [Boundary MPS contractions of 2D networks] (@id e_boundary_mps)\n", "\n", - "Instead of using CTMRG to contract an infinite PEPS, one can also use an boundary MPSs\n", - "ansatz to contract the infinite network. In particular, we will here use VUMPS to do so.\n", + "Instead of using CTMRG to contract the network encoding the norm of an infinite PEPS, one\n", + "can also use so-called [boundary MPS methods](@cite haegeman_diagonalizing_2017) to contract\n", + "this network. In this example, we will demonstrate how to use [the VUMPS algorithm](@cite\n", + "vanderstraeten_tangentspace_2019) to do so.\n", "\n", "Before we start, we'll fix the random seed for reproducability:" ], @@ -26,23 +28,14 @@ "cell_type": "code", "source": [ "using Random\n", - "Random.seed!(29384293742893);" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Besides `TensorKit` and `PEPSKit`, we here also need [`MPSKit`](https://quantumkithub.github.io/MPSKit.jl/stable/)\n", - "which implements the VUMPS algorithm as well as the required MPS operations:" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ + "Random.seed!(29384293742893);\n", + "\n", + "md\"\"\" Besides `TensorKit` and `PEPSKit`, here we also need to load the\n", + "[`MPSKit.jl`](https://quantumkithub.github.io/MPSKit.jl/stable/) package which implements a\n", + "host of tools for working with 1D matrix product states (MPS), including the VUMPS\n", + "algorithm:\n", + "\"\"\"\n", + "\n", "using TensorKit, PEPSKit, MPSKit" ], "metadata": {}, @@ -53,9 +46,9 @@ "source": [ "## Computing a PEPS norm\n", "\n", - "We start by initializing a random initial infinite PEPS. Let us use uniformly distributed\n", - "complex entries using `rand` (which sometimes lead to better convergence than Gaussian\n", - "distributed `randn` elements):" + "We start by initializing a random infinite PEPS. Let us use uniformly distributed complex\n", + "entries using `rand` (which sometimes lead to better convergence than Gaussian distributed\n", + "`randn` elements):" ], "metadata": {} }, @@ -71,8 +64,18 @@ { "cell_type": "markdown", "source": [ - "To compute its norm, we need to construct the transfer operator corresponding to\n", - "the partition function representing the overlap $\\langle \\psi_\\text{PEPS} | \\psi_\\text{PEPS} \\rangle$:" + "To compute its norm, usually we would construct a double-layer `InfiniteSquareNetwork` which\n", + "encodes the bra-ket PEPS overlap and then contract this infinite square network, for example\n", + "using CTMRG. Here however, we will use another approach. If we take out a single row of this\n", + "infinite norm network, we can interpret it as a 2D row-to-row transfer operator $T$. Here,\n", + "this transfer operator consists of an effective local rank-4 tensor at every site of a 2D\n", + "square lattice, where the local effective tensor is given by the contraction of a bra and\n", + "ket `PEPSKit.PEPSTensor` across their physical leg. Since the network we want to\n", + "contract can be interpreted as the infinite power of $T$, we can contract it by finding\n", + "its leading eigenvector as a 1D MPS, which we call the boundary MPS.\n", + "\n", + "In PEPSKit.jl, we can directly contruct the transfer operator corresponding to a PEPS norm\n", + "network from a given infinite PEPS as an `InfiniteTransferPEPS` object." ], "metadata": {} }, @@ -80,7 +83,7 @@ "outputs": [], "cell_type": "code", "source": [ - "transfer = InfiniteTransferPEPS(peps₀, 1, 1)" + "T = InfiniteTransferPEPS(peps₀, 1, 1)" ], "metadata": {}, "execution_count": null @@ -88,9 +91,11 @@ { "cell_type": "markdown", "source": [ - "We then find its leading boundary MPS fixed point, where the corresponding eigenvalue\n", - "encodes the norm of the state. To that end, let us first we build an initial guess for the\n", - "boundary MPS, choosing a bond dimension of 20:" + "Since we'll find the leading eigenvector of $T$ as a boundary MPS, we first need to\n", + "initialize an initial guess to supply to our algorithm. We can do this using the\n", + "`initialize_mps` function, which constructs a random MPS with a specific virtual\n", + "space for a given transfer operator. Here, we'll build an initial guess for the boundary MPS\n", + "with a bond dimension of 20:" ], "metadata": {} }, @@ -98,7 +103,7 @@ "outputs": [], "cell_type": "code", "source": [ - "mps₀ = initialize_mps(transfer, [ComplexSpace(20)])" + "mps₀ = initialize_mps(T, [ComplexSpace(20)])" ], "metadata": {}, "execution_count": null @@ -106,13 +111,13 @@ { "cell_type": "markdown", "source": [ - "Note that this will just construct a MPS with random Gaussian entries based on the virtual\n", + "Note that this will just construct a MPS with random Gaussian entries based on the physical\n", "spaces of the supplied transfer operator. Of course, one might come up with a better initial\n", "guess (leading to better convergence) depending on the application. To find the leading\n", - "boundary MPS fixed point, we call `leading_boundary` using the VUMPS\n", - "algorithm from MPSKit. Note that, by default, `leading_boundary` uses CTMRG where the\n", - "settings are supplied as keyword arguments, so in the present case we need to supply the\n", - "VUMPS algorithm struct explicitly:" + "boundary MPS fixed point, we call `leading_boundary` using the\n", + "`MPSKit.VUMPS` algorithm from MPSKit. Note that, by default, `leading_boundary`\n", + "uses CTMRG where the settings are supplied as keyword arguments, so in the present case we\n", + "need to supply the VUMPS algorithm struct explicitly:" ], "metadata": {} }, @@ -120,7 +125,7 @@ "outputs": [], "cell_type": "code", "source": [ - "mps, env, ϵ = leading_boundary(mps₀, transfer, VUMPS(; tol=1e-6, verbosity=2));" + "mps, env, ϵ = leading_boundary(mps₀, T, VUMPS(; tol=1e-6, verbosity=2));" ], "metadata": {}, "execution_count": null @@ -137,7 +142,7 @@ "outputs": [], "cell_type": "code", "source": [ - "norm_vumps = abs(prod(expectation_value(mps, transfer)))" + "norm_vumps = abs(prod(expectation_value(mps, T)))" ], "metadata": {}, "execution_count": null @@ -168,14 +173,14 @@ "## Working with unit cells\n", "\n", "For PEPS with non-trivial unit cells, the principle is exactly the same. The only difference\n", - "is that now the transfer operator of the PEPS norm partition function has multiple lines,\n", - "each of which can be represented by an `InfiniteTransferPEPS` object. Such a\n", - "multi-line transfer operator is represented by a `MultilineTransferPEPS` object. In this\n", + "is that now the transfer operator of the PEPS norm partition function has multiple rows or\n", + "'lines', each of which can be represented by an `InfiniteTransferPEPS` object. Such\n", + "a multi-line transfer operator is represented by a `MultilineTransferPEPS` object. In this\n", "case, the boundary MPS is an `MultilineMPS` object, which should be initialized\n", "by specifying a virtual space for each site in the partition function unit cell.\n", "\n", "First, we construct a PEPS with a $2 \\times 2$ unit cell using the `unitcell` keyword\n", - "argument and then define the corresponding transfer PEPS:" + "argument and then define the corresponding transfer operator:" ], "metadata": {} }, @@ -186,7 +191,7 @@ "peps₀_2x2 = InfinitePEPS(\n", " rand, ComplexF64, ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2)\n", ")\n", - "transfer_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1);" + "T_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1);" ], "metadata": {}, "execution_count": null @@ -202,9 +207,9 @@ "outputs": [], "cell_type": "code", "source": [ - "mps₀_2x2 = initialize_mps(transfer_2x2, fill(ComplexSpace(20), 2, 2))\n", - "mps_2x2, = leading_boundary(mps₀_2x2, transfer_2x2, VUMPS(; tol=1e-6, verbosity=2))\n", - "norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, transfer_2x2)))\n", + "mps₀_2x2 = initialize_mps(T_2x2, fill(ComplexSpace(20), 2, 2))\n", + "mps_2x2, = leading_boundary(mps₀_2x2, T_2x2, VUMPS(; tol=1e-6, verbosity=2))\n", + "norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, T_2x2)))\n", "\n", "env_ctmrg_2x2, = leading_boundary(\n", " CTMRGEnv(peps₀_2x2, ComplexSpace(20)), peps₀_2x2; tol=1e-6, verbosity=2\n", @@ -220,15 +225,16 @@ "cell_type": "markdown", "source": [ "Again, the results are compatible. Note that for larger unit cells and non-Hermitian PEPS\n", - "the VUMPS algorithm may become unstable, in which case the CTMRG algorithm is recommended.\n", + "[the VUMPS algorithm may become unstable](@cite vanderstraeten_variational_2021), in which\n", + "case the CTMRG algorithm is recommended.\n", "\n", "## Contracting PEPO overlaps\n", "\n", - "Using exactly the same machinery, we can contract partition functions which encode the\n", - "expectation value of a PEPO for a given PEPS state. As an example, we can consider the\n", - "overlap of the PEPO correponding to the partition function of 3D classical Ising model with\n", - "our random PEPS from before and evaluate the overlap\n", - "$\\langle \\psi_\\text{PEPS} | O_\\text{PEPO} | \\psi_\\text{PEPS} \\rangle$.\n", + "Using exactly the same machinery, we can contract 2D networks which encode the expectation\n", + "value of a PEPO for a given PEPS state. As an example, we can consider the overlap of the\n", + "PEPO correponding to the partition function of 3D classical Ising model\n", + "with our random PEPS from before and evaluate the overlap $\\langle \\psi_\\text{PEPS} |\n", + "O_\\text{PEPO} | \\psi_\\text{PEPS} \\rangle$.\n", "\n", "The classical Ising PEPO is defined as follows:" ], @@ -316,11 +322,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.11.4" + "version": "1.10.4" }, "kernelspec": { - "name": "julia-1.11", - "display_name": "Julia 1.11.4", + "name": "julia-1.10", + "display_name": "Julia 1.10.4", "language": "julia" } }, diff --git a/examples/2d_ising_partition_function/main.jl b/examples/2d_ising_partition_function/main.jl index 129155cd8..c96cbdbad 100644 --- a/examples/2d_ising_partition_function/main.jl +++ b/examples/2d_ising_partition_function/main.jl @@ -1,18 +1,21 @@ using Markdown #hide md""" -# 2D classical Ising partition function using CTMRG +# The 2D classical Ising model using CTMRG All previous examples dealt with quantum systems, describing their states by `InfinitePEPS` -that can be contracted using CTMRG or VUMPS techniques. Here, we shift our focus towards -classical physics and consider the 2D classical Ising model with the partition function +that can be contracted using CTMRG or [boundary MPS techniques](@ref e_boundary_mps). Here, +we shift our focus towards classical physics and consider the 2D classical Ising model with +the partition function ```math \mathcal{Z}(\beta) = \sum_{\{s\}} \exp(-\beta H(s)) \text{ with } H(s) = -J \sum_{\langle i, j \rangle} s_i s_j . ``` -The idea is to encode the partition function into an infinite square lattice of rank-4 -tensors which can then be contracted using CTMRG. These rank-4 tensors are represented by -[`InfinitePartitionFunction`](@ref) states, as we will see. +where the classical spins $s_i \in \{+1, -1\}$ are located on the vertices $i$ of a 2D +square lattice. The idea is to encode the partition function as an infinite square network +consisting of local rank-4 tensors, which can then be contracted using CTMRG. An infinite +square network of these rank-4 tensors can be represented as an +[`InfinitePartitionFunction`](@ref) object, as we will see. But first, let's seed the RNG and import all required modules: """ @@ -26,8 +29,16 @@ md""" ## Defining the partition function The first step is to define the rank-4 tensor that, when contracted on a square lattice, -evaluates to the partition function value at a given $\beta$. Since we later want to compute -the magnetization and energy, we define the appropriate rank-4 tensors as well: +evaluates to the partition function value at a given $\beta$. This is done through a +[fairly generic procedure](@cite haegeman_diagonalizing_2017) where the interaction weights +are distributed among vertex tensors in an appropriate way. Concretely, here we first define +a 'link' matrix containing the Boltzmann weights associated to all possible spin +configurations across a given link on the lattice. Next, we define site tensors as +delta-tensors that ensiure that the spin value on all adjacent links is the same. Since we +only want tensors on the sites in the end, we can symmetrically absorb the link weight +tensors into the site tensors, which gives us exactly the kind of network we're looking for. +Since we later want to compute the magnetization and energy to check our results, we define +the appropriate rank-4 tensors here as well while we're at it. """ function classical_ising(; beta=log(1 + sqrt(2)) / 2, J=1.0) @@ -64,30 +75,32 @@ function classical_ising(; beta=log(1 + sqrt(2)) / 2, J=1.0) end; md""" -So let's initialize these tensors at inverse temperature ``\beta=0.6`` and construct the -corresponding `InfinitePartitionFunction`: +So let's initialize these tensors at inverse temperature ``\beta=0.6``, check that +they are indeed rank-4 and construct the corresponding `InfinitePartitionFunction`: """ beta = 0.6 O, M, E = classical_ising(; beta) +@show space(O) Z = InfinitePartitionFunction(O) md""" ## Contracting the partition function Next, we can contract the partition function as per usual by constructing a `CTMRGEnv` with -a specified environment dimension (or space) and calling `leading_boundary` with appropriate +a specified environment virtual space and calling `leading_boundary` with appropriate settings: """ -χenv = 20 -env₀ = CTMRGEnv(Z, χenv) +Venv = ℂ^20 +env₀ = CTMRGEnv(Z, Venv) env, = leading_boundary(env₀, Z; tol=1e-8, maxiter=500); md""" Note that CTMRG environments for partition functions differ from the PEPS environments only -by the edge tensors - instead of two legs connecting the edges and the PEPS-PEPS sandwich, -there is only one leg connecting the edges and the partition function tensor: +by the edge tensors. Instead of two legs connecting the edges and the PEPS-PEPS sandwich, +there is only one leg connecting the edges and the partition function tensor, meaning that +the edge tensors are now rank-3: """ space.(env.edges) @@ -96,7 +109,7 @@ md""" To compute the value of the partition function, we have to contract `Z` with the converged environment using [`network_value`](@ref). Additionally, we will compute the magnetization and energy (per site), again using [`expectation_value`](@ref) but this time also specifying -the index in the unit cell, where we want to insert the local tensor: +the index in the unit cell where we want to insert the local tensor: """ λ = network_value(Z, env) @@ -108,9 +121,10 @@ md""" ## Comparing against the exact Onsager solution In order to assess our results, we will compare against the -[exact Onsager solution](https://en.wikipedia.org/wiki/Square_lattice_Ising_model#Exact_solution). -To that end, we compute the exact free energy, magnetization and energy per site (where -`quadgk` performs the integral from $0$ to $\pi/2$): +[exact Onsager solution](https://en.wikipedia.org/wiki/Square_lattice_Ising_model#Exact_solution) +of the 2D classical Ising model. To that end, we compute the exact free energy, +magnetization and energy per site (where we use `quadgk` to perform integrals of an +auxiliary variable from $0$ to $\pi/2$): """ function classical_ising_exact(; beta=log(1 + sqrt(2)) / 2, J=1.0) diff --git a/examples/3d_ising_partition_function/main.jl b/examples/3d_ising_partition_function/main.jl index 512f3d21a..94a124716 100644 --- a/examples/3d_ising_partition_function/main.jl +++ b/examples/3d_ising_partition_function/main.jl @@ -1,18 +1,16 @@ using Markdown #hide md""" -# The 3D classical Ising model +# [The 3D classical Ising model](@id e_3d_ising) In a previous example we have already demonstrated an application of PEPSKit.jl to the study -of two-dimensional classical statistical mechanics models. In this example, we will take -this one step further, and showcase how one can use PEPSKit.jl to study three-dimensional -classical statistical mechanics models. We will demonstrate this for the specific case of -the three-dimensional classical Ising model, but the same techniques can be applied to other -three-dimensional classical models as well. +of 2D classical statistical mechanics models. In this example, we will take this one step +further, and showcase how one can use PEPSKit.jl to study 3D classical statistical mechanics +models. We will demonstrate this for the specific case of the 3D classical Ising model, but +the same techniques can be applied to other 3D classical models as well. The workflow showcased in this example is a bit more experimental and less 'black-box' than previous examples. Therefore it also serves as a demonstration of some of the more internal -functionality of PEPSKit.jl, and how one can adapt it to different or less 'standard' kinds -of problems. +functionality of PEPSKit.jl, and how one can adapt it to less 'standard' kinds of problems. Let us consider again the partition function of the classical Ising model, @@ -20,11 +18,11 @@ Let us consider again the partition function of the classical Ising model, \mathcal{Z}(\beta) = \sum_{\{s\}} \exp(-\beta H(s)) \text{ with } H(s) = -J \sum_{\langle i, j \rangle} s_i s_j . ``` -where now the classical spins $s_i \in \{+1, -1\}$ are located on the vertices $i$ of a -three-dimensional cubic lattice. The partition function of this model can be represented as -a 3D tensor network with a rank-6 tensor at each vertex of the lattice. Such a network can -be contracted by finding the fixed point of the corresponding transfer operator, in exactly -the same spirit as the boundary MPS methods demonstrated in a previous example. +where now the classical spins $s_i \in \{+1, -1\}$ are located on the vertices $i$ of a 3D +cubic lattice. The partition function of this model can be represented as a 3D tensor +network with a rank-6 tensor at each vertex of the lattice. Such a network can be contracted +by finding the fixed point of the corresponding transfer operator, in exactly the same +spirit as the [boundary MPS methods](@ref e_boundary_mps) demonstrated in another example. Let's start by making the example deterministic and we doing our imports: """ @@ -43,9 +41,9 @@ Just as in the 2D case, the first step is to define the partition function as a network. The procedure is exactly the same as before, the only difference being that now every spin participates in interactions associated to six links adjacent to that site. This means that the partition function can be written as an infinite 3D network with a single -constituent rank-6 [`PEPSKit.PEPOTensor`](@ref) `O` located at each site of the cubic lattice. To -verify our example we will check the magnetization and energy, so we also define the -corresponding rank-6 tensors `M` and `E` while we're at it. +constituent rank-6 [`PEPSKit.PEPOTensor`](@ref) `O` located at each site of the cubic +lattice. To verify our example we will check the magnetization and energy, so we also define +the corresponding rank-6 tensors `M` and `E` while we're at it. """ function three_dimensional_classical_ising(; beta, J=1.0) @@ -86,8 +84,8 @@ function three_dimensional_classical_ising(; beta, J=1.0) end; md""" -Let's initialize these tensors at inverse temperature ``\beta=0.2391``, which corresponds to a slightly -lower temperature than the critical value ``\beta_c=0.2216544…`` +Let's initialize these tensors at inverse temperature ``\beta=0.2391``, which corresponds to +a slightly lower temperature than the critical value ``\beta_c=0.2216544…`` """ beta = 0.2391 @@ -99,10 +97,10 @@ md""" To contract our infinite 3D partition function, we first reinterpret it as an infinite power of a slice-to-slice transfer operator ``T``, where ``T`` can be seen as an infinite 2D -projected entangled-pair operator (PEPO) consisting of the rank-6 tensor `O` at each site of -an infinite 3D square lattice. In the same spirit as the boundary MPS approach, all we need -to contract the whole partition function is to find the leading eigenvector of this PEPO. -The fixed point of such a PEPO exactly corresponds to a PEPS, and for the case of a +projected entangled-pair operator (PEPO) which consists of the rank-6 tensor `O` at each +site of an infinite 2D square lattice. In the same spirit as the boundary MPS approach, all +we need to contract the whole partition function is to find the leading eigenvector of this +PEPO. The fixed point of such a PEPO exactly corresponds to a PEPS, and for the case of a Hermitian transfer operator we can find this PEPS through [variational optimization](@cite vanderstraeten_residual_2018). @@ -110,25 +108,27 @@ Indeed, for a Hermition transfer operator ``T`` we can formulate the eigenvalue for a fixed point PEPS ``|\psi\rangle`` as a variational problem ```math -|\psi\rangle = \text{argmin}_{|\psi\rangle} - \lim_{N \to ∞} \frac{1}{N} \log \left( \frac{\langle \psi | T | \psi \rangle}{\langle \psi | \psi \rangle} \right) +|\psi\rangle = \text{argmin}_{|\psi\rangle} \left ( \lim_{N \to ∞} - \frac{1}{N} \log \left( \frac{\langle \psi | T | \psi \rangle}{\langle \psi | \psi \rangle} \right) \right ) ``` where ``N`` is the diverging number of sites of the 2D transfer operator ``T``. ### Defining the cost function -Using PEPSKit.jl, this cost function and its gradient can be easily computed, after which we can use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it. -recognize the denominator ``\langle \psi | \psi \rangle`` as the familiar PEPS norm, where -we can compute the norm per site as the [`network_value`](@ref) of the corresponding -[`InfiniteSquareNetwork`](@ref) by contracting it with the CTMRG algorithm. Similarly, the -numerator ``\langle \psi | T | \psi \rangle`` is nothing more than an +Using PEPSKit.jl, this cost function and its gradient can be easily computed, after which we +can use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it. We can +immediately recognize the denominator ``\langle \psi | \psi \rangle`` as the familiar PEPS +norm, where we can compute the norm per site as the [`network_value`](@ref) of the +corresponding [`InfiniteSquareNetwork`](@ref) by contracting it with the CTMRG algorithm. +Similarly, the numerator ``\langle \psi | T | \psi \rangle`` is nothing more than an `InfiniteSquareNetwork` consisting of three layers corresponding to the ket, transfer -operator and bra objects. This object can be constructed and contracted in a straightforward -way, after we can again compute its `network_value`. +operator and bra objects. This object can also be constructed and contracted in a +straightforward way, after we can again compute its `network_value`. So to define our cost function, we just need to construct the transfer operator as an -[`InfinitePEPO`](@ref) and specify a contraction algorithm we can use to compute the values -of the two relevant 2D networks. In addition, we'll specify the specific reverse rule -algorithm that will be used to compute the gradient of this cost function +[`InfinitePEPO`](@ref), contruct the both relevant infinite 2D contractible networks from +the current PEPS and this transfer operator, and specify a contraction algorithm we can use +to compute the values of these two networks. In addition, we'll specify the specific reverse +rule algorithm that will be used to compute the gradient of this cost function. """ boundary_alg = SimultaneousCTMRG(; maxiter=150, tol=1e-8, verbosity=1) @@ -168,13 +168,13 @@ function pepo_costfun((psi, env2, env3)) end; md""" -There are a few things to note about this cost function definition. Since we will pass -it to the `optimize` method from OptimKit.jl, we require it to return both our cost function -and the corresponding gradient. To do this, we simply use the `withgradient` method from -Zygote.jl to automatically compute the gradient of the cost function straight from the -primal computation. Since our cost function involves contraction using `leading_boundary`, -we also have to specify exactly how Zygote should handle the backpropagation of the gradient -through this function. This can be done using the [`PEPSKit.hook_pullback`](@ref) function from +There are a few things to note about this cost function definition. Since we will pass it to +the `OptimKit.optimize`, we require it to return both our cost function and the +corresponding gradient. To do this, we simply use the `withgradient` method from Zygote.jl +to automatically compute the gradient of the cost function straight from the primal +computation. Since our cost function involves contractions using `leading_boundary`, we also +have to specify exactly how Zygote should handle the backpropagation of the gradient through +this function. This can be done using the [`PEPSKit.hook_pullback`](@ref) function from PEPSKit.jl, which allows to hook into the pullback of a given function by specifying a specific algorithm for the pullback computation. Here, we opted to use an Arnoldi method to solve the linear problem defining the gradient of the network contraction at its fixed diff --git a/examples/Cache.toml b/examples/Cache.toml index 23f342756..491f9a4e9 100644 --- a/examples/Cache.toml +++ b/examples/Cache.toml @@ -1,10 +1,10 @@ ["./"] -bose_hubbard = "2d25bbc749632d5e194c8405e1309f37af8e7d5d680eed393fa2cf975f6d0619" +bose_hubbard = "8c1c006bd879a1e791fbd1fb11bce1056a9400f062e15ea2e794255fb1547ee0" hubbard_su = "27bb6bc05ae104080e6048f9f1ae84b086bea034b794d7997baf6da9e2d2f257" -2d_ising_partition_function = "acafb9139119ccc89fb928b18c55ea9e827f676a737e34a84850666f8ca35702" -3d_ising_partition_function = "55e6501df7b73ea3ee8030e78b46ab24261e337354dfa2a74dbc77638b9bba9c" -boundary_mps = "fd8f0378c5261ae37b8d3862fb28a0b7f2697cbaf5c65f4e768bf95720683e8d" +boundary_mps = "decc9d804c3f595a1b7872b90c8bcd6725f72c4f920970a80f2ed8de05d28f05" heisenberg_su = "27d48d1b9dfbc600c3cfa829f3bb5708f21e95ea92da2930afdf6973fb3bcaec" +2d_ising_partition_function = "3e2628f583dbeee5de69af787561cfccfa204fa5750fde4c360815a4d26f4b1c" xxz = "8319d9b985dcf48b5bcdf992b44923a5f8fe8fc7e83be3d55eeddfe07048fb03" +3d_ising_partition_function = "6803a6721597e1db11ac455ce720f73a3922fc6d0f14aec4c619070ebc8a8781" fermi_hubbard = "958a68a2395a3fae6aaee4b1b3376c3b47a28609ecb29257b778b8b83c937316" heisenberg = "65ccc80fefe009ef3a626e497e3d054fbc1a8f92d40cef3cb8a5bf6254a6a57f" diff --git a/examples/boundary_mps/main.jl b/examples/boundary_mps/main.jl index f45cdac94..dbcc3b125 100644 --- a/examples/boundary_mps/main.jl +++ b/examples/boundary_mps/main.jl @@ -1,9 +1,11 @@ using Markdown #hide md""" -# Boundary MPS contractions using VUMPS and PEPOs +# [Boundary MPS contractions of 2D networks] (@id e_boundary_mps) -Instead of using CTMRG to contract an infinite PEPS, one can also use an boundary MPSs -ansatz to contract the infinite network. In particular, we will here use VUMPS to do so. +Instead of using CTMRG to contract the network encoding the norm of an infinite PEPS, one +can also use so-called [boundary MPS methods](@cite haegeman_diagonalizing_2017) to contract +this network. In this example, we will demonstrate how to use [the VUMPS algorithm](@cite +vanderstraeten_tangentspace_2019) to do so. Before we start, we'll fix the random seed for reproducability: """ @@ -11,9 +13,10 @@ Before we start, we'll fix the random seed for reproducability: using Random Random.seed!(29384293742893); -md""" -Besides `TensorKit` and `PEPSKit`, we here also need [`MPSKit`](https://quantumkithub.github.io/MPSKit.jl/stable/) -which implements the VUMPS algorithm as well as the required MPS operations: +md""" Besides `TensorKit` and `PEPSKit`, here we also need to load the +[`MPSKit.jl`](https://quantumkithub.github.io/MPSKit.jl/stable/) package which implements a +host of tools for working with 1D matrix product states (MPS), including the VUMPS +algorithm: """ using TensorKit, PEPSKit, MPSKit @@ -21,46 +24,59 @@ using TensorKit, PEPSKit, MPSKit md""" ## Computing a PEPS norm -We start by initializing a random initial infinite PEPS. Let us use uniformly distributed -complex entries using `rand` (which sometimes lead to better convergence than Gaussian -distributed `randn` elements): +We start by initializing a random infinite PEPS. Let us use uniformly distributed complex +entries using `rand` (which sometimes lead to better convergence than Gaussian distributed +`randn` elements): """ peps₀ = InfinitePEPS(rand, ComplexF64, ComplexSpace(2), ComplexSpace(2)) md""" -To compute its norm, we need to construct the transfer operator corresponding to -the partition function representing the overlap $\langle \psi_\text{PEPS} | \psi_\text{PEPS} \rangle$: +To compute its norm, usually we would construct a double-layer `InfiniteSquareNetwork` which +encodes the bra-ket PEPS overlap and then contract this infinite square network, for example +using CTMRG. Here however, we will use another approach. If we take out a single row of this +infinite norm network, we can interpret it as a 2D row-to-row transfer operator ``T``. Here, +this transfer operator consists of an effective local rank-4 tensor at every site of a 2D +square lattice, where the local effective tensor is given by the contraction of a bra and +ket [`PEPSKit.PEPSTensor`](@ref) across their physical leg. Since the network we want to +contract can be interpreted as the infinite power of ``T``, we can contract it by finding +its leading eigenvector as a 1D MPS, which we call the boundary MPS. + +In PEPSKit.jl, we can directly contruct the transfer operator corresponding to a PEPS norm +network from a given infinite PEPS as an [`InfiniteTransferPEPS`](@ref) object. """ -transfer = InfiniteTransferPEPS(peps₀, 1, 1) +T = InfiniteTransferPEPS(peps₀, 1, 1) md""" -We then find its leading boundary MPS fixed point, where the corresponding eigenvalue -encodes the norm of the state. To that end, let us first we build an initial guess for the -boundary MPS, choosing a bond dimension of 20: +Since we'll find the leading eigenvector of ``T`` as a boundary MPS, we first need to +initialize an initial guess to supply to our algorithm. We can do this using the +[`initialize_mps`](@ref) function, which constructs a random MPS with a specific virtual +space for a given transfer operator. Here, we'll build an initial guess for the boundary MPS +with a bond dimension of 20: """ -mps₀ = initialize_mps(transfer, [ComplexSpace(20)]) +mps₀ = initialize_mps(T, [ComplexSpace(20)]) md""" -Note that this will just construct a MPS with random Gaussian entries based on the virtual + +Note that this will just construct a MPS with random Gaussian entries based on the physical spaces of the supplied transfer operator. Of course, one might come up with a better initial guess (leading to better convergence) depending on the application. To find the leading -boundary MPS fixed point, we call [`leading_boundary`](@ref) using the [VUMPS](@extref) -algorithm from MPSKit. Note that, by default, `leading_boundary` uses CTMRG where the -settings are supplied as keyword arguments, so in the present case we need to supply the -VUMPS algorithm struct explicitly: +boundary MPS fixed point, we call [`leading_boundary`](@ref) using the +[`MPSKit.VUMPS`](@extref) algorithm from MPSKit. Note that, by default, `leading_boundary` +uses CTMRG where the settings are supplied as keyword arguments, so in the present case we +need to supply the VUMPS algorithm struct explicitly: """ -mps, env, ϵ = leading_boundary(mps₀, transfer, VUMPS(; tol=1e-6, verbosity=2)); +mps, env, ϵ = leading_boundary(mps₀, T, VUMPS(; tol=1e-6, verbosity=2)); md""" The norm of the state per unit cell is then given by the expectation value $\langle \psi_\text{MPS} | \mathbb{T} | \psi_\text{MPS} \rangle$: """ -norm_vumps = abs(prod(expectation_value(mps, transfer))) +norm_vumps = abs(prod(expectation_value(mps, T))) md""" This can be compared to the result obtained using CTMRG, where we see that the results match: @@ -76,28 +92,28 @@ md""" ## Working with unit cells For PEPS with non-trivial unit cells, the principle is exactly the same. The only difference -is that now the transfer operator of the PEPS norm partition function has multiple lines, -each of which can be represented by an [`InfiniteTransferPEPS`](@ref) object. Such a -multi-line transfer operator is represented by a `MultilineTransferPEPS` object. In this +is that now the transfer operator of the PEPS norm partition function has multiple rows or +'lines', each of which can be represented by an [`InfiniteTransferPEPS`](@ref) object. Such +a multi-line transfer operator is represented by a `MultilineTransferPEPS` object. In this case, the boundary MPS is an [`MultilineMPS`](@extref) object, which should be initialized by specifying a virtual space for each site in the partition function unit cell. First, we construct a PEPS with a $2 \times 2$ unit cell using the `unitcell` keyword -argument and then define the corresponding transfer PEPS: +argument and then define the corresponding transfer operator: """ peps₀_2x2 = InfinitePEPS( rand, ComplexF64, ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2) ) -transfer_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1); +T_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1); md""" Now, the procedure is the same as before: We compute the norm once using VUMPS, once using CTMRG and then compare. """ -mps₀_2x2 = initialize_mps(transfer_2x2, fill(ComplexSpace(20), 2, 2)) -mps_2x2, = leading_boundary(mps₀_2x2, transfer_2x2, VUMPS(; tol=1e-6, verbosity=2)) -norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, transfer_2x2))) +mps₀_2x2 = initialize_mps(T_2x2, fill(ComplexSpace(20), 2, 2)) +mps_2x2, = leading_boundary(mps₀_2x2, T_2x2, VUMPS(; tol=1e-6, verbosity=2)) +norm_2x2_vumps = abs(prod(expectation_value(mps_2x2, T_2x2))) env_ctmrg_2x2, = leading_boundary( CTMRGEnv(peps₀_2x2, ComplexSpace(20)), peps₀_2x2; tol=1e-6, verbosity=2 @@ -108,15 +124,16 @@ norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2)) md""" Again, the results are compatible. Note that for larger unit cells and non-Hermitian PEPS -the VUMPS algorithm may become unstable, in which case the CTMRG algorithm is recommended. +[the VUMPS algorithm may become unstable](@cite vanderstraeten_variational_2021), in which +case the CTMRG algorithm is recommended. ## Contracting PEPO overlaps -Using exactly the same machinery, we can contract partition functions which encode the -expectation value of a PEPO for a given PEPS state. As an example, we can consider the -overlap of the PEPO correponding to the partition function of 3D classical Ising model with -our random PEPS from before and evaluate the overlap -$\langle \psi_\text{PEPS} | O_\text{PEPO} | \psi_\text{PEPS} \rangle$. +Using exactly the same machinery, we can contract 2D networks which encode the expectation +value of a PEPO for a given PEPS state. As an example, we can consider the overlap of the +PEPO correponding to the partition function of [3D classical Ising model](@ref e_3d_ising) +with our random PEPS from before and evaluate the overlap $\langle \psi_\text{PEPS} | +O_\text{PEPO} | \psi_\text{PEPS} \rangle$. The classical Ising PEPO is defined as follows: """ diff --git a/examples/heisenberg/main.jl b/examples/heisenberg/main.jl index f376e2c8f..580015fdb 100644 --- a/examples/heisenberg/main.jl +++ b/examples/heisenberg/main.jl @@ -6,7 +6,7 @@ In this example we want to provide a basic rundown of PEPSKit's optimization wor PEPS. To that end, we will consider the two-dimensional Heisenberg model on a square lattice ```math -H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j +H = \sum_{\langle i,j \rangle} \left ( J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j \right ) ``` Here, we want to set $J_x=J_y=J_z=1$ where the Heisenberg model is in the antiferromagnetic From 28f0585346d95a03421ddbd3a992495d336ab97c Mon Sep 17 00:00:00 2001 From: leburgel Date: Thu, 1 May 2025 09:39:14 +0200 Subject: [PATCH 080/113] Update references --- docs/src/assets/pepskit.bib | 36 +++++++++++------------ docs/src/examples/boundary_mps/index.md | 17 ++++++----- docs/src/examples/boundary_mps/main.ipynb | 25 +++++++++++----- examples/Cache.toml | 6 ++-- examples/boundary_mps/main.jl | 5 ++-- 5 files changed, 51 insertions(+), 38 deletions(-) diff --git a/docs/src/assets/pepskit.bib b/docs/src/assets/pepskit.bib index 7ddd43a77..50f7184ff 100644 --- a/docs/src/assets/pepskit.bib +++ b/docs/src/assets/pepskit.bib @@ -112,25 +112,25 @@ @article{vanderstraeten_tangentspace_2019 } @article{hasenbusch_monte_2001, -author = {HASENBUSCH, MARTIN}, -title = {MONTE CARLO STUDIES OF THE THREE-DIMENSIONAL ISING MODEL IN EQUILIBRIUM}, -journal = {International Journal of Modern Physics C}, -volume = {12}, -number = {07}, -pages = {911-1009}, -year = {2001}, -doi = {10.1142/S0129183101002383}, -URL = {https://doi.org/10.1142/S0129183101002383}, -eprint = {https://doi.org/10.1142/S0129183101002383}, + author = {HASENBUSCH, MARTIN}, + title = {MONTE CARLO STUDIES OF THE THREE-DIMENSIONAL ISING MODEL IN EQUILIBRIUM}, + journal = {International Journal of Modern Physics C}, + volume = {12}, + number = {07}, + pages = {911-1009}, + year = {2001}, + doi = {10.1142/S0129183101002383}, } -@article{vanderstraeten_variational_2021, - title = {Variational Contractions of Projected Entangled-Pair States}, +@article{vanderstraeten_variational_2022, + title = {Variational Methods for Contracting Projected Entangled-Pair States}, author = {Vanderstraeten, Laurens and Burgelman, Lander and Ponsioen, Boris and Van Damme, Maarten and Vanhecke, Bram and Corboz, Philippe and Haegeman, Jutho and Verstraete, Frank}, - year = {2021}, - month = oct, - journal = {arXiv:2110.12726}, - eprint = {2110.12726}, - archiveprefix = {arXiv}, - keywords = {Condensed Matter - Strongly Correlated Electrons,Quantum Physics} + year = {2022}, + month = may, + journal = {Physical Review B}, + volume = {105}, + number = {19}, + pages = {195140}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.105.195140} } diff --git a/docs/src/examples/boundary_mps/index.md b/docs/src/examples/boundary_mps/index.md index 7300a2918..1394abfa7 100644 --- a/docs/src/examples/boundary_mps/index.md +++ b/docs/src/examples/boundary_mps/index.md @@ -19,13 +19,14 @@ Before we start, we'll fix the random seed for reproducability: ````julia using Random Random.seed!(29384293742893); +```` -md""" Besides `TensorKit` and `PEPSKit`, here we also need to load the +Besides `TensorKit` and `PEPSKit`, here we also need to load the [`MPSKit.jl`](https://quantumkithub.github.io/MPSKit.jl/stable/) package which implements a host of tools for working with 1D matrix product states (MPS), including the VUMPS algorithm: -""" +````julia using TensorKit, PEPSKit, MPSKit ```` @@ -133,7 +134,7 @@ mps, env, ϵ = leading_boundary(mps₀, T, VUMPS(; tol=1e-6, verbosity=2)); ```` [ Info: VUMPS init: obj = +5.052950412844e+00 +1.493192627823e-02im err = 8.4684e-01 -[ Info: VUMPS conv 4: obj = +1.744071150138e+01 +2.417441166152e-08im err = 1.9047772248e-07 time = 0.94 sec +[ Info: VUMPS conv 4: obj = +1.744071150138e+01 +2.417441166152e-08im err = 1.9047772248e-07 time = 8.20 sec ```` @@ -160,7 +161,7 @@ norm_ctmrg = abs(norm(peps₀, env_ctmrg)) ```` [ Info: CTMRG init: obj = -5.571758356204e-01 +1.608051219314e+00im err = 1.0000e+00 -[ Info: CTMRG conv 31: obj = +1.744071151099e+01 err = 1.5225866698e-07 time = 2.49 sec +[ Info: CTMRG conv 31: obj = +1.744071151099e+01 err = 1.5225866698e-07 time = 9.04 sec abs(norm_vumps - norm_ctmrg) / norm_vumps = 5.510376342345678e-10 ```` @@ -201,16 +202,16 @@ norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2)) ```` [ Info: VUMPS init: obj = +6.462580940431e+02 -1.088925136214e+02im err = 8.6506e-01 -┌ Warning: VUMPS cancel 200: obj = +9.724487741058e+04 +1.904137949329e+00im err = 5.9545749280e-04 time = 1.61 min +┌ Warning: VUMPS cancel 200: obj = +9.724487741058e+04 +1.904137949329e+00im err = 5.9545749280e-04 time = 1.16 min └ @ MPSKit ~/.julia/packages/MPSKit/EfZBD/src/algorithms/statmech/vumps.jl:51 [ Info: CTMRG init: obj = -7.927906985598e-02 +1.728135792446e+00im err = 1.0000e+00 -[ Info: CTMRG conv 53: obj = +9.723959008610e+04 err = 1.8278113657e-07 time = 9.86 sec +[ Info: CTMRG conv 53: obj = +9.723959008610e+04 err = 1.8278113657e-07 time = 7.78 sec abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps = 5.437143071679346e-5 ```` Again, the results are compatible. Note that for larger unit cells and non-Hermitian PEPS -[the VUMPS algorithm may become unstable](@cite vanderstraeten_variational_2021), in which +[the VUMPS algorithm may become unstable](@cite vanderstraeten_variational_2022), in which case the CTMRG algorithm is recommended. ## Contracting PEPO overlaps @@ -266,7 +267,7 @@ norm_pepo = abs(prod(expectation_value(mps_pepo, transfer_pepo))); ```` [ Info: VUMPS init: obj = +3.726983052001e+01 +3.098676794848e-02im err = 9.2460e-01 -[ Info: VUMPS conv 5: obj = +2.483696260467e+02 +5.249041643967e-07im err = 1.7125391303e-08 time = 4.32 sec +[ Info: VUMPS conv 5: obj = +2.483696260467e+02 +5.249041643967e-07im err = 1.7125391303e-08 time = 4.57 sec norm_pepo = 248.36962604668662 ```` diff --git a/docs/src/examples/boundary_mps/main.ipynb b/docs/src/examples/boundary_mps/main.ipynb index 8e4dd70d3..ad4d73acc 100644 --- a/docs/src/examples/boundary_mps/main.ipynb +++ b/docs/src/examples/boundary_mps/main.ipynb @@ -28,14 +28,25 @@ "cell_type": "code", "source": [ "using Random\n", - "Random.seed!(29384293742893);\n", - "\n", - "md\"\"\" Besides `TensorKit` and `PEPSKit`, here we also need to load the\n", + "Random.seed!(29384293742893);" + ], + "metadata": {}, + "execution_count": null + }, + { + "cell_type": "markdown", + "source": [ + "Besides `TensorKit` and `PEPSKit`, here we also need to load the\n", "[`MPSKit.jl`](https://quantumkithub.github.io/MPSKit.jl/stable/) package which implements a\n", "host of tools for working with 1D matrix product states (MPS), including the VUMPS\n", - "algorithm:\n", - "\"\"\"\n", - "\n", + "algorithm:" + ], + "metadata": {} + }, + { + "outputs": [], + "cell_type": "code", + "source": [ "using TensorKit, PEPSKit, MPSKit" ], "metadata": {}, @@ -225,7 +236,7 @@ "cell_type": "markdown", "source": [ "Again, the results are compatible. Note that for larger unit cells and non-Hermitian PEPS\n", - "[the VUMPS algorithm may become unstable](@cite vanderstraeten_variational_2021), in which\n", + "[the VUMPS algorithm may become unstable](@cite vanderstraeten_variational_2022), in which\n", "case the CTMRG algorithm is recommended.\n", "\n", "## Contracting PEPO overlaps\n", diff --git a/examples/Cache.toml b/examples/Cache.toml index 491f9a4e9..3e65dcea8 100644 --- a/examples/Cache.toml +++ b/examples/Cache.toml @@ -1,10 +1,10 @@ ["./"] bose_hubbard = "8c1c006bd879a1e791fbd1fb11bce1056a9400f062e15ea2e794255fb1547ee0" hubbard_su = "27bb6bc05ae104080e6048f9f1ae84b086bea034b794d7997baf6da9e2d2f257" -boundary_mps = "decc9d804c3f595a1b7872b90c8bcd6725f72c4f920970a80f2ed8de05d28f05" -heisenberg_su = "27d48d1b9dfbc600c3cfa829f3bb5708f21e95ea92da2930afdf6973fb3bcaec" 2d_ising_partition_function = "3e2628f583dbeee5de69af787561cfccfa204fa5750fde4c360815a4d26f4b1c" -xxz = "8319d9b985dcf48b5bcdf992b44923a5f8fe8fc7e83be3d55eeddfe07048fb03" +heisenberg_su = "27d48d1b9dfbc600c3cfa829f3bb5708f21e95ea92da2930afdf6973fb3bcaec" 3d_ising_partition_function = "6803a6721597e1db11ac455ce720f73a3922fc6d0f14aec4c619070ebc8a8781" +xxz = "8319d9b985dcf48b5bcdf992b44923a5f8fe8fc7e83be3d55eeddfe07048fb03" +boundary_mps = "decc9d804c3f595a1b7872b90c8bcd6725f72c4f920970a80f2ed8de05d28f05" fermi_hubbard = "958a68a2395a3fae6aaee4b1b3376c3b47a28609ecb29257b778b8b83c937316" heisenberg = "65ccc80fefe009ef3a626e497e3d054fbc1a8f92d40cef3cb8a5bf6254a6a57f" diff --git a/examples/boundary_mps/main.jl b/examples/boundary_mps/main.jl index dbcc3b125..eb5e46c9d 100644 --- a/examples/boundary_mps/main.jl +++ b/examples/boundary_mps/main.jl @@ -13,7 +13,8 @@ Before we start, we'll fix the random seed for reproducability: using Random Random.seed!(29384293742893); -md""" Besides `TensorKit` and `PEPSKit`, here we also need to load the +md""" +Besides `TensorKit` and `PEPSKit`, here we also need to load the [`MPSKit.jl`](https://quantumkithub.github.io/MPSKit.jl/stable/) package which implements a host of tools for working with 1D matrix product states (MPS), including the VUMPS algorithm: @@ -124,7 +125,7 @@ norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2)) md""" Again, the results are compatible. Note that for larger unit cells and non-Hermitian PEPS -[the VUMPS algorithm may become unstable](@cite vanderstraeten_variational_2021), in which +[the VUMPS algorithm may become unstable](@cite vanderstraeten_variational_2022), in which case the CTMRG algorithm is recommended. ## Contracting PEPO overlaps From 6c70d8de4ed55889aebb6618c973deea781b06ff Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 18:21:00 +0200 Subject: [PATCH 081/113] Update README.md Co-authored-by: Lukas Devos --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 60aa9ed45..b4b94c64c 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ pkg> add PEPSKit - Imaginary time evolution algorithms - Support for PEPS with generic unit cells - Support for classical 2D partition functions and projected entangled-pair operators (PEPOs) -- Easy to implement custom states, operators and algorithms +- Extensible system for custom states, operators and algorithms ## Quickstart From 685ec1956ff073c212c13568c455d482bc666d49 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 18:21:16 +0200 Subject: [PATCH 082/113] Update docs/make.jl Co-authored-by: Lukas Devos --- docs/make.jl | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index a6dcbbeaf..8fe00856b 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -59,11 +59,6 @@ makedocs(; pages=[ "Home" => "index.md", "Manual" => [ - # "man/states.md", - # "man/environments.md", - # "man/operators.md", - # "man/peps_optimization.md", - # "man/symmetries.md", "man/models.md", "man/multithreading.md", "man/precompilation.md", From 1d1e31a8127c5573e296caa35fcfd22131663ddd Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 18:22:11 +0200 Subject: [PATCH 083/113] Update docs/src/index.md Co-authored-by: Lukas Devos --- docs/src/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/index.md b/docs/src/index.md index 04584e4f1..7e957438b 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -21,7 +21,7 @@ pkg> add PEPSKit - Imaginary time evolution algorithms - Support for PEPS with generic unit cells - Support for classical 2D partition functions and projected entangled-pair operators (PEPOs) -- Easy to implement custom states, operators and algorithms +- Extensible system for custom states, operators and algorithms ## Quickstart From d4a18b4546cd21859251406f78795c15bd82d362 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 18:22:46 +0200 Subject: [PATCH 084/113] Update docs/src/assets/pepskit.bib Co-authored-by: Lukas Devos --- docs/src/assets/pepskit.bib | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/assets/pepskit.bib b/docs/src/assets/pepskit.bib index 50f7184ff..808deb3f0 100644 --- a/docs/src/assets/pepskit.bib +++ b/docs/src/assets/pepskit.bib @@ -112,8 +112,8 @@ @article{vanderstraeten_tangentspace_2019 } @article{hasenbusch_monte_2001, - author = {HASENBUSCH, MARTIN}, - title = {MONTE CARLO STUDIES OF THE THREE-DIMENSIONAL ISING MODEL IN EQUILIBRIUM}, + author = {Hasenbusch, Martin}, + title = {Monte Carlo Studies of the Three-Dimensional Ising Model in Equilibrium}, journal = {International Journal of Modern Physics C}, volume = {12}, number = {07}, From 86a101e95da81dc338ce0e12c1174bd9089e997d Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 18:24:02 +0200 Subject: [PATCH 085/113] Update docs/src/man/multithreading.md Co-authored-by: Lukas Devos --- docs/src/man/multithreading.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/src/man/multithreading.md b/docs/src/man/multithreading.md index 764ebbd21..504a34a05 100644 --- a/docs/src/man/multithreading.md +++ b/docs/src/man/multithreading.md @@ -12,7 +12,8 @@ The threading behaviour can be specified through a global `scheduler` that is in set_scheduler! ``` -By default, the OhMyThreads machinery will be used to parallelize certain parts of the code, if Julia started with multiple threads. Cases where PEPSKit can leverage parallel threads are: +By default, the OhMyThreads machinery will be used to parallelize certain parts of the code, if Julia started with multiple threads. +Cases where PEPSKit can leverage parallel threads are: - CTMRG steps using the `:simultaneous` scheme, where we parallelize over all unit cell coordinates and spatial directions - The reverse pass of these parallelized CTMRG steps From 1412ff86e62b87ada4a28e0bef96df078c7594a5 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 18:25:59 +0200 Subject: [PATCH 086/113] Update docs/src/man/multithreading.md Co-authored-by: Lukas Devos --- docs/src/man/multithreading.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/man/multithreading.md b/docs/src/man/multithreading.md index 504a34a05..4258daa11 100644 --- a/docs/src/man/multithreading.md +++ b/docs/src/man/multithreading.md @@ -17,4 +17,4 @@ Cases where PEPSKit can leverage parallel threads are: - CTMRG steps using the `:simultaneous` scheme, where we parallelize over all unit cell coordinates and spatial directions - The reverse pass of these parallelized CTMRG steps -- Evaluating expectation values of observables, where we parallelize over the terms contained in the `LocalOperator` +- Evaluating expectation values of observables, where we parallelize over the terms contained in the [`LocalOperator`](@ref PEPSKit.LocalOperator) From 0fdb7e38e2067ca0776459780cec73b0f290f013 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 18:35:42 +0200 Subject: [PATCH 087/113] Update examples/3d_ising_partition_function/main.jl Co-authored-by: Lukas Devos --- examples/3d_ising_partition_function/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/3d_ising_partition_function/main.jl b/examples/3d_ising_partition_function/main.jl index 94a124716..3b706f9e8 100644 --- a/examples/3d_ising_partition_function/main.jl +++ b/examples/3d_ising_partition_function/main.jl @@ -24,7 +24,7 @@ network with a rank-6 tensor at each vertex of the lattice. Such a network can b by finding the fixed point of the corresponding transfer operator, in exactly the same spirit as the [boundary MPS methods](@ref e_boundary_mps) demonstrated in another example. -Let's start by making the example deterministic and we doing our imports: +Let's start by making the example deterministic and importing the required packages: """ using Random From c49690ae8d2b478cabbdcc3131863ca5b3bebf0c Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 18:38:54 +0200 Subject: [PATCH 088/113] Update examples/2d_ising_partition_function/main.jl Co-authored-by: Lukas Devos --- examples/2d_ising_partition_function/main.jl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/2d_ising_partition_function/main.jl b/examples/2d_ising_partition_function/main.jl index c96cbdbad..d523c7739 100644 --- a/examples/2d_ising_partition_function/main.jl +++ b/examples/2d_ising_partition_function/main.jl @@ -2,10 +2,8 @@ using Markdown #hide md""" # The 2D classical Ising model using CTMRG -All previous examples dealt with quantum systems, describing their states by `InfinitePEPS` -that can be contracted using CTMRG or [boundary MPS techniques](@ref e_boundary_mps). Here, -we shift our focus towards classical physics and consider the 2D classical Ising model with -the partition function +While PEPSKit has a lot of use in quantum systems, describing states using InfinitePEPS that can be contracted via CTMRG or [boundary MPS techniques](@ref e_boundary_mps), here we shift our focus to classical physics. +We consider the 2D classical Ising model and compute its partition function defined as: ```math \mathcal{Z}(\beta) = \sum_{\{s\}} \exp(-\beta H(s)) \text{ with } H(s) = -J \sum_{\langle i, j \rangle} s_i s_j . From fd2d79cbfca9f8ba741206ce403ad5b6897de618 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 18:48:18 +0200 Subject: [PATCH 089/113] Update examples/3d_ising_partition_function/main.jl Co-authored-by: Lukas Devos --- examples/3d_ising_partition_function/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/3d_ising_partition_function/main.jl b/examples/3d_ising_partition_function/main.jl index 3b706f9e8..a578e7b8f 100644 --- a/examples/3d_ising_partition_function/main.jl +++ b/examples/3d_ising_partition_function/main.jl @@ -114,7 +114,7 @@ where ``N`` is the diverging number of sites of the 2D transfer operator ``T``. ### Defining the cost function -Using PEPSKit.jl, this cost function and its gradient can be easily computed, after which we +Using PEPSKit.jl, this cost function and its gradient can be computed, after which we can use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it. We can immediately recognize the denominator ``\langle \psi | \psi \rangle`` as the familiar PEPS norm, where we can compute the norm per site as the [`network_value`](@ref) of the From 3129c0439c826055b8163780c346e5a72b69b388 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 18:49:06 +0200 Subject: [PATCH 090/113] Update examples/3d_ising_partition_function/main.jl Co-authored-by: Lukas Devos --- examples/3d_ising_partition_function/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/3d_ising_partition_function/main.jl b/examples/3d_ising_partition_function/main.jl index a578e7b8f..58d06df22 100644 --- a/examples/3d_ising_partition_function/main.jl +++ b/examples/3d_ising_partition_function/main.jl @@ -122,7 +122,7 @@ corresponding [`InfiniteSquareNetwork`](@ref) by contracting it with the CTMRG a Similarly, the numerator ``\langle \psi | T | \psi \rangle`` is nothing more than an `InfiniteSquareNetwork` consisting of three layers corresponding to the ket, transfer operator and bra objects. This object can also be constructed and contracted in a -straightforward way, after we can again compute its `network_value`. +straightforward way, so we can again compute its `network_value`. So to define our cost function, we just need to construct the transfer operator as an [`InfinitePEPO`](@ref), contruct the both relevant infinite 2D contractible networks from From 79c6be5d8c107ecce6cb3e2b678609d165e35215 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 18:49:40 +0200 Subject: [PATCH 091/113] Update examples/3d_ising_partition_function/main.jl Co-authored-by: Lukas Devos --- examples/3d_ising_partition_function/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/3d_ising_partition_function/main.jl b/examples/3d_ising_partition_function/main.jl index 58d06df22..64a4eb24f 100644 --- a/examples/3d_ising_partition_function/main.jl +++ b/examples/3d_ising_partition_function/main.jl @@ -124,7 +124,7 @@ Similarly, the numerator ``\langle \psi | T | \psi \rangle`` is nothing more tha operator and bra objects. This object can also be constructed and contracted in a straightforward way, so we can again compute its `network_value`. -So to define our cost function, we just need to construct the transfer operator as an +To define our cost function, we then need to construct the transfer operator as an [`InfinitePEPO`](@ref), contruct the both relevant infinite 2D contractible networks from the current PEPS and this transfer operator, and specify a contraction algorithm we can use to compute the values of these two networks. In addition, we'll specify the specific reverse From 0dd731a3dadad9731d153987a13e6cdeb3a4c3db Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 18:50:20 +0200 Subject: [PATCH 092/113] Update examples/3d_ising_partition_function/main.jl Co-authored-by: Lukas Devos --- examples/3d_ising_partition_function/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/3d_ising_partition_function/main.jl b/examples/3d_ising_partition_function/main.jl index 64a4eb24f..bbb2fe241 100644 --- a/examples/3d_ising_partition_function/main.jl +++ b/examples/3d_ising_partition_function/main.jl @@ -125,7 +125,7 @@ operator and bra objects. This object can also be constructed and contracted in straightforward way, so we can again compute its `network_value`. To define our cost function, we then need to construct the transfer operator as an -[`InfinitePEPO`](@ref), contruct the both relevant infinite 2D contractible networks from +[`InfinitePEPO`](@ref), construct the two infinite 2D contractible networks for the numerator and denominator from the current PEPS and this transfer operator, and specify a contraction algorithm we can use to compute the values of these two networks. In addition, we'll specify the specific reverse rule algorithm that will be used to compute the gradient of this cost function. From 67500c725fdb227c46a7a730541b7c3232ef1557 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 18:50:47 +0200 Subject: [PATCH 093/113] Update examples/3d_ising_partition_function/main.jl Co-authored-by: Lukas Devos --- examples/3d_ising_partition_function/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/3d_ising_partition_function/main.jl b/examples/3d_ising_partition_function/main.jl index bbb2fe241..0a1cb4270 100644 --- a/examples/3d_ising_partition_function/main.jl +++ b/examples/3d_ising_partition_function/main.jl @@ -178,7 +178,7 @@ this function. This can be done using the [`PEPSKit.hook_pullback`](@ref) functi PEPSKit.jl, which allows to hook into the pullback of a given function by specifying a specific algorithm for the pullback computation. Here, we opted to use an Arnoldi method to solve the linear problem defining the gradient of the network contraction at its fixed -point. This is exactly the workflow underlying [`PEPSKit.fixedpoint`](@ref) internally, and +point. This is exactly the workflow that internally underlies [`PEPSKit.fixedpoint`](@ref), and more info on particular gradient algorithms can be found in the corresponding docstring. ### Characterizing the optimization manifold From fdc3c2c452c50d524c6ad0bdba3f921362c76091 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 18:52:16 +0200 Subject: [PATCH 094/113] Update examples/3d_ising_partition_function/main.jl Co-authored-by: Lukas Devos --- examples/3d_ising_partition_function/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/3d_ising_partition_function/main.jl b/examples/3d_ising_partition_function/main.jl index 0a1cb4270..fb06de479 100644 --- a/examples/3d_ising_partition_function/main.jl +++ b/examples/3d_ising_partition_function/main.jl @@ -179,7 +179,7 @@ PEPSKit.jl, which allows to hook into the pullback of a given function by specif specific algorithm for the pullback computation. Here, we opted to use an Arnoldi method to solve the linear problem defining the gradient of the network contraction at its fixed point. This is exactly the workflow that internally underlies [`PEPSKit.fixedpoint`](@ref), and -more info on particular gradient algorithms can be found in the corresponding docstring. +more info on particular gradient algorithms can be found in the corresponding docstrings. ### Characterizing the optimization manifold From 63a5ee45ae763f32c7f47e8ab59f406639ef567a Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 18:52:56 +0200 Subject: [PATCH 095/113] Update examples/README.md Co-authored-by: Lukas Devos --- examples/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/README.md b/examples/README.md index 242429b06..e09f72dc4 100644 --- a/examples/README.md +++ b/examples/README.md @@ -8,7 +8,9 @@ scripts and are embedded into the docs using [Literate.jl](https://fredrikekre.g The example files have to be built and updated manually. In order to trigger the file generation, run: -``julia examples/make.jl` +```bash +julia examples/make.jl +``` By default, this will only generate files when the input file has not changed. This is achieved by keeping a checksum of the `main.jl` file in each example in a `Cache.toml`. From 920a723d699913477c834261554a2f16d024cc4f Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 18:55:23 +0200 Subject: [PATCH 096/113] Update examples/boundary_mps/main.jl Co-authored-by: Lukas Devos --- examples/boundary_mps/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/boundary_mps/main.jl b/examples/boundary_mps/main.jl index eb5e46c9d..adea17eb4 100644 --- a/examples/boundary_mps/main.jl +++ b/examples/boundary_mps/main.jl @@ -51,7 +51,7 @@ T = InfiniteTransferPEPS(peps₀, 1, 1) md""" Since we'll find the leading eigenvector of ``T`` as a boundary MPS, we first need to -initialize an initial guess to supply to our algorithm. We can do this using the +construct an initial guess to supply to our algorithm. We can do this using the [`initialize_mps`](@ref) function, which constructs a random MPS with a specific virtual space for a given transfer operator. Here, we'll build an initial guess for the boundary MPS with a bond dimension of 20: From 2df5cd5cf9dbfa12c8baa619640bad0a247df887 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 19:05:59 +0200 Subject: [PATCH 097/113] Update examples/heisenberg/main.jl Co-authored-by: Lukas Devos --- examples/heisenberg/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/heisenberg/main.jl b/examples/heisenberg/main.jl index 580015fdb..cf23af3df 100644 --- a/examples/heisenberg/main.jl +++ b/examples/heisenberg/main.jl @@ -9,7 +9,7 @@ PEPS. To that end, we will consider the two-dimensional Heisenberg model on a sq H = \sum_{\langle i,j \rangle} \left ( J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j \right ) ``` -Here, we want to set $J_x=J_y=J_z=1$ where the Heisenberg model is in the antiferromagnetic +Here, we want to set $J_x = J_y = J_z = 1$ where the Heisenberg model is in the antiferromagnetic regime. Due to the bipartite sublattice structure of antiferromagnetic order one needs a PEPS ansatz with a $2 \times 2$ unit cell. This can be circumvented by performing a unitary sublattice rotation on all B-sites resulting in a change of parameters to From c59980397bf388bddd18d357dd2eba86a1b87255 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 19:09:57 +0200 Subject: [PATCH 098/113] Update examples/heisenberg_su/main.jl Co-authored-by: Lukas Devos --- examples/heisenberg_su/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/heisenberg_su/main.jl b/examples/heisenberg_su/main.jl index c69bf85fd..97ff1cc62 100644 --- a/examples/heisenberg_su/main.jl +++ b/examples/heisenberg_su/main.jl @@ -11,7 +11,7 @@ H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S In the previous examples, we used a sublattice rotation to simulate antiferromagnetic Hamiltonian on a single-site unit cell. Here, we will instead use a $2 \times 2$ unit cell -and set $J_x=J_y=J_z=1$. +and set $J_x = J_y = J_z = 1$. Let's get started by seeding the RNG and importing all required modules: """ From 958182e7bc09f434809eb6406d8ba7489ca25095 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 19:11:52 +0200 Subject: [PATCH 099/113] Update examples/heisenberg_su/main.jl Co-authored-by: Lukas Devos --- examples/heisenberg_su/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/heisenberg_su/main.jl b/examples/heisenberg_su/main.jl index 97ff1cc62..459b941f2 100644 --- a/examples/heisenberg_su/main.jl +++ b/examples/heisenberg_su/main.jl @@ -40,7 +40,7 @@ md""" ## Simple updating We proceed by initializing a random weighted PEPS that will be evolved. Again, we'll -normalize its vertex tensors. First though, we need to take of defining the appropriate +normalize its vertex tensors. First though, we need to define the appropriate (symmetric) spaces: """ From 13d32d03ea181eb43ce9b36c4d6f6b7c93350517 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 19:13:30 +0200 Subject: [PATCH 100/113] Update examples/hubbard_su/main.jl Co-authored-by: Lukas Devos --- examples/hubbard_su/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/hubbard_su/main.jl b/examples/hubbard_su/main.jl index 914868661..5d45662a6 100644 --- a/examples/hubbard_su/main.jl +++ b/examples/hubbard_su/main.jl @@ -3,7 +3,7 @@ md""" # Simple update for the Fermi-Hubbard model at half-filling Once again, we consider the Hubbard model but this time we obtain the ground-state PEPS by -imaginary time evoluation. In particular, we'll use the [`SimpleUpdate`](@ref) algorithm. +imaginary time evolution. In particular, we'll use the [`SimpleUpdate`](@ref) algorithm. As a reminder, we define the Hubbard model as ```math From 7e07a48d1d2e6f4c4ab09e2c2deae04075cadf5a Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 19:15:14 +0200 Subject: [PATCH 101/113] Update examples/xxz/main.jl Co-authored-by: Lukas Devos --- examples/xxz/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/xxz/main.jl b/examples/xxz/main.jl index 9528f4878..2dfc198b5 100644 --- a/examples/xxz/main.jl +++ b/examples/xxz/main.jl @@ -10,7 +10,7 @@ H_0 = J \big(\sum_{\langle i, j \rangle} S_i^x S_j^x + S_i^y S_j^y + \Delta S_i^ ``` For appropriate $\Delta$, the model enters an antiferromagnetic phase (Néel order) which we -will force by adding staggered magnetic charges to ``H_0``. Furthermore, since the XXZ +will force by adding staggered magnetic charges to $H_0$. Furthermore, since the XXZ Hamiltonian obeys a $U(1)$ symmetry, we will make use of that and work with $U(1)$-symmetric PEPS and CTMRG environments. For simplicity, we will consider spin-$1/2$ operators. From e5b8aef11b83b04c9e853b90b0caf6ce4688f07a Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 19:17:00 +0200 Subject: [PATCH 102/113] Update examples/xxz/main.jl Co-authored-by: Lukas Devos --- examples/xxz/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/xxz/main.jl b/examples/xxz/main.jl index 2dfc198b5..92ee3c379 100644 --- a/examples/xxz/main.jl +++ b/examples/xxz/main.jl @@ -91,7 +91,7 @@ peps, env, E, info = fixedpoint( @show E; md""" -Note that for the specified parameters $J=\Delta=1$, we simulated the same Hamiltonian as +Note that for the specified parameters $J = \Delta = 1$, we simulated the same Hamiltonian as in the [Heisenberg example](@ref examples_heisenberg). In that example, with a non-symmetric $D=2$ PEPS simulation, we reached a ground-state energy of around $E_\text{D=2} = -0.6625\dots$. Again comparing against [Sandvik's](@cite sandvik_computational_2011) accurate QMC estimate From f660c1d3798f14ac2cfcafdf171e64574bb27313 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 19:42:13 +0200 Subject: [PATCH 103/113] Define `physicalspace(::LocalOperator)` --- examples/bose_hubbard/main.jl | 2 +- examples/fermi_hubbard/main.jl | 2 +- examples/xxz/main.jl | 2 +- src/algorithms/time_evolution/evoltools.jl | 2 +- src/operators/localoperator.jl | 33 ++++++++++++++-------- test/examples/bose_hubbard.jl | 2 +- test/examples/tf_ising.jl | 2 +- 7 files changed, 28 insertions(+), 17 deletions(-) diff --git a/examples/bose_hubbard/main.jl b/examples/bose_hubbard/main.jl index 16e4fb174..9e93cf362 100644 --- a/examples/bose_hubbard/main.jl +++ b/examples/bose_hubbard/main.jl @@ -50,7 +50,7 @@ Before we continue, it might be interesting to inspect the corresponding lattice spaces (which is here just a $1 \times 1$ matrix due to the single-site unit cell): """ -physical_spaces = H.lattice +physical_spaces = physicalspace(H) md""" Note that the physical space contains $U(1)$ charges -1, 0 and +1. Indeed, imposing a diff --git a/examples/fermi_hubbard/main.jl b/examples/fermi_hubbard/main.jl index 6dce003bd..aa8ca1dc1 100644 --- a/examples/fermi_hubbard/main.jl +++ b/examples/fermi_hubbard/main.jl @@ -79,7 +79,7 @@ Second, we initialize a PEPS state and environment (which we converge) construct symmetric physical and virtual spaces: """ -physical_spaces = H.lattice +physical_spaces = physicalspace(H) virtual_spaces = fill(V_peps, size(lattice)...) peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); diff --git a/examples/xxz/main.jl b/examples/xxz/main.jl index 92ee3c379..81b2fad37 100644 --- a/examples/xxz/main.jl +++ b/examples/xxz/main.jl @@ -62,7 +62,7 @@ spaces, which can be extracted directly from the Hamiltonian `LocalOperator`: V_peps = U1Space(0 => 2, 1 => 1, -1 => 1) V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2) virtual_spaces = fill(V_peps, size(lattice)...) -physical_spaces = H.lattice +physical_spaces = physicalspace(H) md""" ## Ground state search diff --git a/src/algorithms/time_evolution/evoltools.jl b/src/algorithms/time_evolution/evoltools.jl index 4f00148fb..18bad74fe 100644 --- a/src/algorithms/time_evolution/evoltools.jl +++ b/src/algorithms/time_evolution/evoltools.jl @@ -8,7 +8,7 @@ function get_gate(dt::Float64, H::LocalOperator) numin(op) == 2 && norm(Tuple(terms[2] - terms[1])) == 1.0 for (terms, op) in H.terms ]) "Only nearest-neighbour terms allowed" return LocalOperator( - H.lattice, Tuple(sites => exp(-dt * op) for (sites, op) in H.terms)... + physicalspace(H), Tuple(sites => exp(-dt * op) for (sites, op) in H.terms)... ) end diff --git a/src/operators/localoperator.jl b/src/operators/localoperator.jl index 1e2a1db37..c3e742023 100644 --- a/src/operators/localoperator.jl +++ b/src/operators/localoperator.jl @@ -96,6 +96,15 @@ function Base.repeat(O::LocalOperator, m::Int, n::Int) return LocalOperator(lattice, terms...) end +""" + physicalspace(O::LocalOperator) + +Return lattice of physical spaces on which the `LocalOperator` is defined. +""" +function MPSKit.physicalspace(O::LocalOperator) + return O.lattice +end + # Real and imaginary part # ----------------------- function Base.real(O::LocalOperator) @@ -181,36 +190,38 @@ end Mirror a `LocalOperator` across the anti-diagonal axis of its lattice. """ function mirror_antidiag(H::LocalOperator) - lattice2 = mirror_antidiag(H.lattice) + lattice2 = mirror_antidiag(physicalspace(H)) terms2 = ( - (Tuple(_mirror_antidiag_site(site, size(H.lattice)) for site in sites) => op) for - (sites, op) in H.terms + ( + Tuple(_mirror_antidiag_site(site, size(physicalspace(H))) for site in sites) => + op + ) for (sites, op) in H.terms ) return LocalOperator(lattice2, terms2...) end function Base.rotr90(H::LocalOperator) - lattice2 = rotr90(H.lattice) + lattice2 = rotr90(physicalspace(H)) terms2 = ( - (Tuple(_rotr90_site(site, size(H.lattice)) for site in sites) => op) for + (Tuple(_rotr90_site(site, size(physicalspace(H))) for site in sites) => op) for (sites, op) in H.terms ) return LocalOperator(lattice2, terms2...) end function Base.rotl90(H::LocalOperator) - lattice2 = rotl90(H.lattice) + lattice2 = rotl90(physicalspace(H)) terms2 = ( - (Tuple(_rotl90_site(site, size(H.lattice)) for site in sites) => op) for + (Tuple(_rotl90_site(site, size(physicalspace(H))) for site in sites) => op) for (sites, op) in H.terms ) return LocalOperator(lattice2, terms2...) end function Base.rot180(H::LocalOperator) - lattice2 = rot180(H.lattice) + lattice2 = rot180(physicalspace(H)) terms2 = ( - (Tuple(_rot180_site(site, size(H.lattice)) for site in sites) => op) for + (Tuple(_rot180_site(site, size(physicalspace(H))) for site in sites) => op) for (sites, op) in H.terms ) return LocalOperator(lattice2, terms2...) @@ -262,7 +273,7 @@ Change the spaces of a `LocalOperator` by fusing in an auxiliary charge on every according to a given matrix of 'auxiliary' physical charges. """ function MPSKit.add_physical_charge(H::LocalOperator, charges::AbstractMatrix{<:Sector}) - size(H.lattice) == size(charges) || + size(physicalspace(H)) == size(charges) || throw(ArgumentError("Incompatible lattice and auxiliary charge sizes")) sectortype(H) === eltype(charges) || throw(SectorMismatch("Incompatible lattice and auxiliary charge sizes")) @@ -271,7 +282,7 @@ function MPSKit.add_physical_charge(H::LocalOperator, charges::AbstractMatrix{<: Paux = PeriodicArray(map(c -> Vect[typeof(c)](c => 1), charges)) # new physical spaces - Pspaces = map(fuse, H.lattice, Paux) + Pspaces = map(fuse, physicalspace(H), Paux) new_terms = map(H.terms) do (sites, op) Paux_slice = map(Base.Fix1(getindex, Paux), sites) diff --git a/test/examples/bose_hubbard.jl b/test/examples/bose_hubbard.jl index 948ec033e..be363fef9 100644 --- a/test/examples/bose_hubbard.jl +++ b/test/examples/bose_hubbard.jl @@ -33,7 +33,7 @@ reuse_env = true # Hamiltonian H = bose_hubbard_model(ComplexF64, symmetry, lattice; cutoff, t, U, n) -Pspaces = H.lattice +Pspaces = physicalspace(H) # initialize state Nspaces = fill(Vpeps, size(lattice)...) diff --git a/test/examples/tf_ising.jl b/test/examples/tf_ising.jl index fa3b730ca..cc6758db5 100644 --- a/test/examples/tf_ising.jl +++ b/test/examples/tf_ising.jl @@ -33,7 +33,7 @@ peps, env, E, = fixedpoint(H, peps₀, env₀; tol=gradtol) # compute magnetization σx = TensorMap(scalartype(peps₀)[0 1; 1 0], ℂ^2, ℂ^2) -M = LocalOperator(H.lattice, (CartesianIndex(1, 1),) => σx) +M = LocalOperator(physicalspace(H), (CartesianIndex(1, 1),) => σx) magn = expectation_value(peps, M, env) @test E ≈ e atol = 1e-2 From 1ffdab81671c2819edaccacd3ee5af438ba405a2 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 19:52:53 +0200 Subject: [PATCH 104/113] Apply more suggestions --- src/algorithms/truncation/fullenv_truncation.jl | 3 ++- src/algorithms/truncation/truncationschemes.jl | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/algorithms/truncation/fullenv_truncation.jl b/src/algorithms/truncation/fullenv_truncation.jl index 5687134b2..7856f499b 100644 --- a/src/algorithms/truncation/fullenv_truncation.jl +++ b/src/algorithms/truncation/fullenv_truncation.jl @@ -94,7 +94,8 @@ end """ fullenv_truncate(benv::BondEnv{T,S}, b0::AbstractTensorMap{T,S,1,1}, alg::FullEnvTruncation) -> U, S, V, info -Perform full environment truncation algorithm on `benv`. +Perform full environment truncation algorithm from +[Phys. Rev. B 98, 085155 (2018)](@cite evenbly_gauge_2018) on `benv`. Given a fixed state `|b0⟩` with bond matrix `b0` and the corresponding positive-definite bond environment `benv`, diff --git a/src/algorithms/truncation/truncationschemes.jl b/src/algorithms/truncation/truncationschemes.jl index be311ecdd..9039d925e 100644 --- a/src/algorithms/truncation/truncationschemes.jl +++ b/src/algorithms/truncation/truncationschemes.jl @@ -16,11 +16,7 @@ const TRUNCATION_SCHEME_SYMBOLS = IdDict{Symbol,Type{<:TruncationScheme}}( :truncbelow => TensorKit.TruncationCutoff, ) -""" - _TruncationScheme(; kwargs...) - -Keyword argument parser returning the appropriate `TruncationScheme` algorithm struct. -""" +# Should be TruncationScheme but rename to avoid type piracy function _TruncationScheme(; alg=Defaults.trscheme, η=nothing) # replace Symbol with TruncationScheme type haskey(TRUNCATION_SCHEME_SYMBOLS, alg) || From b367864fbb9cd7b3abbde50d7de3a07967dd6536 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 19:56:03 +0200 Subject: [PATCH 105/113] Remove extra constructor docstrings --- src/environments/ctmrg_environments.jl | 16 ---------------- src/operators/infinitepepo.jl | 7 ------- src/states/infinitepartitionfunction.jl | 8 -------- src/states/infinitepeps.jl | 7 ------- 4 files changed, 38 deletions(-) diff --git a/src/environments/ctmrg_environments.jl b/src/environments/ctmrg_environments.jl index dbb20ceb1..9d1ab64e6 100644 --- a/src/environments/ctmrg_environments.jl +++ b/src/environments/ctmrg_environments.jl @@ -23,22 +23,6 @@ network being contracted. ## Fields $(TYPEDFIELDS) - -## Constructors - - CTMRGEnv( - [f=randn, T=ComplexF64], Ds_north::A, Ds_east::A, chis_north::B, [chis_east::B], [chis_south::B], [chis_west::B] - ) where {A<:AbstractMatrix{<:SpaceLike}, B<:AbstractMatrix{<:ElementarySpaceLike}} - CTMRGEnv( - [f=randn, T=ComplexF64], D_north::P, D_east::P, chi_north::S, [chi_east::S], [chi_south::S], [chi_west::S]; - unitcell::Tuple{Int,Int}=(1, 1), - ) where {P<:ProductSpaceLike,S<:ElementarySpaceLike} - CTMRGEnv( - [f=randn, T=ComplexF64], network::InfiniteSquareNetwork, chis_north::A, [chis_east::A], [chis_south::A], [chis_west::A] - ) where {A<:AbstractMatrix{<:ElementarySpaceLike}}} - CTMRGEnv( - [f=randn, T=ComplexF64,] network::InfiniteSquareNetwork, chi_north::S, [chi_east::S], [chi_south::S], [chi_west::S], - ) where {S<:ElementarySpaceLike} """ struct CTMRGEnv{C,T} corners::Array{C,3} diff --git a/src/operators/infinitepepo.jl b/src/operators/infinitepepo.jl index 66568ca6e..054d4cfdf 100644 --- a/src/operators/infinitepepo.jl +++ b/src/operators/infinitepepo.jl @@ -6,13 +6,6 @@ Represents an infinite projected entangled-pair operator (PEPO) on a 3D cubic la ## Fields $(TYPEDFIELDS) - -## Constructors - - InfinitePEPO(A::AbstractArray{T, 3}) - InfinitePEPO([f=randn, T=ComplexF64,] Pspaces, Nspaces, Espaces) - InfinitePEPO(A::PEPOTensor; unitcell=(1, 1, 1)) - InfinitePEPO([f=randn, T=ComplexF64,] Pspace::S, Nspace::S, [Espace::S]; unitcell=(1,1,1)) where {S<:ElementarySpace} """ struct InfinitePEPO{T<:PEPOTensor} A::Array{T,3} diff --git a/src/states/infinitepartitionfunction.jl b/src/states/infinitepartitionfunction.jl index 864c8b89b..2c281b0d1 100644 --- a/src/states/infinitepartitionfunction.jl +++ b/src/states/infinitepartitionfunction.jl @@ -6,14 +6,6 @@ Represents an infinite partition function on a 2D square lattice. ## Fields $(TYPEDFIELDS) - -## Constructors - - InfinitePartitionFunction(A::AbstractMatrix{T}) - InfinitePartitionFunction( - [f=randn, T=ComplexF64,] Pspaces::A, Nspaces::A, [Espaces::A] - ) where {A<:AbstractMatrix{<:Union{Int,ElementarySpace}}} - InfinitePartitionFunction(A::PartitionFunctionTensor; unitcell=(1, 1)) """ struct InfinitePartitionFunction{T<:PartitionFunctionTensor} A::Matrix{T} diff --git a/src/states/infinitepeps.jl b/src/states/infinitepeps.jl index 6bce6860b..5c992582a 100644 --- a/src/states/infinitepeps.jl +++ b/src/states/infinitepeps.jl @@ -6,13 +6,6 @@ Represents an infinite projected entangled-pair state on a 2D square lattice. ## Fields $(TYPEDFIELDS) - -## Constructors - - InfinitePEPS(A::AbstractMatrix{T}) - InfinitePEPS([f=randn, T=ComplexF64,] Pspaces::A, Nspaces::A, [Espaces::A]) where {A<:AbstractMatrix{<:Union{Int,ElementarySpace}}} - InfinitePEPS(A::PEPSTensor; unitcell=(1, 1)) - InfinitePEPS([f=randn, T=ComplexF64,] Pspace, Nspace, [Espace]; unitcell=(1,1)) """ struct InfinitePEPS{T<:PEPSTensor} A::Matrix{T} From 28f7dd44e48d695b5c4fa22f75dda854697cd691 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 20:27:45 +0200 Subject: [PATCH 106/113] Update boundary MPS example --- examples/boundary_mps/main.jl | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/examples/boundary_mps/main.jl b/examples/boundary_mps/main.jl index adea17eb4..51a4cef73 100644 --- a/examples/boundary_mps/main.jl +++ b/examples/boundary_mps/main.jl @@ -43,11 +43,16 @@ ket [`PEPSKit.PEPSTensor`](@ref) across their physical leg. Since the network we contract can be interpreted as the infinite power of ``T``, we can contract it by finding its leading eigenvector as a 1D MPS, which we call the boundary MPS. -In PEPSKit.jl, we can directly contruct the transfer operator corresponding to a PEPS norm +In PEPSKit.jl, we can directly construct the transfer operator corresponding to a PEPS norm network from a given infinite PEPS as an [`InfiniteTransferPEPS`](@ref) object. +Additionally, we need to specify which direction should be facing north (`dir=1` +corresponding to north, counting clockwise) and which row is selected from the north - but +since we have a trivial unit cell there is only one row: """ -T = InfiniteTransferPEPS(peps₀, 1, 1) +dir = 1 ## does not rotate the partition function +row = 1 +T = InfiniteTransferPEPS(peps₀, dir, row) md""" Since we'll find the leading eigenvector of ``T`` as a boundary MPS, we first need to @@ -65,9 +70,7 @@ Note that this will just construct a MPS with random Gaussian entries based on t spaces of the supplied transfer operator. Of course, one might come up with a better initial guess (leading to better convergence) depending on the application. To find the leading boundary MPS fixed point, we call [`leading_boundary`](@ref) using the -[`MPSKit.VUMPS`](@extref) algorithm from MPSKit. Note that, by default, `leading_boundary` -uses CTMRG where the settings are supplied as keyword arguments, so in the present case we -need to supply the VUMPS algorithm struct explicitly: +[`MPSKit.VUMPS`](@extref) algorithm from MPSKit: """ mps, env, ϵ = leading_boundary(mps₀, T, VUMPS(; tol=1e-6, verbosity=2)); @@ -100,13 +103,14 @@ case, the boundary MPS is an [`MultilineMPS`](@extref) object, which should be i by specifying a virtual space for each site in the partition function unit cell. First, we construct a PEPS with a $2 \times 2$ unit cell using the `unitcell` keyword -argument and then define the corresponding transfer operator: +argument and then define the corresponding transfer operator, where we again specify the +direction which will be facing north: """ peps₀_2x2 = InfinitePEPS( rand, ComplexF64, ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2) ) -T_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1); +T_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, dir); md""" Now, the procedure is the same as before: We compute the norm once using VUMPS, once using CTMRG and then compare. From 6cb6adc7604807cc5258c36111846cadba946cbc Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 21:38:18 +0200 Subject: [PATCH 107/113] Apply some more suggestions --- docs/make.jl | 6 +--- examples/2d_ising_partition_function/main.jl | 2 +- examples/3d_ising_partition_function/main.jl | 19 ++++++------ examples/heisenberg_su/main.jl | 32 ++++++++------------ examples/hubbard_su/main.jl | 11 +------ src/PEPSKit.jl | 4 +-- src/environments/ctmrg_environments.jl | 2 ++ src/operators/localoperator.jl | 2 +- 8 files changed, 30 insertions(+), 48 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 8fe00856b..b097f2c73 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -58,11 +58,7 @@ makedocs(; ), pages=[ "Home" => "index.md", - "Manual" => [ - "man/models.md", - "man/multithreading.md", - "man/precompilation.md", - ], + "Manual" => ["man/models.md", "man/multithreading.md", "man/precompilation.md"], "Examples" => [ "examples/index.md", "Optimization" => joinpath.(Ref("examples"), examples_optimization), diff --git a/examples/2d_ising_partition_function/main.jl b/examples/2d_ising_partition_function/main.jl index d523c7739..2c3726fd0 100644 --- a/examples/2d_ising_partition_function/main.jl +++ b/examples/2d_ising_partition_function/main.jl @@ -1,6 +1,6 @@ using Markdown #hide md""" -# The 2D classical Ising model using CTMRG +# [The 2D classical Ising model using CTMRG](@id e_2d_ising) While PEPSKit has a lot of use in quantum systems, describing states using InfinitePEPS that can be contracted via CTMRG or [boundary MPS techniques](@ref e_boundary_mps), here we shift our focus to classical physics. We consider the 2D classical Ising model and compute its partition function defined as: diff --git a/examples/3d_ising_partition_function/main.jl b/examples/3d_ising_partition_function/main.jl index fb06de479..5a0311ad9 100644 --- a/examples/3d_ising_partition_function/main.jl +++ b/examples/3d_ising_partition_function/main.jl @@ -2,23 +2,22 @@ using Markdown #hide md""" # [The 3D classical Ising model](@id e_3d_ising) -In a previous example we have already demonstrated an application of PEPSKit.jl to the study -of 2D classical statistical mechanics models. In this example, we will take this one step -further, and showcase how one can use PEPSKit.jl to study 3D classical statistical mechanics -models. We will demonstrate this for the specific case of the 3D classical Ising model, but -the same techniques can be applied to other 3D classical models as well. +In this example, we will showcase how one can use PEPSKit to study 3D classical statistical +mechanics models. In particular, we will consider a specific case of the 3D classical Ising +model, but the same techniques can be applied to other 3D classical models as well. -The workflow showcased in this example is a bit more experimental and less 'black-box' than -previous examples. Therefore it also serves as a demonstration of some of the more internal -functionality of PEPSKit.jl, and how one can adapt it to less 'standard' kinds of problems. +As compared to simulations of [2D partition functions](@ref e_2d_ising), the workflow +presented in this example is a bit more experimental and less 'black-box'. Therefore, it +also serves as a demonstration of some of the more internal functionality of PEPSKit, +and how one can adapt it to less 'standard' kinds of problems. -Let us consider again the partition function of the classical Ising model, +Let us consider the partition function of the classical Ising model, ```math \mathcal{Z}(\beta) = \sum_{\{s\}} \exp(-\beta H(s)) \text{ with } H(s) = -J \sum_{\langle i, j \rangle} s_i s_j . ``` -where now the classical spins $s_i \in \{+1, -1\}$ are located on the vertices $i$ of a 3D +where the classical spins $s_i \in \{+1, -1\}$ are located on the vertices $i$ of a 3D cubic lattice. The partition function of this model can be represented as a 3D tensor network with a rank-6 tensor at each vertex of the lattice. Such a network can be contracted by finding the fixed point of the corresponding transfer operator, in exactly the same diff --git a/examples/heisenberg_su/main.jl b/examples/heisenberg_su/main.jl index 459b941f2..06718cd51 100644 --- a/examples/heisenberg_su/main.jl +++ b/examples/heisenberg_su/main.jl @@ -2,16 +2,16 @@ using Markdown #hide md""" # Simple update for the Heisenberg model -In this next example, we will use [`SimpleUpdate`](@ref) imaginary time evolution to treat +In this example, we will use [`SimpleUpdate`](@ref) imaginary time evolution to treat the two-dimensional Heisenberg model once again: ```math H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j. ``` -In the previous examples, we used a sublattice rotation to simulate antiferromagnetic -Hamiltonian on a single-site unit cell. Here, we will instead use a $2 \times 2$ unit cell -and set $J_x = J_y = J_z = 1$. +In order to simulate the antiferromagnetic order of the Hamiltonian on a single-site unit +cell one typically applies a unitary sublattice rotation. Here, we will instead use a +$2 \times 2$ unit cell and set $J_x = J_y = J_z = 1$. Let's get started by seeding the RNG and importing all required modules: """ @@ -39,9 +39,8 @@ H = real(heisenberg_XYZ(ComplexF64, symm, InfiniteSquare(Nr, Nc); Jx=1, Jy=1, Jz md""" ## Simple updating -We proceed by initializing a random weighted PEPS that will be evolved. Again, we'll -normalize its vertex tensors. First though, we need to define the appropriate -(symmetric) spaces: +We proceed by initializing a random weighted PEPS that will be evolved. First though, we +need to define the appropriate (symmetric) spaces: """ Dbond = 4 @@ -58,10 +57,7 @@ else error("not implemented") end -wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, bond_space; unitcell=(Nr, Nc)) -for ind in CartesianIndices(wpeps.vertices) - wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf) -end +wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, bond_space; unitcell=(Nr, Nc)); md""" Next, we can start the `SimpleUpdate` routine, successively decreasing the time intervals @@ -117,18 +113,16 @@ function compute_mags(peps::InfinitePEPS, env::CTMRGEnv) S_ops = real.([S_z(symm)]) ## only Sz preserves end - return [ - collect( - expectation_value( - peps, LocalOperator(lattice, (CartesianIndex(r, c),) => S), env - ) for (r, c) in Iterators.product(1:size(peps, 1), 1:size(peps, 2)) - ) for S in S_ops - ] + return map(Iterators.product(axes(peps, 1), axes(peps, 2), S_ops)) do (r, c, S) + expectation_value(peps, LocalOperator(lattice, (CartesianIndex(r, c),) => S), env) + end end E = expectation_value(peps, H, env) / (Nr * Nc) Ms = compute_mags(peps, env) -M_norms = collect(norm([m[r, c] for m in Ms]) for (r, c) in Iterators.product(1:Nr, 1:Nc)) +M_norms = map( + rc -> norm(Ms[rc[1], rc[2], :]), Iterators.product(axes(peps, 1), axes(peps, 2)) +) @show E Ms M_norms; md""" diff --git a/examples/hubbard_su/main.jl b/examples/hubbard_su/main.jl index 5d45662a6..27a82eb3a 100644 --- a/examples/hubbard_su/main.jl +++ b/examples/hubbard_su/main.jl @@ -49,16 +49,7 @@ virtual_space = Vect[fℤ₂](0 => Dbond / 2, 1 => Dbond / 2) wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, virtual_space; unitcell=(Nr, Nc)); md""" -Before starting the simple update routine, we normalize the vertex tensors of `wpeps` by -dividing with the maximal vertex element (using the infinity norm): -""" - -for ind in CartesianIndices(wpeps.vertices) - wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf) -end - -md""" -Let's set algorithm parameters: The plan is to successively decrease the time interval of +Let's set the algorithm parameters: The plan is to successively decrease the time interval of the Trotter-Suzuki as well as the convergence tolerance such that we obtain a more accurate result at each iteration. To run the simple update, we call [`simpleupdate`](@ref) where we use the keyword `bipartite=false` - meaning that we use the full $2 \times 2$ unit cell diff --git a/src/PEPSKit.jl b/src/PEPSKit.jl index 4ad1441ab..6d053d3fa 100644 --- a/src/PEPSKit.jl +++ b/src/PEPSKit.jl @@ -7,7 +7,7 @@ using VectorInterface using TensorKit, KrylovKit, MPSKit, OptimKit, TensorOperations using ChainRulesCore, Zygote using LoggingExtras -import MPSKit: leading_boundary, loginit!, logiter!, logfinish!, logcancel! +import MPSKit: leading_boundary, loginit!, logiter!, logfinish!, logcancel!, physicalspace using MPSKitModels using FiniteDifferences using OhMyThreads: tmap @@ -75,7 +75,7 @@ export set_scheduler! export SVDAdjoint, FullSVDReverseRule, IterSVD export CTMRGEnv, SequentialCTMRG, SimultaneousCTMRG export FixedSpaceTruncation, HalfInfiniteProjector, FullInfiniteProjector -export LocalOperator +export LocalOperator, physicalspace export expectation_value, cost_function, product_peps, correlation_length, network_value export leading_boundary export PEPSOptimize, GeomSum, ManualIter, LinSolver, EigSolver diff --git a/src/environments/ctmrg_environments.jl b/src/environments/ctmrg_environments.jl index 9d1ab64e6..571edf98d 100644 --- a/src/environments/ctmrg_environments.jl +++ b/src/environments/ctmrg_environments.jl @@ -25,7 +25,9 @@ network being contracted. $(TYPEDFIELDS) """ struct CTMRGEnv{C,T} + "4 x rows x cols array of corner tensors, where the first dimension specifies the spatial direction" corners::Array{C,3} + "4 x rows x cols array of edge tensors, where the first dimension specifies the spatial direction" edges::Array{T,3} end diff --git a/src/operators/localoperator.jl b/src/operators/localoperator.jl index c3e742023..5f096bd89 100644 --- a/src/operators/localoperator.jl +++ b/src/operators/localoperator.jl @@ -101,7 +101,7 @@ end Return lattice of physical spaces on which the `LocalOperator` is defined. """ -function MPSKit.physicalspace(O::LocalOperator) +function physicalspace(O::LocalOperator) return O.lattice end From fbdbe31ea6577633398786b973baa4305c2a8308 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 22:55:40 +0200 Subject: [PATCH 108/113] Improve truncation error wording --- examples/heisenberg/main.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/heisenberg/main.jl b/examples/heisenberg/main.jl index cf23af3df..4acfa18da 100644 --- a/examples/heisenberg/main.jl +++ b/examples/heisenberg/main.jl @@ -102,7 +102,9 @@ env₀, info_ctmrg = leading_boundary(env_random, peps₀; boundary_alg...); md""" Besides the converged environment, `leading_boundary` also returns a `NamedTuple` of -informational quantities such as the last (maximal) SVD truncation error: +informational quantities such as the last maximal truncation error - that is, the SVD +approximation error incurred in the last CTMRG iteration, maximized over all spatial +directions and unit cell entries: """ @show info_ctmrg.truncation_error; From 368dd12073ba20aab6e653c67ae03cf885f0005a Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 23:22:34 +0200 Subject: [PATCH 109/113] Get rid of `root` directory in examples make file --- .../2d_ising_partition_function/index.md | 37 +++++++++------- .../2d_ising_partition_function/main.ipynb | 12 +++-- examples/Cache.toml | 11 +---- examples/make.jl | 44 ++++++++----------- 4 files changed, 46 insertions(+), 58 deletions(-) diff --git a/docs/src/examples/2d_ising_partition_function/index.md b/docs/src/examples/2d_ising_partition_function/index.md index e0fdda008..0a1233144 100644 --- a/docs/src/examples/2d_ising_partition_function/index.md +++ b/docs/src/examples/2d_ising_partition_function/index.md @@ -2,17 +2,15 @@ EditURL = "../../../../examples/2d_ising_partition_function/main.jl" ``` -[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//2d_ising_partition_function/main.ipynb) -[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//2d_ising_partition_function/main.ipynb) -[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//2d_ising_partition_function) +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/2d_ising_partition_function/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/2d_ising_partition_function/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/2d_ising_partition_function) -# The 2D classical Ising model using CTMRG +# [The 2D classical Ising model using CTMRG](@id e_2d_ising) -All previous examples dealt with quantum systems, describing their states by `InfinitePEPS` -that can be contracted using CTMRG or [boundary MPS techniques](@ref e_boundary_mps). Here, -we shift our focus towards classical physics and consider the 2D classical Ising model with -the partition function +While PEPSKit has a lot of use in quantum systems, describing states using InfinitePEPS that can be contracted via CTMRG or [boundary MPS techniques](@ref e_boundary_mps), here we shift our focus to classical physics. +We consider the 2D classical Ising model and compute its partition function defined as: ```math \mathcal{Z}(\beta) = \sum_{\{s\}} \exp(-\beta H(s)) \text{ with } H(s) = -J \sum_{\langle i, j \rangle} s_i s_j . @@ -33,6 +31,13 @@ using QuadGK Random.seed!(234923); ```` +```` +Precompiling QuadGK... + 744.1 ms ✓ QuadGK + 1 dependency successfully precompiled in 1 seconds. 12 already precompiled. + +```` + ## Defining the partition function The first step is to define the rank-4 tensor that, when contracted on a square lattice, @@ -125,8 +130,8 @@ env, = leading_boundary(env₀, Z; tol=1e-8, maxiter=500); ```` ```` -[ Info: CTMRG init: obj = +1.767587313024e+00 -1.536527975696e+00im err = 1.0000e+00 -[ Info: CTMRG conv 62: obj = +3.353928644031e+00 err = 4.7636155793e-09 time = 6.03 sec +[ Info: CTMRG init: obj = +1.784252138312e+00 -1.557258880375e+00im err = 1.0000e+00 +[ Info: CTMRG conv 63: obj = +3.353928644031e+00 err = 4.5940673351e-09 time = 9.20 sec ```` @@ -161,9 +166,9 @@ e = expectation_value(Z, (1, 1) => E, env) ```` ```` -λ = 3.3539286440313765 - 3.486341495761219e-16im -m = 0.9736086674403004 + 7.16942808669034e-17im -e = -1.8637796145082448 + 0.0im +λ = 3.3539286440313787 - 4.111412204695009e-16im +m = 0.9736086674402998 + 1.8261433647976018e-16im +e = -1.8637796145082444 - 1.4609146918380815e-16im ```` @@ -207,9 +212,9 @@ extrapolation): ```` ```` -(-(log(λ)) / beta - f_exact) / f_exact = -1.1009271732942546e-15 - 8.58980335690302e-17im -(abs(m) - abs(m_exact)) / abs(m_exact) = -1.1403175236145204e-16 -(e - e_exact) / e_exact = -0.02373206809908996 - 0.0im +(-(log(λ)) / beta - f_exact) / f_exact = -6.605563039765528e-16 - 1.0129880391935085e-16im +(abs(m) - abs(m_exact)) / abs(m_exact) = -6.841905141687122e-16 +(e - e_exact) / e_exact = -0.023732068099090193 + 7.65242925602409e-17im ```` diff --git a/docs/src/examples/2d_ising_partition_function/main.ipynb b/docs/src/examples/2d_ising_partition_function/main.ipynb index 5ae5c568d..fcc17cec6 100644 --- a/docs/src/examples/2d_ising_partition_function/main.ipynb +++ b/docs/src/examples/2d_ising_partition_function/main.ipynb @@ -14,10 +14,8 @@ "source": [ "# The 2D classical Ising model using CTMRG\n", "\n", - "All previous examples dealt with quantum systems, describing their states by `InfinitePEPS`\n", - "that can be contracted using CTMRG or boundary MPS techniques. Here,\n", - "we shift our focus towards classical physics and consider the 2D classical Ising model with\n", - "the partition function\n", + "While PEPSKit has a lot of use in quantum systems, describing states using InfinitePEPS that can be contracted via CTMRG or boundary MPS techniques, here we shift our focus to classical physics.\n", + "We consider the 2D classical Ising model and compute its partition function defined as:\n", "\n", "$$\n", "\\mathcal{Z}(\\beta) = \\sum_{\\{s\\}} \\exp(-\\beta H(s)) \\text{ with } H(s) = -J \\sum_{\\langle i, j \\rangle} s_i s_j .\n", @@ -262,11 +260,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.11.5" }, "kernelspec": { - "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "name": "julia-1.11", + "display_name": "Julia 1.11.5", "language": "julia" } }, diff --git a/examples/Cache.toml b/examples/Cache.toml index 3e65dcea8..c1ebb8d1a 100644 --- a/examples/Cache.toml +++ b/examples/Cache.toml @@ -1,10 +1 @@ -["./"] -bose_hubbard = "8c1c006bd879a1e791fbd1fb11bce1056a9400f062e15ea2e794255fb1547ee0" -hubbard_su = "27bb6bc05ae104080e6048f9f1ae84b086bea034b794d7997baf6da9e2d2f257" -2d_ising_partition_function = "3e2628f583dbeee5de69af787561cfccfa204fa5750fde4c360815a4d26f4b1c" -heisenberg_su = "27d48d1b9dfbc600c3cfa829f3bb5708f21e95ea92da2930afdf6973fb3bcaec" -3d_ising_partition_function = "6803a6721597e1db11ac455ce720f73a3922fc6d0f14aec4c619070ebc8a8781" -xxz = "8319d9b985dcf48b5bcdf992b44923a5f8fe8fc7e83be3d55eeddfe07048fb03" -boundary_mps = "decc9d804c3f595a1b7872b90c8bcd6725f72c4f920970a80f2ed8de05d28f05" -fermi_hubbard = "958a68a2395a3fae6aaee4b1b3376c3b47a28609ecb29257b778b8b83c937316" -heisenberg = "65ccc80fefe009ef3a626e497e3d054fbc1a8f92d40cef3cb8a5bf6254a6a57f" +2d_ising_partition_function = "9bcfd5f2d320a044515570e22595e61ef336dd3b2b478bc628162539a96bc6dc" diff --git a/examples/make.jl b/examples/make.jl index 438ad2cdd..0c2060e8a 100644 --- a/examples/make.jl +++ b/examples/make.jl @@ -19,54 +19,48 @@ const CACHEFILE = joinpath(@__DIR__, "Cache.toml") getcache() = isfile(CACHEFILE) ? TOML.parsefile(CACHEFILE) : Dict{String,Any}() -function iscached(root, name) +function iscached(name) cache = getcache() - return haskey(cache, root) && - haskey(cache[root], name) && - cache[root][name] == checksum(root, name) + return haskey(cache, name) && cache[name] == checksum(name) end -function setcached(root, name) +function setcached(name) cache = getcache() - if haskey(cache, root) - cache[root][name] = checksum(root, name) - else - cache[root] = Dict{String,Any}(name => checksum(root, name)) - end + cache[name] = checksum(name) return open(f -> TOML.print(f, cache), CACHEFILE, "w") end -checksum(root, name) = bytes2hex(sha256(joinpath(@__DIR__, root, name, "main.jl"))) +checksum(name) = bytes2hex(sha256(joinpath(@__DIR__, name, "main.jl"))) # ---------------------------------------------------------------------------------------- # # Building # ---------------------------------------------------------------------------------------- # -attach_notebook_badge(root, name) = str -> attach_notebook_badge(root, name, str) -function attach_notebook_badge(root, name, str) +attach_notebook_badge(name) = str -> attach_notebook_badge(name, str) +function attach_notebook_badge(name, str) mybinder_badge_url = "https://mybinder.org/badge_logo.svg" nbviewer_badge_url = "https://img.shields.io/badge/show-nbviewer-579ACA.svg" download_badge_url = "https://img.shields.io/badge/download-project-orange" - mybinder = "[![]($mybinder_badge_url)](@__BINDER_ROOT_URL__/examples/$root/$name/main.ipynb)" - nbviewer = "[![]($nbviewer_badge_url)](@__NBVIEWER_ROOT_URL__/examples/$root/$name/main.ipynb)" - download = "[![]($download_badge_url)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/$root/$name)" + mybinder = "[![]($mybinder_badge_url)](@__BINDER_ROOT_URL__/examples/$name/main.ipynb)" + nbviewer = "[![]($nbviewer_badge_url)](@__NBVIEWER_ROOT_URL__/examples/$name/main.ipynb)" + download = "[![]($download_badge_url)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/$name)" markdown_only(x) = "#md # " * x return join(map(markdown_only, (mybinder, nbviewer, download)), "\n") * "\n\n" * str end -function build_example(root, name) - source_dir = joinpath(@__DIR__, "..", "examples", root, name) +function build_example(name) + source_dir = joinpath(@__DIR__, "..", "examples", name) source_file = joinpath(source_dir, "main.jl") - target_dir = joinpath(@__DIR__, "..", "docs", "src", "examples", root, name) + target_dir = joinpath(@__DIR__, "..", "docs", "src", "examples", name) - if !iscached(root, name) + if !iscached(name) Literate.markdown( source_file, target_dir; execute=true, name="index", - preprocess=attach_notebook_badge(root, name), + preprocess=attach_notebook_badge(name), mdstrings=true, nbviewer_root_url="https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev", binder_root_url="https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev", @@ -86,14 +80,14 @@ function build_example(root, name) foreach(filter(!=("main.jl"), readdir(source_dir))) do f return cp(joinpath(source_dir, f), joinpath(target_dir, f); force=true) end - setcached(root, name) + setcached(name) end end -function build(root="./") +function build() return cd(@__DIR__) do - examples = filter(isdir, readdir(joinpath(@__DIR__, root))) # filter out directories to ignore Cache.toml, etc. - return map(ex -> build_example(root, ex), examples) + examples = filter(isdir, readdir(@__DIR__)) # filter out directories to ignore Cache.toml, etc. + return map(ex -> build_example(ex), examples) end end From 55e524327bb43944d6876c29d869902ec4fd0f73 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Thu, 1 May 2025 23:42:53 +0200 Subject: [PATCH 110/113] Update Cache.toml --- .../3d_ising_partition_function/index.md | 199 +++++++++--------- .../3d_ising_partition_function/main.ipynb | 39 ++-- examples/Cache.toml | 1 + 3 files changed, 118 insertions(+), 121 deletions(-) diff --git a/docs/src/examples/3d_ising_partition_function/index.md b/docs/src/examples/3d_ising_partition_function/index.md index ff50a94e1..edb6d036a 100644 --- a/docs/src/examples/3d_ising_partition_function/index.md +++ b/docs/src/examples/3d_ising_partition_function/index.md @@ -2,36 +2,35 @@ EditURL = "../../../../examples/3d_ising_partition_function/main.jl" ``` -[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//3d_ising_partition_function/main.ipynb) -[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//3d_ising_partition_function/main.ipynb) -[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//3d_ising_partition_function) +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/3d_ising_partition_function/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/3d_ising_partition_function/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/3d_ising_partition_function) # [The 3D classical Ising model](@id e_3d_ising) -In a previous example we have already demonstrated an application of PEPSKit.jl to the study -of 2D classical statistical mechanics models. In this example, we will take this one step -further, and showcase how one can use PEPSKit.jl to study 3D classical statistical mechanics -models. We will demonstrate this for the specific case of the 3D classical Ising model, but -the same techniques can be applied to other 3D classical models as well. +In this example, we will showcase how one can use PEPSKit to study 3D classical statistical +mechanics models. In particular, we will consider a specific case of the 3D classical Ising +model, but the same techniques can be applied to other 3D classical models as well. -The workflow showcased in this example is a bit more experimental and less 'black-box' than -previous examples. Therefore it also serves as a demonstration of some of the more internal -functionality of PEPSKit.jl, and how one can adapt it to less 'standard' kinds of problems. +As compared to simulations of [2D partition functions](@ref e_2d_ising), the workflow +presented in this example is a bit more experimental and less 'black-box'. Therefore, it +also serves as a demonstration of some of the more internal functionality of PEPSKit, +and how one can adapt it to less 'standard' kinds of problems. -Let us consider again the partition function of the classical Ising model, +Let us consider the partition function of the classical Ising model, ```math \mathcal{Z}(\beta) = \sum_{\{s\}} \exp(-\beta H(s)) \text{ with } H(s) = -J \sum_{\langle i, j \rangle} s_i s_j . ``` -where now the classical spins $s_i \in \{+1, -1\}$ are located on the vertices $i$ of a 3D +where the classical spins $s_i \in \{+1, -1\}$ are located on the vertices $i$ of a 3D cubic lattice. The partition function of this model can be represented as a 3D tensor network with a rank-6 tensor at each vertex of the lattice. Such a network can be contracted by finding the fixed point of the corresponding transfer operator, in exactly the same spirit as the [boundary MPS methods](@ref e_boundary_mps) demonstrated in another example. -Let's start by making the example deterministic and we doing our imports: +Let's start by making the example deterministic and importing the required packages: ````julia using Random @@ -125,7 +124,7 @@ where ``N`` is the diverging number of sites of the 2D transfer operator ``T``. ### Defining the cost function -Using PEPSKit.jl, this cost function and its gradient can be easily computed, after which we +Using PEPSKit.jl, this cost function and its gradient can be computed, after which we can use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it. We can immediately recognize the denominator ``\langle \psi | \psi \rangle`` as the familiar PEPS norm, where we can compute the norm per site as the [`network_value`](@ref) of the @@ -133,10 +132,10 @@ corresponding [`InfiniteSquareNetwork`](@ref) by contracting it with the CTMRG a Similarly, the numerator ``\langle \psi | T | \psi \rangle`` is nothing more than an `InfiniteSquareNetwork` consisting of three layers corresponding to the ket, transfer operator and bra objects. This object can also be constructed and contracted in a -straightforward way, after we can again compute its `network_value`. +straightforward way, so we can again compute its `network_value`. -So to define our cost function, we just need to construct the transfer operator as an -[`InfinitePEPO`](@ref), contruct the both relevant infinite 2D contractible networks from +To define our cost function, we then need to construct the transfer operator as an +[`InfinitePEPO`](@ref), construct the two infinite 2D contractible networks for the numerator and denominator from the current PEPS and this transfer operator, and specify a contraction algorithm we can use to compute the values of these two networks. In addition, we'll specify the specific reverse rule algorithm that will be used to compute the gradient of this cost function. @@ -189,8 +188,8 @@ this function. This can be done using the [`PEPSKit.hook_pullback`](@ref) functi PEPSKit.jl, which allows to hook into the pullback of a given function by specifying a specific algorithm for the pullback computation. Here, we opted to use an Arnoldi method to solve the linear problem defining the gradient of the network contraction at its fixed -point. This is exactly the workflow underlying [`PEPSKit.fixedpoint`](@ref) internally, and -more info on particular gradient algorithms can be found in the corresponding docstring. +point. This is exactly the workflow that internally underlies [`PEPSKit.fixedpoint`](@ref), and +more info on particular gradient algorithms can be found in the corresponding docstrings. ### Characterizing the optimization manifold @@ -259,88 +258,86 @@ optimizer_alg = LBFGS(32; maxiter=100, gradtol=1e-5, verbosity=3) ┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Float64}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 -┌ Warning: CTMRG cancel 150: obj = +1.702942227203e+01 +1.438609955721e-07im err = 2.4390784904e-05 time = 9.24 sec -└ @ PEPSKit ~/git/PEPSKit.jl/src/algorithms/ctmrg/ctmrg.jl:155 -[ Info: LBFGS: iter 1, time 144.38 s: f = -0.777080930424, ‖∇f‖ = 3.1305e-02, α = 7.10e+02, m = 0, nfg = 7 +┌ Warning: CTMRG cancel 150: obj = +1.702942228759e+01 +1.443123473083e-07im err = 2.4386740911e-05 time = 2.74 sec +└ @ PEPSKit ~/repos/PEPSKit.jl/src/algorithms/ctmrg/ctmrg.jl:155 +[ Info: LBFGS: iter 1, time 163.94 s: f = -0.777080930369, ‖∇f‖ = 3.1305e-02, α = 7.10e+02, m = 0, nfg = 7 ┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 -[ Info: LBFGS: iter 2, time 147.50 s: f = -0.784111515920, ‖∇f‖ = 2.0103e-02, α = 1.00e+00, m = 1, nfg = 1 -[ Info: LBFGS: iter 3, time 148.61 s: f = -0.792705733264, ‖∇f‖ = 2.3327e-02, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 4, time 149.51 s: f = -0.796289732161, ‖∇f‖ = 2.2475e-02, α = 1.00e+00, m = 3, nfg = 1 -[ Info: LBFGS: iter 5, time 150.24 s: f = -0.799674902231, ‖∇f‖ = 7.0288e-03, α = 1.00e+00, m = 4, nfg = 1 -[ Info: LBFGS: iter 6, time 150.90 s: f = -0.800082100115, ‖∇f‖ = 1.2717e-03, α = 1.00e+00, m = 5, nfg = 1 -[ Info: LBFGS: iter 7, time 151.69 s: f = -0.800110603120, ‖∇f‖ = 1.3384e-03, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 8, time 152.35 s: f = -0.800262202003, ‖∇f‖ = 2.4945e-03, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 9, time 153.02 s: f = -0.800450505439, ‖∇f‖ = 2.9259e-03, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 10, time 154.51 s: f = -0.800764917063, ‖∇f‖ = 1.7221e-03, α = 1.00e+00, m = 9, nfg = 1 -[ Info: LBFGS: iter 11, time 155.29 s: f = -0.800876048822, ‖∇f‖ = 2.2475e-03, α = 1.00e+00, m = 10, nfg = 1 -[ Info: LBFGS: iter 12, time 155.96 s: f = -0.801100867388, ‖∇f‖ = 1.5561e-03, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 13, time 156.75 s: f = -0.801317048785, ‖∇f‖ = 1.1561e-03, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 14, time 157.56 s: f = -0.801373050522, ‖∇f‖ = 7.1300e-04, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 15, time 158.53 s: f = -0.801388615258, ‖∇f‖ = 2.8462e-04, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 16, time 159.46 s: f = -0.801394633326, ‖∇f‖ = 2.7607e-04, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 17, time 160.33 s: f = -0.801408061547, ‖∇f‖ = 3.6096e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 18, time 161.44 s: f = -0.801509542237, ‖∇f‖ = 1.9822e-03, α = 1.00e+00, m = 17, nfg = 1 -[ Info: LBFGS: iter 19, time 162.56 s: f = -0.801578405298, ‖∇f‖ = 1.8040e-03, α = 1.00e+00, m = 18, nfg = 1 -[ Info: LBFGS: iter 20, time 166.52 s: f = -0.801694524832, ‖∇f‖ = 2.9356e-03, α = 5.48e-01, m = 19, nfg = 3 -[ Info: LBFGS: iter 21, time 168.81 s: f = -0.801761920585, ‖∇f‖ = 1.1993e-03, α = 3.82e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 22, time 169.89 s: f = -0.801797785496, ‖∇f‖ = 6.0337e-04, α = 1.00e+00, m = 21, nfg = 1 -[ Info: LBFGS: iter 23, time 172.11 s: f = -0.801808747834, ‖∇f‖ = 3.7053e-04, α = 5.24e-01, m = 22, nfg = 2 -[ Info: LBFGS: iter 24, time 173.16 s: f = -0.801812729196, ‖∇f‖ = 3.0781e-04, α = 1.00e+00, m = 23, nfg = 1 -[ Info: LBFGS: iter 25, time 174.21 s: f = -0.801816445181, ‖∇f‖ = 2.9994e-04, α = 1.00e+00, m = 24, nfg = 1 -[ Info: LBFGS: iter 26, time 175.24 s: f = -0.801824712580, ‖∇f‖ = 3.6497e-04, α = 1.00e+00, m = 25, nfg = 1 -[ Info: LBFGS: iter 27, time 176.42 s: f = -0.801839673918, ‖∇f‖ = 5.4217e-04, α = 1.00e+00, m = 26, nfg = 1 -[ Info: LBFGS: iter 28, time 177.59 s: f = -0.801857480042, ‖∇f‖ = 2.7918e-04, α = 1.00e+00, m = 27, nfg = 1 -[ Info: LBFGS: iter 29, time 178.76 s: f = -0.801864556175, ‖∇f‖ = 1.2323e-04, α = 1.00e+00, m = 28, nfg = 1 -[ Info: LBFGS: iter 30, time 179.86 s: f = -0.801865599394, ‖∇f‖ = 8.6049e-05, α = 1.00e+00, m = 29, nfg = 1 -[ Info: LBFGS: iter 31, time 181.16 s: f = -0.801867571015, ‖∇f‖ = 8.8673e-05, α = 1.00e+00, m = 30, nfg = 1 -[ Info: LBFGS: iter 32, time 182.36 s: f = -0.801870391456, ‖∇f‖ = 2.6510e-04, α = 1.00e+00, m = 31, nfg = 1 -[ Info: LBFGS: iter 33, time 183.60 s: f = -0.801874799763, ‖∇f‖ = 2.7836e-04, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 34, time 184.85 s: f = -0.801877566434, ‖∇f‖ = 1.8512e-04, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 35, time 186.03 s: f = -0.801878506140, ‖∇f‖ = 2.0603e-04, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 36, time 187.13 s: f = -0.801878994665, ‖∇f‖ = 5.6086e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 37, time 188.25 s: f = -0.801879153394, ‖∇f‖ = 6.2420e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 38, time 189.35 s: f = -0.801879354902, ‖∇f‖ = 6.0532e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 39, time 190.46 s: f = -0.801880114487, ‖∇f‖ = 6.2680e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 40, time 191.69 s: f = -0.801881471358, ‖∇f‖ = 6.2392e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 41, time 192.98 s: f = -0.801882270540, ‖∇f‖ = 9.4942e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 42, time 194.10 s: f = -0.801882598674, ‖∇f‖ = 5.1910e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 43, time 195.22 s: f = -0.801882711254, ‖∇f‖ = 2.6275e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 44, time 196.27 s: f = -0.801882805203, ‖∇f‖ = 2.9425e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 45, time 197.29 s: f = -0.801883026107, ‖∇f‖ = 2.7910e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 46, time 198.44 s: f = -0.801883400172, ‖∇f‖ = 3.7426e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 47, time 199.61 s: f = -0.801883717581, ‖∇f‖ = 5.4717e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 48, time 200.77 s: f = -0.801883966703, ‖∇f‖ = 2.9045e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 49, time 201.95 s: f = -0.801884163647, ‖∇f‖ = 3.0661e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 50, time 203.18 s: f = -0.801884391105, ‖∇f‖ = 4.1905e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 51, time 204.55 s: f = -0.801884815983, ‖∇f‖ = 6.9018e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 52, time 205.72 s: f = -0.801885013427, ‖∇f‖ = 3.8025e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 53, time 206.89 s: f = -0.801885126302, ‖∇f‖ = 1.9306e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 54, time 208.06 s: f = -0.801885184513, ‖∇f‖ = 3.3083e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 55, time 209.30 s: f = -0.801885308658, ‖∇f‖ = 4.9014e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 56, time 210.56 s: f = -0.801885502272, ‖∇f‖ = 1.1303e-04, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 57, time 211.87 s: f = -0.801885922461, ‖∇f‖ = 7.5880e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 58, time 213.22 s: f = -0.801886457901, ‖∇f‖ = 7.2957e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 59, time 214.50 s: f = -0.801886614664, ‖∇f‖ = 6.8816e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 60, time 216.92 s: f = -0.801886696733, ‖∇f‖ = 3.0687e-05, α = 4.26e-01, m = 32, nfg = 2 -[ Info: LBFGS: iter 61, time 218.01 s: f = -0.801886716271, ‖∇f‖ = 2.1581e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 62, time 219.10 s: f = -0.801886732686, ‖∇f‖ = 1.7659e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 63, time 220.30 s: f = -0.801886790357, ‖∇f‖ = 4.1045e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 64, time 221.53 s: f = -0.801886827022, ‖∇f‖ = 4.0831e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 65, time 222.57 s: f = -0.801886871472, ‖∇f‖ = 4.1034e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 66, time 223.64 s: f = -0.801886949562, ‖∇f‖ = 5.1171e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 67, time 224.79 s: f = -0.801887066612, ‖∇f‖ = 4.5902e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 68, time 226.00 s: f = -0.801887172301, ‖∇f‖ = 7.4810e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 69, time 227.33 s: f = -0.801887249759, ‖∇f‖ = 3.9619e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 70, time 228.45 s: f = -0.801887292124, ‖∇f‖ = 1.3999e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 71, time 229.64 s: f = -0.801887312574, ‖∇f‖ = 1.0813e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 72, time 230.93 s: f = -0.801887349749, ‖∇f‖ = 1.1335e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 73, time 232.31 s: f = -0.801887427066, ‖∇f‖ = 1.9028e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 74, time 233.68 s: f = -0.801887495625, ‖∇f‖ = 1.9286e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 75, time 237.82 s: f = -0.801887521350, ‖∇f‖ = 2.5284e-05, α = 5.43e-01, m = 32, nfg = 2 -[ Info: LBFGS: iter 76, time 239.82 s: f = -0.801887560129, ‖∇f‖ = 2.7094e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: converged after 77 iterations and time 241.32 s: f = -0.801887571684, ‖∇f‖ = 7.8819e-06 +[ Info: LBFGS: iter 2, time 165.88 s: f = -0.784111515961, ‖∇f‖ = 2.0103e-02, α = 1.00e+00, m = 1, nfg = 1 +[ Info: LBFGS: iter 3, time 166.20 s: f = -0.792705733484, ‖∇f‖ = 2.3327e-02, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 4, time 166.46 s: f = -0.796289732476, ‖∇f‖ = 2.2475e-02, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 5, time 166.70 s: f = -0.799674902374, ‖∇f‖ = 7.0288e-03, α = 1.00e+00, m = 4, nfg = 1 +[ Info: LBFGS: iter 6, time 166.95 s: f = -0.800082100121, ‖∇f‖ = 1.2717e-03, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 7, time 167.27 s: f = -0.800110603125, ‖∇f‖ = 1.3384e-03, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 8, time 168.04 s: f = -0.800262201996, ‖∇f‖ = 2.4945e-03, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 9, time 168.31 s: f = -0.800450505448, ‖∇f‖ = 2.9259e-03, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 10, time 168.51 s: f = -0.800764917087, ‖∇f‖ = 1.7221e-03, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 11, time 168.74 s: f = -0.800876048838, ‖∇f‖ = 2.2475e-03, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 12, time 168.92 s: f = -0.801100867467, ‖∇f‖ = 1.5561e-03, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 13, time 169.14 s: f = -0.801317048856, ‖∇f‖ = 1.1561e-03, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 14, time 169.35 s: f = -0.801373050545, ‖∇f‖ = 7.1300e-04, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 15, time 169.58 s: f = -0.801388615264, ‖∇f‖ = 2.8462e-04, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 16, time 169.78 s: f = -0.801394633333, ‖∇f‖ = 2.7607e-04, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 17, time 169.96 s: f = -0.801408061564, ‖∇f‖ = 3.6096e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 18, time 170.20 s: f = -0.801509542169, ‖∇f‖ = 1.9822e-03, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 19, time 170.43 s: f = -0.801578405251, ‖∇f‖ = 1.8040e-03, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 20, time 171.32 s: f = -0.801694524424, ‖∇f‖ = 2.9356e-03, α = 5.48e-01, m = 19, nfg = 3 +[ Info: LBFGS: iter 21, time 171.92 s: f = -0.801761920683, ‖∇f‖ = 1.1993e-03, α = 3.82e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 22, time 172.20 s: f = -0.801797785494, ‖∇f‖ = 6.0337e-04, α = 1.00e+00, m = 21, nfg = 1 +[ Info: LBFGS: iter 23, time 172.78 s: f = -0.801808747834, ‖∇f‖ = 3.7053e-04, α = 5.24e-01, m = 22, nfg = 2 +[ Info: LBFGS: iter 24, time 173.05 s: f = -0.801812729173, ‖∇f‖ = 3.0781e-04, α = 1.00e+00, m = 23, nfg = 1 +[ Info: LBFGS: iter 25, time 173.33 s: f = -0.801816445211, ‖∇f‖ = 2.9994e-04, α = 1.00e+00, m = 24, nfg = 1 +[ Info: LBFGS: iter 26, time 173.60 s: f = -0.801824713130, ‖∇f‖ = 3.6496e-04, α = 1.00e+00, m = 25, nfg = 1 +[ Info: LBFGS: iter 27, time 173.92 s: f = -0.801839673823, ‖∇f‖ = 5.4222e-04, α = 1.00e+00, m = 26, nfg = 1 +[ Info: LBFGS: iter 28, time 174.32 s: f = -0.801857478904, ‖∇f‖ = 2.7917e-04, α = 1.00e+00, m = 27, nfg = 1 +[ Info: LBFGS: iter 29, time 174.62 s: f = -0.801864555224, ‖∇f‖ = 1.2319e-04, α = 1.00e+00, m = 28, nfg = 1 +[ Info: LBFGS: iter 30, time 174.91 s: f = -0.801865598736, ‖∇f‖ = 8.6048e-05, α = 1.00e+00, m = 29, nfg = 1 +[ Info: LBFGS: iter 31, time 175.22 s: f = -0.801867571755, ‖∇f‖ = 8.8636e-05, α = 1.00e+00, m = 30, nfg = 1 +[ Info: LBFGS: iter 32, time 175.52 s: f = -0.801870393528, ‖∇f‖ = 2.6554e-04, α = 1.00e+00, m = 31, nfg = 1 +[ Info: LBFGS: iter 33, time 175.85 s: f = -0.801874797039, ‖∇f‖ = 2.7841e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 34, time 176.22 s: f = -0.801877566644, ‖∇f‖ = 1.8523e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 35, time 176.56 s: f = -0.801878506245, ‖∇f‖ = 2.0638e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 36, time 176.87 s: f = -0.801878995097, ‖∇f‖ = 5.6081e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 37, time 177.22 s: f = -0.801879153573, ‖∇f‖ = 6.2356e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 38, time 177.54 s: f = -0.801879355075, ‖∇f‖ = 6.0528e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 39, time 177.88 s: f = -0.801880115100, ‖∇f‖ = 6.2768e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 40, time 178.23 s: f = -0.801881475065, ‖∇f‖ = 6.2301e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 41, time 178.61 s: f = -0.801882272425, ‖∇f‖ = 9.5267e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 42, time 178.93 s: f = -0.801882600033, ‖∇f‖ = 5.1283e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 43, time 179.26 s: f = -0.801882711875, ‖∇f‖ = 2.6091e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 44, time 179.57 s: f = -0.801882805828, ‖∇f‖ = 2.9316e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 45, time 179.87 s: f = -0.801883027060, ‖∇f‖ = 2.7982e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 46, time 180.20 s: f = -0.801883402178, ‖∇f‖ = 3.8102e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 47, time 180.54 s: f = -0.801883718321, ‖∇f‖ = 5.3658e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 48, time 180.87 s: f = -0.801883962887, ‖∇f‖ = 2.8728e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 49, time 181.21 s: f = -0.801884158085, ‖∇f‖ = 3.0680e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 50, time 181.55 s: f = -0.801884385940, ‖∇f‖ = 4.1973e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 51, time 181.90 s: f = -0.801884810459, ‖∇f‖ = 6.8881e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 52, time 182.25 s: f = -0.801885011014, ‖∇f‖ = 3.8651e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 53, time 182.61 s: f = -0.801885126625, ‖∇f‖ = 1.9013e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 54, time 182.98 s: f = -0.801885186489, ‖∇f‖ = 3.2919e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 55, time 183.38 s: f = -0.801885309713, ‖∇f‖ = 4.8521e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 56, time 183.77 s: f = -0.801885491631, ‖∇f‖ = 1.1478e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 57, time 184.20 s: f = -0.801885912857, ‖∇f‖ = 7.7221e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 58, time 184.62 s: f = -0.801886451980, ‖∇f‖ = 6.5316e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 59, time 185.03 s: f = -0.801886639804, ‖∇f‖ = 5.1567e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 60, time 185.80 s: f = -0.801886699372, ‖∇f‖ = 4.5540e-05, α = 3.68e-01, m = 32, nfg = 2 +[ Info: LBFGS: iter 61, time 186.15 s: f = -0.801886723992, ‖∇f‖ = 2.1992e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 62, time 186.49 s: f = -0.801886735202, ‖∇f‖ = 1.8064e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 63, time 186.88 s: f = -0.801886771395, ‖∇f‖ = 3.8651e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 64, time 187.27 s: f = -0.801886801952, ‖∇f‖ = 4.2630e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 65, time 187.63 s: f = -0.801886837856, ‖∇f‖ = 3.9318e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 66, time 187.99 s: f = -0.801886916784, ‖∇f‖ = 3.8747e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 67, time 188.38 s: f = -0.801887030055, ‖∇f‖ = 3.7139e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 68, time 188.77 s: f = -0.801887141198, ‖∇f‖ = 5.7017e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 69, time 189.57 s: f = -0.801887199205, ‖∇f‖ = 3.0700e-05, α = 5.24e-01, m = 32, nfg = 2 +[ Info: LBFGS: iter 70, time 189.94 s: f = -0.801887246613, ‖∇f‖ = 1.3885e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 71, time 190.31 s: f = -0.801887263716, ‖∇f‖ = 1.5769e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 72, time 190.71 s: f = -0.801887319464, ‖∇f‖ = 2.1424e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 73, time 191.12 s: f = -0.801887406143, ‖∇f‖ = 1.9896e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 74, time 191.95 s: f = -0.801887467460, ‖∇f‖ = 1.9800e-05, α = 3.61e-01, m = 32, nfg = 2 +[ Info: LBFGS: converged after 75 iterations and time 192.35 s: f = -0.801887535670, ‖∇f‖ = 9.9339e-06 ```` @@ -355,7 +352,7 @@ the final value of the cost function we have just optimized. ```` ```` --0.8018875716841548 +-0.8018875356699176 ```` As another check, we can compute the magnetization per site and compare it to a [reference @@ -373,7 +370,7 @@ m_ref = 0.667162 ```` ```` -0.00011017609950225715 +0.00011315230661379516 ```` --- diff --git a/docs/src/examples/3d_ising_partition_function/main.ipynb b/docs/src/examples/3d_ising_partition_function/main.ipynb index 835e66790..1310362a3 100644 --- a/docs/src/examples/3d_ising_partition_function/main.ipynb +++ b/docs/src/examples/3d_ising_partition_function/main.ipynb @@ -14,29 +14,28 @@ "source": [ "# The 3D classical Ising model\n", "\n", - "In a previous example we have already demonstrated an application of PEPSKit.jl to the study\n", - "of 2D classical statistical mechanics models. In this example, we will take this one step\n", - "further, and showcase how one can use PEPSKit.jl to study 3D classical statistical mechanics\n", - "models. We will demonstrate this for the specific case of the 3D classical Ising model, but\n", - "the same techniques can be applied to other 3D classical models as well.\n", + "In this example, we will showcase how one can use PEPSKit to study 3D classical statistical\n", + "mechanics models. In particular, we will consider a specific case of the 3D classical Ising\n", + "model, but the same techniques can be applied to other 3D classical models as well.\n", "\n", - "The workflow showcased in this example is a bit more experimental and less 'black-box' than\n", - "previous examples. Therefore it also serves as a demonstration of some of the more internal\n", - "functionality of PEPSKit.jl, and how one can adapt it to less 'standard' kinds of problems.\n", + "As compared to simulations of 2D partition functions, the workflow\n", + "presented in this example is a bit more experimental and less 'black-box'. Therefore, it\n", + "also serves as a demonstration of some of the more internal functionality of PEPSKit,\n", + "and how one can adapt it to less 'standard' kinds of problems.\n", "\n", - "Let us consider again the partition function of the classical Ising model,\n", + "Let us consider the partition function of the classical Ising model,\n", "\n", "$$\n", "\\mathcal{Z}(\\beta) = \\sum_{\\{s\\}} \\exp(-\\beta H(s)) \\text{ with } H(s) = -J \\sum_{\\langle i, j \\rangle} s_i s_j .\n", "$$\n", "\n", - "where now the classical spins $s_i \\in \\{+1, -1\\}$ are located on the vertices $i$ of a 3D\n", + "where the classical spins $s_i \\in \\{+1, -1\\}$ are located on the vertices $i$ of a 3D\n", "cubic lattice. The partition function of this model can be represented as a 3D tensor\n", "network with a rank-6 tensor at each vertex of the lattice. Such a network can be contracted\n", "by finding the fixed point of the corresponding transfer operator, in exactly the same\n", "spirit as the boundary MPS methods demonstrated in another example.\n", "\n", - "Let's start by making the example deterministic and we doing our imports:" + "Let's start by making the example deterministic and importing the required packages:" ], "metadata": {} }, @@ -156,7 +155,7 @@ "\n", "### Defining the cost function\n", "\n", - "Using PEPSKit.jl, this cost function and its gradient can be easily computed, after which we\n", + "Using PEPSKit.jl, this cost function and its gradient can be computed, after which we\n", "can use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it. We can\n", "immediately recognize the denominator $\\langle \\psi | \\psi \\rangle$ as the familiar PEPS\n", "norm, where we can compute the norm per site as the `network_value` of the\n", @@ -164,10 +163,10 @@ "Similarly, the numerator $\\langle \\psi | T | \\psi \\rangle$ is nothing more than an\n", "`InfiniteSquareNetwork` consisting of three layers corresponding to the ket, transfer\n", "operator and bra objects. This object can also be constructed and contracted in a\n", - "straightforward way, after we can again compute its `network_value`.\n", + "straightforward way, so we can again compute its `network_value`.\n", "\n", - "So to define our cost function, we just need to construct the transfer operator as an\n", - "`InfinitePEPO`, contruct the both relevant infinite 2D contractible networks from\n", + "To define our cost function, we then need to construct the transfer operator as an\n", + "`InfinitePEPO`, construct the two infinite 2D contractible networks for the numerator and denominator from\n", "the current PEPS and this transfer operator, and specify a contraction algorithm we can use\n", "to compute the values of these two networks. In addition, we'll specify the specific reverse\n", "rule algorithm that will be used to compute the gradient of this cost function." @@ -230,8 +229,8 @@ "PEPSKit.jl, which allows to hook into the pullback of a given function by specifying a\n", "specific algorithm for the pullback computation. Here, we opted to use an Arnoldi method to\n", "solve the linear problem defining the gradient of the network contraction at its fixed\n", - "point. This is exactly the workflow underlying `PEPSKit.fixedpoint` internally, and\n", - "more info on particular gradient algorithms can be found in the corresponding docstring.\n", + "point. This is exactly the workflow that internally underlies `PEPSKit.fixedpoint`, and\n", + "more info on particular gradient algorithms can be found in the corresponding docstrings.\n", "\n", "### Characterizing the optimization manifold\n", "\n", @@ -372,11 +371,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.11.5" }, "kernelspec": { - "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "name": "julia-1.11", + "display_name": "Julia 1.11.5", "language": "julia" } }, diff --git a/examples/Cache.toml b/examples/Cache.toml index c1ebb8d1a..46e3e0f88 100644 --- a/examples/Cache.toml +++ b/examples/Cache.toml @@ -1 +1,2 @@ 2d_ising_partition_function = "9bcfd5f2d320a044515570e22595e61ef336dd3b2b478bc628162539a96bc6dc" +3d_ising_partition_function = "3a76f0b39a53c20abeb00040a5b1b2716ec05e368dc54225ecccc05fa7af6d16" From d5daf846cec20cf7c3da36193fcd77a8899a336c Mon Sep 17 00:00:00 2001 From: leburgel Date: Mon, 5 May 2025 11:38:37 +0200 Subject: [PATCH 111/113] Address remaining review comments --- .../2d_ising_partition_function/index.md | 23 +- .../2d_ising_partition_function/main.ipynb | 6 +- .../3d_ising_partition_function/index.md | 254 ++++++++++-------- .../3d_ising_partition_function/main.ipynb | 100 ++++--- examples/3d_ising_partition_function/main.jl | 94 ++++--- examples/Cache.toml | 4 +- 6 files changed, 274 insertions(+), 207 deletions(-) diff --git a/docs/src/examples/2d_ising_partition_function/index.md b/docs/src/examples/2d_ising_partition_function/index.md index 0a1233144..ad8c4c354 100644 --- a/docs/src/examples/2d_ising_partition_function/index.md +++ b/docs/src/examples/2d_ising_partition_function/index.md @@ -31,13 +31,6 @@ using QuadGK Random.seed!(234923); ```` -```` -Precompiling QuadGK... - 744.1 ms ✓ QuadGK - 1 dependency successfully precompiled in 1 seconds. 12 already precompiled. - -```` - ## Defining the partition function The first step is to define the rank-4 tensor that, when contracted on a square lattice, @@ -130,8 +123,8 @@ env, = leading_boundary(env₀, Z; tol=1e-8, maxiter=500); ```` ```` -[ Info: CTMRG init: obj = +1.784252138312e+00 -1.557258880375e+00im err = 1.0000e+00 -[ Info: CTMRG conv 63: obj = +3.353928644031e+00 err = 4.5940673351e-09 time = 9.20 sec +[ Info: CTMRG init: obj = +1.767587313024e+00 -1.536527975696e+00im err = 1.0000e+00 +[ Info: CTMRG conv 62: obj = +3.353928644031e+00 err = 4.7636155793e-09 time = 10.20 sec ```` @@ -166,9 +159,9 @@ e = expectation_value(Z, (1, 1) => E, env) ```` ```` -λ = 3.3539286440313787 - 4.111412204695009e-16im -m = 0.9736086674402998 + 1.8261433647976018e-16im -e = -1.8637796145082444 - 1.4609146918380815e-16im +λ = 3.3539286440313765 - 3.486341495761219e-16im +m = 0.9736086674403004 + 7.16942808669034e-17im +e = -1.8637796145082448 + 0.0im ```` @@ -212,9 +205,9 @@ extrapolation): ```` ```` -(-(log(λ)) / beta - f_exact) / f_exact = -6.605563039765528e-16 - 1.0129880391935085e-16im -(abs(m) - abs(m_exact)) / abs(m_exact) = -6.841905141687122e-16 -(e - e_exact) / e_exact = -0.023732068099090193 + 7.65242925602409e-17im +(-(log(λ)) / beta - f_exact) / f_exact = -1.1009271732942546e-15 - 8.58980335690302e-17im +(abs(m) - abs(m_exact)) / abs(m_exact) = -1.1403175236145204e-16 +(e - e_exact) / e_exact = -0.02373206809908996 - 0.0im ```` diff --git a/docs/src/examples/2d_ising_partition_function/main.ipynb b/docs/src/examples/2d_ising_partition_function/main.ipynb index fcc17cec6..8c92051f9 100644 --- a/docs/src/examples/2d_ising_partition_function/main.ipynb +++ b/docs/src/examples/2d_ising_partition_function/main.ipynb @@ -260,11 +260,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.11.5" + "version": "1.10.4" }, "kernelspec": { - "name": "julia-1.11", - "display_name": "Julia 1.11.5", + "name": "julia-1.10", + "display_name": "Julia 1.10.4", "language": "julia" } }, diff --git a/docs/src/examples/3d_ising_partition_function/index.md b/docs/src/examples/3d_ising_partition_function/index.md index edb6d036a..8cae565b6 100644 --- a/docs/src/examples/3d_ising_partition_function/index.md +++ b/docs/src/examples/3d_ising_partition_function/index.md @@ -110,22 +110,27 @@ of a slice-to-slice transfer operator ``T``, where ``T`` can be seen as an infin projected entangled-pair operator (PEPO) which consists of the rank-6 tensor `O` at each site of an infinite 2D square lattice. In the same spirit as the boundary MPS approach, all we need to contract the whole partition function is to find the leading eigenvector of this -PEPO. The fixed point of such a PEPO exactly corresponds to a PEPS, and for the case of a +PEPO. The fixed point of such a PEPO can be parametrized as a PEPS, and for the case of a Hermitian transfer operator we can find this PEPS through [variational optimization](@cite vanderstraeten_residual_2018). -Indeed, for a Hermition transfer operator ``T`` we can formulate the eigenvalue equation as -for a fixed point PEPS ``|\psi\rangle`` as a variational problem +Indeed, for a Hermitian transfer operator ``T`` we can characterize the fixed point PEPS +``|\psi\rangle`` which satisfies the eigenvalue equation +``T |\psi\rangle = \Lambda |\psi\rangle`` corresponding to the largest magnitude eigenvalue +``\Lambda`` as the solution of a variational problem ```math -|\psi\rangle = \text{argmin}_{|\psi\rangle} \left ( \lim_{N \to ∞} - \frac{1}{N} \log \left( \frac{\langle \psi | T | \psi \rangle}{\langle \psi | \psi \rangle} \right) \right ) +|\psi\rangle = \text{argmin}_{|\psi\rangle} \left ( \lim_{N \to ∞} - \frac{1}{N} \log \left( \frac{\langle \psi | T | \psi \rangle}{\langle \psi | \psi \rangle} \right) \right ) , ``` -where ``N`` is the diverging number of sites of the 2D transfer operator ``T``. + +where ``N`` is the diverging number of sites of the 2D transfer operator ``T``. The function +minimized in this expression is exactly the free energy per site of the partition function, +so we essentially find the fixed-point PEPS by variationally minimizing the free energy. ### Defining the cost function -Using PEPSKit.jl, this cost function and its gradient can be computed, after which we -can use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it. We can +Using PEPSKit.jl, this cost function and its gradient can be computed, after which we can +use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it. We can immediately recognize the denominator ``\langle \psi | \psi \rangle`` as the familiar PEPS norm, where we can compute the norm per site as the [`network_value`](@ref) of the corresponding [`InfiniteSquareNetwork`](@ref) by contracting it with the CTMRG algorithm. @@ -135,10 +140,11 @@ operator and bra objects. This object can also be constructed and contracted in straightforward way, so we can again compute its `network_value`. To define our cost function, we then need to construct the transfer operator as an -[`InfinitePEPO`](@ref), construct the two infinite 2D contractible networks for the numerator and denominator from -the current PEPS and this transfer operator, and specify a contraction algorithm we can use -to compute the values of these two networks. In addition, we'll specify the specific reverse -rule algorithm that will be used to compute the gradient of this cost function. +[`InfinitePEPO`](@ref), construct the two infinite 2D contractible networks for the +numerator and denominator from the current PEPS and this transfer operator, and specify a +contraction algorithm we can use to compute the values of these two networks. In addition, +we'll specify the specific reverse rule algorithm that will be used to compute the gradient +of this cost function. ````julia boundary_alg = SimultaneousCTMRG(; maxiter=150, tol=1e-8, verbosity=1) @@ -147,29 +153,37 @@ rrule_alg = EigSolver(; ) T = InfinitePEPO(O) -function pepo_costfun((psi, env2, env3)) +function pepo_costfun((peps, env_double_layer, env_triple_layer)) # use Zygote to compute the gradient automatically - E, gs = withgradient(psi) do ψ + E, gs = withgradient(peps) do ψ # construct the PEPS norm network - n2 = InfiniteSquareNetwork(ψ) + n_double_layer = InfiniteSquareNetwork(ψ) # contract this network - env2′, info = PEPSKit.hook_pullback( - leading_boundary, env2, n2, boundary_alg; alg_rrule=rrule_alg + env_double_layer′, info = PEPSKit.hook_pullback( + leading_boundary, + env_double_layer, + n_double_layer, + boundary_alg; + alg_rrule=rrule_alg, ) # construct the PEPS-PEPO-PEPS overlap network - n3 = InfiniteSquareNetwork(ψ, T) + n_triple_layer = InfiniteSquareNetwork(ψ, T) # contract this network - env3′, info = PEPSKit.hook_pullback( - leading_boundary, env3, n3, boundary_alg; alg_rrule=rrule_alg + env_triple_layer′, info = PEPSKit.hook_pullback( + leading_boundary, + env_triple_layer, + n_triple_layer, + boundary_alg; + alg_rrule=rrule_alg, ) # update the environments for reuse PEPSKit.ignore_derivatives() do - PEPSKit.update!(env2, env2′) - PEPSKit.update!(env3, env3′) + PEPSKit.update!(env_double_layer, env_double_layer′) + PEPSKit.update!(env_triple_layer, env_triple_layer′) end # compute the network values per site - λ3 = network_value(n3, env3) - λ2 = network_value(n2, env2) + λ3 = network_value(n_triple_layer, env_triple_layer) + λ2 = network_value(n_double_layer, env_double_layer) # use this to compute the actual cost function return -log(real(λ3 / λ2)) end @@ -209,21 +223,31 @@ a transport. The retraction, corresponding to the `retract` keyword argument of direction to obtain a new manifold point. The transport, corresponding to the `transport!` keyword argument of `OptimKit.optimize`, specifies how to transport a descent direction at a given manifold point to a valid descent direction at a different manifold point according to -the appropriate metric. In PEPSKit.jl, these two procedures are defined through the -[`PEPSKit.peps_retract`](@ref) and [`PEPSKit.peps_transport!`](@ref) methods. While it is -instructive to read the corresponding docstrings in order to understand what these actually -do, here we can just blindly reuse them where the only difference is that we have to pass -along an extra environment since our cost function requires two distinct contractions as -opposed to the setting of Hamiltonian PEPS optimization. +the appropriate metric. For a more detailed explanation we refer to the +[OptimKit.jl README](https://github.com/Jutho/OptimKit.jl). In PEPSKit.jl, these two +procedures are defined through the [`PEPSKit.peps_retract`](@ref) and +[`PEPSKit.peps_transport!`](@ref) methods. While it is instructive to read the corresponding +docstrings in order to understand what these actually do, here we can just blindly reuse +them where the only difference is that we have to pass along an extra environment since our +cost function requires two distinct contractions as opposed to the setting of Hamiltonian +PEPS optimization which only requires a double-layer contraction. ````julia -function pepo_retract(x, η, α) - x´_partial, ξ = PEPSKit.peps_retract(x[1:2], η, α) - x´ = (x´_partial..., deepcopy(x[3])) - return x´, ξ +function pepo_retract((peps, env_double_layer, env_triple_layer), η, α) + (peps´, env_double_layer´), ξ = PEPSKit.peps_retract((peps, env_double_layer), η, α) + env_triple_layer´ = deepcopy(env_triple_layer) + return (peps´, env_double_layer´, env_triple_layer´), ξ end -function pepo_transport!(ξ, x, η, α, x´) - return PEPSKit.peps_transport!(ξ, x[1:2], η, α, x´[1:2]) +function pepo_transport!( + ξ, + (peps, env_double_layer, env_triple_layer), + η, + α, + (peps´, env_double_layer´, env_triple_layer´), +) + return PEPSKit.peps_transport!( + ξ, (peps, env_double_layer), η, α, (peps´, env_double_layer´) + ) end; ```` @@ -258,86 +282,88 @@ optimizer_alg = LBFGS(32; maxiter=100, gradtol=1e-5, verbosity=3) ┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Float64}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 -┌ Warning: CTMRG cancel 150: obj = +1.702942228759e+01 +1.443123473083e-07im err = 2.4386740911e-05 time = 2.74 sec -└ @ PEPSKit ~/repos/PEPSKit.jl/src/algorithms/ctmrg/ctmrg.jl:155 -[ Info: LBFGS: iter 1, time 163.94 s: f = -0.777080930369, ‖∇f‖ = 3.1305e-02, α = 7.10e+02, m = 0, nfg = 7 +┌ Warning: CTMRG cancel 150: obj = +1.702942227203e+01 +1.438609955721e-07im err = 2.4390784904e-05 time = 14.97 sec +└ @ PEPSKit ~/git/PEPSKit.jl/src/algorithms/ctmrg/ctmrg.jl:155 +[ Info: LBFGS: iter 1, time 194.26 s: f = -0.777080930424, ‖∇f‖ = 3.1305e-02, α = 7.10e+02, m = 0, nfg = 7 ┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 -[ Info: LBFGS: iter 2, time 165.88 s: f = -0.784111515961, ‖∇f‖ = 2.0103e-02, α = 1.00e+00, m = 1, nfg = 1 -[ Info: LBFGS: iter 3, time 166.20 s: f = -0.792705733484, ‖∇f‖ = 2.3327e-02, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 4, time 166.46 s: f = -0.796289732476, ‖∇f‖ = 2.2475e-02, α = 1.00e+00, m = 3, nfg = 1 -[ Info: LBFGS: iter 5, time 166.70 s: f = -0.799674902374, ‖∇f‖ = 7.0288e-03, α = 1.00e+00, m = 4, nfg = 1 -[ Info: LBFGS: iter 6, time 166.95 s: f = -0.800082100121, ‖∇f‖ = 1.2717e-03, α = 1.00e+00, m = 5, nfg = 1 -[ Info: LBFGS: iter 7, time 167.27 s: f = -0.800110603125, ‖∇f‖ = 1.3384e-03, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 8, time 168.04 s: f = -0.800262201996, ‖∇f‖ = 2.4945e-03, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 9, time 168.31 s: f = -0.800450505448, ‖∇f‖ = 2.9259e-03, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 10, time 168.51 s: f = -0.800764917087, ‖∇f‖ = 1.7221e-03, α = 1.00e+00, m = 9, nfg = 1 -[ Info: LBFGS: iter 11, time 168.74 s: f = -0.800876048838, ‖∇f‖ = 2.2475e-03, α = 1.00e+00, m = 10, nfg = 1 -[ Info: LBFGS: iter 12, time 168.92 s: f = -0.801100867467, ‖∇f‖ = 1.5561e-03, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 13, time 169.14 s: f = -0.801317048856, ‖∇f‖ = 1.1561e-03, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 14, time 169.35 s: f = -0.801373050545, ‖∇f‖ = 7.1300e-04, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 15, time 169.58 s: f = -0.801388615264, ‖∇f‖ = 2.8462e-04, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 16, time 169.78 s: f = -0.801394633333, ‖∇f‖ = 2.7607e-04, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 17, time 169.96 s: f = -0.801408061564, ‖∇f‖ = 3.6096e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 18, time 170.20 s: f = -0.801509542169, ‖∇f‖ = 1.9822e-03, α = 1.00e+00, m = 17, nfg = 1 -[ Info: LBFGS: iter 19, time 170.43 s: f = -0.801578405251, ‖∇f‖ = 1.8040e-03, α = 1.00e+00, m = 18, nfg = 1 -[ Info: LBFGS: iter 20, time 171.32 s: f = -0.801694524424, ‖∇f‖ = 2.9356e-03, α = 5.48e-01, m = 19, nfg = 3 -[ Info: LBFGS: iter 21, time 171.92 s: f = -0.801761920683, ‖∇f‖ = 1.1993e-03, α = 3.82e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 22, time 172.20 s: f = -0.801797785494, ‖∇f‖ = 6.0337e-04, α = 1.00e+00, m = 21, nfg = 1 -[ Info: LBFGS: iter 23, time 172.78 s: f = -0.801808747834, ‖∇f‖ = 3.7053e-04, α = 5.24e-01, m = 22, nfg = 2 -[ Info: LBFGS: iter 24, time 173.05 s: f = -0.801812729173, ‖∇f‖ = 3.0781e-04, α = 1.00e+00, m = 23, nfg = 1 -[ Info: LBFGS: iter 25, time 173.33 s: f = -0.801816445211, ‖∇f‖ = 2.9994e-04, α = 1.00e+00, m = 24, nfg = 1 -[ Info: LBFGS: iter 26, time 173.60 s: f = -0.801824713130, ‖∇f‖ = 3.6496e-04, α = 1.00e+00, m = 25, nfg = 1 -[ Info: LBFGS: iter 27, time 173.92 s: f = -0.801839673823, ‖∇f‖ = 5.4222e-04, α = 1.00e+00, m = 26, nfg = 1 -[ Info: LBFGS: iter 28, time 174.32 s: f = -0.801857478904, ‖∇f‖ = 2.7917e-04, α = 1.00e+00, m = 27, nfg = 1 -[ Info: LBFGS: iter 29, time 174.62 s: f = -0.801864555224, ‖∇f‖ = 1.2319e-04, α = 1.00e+00, m = 28, nfg = 1 -[ Info: LBFGS: iter 30, time 174.91 s: f = -0.801865598736, ‖∇f‖ = 8.6048e-05, α = 1.00e+00, m = 29, nfg = 1 -[ Info: LBFGS: iter 31, time 175.22 s: f = -0.801867571755, ‖∇f‖ = 8.8636e-05, α = 1.00e+00, m = 30, nfg = 1 -[ Info: LBFGS: iter 32, time 175.52 s: f = -0.801870393528, ‖∇f‖ = 2.6554e-04, α = 1.00e+00, m = 31, nfg = 1 -[ Info: LBFGS: iter 33, time 175.85 s: f = -0.801874797039, ‖∇f‖ = 2.7841e-04, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 34, time 176.22 s: f = -0.801877566644, ‖∇f‖ = 1.8523e-04, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 35, time 176.56 s: f = -0.801878506245, ‖∇f‖ = 2.0638e-04, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 36, time 176.87 s: f = -0.801878995097, ‖∇f‖ = 5.6081e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 37, time 177.22 s: f = -0.801879153573, ‖∇f‖ = 6.2356e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 38, time 177.54 s: f = -0.801879355075, ‖∇f‖ = 6.0528e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 39, time 177.88 s: f = -0.801880115100, ‖∇f‖ = 6.2768e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 40, time 178.23 s: f = -0.801881475065, ‖∇f‖ = 6.2301e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 41, time 178.61 s: f = -0.801882272425, ‖∇f‖ = 9.5267e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 42, time 178.93 s: f = -0.801882600033, ‖∇f‖ = 5.1283e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 43, time 179.26 s: f = -0.801882711875, ‖∇f‖ = 2.6091e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 44, time 179.57 s: f = -0.801882805828, ‖∇f‖ = 2.9316e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 45, time 179.87 s: f = -0.801883027060, ‖∇f‖ = 2.7982e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 46, time 180.20 s: f = -0.801883402178, ‖∇f‖ = 3.8102e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 47, time 180.54 s: f = -0.801883718321, ‖∇f‖ = 5.3658e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 48, time 180.87 s: f = -0.801883962887, ‖∇f‖ = 2.8728e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 49, time 181.21 s: f = -0.801884158085, ‖∇f‖ = 3.0680e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 50, time 181.55 s: f = -0.801884385940, ‖∇f‖ = 4.1973e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 51, time 181.90 s: f = -0.801884810459, ‖∇f‖ = 6.8881e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 52, time 182.25 s: f = -0.801885011014, ‖∇f‖ = 3.8651e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 53, time 182.61 s: f = -0.801885126625, ‖∇f‖ = 1.9013e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 54, time 182.98 s: f = -0.801885186489, ‖∇f‖ = 3.2919e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 55, time 183.38 s: f = -0.801885309713, ‖∇f‖ = 4.8521e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 56, time 183.77 s: f = -0.801885491631, ‖∇f‖ = 1.1478e-04, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 57, time 184.20 s: f = -0.801885912857, ‖∇f‖ = 7.7221e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 58, time 184.62 s: f = -0.801886451980, ‖∇f‖ = 6.5316e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 59, time 185.03 s: f = -0.801886639804, ‖∇f‖ = 5.1567e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 60, time 185.80 s: f = -0.801886699372, ‖∇f‖ = 4.5540e-05, α = 3.68e-01, m = 32, nfg = 2 -[ Info: LBFGS: iter 61, time 186.15 s: f = -0.801886723992, ‖∇f‖ = 2.1992e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 62, time 186.49 s: f = -0.801886735202, ‖∇f‖ = 1.8064e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 63, time 186.88 s: f = -0.801886771395, ‖∇f‖ = 3.8651e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 64, time 187.27 s: f = -0.801886801952, ‖∇f‖ = 4.2630e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 65, time 187.63 s: f = -0.801886837856, ‖∇f‖ = 3.9318e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 66, time 187.99 s: f = -0.801886916784, ‖∇f‖ = 3.8747e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 67, time 188.38 s: f = -0.801887030055, ‖∇f‖ = 3.7139e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 68, time 188.77 s: f = -0.801887141198, ‖∇f‖ = 5.7017e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 69, time 189.57 s: f = -0.801887199205, ‖∇f‖ = 3.0700e-05, α = 5.24e-01, m = 32, nfg = 2 -[ Info: LBFGS: iter 70, time 189.94 s: f = -0.801887246613, ‖∇f‖ = 1.3885e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 71, time 190.31 s: f = -0.801887263716, ‖∇f‖ = 1.5769e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 72, time 190.71 s: f = -0.801887319464, ‖∇f‖ = 2.1424e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 73, time 191.12 s: f = -0.801887406143, ‖∇f‖ = 1.9896e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 74, time 191.95 s: f = -0.801887467460, ‖∇f‖ = 1.9800e-05, α = 3.61e-01, m = 32, nfg = 2 -[ Info: LBFGS: converged after 75 iterations and time 192.35 s: f = -0.801887535670, ‖∇f‖ = 9.9339e-06 +[ Info: LBFGS: iter 2, time 197.93 s: f = -0.784111515920, ‖∇f‖ = 2.0103e-02, α = 1.00e+00, m = 1, nfg = 1 +[ Info: LBFGS: iter 3, time 199.60 s: f = -0.792705733264, ‖∇f‖ = 2.3327e-02, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 4, time 200.55 s: f = -0.796289732161, ‖∇f‖ = 2.2475e-02, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 5, time 201.31 s: f = -0.799674902231, ‖∇f‖ = 7.0288e-03, α = 1.00e+00, m = 4, nfg = 1 +[ Info: LBFGS: iter 6, time 202.01 s: f = -0.800082100115, ‖∇f‖ = 1.2717e-03, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 7, time 202.82 s: f = -0.800110603120, ‖∇f‖ = 1.3384e-03, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 8, time 203.52 s: f = -0.800262202003, ‖∇f‖ = 2.4945e-03, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 9, time 204.21 s: f = -0.800450505439, ‖∇f‖ = 2.9259e-03, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 10, time 205.05 s: f = -0.800764917063, ‖∇f‖ = 1.7221e-03, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 11, time 205.88 s: f = -0.800876048822, ‖∇f‖ = 2.2475e-03, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 12, time 206.58 s: f = -0.801100867388, ‖∇f‖ = 1.5561e-03, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 13, time 207.45 s: f = -0.801317048785, ‖∇f‖ = 1.1561e-03, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 14, time 208.22 s: f = -0.801373050522, ‖∇f‖ = 7.1300e-04, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 15, time 208.98 s: f = -0.801388615258, ‖∇f‖ = 2.8462e-04, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 16, time 209.78 s: f = -0.801394633326, ‖∇f‖ = 2.7607e-04, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 17, time 210.48 s: f = -0.801408061547, ‖∇f‖ = 3.6096e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 18, time 211.41 s: f = -0.801509542237, ‖∇f‖ = 1.9822e-03, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 19, time 212.36 s: f = -0.801578405298, ‖∇f‖ = 1.8040e-03, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 20, time 215.65 s: f = -0.801694524832, ‖∇f‖ = 2.9356e-03, α = 5.48e-01, m = 19, nfg = 3 +[ Info: LBFGS: iter 21, time 217.92 s: f = -0.801761920585, ‖∇f‖ = 1.1993e-03, α = 3.82e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 22, time 218.94 s: f = -0.801797785496, ‖∇f‖ = 6.0337e-04, α = 1.00e+00, m = 21, nfg = 1 +[ Info: LBFGS: iter 23, time 221.10 s: f = -0.801808747834, ‖∇f‖ = 3.7053e-04, α = 5.24e-01, m = 22, nfg = 2 +[ Info: LBFGS: iter 24, time 222.14 s: f = -0.801812729196, ‖∇f‖ = 3.0781e-04, α = 1.00e+00, m = 23, nfg = 1 +[ Info: LBFGS: iter 25, time 223.24 s: f = -0.801816445181, ‖∇f‖ = 2.9994e-04, α = 1.00e+00, m = 24, nfg = 1 +[ Info: LBFGS: iter 26, time 224.28 s: f = -0.801824712580, ‖∇f‖ = 3.6497e-04, α = 1.00e+00, m = 25, nfg = 1 +[ Info: LBFGS: iter 27, time 225.47 s: f = -0.801839673918, ‖∇f‖ = 5.4217e-04, α = 1.00e+00, m = 26, nfg = 1 +[ Info: LBFGS: iter 28, time 226.66 s: f = -0.801857480042, ‖∇f‖ = 2.7918e-04, α = 1.00e+00, m = 27, nfg = 1 +[ Info: LBFGS: iter 29, time 227.86 s: f = -0.801864556175, ‖∇f‖ = 1.2323e-04, α = 1.00e+00, m = 28, nfg = 1 +[ Info: LBFGS: iter 30, time 228.94 s: f = -0.801865599394, ‖∇f‖ = 8.6049e-05, α = 1.00e+00, m = 29, nfg = 1 +[ Info: LBFGS: iter 31, time 230.08 s: f = -0.801867571015, ‖∇f‖ = 8.8673e-05, α = 1.00e+00, m = 30, nfg = 1 +[ Info: LBFGS: iter 32, time 231.29 s: f = -0.801870391456, ‖∇f‖ = 2.6510e-04, α = 1.00e+00, m = 31, nfg = 1 +[ Info: LBFGS: iter 33, time 232.57 s: f = -0.801874799763, ‖∇f‖ = 2.7836e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 34, time 233.84 s: f = -0.801877566434, ‖∇f‖ = 1.8512e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 35, time 235.10 s: f = -0.801878506140, ‖∇f‖ = 2.0603e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 36, time 236.21 s: f = -0.801878994665, ‖∇f‖ = 5.6086e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 37, time 237.29 s: f = -0.801879153394, ‖∇f‖ = 6.2420e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 38, time 238.40 s: f = -0.801879354902, ‖∇f‖ = 6.0532e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 39, time 239.51 s: f = -0.801880114487, ‖∇f‖ = 6.2680e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 40, time 240.72 s: f = -0.801881471358, ‖∇f‖ = 6.2392e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 41, time 242.04 s: f = -0.801882270540, ‖∇f‖ = 9.4942e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 42, time 243.95 s: f = -0.801882598674, ‖∇f‖ = 5.1910e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 43, time 245.85 s: f = -0.801882711254, ‖∇f‖ = 2.6275e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 44, time 246.97 s: f = -0.801882805203, ‖∇f‖ = 2.9425e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 45, time 248.06 s: f = -0.801883026107, ‖∇f‖ = 2.7910e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 46, time 249.21 s: f = -0.801883400172, ‖∇f‖ = 3.7426e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 47, time 250.38 s: f = -0.801883717581, ‖∇f‖ = 5.4717e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 48, time 251.58 s: f = -0.801883966703, ‖∇f‖ = 2.9045e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 49, time 252.76 s: f = -0.801884163647, ‖∇f‖ = 3.0661e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 50, time 253.97 s: f = -0.801884391105, ‖∇f‖ = 4.1905e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 51, time 255.20 s: f = -0.801884815983, ‖∇f‖ = 6.9018e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 52, time 256.37 s: f = -0.801885013427, ‖∇f‖ = 3.8025e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 53, time 257.66 s: f = -0.801885126302, ‖∇f‖ = 1.9306e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 54, time 258.84 s: f = -0.801885184513, ‖∇f‖ = 3.3083e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 55, time 260.08 s: f = -0.801885308658, ‖∇f‖ = 4.9014e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 56, time 261.40 s: f = -0.801885502272, ‖∇f‖ = 1.1303e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 57, time 262.77 s: f = -0.801885922461, ‖∇f‖ = 7.5880e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 58, time 264.15 s: f = -0.801886457901, ‖∇f‖ = 7.2957e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 59, time 265.39 s: f = -0.801886614664, ‖∇f‖ = 6.8816e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 60, time 267.82 s: f = -0.801886696733, ‖∇f‖ = 3.0687e-05, α = 4.26e-01, m = 32, nfg = 2 +[ Info: LBFGS: iter 61, time 269.06 s: f = -0.801886716271, ‖∇f‖ = 2.1581e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 62, time 270.16 s: f = -0.801886732686, ‖∇f‖ = 1.7659e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 63, time 271.80 s: f = -0.801886790357, ‖∇f‖ = 4.1045e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 64, time 273.78 s: f = -0.801886827022, ‖∇f‖ = 4.0831e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 65, time 275.59 s: f = -0.801886871472, ‖∇f‖ = 4.1034e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 66, time 277.47 s: f = -0.801886949562, ‖∇f‖ = 5.1171e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 67, time 279.44 s: f = -0.801887066612, ‖∇f‖ = 4.5902e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 68, time 281.52 s: f = -0.801887172301, ‖∇f‖ = 7.4810e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 69, time 283.60 s: f = -0.801887249759, ‖∇f‖ = 3.9619e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 70, time 285.46 s: f = -0.801887292124, ‖∇f‖ = 1.3999e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 71, time 287.42 s: f = -0.801887312574, ‖∇f‖ = 1.0813e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 72, time 289.39 s: f = -0.801887349749, ‖∇f‖ = 1.1335e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 73, time 291.40 s: f = -0.801887427066, ‖∇f‖ = 1.9028e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 74, time 293.37 s: f = -0.801887495625, ‖∇f‖ = 1.9286e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 75, time 297.21 s: f = -0.801887521350, ‖∇f‖ = 2.5284e-05, α = 5.43e-01, m = 32, nfg = 2 +[ Info: LBFGS: iter 76, time 299.15 s: f = -0.801887560129, ‖∇f‖ = 2.7094e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: converged after 77 iterations and time 300.65 s: f = -0.801887571684, ‖∇f‖ = 7.8819e-06 ```` @@ -352,7 +378,7 @@ the final value of the cost function we have just optimized. ```` ```` --0.8018875356699176 +-0.8018875716841548 ```` As another check, we can compute the magnetization per site and compare it to a [reference @@ -370,7 +396,7 @@ m_ref = 0.667162 ```` ```` -0.00011315230661379516 +0.00011017609950225715 ```` --- diff --git a/docs/src/examples/3d_ising_partition_function/main.ipynb b/docs/src/examples/3d_ising_partition_function/main.ipynb index 1310362a3..cf04acfdb 100644 --- a/docs/src/examples/3d_ising_partition_function/main.ipynb +++ b/docs/src/examples/3d_ising_partition_function/main.ipynb @@ -141,22 +141,27 @@ "projected entangled-pair operator (PEPO) which consists of the rank-6 tensor `O` at each\n", "site of an infinite 2D square lattice. In the same spirit as the boundary MPS approach, all\n", "we need to contract the whole partition function is to find the leading eigenvector of this\n", - "PEPO. The fixed point of such a PEPO exactly corresponds to a PEPS, and for the case of a\n", + "PEPO. The fixed point of such a PEPO can be parametrized as a PEPS, and for the case of a\n", "Hermitian transfer operator we can find this PEPS through [variational optimization](@cite\n", "vanderstraeten_residual_2018).\n", "\n", - "Indeed, for a Hermition transfer operator $T$ we can formulate the eigenvalue equation as\n", - "for a fixed point PEPS $|\\psi\\rangle$ as a variational problem\n", + "Indeed, for a Hermitian transfer operator $T$ we can characterize the fixed point PEPS\n", + "$|\\psi\\rangle$ which satisfies the eigenvalue equation\n", + "$T |\\psi\\rangle = \\Lambda |\\psi\\rangle$ corresponding to the largest magnitude eigenvalue\n", + "$\\Lambda$ as the solution of a variational problem\n", "\n", "$$\n", - "|\\psi\\rangle = \\text{argmin}_{|\\psi\\rangle} \\left ( \\lim_{N \\to ∞} - \\frac{1}{N} \\log \\left( \\frac{\\langle \\psi | T | \\psi \\rangle}{\\langle \\psi | \\psi \\rangle} \\right) \\right )\n", + "|\\psi\\rangle = \\text{argmin}_{|\\psi\\rangle} \\left ( \\lim_{N \\to ∞} - \\frac{1}{N} \\log \\left( \\frac{\\langle \\psi | T | \\psi \\rangle}{\\langle \\psi | \\psi \\rangle} \\right) \\right ) ,\n", "$$\n", - "where $N$ is the diverging number of sites of the 2D transfer operator $T$.\n", + "\n", + "where $N$ is the diverging number of sites of the 2D transfer operator $T$. The function\n", + "minimized in this expression is exactly the free energy per site of the partition function,\n", + "so we essentially find the fixed-point PEPS by variationally minimizing the free energy.\n", "\n", "### Defining the cost function\n", "\n", - "Using PEPSKit.jl, this cost function and its gradient can be computed, after which we\n", - "can use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it. We can\n", + "Using PEPSKit.jl, this cost function and its gradient can be computed, after which we can\n", + "use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it. We can\n", "immediately recognize the denominator $\\langle \\psi | \\psi \\rangle$ as the familiar PEPS\n", "norm, where we can compute the norm per site as the `network_value` of the\n", "corresponding `InfiniteSquareNetwork` by contracting it with the CTMRG algorithm.\n", @@ -166,10 +171,11 @@ "straightforward way, so we can again compute its `network_value`.\n", "\n", "To define our cost function, we then need to construct the transfer operator as an\n", - "`InfinitePEPO`, construct the two infinite 2D contractible networks for the numerator and denominator from\n", - "the current PEPS and this transfer operator, and specify a contraction algorithm we can use\n", - "to compute the values of these two networks. In addition, we'll specify the specific reverse\n", - "rule algorithm that will be used to compute the gradient of this cost function." + "`InfinitePEPO`, construct the two infinite 2D contractible networks for the\n", + "numerator and denominator from the current PEPS and this transfer operator, and specify a\n", + "contraction algorithm we can use to compute the values of these two networks. In addition,\n", + "we'll specify the specific reverse rule algorithm that will be used to compute the gradient\n", + "of this cost function." ], "metadata": {} }, @@ -183,29 +189,37 @@ ")\n", "T = InfinitePEPO(O)\n", "\n", - "function pepo_costfun((psi, env2, env3))\n", + "function pepo_costfun((peps, env_double_layer, env_triple_layer))\n", " # use Zygote to compute the gradient automatically\n", - " E, gs = withgradient(psi) do ψ\n", + " E, gs = withgradient(peps) do ψ\n", " # construct the PEPS norm network\n", - " n2 = InfiniteSquareNetwork(ψ)\n", + " n_double_layer = InfiniteSquareNetwork(ψ)\n", " # contract this network\n", - " env2′, info = PEPSKit.hook_pullback(\n", - " leading_boundary, env2, n2, boundary_alg; alg_rrule=rrule_alg\n", + " env_double_layer′, info = PEPSKit.hook_pullback(\n", + " leading_boundary,\n", + " env_double_layer,\n", + " n_double_layer,\n", + " boundary_alg;\n", + " alg_rrule=rrule_alg,\n", " )\n", " # construct the PEPS-PEPO-PEPS overlap network\n", - " n3 = InfiniteSquareNetwork(ψ, T)\n", + " n_triple_layer = InfiniteSquareNetwork(ψ, T)\n", " # contract this network\n", - " env3′, info = PEPSKit.hook_pullback(\n", - " leading_boundary, env3, n3, boundary_alg; alg_rrule=rrule_alg\n", + " env_triple_layer′, info = PEPSKit.hook_pullback(\n", + " leading_boundary,\n", + " env_triple_layer,\n", + " n_triple_layer,\n", + " boundary_alg;\n", + " alg_rrule=rrule_alg,\n", " )\n", " # update the environments for reuse\n", " PEPSKit.ignore_derivatives() do\n", - " PEPSKit.update!(env2, env2′)\n", - " PEPSKit.update!(env3, env3′)\n", + " PEPSKit.update!(env_double_layer, env_double_layer′)\n", + " PEPSKit.update!(env_triple_layer, env_triple_layer′)\n", " end\n", " # compute the network values per site\n", - " λ3 = network_value(n3, env3)\n", - " λ2 = network_value(n2, env2)\n", + " λ3 = network_value(n_triple_layer, env_triple_layer)\n", + " λ2 = network_value(n_double_layer, env_double_layer)\n", " # use this to compute the actual cost function\n", " return -log(real(λ3 / λ2))\n", " end\n", @@ -250,12 +264,14 @@ "direction to obtain a new manifold point. The transport, corresponding to the `transport!`\n", "keyword argument of `OptimKit.optimize`, specifies how to transport a descent direction at a\n", "given manifold point to a valid descent direction at a different manifold point according to\n", - "the appropriate metric. In PEPSKit.jl, these two procedures are defined through the\n", - "`PEPSKit.peps_retract` and `PEPSKit.peps_transport!` methods. While it is\n", - "instructive to read the corresponding docstrings in order to understand what these actually\n", - "do, here we can just blindly reuse them where the only difference is that we have to pass\n", - "along an extra environment since our cost function requires two distinct contractions as\n", - "opposed to the setting of Hamiltonian PEPS optimization." + "the appropriate metric. For a more detailed explanation we refer to the\n", + "[OptimKit.jl README](https://github.com/Jutho/OptimKit.jl). In PEPSKit.jl, these two\n", + "procedures are defined through the `PEPSKit.peps_retract` and\n", + "`PEPSKit.peps_transport!` methods. While it is instructive to read the corresponding\n", + "docstrings in order to understand what these actually do, here we can just blindly reuse\n", + "them where the only difference is that we have to pass along an extra environment since our\n", + "cost function requires two distinct contractions as opposed to the setting of Hamiltonian\n", + "PEPS optimization which only requires a double-layer contraction." ], "metadata": {} }, @@ -263,13 +279,21 @@ "outputs": [], "cell_type": "code", "source": [ - "function pepo_retract(x, η, α)\n", - " x´_partial, ξ = PEPSKit.peps_retract(x[1:2], η, α)\n", - " x´ = (x´_partial..., deepcopy(x[3]))\n", - " return x´, ξ\n", + "function pepo_retract((peps, env_double_layer, env_triple_layer), η, α)\n", + " (peps´, env_double_layer´), ξ = PEPSKit.peps_retract((peps, env_double_layer), η, α)\n", + " env_triple_layer´ = deepcopy(env_triple_layer)\n", + " return (peps´, env_double_layer´, env_triple_layer´), ξ\n", "end\n", - "function pepo_transport!(ξ, x, η, α, x´)\n", - " return PEPSKit.peps_transport!(ξ, x[1:2], η, α, x´[1:2])\n", + "function pepo_transport!(\n", + " ξ,\n", + " (peps, env_double_layer, env_triple_layer),\n", + " η,\n", + " α,\n", + " (peps´, env_double_layer´, env_triple_layer´),\n", + ")\n", + " return PEPSKit.peps_transport!(\n", + " ξ, (peps, env_double_layer), η, α, (peps´, env_double_layer´)\n", + " )\n", "end;" ], "metadata": {}, @@ -371,11 +395,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.11.5" + "version": "1.10.4" }, "kernelspec": { - "name": "julia-1.11", - "display_name": "Julia 1.11.5", + "name": "julia-1.10", + "display_name": "Julia 1.10.4", "language": "julia" } }, diff --git a/examples/3d_ising_partition_function/main.jl b/examples/3d_ising_partition_function/main.jl index 5a0311ad9..98c3e9b23 100644 --- a/examples/3d_ising_partition_function/main.jl +++ b/examples/3d_ising_partition_function/main.jl @@ -99,22 +99,27 @@ of a slice-to-slice transfer operator ``T``, where ``T`` can be seen as an infin projected entangled-pair operator (PEPO) which consists of the rank-6 tensor `O` at each site of an infinite 2D square lattice. In the same spirit as the boundary MPS approach, all we need to contract the whole partition function is to find the leading eigenvector of this -PEPO. The fixed point of such a PEPO exactly corresponds to a PEPS, and for the case of a +PEPO. The fixed point of such a PEPO can be parametrized as a PEPS, and for the case of a Hermitian transfer operator we can find this PEPS through [variational optimization](@cite vanderstraeten_residual_2018). -Indeed, for a Hermition transfer operator ``T`` we can formulate the eigenvalue equation as -for a fixed point PEPS ``|\psi\rangle`` as a variational problem +Indeed, for a Hermitian transfer operator ``T`` we can characterize the fixed point PEPS +``|\psi\rangle`` which satisfies the eigenvalue equation +``T |\psi\rangle = \Lambda |\psi\rangle`` corresponding to the largest magnitude eigenvalue +``\Lambda`` as the solution of a variational problem ```math -|\psi\rangle = \text{argmin}_{|\psi\rangle} \left ( \lim_{N \to ∞} - \frac{1}{N} \log \left( \frac{\langle \psi | T | \psi \rangle}{\langle \psi | \psi \rangle} \right) \right ) +|\psi\rangle = \text{argmin}_{|\psi\rangle} \left ( \lim_{N \to ∞} - \frac{1}{N} \log \left( \frac{\langle \psi | T | \psi \rangle}{\langle \psi | \psi \rangle} \right) \right ) , ``` -where ``N`` is the diverging number of sites of the 2D transfer operator ``T``. + +where ``N`` is the diverging number of sites of the 2D transfer operator ``T``. The function +minimized in this expression is exactly the free energy per site of the partition function, +so we essentially find the fixed-point PEPS by variationally minimizing the free energy. ### Defining the cost function -Using PEPSKit.jl, this cost function and its gradient can be computed, after which we -can use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it. We can +Using PEPSKit.jl, this cost function and its gradient can be computed, after which we can +use [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) to actually optimize it. We can immediately recognize the denominator ``\langle \psi | \psi \rangle`` as the familiar PEPS norm, where we can compute the norm per site as the [`network_value`](@ref) of the corresponding [`InfiniteSquareNetwork`](@ref) by contracting it with the CTMRG algorithm. @@ -124,10 +129,11 @@ operator and bra objects. This object can also be constructed and contracted in straightforward way, so we can again compute its `network_value`. To define our cost function, we then need to construct the transfer operator as an -[`InfinitePEPO`](@ref), construct the two infinite 2D contractible networks for the numerator and denominator from -the current PEPS and this transfer operator, and specify a contraction algorithm we can use -to compute the values of these two networks. In addition, we'll specify the specific reverse -rule algorithm that will be used to compute the gradient of this cost function. +[`InfinitePEPO`](@ref), construct the two infinite 2D contractible networks for the +numerator and denominator from the current PEPS and this transfer operator, and specify a +contraction algorithm we can use to compute the values of these two networks. In addition, +we'll specify the specific reverse rule algorithm that will be used to compute the gradient +of this cost function. """ boundary_alg = SimultaneousCTMRG(; maxiter=150, tol=1e-8, verbosity=1) @@ -136,29 +142,37 @@ rrule_alg = EigSolver(; ) T = InfinitePEPO(O) -function pepo_costfun((psi, env2, env3)) +function pepo_costfun((peps, env_double_layer, env_triple_layer)) ## use Zygote to compute the gradient automatically - E, gs = withgradient(psi) do ψ + E, gs = withgradient(peps) do ψ ## construct the PEPS norm network - n2 = InfiniteSquareNetwork(ψ) + n_double_layer = InfiniteSquareNetwork(ψ) ## contract this network - env2′, info = PEPSKit.hook_pullback( - leading_boundary, env2, n2, boundary_alg; alg_rrule=rrule_alg + env_double_layer′, info = PEPSKit.hook_pullback( + leading_boundary, + env_double_layer, + n_double_layer, + boundary_alg; + alg_rrule=rrule_alg, ) ## construct the PEPS-PEPO-PEPS overlap network - n3 = InfiniteSquareNetwork(ψ, T) + n_triple_layer = InfiniteSquareNetwork(ψ, T) ## contract this network - env3′, info = PEPSKit.hook_pullback( - leading_boundary, env3, n3, boundary_alg; alg_rrule=rrule_alg + env_triple_layer′, info = PEPSKit.hook_pullback( + leading_boundary, + env_triple_layer, + n_triple_layer, + boundary_alg; + alg_rrule=rrule_alg, ) ## update the environments for reuse PEPSKit.ignore_derivatives() do - PEPSKit.update!(env2, env2′) - PEPSKit.update!(env3, env3′) + PEPSKit.update!(env_double_layer, env_double_layer′) + PEPSKit.update!(env_triple_layer, env_triple_layer′) end ## compute the network values per site - λ3 = network_value(n3, env3) - λ2 = network_value(n2, env2) + λ3 = network_value(n_triple_layer, env_triple_layer) + λ2 = network_value(n_double_layer, env_double_layer) ## use this to compute the actual cost function return -log(real(λ3 / λ2)) end @@ -198,21 +212,31 @@ a transport. The retraction, corresponding to the `retract` keyword argument of direction to obtain a new manifold point. The transport, corresponding to the `transport!` keyword argument of `OptimKit.optimize`, specifies how to transport a descent direction at a given manifold point to a valid descent direction at a different manifold point according to -the appropriate metric. In PEPSKit.jl, these two procedures are defined through the -[`PEPSKit.peps_retract`](@ref) and [`PEPSKit.peps_transport!`](@ref) methods. While it is -instructive to read the corresponding docstrings in order to understand what these actually -do, here we can just blindly reuse them where the only difference is that we have to pass -along an extra environment since our cost function requires two distinct contractions as -opposed to the setting of Hamiltonian PEPS optimization. +the appropriate metric. For a more detailed explanation we refer to the +[OptimKit.jl README](https://github.com/Jutho/OptimKit.jl). In PEPSKit.jl, these two +procedures are defined through the [`PEPSKit.peps_retract`](@ref) and +[`PEPSKit.peps_transport!`](@ref) methods. While it is instructive to read the corresponding +docstrings in order to understand what these actually do, here we can just blindly reuse +them where the only difference is that we have to pass along an extra environment since our +cost function requires two distinct contractions as opposed to the setting of Hamiltonian +PEPS optimization which only requires a double-layer contraction. """ -function pepo_retract(x, η, α) - x´_partial, ξ = PEPSKit.peps_retract(x[1:2], η, α) - x´ = (x´_partial..., deepcopy(x[3])) - return x´, ξ +function pepo_retract((peps, env_double_layer, env_triple_layer), η, α) + (peps´, env_double_layer´), ξ = PEPSKit.peps_retract((peps, env_double_layer), η, α) + env_triple_layer´ = deepcopy(env_triple_layer) + return (peps´, env_double_layer´, env_triple_layer´), ξ end -function pepo_transport!(ξ, x, η, α, x´) - return PEPSKit.peps_transport!(ξ, x[1:2], η, α, x´[1:2]) +function pepo_transport!( + ξ, + (peps, env_double_layer, env_triple_layer), + η, + α, + (peps´, env_double_layer´, env_triple_layer´), +) + return PEPSKit.peps_transport!( + ξ, (peps, env_double_layer), η, α, (peps´, env_double_layer´) + ) end; md""" diff --git a/examples/Cache.toml b/examples/Cache.toml index 46e3e0f88..75cd55a3e 100644 --- a/examples/Cache.toml +++ b/examples/Cache.toml @@ -1,2 +1,2 @@ -2d_ising_partition_function = "9bcfd5f2d320a044515570e22595e61ef336dd3b2b478bc628162539a96bc6dc" -3d_ising_partition_function = "3a76f0b39a53c20abeb00040a5b1b2716ec05e368dc54225ecccc05fa7af6d16" +2d_ising_partition_function = "40cacb2e0805f7ca6207a84b3272b5924809d13bed1533fb373b5fa41a566b63" +3d_ising_partition_function = "2f129d89e82f7e0019000e609bef4f6d0e9089880e357d9196e387ff2f81f243" From 78868e759befd8bd2851c6e79bfbbde3405ab38f Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Mon, 5 May 2025 13:11:19 +0200 Subject: [PATCH 112/113] Rerun examples and update cache --- docs/src/examples/bose_hubbard/index.md | 320 ++++++++++----------- docs/src/examples/bose_hubbard/main.ipynb | 8 +- docs/src/examples/boundary_mps/index.md | 53 ++-- docs/src/examples/boundary_mps/main.ipynb | 28 +- docs/src/examples/fermi_hubbard/index.md | 170 +++++------ docs/src/examples/fermi_hubbard/main.ipynb | 2 +- docs/src/examples/heisenberg/index.md | 184 ++++++------ docs/src/examples/heisenberg/main.ipynb | 8 +- docs/src/examples/heisenberg_su/index.md | 60 ++-- docs/src/examples/heisenberg_su/main.ipynb | 32 +-- docs/src/examples/hubbard_su/index.md | 77 +++-- docs/src/examples/hubbard_su/main.ipynb | 23 +- docs/src/examples/xxz/index.md | 184 ++++++------ docs/src/examples/xxz/main.ipynb | 4 +- examples/Cache.toml | 7 + 15 files changed, 569 insertions(+), 591 deletions(-) diff --git a/docs/src/examples/bose_hubbard/index.md b/docs/src/examples/bose_hubbard/index.md index 9b26dd4bf..972ca0ce0 100644 --- a/docs/src/examples/bose_hubbard/index.md +++ b/docs/src/examples/bose_hubbard/index.md @@ -2,9 +2,9 @@ EditURL = "../../../../examples/bose_hubbard/main.jl" ``` -[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//bose_hubbard/main.ipynb) -[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//bose_hubbard/main.ipynb) -[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//bose_hubbard) +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/bose_hubbard/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/bose_hubbard/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/bose_hubbard) # Optimizing the $U(1)$-symmetric Bose-Hubbard model @@ -57,7 +57,7 @@ Before we continue, it might be interesting to inspect the corresponding lattice spaces (which is here just a $1 \times 1$ matrix due to the single-site unit cell): ````julia -physical_spaces = H.lattice +physical_spaces = physicalspace(H) ```` ```` @@ -127,8 +127,8 @@ env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); ```` ```` -[ Info: CTMRG init: obj = +1.696011117279e+00 +7.895649499440e-02im err = 1.0000e+00 -[ Info: CTMRG conv 19: obj = +1.181834754305e+01 -1.525384139600e-11im err = 3.7197306424e-09 time = 1.27 sec +[ Info: CTMRG init: obj = +1.693461429863e+00 +8.390974048721e-02im err = 1.0000e+00 +[ Info: CTMRG conv 19: obj = +1.181834754305e+01 -1.514255254857e-11im err = 3.6943032119e-09 time = 8.27 sec ```` @@ -142,171 +142,171 @@ peps, env, E, info = fixedpoint( ```` ```` -[ Info: LBFGS: initializing with f = 9.360531870688, ‖∇f‖ = 1.6957e+01 +[ Info: LBFGS: initializing with f = 9.360531870693, ‖∇f‖ = 1.6957e+01 ┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Float64}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 -[ Info: LBFGS: iter 1, time 1425.57 s: f = 0.112865963396, ‖∇f‖ = 5.9876e+00, α = 1.56e+02, m = 0, nfg = 7 +[ Info: LBFGS: iter 1, time 862.65 s: f = 0.112865330403, ‖∇f‖ = 5.9876e+00, α = 1.56e+02, m = 0, nfg = 7 ┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 -[ Info: LBFGS: iter 2, time 1462.43 s: f = 0.031010339650, ‖∇f‖ = 4.7933e+00, α = 5.55e-01, m = 1, nfg = 2 -[ Info: LBFGS: iter 3, time 1468.51 s: f = -0.073336754293, ‖∇f‖ = 1.4989e+00, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 4, time 1476.82 s: f = -0.113156779559, ‖∇f‖ = 1.4101e+00, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 2, time 875.83 s: f = 0.031016651818, ‖∇f‖ = 4.7981e+00, α = 5.55e-01, m = 1, nfg = 2 +[ Info: LBFGS: iter 3, time 878.38 s: f = -0.073286659944, ‖∇f‖ = 1.4991e+00, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 4, time 881.06 s: f = -0.113074511097, ‖∇f‖ = 1.4104e+00, α = 1.00e+00, m = 3, nfg = 1 ┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: │ α = 4.53e-02, dϕ = -5.09e-01, ϕ - ϕ₀ = -2.42e-02 └ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 5, time 1496.49 s: f = -0.137358553717, ‖∇f‖ = 1.3312e+00, α = 4.53e-02, m = 4, nfg = 3 +[ Info: LBFGS: iter 5, time 888.55 s: f = -0.137293934550, ‖∇f‖ = 1.3317e+00, α = 4.53e-02, m = 4, nfg = 3 ┌ Warning: Linesearch not converged after 2 iterations and 3 function evaluations: -│ α = 4.20e-02, dϕ = -3.57e-01, ϕ - ϕ₀ = -1.56e-02 +│ α = 4.19e-02, dϕ = -3.58e-01, ϕ - ϕ₀ = -1.56e-02 └ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 6, time 1514.64 s: f = -0.152937922237, ‖∇f‖ = 1.2509e+00, α = 4.20e-02, m = 5, nfg = 3 -[ Info: LBFGS: iter 7, time 1538.19 s: f = -0.167923544087, ‖∇f‖ = 3.0315e+00, α = 3.97e-01, m = 6, nfg = 4 -[ Info: LBFGS: iter 8, time 1544.27 s: f = -0.200656150027, ‖∇f‖ = 8.4469e-01, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 9, time 1550.09 s: f = -0.214889985053, ‖∇f‖ = 5.6025e-01, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 10, time 1555.20 s: f = -0.222943109801, ‖∇f‖ = 9.7822e-01, α = 1.00e+00, m = 9, nfg = 1 -[ Info: LBFGS: iter 11, time 1560.12 s: f = -0.230726654816, ‖∇f‖ = 4.2339e-01, α = 1.00e+00, m = 10, nfg = 1 -[ Info: LBFGS: iter 12, time 1564.37 s: f = -0.238162325681, ‖∇f‖ = 2.5749e-01, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 13, time 1568.87 s: f = -0.247343408520, ‖∇f‖ = 3.2371e-01, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 14, time 1572.04 s: f = -0.253866737463, ‖∇f‖ = 2.4010e-01, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 15, time 1574.25 s: f = -0.261289395453, ‖∇f‖ = 3.4176e-01, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 16, time 1576.55 s: f = -0.267194174286, ‖∇f‖ = 2.0409e-01, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 17, time 1579.49 s: f = -0.269427456764, ‖∇f‖ = 1.4197e-01, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 18, time 1582.43 s: f = -0.270261160270, ‖∇f‖ = 7.8704e-02, α = 1.00e+00, m = 17, nfg = 1 -[ Info: LBFGS: iter 19, time 1585.67 s: f = -0.270680108511, ‖∇f‖ = 6.2948e-02, α = 1.00e+00, m = 18, nfg = 1 -[ Info: LBFGS: iter 20, time 1587.48 s: f = -0.271217770832, ‖∇f‖ = 9.0237e-02, α = 1.00e+00, m = 19, nfg = 1 -[ Info: LBFGS: iter 21, time 1589.30 s: f = -0.271547867503, ‖∇f‖ = 4.3177e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 22, time 1591.06 s: f = -0.271652426217, ‖∇f‖ = 3.3993e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 23, time 1592.87 s: f = -0.271919640568, ‖∇f‖ = 3.6522e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 24, time 1595.28 s: f = -0.272079486038, ‖∇f‖ = 4.0652e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 25, time 1597.07 s: f = -0.272236289070, ‖∇f‖ = 2.8052e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 26, time 1598.85 s: f = -0.272374999395, ‖∇f‖ = 2.3005e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 27, time 1600.57 s: f = -0.272451064713, ‖∇f‖ = 2.8468e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 28, time 1602.31 s: f = -0.272553269910, ‖∇f‖ = 2.2120e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 29, time 1604.70 s: f = -0.272753621227, ‖∇f‖ = 2.5836e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 30, time 1606.49 s: f = -0.272791434353, ‖∇f‖ = 3.8796e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 31, time 1608.64 s: f = -0.272830578966, ‖∇f‖ = 1.7177e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 32, time 1610.36 s: f = -0.272860065057, ‖∇f‖ = 1.0765e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 33, time 1612.11 s: f = -0.272917839871, ‖∇f‖ = 1.7521e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 34, time 1614.49 s: f = -0.272987230891, ‖∇f‖ = 2.0873e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 35, time 1618.14 s: f = -0.273018580221, ‖∇f‖ = 2.6969e-02, α = 4.93e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 36, time 1619.92 s: f = -0.273067382640, ‖∇f‖ = 1.0394e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 37, time 1621.67 s: f = -0.273081112333, ‖∇f‖ = 6.3470e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 38, time 1624.62 s: f = -0.273087245911, ‖∇f‖ = 9.2635e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 39, time 1627.04 s: f = -0.273091551053, ‖∇f‖ = 5.4087e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 40, time 1628.83 s: f = -0.273095914939, ‖∇f‖ = 4.9572e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 41, time 1630.65 s: f = -0.273099955057, ‖∇f‖ = 6.8773e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 42, time 1632.49 s: f = -0.273103689409, ‖∇f‖ = 5.7556e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 43, time 1635.42 s: f = -0.273109236879, ‖∇f‖ = 6.0202e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 44, time 1637.40 s: f = -0.273117603189, ‖∇f‖ = 1.3781e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 45, time 1639.26 s: f = -0.273127462131, ‖∇f‖ = 8.3496e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 46, time 1641.14 s: f = -0.273135749952, ‖∇f‖ = 7.4036e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 47, time 1643.02 s: f = -0.273146331612, ‖∇f‖ = 8.4981e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 48, time 1646.14 s: f = -0.273156439074, ‖∇f‖ = 1.0154e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 49, time 1648.15 s: f = -0.273161861296, ‖∇f‖ = 9.8380e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 50, time 1650.64 s: f = -0.273166241637, ‖∇f‖ = 4.6402e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 51, time 1652.47 s: f = -0.273167844104, ‖∇f‖ = 2.8874e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 52, time 1654.33 s: f = -0.273169393956, ‖∇f‖ = 3.8294e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 53, time 1656.30 s: f = -0.273172294889, ‖∇f‖ = 5.1406e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 54, time 1658.20 s: f = -0.273176654891, ‖∇f‖ = 5.3195e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 55, time 1662.84 s: f = -0.273178415582, ‖∇f‖ = 6.2372e-03, α = 2.39e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 56, time 1664.87 s: f = -0.273182983220, ‖∇f‖ = 3.8458e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 57, time 1667.76 s: f = -0.273187408223, ‖∇f‖ = 4.3379e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 58, time 1670.67 s: f = -0.273193071706, ‖∇f‖ = 4.4117e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 59, time 1677.19 s: f = -0.273196045493, ‖∇f‖ = 7.7711e-03, α = 5.06e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 60, time 1680.08 s: f = -0.273199424947, ‖∇f‖ = 4.9415e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 61, time 1683.00 s: f = -0.273202267976, ‖∇f‖ = 3.1402e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 62, time 1685.95 s: f = -0.273203233848, ‖∇f‖ = 2.8294e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 63, time 1688.99 s: f = -0.273204600698, ‖∇f‖ = 2.5656e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 64, time 1690.74 s: f = -0.273204925101, ‖∇f‖ = 5.2974e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 65, time 1692.46 s: f = -0.273205966860, ‖∇f‖ = 2.2643e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 66, time 1694.15 s: f = -0.273206609644, ‖∇f‖ = 2.0621e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 67, time 1696.07 s: f = -0.273207765008, ‖∇f‖ = 3.3333e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 68, time 1698.43 s: f = -0.273209290000, ‖∇f‖ = 3.6314e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 69, time 1700.21 s: f = -0.273210336569, ‖∇f‖ = 6.9802e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 70, time 1702.00 s: f = -0.273212030217, ‖∇f‖ = 1.7588e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 71, time 1703.84 s: f = -0.273212480151, ‖∇f‖ = 1.4240e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 72, time 1705.62 s: f = -0.273213078023, ‖∇f‖ = 2.0765e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 73, time 1707.64 s: f = -0.273213880125, ‖∇f‖ = 3.5718e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 74, time 1709.94 s: f = -0.273215045145, ‖∇f‖ = 2.5061e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 75, time 1711.78 s: f = -0.273216916331, ‖∇f‖ = 1.9910e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 76, time 1714.09 s: f = -0.273218689353, ‖∇f‖ = 4.3844e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 77, time 1715.84 s: f = -0.273220202940, ‖∇f‖ = 4.1041e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 78, time 1718.07 s: f = -0.273221806934, ‖∇f‖ = 3.5949e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 79, time 1720.70 s: f = -0.273222485563, ‖∇f‖ = 6.0992e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 80, time 1722.96 s: f = -0.273223791530, ‖∇f‖ = 1.9925e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 81, time 1725.87 s: f = -0.273224262076, ‖∇f‖ = 1.5944e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 82, time 1727.62 s: f = -0.273224852979, ‖∇f‖ = 2.0007e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 83, time 1729.37 s: f = -0.273225773728, ‖∇f‖ = 2.1761e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 84, time 1733.14 s: f = -0.273226388165, ‖∇f‖ = 2.9882e-03, α = 5.20e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 85, time 1735.79 s: f = -0.273227173575, ‖∇f‖ = 1.8724e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 86, time 1737.55 s: f = -0.273227751786, ‖∇f‖ = 1.7098e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 87, time 1739.32 s: f = -0.273228422942, ‖∇f‖ = 1.5751e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 88, time 1742.26 s: f = -0.273229395977, ‖∇f‖ = 1.8136e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 89, time 1747.19 s: f = -0.273229821385, ‖∇f‖ = 2.4985e-03, α = 3.36e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 90, time 1749.35 s: f = -0.273230528832, ‖∇f‖ = 1.6082e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 91, time 1751.23 s: f = -0.273231112443, ‖∇f‖ = 1.5216e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 92, time 1753.03 s: f = -0.273231613563, ‖∇f‖ = 2.6699e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 93, time 1754.77 s: f = -0.273232215697, ‖∇f‖ = 1.4347e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 94, time 1757.16 s: f = -0.273233125782, ‖∇f‖ = 1.7764e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 95, time 1758.93 s: f = -0.273233450052, ‖∇f‖ = 2.7567e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 96, time 1760.68 s: f = -0.273233803468, ‖∇f‖ = 1.2666e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 97, time 1762.45 s: f = -0.273234086238, ‖∇f‖ = 1.0932e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 98, time 1764.25 s: f = -0.273234487308, ‖∇f‖ = 1.5990e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 99, time 1766.67 s: f = -0.273234975900, ‖∇f‖ = 1.6599e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 100, time 1770.23 s: f = -0.273235076855, ‖∇f‖ = 1.8653e-03, α = 1.62e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 101, time 1772.10 s: f = -0.273235308827, ‖∇f‖ = 9.8269e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 102, time 1773.99 s: f = -0.273235461843, ‖∇f‖ = 8.3532e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 103, time 1776.37 s: f = -0.273235703016, ‖∇f‖ = 1.3504e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 104, time 1778.12 s: f = -0.273236030970, ‖∇f‖ = 1.7152e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 105, time 1779.89 s: f = -0.273236666544, ‖∇f‖ = 1.9163e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 106, time 1781.63 s: f = -0.273237201871, ‖∇f‖ = 2.0606e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 107, time 1783.47 s: f = -0.273237605262, ‖∇f‖ = 1.2100e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 108, time 1785.84 s: f = -0.273237923146, ‖∇f‖ = 1.1911e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 109, time 1787.60 s: f = -0.273238474676, ‖∇f‖ = 1.5922e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 110, time 1789.38 s: f = -0.273239020165, ‖∇f‖ = 3.5400e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 111, time 1791.17 s: f = -0.273239721493, ‖∇f‖ = 1.5841e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 112, time 1792.95 s: f = -0.273240056185, ‖∇f‖ = 8.1807e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 113, time 1795.44 s: f = -0.273240176875, ‖∇f‖ = 8.2119e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 114, time 1797.22 s: f = -0.273240388391, ‖∇f‖ = 9.1300e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 115, time 1798.98 s: f = -0.273240719099, ‖∇f‖ = 1.3486e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 116, time 1800.75 s: f = -0.273241124067, ‖∇f‖ = 1.8644e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 117, time 1802.52 s: f = -0.273241441776, ‖∇f‖ = 1.1376e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 118, time 1805.03 s: f = -0.273241674928, ‖∇f‖ = 1.0744e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 119, time 1807.43 s: f = -0.273242054196, ‖∇f‖ = 1.3968e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 120, time 1809.19 s: f = -0.273242373511, ‖∇f‖ = 3.4093e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 121, time 1810.97 s: f = -0.273242838731, ‖∇f‖ = 1.6035e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 122, time 1813.28 s: f = -0.273243220149, ‖∇f‖ = 1.0189e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 123, time 1815.64 s: f = -0.273243410574, ‖∇f‖ = 1.0299e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 124, time 1818.49 s: f = -0.273243873822, ‖∇f‖ = 1.5353e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 125, time 1822.08 s: f = -0.273244136936, ‖∇f‖ = 1.3969e-03, α = 4.63e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 126, time 1824.72 s: f = -0.273244383827, ‖∇f‖ = 6.9496e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 127, time 1826.72 s: f = -0.273244536785, ‖∇f‖ = 6.2695e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 128, time 1828.67 s: f = -0.273244685913, ‖∇f‖ = 1.3081e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 129, time 1830.62 s: f = -0.273244940432, ‖∇f‖ = 9.2142e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 130, time 1832.67 s: f = -0.273245349898, ‖∇f‖ = 9.5066e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 131, time 1835.35 s: f = -0.273245602436, ‖∇f‖ = 2.1118e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 132, time 1837.11 s: f = -0.273245856212, ‖∇f‖ = 9.4425e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 133, time 1838.84 s: f = -0.273245974747, ‖∇f‖ = 7.2475e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 134, time 1840.59 s: f = -0.273246213451, ‖∇f‖ = 1.0622e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 135, time 1842.36 s: f = -0.273246353289, ‖∇f‖ = 2.1630e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 136, time 1844.66 s: f = -0.273246531186, ‖∇f‖ = 1.0798e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 137, time 1846.38 s: f = -0.273246646636, ‖∇f‖ = 5.4376e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 138, time 1848.11 s: f = -0.273246688623, ‖∇f‖ = 5.9696e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 139, time 1849.88 s: f = -0.273246849584, ‖∇f‖ = 1.0371e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 140, time 1851.66 s: f = -0.273246989170, ‖∇f‖ = 2.0820e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 141, time 1853.95 s: f = -0.273247216059, ‖∇f‖ = 1.2002e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 142, time 1855.75 s: f = -0.273247413465, ‖∇f‖ = 7.8638e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 143, time 1857.53 s: f = -0.273247523052, ‖∇f‖ = 7.4363e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 144, time 1859.32 s: f = -0.273247723357, ‖∇f‖ = 9.7224e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 145, time 1861.14 s: f = -0.273247872194, ‖∇f‖ = 2.6987e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 146, time 1863.03 s: f = -0.273248167442, ‖∇f‖ = 1.3795e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 147, time 1865.26 s: f = -0.273248387392, ‖∇f‖ = 8.2588e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 148, time 1867.08 s: f = -0.273248518043, ‖∇f‖ = 8.5059e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 149, time 1868.86 s: f = -0.273248701939, ‖∇f‖ = 9.1018e-04, α = 1.00e+00, m = 20, nfg = 1 -┌ Warning: LBFGS: not converged to requested tol after 150 iterations and time 1871.22 s: f = -0.273248873410, ‖∇f‖ = 1.7740e-03 +[ Info: LBFGS: iter 6, time 896.03 s: f = -0.152882613133, ‖∇f‖ = 1.2515e+00, α = 4.19e-02, m = 5, nfg = 3 +[ Info: LBFGS: iter 7, time 906.18 s: f = -0.167778524643, ‖∇f‖ = 3.0370e+00, α = 3.97e-01, m = 6, nfg = 4 +[ Info: LBFGS: iter 8, time 908.59 s: f = -0.200610144885, ‖∇f‖ = 8.4562e-01, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 9, time 911.30 s: f = -0.214869049363, ‖∇f‖ = 5.6088e-01, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 10, time 913.43 s: f = -0.222910672089, ‖∇f‖ = 9.8015e-01, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 11, time 915.49 s: f = -0.230707833300, ‖∇f‖ = 4.2302e-01, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 12, time 917.75 s: f = -0.238105633372, ‖∇f‖ = 2.5801e-01, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 13, time 919.64 s: f = -0.247331854867, ‖∇f‖ = 3.2459e-01, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 14, time 920.70 s: f = -0.253845651144, ‖∇f‖ = 2.4014e-01, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 15, time 922.02 s: f = -0.261289607017, ‖∇f‖ = 3.3777e-01, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 16, time 922.92 s: f = -0.267178486858, ‖∇f‖ = 2.0556e-01, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 17, time 923.72 s: f = -0.269417408686, ‖∇f‖ = 1.4442e-01, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 18, time 924.84 s: f = -0.270255942689, ‖∇f‖ = 7.8602e-02, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 19, time 925.66 s: f = -0.270672366603, ‖∇f‖ = 6.3259e-02, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 20, time 926.46 s: f = -0.271220543802, ‖∇f‖ = 8.8755e-02, α = 1.00e+00, m = 19, nfg = 1 +[ Info: LBFGS: iter 21, time 927.59 s: f = -0.271543527453, ‖∇f‖ = 4.5233e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 22, time 928.38 s: f = -0.271650756946, ‖∇f‖ = 3.4057e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 23, time 929.16 s: f = -0.271894826592, ‖∇f‖ = 3.1507e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 24, time 930.27 s: f = -0.272056350007, ‖∇f‖ = 3.7796e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 25, time 931.08 s: f = -0.272233548851, ‖∇f‖ = 2.8370e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 26, time 931.89 s: f = -0.272383908712, ‖∇f‖ = 2.2903e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 27, time 933.01 s: f = -0.272455167221, ‖∇f‖ = 4.0448e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 28, time 933.79 s: f = -0.272553540301, ‖∇f‖ = 2.1431e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 29, time 934.56 s: f = -0.272695812729, ‖∇f‖ = 2.3543e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 30, time 935.67 s: f = -0.272771651851, ‖∇f‖ = 2.0076e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 31, time 936.45 s: f = -0.272799750606, ‖∇f‖ = 4.7874e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 32, time 937.23 s: f = -0.272878619780, ‖∇f‖ = 1.7612e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 33, time 938.34 s: f = -0.272929741282, ‖∇f‖ = 1.5455e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 34, time 939.14 s: f = -0.273001510559, ‖∇f‖ = 2.3641e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 35, time 939.94 s: f = -0.273050577801, ‖∇f‖ = 1.6253e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 36, time 941.06 s: f = -0.273061460544, ‖∇f‖ = 2.5195e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 37, time 941.84 s: f = -0.273079875270, ‖∇f‖ = 7.2299e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 38, time 942.63 s: f = -0.273083995266, ‖∇f‖ = 6.2322e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 39, time 943.75 s: f = -0.273091490830, ‖∇f‖ = 7.8002e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 40, time 944.54 s: f = -0.273097801979, ‖∇f‖ = 9.2495e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 41, time 945.33 s: f = -0.273103085883, ‖∇f‖ = 5.9273e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 42, time 946.45 s: f = -0.273106428950, ‖∇f‖ = 5.6938e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 43, time 947.24 s: f = -0.273111266609, ‖∇f‖ = 9.0725e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 44, time 948.06 s: f = -0.273121071175, ‖∇f‖ = 1.2386e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 45, time 949.20 s: f = -0.273137645098, ‖∇f‖ = 1.2942e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 46, time 950.82 s: f = -0.273141136808, ‖∇f‖ = 1.4282e-02, α = 1.35e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 47, time 951.96 s: f = -0.273154777599, ‖∇f‖ = 7.0317e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 48, time 952.79 s: f = -0.273161148021, ‖∇f‖ = 3.4952e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 49, time 953.57 s: f = -0.273164175099, ‖∇f‖ = 4.7738e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 50, time 954.68 s: f = -0.273166242670, ‖∇f‖ = 5.4242e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 51, time 955.48 s: f = -0.273168481006, ‖∇f‖ = 3.6862e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 52, time 956.27 s: f = -0.273172228386, ‖∇f‖ = 4.8463e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 53, time 957.40 s: f = -0.273174650673, ‖∇f‖ = 6.4469e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 54, time 958.18 s: f = -0.273178852481, ‖∇f‖ = 7.4990e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 55, time 958.98 s: f = -0.273186651745, ‖∇f‖ = 8.2158e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 56, time 960.10 s: f = -0.273190544009, ‖∇f‖ = 8.6751e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 57, time 960.89 s: f = -0.273194527074, ‖∇f‖ = 2.7365e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 58, time 961.68 s: f = -0.273195816168, ‖∇f‖ = 2.9114e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 59, time 962.81 s: f = -0.273197625913, ‖∇f‖ = 3.0896e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 60, time 963.60 s: f = -0.273198605154, ‖∇f‖ = 1.0394e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 61, time 964.39 s: f = -0.273202461926, ‖∇f‖ = 3.0652e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 62, time 965.50 s: f = -0.273203714519, ‖∇f‖ = 2.0133e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 63, time 966.28 s: f = -0.273204828019, ‖∇f‖ = 2.5951e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 64, time 968.19 s: f = -0.273205465822, ‖∇f‖ = 4.1444e-03, α = 4.87e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 65, time 969.01 s: f = -0.273206458356, ‖∇f‖ = 2.9919e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 66, time 969.82 s: f = -0.273208249293, ‖∇f‖ = 1.6948e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 67, time 970.96 s: f = -0.273208839969, ‖∇f‖ = 3.0193e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 68, time 971.74 s: f = -0.273209433106, ‖∇f‖ = 1.8534e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 69, time 972.52 s: f = -0.273210019598, ‖∇f‖ = 1.7898e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 70, time 973.63 s: f = -0.273211075315, ‖∇f‖ = 2.7930e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 71, time 974.42 s: f = -0.273212703695, ‖∇f‖ = 3.6612e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 72, time 975.22 s: f = -0.273214163920, ‖∇f‖ = 6.1973e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 73, time 976.34 s: f = -0.273216147362, ‖∇f‖ = 2.7120e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 74, time 977.11 s: f = -0.273217199407, ‖∇f‖ = 2.2842e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 75, time 977.91 s: f = -0.273218358117, ‖∇f‖ = 3.0566e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 76, time 979.04 s: f = -0.273219638996, ‖∇f‖ = 3.8811e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 77, time 979.83 s: f = -0.273221240011, ‖∇f‖ = 4.4440e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 78, time 980.62 s: f = -0.273222619191, ‖∇f‖ = 2.8356e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 79, time 981.74 s: f = -0.273223777532, ‖∇f‖ = 2.2842e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 80, time 982.53 s: f = -0.273224631407, ‖∇f‖ = 2.6013e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 81, time 983.33 s: f = -0.273225621866, ‖∇f‖ = 2.7625e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 82, time 984.46 s: f = -0.273226222472, ‖∇f‖ = 2.5785e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 83, time 985.23 s: f = -0.273226603039, ‖∇f‖ = 1.2203e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 84, time 986.03 s: f = -0.273226890308, ‖∇f‖ = 1.1848e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 85, time 987.16 s: f = -0.273227256564, ‖∇f‖ = 1.8281e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 86, time 987.96 s: f = -0.273227922952, ‖∇f‖ = 2.0191e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 87, time 989.91 s: f = -0.273228177117, ‖∇f‖ = 2.7409e-03, α = 3.30e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 88, time 990.72 s: f = -0.273228564518, ‖∇f‖ = 1.5762e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 89, time 991.52 s: f = -0.273228984011, ‖∇f‖ = 1.3435e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 90, time 992.64 s: f = -0.273229366257, ‖∇f‖ = 1.9460e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 91, time 993.46 s: f = -0.273230207912, ‖∇f‖ = 2.9080e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 92, time 994.25 s: f = -0.273231202568, ‖∇f‖ = 3.4541e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 93, time 995.36 s: f = -0.273232085510, ‖∇f‖ = 1.8388e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 94, time 996.15 s: f = -0.273232631167, ‖∇f‖ = 1.1594e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 95, time 996.93 s: f = -0.273232992148, ‖∇f‖ = 1.7787e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 96, time 998.04 s: f = -0.273233316686, ‖∇f‖ = 1.5449e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 97, time 998.85 s: f = -0.273233676058, ‖∇f‖ = 1.8482e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 98, time 999.62 s: f = -0.273233957076, ‖∇f‖ = 1.5452e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 99, time 1000.72 s: f = -0.273234130308, ‖∇f‖ = 1.2047e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 100, time 1001.53 s: f = -0.273234491906, ‖∇f‖ = 1.3723e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 101, time 1002.32 s: f = -0.273234862722, ‖∇f‖ = 2.2468e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 102, time 1003.43 s: f = -0.273235395986, ‖∇f‖ = 1.8201e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 103, time 1004.23 s: f = -0.273235884374, ‖∇f‖ = 1.7284e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 104, time 1005.03 s: f = -0.273236273215, ‖∇f‖ = 1.3732e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 105, time 1006.16 s: f = -0.273236575790, ‖∇f‖ = 1.4651e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 106, time 1006.95 s: f = -0.273236948216, ‖∇f‖ = 1.8153e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 107, time 1007.75 s: f = -0.273237435467, ‖∇f‖ = 2.6401e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 108, time 1008.87 s: f = -0.273237969174, ‖∇f‖ = 1.3197e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 109, time 1009.67 s: f = -0.273238333588, ‖∇f‖ = 1.0300e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 110, time 1010.46 s: f = -0.273238606412, ‖∇f‖ = 1.3512e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 111, time 1011.58 s: f = -0.273238763494, ‖∇f‖ = 2.0868e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 112, time 1012.38 s: f = -0.273238992097, ‖∇f‖ = 1.0034e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 113, time 1013.17 s: f = -0.273239242010, ‖∇f‖ = 1.0445e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 114, time 1014.29 s: f = -0.273239539038, ‖∇f‖ = 1.4904e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 115, time 1015.09 s: f = -0.273239986741, ‖∇f‖ = 1.4425e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 116, time 1017.02 s: f = -0.273240116483, ‖∇f‖ = 1.9754e-03, α = 2.24e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 117, time 1017.83 s: f = -0.273240380183, ‖∇f‖ = 9.8175e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 118, time 1018.62 s: f = -0.273240575426, ‖∇f‖ = 8.6345e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 119, time 1019.74 s: f = -0.273240832012, ‖∇f‖ = 1.4287e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 120, time 1020.53 s: f = -0.273241210750, ‖∇f‖ = 1.8219e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 121, time 1022.47 s: f = -0.273241482573, ‖∇f‖ = 2.4856e-03, α = 5.47e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 122, time 1023.28 s: f = -0.273241934058, ‖∇f‖ = 1.5033e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 123, time 1024.10 s: f = -0.273242166393, ‖∇f‖ = 1.2112e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 124, time 1025.25 s: f = -0.273242322900, ‖∇f‖ = 1.0134e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 125, time 1026.06 s: f = -0.273242508033, ‖∇f‖ = 1.0745e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 126, time 1026.87 s: f = -0.273242887106, ‖∇f‖ = 2.1256e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 127, time 1028.00 s: f = -0.273243341793, ‖∇f‖ = 1.6582e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 128, time 1028.81 s: f = -0.273243624575, ‖∇f‖ = 1.0434e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 129, time 1029.63 s: f = -0.273243926598, ‖∇f‖ = 1.0170e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 130, time 1030.76 s: f = -0.273244130570, ‖∇f‖ = 1.7663e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 131, time 1031.56 s: f = -0.273244384615, ‖∇f‖ = 1.4424e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 132, time 1032.37 s: f = -0.273244721419, ‖∇f‖ = 1.5925e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 133, time 1033.50 s: f = -0.273244883706, ‖∇f‖ = 1.0143e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 134, time 1034.30 s: f = -0.273244978610, ‖∇f‖ = 9.4449e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 135, time 1035.10 s: f = -0.273245503204, ‖∇f‖ = 1.2344e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 136, time 1036.22 s: f = -0.273245739413, ‖∇f‖ = 2.7009e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 137, time 1037.03 s: f = -0.273246059451, ‖∇f‖ = 1.4108e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 138, time 1037.84 s: f = -0.273246259501, ‖∇f‖ = 6.7238e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 139, time 1038.97 s: f = -0.273246408570, ‖∇f‖ = 9.2687e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 140, time 1039.79 s: f = -0.273246576606, ‖∇f‖ = 1.2150e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 141, time 1040.60 s: f = -0.273246729060, ‖∇f‖ = 1.3157e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 142, time 1041.73 s: f = -0.273246873413, ‖∇f‖ = 7.6123e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 143, time 1042.52 s: f = -0.273247027465, ‖∇f‖ = 7.9430e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 144, time 1043.32 s: f = -0.273247180548, ‖∇f‖ = 1.0894e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 145, time 1044.45 s: f = -0.273247387426, ‖∇f‖ = 2.2553e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 146, time 1045.24 s: f = -0.273247645050, ‖∇f‖ = 1.1468e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 147, time 1046.05 s: f = -0.273247846912, ‖∇f‖ = 9.1650e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 148, time 1047.17 s: f = -0.273248001067, ‖∇f‖ = 8.8945e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 149, time 1048.03 s: f = -0.273248315567, ‖∇f‖ = 1.2684e-03, α = 1.00e+00, m = 20, nfg = 1 +┌ Warning: LBFGS: not converged to requested tol after 150 iterations and time 1050.00 s: f = -0.273248467359, ‖∇f‖ = 1.1430e-03 └ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/lbfgs.jl:197 -E = -0.2732488734104027 +E = -0.2732484673593871 ```` @@ -320,7 +320,7 @@ E_ref = -0.273284888 ```` ```` -(E - E_ref) / E_ref = -0.00013178405092523278 +(E - E_ref) / E_ref = -0.00013326986676584008 ```` diff --git a/docs/src/examples/bose_hubbard/main.ipynb b/docs/src/examples/bose_hubbard/main.ipynb index 918f4ef96..dd4a9f707 100644 --- a/docs/src/examples/bose_hubbard/main.ipynb +++ b/docs/src/examples/bose_hubbard/main.ipynb @@ -97,7 +97,7 @@ "outputs": [], "cell_type": "code", "source": [ - "physical_spaces = H.lattice" + "physical_spaces = physicalspace(H)" ], "metadata": {}, "execution_count": null @@ -247,11 +247,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.11.4" }, "kernelspec": { - "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "name": "julia-1.11", + "display_name": "Julia 1.11.4", "language": "julia" } }, diff --git a/docs/src/examples/boundary_mps/index.md b/docs/src/examples/boundary_mps/index.md index 1394abfa7..a98e199d5 100644 --- a/docs/src/examples/boundary_mps/index.md +++ b/docs/src/examples/boundary_mps/index.md @@ -2,9 +2,9 @@ EditURL = "../../../../examples/boundary_mps/main.jl" ``` -[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//boundary_mps/main.ipynb) -[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//boundary_mps/main.ipynb) -[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//boundary_mps) +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/boundary_mps/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/boundary_mps/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/boundary_mps) # [Boundary MPS contractions of 2D networks] (@id e_boundary_mps) @@ -86,11 +86,16 @@ ket [`PEPSKit.PEPSTensor`](@ref) across their physical leg. Since the network we contract can be interpreted as the infinite power of ``T``, we can contract it by finding its leading eigenvector as a 1D MPS, which we call the boundary MPS. -In PEPSKit.jl, we can directly contruct the transfer operator corresponding to a PEPS norm +In PEPSKit.jl, we can directly construct the transfer operator corresponding to a PEPS norm network from a given infinite PEPS as an [`InfiniteTransferPEPS`](@ref) object. +Additionally, we need to specify which direction should be facing north (`dir=1` +corresponding to north, counting clockwise) and which row is selected from the north - but +since we have a trivial unit cell there is only one row: ````julia -T = InfiniteTransferPEPS(peps₀, 1, 1) +dir = 1 ## does not rotate the partition function +row = 1 +T = InfiniteTransferPEPS(peps₀, dir, row) ```` ```` @@ -102,7 +107,7 @@ single site MPSKit.InfiniteMPO{Tuple{TensorKit.TensorMap{ComplexF64, TensorKit.C ```` Since we'll find the leading eigenvector of ``T`` as a boundary MPS, we first need to -initialize an initial guess to supply to our algorithm. We can do this using the +construct an initial guess to supply to our algorithm. We can do this using the [`initialize_mps`](@ref) function, which constructs a random MPS with a specific virtual space for a given transfer operator. Here, we'll build an initial guess for the boundary MPS with a bond dimension of 20: @@ -124,9 +129,7 @@ Note that this will just construct a MPS with random Gaussian entries based on t spaces of the supplied transfer operator. Of course, one might come up with a better initial guess (leading to better convergence) depending on the application. To find the leading boundary MPS fixed point, we call [`leading_boundary`](@ref) using the -[`MPSKit.VUMPS`](@extref) algorithm from MPSKit. Note that, by default, `leading_boundary` -uses CTMRG where the settings are supplied as keyword arguments, so in the present case we -need to supply the VUMPS algorithm struct explicitly: +[`MPSKit.VUMPS`](@extref) algorithm from MPSKit: ````julia mps, env, ϵ = leading_boundary(mps₀, T, VUMPS(; tol=1e-6, verbosity=2)); @@ -134,7 +137,7 @@ mps, env, ϵ = leading_boundary(mps₀, T, VUMPS(; tol=1e-6, verbosity=2)); ```` [ Info: VUMPS init: obj = +5.052950412844e+00 +1.493192627823e-02im err = 8.4684e-01 -[ Info: VUMPS conv 4: obj = +1.744071150138e+01 +2.417441166152e-08im err = 1.9047772248e-07 time = 8.20 sec +[ Info: VUMPS conv 4: obj = +1.744071150138e+01 +2.417441557995e-08im err = 1.9047772246e-07 time = 3.69 sec ```` @@ -146,7 +149,7 @@ norm_vumps = abs(prod(expectation_value(mps, T))) ```` ```` -17.440711501378782 +17.440711501378814 ```` This can be compared to the result obtained using CTMRG, where we see that the results match: @@ -160,9 +163,9 @@ norm_ctmrg = abs(norm(peps₀, env_ctmrg)) ```` ```` -[ Info: CTMRG init: obj = -5.571758356204e-01 +1.608051219314e+00im err = 1.0000e+00 -[ Info: CTMRG conv 31: obj = +1.744071151099e+01 err = 1.5225866698e-07 time = 9.04 sec -abs(norm_vumps - norm_ctmrg) / norm_vumps = 5.510376342345678e-10 +[ Info: CTMRG init: obj = -5.556349490423e-01 +1.605938670370e+00im err = 1.0000e+00 +[ Info: CTMRG conv 37: obj = +1.744071151099e+01 err = 3.2056303631e-07 time = 4.37 sec +abs(norm_vumps - norm_ctmrg) / norm_vumps = 5.510362083182129e-10 ```` @@ -176,13 +179,14 @@ case, the boundary MPS is an [`MultilineMPS`](@extref) object, which should be i by specifying a virtual space for each site in the partition function unit cell. First, we construct a PEPS with a $2 \times 2$ unit cell using the `unitcell` keyword -argument and then define the corresponding transfer operator: +argument and then define the corresponding transfer operator, where we again specify the +direction which will be facing north: ````julia peps₀_2x2 = InfinitePEPS( rand, ComplexF64, ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2) ) -T_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1); +T_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, dir); ```` Now, the procedure is the same as before: We compute the norm once using VUMPS, once using CTMRG and then compare. @@ -201,12 +205,11 @@ norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2)) ```` ```` -[ Info: VUMPS init: obj = +6.462580940431e+02 -1.088925136214e+02im err = 8.6506e-01 -┌ Warning: VUMPS cancel 200: obj = +9.724487741058e+04 +1.904137949329e+00im err = 5.9545749280e-04 time = 1.16 min -└ @ MPSKit ~/.julia/packages/MPSKit/EfZBD/src/algorithms/statmech/vumps.jl:51 -[ Info: CTMRG init: obj = -7.927906985598e-02 +1.728135792446e+00im err = 1.0000e+00 -[ Info: CTMRG conv 53: obj = +9.723959008610e+04 err = 1.8278113657e-07 time = 7.78 sec -abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps = 5.437143071679346e-5 +[ Info: VUMPS init: obj = +6.668046237341e+02 -1.267878277078e+01im err = 8.7901e-01 +[ Info: VUMPS conv 69: obj = +9.723958968917e+04 -3.481605377714e-03im err = 6.3841720875e-07 time = 4.12 sec +[ Info: CTMRG init: obj = +1.074898090007e+03 -2.096255594496e+02im err = 1.0000e+00 +[ Info: CTMRG conv 41: obj = +9.723959008610e+04 err = 6.0518230963e-07 time = 1.54 sec +abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps = 4.08201516090106e-9 ```` @@ -266,9 +269,9 @@ norm_pepo = abs(prod(expectation_value(mps_pepo, transfer_pepo))); ```` ```` -[ Info: VUMPS init: obj = +3.726983052001e+01 +3.098676794848e-02im err = 9.2460e-01 -[ Info: VUMPS conv 5: obj = +2.483696260467e+02 +5.249041643967e-07im err = 1.7125391303e-08 time = 4.57 sec -norm_pepo = 248.36962604668662 +[ Info: VUMPS init: obj = +3.309203535702e+01 -4.227375981212e-01im err = 9.3280e-01 +[ Info: VUMPS conv 5: obj = +2.483696258643e+02 +2.387851822319e-07im err = 5.0174146749e-08 time = 2.69 sec +norm_pepo = 248.36962586428106 ```` diff --git a/docs/src/examples/boundary_mps/main.ipynb b/docs/src/examples/boundary_mps/main.ipynb index ad4d73acc..6b23bb78a 100644 --- a/docs/src/examples/boundary_mps/main.ipynb +++ b/docs/src/examples/boundary_mps/main.ipynb @@ -85,8 +85,11 @@ "contract can be interpreted as the infinite power of $T$, we can contract it by finding\n", "its leading eigenvector as a 1D MPS, which we call the boundary MPS.\n", "\n", - "In PEPSKit.jl, we can directly contruct the transfer operator corresponding to a PEPS norm\n", - "network from a given infinite PEPS as an `InfiniteTransferPEPS` object." + "In PEPSKit.jl, we can directly construct the transfer operator corresponding to a PEPS norm\n", + "network from a given infinite PEPS as an `InfiniteTransferPEPS` object.\n", + "Additionally, we need to specify which direction should be facing north (`dir=1`\n", + "corresponding to north, counting clockwise) and which row is selected from the north - but\n", + "since we have a trivial unit cell there is only one row:" ], "metadata": {} }, @@ -94,7 +97,9 @@ "outputs": [], "cell_type": "code", "source": [ - "T = InfiniteTransferPEPS(peps₀, 1, 1)" + "dir = 1 ## does not rotate the partition function\n", + "row = 1\n", + "T = InfiniteTransferPEPS(peps₀, dir, row)" ], "metadata": {}, "execution_count": null @@ -103,7 +108,7 @@ "cell_type": "markdown", "source": [ "Since we'll find the leading eigenvector of $T$ as a boundary MPS, we first need to\n", - "initialize an initial guess to supply to our algorithm. We can do this using the\n", + "construct an initial guess to supply to our algorithm. We can do this using the\n", "`initialize_mps` function, which constructs a random MPS with a specific virtual\n", "space for a given transfer operator. Here, we'll build an initial guess for the boundary MPS\n", "with a bond dimension of 20:" @@ -126,9 +131,7 @@ "spaces of the supplied transfer operator. Of course, one might come up with a better initial\n", "guess (leading to better convergence) depending on the application. To find the leading\n", "boundary MPS fixed point, we call `leading_boundary` using the\n", - "`MPSKit.VUMPS` algorithm from MPSKit. Note that, by default, `leading_boundary`\n", - "uses CTMRG where the settings are supplied as keyword arguments, so in the present case we\n", - "need to supply the VUMPS algorithm struct explicitly:" + "`MPSKit.VUMPS` algorithm from MPSKit:" ], "metadata": {} }, @@ -191,7 +194,8 @@ "by specifying a virtual space for each site in the partition function unit cell.\n", "\n", "First, we construct a PEPS with a $2 \\times 2$ unit cell using the `unitcell` keyword\n", - "argument and then define the corresponding transfer operator:" + "argument and then define the corresponding transfer operator, where we again specify the\n", + "direction which will be facing north:" ], "metadata": {} }, @@ -202,7 +206,7 @@ "peps₀_2x2 = InfinitePEPS(\n", " rand, ComplexF64, ComplexSpace(2), ComplexSpace(2); unitcell=(2, 2)\n", ")\n", - "T_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, 1);" + "T_2x2 = PEPSKit.MultilineTransferPEPS(peps₀_2x2, dir);" ], "metadata": {}, "execution_count": null @@ -333,11 +337,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.11.4" }, "kernelspec": { - "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "name": "julia-1.11", + "display_name": "Julia 1.11.4", "language": "julia" } }, diff --git a/docs/src/examples/fermi_hubbard/index.md b/docs/src/examples/fermi_hubbard/index.md index 31ea8674a..23f52e142 100644 --- a/docs/src/examples/fermi_hubbard/index.md +++ b/docs/src/examples/fermi_hubbard/index.md @@ -2,9 +2,9 @@ EditURL = "../../../../examples/fermi_hubbard/main.jl" ``` -[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//fermi_hubbard/main.ipynb) -[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//fermi_hubbard/main.ipynb) -[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//fermi_hubbard) +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/fermi_hubbard/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/fermi_hubbard/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/fermi_hubbard) # Fermi-Hubbard model with $f\mathbb{Z}_2 \boxtimes U(1)$ symmetry, at large $U$ and half-filling @@ -94,7 +94,7 @@ Second, we initialize a PEPS state and environment (which we converge) construct symmetric physical and virtual spaces: ````julia -physical_spaces = H.lattice +physical_spaces = physicalspace(H) virtual_spaces = fill(V_peps, size(lattice)...) peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); @@ -102,7 +102,7 @@ env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); ```` [ Info: CTMRG init: obj = +5.484842275412e+04 +4.469243203539e+04im err = 1.0000e+00 -[ Info: CTMRG conv 26: obj = +8.371681846538e+04 -3.791428753175e-07im err = 7.4963852327e-09 time = 8.54 sec +[ Info: CTMRG conv 26: obj = +8.371681846538e+04 -3.791428753175e-07im err = 7.4963852327e-09 time = 8.21 sec ```` @@ -123,92 +123,92 @@ peps, env, E, info = fixedpoint( ┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: │ α = 2.50e+01, dϕ = -1.49e-01, ϕ - ϕ₀ = -2.88e+00 └ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 1, time 955.42 s: f = 3.801394787694, ‖∇f‖ = 2.3457e+01, α = 2.50e+01, m = 0, nfg = 4 +[ Info: LBFGS: iter 1, time 835.44 s: f = 3.801394787694, ‖∇f‖ = 2.3457e+01, α = 2.50e+01, m = 0, nfg = 4 ┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.ProductSector{Tuple{TensorKitSectors.FermionParity, TensorKitSectors.U1Irrep}}, TensorKit.SortedVectorDict{TensorKitSectors.ProductSector{Tuple{TensorKitSectors.FermionParity, TensorKitSectors.U1Irrep}}, Int64}}, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.ProductSector{Tuple{TensorKitSectors.FermionParity, TensorKitSectors.U1Irrep}}, TensorKit.SortedVectorDict{TensorKitSectors.ProductSector{Tuple{TensorKitSectors.FermionParity, TensorKitSectors.U1Irrep}}, Int64}}, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 ┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: │ α = 2.50e+01, dϕ = -5.73e-03, ϕ - ϕ₀ = -3.81e+00 └ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 2, time 1011.68 s: f = -0.009753189324, ‖∇f‖ = 3.2047e+00, α = 2.50e+01, m = 0, nfg = 4 -[ Info: LBFGS: iter 3, time 1020.91 s: f = -0.115219717423, ‖∇f‖ = 2.7847e+00, α = 1.00e+00, m = 1, nfg = 1 -[ Info: LBFGS: iter 4, time 1029.61 s: f = -0.616462986123, ‖∇f‖ = 2.3685e+00, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 5, time 1037.43 s: f = -0.817865359874, ‖∇f‖ = 1.9095e+00, α = 1.00e+00, m = 3, nfg = 1 -[ Info: LBFGS: iter 6, time 1044.81 s: f = -0.990425015686, ‖∇f‖ = 2.3830e+00, α = 1.00e+00, m = 4, nfg = 1 -[ Info: LBFGS: iter 7, time 1051.68 s: f = -1.142986439459, ‖∇f‖ = 1.5684e+00, α = 1.00e+00, m = 5, nfg = 1 -[ Info: LBFGS: iter 8, time 1058.34 s: f = -1.239591181120, ‖∇f‖ = 3.4861e+00, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 9, time 1064.29 s: f = -1.438708542563, ‖∇f‖ = 1.3377e+00, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 10, time 1070.87 s: f = -1.524142766825, ‖∇f‖ = 1.3499e+00, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 11, time 1083.72 s: f = -1.620143211649, ‖∇f‖ = 1.1928e+00, α = 1.75e-01, m = 9, nfg = 2 -[ Info: LBFGS: iter 12, time 1096.24 s: f = -1.682030774949, ‖∇f‖ = 9.4585e-01, α = 2.41e-01, m = 10, nfg = 2 -[ Info: LBFGS: iter 13, time 1102.22 s: f = -1.722173660258, ‖∇f‖ = 1.3961e+00, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 14, time 1108.73 s: f = -1.771649839243, ‖∇f‖ = 6.2967e-01, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 15, time 1114.74 s: f = -1.809425620292, ‖∇f‖ = 5.1874e-01, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 16, time 1121.44 s: f = -1.860257660187, ‖∇f‖ = 7.0707e-01, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 17, time 1127.36 s: f = -1.894073433816, ‖∇f‖ = 6.7099e-01, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 18, time 1133.92 s: f = -1.923565778264, ‖∇f‖ = 5.6311e-01, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 19, time 1139.83 s: f = -1.948747056517, ‖∇f‖ = 4.7890e-01, α = 1.00e+00, m = 17, nfg = 1 -[ Info: LBFGS: iter 20, time 1146.40 s: f = -1.969585552903, ‖∇f‖ = 4.1660e-01, α = 1.00e+00, m = 18, nfg = 1 -[ Info: LBFGS: iter 21, time 1152.44 s: f = -1.982637358938, ‖∇f‖ = 4.3422e-01, α = 1.00e+00, m = 19, nfg = 1 -[ Info: LBFGS: iter 22, time 1159.01 s: f = -1.993882710416, ‖∇f‖ = 3.1362e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 23, time 1165.05 s: f = -2.002938619798, ‖∇f‖ = 3.0798e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 24, time 1171.70 s: f = -2.014146064233, ‖∇f‖ = 3.3262e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 25, time 1177.90 s: f = -2.022239330954, ‖∇f‖ = 4.2937e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 26, time 1184.55 s: f = -2.030245493641, ‖∇f‖ = 2.0179e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 27, time 1190.57 s: f = -2.035169726141, ‖∇f‖ = 1.6346e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 28, time 1198.05 s: f = -2.038915730445, ‖∇f‖ = 1.6570e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 29, time 1204.18 s: f = -2.041961016975, ‖∇f‖ = 2.2790e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 30, time 1210.81 s: f = -2.045467456219, ‖∇f‖ = 1.0966e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 31, time 1216.81 s: f = -2.047243458561, ‖∇f‖ = 9.2405e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 32, time 1223.40 s: f = -2.049202803483, ‖∇f‖ = 1.2184e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 33, time 1229.55 s: f = -2.050191917638, ‖∇f‖ = 1.3044e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 34, time 1236.28 s: f = -2.050986114708, ‖∇f‖ = 5.9665e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 35, time 1242.29 s: f = -2.051548091457, ‖∇f‖ = 5.5253e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 36, time 1248.94 s: f = -2.051993308206, ‖∇f‖ = 6.2588e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 37, time 1254.93 s: f = -2.052324002624, ‖∇f‖ = 1.1928e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 38, time 1261.55 s: f = -2.052936230102, ‖∇f‖ = 4.9216e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 39, time 1267.62 s: f = -2.053164325823, ‖∇f‖ = 3.3410e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 40, time 1274.63 s: f = -2.053418129203, ‖∇f‖ = 3.7314e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 41, time 1281.04 s: f = -2.053649981748, ‖∇f‖ = 6.3612e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 42, time 1288.03 s: f = -2.053879953203, ‖∇f‖ = 3.4038e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 43, time 1294.19 s: f = -2.054050515673, ‖∇f‖ = 2.9152e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 44, time 1300.90 s: f = -2.054259903099, ‖∇f‖ = 3.9095e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 45, time 1307.08 s: f = -2.054388805929, ‖∇f‖ = 6.7475e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 46, time 1313.89 s: f = -2.054563154978, ‖∇f‖ = 3.0486e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 47, time 1320.10 s: f = -2.054666133101, ‖∇f‖ = 2.3929e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 48, time 1327.11 s: f = -2.054764670097, ‖∇f‖ = 2.9961e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 49, time 1333.39 s: f = -2.054936790198, ‖∇f‖ = 3.5407e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 50, time 1345.97 s: f = -2.055058405443, ‖∇f‖ = 5.1106e-02, α = 5.17e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 51, time 1352.51 s: f = -2.055253894176, ‖∇f‖ = 3.1080e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 52, time 1358.46 s: f = -2.055461219872, ‖∇f‖ = 2.9077e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 53, time 1365.09 s: f = -2.055733194309, ‖∇f‖ = 4.5784e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 54, time 1371.09 s: f = -2.055960164237, ‖∇f‖ = 7.1631e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 55, time 1377.71 s: f = -2.056334000687, ‖∇f‖ = 5.1447e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 56, time 1383.71 s: f = -2.056801416149, ‖∇f‖ = 4.8803e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 57, time 1390.38 s: f = -2.057222872354, ‖∇f‖ = 5.7077e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 58, time 1396.39 s: f = -2.057705132019, ‖∇f‖ = 8.5536e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 59, time 1403.02 s: f = -2.058233824137, ‖∇f‖ = 6.6099e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 60, time 1409.04 s: f = -2.058618411767, ‖∇f‖ = 8.2058e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 61, time 1415.83 s: f = -2.058860905381, ‖∇f‖ = 8.8034e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 62, time 1421.91 s: f = -2.059344181668, ‖∇f‖ = 6.7163e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 63, time 1428.66 s: f = -2.059884025175, ‖∇f‖ = 1.1005e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 64, time 1434.76 s: f = -2.060366638147, ‖∇f‖ = 7.3906e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 65, time 1441.44 s: f = -2.060748895891, ‖∇f‖ = 5.7350e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 66, time 1447.53 s: f = -2.061217694695, ‖∇f‖ = 1.0218e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 67, time 1454.24 s: f = -2.061747836243, ‖∇f‖ = 6.5473e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 68, time 1460.31 s: f = -2.061935488163, ‖∇f‖ = 7.7435e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 69, time 1467.07 s: f = -2.062292588164, ‖∇f‖ = 1.1031e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 70, time 1473.20 s: f = -2.062776748901, ‖∇f‖ = 8.7133e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 71, time 1479.94 s: f = -2.063311285039, ‖∇f‖ = 6.3871e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 72, time 1486.01 s: f = -2.063848732928, ‖∇f‖ = 7.8582e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 73, time 1492.69 s: f = -2.064428066762, ‖∇f‖ = 8.0994e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 74, time 1498.82 s: f = -2.064797991263, ‖∇f‖ = 2.1328e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 75, time 1505.51 s: f = -2.065223995463, ‖∇f‖ = 1.0827e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 76, time 1511.60 s: f = -2.065622191643, ‖∇f‖ = 7.4192e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 77, time 1518.32 s: f = -2.066318151347, ‖∇f‖ = 9.4270e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 78, time 1532.05 s: f = -2.067468309902, ‖∇f‖ = 1.5613e-01, α = 4.14e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 79, time 1546.45 s: f = -2.068248367388, ‖∇f‖ = 1.9031e-01, α = 2.81e-01, m = 20, nfg = 2 -┌ Warning: LBFGS: not converged to requested tol after 80 iterations and time 1558.17 s: f = -2.069293119751, ‖∇f‖ = 3.6413e-01 +[ Info: LBFGS: iter 2, time 890.92 s: f = -0.009753189324, ‖∇f‖ = 3.2047e+00, α = 2.50e+01, m = 0, nfg = 4 +[ Info: LBFGS: iter 3, time 900.05 s: f = -0.115219717423, ‖∇f‖ = 2.7847e+00, α = 1.00e+00, m = 1, nfg = 1 +[ Info: LBFGS: iter 4, time 908.73 s: f = -0.616462986123, ‖∇f‖ = 2.3685e+00, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 5, time 916.72 s: f = -0.817865359874, ‖∇f‖ = 1.9095e+00, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 6, time 924.48 s: f = -0.990425015686, ‖∇f‖ = 2.3830e+00, α = 1.00e+00, m = 4, nfg = 1 +[ Info: LBFGS: iter 7, time 931.58 s: f = -1.142986439459, ‖∇f‖ = 1.5684e+00, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 8, time 938.01 s: f = -1.239591181120, ‖∇f‖ = 3.4861e+00, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 9, time 945.00 s: f = -1.438708542563, ‖∇f‖ = 1.3377e+00, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 10, time 951.30 s: f = -1.524142766825, ‖∇f‖ = 1.3499e+00, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 11, time 965.03 s: f = -1.620143211649, ‖∇f‖ = 1.1928e+00, α = 1.75e-01, m = 9, nfg = 2 +[ Info: LBFGS: iter 12, time 978.38 s: f = -1.682030774949, ‖∇f‖ = 9.4585e-01, α = 2.41e-01, m = 10, nfg = 2 +[ Info: LBFGS: iter 13, time 984.74 s: f = -1.722173660258, ‖∇f‖ = 1.3961e+00, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 14, time 991.74 s: f = -1.771649839243, ‖∇f‖ = 6.2967e-01, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 15, time 998.01 s: f = -1.809425620292, ‖∇f‖ = 5.1874e-01, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 16, time 1004.35 s: f = -1.860257660187, ‖∇f‖ = 7.0707e-01, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 17, time 1011.32 s: f = -1.894073433816, ‖∇f‖ = 6.7099e-01, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 18, time 1017.63 s: f = -1.923565778264, ‖∇f‖ = 5.6311e-01, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 19, time 1024.66 s: f = -1.948747056517, ‖∇f‖ = 4.7890e-01, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 20, time 1030.99 s: f = -1.969585552903, ‖∇f‖ = 4.1660e-01, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 21, time 1037.41 s: f = -1.982637358938, ‖∇f‖ = 4.3422e-01, α = 1.00e+00, m = 19, nfg = 1 +[ Info: LBFGS: iter 22, time 1044.48 s: f = -1.993882710416, ‖∇f‖ = 3.1362e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 23, time 1050.89 s: f = -2.002938619798, ‖∇f‖ = 3.0798e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 24, time 1057.30 s: f = -2.014146064233, ‖∇f‖ = 3.3262e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 25, time 1064.50 s: f = -2.022239330954, ‖∇f‖ = 4.2937e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 26, time 1070.92 s: f = -2.030245493641, ‖∇f‖ = 2.0179e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 27, time 1078.05 s: f = -2.035169726141, ‖∇f‖ = 1.6346e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 28, time 1085.19 s: f = -2.038915730445, ‖∇f‖ = 1.6570e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 29, time 1091.75 s: f = -2.041961016975, ‖∇f‖ = 2.2790e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 30, time 1098.99 s: f = -2.045467456219, ‖∇f‖ = 1.0966e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 31, time 1105.48 s: f = -2.047243458561, ‖∇f‖ = 9.2405e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 32, time 1112.69 s: f = -2.049202803483, ‖∇f‖ = 1.2184e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 33, time 1119.08 s: f = -2.050191917638, ‖∇f‖ = 1.3044e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 34, time 1125.47 s: f = -2.050986114708, ‖∇f‖ = 5.9665e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 35, time 1132.64 s: f = -2.051548091457, ‖∇f‖ = 5.5253e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 36, time 1139.10 s: f = -2.051993308206, ‖∇f‖ = 6.2588e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 37, time 1146.24 s: f = -2.052324002624, ‖∇f‖ = 1.1928e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 38, time 1152.87 s: f = -2.052936230102, ‖∇f‖ = 4.9216e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 39, time 1159.10 s: f = -2.053164325823, ‖∇f‖ = 3.3410e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 40, time 1166.05 s: f = -2.053418129203, ‖∇f‖ = 3.7314e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 41, time 1172.35 s: f = -2.053649981748, ‖∇f‖ = 6.3612e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 42, time 1178.56 s: f = -2.053879953203, ‖∇f‖ = 3.4038e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 43, time 1185.49 s: f = -2.054050515673, ‖∇f‖ = 2.9152e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 44, time 1191.74 s: f = -2.054259903099, ‖∇f‖ = 3.9095e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 45, time 1198.69 s: f = -2.054388805929, ‖∇f‖ = 6.7475e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 46, time 1204.88 s: f = -2.054563154978, ‖∇f‖ = 3.0486e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 47, time 1211.31 s: f = -2.054666133101, ‖∇f‖ = 2.3929e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 48, time 1218.31 s: f = -2.054764670097, ‖∇f‖ = 2.9961e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 49, time 1224.59 s: f = -2.054936790198, ‖∇f‖ = 3.5407e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 50, time 1237.87 s: f = -2.055058405443, ‖∇f‖ = 5.1106e-02, α = 5.17e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 51, time 1244.16 s: f = -2.055253894176, ‖∇f‖ = 3.1080e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 52, time 1251.20 s: f = -2.055461219872, ‖∇f‖ = 2.9077e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 53, time 1257.57 s: f = -2.055733194309, ‖∇f‖ = 4.5784e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 54, time 1264.73 s: f = -2.055960164237, ‖∇f‖ = 7.1631e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 55, time 1271.03 s: f = -2.056334000687, ‖∇f‖ = 5.1447e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 56, time 1277.42 s: f = -2.056801416149, ‖∇f‖ = 4.8803e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 57, time 1284.42 s: f = -2.057222872354, ‖∇f‖ = 5.7077e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 58, time 1290.71 s: f = -2.057705132019, ‖∇f‖ = 8.5536e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 59, time 1297.71 s: f = -2.058233824137, ‖∇f‖ = 6.6099e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 60, time 1304.05 s: f = -2.058618411767, ‖∇f‖ = 8.2058e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 61, time 1310.35 s: f = -2.058860905381, ‖∇f‖ = 8.8034e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 62, time 1317.34 s: f = -2.059344181668, ‖∇f‖ = 6.7163e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 63, time 1323.93 s: f = -2.059884025175, ‖∇f‖ = 1.1005e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 64, time 1330.95 s: f = -2.060366638147, ‖∇f‖ = 7.3906e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 65, time 1337.42 s: f = -2.060748895891, ‖∇f‖ = 5.7350e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 66, time 1343.90 s: f = -2.061217694695, ‖∇f‖ = 1.0218e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 67, time 1351.08 s: f = -2.061747836243, ‖∇f‖ = 6.5473e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 68, time 1357.59 s: f = -2.061935488163, ‖∇f‖ = 7.7435e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 69, time 1364.81 s: f = -2.062292588164, ‖∇f‖ = 1.1031e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 70, time 1371.28 s: f = -2.062776748901, ‖∇f‖ = 8.7133e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 71, time 1377.76 s: f = -2.063311285039, ‖∇f‖ = 6.3871e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 72, time 1384.96 s: f = -2.063848732928, ‖∇f‖ = 7.8582e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 73, time 1391.44 s: f = -2.064428066762, ‖∇f‖ = 8.0994e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 74, time 1398.73 s: f = -2.064797991263, ‖∇f‖ = 2.1328e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 75, time 1405.20 s: f = -2.065223995463, ‖∇f‖ = 1.0827e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 76, time 1411.72 s: f = -2.065622191643, ‖∇f‖ = 7.4192e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 77, time 1418.93 s: f = -2.066318151347, ‖∇f‖ = 9.4270e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 78, time 1433.31 s: f = -2.067468309902, ‖∇f‖ = 1.5613e-01, α = 4.14e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 79, time 1448.12 s: f = -2.068248367388, ‖∇f‖ = 1.9031e-01, α = 2.81e-01, m = 20, nfg = 2 +┌ Warning: LBFGS: not converged to requested tol after 80 iterations and time 1461.23 s: f = -2.069293119751, ‖∇f‖ = 3.6413e-01 └ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/lbfgs.jl:197 E = -2.0692931197508764 diff --git a/docs/src/examples/fermi_hubbard/main.ipynb b/docs/src/examples/fermi_hubbard/main.ipynb index 287b949c3..08d7a510f 100644 --- a/docs/src/examples/fermi_hubbard/main.ipynb +++ b/docs/src/examples/fermi_hubbard/main.ipynb @@ -146,7 +146,7 @@ "outputs": [], "cell_type": "code", "source": [ - "physical_spaces = H.lattice\n", + "physical_spaces = physicalspace(H)\n", "virtual_spaces = fill(V_peps, size(lattice)...)\n", "peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces)\n", "env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...);" diff --git a/docs/src/examples/heisenberg/index.md b/docs/src/examples/heisenberg/index.md index c4456d48c..62d19f236 100644 --- a/docs/src/examples/heisenberg/index.md +++ b/docs/src/examples/heisenberg/index.md @@ -2,9 +2,9 @@ EditURL = "../../../../examples/heisenberg/main.jl" ``` -[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//heisenberg/main.ipynb) -[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//heisenberg/main.ipynb) -[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//heisenberg) +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/heisenberg/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/heisenberg/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/heisenberg) # [Optimizing the 2D Heisenberg model](@id examples_heisenberg) @@ -13,10 +13,10 @@ In this example we want to provide a basic rundown of PEPSKit's optimization wor PEPS. To that end, we will consider the two-dimensional Heisenberg model on a square lattice ```math -H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j +H = \sum_{\langle i,j \rangle} \left ( J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j \right ) ``` -Here, we want to set $J_x=J_y=J_z=1$ where the Heisenberg model is in the antiferromagnetic +Here, we want to set $J_x = J_y = J_z = 1$ where the Heisenberg model is in the antiferromagnetic regime. Due to the bipartite sublattice structure of antiferromagnetic order one needs a PEPS ansatz with a $2 \times 2$ unit cell. This can be circumvented by performing a unitary sublattice rotation on all B-sites resulting in a change of parameters to @@ -182,12 +182,14 @@ env₀, info_ctmrg = leading_boundary(env_random, peps₀; boundary_alg...); ```` [ Info: CTMRG init: obj = -2.749614463601e+00 +3.639628057806e+00im err = 1.0000e+00 -[ Info: CTMRG conv 27: obj = +9.727103564786e+00 err = 2.6201184615e-11 time = 0.18 sec +[ Info: CTMRG conv 27: obj = +9.727103564786e+00 err = 2.6201184615e-11 time = 0.17 sec ```` Besides the converged environment, `leading_boundary` also returns a `NamedTuple` of -informational quantities such as the last (maximal) SVD truncation error: +informational quantities such as the last maximal truncation error - that is, the SVD +approximation error incurred in the last CTMRG iteration, maximized over all spatial +directions and unit cell entries: ````julia @show info_ctmrg.truncation_error; @@ -215,93 +217,93 @@ peps, env, E, info_opt = fixedpoint( ┌ Warning: The function `scale!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Float64}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:91 -[ Info: LBFGS: iter 1, time 643.76 s: f = -0.489783740840, ‖∇f‖ = 6.0020e-01, α = 5.94e+01, m = 0, nfg = 5 +[ Info: LBFGS: iter 1, time 643.37 s: f = -0.489783740840, ‖∇f‖ = 6.0020e-01, α = 5.94e+01, m = 0, nfg = 5 ┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 -[ Info: LBFGS: iter 2, time 645.35 s: f = -0.501971411096, ‖∇f‖ = 5.3738e-01, α = 2.80e-01, m = 1, nfg = 2 -[ Info: LBFGS: iter 3, time 645.66 s: f = -0.523152816264, ‖∇f‖ = 3.9922e-01, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 4, time 646.32 s: f = -0.538652145758, ‖∇f‖ = 4.1551e-01, α = 2.29e-01, m = 3, nfg = 2 -[ Info: LBFGS: iter 5, time 648.06 s: f = -0.549861364689, ‖∇f‖ = 4.4015e-01, α = 6.94e-02, m = 4, nfg = 4 -[ Info: LBFGS: iter 6, time 648.85 s: f = -0.568951023367, ‖∇f‖ = 4.8339e-01, α = 2.24e-01, m = 5, nfg = 2 -[ Info: LBFGS: iter 7, time 649.62 s: f = -0.586980871663, ‖∇f‖ = 4.2463e-01, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 8, time 649.99 s: f = -0.599970185661, ‖∇f‖ = 2.1955e-01, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 9, time 650.27 s: f = -0.606725496115, ‖∇f‖ = 1.9384e-01, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 10, time 650.51 s: f = -0.624986498009, ‖∇f‖ = 2.9776e-01, α = 1.00e+00, m = 9, nfg = 1 -[ Info: LBFGS: iter 11, time 650.76 s: f = -0.638747320059, ‖∇f‖ = 2.3382e-01, α = 1.00e+00, m = 10, nfg = 1 -[ Info: LBFGS: iter 12, time 651.01 s: f = -0.645577148853, ‖∇f‖ = 2.9937e-01, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 13, time 651.24 s: f = -0.650891062410, ‖∇f‖ = 1.4746e-01, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 14, time 651.49 s: f = -0.654569099868, ‖∇f‖ = 7.0690e-02, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 15, time 651.74 s: f = -0.655949603239, ‖∇f‖ = 5.0977e-02, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 16, time 651.99 s: f = -0.657146001976, ‖∇f‖ = 5.8056e-02, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 17, time 652.25 s: f = -0.658558478454, ‖∇f‖ = 5.0388e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 18, time 652.49 s: f = -0.659302065828, ‖∇f‖ = 4.0776e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 19, time 652.73 s: f = -0.659633838354, ‖∇f‖ = 2.2380e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 20, time 652.96 s: f = -0.659776177694, ‖∇f‖ = 2.1511e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 21, time 653.20 s: f = -0.659916031911, ‖∇f‖ = 2.0498e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 22, time 653.45 s: f = -0.660181523751, ‖∇f‖ = 1.7235e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 23, time 653.70 s: f = -0.660350536401, ‖∇f‖ = 1.8928e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 24, time 653.94 s: f = -0.660447076769, ‖∇f‖ = 1.0330e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 25, time 654.19 s: f = -0.660521574522, ‖∇f‖ = 1.0448e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 26, time 654.44 s: f = -0.660656071716, ‖∇f‖ = 1.8768e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 27, time 654.71 s: f = -0.660756412995, ‖∇f‖ = 3.2183e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 28, time 654.98 s: f = -0.660925447420, ‖∇f‖ = 1.3371e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 29, time 655.37 s: f = -0.661000634324, ‖∇f‖ = 9.8866e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 30, time 656.06 s: f = -0.661046316490, ‖∇f‖ = 9.1513e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 31, time 656.41 s: f = -0.661128304094, ‖∇f‖ = 9.6895e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 32, time 656.71 s: f = -0.661169144566, ‖∇f‖ = 1.3492e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 33, time 656.98 s: f = -0.661204525845, ‖∇f‖ = 9.6996e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 34, time 657.23 s: f = -0.661224003573, ‖∇f‖ = 6.2892e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 35, time 657.50 s: f = -0.661247137140, ‖∇f‖ = 4.4514e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 36, time 657.76 s: f = -0.661266456453, ‖∇f‖ = 5.3015e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 37, time 658.02 s: f = -0.661280686254, ‖∇f‖ = 9.2298e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 38, time 658.28 s: f = -0.661298851672, ‖∇f‖ = 5.9013e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 39, time 658.54 s: f = -0.661320547122, ‖∇f‖ = 6.2443e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 40, time 658.80 s: f = -0.661344887326, ‖∇f‖ = 9.9129e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 41, time 659.07 s: f = -0.661398950542, ‖∇f‖ = 1.6285e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 42, time 659.35 s: f = -0.661483277766, ‖∇f‖ = 1.6233e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 43, time 659.63 s: f = -0.661583013010, ‖∇f‖ = 2.8186e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 44, time 659.92 s: f = -0.661670888522, ‖∇f‖ = 3.9725e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 45, time 660.20 s: f = -0.661865434012, ‖∇f‖ = 1.3200e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 46, time 660.47 s: f = -0.661977354471, ‖∇f‖ = 1.5881e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 47, time 660.75 s: f = -0.662102076782, ‖∇f‖ = 2.0290e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 48, time 661.31 s: f = -0.662190125548, ‖∇f‖ = 2.2873e-02, α = 4.61e-01, m = 16, nfg = 2 -[ Info: LBFGS: iter 49, time 661.60 s: f = -0.662306892721, ‖∇f‖ = 1.3813e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 50, time 661.88 s: f = -0.662376465537, ‖∇f‖ = 1.9902e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 51, time 662.63 s: f = -0.662419493776, ‖∇f‖ = 1.2249e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 52, time 662.96 s: f = -0.662439251412, ‖∇f‖ = 7.3806e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 53, time 663.31 s: f = -0.662463629284, ‖∇f‖ = 5.1806e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 54, time 663.57 s: f = -0.662484473404, ‖∇f‖ = 4.6461e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 55, time 664.09 s: f = -0.662490501784, ‖∇f‖ = 6.3694e-03, α = 4.07e-01, m = 16, nfg = 2 -[ Info: LBFGS: iter 56, time 664.36 s: f = -0.662497687998, ‖∇f‖ = 2.9285e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 57, time 664.63 s: f = -0.662500949854, ‖∇f‖ = 2.1234e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 58, time 664.91 s: f = -0.662503723196, ‖∇f‖ = 4.1203e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 59, time 665.17 s: f = -0.662505780051, ‖∇f‖ = 3.0872e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 60, time 665.43 s: f = -0.662507116565, ‖∇f‖ = 1.9618e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 61, time 665.69 s: f = -0.662509290310, ‖∇f‖ = 1.5747e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 62, time 665.96 s: f = -0.662510568937, ‖∇f‖ = 1.3099e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 63, time 666.22 s: f = -0.662511109974, ‖∇f‖ = 2.7217e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 64, time 666.49 s: f = -0.662511878793, ‖∇f‖ = 1.0320e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 65, time 666.76 s: f = -0.662512042147, ‖∇f‖ = 5.9753e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 66, time 667.01 s: f = -0.662512275118, ‖∇f‖ = 6.6602e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 67, time 667.27 s: f = -0.662512678161, ‖∇f‖ = 9.0498e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 68, time 667.53 s: f = -0.662513114911, ‖∇f‖ = 1.8006e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 69, time 667.80 s: f = -0.662513454844, ‖∇f‖ = 9.5988e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 70, time 668.05 s: f = -0.662513639773, ‖∇f‖ = 5.2576e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 71, time 668.31 s: f = -0.662513713403, ‖∇f‖ = 4.0696e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 72, time 668.56 s: f = -0.662513818843, ‖∇f‖ = 4.8084e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 73, time 668.83 s: f = -0.662513978848, ‖∇f‖ = 6.8463e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 74, time 669.87 s: f = -0.662514066816, ‖∇f‖ = 5.2125e-04, α = 5.38e-01, m = 16, nfg = 2 -[ Info: LBFGS: iter 75, time 670.22 s: f = -0.662514122809, ‖∇f‖ = 3.2924e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 76, time 670.45 s: f = -0.662514184291, ‖∇f‖ = 2.7038e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 77, time 670.70 s: f = -0.662514214654, ‖∇f‖ = 4.6682e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 78, time 670.96 s: f = -0.662514242510, ‖∇f‖ = 2.7698e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 79, time 671.20 s: f = -0.662514253309, ‖∇f‖ = 1.6244e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 80, time 671.44 s: f = -0.662514263613, ‖∇f‖ = 1.2004e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 81, time 671.68 s: f = -0.662514271751, ‖∇f‖ = 1.4760e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 82, time 671.93 s: f = -0.662514281056, ‖∇f‖ = 1.6558e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 83, time 672.18 s: f = -0.662514283704, ‖∇f‖ = 2.1824e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: converged after 84 iterations and time 672.43 s: f = -0.662514288424, ‖∇f‖ = 5.9513e-05 +[ Info: LBFGS: iter 2, time 645.02 s: f = -0.501971411096, ‖∇f‖ = 5.3738e-01, α = 2.80e-01, m = 1, nfg = 2 +[ Info: LBFGS: iter 3, time 645.36 s: f = -0.523152816264, ‖∇f‖ = 3.9922e-01, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 4, time 646.10 s: f = -0.538652145758, ‖∇f‖ = 4.1551e-01, α = 2.29e-01, m = 3, nfg = 2 +[ Info: LBFGS: iter 5, time 648.50 s: f = -0.549861364689, ‖∇f‖ = 4.4015e-01, α = 6.94e-02, m = 4, nfg = 4 +[ Info: LBFGS: iter 6, time 649.35 s: f = -0.568951023367, ‖∇f‖ = 4.8339e-01, α = 2.24e-01, m = 5, nfg = 2 +[ Info: LBFGS: iter 7, time 649.72 s: f = -0.586980871663, ‖∇f‖ = 4.2463e-01, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 8, time 650.06 s: f = -0.599970185661, ‖∇f‖ = 2.1955e-01, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 9, time 650.38 s: f = -0.606725496115, ‖∇f‖ = 1.9384e-01, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 10, time 650.70 s: f = -0.624986498009, ‖∇f‖ = 2.9776e-01, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 11, time 651.00 s: f = -0.638747320059, ‖∇f‖ = 2.3382e-01, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 12, time 651.32 s: f = -0.645577148853, ‖∇f‖ = 2.9937e-01, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 13, time 651.60 s: f = -0.650891062410, ‖∇f‖ = 1.4746e-01, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 14, time 651.90 s: f = -0.654569099868, ‖∇f‖ = 7.0690e-02, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 15, time 652.20 s: f = -0.655949603239, ‖∇f‖ = 5.0977e-02, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 16, time 652.51 s: f = -0.657146001976, ‖∇f‖ = 5.8056e-02, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 17, time 652.83 s: f = -0.658558478454, ‖∇f‖ = 5.0388e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 18, time 653.13 s: f = -0.659302065828, ‖∇f‖ = 4.0776e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 19, time 653.42 s: f = -0.659633838354, ‖∇f‖ = 2.2380e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 20, time 653.72 s: f = -0.659776177694, ‖∇f‖ = 2.1511e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 21, time 654.01 s: f = -0.659916031911, ‖∇f‖ = 2.0498e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 22, time 654.30 s: f = -0.660181523751, ‖∇f‖ = 1.7235e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 23, time 654.62 s: f = -0.660350536401, ‖∇f‖ = 1.8928e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 24, time 654.91 s: f = -0.660447076769, ‖∇f‖ = 1.0330e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 25, time 655.21 s: f = -0.660521574522, ‖∇f‖ = 1.0448e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 26, time 655.52 s: f = -0.660656071716, ‖∇f‖ = 1.8768e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 27, time 655.85 s: f = -0.660756412995, ‖∇f‖ = 3.2183e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 28, time 656.18 s: f = -0.660925447420, ‖∇f‖ = 1.3371e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 29, time 656.60 s: f = -0.661000634324, ‖∇f‖ = 9.8866e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 30, time 657.36 s: f = -0.661046316490, ‖∇f‖ = 9.1513e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 31, time 657.70 s: f = -0.661128304094, ‖∇f‖ = 9.6895e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 32, time 658.08 s: f = -0.661169144566, ‖∇f‖ = 1.3492e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 33, time 658.37 s: f = -0.661204525845, ‖∇f‖ = 9.6996e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 34, time 658.65 s: f = -0.661224003573, ‖∇f‖ = 6.2892e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 35, time 658.94 s: f = -0.661247137140, ‖∇f‖ = 4.4514e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 36, time 659.24 s: f = -0.661266456453, ‖∇f‖ = 5.3015e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 37, time 659.53 s: f = -0.661280686254, ‖∇f‖ = 9.2298e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 38, time 659.83 s: f = -0.661298851672, ‖∇f‖ = 5.9013e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 39, time 660.12 s: f = -0.661320547122, ‖∇f‖ = 6.2443e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 40, time 660.41 s: f = -0.661344887326, ‖∇f‖ = 9.9129e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 41, time 660.71 s: f = -0.661398950542, ‖∇f‖ = 1.6285e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 42, time 661.03 s: f = -0.661483277766, ‖∇f‖ = 1.6233e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 43, time 661.34 s: f = -0.661583013010, ‖∇f‖ = 2.8186e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 44, time 661.66 s: f = -0.661670888522, ‖∇f‖ = 3.9725e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 45, time 661.98 s: f = -0.661865434012, ‖∇f‖ = 1.3200e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 46, time 662.29 s: f = -0.661977354471, ‖∇f‖ = 1.5881e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 47, time 662.60 s: f = -0.662102076782, ‖∇f‖ = 2.0290e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 48, time 663.24 s: f = -0.662190125548, ‖∇f‖ = 2.2873e-02, α = 4.61e-01, m = 16, nfg = 2 +[ Info: LBFGS: iter 49, time 663.55 s: f = -0.662306892721, ‖∇f‖ = 1.3813e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 50, time 663.87 s: f = -0.662376465537, ‖∇f‖ = 1.9902e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 51, time 664.17 s: f = -0.662419493776, ‖∇f‖ = 1.2249e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 52, time 664.48 s: f = -0.662439251412, ‖∇f‖ = 7.3806e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 53, time 664.79 s: f = -0.662463629284, ‖∇f‖ = 5.1806e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 54, time 665.10 s: f = -0.662484473404, ‖∇f‖ = 4.6461e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 55, time 665.71 s: f = -0.662490501784, ‖∇f‖ = 6.3694e-03, α = 4.07e-01, m = 16, nfg = 2 +[ Info: LBFGS: iter 56, time 666.01 s: f = -0.662497687998, ‖∇f‖ = 2.9285e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 57, time 666.32 s: f = -0.662500949854, ‖∇f‖ = 2.1234e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 58, time 666.62 s: f = -0.662503723196, ‖∇f‖ = 4.1203e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 59, time 666.93 s: f = -0.662505780051, ‖∇f‖ = 3.0872e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 60, time 667.22 s: f = -0.662507116565, ‖∇f‖ = 1.9618e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 61, time 667.52 s: f = -0.662509290310, ‖∇f‖ = 1.5747e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 62, time 667.82 s: f = -0.662510568937, ‖∇f‖ = 1.3099e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 63, time 668.65 s: f = -0.662511109974, ‖∇f‖ = 2.7217e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 64, time 668.96 s: f = -0.662511878793, ‖∇f‖ = 1.0320e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 65, time 669.34 s: f = -0.662512042147, ‖∇f‖ = 5.9753e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 66, time 669.65 s: f = -0.662512275118, ‖∇f‖ = 6.6602e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 67, time 669.93 s: f = -0.662512678161, ‖∇f‖ = 9.0498e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 68, time 670.21 s: f = -0.662513114911, ‖∇f‖ = 1.8006e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 69, time 670.51 s: f = -0.662513454844, ‖∇f‖ = 9.5988e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 70, time 670.80 s: f = -0.662513639773, ‖∇f‖ = 5.2576e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 71, time 671.09 s: f = -0.662513713403, ‖∇f‖ = 4.0696e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 72, time 671.39 s: f = -0.662513818843, ‖∇f‖ = 4.8084e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 73, time 671.70 s: f = -0.662513978848, ‖∇f‖ = 6.8463e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 74, time 672.29 s: f = -0.662514066816, ‖∇f‖ = 5.2125e-04, α = 5.38e-01, m = 16, nfg = 2 +[ Info: LBFGS: iter 75, time 672.57 s: f = -0.662514122809, ‖∇f‖ = 3.2924e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 76, time 672.86 s: f = -0.662514184291, ‖∇f‖ = 2.7038e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 77, time 673.17 s: f = -0.662514214654, ‖∇f‖ = 4.6682e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 78, time 673.46 s: f = -0.662514242510, ‖∇f‖ = 2.7698e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 79, time 673.74 s: f = -0.662514253309, ‖∇f‖ = 1.6244e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 80, time 674.02 s: f = -0.662514263613, ‖∇f‖ = 1.2004e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 81, time 674.30 s: f = -0.662514271751, ‖∇f‖ = 1.4760e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 82, time 674.58 s: f = -0.662514281056, ‖∇f‖ = 1.6558e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 83, time 674.87 s: f = -0.662514283704, ‖∇f‖ = 2.1824e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: converged after 84 iterations and time 675.15 s: f = -0.662514288424, ‖∇f‖ = 5.9513e-05 ```` diff --git a/docs/src/examples/heisenberg/main.ipynb b/docs/src/examples/heisenberg/main.ipynb index 5c50a5495..4e0c08458 100644 --- a/docs/src/examples/heisenberg/main.ipynb +++ b/docs/src/examples/heisenberg/main.ipynb @@ -18,10 +18,10 @@ "PEPS. To that end, we will consider the two-dimensional Heisenberg model on a square lattice\n", "\n", "$$\n", - "H = \\sum_{\\langle i,j \\rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j\n", + "H = \\sum_{\\langle i,j \\rangle} \\left ( J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j \\right )\n", "$$\n", "\n", - "Here, we want to set $J_x=J_y=J_z=1$ where the Heisenberg model is in the antiferromagnetic\n", + "Here, we want to set $J_x = J_y = J_z = 1$ where the Heisenberg model is in the antiferromagnetic\n", "regime. Due to the bipartite sublattice structure of antiferromagnetic order one needs a\n", "PEPS ansatz with a $2 \\times 2$ unit cell. This can be circumvented by performing a unitary\n", "sublattice rotation on all B-sites resulting in a change of parameters to\n", @@ -204,7 +204,9 @@ "cell_type": "markdown", "source": [ "Besides the converged environment, `leading_boundary` also returns a `NamedTuple` of\n", - "informational quantities such as the last (maximal) SVD truncation error:" + "informational quantities such as the last maximal truncation error - that is, the SVD\n", + "approximation error incurred in the last CTMRG iteration, maximized over all spatial\n", + "directions and unit cell entries:" ], "metadata": {} }, diff --git a/docs/src/examples/heisenberg_su/index.md b/docs/src/examples/heisenberg_su/index.md index 7d5ca74aa..935439790 100644 --- a/docs/src/examples/heisenberg_su/index.md +++ b/docs/src/examples/heisenberg_su/index.md @@ -2,23 +2,23 @@ EditURL = "../../../../examples/heisenberg_su/main.jl" ``` -[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//heisenberg_su/main.ipynb) -[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//heisenberg_su/main.ipynb) -[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//heisenberg_su) +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/heisenberg_su/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/heisenberg_su/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/heisenberg_su) # Simple update for the Heisenberg model -In this next example, we will use [`SimpleUpdate`](@ref) imaginary time evolution to treat +In this example, we will use [`SimpleUpdate`](@ref) imaginary time evolution to treat the two-dimensional Heisenberg model once again: ```math H = \sum_{\langle i,j \rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j. ``` -In the previous examples, we used a sublattice rotation to simulate antiferromagnetic -Hamiltonian on a single-site unit cell. Here, we will instead use a $2 \times 2$ unit cell -and set $J_x=J_y=J_z=1$. +In order to simulate the antiferromagnetic order of the Hamiltonian on a single-site unit +cell one typically applies a unitary sublattice rotation. Here, we will instead use a +$2 \times 2$ unit cell and set $J_x = J_y = J_z = 1$. Let's get started by seeding the RNG and importing all required modules: @@ -46,9 +46,8 @@ H = real(heisenberg_XYZ(ComplexF64, symm, InfiniteSquare(Nr, Nc); Jx=1, Jy=1, Jz ## Simple updating -We proceed by initializing a random weighted PEPS that will be evolved. Again, we'll -normalize its vertex tensors. First though, we need to take of defining the appropriate -(symmetric) spaces: +We proceed by initializing a random weighted PEPS that will be evolved. First though, we +need to define the appropriate (symmetric) spaces: ````julia Dbond = 4 @@ -65,10 +64,7 @@ else error("not implemented") end -wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, bond_space; unitcell=(Nr, Nc)) -for ind in CartesianIndices(wpeps.vertices) - wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf) -end +wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, bond_space; unitcell=(Nr, Nc)); ```` Next, we can start the `SimpleUpdate` routine, successively decreasing the time intervals @@ -91,11 +87,11 @@ end ```` [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 1 : dt = 1e-02, weight diff = 1.683e+00, time = 10.318 sec +[ Info: SU iter 1 : dt = 1e-02, weight diff = 1.683e+00, time = 10.602 sec [ Info: Space of x-weight at [1, 1] = ℂ^4 [ Info: SU iter 500 : dt = 1e-02, weight diff = 3.879e-06, time = 0.002 sec [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU conv 596 : dt = 1e-02, weight diff = 9.933e-07, time = 11.765 sec +[ Info: SU conv 596 : dt = 1e-02, weight diff = 9.933e-07, time = 12.073 sec [ Info: Space of x-weight at [1, 1] = ℂ^4 [ Info: SU iter 1 : dt = 1e-03, weight diff = 2.135e-03, time = 0.002 sec [ Info: Space of x-weight at [1, 1] = ℂ^4 @@ -107,7 +103,7 @@ end [ Info: Space of x-weight at [1, 1] = ℂ^4 [ Info: SU iter 2000 : dt = 1e-03, weight diff = 1.683e-08, time = 0.002 sec [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU conv 2205 : dt = 1e-03, weight diff = 9.978e-09, time = 4.599 sec +[ Info: SU conv 2205 : dt = 1e-03, weight diff = 9.978e-09, time = 4.545 sec [ Info: Space of x-weight at [1, 1] = ℂ^4 [ Info: SU iter 1 : dt = 4e-04, weight diff = 1.418e-04, time = 0.002 sec [ Info: Space of x-weight at [1, 1] = ℂ^4 @@ -119,7 +115,7 @@ end [ Info: Space of x-weight at [1, 1] = ℂ^4 [ Info: SU iter 2000 : dt = 4e-04, weight diff = 1.157e-08, time = 0.002 sec [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU conv 2133 : dt = 4e-04, weight diff = 9.999e-09, time = 4.428 sec +[ Info: SU conv 2133 : dt = 4e-04, weight diff = 9.999e-09, time = 4.379 sec ```` @@ -143,8 +139,8 @@ env, = leading_boundary( ```` ```` -[ Info: CTMRG init: obj = +8.705922473442e-05 err = 1.0000e+00 -[ Info: CTMRG conv 15: obj = +9.514115680898e-01 err = 3.3105929548e-11 time = 9.37 sec +[ Info: CTMRG init: obj = +8.705922473439e-05 err = 1.0000e+00 +[ Info: CTMRG conv 15: obj = +9.514115680898e-01 err = 6.0310868148e-11 time = 9.35 sec ```` @@ -164,25 +160,23 @@ function compute_mags(peps::InfinitePEPS, env::CTMRGEnv) S_ops = real.([S_z(symm)]) ## only Sz preserves end - return [ - collect( - expectation_value( - peps, LocalOperator(lattice, (CartesianIndex(r, c),) => S), env - ) for (r, c) in Iterators.product(1:size(peps, 1), 1:size(peps, 2)) - ) for S in S_ops - ] + return map(Iterators.product(axes(peps, 1), axes(peps, 2), S_ops)) do (r, c, S) + expectation_value(peps, LocalOperator(lattice, (CartesianIndex(r, c),) => S), env) + end end E = expectation_value(peps, H, env) / (Nr * Nc) Ms = compute_mags(peps, env) -M_norms = collect(norm([m[r, c] for m in Ms]) for (r, c) in Iterators.product(1:Nr, 1:Nc)) +M_norms = map( + rc -> norm(Ms[rc[1], rc[2], :]), Iterators.product(axes(peps, 1), axes(peps, 2)) +) @show E Ms M_norms; ```` ```` -E = -0.6674685583160916 -Ms = [[0.03199644951239792 -0.029802620495572755; -0.029802620502593708 0.03199644954611694], [2.289729198376439e-12 -1.051667672083661e-12; -2.117130756284402e-12 8.869747853359352e-13], [0.3755961090665969 -0.3757765476186198; -0.3757765476169762 0.37559610906659047]] -M_norms = [0.3769565093314697 0.37695650933306873; 0.3769565093319854 0.37695650933432534] +E = -0.6674685583160895 +Ms = [0.03199644951247372 -0.02980262049564095; -0.029802620502662757 0.03199644954619281;;; 2.2896091139871975e-12 -1.0506898420176606e-12; -2.118251543953617e-12 8.853279136399547e-13;;; 0.37559610906659674 -0.3757765476186203; -0.3757765476169772 0.37559610906659097] +M_norms = [0.37695650933147595 0.3769565093330746; 0.3769565093319919 0.3769565093343323] ```` @@ -201,8 +195,8 @@ M_ref = 0.3767 ```` ```` -(E - E_ref) / E_ref = -4.71036463046289e-5 -(mean(M_norms) - M_ref) / E_ref = -0.00038428364451283597 +(E - E_ref) / E_ref = -4.7103646307789086e-5 +(mean(M_norms) - M_ref) / E_ref = -0.0003842836445223997 ```` diff --git a/docs/src/examples/heisenberg_su/main.ipynb b/docs/src/examples/heisenberg_su/main.ipynb index 315a6f115..1c86122e1 100644 --- a/docs/src/examples/heisenberg_su/main.ipynb +++ b/docs/src/examples/heisenberg_su/main.ipynb @@ -14,16 +14,16 @@ "source": [ "# Simple update for the Heisenberg model\n", "\n", - "In this next example, we will use `SimpleUpdate` imaginary time evolution to treat\n", + "In this example, we will use `SimpleUpdate` imaginary time evolution to treat\n", "the two-dimensional Heisenberg model once again:\n", "\n", "$$\n", "H = \\sum_{\\langle i,j \\rangle} J_x S^{x}_i S^{x}_j + J_y S^{y}_i S^{y}_j + J_z S^{z}_i S^{z}_j.\n", "$$\n", "\n", - "In the previous examples, we used a sublattice rotation to simulate antiferromagnetic\n", - "Hamiltonian on a single-site unit cell. Here, we will instead use a $2 \\times 2$ unit cell\n", - "and set $J_x=J_y=J_z=1$.\n", + "In order to simulate the antiferromagnetic order of the Hamiltonian on a single-site unit\n", + "cell one typically applies a unitary sublattice rotation. Here, we will instead use a\n", + "$2 \\times 2$ unit cell and set $J_x = J_y = J_z = 1$.\n", "\n", "Let's get started by seeding the RNG and importing all required modules:" ], @@ -71,9 +71,8 @@ "source": [ "## Simple updating\n", "\n", - "We proceed by initializing a random weighted PEPS that will be evolved. Again, we'll\n", - "normalize its vertex tensors. First though, we need to take of defining the appropriate\n", - "(symmetric) spaces:" + "We proceed by initializing a random weighted PEPS that will be evolved. First though, we\n", + "need to define the appropriate (symmetric) spaces:" ], "metadata": {} }, @@ -95,10 +94,7 @@ " error(\"not implemented\")\n", "end\n", "\n", - "wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, bond_space; unitcell=(Nr, Nc))\n", - "for ind in CartesianIndices(wpeps.vertices)\n", - " wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf)\n", - "end" + "wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, bond_space; unitcell=(Nr, Nc));" ], "metadata": {}, "execution_count": null @@ -184,18 +180,16 @@ " S_ops = real.([S_z(symm)]) ## only Sz preserves \n", " end\n", "\n", - " return [\n", - " collect(\n", - " expectation_value(\n", - " peps, LocalOperator(lattice, (CartesianIndex(r, c),) => S), env\n", - " ) for (r, c) in Iterators.product(1:size(peps, 1), 1:size(peps, 2))\n", - " ) for S in S_ops\n", - " ]\n", + " return map(Iterators.product(axes(peps, 1), axes(peps, 2), S_ops)) do (r, c, S)\n", + " expectation_value(peps, LocalOperator(lattice, (CartesianIndex(r, c),) => S), env)\n", + " end\n", "end\n", "\n", "E = expectation_value(peps, H, env) / (Nr * Nc)\n", "Ms = compute_mags(peps, env)\n", - "M_norms = collect(norm([m[r, c] for m in Ms]) for (r, c) in Iterators.product(1:Nr, 1:Nc))\n", + "M_norms = map(\n", + " rc -> norm(Ms[rc[1], rc[2], :]), Iterators.product(axes(peps, 1), axes(peps, 2))\n", + ")\n", "@show E Ms M_norms;" ], "metadata": {}, diff --git a/docs/src/examples/hubbard_su/index.md b/docs/src/examples/hubbard_su/index.md index 35873d3be..0d2b3048d 100644 --- a/docs/src/examples/hubbard_su/index.md +++ b/docs/src/examples/hubbard_su/index.md @@ -2,15 +2,15 @@ EditURL = "../../../../examples/hubbard_su/main.jl" ``` -[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//hubbard_su/main.ipynb) -[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//hubbard_su/main.ipynb) -[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//hubbard_su) +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/hubbard_su/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/hubbard_su/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/hubbard_su) # Simple update for the Fermi-Hubbard model at half-filling Once again, we consider the Hubbard model but this time we obtain the ground-state PEPS by -imaginary time evoluation. In particular, we'll use the [`SimpleUpdate`](@ref) algorithm. +imaginary time evolution. In particular, we'll use the [`SimpleUpdate`](@ref) algorithm. As a reminder, we define the Hubbard model as ```math @@ -56,16 +56,7 @@ virtual_space = Vect[fℤ₂](0 => Dbond / 2, 1 => Dbond / 2) wpeps = InfiniteWeightPEPS(rand, Float64, physical_space, virtual_space; unitcell=(Nr, Nc)); ```` -Before starting the simple update routine, we normalize the vertex tensors of `wpeps` by -dividing with the maximal vertex element (using the infinity norm): - -````julia -for ind in CartesianIndices(wpeps.vertices) - wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf) -end -```` - -Let's set algorithm parameters: The plan is to successively decrease the time interval of +Let's set the algorithm parameters: The plan is to successively decrease the time interval of the Trotter-Suzuki as well as the convergence tolerance such that we obtain a more accurate result at each iteration. To run the simple update, we call [`simpleupdate`](@ref) where we use the keyword `bipartite=false` - meaning that we use the full $2 \times 2$ unit cell @@ -85,63 +76,63 @@ end ```` [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1 : dt = 1e-02, weight diff = 2.355e+00, time = 19.337 sec +[ Info: SU iter 1 : dt = 1e-02, weight diff = 2.355e+00, time = 19.473 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 500 : dt = 1e-02, weight diff = 3.984e-04, time = 0.018 sec +[ Info: SU iter 500 : dt = 1e-02, weight diff = 3.984e-04, time = 0.020 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) [ Info: SU iter 1000 : dt = 1e-02, weight diff = 2.866e-06, time = 0.014 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU conv 1061 : dt = 1e-02, weight diff = 9.956e-07, time = 37.285 sec +[ Info: SU conv 1061 : dt = 1e-02, weight diff = 9.956e-07, time = 38.226 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1 : dt = 1e-03, weight diff = 6.070e-03, time = 0.028 sec +[ Info: SU iter 1 : dt = 1e-03, weight diff = 6.070e-03, time = 0.014 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 500 : dt = 1e-03, weight diff = 1.874e-06, time = 0.018 sec +[ Info: SU iter 500 : dt = 1e-03, weight diff = 1.874e-06, time = 0.014 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1000 : dt = 1e-03, weight diff = 6.437e-07, time = 0.014 sec +[ Info: SU iter 1000 : dt = 1e-03, weight diff = 6.437e-07, time = 0.019 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) [ Info: SU iter 1500 : dt = 1e-03, weight diff = 2.591e-07, time = 0.019 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 2000 : dt = 1e-03, weight diff = 1.053e-07, time = 0.014 sec +[ Info: SU iter 2000 : dt = 1e-03, weight diff = 1.053e-07, time = 0.019 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 2500 : dt = 1e-03, weight diff = 4.280e-08, time = 0.017 sec +[ Info: SU iter 2500 : dt = 1e-03, weight diff = 4.280e-08, time = 0.014 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) [ Info: SU iter 3000 : dt = 1e-03, weight diff = 1.741e-08, time = 0.014 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU conv 3309 : dt = 1e-03, weight diff = 9.983e-09, time = 52.464 sec +[ Info: SU conv 3309 : dt = 1e-03, weight diff = 9.983e-09, time = 53.956 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1 : dt = 4e-04, weight diff = 4.030e-04, time = 0.014 sec +[ Info: SU iter 1 : dt = 4e-04, weight diff = 4.030e-04, time = 0.020 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 500 : dt = 4e-04, weight diff = 1.776e-07, time = 0.018 sec +[ Info: SU iter 500 : dt = 4e-04, weight diff = 1.776e-07, time = 0.019 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1000 : dt = 4e-04, weight diff = 7.091e-08, time = 0.018 sec +[ Info: SU iter 1000 : dt = 4e-04, weight diff = 7.091e-08, time = 0.014 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) [ Info: SU iter 1500 : dt = 4e-04, weight diff = 3.997e-08, time = 0.014 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 2000 : dt = 4e-04, weight diff = 2.622e-08, time = 0.014 sec +[ Info: SU iter 2000 : dt = 4e-04, weight diff = 2.622e-08, time = 0.020 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) [ Info: SU iter 2500 : dt = 4e-04, weight diff = 1.796e-08, time = 0.014 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 3000 : dt = 4e-04, weight diff = 1.245e-08, time = 0.013 sec +[ Info: SU iter 3000 : dt = 4e-04, weight diff = 1.245e-08, time = 0.014 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU conv 3303 : dt = 4e-04, weight diff = 9.997e-09, time = 52.091 sec +[ Info: SU conv 3303 : dt = 4e-04, weight diff = 9.997e-09, time = 54.244 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1 : dt = 1e-04, weight diff = 2.014e-04, time = 0.018 sec +[ Info: SU iter 1 : dt = 1e-04, weight diff = 2.014e-04, time = 0.014 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 500 : dt = 1e-04, weight diff = 5.664e-08, time = 0.017 sec +[ Info: SU iter 500 : dt = 1e-04, weight diff = 5.664e-08, time = 0.014 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1000 : dt = 1e-04, weight diff = 4.106e-08, time = 0.018 sec +[ Info: SU iter 1000 : dt = 1e-04, weight diff = 4.106e-08, time = 0.020 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 1500 : dt = 1e-04, weight diff = 3.033e-08, time = 0.014 sec +[ Info: SU iter 1500 : dt = 1e-04, weight diff = 3.033e-08, time = 0.021 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 2000 : dt = 1e-04, weight diff = 2.290e-08, time = 0.019 sec +[ Info: SU iter 2000 : dt = 1e-04, weight diff = 2.290e-08, time = 0.014 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 2500 : dt = 1e-04, weight diff = 1.773e-08, time = 0.017 sec +[ Info: SU iter 2500 : dt = 1e-04, weight diff = 1.773e-08, time = 0.015 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU iter 3000 : dt = 1e-04, weight diff = 1.410e-08, time = 0.017 sec +[ Info: SU iter 3000 : dt = 1e-04, weight diff = 1.410e-08, time = 0.014 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) [ Info: SU iter 3500 : dt = 1e-04, weight diff = 1.152e-08, time = 0.014 sec [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0=>4, 1=>4) -[ Info: SU conv 3893 : dt = 1e-04, weight diff = 9.997e-09, time = 60.906 sec +[ Info: SU conv 3893 : dt = 1e-04, weight diff = 9.997e-09, time = 63.901 sec ```` @@ -173,11 +164,11 @@ end ```` ```` -[ Info: CTMRG init: obj = -1.024524714591e-07 err = 1.0000e+00 -┌ Warning: CTMRG cancel 100: obj = +6.005578535112e-01 err = 1.5276303328e-02 time = 33.41 sec +[ Info: CTMRG init: obj = -1.542952315399e-10 err = 1.0000e+00 +┌ Warning: CTMRG cancel 100: obj = +6.169093163834e-01 err = 5.9784504048e-01 time = 32.80 sec └ @ PEPSKit ~/repos/PEPSKit.jl/src/algorithms/ctmrg/ctmrg.jl:155 -[ Info: CTMRG init: obj = +6.005578535112e-01 err = 1.0000e+00 -[ Info: CTMRG conv 11: obj = +5.888235791615e-01 err = 8.9907750067e-06 time = 25.75 sec +[ Info: CTMRG init: obj = +6.169093163834e-01 err = 1.0000e+00 +[ Info: CTMRG conv 30: obj = +5.888235783866e-01 err = 4.9402085825e-06 time = 1.24 min ```` @@ -190,7 +181,7 @@ E = expectation_value(peps, H, env) / (Nr * Nc) ```` ```` -E = -3.6333025702476567 +E = -3.633302571096653 ```` @@ -205,7 +196,7 @@ E_exact = Es_exact[U] - U / 2 ```` ```` -(E - E_exact) / E_exact = -0.006398509517418207 +(E - E_exact) / E_exact = -0.006398509285242631 ```` diff --git a/docs/src/examples/hubbard_su/main.ipynb b/docs/src/examples/hubbard_su/main.ipynb index fbedecbdf..f2e5ffcaa 100644 --- a/docs/src/examples/hubbard_su/main.ipynb +++ b/docs/src/examples/hubbard_su/main.ipynb @@ -15,7 +15,7 @@ "# Simple update for the Fermi-Hubbard model at half-filling\n", "\n", "Once again, we consider the Hubbard model but this time we obtain the ground-state PEPS by\n", - "imaginary time evoluation. In particular, we'll use the `SimpleUpdate` algorithm.\n", + "imaginary time evolution. In particular, we'll use the `SimpleUpdate` algorithm.\n", "As a reminder, we define the Hubbard model as\n", "\n", "$$\n", @@ -91,26 +91,7 @@ { "cell_type": "markdown", "source": [ - "Before starting the simple update routine, we normalize the vertex tensors of `wpeps` by\n", - "dividing with the maximal vertex element (using the infinity norm):" - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "for ind in CartesianIndices(wpeps.vertices)\n", - " wpeps.vertices[ind] /= norm(wpeps.vertices[ind], Inf)\n", - "end" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Let's set algorithm parameters: The plan is to successively decrease the time interval of\n", + "Let's set the algorithm parameters: The plan is to successively decrease the time interval of\n", "the Trotter-Suzuki as well as the convergence tolerance such that we obtain a more accurate\n", "result at each iteration. To run the simple update, we call `simpleupdate` where we\n", "use the keyword `bipartite=false` - meaning that we use the full $2 \\times 2$ unit cell\n", diff --git a/docs/src/examples/xxz/index.md b/docs/src/examples/xxz/index.md index 89b26d097..3c8e9ad89 100644 --- a/docs/src/examples/xxz/index.md +++ b/docs/src/examples/xxz/index.md @@ -2,9 +2,9 @@ EditURL = "../../../../examples/xxz/main.jl" ``` -[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/.//xxz/main.ipynb) -[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/.//xxz/main.ipynb) -[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/.//xxz) +[![](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantumKitHub/PEPSKit.jl/gh-pages?filepath=dev/examples/xxz/main.ipynb) +[![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](https://nbviewer.jupyter.org/github/QuantumKitHub/PEPSKit.jl/blob/gh-pages/dev/examples/xxz/main.ipynb) +[![](https://img.shields.io/badge/download-project-orange)](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/QuantumKitHub/PEPSKit.jl/examples/tree/gh-pages/dev/examples/xxz) # Néel order in the $U(1)$-symmetric XXZ model @@ -17,7 +17,7 @@ H_0 = J \big(\sum_{\langle i, j \rangle} S_i^x S_j^x + S_i^y S_j^y + \Delta S_i^ ``` For appropriate $\Delta$, the model enters an antiferromagnetic phase (Néel order) which we -will force by adding staggered magnetic charges to ``H_0``. Furthermore, since the XXZ +will force by adding staggered magnetic charges to $H_0$. Furthermore, since the XXZ Hamiltonian obeys a $U(1)$ symmetry, we will make use of that and work with $U(1)$-symmetric PEPS and CTMRG environments. For simplicity, we will consider spin-$1/2$ operators. @@ -69,7 +69,7 @@ spaces, which can be extracted directly from the Hamiltonian `LocalOperator`: V_peps = U1Space(0 => 2, 1 => 1, -1 => 1) V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2) virtual_spaces = fill(V_peps, size(lattice)...) -physical_spaces = H.lattice +physical_spaces = physicalspace(H) ```` ```` @@ -94,7 +94,7 @@ env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); ```` [ Info: CTMRG init: obj = -1.121020187593e+04 -6.991066478499e+03im err = 1.0000e+00 -[ Info: CTMRG conv 26: obj = +6.369731502336e+03 -8.500546755386e-08im err = 7.5599921139e-09 time = 8.69 sec +[ Info: CTMRG conv 26: obj = +6.369731502336e+03 -8.500546755386e-08im err = 7.5599921139e-09 time = 2.05 sec ```` @@ -118,103 +118,103 @@ peps, env, E, info = fixedpoint( ┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: │ α = 2.50e+01, dϕ = -9.90e-03, ϕ - ϕ₀ = -1.53e-01 └ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 1, time 808.38 s: f = -0.185750019542, ‖∇f‖ = 1.8647e+00, α = 2.50e+01, m = 0, nfg = 4 +[ Info: LBFGS: iter 1, time 151.05 s: f = -0.185750019542, ‖∇f‖ = 1.8647e+00, α = 2.50e+01, m = 0, nfg = 4 ┌ Warning: The function `add!!` is not implemented for (values of) type `Tuple{InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.GradedSpace{TensorKitSectors.U1Irrep, TensorKit.SortedVectorDict{TensorKitSectors.U1Irrep, Int64}}, 1, 4, Vector{ComplexF64}}}, Int64, VectorInterface.One}`; │ this fallback will disappear in future versions of VectorInterface.jl └ @ VectorInterface ~/.julia/packages/VectorInterface/J6qCR/src/fallbacks.jl:163 ┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: │ α = 2.50e+01, dϕ = -1.84e-03, ϕ - ϕ₀ = -3.93e-01 └ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/linesearches.jl:148 -[ Info: LBFGS: iter 2, time 857.60 s: f = -0.579230108476, ‖∇f‖ = 5.7732e-01, α = 2.50e+01, m = 0, nfg = 4 -[ Info: LBFGS: iter 3, time 868.75 s: f = -0.613445426304, ‖∇f‖ = 3.3947e-01, α = 1.00e+00, m = 1, nfg = 1 -[ Info: LBFGS: iter 4, time 880.15 s: f = -0.638685295144, ‖∇f‖ = 2.2104e-01, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 5, time 891.56 s: f = -0.650336962208, ‖∇f‖ = 1.9524e-01, α = 1.00e+00, m = 3, nfg = 1 -[ Info: LBFGS: iter 6, time 902.39 s: f = -0.654880752783, ‖∇f‖ = 7.1842e-02, α = 1.00e+00, m = 4, nfg = 1 -[ Info: LBFGS: iter 7, time 912.20 s: f = -0.656075650331, ‖∇f‖ = 5.2129e-02, α = 1.00e+00, m = 5, nfg = 1 -[ Info: LBFGS: iter 8, time 922.70 s: f = -0.659041890147, ‖∇f‖ = 5.3917e-02, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 9, time 933.30 s: f = -0.660552875456, ‖∇f‖ = 9.6848e-02, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 10, time 943.09 s: f = -0.662163341463, ‖∇f‖ = 2.9524e-02, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 11, time 953.68 s: f = -0.662506513828, ‖∇f‖ = 2.1440e-02, α = 1.00e+00, m = 9, nfg = 1 -[ Info: LBFGS: iter 12, time 964.33 s: f = -0.662847746095, ‖∇f‖ = 2.0917e-02, α = 1.00e+00, m = 10, nfg = 1 -[ Info: LBFGS: iter 13, time 974.26 s: f = -0.663230218002, ‖∇f‖ = 2.5387e-02, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 14, time 980.64 s: f = -0.663678142653, ‖∇f‖ = 2.2924e-02, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 15, time 987.02 s: f = -0.664034475269, ‖∇f‖ = 2.1574e-02, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 16, time 997.52 s: f = -0.664687988771, ‖∇f‖ = 2.7632e-02, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 17, time 1020.76 s: f = -0.664947633065, ‖∇f‖ = 3.2552e-02, α = 4.47e-01, m = 15, nfg = 2 -[ Info: LBFGS: iter 18, time 1031.65 s: f = -0.665379251393, ‖∇f‖ = 2.5817e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 19, time 1043.13 s: f = -0.665603907305, ‖∇f‖ = 2.4951e-02, α = 1.00e+00, m = 17, nfg = 1 -[ Info: LBFGS: iter 20, time 1054.48 s: f = -0.665762559605, ‖∇f‖ = 1.5130e-02, α = 1.00e+00, m = 18, nfg = 1 -[ Info: LBFGS: iter 21, time 1065.68 s: f = -0.666003995146, ‖∇f‖ = 1.6565e-02, α = 1.00e+00, m = 19, nfg = 1 -[ Info: LBFGS: iter 22, time 1076.34 s: f = -0.666347181648, ‖∇f‖ = 2.3025e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 23, time 1088.47 s: f = -0.666599630335, ‖∇f‖ = 2.3462e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 24, time 1100.74 s: f = -0.666793651525, ‖∇f‖ = 2.1908e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 25, time 1112.91 s: f = -0.666949601577, ‖∇f‖ = 1.0867e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 26, time 1125.12 s: f = -0.667058133735, ‖∇f‖ = 1.2475e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 27, time 1136.45 s: f = -0.667165497296, ‖∇f‖ = 1.4340e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 28, time 1147.86 s: f = -0.667263554939, ‖∇f‖ = 1.5667e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 29, time 1159.14 s: f = -0.667357062063, ‖∇f‖ = 8.8494e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 30, time 1170.29 s: f = -0.667450569240, ‖∇f‖ = 1.1496e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 31, time 1182.11 s: f = -0.667569394671, ‖∇f‖ = 1.3976e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 32, time 1194.13 s: f = -0.667657944766, ‖∇f‖ = 2.2321e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 33, time 1205.47 s: f = -0.667799360459, ‖∇f‖ = 8.7543e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 34, time 1217.47 s: f = -0.667852887856, ‖∇f‖ = 6.6668e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 35, time 1229.64 s: f = -0.667926685233, ‖∇f‖ = 1.1902e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 36, time 1242.59 s: f = -0.667979135052, ‖∇f‖ = 1.6349e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 37, time 1249.99 s: f = -0.668039789983, ‖∇f‖ = 9.3108e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 38, time 1261.95 s: f = -0.668087921855, ‖∇f‖ = 5.4669e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 39, time 1274.08 s: f = -0.668109250700, ‖∇f‖ = 6.6628e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 40, time 1281.58 s: f = -0.668159589044, ‖∇f‖ = 9.3986e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 41, time 1288.46 s: f = -0.668230776691, ‖∇f‖ = 1.1534e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 42, time 1300.78 s: f = -0.668277979949, ‖∇f‖ = 1.0707e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 43, time 1313.19 s: f = -0.668314491012, ‖∇f‖ = 4.4476e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 44, time 1325.48 s: f = -0.668333048195, ‖∇f‖ = 5.0062e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 45, time 1337.91 s: f = -0.668357479998, ‖∇f‖ = 7.1015e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 46, time 1349.38 s: f = -0.668412792965, ‖∇f‖ = 9.9323e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 47, time 1373.92 s: f = -0.668439289699, ‖∇f‖ = 1.1349e-02, α = 4.53e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 48, time 1386.29 s: f = -0.668482319738, ‖∇f‖ = 6.5163e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 49, time 1398.51 s: f = -0.668507687742, ‖∇f‖ = 3.4077e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 50, time 1409.94 s: f = -0.668523331148, ‖∇f‖ = 4.4119e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 51, time 1422.07 s: f = -0.668544159952, ‖∇f‖ = 6.8178e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 52, time 1434.33 s: f = -0.668572411228, ‖∇f‖ = 8.9225e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 53, time 1447.43 s: f = -0.668603530102, ‖∇f‖ = 5.4599e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 54, time 1460.33 s: f = -0.668626672236, ‖∇f‖ = 3.2841e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 55, time 1471.90 s: f = -0.668639698673, ‖∇f‖ = 4.2163e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 56, time 1484.21 s: f = -0.668655954756, ‖∇f‖ = 5.4299e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 57, time 1496.56 s: f = -0.668673395222, ‖∇f‖ = 5.4970e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 58, time 1508.06 s: f = -0.668687854178, ‖∇f‖ = 3.7476e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 59, time 1520.29 s: f = -0.668698487673, ‖∇f‖ = 3.3854e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 60, time 1532.55 s: f = -0.668705111514, ‖∇f‖ = 3.8959e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 61, time 1545.51 s: f = -0.668720251413, ‖∇f‖ = 4.7426e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 62, time 1557.82 s: f = -0.668726232684, ‖∇f‖ = 7.2528e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 63, time 1570.65 s: f = -0.668739847818, ‖∇f‖ = 2.5815e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 64, time 1583.68 s: f = -0.668746591101, ‖∇f‖ = 2.1675e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 65, time 1595.79 s: f = -0.668754620918, ‖∇f‖ = 3.0368e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 66, time 1608.17 s: f = -0.668767041464, ‖∇f‖ = 3.2464e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 67, time 1633.44 s: f = -0.668775239596, ‖∇f‖ = 4.1610e-03, α = 4.24e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 68, time 1646.37 s: f = -0.668784522482, ‖∇f‖ = 2.0585e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 69, time 1658.66 s: f = -0.668792875861, ‖∇f‖ = 2.5737e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 70, time 1671.00 s: f = -0.668799555353, ‖∇f‖ = 3.0991e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 71, time 1683.96 s: f = -0.668807510786, ‖∇f‖ = 3.9740e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 72, time 1697.16 s: f = -0.668815529198, ‖∇f‖ = 2.8312e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 73, time 1709.35 s: f = -0.668820072176, ‖∇f‖ = 1.8277e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 74, time 1722.17 s: f = -0.668823045663, ‖∇f‖ = 2.1189e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 75, time 1735.22 s: f = -0.668829224417, ‖∇f‖ = 3.3000e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 76, time 1748.24 s: f = -0.668834661996, ‖∇f‖ = 3.3841e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 77, time 1761.10 s: f = -0.668839125190, ‖∇f‖ = 1.5494e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 78, time 1774.64 s: f = -0.668842178047, ‖∇f‖ = 1.8074e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 79, time 1788.22 s: f = -0.668846182434, ‖∇f‖ = 2.1704e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 80, time 1801.30 s: f = -0.668849851199, ‖∇f‖ = 4.3895e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 81, time 1814.28 s: f = -0.668854730352, ‖∇f‖ = 1.9014e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 82, time 1827.19 s: f = -0.668857445978, ‖∇f‖ = 1.6213e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 83, time 1840.79 s: f = -0.668861083091, ‖∇f‖ = 2.1544e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 84, time 1853.61 s: f = -0.668865914837, ‖∇f‖ = 2.4867e-03, α = 1.00e+00, m = 20, nfg = 1 -┌ Warning: LBFGS: not converged to requested tol after 85 iterations and time 1866.53 s: f = -0.668869945971, ‖∇f‖ = 4.5125e-03 +[ Info: LBFGS: iter 2, time 198.17 s: f = -0.579230108476, ‖∇f‖ = 5.7732e-01, α = 2.50e+01, m = 0, nfg = 4 +[ Info: LBFGS: iter 3, time 209.90 s: f = -0.613445426304, ‖∇f‖ = 3.3947e-01, α = 1.00e+00, m = 1, nfg = 1 +[ Info: LBFGS: iter 4, time 220.81 s: f = -0.638685295144, ‖∇f‖ = 2.2104e-01, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 5, time 232.32 s: f = -0.650336962208, ‖∇f‖ = 1.9524e-01, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 6, time 243.27 s: f = -0.654880752783, ‖∇f‖ = 7.1842e-02, α = 1.00e+00, m = 4, nfg = 1 +[ Info: LBFGS: iter 7, time 253.29 s: f = -0.656075650331, ‖∇f‖ = 5.2129e-02, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 8, time 264.02 s: f = -0.659041890147, ‖∇f‖ = 5.3917e-02, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 9, time 274.83 s: f = -0.660552875456, ‖∇f‖ = 9.6848e-02, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 10, time 284.84 s: f = -0.662163341463, ‖∇f‖ = 2.9524e-02, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 11, time 295.73 s: f = -0.662506513828, ‖∇f‖ = 2.1440e-02, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 12, time 305.73 s: f = -0.662847746095, ‖∇f‖ = 2.0917e-02, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 13, time 316.59 s: f = -0.663230218002, ‖∇f‖ = 2.5387e-02, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 14, time 323.15 s: f = -0.663678142653, ‖∇f‖ = 2.2924e-02, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 15, time 328.96 s: f = -0.664034475269, ‖∇f‖ = 2.1574e-02, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 16, time 340.52 s: f = -0.664687988771, ‖∇f‖ = 2.7632e-02, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 17, time 363.13 s: f = -0.664947633065, ‖∇f‖ = 3.2552e-02, α = 4.47e-01, m = 15, nfg = 2 +[ Info: LBFGS: iter 18, time 374.71 s: f = -0.665379251393, ‖∇f‖ = 2.5817e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 19, time 386.41 s: f = -0.665603907305, ‖∇f‖ = 2.4951e-02, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 20, time 397.29 s: f = -0.665762559605, ‖∇f‖ = 1.5130e-02, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 21, time 408.95 s: f = -0.666003995146, ‖∇f‖ = 1.6565e-02, α = 1.00e+00, m = 19, nfg = 1 +[ Info: LBFGS: iter 22, time 420.69 s: f = -0.666347181648, ‖∇f‖ = 2.3025e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 23, time 432.27 s: f = -0.666599630335, ‖∇f‖ = 2.3462e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 24, time 444.52 s: f = -0.666793651525, ‖∇f‖ = 2.1908e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 25, time 456.87 s: f = -0.666949601577, ‖∇f‖ = 1.0867e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 26, time 469.23 s: f = -0.667058133735, ‖∇f‖ = 1.2475e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 27, time 480.73 s: f = -0.667165497296, ‖∇f‖ = 1.4340e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 28, time 492.42 s: f = -0.667263554939, ‖∇f‖ = 1.5667e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 29, time 504.11 s: f = -0.667357062063, ‖∇f‖ = 8.8494e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 30, time 515.48 s: f = -0.667450569240, ‖∇f‖ = 1.1496e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 31, time 527.47 s: f = -0.667569394671, ‖∇f‖ = 1.3976e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 32, time 539.89 s: f = -0.667657944766, ‖∇f‖ = 2.2321e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 33, time 551.52 s: f = -0.667799360459, ‖∇f‖ = 8.7543e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 34, time 563.83 s: f = -0.667852887856, ‖∇f‖ = 6.6668e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 35, time 576.15 s: f = -0.667926685233, ‖∇f‖ = 1.1902e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 36, time 588.14 s: f = -0.667979135052, ‖∇f‖ = 1.6349e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 37, time 595.62 s: f = -0.668039789983, ‖∇f‖ = 9.3108e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 38, time 608.27 s: f = -0.668087921855, ‖∇f‖ = 5.4669e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 39, time 619.58 s: f = -0.668109250700, ‖∇f‖ = 6.6628e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 40, time 627.01 s: f = -0.668159589044, ‖∇f‖ = 9.3986e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 41, time 634.57 s: f = -0.668230776691, ‖∇f‖ = 1.1534e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 42, time 646.27 s: f = -0.668277979949, ‖∇f‖ = 1.0707e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 43, time 658.67 s: f = -0.668314491012, ‖∇f‖ = 4.4476e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 44, time 670.98 s: f = -0.668333048195, ‖∇f‖ = 5.0062e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 45, time 682.77 s: f = -0.668357479998, ‖∇f‖ = 7.1015e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 46, time 695.32 s: f = -0.668412792965, ‖∇f‖ = 9.9323e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 47, time 719.56 s: f = -0.668439289699, ‖∇f‖ = 1.1349e-02, α = 4.53e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 48, time 732.05 s: f = -0.668482319738, ‖∇f‖ = 6.5163e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 49, time 744.54 s: f = -0.668507687742, ‖∇f‖ = 3.4077e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 50, time 756.98 s: f = -0.668523331148, ‖∇f‖ = 4.4119e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 51, time 768.78 s: f = -0.668544159952, ‖∇f‖ = 6.8178e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 52, time 781.25 s: f = -0.668572411228, ‖∇f‖ = 8.9225e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 53, time 794.44 s: f = -0.668603530102, ‖∇f‖ = 5.4599e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 54, time 807.70 s: f = -0.668626672236, ‖∇f‖ = 3.2841e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 55, time 819.27 s: f = -0.668639698673, ‖∇f‖ = 4.2163e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 56, time 831.79 s: f = -0.668655954756, ‖∇f‖ = 5.4299e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 57, time 844.32 s: f = -0.668673395222, ‖∇f‖ = 5.4970e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 58, time 856.85 s: f = -0.668687854178, ‖∇f‖ = 3.7476e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 59, time 868.59 s: f = -0.668698487673, ‖∇f‖ = 3.3854e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 60, time 881.11 s: f = -0.668705111514, ‖∇f‖ = 3.8959e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 61, time 894.30 s: f = -0.668720251413, ‖∇f‖ = 4.7426e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 62, time 906.61 s: f = -0.668726232684, ‖∇f‖ = 7.2528e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 63, time 919.67 s: f = -0.668739847818, ‖∇f‖ = 2.5815e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 64, time 932.86 s: f = -0.668746591101, ‖∇f‖ = 2.1675e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 65, time 944.63 s: f = -0.668754620918, ‖∇f‖ = 3.0368e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 66, time 957.21 s: f = -0.668767041464, ‖∇f‖ = 3.2464e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 67, time 982.43 s: f = -0.668775239596, ‖∇f‖ = 4.1610e-03, α = 4.24e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 68, time 995.66 s: f = -0.668784522482, ‖∇f‖ = 2.0585e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 69, time 1008.92 s: f = -0.668792875861, ‖∇f‖ = 2.5737e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 70, time 1020.82 s: f = -0.668799555353, ‖∇f‖ = 3.0991e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 71, time 1034.03 s: f = -0.668807510786, ‖∇f‖ = 3.9740e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 72, time 1047.37 s: f = -0.668815529198, ‖∇f‖ = 2.8312e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 73, time 1059.65 s: f = -0.668820072176, ‖∇f‖ = 1.8277e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 74, time 1072.71 s: f = -0.668823045663, ‖∇f‖ = 2.1189e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 75, time 1086.03 s: f = -0.668829224417, ‖∇f‖ = 3.3000e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 76, time 1098.65 s: f = -0.668834661996, ‖∇f‖ = 3.3841e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 77, time 1112.36 s: f = -0.668839125190, ‖∇f‖ = 1.5494e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 78, time 1126.16 s: f = -0.668842178047, ‖∇f‖ = 1.8074e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 79, time 1140.07 s: f = -0.668846182434, ‖∇f‖ = 2.1704e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 80, time 1152.70 s: f = -0.668849851199, ‖∇f‖ = 4.3895e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 81, time 1165.98 s: f = -0.668854730352, ‖∇f‖ = 1.9014e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 82, time 1179.77 s: f = -0.668857445978, ‖∇f‖ = 1.6213e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 83, time 1192.89 s: f = -0.668861083091, ‖∇f‖ = 2.1544e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 84, time 1205.95 s: f = -0.668865914837, ‖∇f‖ = 2.4867e-03, α = 1.00e+00, m = 20, nfg = 1 +┌ Warning: LBFGS: not converged to requested tol after 85 iterations and time 1219.27 s: f = -0.668869945971, ‖∇f‖ = 4.5125e-03 └ @ OptimKit ~/.julia/packages/OptimKit/G6i79/src/lbfgs.jl:197 E = -0.6688699459708735 ```` -Note that for the specified parameters $J=\Delta=1$, we simulated the same Hamiltonian as +Note that for the specified parameters $J = \Delta = 1$, we simulated the same Hamiltonian as in the [Heisenberg example](@ref examples_heisenberg). In that example, with a non-symmetric $D=2$ PEPS simulation, we reached a ground-state energy of around $E_\text{D=2} = -0.6625\dots$. Again comparing against [Sandvik's](@cite sandvik_computational_2011) accurate QMC estimate diff --git a/docs/src/examples/xxz/main.ipynb b/docs/src/examples/xxz/main.ipynb index 7f6e66329..77737aaa4 100644 --- a/docs/src/examples/xxz/main.ipynb +++ b/docs/src/examples/xxz/main.ipynb @@ -109,7 +109,7 @@ "V_peps = U1Space(0 => 2, 1 => 1, -1 => 1)\n", "V_env = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2)\n", "virtual_spaces = fill(V_peps, size(lattice)...)\n", - "physical_spaces = H.lattice" + "physical_spaces = physicalspace(H)" ], "metadata": {}, "execution_count": null @@ -163,7 +163,7 @@ { "cell_type": "markdown", "source": [ - "Note that for the specified parameters $J=\\Delta=1$, we simulated the same Hamiltonian as\n", + "Note that for the specified parameters $J = \\Delta = 1$, we simulated the same Hamiltonian as\n", "in the Heisenberg example. In that example, with a non-symmetric\n", "$D=2$ PEPS simulation, we reached a ground-state energy of around $E_\\text{D=2} = -0.6625\\dots$.\n", "Again comparing against [Sandvik's](@cite sandvik_computational_2011) accurate QMC estimate\n", diff --git a/examples/Cache.toml b/examples/Cache.toml index 46e3e0f88..30e50b3db 100644 --- a/examples/Cache.toml +++ b/examples/Cache.toml @@ -1,2 +1,9 @@ +bose_hubbard = "66660dd5a6ab5cfe35f2d1cffde64a7978a3c5b154f0bd33a3fc37e4f18da4d1" +hubbard_su = "41a3a544f478d1f347e6c0930c7b00d8168bb8f833a4b3947387b5c1b0b5f3c5" 2d_ising_partition_function = "9bcfd5f2d320a044515570e22595e61ef336dd3b2b478bc628162539a96bc6dc" 3d_ising_partition_function = "3a76f0b39a53c20abeb00040a5b1b2716ec05e368dc54225ecccc05fa7af6d16" +boundary_mps = "31e14bd742c12acfc4facd5bc8f28752f025a1a523c72ffccc8581e38880d3cd" +heisenberg_su = "299b79f36b94b301dafa0d39fc54498b44dcdf0e4988e3c5416aa6c4e9e8f584" +xxz = "b5ab0efe6b9addb4b029250d7212d8b2e771136ca4ec4a4bfd7bccc8c688b949" +fermi_hubbard = "13d6d827a9851bef2c47cbe8894bf6eec9e1fb3222ecc24d2a876336553439ff" +heisenberg = "f6b057dacb058656ad903778fc00832c6c8a61df930118872e04006b086030c7" From c92ab72538dbbd34652476d2a31dd3a866e8326e Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Mon, 5 May 2025 13:45:34 +0200 Subject: [PATCH 113/113] Crossref examples section --- docs/src/examples/index.md | 2 +- docs/src/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/examples/index.md b/docs/src/examples/index.md index b861541c9..d17918489 100644 --- a/docs/src/examples/index.md +++ b/docs/src/examples/index.md @@ -1,4 +1,4 @@ -# Overview +# [Overview](@id e_overview) Here we provide a number of commented example pages that serve as short tutorials on how to use PEPSKit in various situations. Applications span from two-dimensional quantum models, including fermionic Hamiltonians, to classical three-dimensional statistical mechanics: diff --git a/docs/src/index.md b/docs/src/index.md index 7e957438b..994995ea1 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -61,4 +61,4 @@ Pages = ["man/models.md", "man/multithreading.md", "man/precompilation.md"] Depth = 1 ``` -Additionally, we provide a list of commented examples in the Examples section which showcases most of PEPSKit's capabilities in action. +Additionally, we provide a list of commented examples in the [Examples section](@ref e_overview) which showcases most of PEPSKit's capabilities in action.