From 31fb602fa7b658b9b26714e500195390dc4c0312 Mon Sep 17 00:00:00 2001 From: leburgel Date: Wed, 20 May 2026 17:06:52 +0200 Subject: [PATCH 1/9] Attempt to rework fixed-point differentiation --- docs/src/examples/bose_hubbard/index.md | 2 +- docs/src/man/precompilation.md | 4 +- examples/3d_ising_partition_function/main.jl | 1 - examples/bose_hubbard/main.jl | 2 +- examples/c4v_ctmrg/main.jl | 2 +- examples/fermi_hubbard/main.jl | 2 +- examples/j1j2_su/main.jl | 7 +- examples/xxz/main.jl | 2 +- src/Defaults.jl | 25 +- src/PEPSKit.jl | 2 +- .../fixed_point_differentiation.jl | 235 ++++++------------ .../optimization/peps_optimization.jl | 2 +- src/algorithms/select_algorithm.jl | 4 - test/examples/heisenberg.jl | 2 +- test/gradients/ctmrg_gradients.jl | 20 +- 15 files changed, 114 insertions(+), 198 deletions(-) diff --git a/docs/src/examples/bose_hubbard/index.md b/docs/src/examples/bose_hubbard/index.md index a8c4a115d..9ae3bbe0d 100644 --- a/docs/src/examples/bose_hubbard/index.md +++ b/docs/src/examples/bose_hubbard/index.md @@ -100,7 +100,7 @@ algorithms and their tolerances: ````julia boundary_alg = (; tol = 1.0e-8, alg = :SimultaneousCTMRG, trunc = (; alg = :FixedSpaceTruncation)) -gradient_alg = (; tol = 1.0e-6, maxiter = 10, alg = :LinSolver, iterscheme = :fixed) +gradient_alg = (; tol = 1.0e-6, maxiter = 10, alg = :FixedPointGradient) optimizer_alg = (; tol = 1.0e-4, alg = :LBFGS, maxiter = 150, ls_maxiter = 2, ls_maxfg = 2); ```` diff --git a/docs/src/man/precompilation.md b/docs/src/man/precompilation.md index b464fabe7..2265c3603 100644 --- a/docs/src/man/precompilation.md +++ b/docs/src/man/precompilation.md @@ -62,8 +62,8 @@ using PrecompileTools SequentialCTMRG(; maxiter, projector_alg=:HalfInfiniteProjector, verbosity), ] gradient_algs = [ - LinSolver(; solver_alg=BiCGStab(; tol=gradtol)), - EigSolver(; solver_alg=Arnoldi(; tol=gradtol, eager=true)), + (; solver_alg=BiCGStab(; tol=gradtol)), + (; solver_alg=Arnoldi(; tol=gradtol, eager=true)), ] # Initialize OhMyThreads scheduler (precompilation occurs before __init__ call) diff --git a/examples/3d_ising_partition_function/main.jl b/examples/3d_ising_partition_function/main.jl index 51747f7ec..d3df0d4c3 100644 --- a/examples/3d_ising_partition_function/main.jl +++ b/examples/3d_ising_partition_function/main.jl @@ -153,7 +153,6 @@ of this cost function. boundary_alg = SimultaneousCTMRG(; maxiter = 150, tol = 1.0e-8, verbosity = 1) rrule_alg = EigSolver(; solver_alg = KrylovKit.Arnoldi(; maxiter = 30, tol = 1.0e-6, eager = true), - iterscheme = :fixed, ) T = InfinitePEPO(O) diff --git a/examples/bose_hubbard/main.jl b/examples/bose_hubbard/main.jl index b72ca0ad2..cad9217a1 100644 --- a/examples/bose_hubbard/main.jl +++ b/examples/bose_hubbard/main.jl @@ -88,7 +88,7 @@ algorithms and their tolerances: """ boundary_alg = (; tol = 1.0e-8, alg = :SimultaneousCTMRG, trunc = (; alg = :FixedSpaceTruncation)) -gradient_alg = (; tol = 1.0e-6, maxiter = 10, alg = :LinSolver) +gradient_alg = (; tol = 1.0e-6, maxiter = 10, solver_alg = (alg = :GMRES)) optimizer_alg = (; tol = 1.0e-4, alg = :LBFGS, maxiter = 150, ls_maxiter = 2, ls_maxfg = 2); md""" diff --git a/examples/c4v_ctmrg/main.jl b/examples/c4v_ctmrg/main.jl index 7f1e0cdec..66738e7af 100644 --- a/examples/c4v_ctmrg/main.jl +++ b/examples/c4v_ctmrg/main.jl @@ -154,6 +154,6 @@ peps_qr, env_qr, E_qr, = fixedpoint( H, peps₀, env_qr₀; optimizer_alg = (; tol = 1.0e-4), boundary_alg = (; alg = :C4vCTMRG, projector_alg = :C4vQRProjector, maxiter = 500), - gradient_alg = (; alg = :LinSolver) + gradient_alg = (; solver_alg = (alg = :GMRES)) ); @show (E_qr - E_ref) / E_ref; diff --git a/examples/fermi_hubbard/main.jl b/examples/fermi_hubbard/main.jl index f9373fc2a..c0dcd6093 100644 --- a/examples/fermi_hubbard/main.jl +++ b/examples/fermi_hubbard/main.jl @@ -71,7 +71,7 @@ define all algorithmic parameters: """ boundary_alg = (; tol = 1.0e-8, alg = :SimultaneousCTMRG, trunc = (; alg = :FixedSpaceTruncation)) -gradient_alg = (; tol = 1.0e-6, alg = :EigSolver, maxiter = 10, iterscheme = :fixed) +gradient_alg = (; tol = 1.0e-6, alg = :EigSolver, maxiter = 10) optimizer_alg = (; tol = 1.0e-4, alg = :LBFGS, maxiter = 80, ls_maxiter = 3, ls_maxfg = 3) md""" diff --git a/examples/j1j2_su/main.jl b/examples/j1j2_su/main.jl index dbcda4b4a..1e5a26338 100644 --- a/examples/j1j2_su/main.jl +++ b/examples/j1j2_su/main.jl @@ -109,9 +109,8 @@ In order to break some of the $C_{4v}$ symmetry of the PEPS, we will add a bit o This is conviently done using MPSKit's `randomize!` function. (Breaking some of the spatial symmetry can be advantageous for obtaining lower energies.) -In our optimization, we will use a fixed-point differentiation scheme which requires a -gauge fixing of the contraction environment -(specified by the `gradient_alg = (; iterscheme = :fixed)` setting). +In our optimization, we will use the default fixed-point differentiation scheme which +requires a gauge fixing of the contraction environment. Since this gauge fixing involves potentially complex phases, we have to convert our real-valued contraction environment to complex numbers before the optimization. """ @@ -122,7 +121,7 @@ noise_peps = InfinitePEPS(randomize!.(deepcopy(peps.A))) peps₀ = peps + 1.0e-1noise_peps peps_opt, env_opt, E_opt, = fixedpoint( H, peps₀, complex(env); - optimizer_alg = (; tol = 1.0e-4, maxiter = 80), gradient_alg = (; iterscheme = :fixed) + optimizer_alg = (; tol = 1.0e-4, maxiter = 80), ); md""" diff --git a/examples/xxz/main.jl b/examples/xxz/main.jl index b2cf35814..fe370c526 100644 --- a/examples/xxz/main.jl +++ b/examples/xxz/main.jl @@ -72,7 +72,7 @@ From this point onwards it's business as usual: Create an initial PEPS and envir """ boundary_alg = (; tol = 1.0e-8, alg = :SimultaneousCTMRG, trunc = (; alg = :FixedSpaceTruncation)) -gradient_alg = (; tol = 1.0e-6, alg = :EigSolver, maxiter = 10, iterscheme = :fixed) +gradient_alg = (; tol = 1.0e-6, alg = :EigSolver, maxiter = 10) optimizer_alg = (; tol = 1.0e-4, alg = :LBFGS, maxiter = 85, ls_maxiter = 3, ls_maxfg = 3) peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) diff --git a/src/Defaults.jl b/src/Defaults.jl index 6cd0ca652..29c19da16 100644 --- a/src/Defaults.jl +++ b/src/Defaults.jl @@ -72,20 +72,19 @@ Module containing default algorithm parameter values and arguments. - `:C4vEighProjector` : Projection via truncated Eigh of an enlarged corner. - `:C4vQRProjector` : Projection via QR decomposition of a column-enlarged corner. -## Fixed-point gradient +## Contraction -* `gradient_tol=$(Defaults.gradient_tol)` : Convergence tolerance for the fixed-point gradient iteration. -* `gradient_maxiter=$(Defaults.gradient_maxiter)` : Maximal number of iterations for computing the CTMRG fixed-point gradient. +* `gradient_alg=:$(Defaults.gradient_alg)` : Algorithm variant for computing the implicit gradient of the contraction routine. +* `gradient_tol=$(Defaults.gradient_tol)` : Convergence tolerance for the gradient algorithm. +* `gradient_maxiter=$(Defaults.gradient_maxiter)` : Maximal number of iterations for the gradient computation. * `gradient_verbosity=$(Defaults.gradient_verbosity)` : Gradient output information verbosity. -* `gradient_linsolver=:$(Defaults.gradient_linsolver)` : Default linear solver for the `LinSolver` gradient algorithm. +* `gradient_fixedpoint_solver_alg=:$(Defaults.gradient_fixedpoint_solver_alg)` : Default solver algorithm for the `FixedPointGradient` gradient algorithm. - `: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 [`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 -* `gradient_alg=:$(Defaults.gradient_alg)` : Algorithm variant for computing the gradient fixed-point. + - `:GeomSum` : Geometric sum approximation of the Neumann series of the inverse Jacobian, see [`PEPSKit.GeomSumGradient`](@ref) for details + - `:ManualIter` : Manual fixed-point iteration, see [`PEPSKit.ManualIterGradient`](@ref) for details +* `gradient_fixedpoint_solver_eager=$(Defaults.gradient_fixedpoint_solver_eager)` : Enables `:Arnoldi` solver algorithm to finish before the full Krylov dimension is reached. ## Optimization @@ -149,11 +148,9 @@ const projector_alg_c4v = :C4vEighProjector # ∈ {:C4vEighProjector, :C4vQRProj const gradient_tol = 1.0e-6 const gradient_maxiter = 30 const gradient_verbosity = -1 -const gradient_linsolver = :BiCGStab # ∈ {:GMRES, :BiCGStab} -const gradient_eigsolver = :Arnoldi -const gradient_eigsolver_eager = true -const gradient_iterscheme = :fixed -const gradient_alg = :EigSolver # ∈ {:GeomSum, :ManualIter, :LinSolver, :EigSolver} +const gradient_alg = :FixedPointGradient +const gradient_fixedpoint_solver_alg = :GMRES # ∈ {:GMRES, :BiCGStab, :Arnoldi, :GeomSum, :ManualIter} +const gradient_fixedpoint_solver_eager = true # Optimization const reuse_env = true diff --git a/src/PEPSKit.jl b/src/PEPSKit.jl index 9fd2b396f..f15239dec 100644 --- a/src/PEPSKit.jl +++ b/src/PEPSKit.jl @@ -144,7 +144,7 @@ export product_peps export reduced_densitymatrix, expectation_value, network_value, cost_function export correlator, correlation_length export leading_boundary -export PEPSOptimize, GeomSum, ManualIter, LinSolver, EigSolver +export PEPSOptimize, FixedPointGradientGeomSum, ManualIter, LinSolver, EigSolver export fixedpoint export absorb_weight diff --git a/src/algorithms/optimization/fixed_point_differentiation.jl b/src/algorithms/optimization/fixed_point_differentiation.jl index 9b28a0f96..9237e33d3 100644 --- a/src/algorithms/optimization/fixed_point_differentiation.jl +++ b/src/algorithms/optimization/fixed_point_differentiation.jl @@ -1,13 +1,32 @@ -abstract type GradMode{F} end +abstract type GradMode{A} end -const GRADIENT_MODE_SYMBOLS = IdDict{Symbol, Type{<:GradMode}}() -const LINSOLVER_SOLVER_SYMBOLS = IdDict{Symbol, Type{<:KrylovKit.LinearSolver}}( - :GMRES => GMRES, :BiCGStab => BiCGStab +const GRADIENT_MODE_SYMBOLS = IdDict{Symbol, Type{<:GradMode}}( + :FixedPointGradient => FixedPointGradient, ) -const EIGSOLVER_SOLVER_SYMBOLS = IdDict{Symbol, Type{<:KrylovKit.KrylovAlgorithm}}( - :Arnoldi => Arnoldi + +struct FixedPointGradient{A} + solver_alg::A +end + +const FIXEDPOINT_SOLVER_SYMBOLS = IdDict{Symbol, Type{<:Any}}( + :GMRES => GMRES, :BiCGStab => BiCGStab, :Arnoldi => Arnoldi, + :GeomSum => GeomSum, :ManualIter => ManualIter, + ) +_default_solver_alg(::Type{<:FixedPointGradient}) = Defaults.gradient_fixedpoint_solver_alg +_select_solver_alg_symbol(::Type{<:FixedPointGradient}, solver_alg) = + FIXEDPOINT_SOLVER_SYMBOLS[solver_alg] + +_pad_solver_kwargs(::Type, solver_kwargs) = solver_kwargs +function _pad_solver_kwargs(::Type{<:KrylovKit.KrylovAlgorithm}, solver_kwargs) + solver_kwargs = (; + eager = Defaults.gradient_fixedpoint_solver_eager, + solver_kwargs..., + ) + return solver_kwargs +end + """ GradMode(; kwargs...) @@ -18,7 +37,6 @@ function GradMode(; tol = Defaults.gradient_tol, maxiter = Defaults.gradient_maxiter, verbosity = Defaults.gradient_verbosity, - iterscheme = Defaults.gradient_iterscheme, solver_alg = (;), ) # replace symbol with GradMode alg type @@ -26,51 +44,37 @@ function GradMode(; throw(ArgumentError("unknown GradMode algorithm: $alg")) alg_type = GRADIENT_MODE_SYMBOLS[alg] - # parse GradMode algorithm - gradient_algorithm = if alg_type <: Union{GeomSum, ManualIter} - alg_type{iterscheme}(tol, maxiter, verbosity) - elseif alg_type <: Union{<:LinSolver, <:EigSolver} - solver = if solver_alg isa NamedTuple # determine linear/eigen solver algorithm - solver_kwargs = (; tol, maxiter, verbosity, solver_alg...) - - solver_type = if alg_type <: LinSolver # replace symbol with solver alg type - solver_kwargs = (; alg = Defaults.gradient_linsolver, solver_kwargs...) - haskey(LINSOLVER_SOLVER_SYMBOLS, solver_kwargs.alg) || throw( - ArgumentError("unknown LinSolver solver: $(solver_kwargs.alg)"), - ) - LINSOLVER_SOLVER_SYMBOLS[solver_kwargs.alg] - elseif alg_type <: EigSolver - solver_kwargs = (; - alg = Defaults.gradient_eigsolver, - eager = Defaults.gradient_eigsolver_eager, - solver_kwargs..., - ) - haskey(EIGSOLVER_SOLVER_SYMBOLS, solver_kwargs.alg) || throw( - ArgumentError("unknown EigSolver solver: $(solver_kwargs.alg)"), - ) - EIGSOLVER_SOLVER_SYMBOLS[solver_kwargs.alg] - end - - solver_kwargs = Base.structdiff(solver_kwargs, (; alg = nothing)) # remove `alg` keyword argument - solver_type(; solver_kwargs...) - else - solver_alg - end + # parse solver algorithm + solver = if solver_alg isa NamedTuple # determine linear/eigen solver algorithm + solver_kwargs = (; + alg = _default_solver_alg(alg_type), + tol, + maxiter, + verbosity, + solver_alg..., + ) # overwrite with specified kwargs + + # parse solver algorithm type + solver_alg_type = _select_solver_alg_symbol(alg_type, solver_alg.alg) - alg_type{iterscheme}(solver) + # pad solver_kwargs based on solver type requirements + solver_kwargs = _pad_solver_kwargs(solver_alg_type, solver_kwargs) + + # remove `alg` keyword argument + solver_kwargs = Base.structdiff(solver_kwargs, (; alg = nothing)) + + solver_alg_type(; solver_kwargs...) else - throw(ArgumentError("unknown gradient algorithm: $alg")) + solver_alg end - return gradient_algorithm + return alg_type(solver) end -iterscheme(::GradMode{F}) where {F} = F - """ $(TYPEDEF) -Gradient mode for CTMRG using explicit evaluation of the geometric sum. +Algorithm for solving the fixed-point gradient linear problem as a geometric sum. ## Fields @@ -88,22 +92,17 @@ Construct the `GeomSum` algorithm struct based on the following keyword argument 0. Suppress output information 1. Print convergence warnings 2. Information at each gradient iteration -* `iterscheme::Symbol=:$(Defaults.gradient_iterscheme)` : Style of CTMRG iteration which is being differentiated, which can be: - - `:fixed` : the differentiated CTMRG iteration uses a pre-computed SVD with a fixed set of gauges """ -struct GeomSum{F} <: GradMode{F} - tol::Real - maxiter::Int - verbosity::Int +@kwdef struct GeomSum + tol::Real = Defaults.gradient_tol + maxiter::Int = Defaults.gradient_maxiter + verbosity::Int = Defaults.gradient_verbosity end -GeomSum(; kwargs...) = GradMode(; alg = :GeomSum, kwargs...) - -GRADIENT_MODE_SYMBOLS[:GeomSum] = GeomSum """ $(TYPEDEF) -Gradient mode for CTMRG using manual iteration to solve the linear problem. +Algorithm for solving the fixed-point gradient linear problem using manual iteration. ## Fields @@ -121,80 +120,12 @@ Construct the `ManualIter` algorithm struct based on the following keyword argum 0. Suppress output information 1. Print convergence warnings 2. Information at each gradient iteration -* `iterscheme::Symbol=:$(Defaults.gradient_iterscheme)` : Style of CTMRG iteration which is being differentiated, which can be: - - `:fixed` : the differentiated CTMRG iteration uses a pre-computed SVD with a fixed set of gauges """ -struct ManualIter{F} <: GradMode{F} - tol::Real - maxiter::Int - verbosity::Int +@kwdef struct ManualIter + tol::Real = Defaults.gradient_tol + maxiter::Int = Defaults.gradient_maxiter + verbosity::Int = Defaults.gradient_verbosity end -ManualIter(; kwargs...) = GradMode(; alg = :ManualIter, kwargs...) - -GRADIENT_MODE_SYMBOLS[:ManualIter] = ManualIter - -""" -$(TYPEDEF) - -Gradient mode wrapper around `KrylovKit.LinearSolver` for solving the gradient linear -problem using iterative solvers. - -## 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. -* `verbosity::Int=$(Defaults.gradient_verbosity)` : Output information verbosity of the linear solver. -* `iterscheme::Symbol=:$(Defaults.gradient_iterscheme)` : Style of CTMRG iteration which is being differentiated, which can be: - - `:fixed` : the differentiated CTMRG iteration uses a pre-computed SVD with a fixed set of gauges -* `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 [`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 -end -LinSolver(; kwargs...) = GradMode(; alg = :LinSolver, kwargs...) - -GRADIENT_MODE_SYMBOLS[:LinSolver] = LinSolver - -""" -$(TYPEDEF) - -Gradient mode wrapper around `KrylovKit.KrylovAlgorithm` for solving the gradient linear -problem as an eigenvalue problem. - -## 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. -* `verbosity::Int=$(Defaults.gradient_verbosity)` : Output information verbosity of the linear solver. -* `iterscheme::Symbol=:$(Defaults.gradient_iterscheme)` : Style of CTMRG iteration which is being differentiated, which can be: - - `:fixed` : the differentiated CTMRG iteration uses a pre-computed SVD with a fixed set of gauges -* `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 [`KrylovKit.Arnoldi`](@extref) for details -""" -struct EigSolver{F} <: GradMode{F} - solver_alg::KrylovKit.KrylovAlgorithm -end -EigSolver(; kwargs...) = GradMode(; alg = :EigSolver, kwargs...) - -GRADIENT_MODE_SYMBOLS[:EigSolver] = EigSolver """ _check_algorithm_combination(boundary_alg, gradient_alg_or_symmetrization) @@ -210,8 +141,8 @@ function _check_algorithm_combination(boundary_alg, gradient_alg, symmetrization _check_algorithm_combination(boundary_alg, symmetrization) return nothing end -function _check_algorithm_combination(::SequentialCTMRG, ::GradMode{:fixed}) - msg = "`:fixed` mode is not compatible with `SequentialCTMRG` since the sequential \ +function _check_algorithm_combination(::SequentialCTMRG, ::FixedPointGradient) + msg = "The `:FixedPointGradient` algorithm is not compatible with `SequentialCTMRG` since the sequential \ application of SVDs does not allow to differentiate through a fixed set of \ gauges; select SimultaneousCTMRG instead to use :fixed mode" throw(ArgumentError(msg)) @@ -240,9 +171,9 @@ function _set_fixed_truncation(alg::CTMRGAlgorithm) return alg_fixed end -# Here f is differentiated from an pre-computed SVD with fixed U, S and V +# compute the CTMRG gradient through fixed-point differentiation function _rrule( - gradmode::GradMode{:fixed}, + gradmode::FixedPointGradient, config::RuleConfig, ::typeof(MPSKit.leading_boundary), envinit, @@ -252,13 +183,12 @@ function _rrule( _check_algorithm_combination(alg, gradmode) env, = leading_boundary(envinit, state, alg) + + # prepare iterating function corresponding to a single gauge-fixed CTMRG iteration alg_fixed = _set_fixed_truncation(alg) # fix spaces during differentiation alg_gauge = _scrambling_env_gauge(alg) # TODO: make this a field in GradMode? env_conv, info = ctmrg_iteration(InfiniteSquareNetwork(state), env, alg_fixed) signs, corner_phases, edge_phases = compute_gauge_fix_gauge(env_conv, env, alg_gauge) - - # prepare iterating function corresponding to a single CTMRG iteration with a - # gauge-fixed projector function gauge_fixed_iteration(A, x) return fix_phases( ctmrg_iteration(InfiniteSquareNetwork(A), x, alg_fixed)[1], @@ -275,7 +205,7 @@ function _rrule( Δenv = unthunk(Δenv′) # evaluate the geometric sum - ∂F∂env = fpgrad(Δenv, ∂f∂x, ∂f∂A, Δenv, gradmode) + ∂F∂env = fixedpoint_gradient(Δenv, ∂f∂x, ∂f∂A, Δenv, gradmode.solver_alg) return NoTangent(), ZeroTangent(), ∂F∂env, NoTangent() end @@ -284,7 +214,9 @@ function _rrule( end @doc """ - fpgrad(∂F∂x, ∂f∂x, ∂f∂A, y0, alg) + fixedpoint_gradient(∂e∂x, ∂f∂x, ∂f∂p, y0, alg) + +TODO: explain fixed-point differentiation. Compute the gradient of the CTMRG fixed point by solving the following equation: @@ -296,12 +228,12 @@ is the partial gradient of the CTMRG iteration with respect to the environment t `y0` is the initial guess for the fixed-point iteration. The function returns the gradient `dx` of the fixed-point iteration. """ -fpgrad +fixedpoint_gradient # TODO: can we construct an implementation that does not need to evaluate the vjp # twice if both ∂f∂A and ∂f∂x are needed? -function fpgrad(∂F∂x, ∂f∂x, ∂f∂A, _, alg::GeomSum) - g = ∂F∂x +function fixedpoint_gradient(∂E∂x, ∂f∂x, ∂f∂A, _, alg::GeomSum) + g = ∂E∂x dx = ∂f∂A(g) # n = 0 term: ∂F∂x ∂f∂A ϵ = 2 * alg.tol for i in 1:(alg.maxiter) @@ -322,12 +254,12 @@ function fpgrad(∂F∂x, ∂f∂x, ∂f∂A, _, alg::GeomSum) return dx end -function fpgrad(∂F∂x, ∂f∂x, ∂f∂A, y₀, alg::ManualIter) +function fixedpoint_gradient(∂E∂x, ∂f∂x, ∂f∂A, y₀, alg::ManualIter) y = deepcopy(y₀) # Do not mutate y₀ dx = ∂f∂A(y) ϵ = 1.0 for i in 1:(alg.maxiter) - y′ = ∂F∂x + ∂f∂x(y) + y′ = ∂E∂x + ∂f∂x(y) dxnew = ∂f∂A(y′) ϵnew = norm(dxnew - dx) @@ -347,8 +279,8 @@ function fpgrad(∂F∂x, ∂f∂x, ∂f∂A, y₀, alg::ManualIter) return dx end -function fpgrad(∂F∂x, ∂f∂x, ∂f∂A, y₀, alg::LinSolver) - y, info = reallinsolve(∂f∂x, ∂F∂x, y₀, alg.solver_alg, 1, -1) +function fixedpoint_gradient(∂E∂x, ∂f∂x, ∂f∂A, y₀, alg::KrylovKit.LinearSolver) + y, info = reallinsolve(∂f∂x, ∂E∂x, y₀, alg, 1, -1) if alg.solver_alg.verbosity > 0 && info.converged != 1 @warn("gradient fixed-point iteration reached maximal number of iterations:", info) end @@ -356,30 +288,21 @@ function fpgrad(∂F∂x, ∂f∂x, ∂f∂A, y₀, alg::LinSolver) return ∂f∂A(y) end -function fpgrad(∂F∂x, ∂f∂x, ∂f∂A, x₀, alg::EigSolver) +function fixedpoint_gradient(∂E∂x, ∂f∂x, ∂f∂A, x₀, alg::KrylovKit.KrylovAlgorithm) function f(X) y = ∂f∂x(X[1]) - return (VI.add!!(y, ∂F∂x, X[2]), X[2]) + return (VI.add!!(y, ∂E∂x, X[2]), X[2]) end X₀ = (x₀, one(scalartype(x₀))) - _, vecs, info = realeigsolve(f, X₀, 1, :LM, alg.solver_alg) + _, vecs, info = realeigsolve(f, X₀, 1, :LM, alg) if alg.solver_alg.verbosity > 0 && info.converged < 1 @warn("gradient fixed-point iteration reached maximal number of iterations:", info) end - if norm(vecs[1][2]) < 1.0e-2 * alg.solver_alg.tol + if norm(vecs[1][2]) < 1.0e-2 * alg.tol @warn "Fixed-point gradient computation using Arnoldi failed:\n\tauxiliary component should be finite but was $(vecs[1][2])\n\tpossibly the Jacobian does not have a unique eigenvalue 1" @info "Falling back to linear solver for fixed-point gradient computation." - backup_ls_alg = _alg_or_nt( - GradMode, - (; - alg = :LinSolver, - tol = alg.solver_alg.tol, - maxiter = alg.solver_alg.maxiter * alg.solver_alg.krylovdim, - verbosity = alg.solver_alg.verbosity, - iterscheme = iterscheme(alg), - ) - ) - return fpgrad(∂F∂x, ∂f∂x, ∂f∂A, x₀, backup_ls_alg) + backup_ls_alg = GMRES(; tol = alg.tol, maxiter = alg.maxiter, verbosity = alg.verbosity) + return fixedpoint_gradient(∂E∂x, ∂f∂x, ∂f∂A, x₀, backup_ls_alg) else y = VI.scale!!(vecs[1][1], inv(vecs[1][2])) end diff --git a/src/algorithms/optimization/peps_optimization.jl b/src/algorithms/optimization/peps_optimization.jl index 511ce8261..b8d061104 100644 --- a/src/algorithms/optimization/peps_optimization.jl +++ b/src/algorithms/optimization/peps_optimization.jl @@ -129,7 +129,7 @@ keyword arguments are: * `tol::Real=1e-2tol` : Convergence tolerance for the fixed-point gradient iteration. * `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) + - `:FixedPoint Gradient` : 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) - `:EigSolver` : Determine gradient via eigenvalue formulation of its Sylvester equation, see [`EigSolver`](@ref) diff --git a/src/algorithms/select_algorithm.jl b/src/algorithms/select_algorithm.jl index ff3f8eea9..93445a6b5 100644 --- a/src/algorithms/select_algorithm.jl +++ b/src/algorithms/select_algorithm.jl @@ -34,10 +34,6 @@ function select_algorithm( # C4vCTMRG-specific defaults if boundary_alg isa C4vCTMRG - # use :LinSolver GradMode since :EigSolver tends to have hiccups - if gradient_alg isa NamedTuple - haskey(gradient_alg, :alg) || (gradient_alg = merge((; alg = :LinSolver), gradient_alg)) - end # symmetrize state and gradient if isnothing(symmetrization) symmetrization = RotateReflect() diff --git a/test/examples/heisenberg.jl b/test/examples/heisenberg.jl index 6dbbccd7c..6cb797b2b 100644 --- a/test/examples/heisenberg.jl +++ b/test/examples/heisenberg.jl @@ -142,7 +142,7 @@ end ham, peps, complex(env); # make environment complex explicitly optimizer_alg = (; tol = gradtol, maxiter = 25), boundary_alg = (; maxiter = ctmrg_maxiter), - gradient_alg = (; alg = :LinSolver, solver_alg = (; alg = :GMRES)), + gradient_alg = (; solver_alg = (; alg = :GMRES)), ) # sensitivity warnings and degeneracies due to SU(2)? ξ_h, ξ_v, = correlation_length(peps_final, env_final) e_site2 = E_final / (N1 * N2) diff --git a/test/gradients/ctmrg_gradients.jl b/test/gradients/ctmrg_gradients.jl index 0c277e144..10e5b5313 100644 --- a/test/gradients/ctmrg_gradients.jl +++ b/test/gradients/ctmrg_gradients.jl @@ -21,9 +21,10 @@ ctmrg_verbosity = 0 ctmrg_algs = [[:SequentialCTMRG, :SimultaneousCTMRG], [:SequentialCTMRG, :SimultaneousCTMRG]] projector_algs = [[:HalfInfiniteProjector, :FullInfiniteProjector], [:HalfInfiniteProjector, :FullInfiniteProjector]] svd_rrule_algs = [[:full, :trunc, :Arnoldi], [:full, :Arnoldi]] -gradient_algs = [ - [nothing, :GeomSum, :ManualIter, :LinSolver, :EigSolver], - [:GeomSum, :ManualIter, :LinSolver, :EigSolver], +gradient_algs = [[nothing, :FixedPointGradient], [:FixedPointGradient]] +gradient_solver_algs = [ + [:GeomSum, :ManualIter, :GMRES, :BiCGStab, :Arnoldi], + [:GeomSum, :ManualIter, :GMRES, :BiCGStab, :Arnoldi], ] steps = -0.01:0.005:0.01 @@ -57,10 +58,11 @@ end palgs = projector_algs[i] salgs = svd_rrule_algs[i] galgs = gradient_algs[i] - @testset "ctmrg_alg=:$ctmrg_alg, projector_alg=:$projector_alg, svd_rrule_alg=:$svd_rrule_alg and gradient_alg=:$gradient_alg" for ( - ctmrg_alg, projector_alg, svd_rrule_alg, gradient_alg, + gsalgs = gradient_solver_algs[i] + @testset "ctmrg_alg=:$ctmrg_alg, projector_alg=:$projector_alg, svd_rrule_alg=:$svd_rrule_alg, gradient_alg=:$gradient_alg and gradient_solver_alg=:$gradient_solver_alg" for ( + ctmrg_alg, projector_alg, svd_rrule_alg, gradient_alg, gradient_solver_alg, ) in Iterators.product( - calgs, palgs, salgs, galgs + calgs, palgs, salgs, galgs, gsalgs ) # filter disallowed algorithm combinations @@ -70,7 +72,7 @@ end # but verify that its use would throw an error @test_throws ArgumentError PEPSOptimize(; boundary_alg = (; alg = ctmrg_alg, projector_alg, decomposition_alg = (; rrule_alg = (; alg = svd_rrule_alg))), - gradient_alg = (; alg = gradient_alg, tol = gradtol, iterscheme = :fixed), + gradient_alg = (; alg = gradient_alg, solver_alg = (; alg = gradient_solver_alg, tol = gradtol)), ) continue end @@ -98,7 +100,7 @@ end concrete_gradient_alg = if isnothing(gradient_alg) nothing # TODO: add this to the PEPSKit.GradMode selector? else - PEPSKit.GradMode(; alg = gradient_alg, tol = gradtol) + PEPSKit.GradMode(; alg = gradient_alg, solver_alg = (; alg = gradient_solver_alg, tol = gradtol)) end env, = leading_boundary(CTMRGEnv(psi, Espace), psi, contrete_ctmrg_alg) alphas, fs, dfs1, dfs2 = OptimKit.optimtest( @@ -130,7 +132,7 @@ end Random.seed!(1234) boundary_alg = PEPSKit.CTMRGAlgorithm(; tol = 1.0e-10) - gradient_alg = PEPSKit.GradMode(; alg = :LinSolver, tol = 5.0e-8) + gradient_alg = PEPSKit.GradMode(; tol = 5.0e-8) function fg((peps, env)) E, g = Zygote.withgradient(peps) do ψ From 127958a405762febc81bb1a3f7b4dceecc7936ca Mon Sep 17 00:00:00 2001 From: leburgel Date: Thu, 21 May 2026 15:47:55 +0200 Subject: [PATCH 2/9] Fixes and cleanup --- src/Defaults.jl | 2 +- src/PEPSKit.jl | 2 +- .../fixed_point_differentiation.jl | 128 ++++++++++++------ .../optimization/peps_optimization.jl | 10 +- test/ctmrg/jacobian_real_linear.jl | 20 ++- test/ctmrg/pepo.jl | 7 +- test/examples/bose_hubbard.jl | 2 +- test/examples/j1j2_model.jl | 3 +- test/gradients/c4v_ctmrg_gradients.jl | 15 +- test/gradients/ctmrg_gradients.jl | 7 +- 10 files changed, 123 insertions(+), 73 deletions(-) diff --git a/src/Defaults.jl b/src/Defaults.jl index 29c19da16..5a1a9aca5 100644 --- a/src/Defaults.jl +++ b/src/Defaults.jl @@ -149,7 +149,7 @@ const gradient_tol = 1.0e-6 const gradient_maxiter = 30 const gradient_verbosity = -1 const gradient_alg = :FixedPointGradient -const gradient_fixedpoint_solver_alg = :GMRES # ∈ {:GMRES, :BiCGStab, :Arnoldi, :GeomSum, :ManualIter} +const gradient_fixedpoint_solver_alg = :Arnoldi # ∈ {:GMRES, :BiCGStab, :Arnoldi, :GeomSum, :ManualIter} const gradient_fixedpoint_solver_eager = true # Optimization diff --git a/src/PEPSKit.jl b/src/PEPSKit.jl index f15239dec..66ae6e04e 100644 --- a/src/PEPSKit.jl +++ b/src/PEPSKit.jl @@ -144,7 +144,7 @@ export product_peps export reduced_densitymatrix, expectation_value, network_value, cost_function export correlator, correlation_length export leading_boundary -export PEPSOptimize, FixedPointGradientGeomSum, ManualIter, LinSolver, EigSolver +export PEPSOptimize, FixedPointGradient, GeomSum, ManualIter export fixedpoint export absorb_weight diff --git a/src/algorithms/optimization/fixed_point_differentiation.jl b/src/algorithms/optimization/fixed_point_differentiation.jl index 9237e33d3..30aa8d4e9 100644 --- a/src/algorithms/optimization/fixed_point_differentiation.jl +++ b/src/algorithms/optimization/fixed_point_differentiation.jl @@ -1,31 +1,15 @@ abstract type GradMode{A} end -const GRADIENT_MODE_SYMBOLS = IdDict{Symbol, Type{<:GradMode}}( - :FixedPointGradient => FixedPointGradient, -) - -struct FixedPointGradient{A} - solver_alg::A -end - -const FIXEDPOINT_SOLVER_SYMBOLS = IdDict{Symbol, Type{<:Any}}( - :GMRES => GMRES, :BiCGStab => BiCGStab, :Arnoldi => Arnoldi, - :GeomSum => GeomSum, :ManualIter => ManualIter, - -) - -_default_solver_alg(::Type{<:FixedPointGradient}) = Defaults.gradient_fixedpoint_solver_alg -_select_solver_alg_symbol(::Type{<:FixedPointGradient}, solver_alg) = - FIXEDPOINT_SOLVER_SYMBOLS[solver_alg] - +const GRADIENT_MODE_SYMBOLS = IdDict{Symbol, Type{<:GradMode}}() + +# default solver algorithm for each gradient algorithm type +_default_solver_alg(::Type{T}) where {T <: GradMode} = + throw(ArgumentError("No default solver algorithm defined for gradient algorithm $(T)")) +# map solver algorithm symbol to solver algorithm type for each gradient algorithm type +_select_solver_alg_symbol(::Type{T}, solver_alg) where {T <: GradMode} = + throw(ArgumentError("No solver algorithm symbols specified for gradient algorithm $(T)")) +# add algorithm-specific keyword arguments to solver kwargs if needed _pad_solver_kwargs(::Type, solver_kwargs) = solver_kwargs -function _pad_solver_kwargs(::Type{<:KrylovKit.KrylovAlgorithm}, solver_kwargs) - solver_kwargs = (; - eager = Defaults.gradient_fixedpoint_solver_eager, - solver_kwargs..., - ) - return solver_kwargs -end """ GradMode(; kwargs...) @@ -55,7 +39,7 @@ function GradMode(; ) # overwrite with specified kwargs # parse solver algorithm type - solver_alg_type = _select_solver_alg_symbol(alg_type, solver_alg.alg) + solver_alg_type = _select_solver_alg_symbol(alg_type, solver_kwargs.alg) # pad solver_kwargs based on solver type requirements solver_kwargs = _pad_solver_kwargs(solver_alg_type, solver_kwargs) @@ -71,6 +55,60 @@ function GradMode(; return alg_type(solver) end +# +# Fixed-point gradient computation +# + + +""" +$(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. + +## Fields + +$(TYPEDFIELDS) + +## Constructors + + FixedPointGradient(; kwargs...) + +Construct a fixed-point gradient algorithm struct based on keyword arguments. +For a full description, see [`leading_boundary`](@ref). The supported keywords are: + +* `tol::Real=$(Defaults.gradient_tol)` +* `maxiter::Int=$(Defaults.gradient_maxiter)` +* `miniter::Int=$(Defaults.gradient_miniter)` +* `verbosity::Int=$(Defaults.gradient_verbosity)` +* `solver_alg::Union{Algorithm,NamedTuple}=(; alg::Symbol=:$(Defaults.gradient_fixedpoint_solver_alg))`: solver algorithm for the `FixedPointGradient` gradient algorithm. + - `: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 + - `:GeomSum` : Geometric sum approximation of the Neumann series of the inverse Jacobian, see [`PEPSKit.GeomSumGradient`](@ref) for details + - `:ManualIter` : Manual fixed-point iteration, see [`PEPSKit.ManualIterGradient`](@ref) for details +""" +struct FixedPointGradient{A} <: GradMode{A} + solver_alg::A +end +FixedPointGradient(; kwargs...) = GradMode(; alg = :FixedPointGradient, kwargs...) +GRADIENT_MODE_SYMBOLS[:FixedPointGradient] = FixedPointGradient + +const FIXEDPOINT_SOLVER_SYMBOLS = IdDict{Symbol, Type{<:Any}}( + :GMRES => GMRES, :BiCGStab => BiCGStab, :Arnoldi => Arnoldi, +) + +_default_solver_alg(::Type{<:FixedPointGradient}) = Defaults.gradient_fixedpoint_solver_alg +_select_solver_alg_symbol(::Type{<:FixedPointGradient}, solver_alg) = + FIXEDPOINT_SOLVER_SYMBOLS[solver_alg] +function _pad_solver_kwargs(::Type{<:Arnoldi}, solver_kwargs) + solver_kwargs = (; + eager = Defaults.gradient_fixedpoint_solver_eager, + solver_kwargs..., + ) + return solver_kwargs +end + """ $(TYPEDEF) @@ -98,6 +136,7 @@ Construct the `GeomSum` algorithm struct based on the following keyword argument maxiter::Int = Defaults.gradient_maxiter verbosity::Int = Defaults.gradient_verbosity end +FIXEDPOINT_SOLVER_SYMBOLS[:GeomSum] = GeomSum """ $(TYPEDEF) @@ -126,6 +165,7 @@ Construct the `ManualIter` algorithm struct based on the following keyword argum maxiter::Int = Defaults.gradient_maxiter verbosity::Int = Defaults.gradient_verbosity end +FIXEDPOINT_SOLVER_SYMBOLS[:ManualIter] = ManualIter """ _check_algorithm_combination(boundary_alg, gradient_alg_or_symmetrization) @@ -213,20 +253,32 @@ function _rrule( return (env, info), leading_boundary_fixed_pullback end -@doc """ - fixedpoint_gradient(∂e∂x, ∂f∂x, ∂f∂p, y0, alg) +@doc raw""" + fixedpoint_gradient(x̆, ∂ₓf, ∂ₚf, y₀, alg) + +Evaluates the VJP action ``x̆ ∂ₚx`` for an intermediate variable ``x \equiv x(p)`` +characterized which satisfies the fixed-point equation ``x = f(x, p)``, given the +VJP actions ``∂ₓf`` and ``∂ₚf`` of the iterating function ``f``. -TODO: explain fixed-point differentiation. +More specifically, given a cost function ``E(x(p), p)`` defined in terms of a set of +variational parameters ``p`` and a set of intermediate variables ``x`` that depend on ``p``, +``x \equiv x(p)``, the gradient of the cost function is given by -Compute the gradient of the CTMRG fixed point by solving the following equation: +```math +dE/dp = ∂ₓE ∂ₚx + ∂ₚE. +``` -dx = ∑ₙ (∂f∂x)ⁿ ∂f∂A dA = (1 - ∂f∂x)⁻¹ ∂f∂A dA +Given the fixed-point equation ``x = f(x, p)``, the VJP action of the Jacobian ``∂ₚx``` on +the adjoint ``x̆ = ∂ₓE`` in the first term of this expression can be evaluated through +implicit differentiation of the fixed-point condition as +```math +x̆ ∂ₚx = x̆ (1 - ∂ₓf)⁻¹ ∂ₚf = ∑ₙ x̆ (∂ₓf)ⁿ ∂ₚf. +``` -where `∂F∂x` is the gradient of the cost function with respect to the PEPS tensors, `∂f∂x` -is the partial gradient of the CTMRG iteration with respect to the environment tensors, -`∂f∂A` is the partial gradient of the CTMRG iteration with respect to the PEPS tensors, and -`y0` is the initial guess for the fixed-point iteration. The function returns the gradient -`dx` of the fixed-point iteration. +This can be used to differentiate contraction routines, where ``p`` are the variational +parameters of a tensor network, ``x̆ = ∂ₓE`` is the partial +derivative of the cost function with respect to the contraction environment ``x``, and ``f`` +is a single iteration of the contraction algorithm. """ fixedpoint_gradient @@ -281,7 +333,7 @@ end function fixedpoint_gradient(∂E∂x, ∂f∂x, ∂f∂A, y₀, alg::KrylovKit.LinearSolver) y, info = reallinsolve(∂f∂x, ∂E∂x, y₀, alg, 1, -1) - if alg.solver_alg.verbosity > 0 && info.converged != 1 + if alg.verbosity > 0 && info.converged != 1 @warn("gradient fixed-point iteration reached maximal number of iterations:", info) end @@ -295,7 +347,7 @@ function fixedpoint_gradient(∂E∂x, ∂f∂x, ∂f∂A, x₀, alg::KrylovKit. end X₀ = (x₀, one(scalartype(x₀))) _, vecs, info = realeigsolve(f, X₀, 1, :LM, alg) - if alg.solver_alg.verbosity > 0 && info.converged < 1 + if alg.verbosity > 0 && info.converged < 1 @warn("gradient fixed-point iteration reached maximal number of iterations:", info) end if norm(vecs[1][2]) < 1.0e-2 * alg.tol diff --git a/src/algorithms/optimization/peps_optimization.jl b/src/algorithms/optimization/peps_optimization.jl index b8d061104..14c22c501 100644 --- a/src/algorithms/optimization/peps_optimization.jl +++ b/src/algorithms/optimization/peps_optimization.jl @@ -128,14 +128,10 @@ keyword arguments are: * `tol::Real=1e-2tol` : Convergence tolerance for the fixed-point gradient iteration. * `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: - - `:FixedPoint Gradient` : 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) - - `: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: - - `:fixed` : the differentiated CTMRG iteration uses a pre-computed SVD with a fixed set of gauges +* `alg::Symbol=:$(Defaults.gradient_alg)` : Implicit gradient algorithm variant, can be one of the following: + - `:FixedPointGradient` : Compute the gradient via fixed-point differentiation, see [`FixedPointGradient`](@ref) +* `solver_alg::`Union{Algorithm,NamedTuple}`: Solver algorithm for computing the implicit gradient; see [`FixedPointGradient`](@ref) for supported algorithms. ### Optimizer settings diff --git a/test/ctmrg/jacobian_real_linear.jl b/test/ctmrg/jacobian_real_linear.jl index 2c6b5450c..9738aaa16 100644 --- a/test/ctmrg/jacobian_real_linear.jl +++ b/test/ctmrg/jacobian_real_linear.jl @@ -7,27 +7,25 @@ using PEPSKit: ctmrg_iteration, compute_gauge_fix_gauge, fix_phases, ScramblingEnvGauge algs = [ - (:fixed, SimultaneousCTMRG(; projector_alg = :HalfInfiniteProjector)), - (:fixed, SimultaneousCTMRG(; projector_alg = :FullInfiniteProjector)), # TODO: why are the errors quite a bit larger for :FullInfiniteProjector? + SimultaneousCTMRG(; projector_alg = :HalfInfiniteProjector), + SimultaneousCTMRG(; projector_alg = :FullInfiniteProjector), # TODO: why are the errors quite a bit larger for :FullInfiniteProjector? ] Dbond, χenv = 2, 16 alg_gauge = ScramblingEnvGauge() errtol = 1.0e-3 -@testset "$iterscheme and $ctm_alg" for (iterscheme, ctm_alg) in algs +@testset "$ctm_alg" for ctm_alg in algs Random.seed!(123521938519) state = InfinitePEPS(ComplexSpace(2), ComplexSpace(Dbond)) env, = leading_boundary(CTMRGEnv(state, ComplexSpace(χenv)), state, ctm_alg) # follow code of _rrule - if iterscheme == :fixed - env_conv, info = ctmrg_iteration(InfiniteSquareNetwork(state), env, ctm_alg) - signs, corner_phases, edge_phases = compute_gauge_fix_gauge(env_conv, env, alg_gauge) - - _, env_vjp = pullback(state, env_conv) do A, x - e, = ctmrg_iteration(InfiniteSquareNetwork(A), x, ctm_alg) - return fix_phases(e, signs, corner_phases, edge_phases) - end + env_conv, info = ctmrg_iteration(InfiniteSquareNetwork(state), env, ctm_alg) + signs, corner_phases, edge_phases = compute_gauge_fix_gauge(env_conv, env, alg_gauge) + + _, env_vjp = pullback(state, env_conv) do A, x + e, = ctmrg_iteration(InfiniteSquareNetwork(A), x, ctm_alg) + return fix_phases(e, signs, corner_phases, edge_phases) end # get Jacobians of single iteration diff --git a/test/ctmrg/pepo.jl b/test/ctmrg/pepo.jl index b1fcc6d76..23c0d5184 100644 --- a/test/ctmrg/pepo.jl +++ b/test/ctmrg/pepo.jl @@ -85,9 +85,8 @@ end # prep ctm_alg = SimultaneousCTMRG(; maxiter = 150, tol = 1.0e-8, verbosity = 2) - alg_rrule = EigSolver(; + gradient_alg = FixedPointGradient(; solver_alg = KrylovKit.Arnoldi(; maxiter = 30, tol = 1.0e-6, eager = true), - iterscheme = :fixed, ) opt_alg = LBFGS(32; maxiter = 50, gradtol = 1.0e-5, verbosity = 3) function pepo_retract(x, η, α) @@ -116,11 +115,11 @@ end E, gs = withgradient(psi) do ψ n2 = InfiniteSquareNetwork(ψ) env2′, info = PEPSKit.hook_pullback( - leading_boundary, env2, n2, ctm_alg; alg_rrule + leading_boundary, env2, n2, ctm_alg; gradient_alg ) n3 = InfiniteSquareNetwork(ψ, T) env3′, info = PEPSKit.hook_pullback( - leading_boundary, env3, n3, ctm_alg; alg_rrule + leading_boundary, env3, n3, ctm_alg; gradient_alg ) PEPSKit.ignore_derivatives() do PEPSKit.update!(env2, env2′) diff --git a/test/examples/bose_hubbard.jl b/test/examples/bose_hubbard.jl index f0cfdd3a1..946775d25 100644 --- a/test/examples/bose_hubbard.jl +++ b/test/examples/bose_hubbard.jl @@ -27,7 +27,7 @@ Venv = U1Space(0 => 6, 1 => 4, -1 => 4, 2 => 2, -2 => 2) # algorithms boundary_alg = (; tol = 1.0e-8, alg = :SimultaneousCTMRG, verbosity = 2, trunc = (; alg = :FixedSpaceTruncation)) -gradient_alg = (; tol = 1.0e-6, maxiter = 10, alg = :EigSolver, iterscheme = :fixed) +gradient_alg = (; tol = 1.0e-6, maxiter = 10) optimizer_alg = (; tol = 1.0e-4, alg = :LBFGS, verbosity = 3, maxiter = 25, ls_maxiter = 2, ls_maxfg = 2) reuse_env = true diff --git a/test/examples/j1j2_model.jl b/test/examples/j1j2_model.jl index 3ab11d6cf..5fe911c5e 100644 --- a/test/examples/j1j2_model.jl +++ b/test/examples/j1j2_model.jl @@ -19,7 +19,8 @@ env₀, = leading_boundary(CTMRGEnv(peps₀, ComplexSpace(χenv)), peps₀) # find fixedpoint peps, env, E, = fixedpoint( H, peps₀, env₀; - tol = 1.0e-3, gradient_alg = (; iterscheme = :fixed), symmetrization = RotateReflect(), + tol = 1.0e-3, + symmetrization = RotateReflect(), ) ξ_h, ξ_v, = correlation_length(peps, env) diff --git a/test/gradients/c4v_ctmrg_gradients.jl b/test/gradients/c4v_ctmrg_gradients.jl index 06ca98513..1f51c3d2d 100644 --- a/test/gradients/c4v_ctmrg_gradients.jl +++ b/test/gradients/c4v_ctmrg_gradients.jl @@ -24,7 +24,8 @@ ctmrg_verbosity = 1 ctmrg_algs = [[:C4vCTMRG]] projector_algs = [[:C4vEighProjector, :C4vQRProjector]] decomposition_rrule_algs = [[:full, :trunc, :qr]] -gradient_algs = [[nothing, :GeomSum, :ManualIter, :LinSolver, :EigSolver]] # they all use :fixed mode by default (except for nothing) +gradient_algs = [[nothing, :FixedPointGradient]] +gradient_solver_algs = [[:GeomSum, :ManualIter, :GMRES, :BiCGStab, :Arnoldi]] steps = -0.01:0.005:0.01 # record which rrule alg is compatible with which projector alg @@ -50,10 +51,11 @@ naive_gradient_done = Set() palgs = projector_algs[i] dalgs = decomposition_rrule_algs[i] galgs = gradient_algs[i] - @testset "ctmrg_alg=:$ctmrg_alg, projector_alg=:$projector_alg, decomposition_rrule_alg=:$decomposition_rrule_alg and gradient_alg=:$gradient_alg" for ( - ctmrg_alg, projector_alg, decomposition_rrule_alg, gradient_alg, + gsalgs = gradient_solver_algs[i] + @testset "ctmrg_alg=:$ctmrg_alg, projector_alg=:$projector_alg, decomposition_rrule_alg=:$decomposition_rrule_alg and gradient_alg=(alg = :$gradient_alg, solver_alg = :$gradient_solver_alg)" for ( + ctmrg_alg, projector_alg, decomposition_rrule_alg, gradient_alg, gradient_solver_alg, ) in Iterators.product( - calgs, palgs, dalgs, galgs + calgs, palgs, dalgs, galgs, gsalgs ) # check for allowed algorithm combinations when testing naive gradient @@ -62,6 +64,7 @@ naive_gradient_done = Set() combo in naive_gradient_combinations || continue combo in naive_gradient_done && continue push!(naive_gradient_done, combo) + gradient_solver_alg = nothing # unused in naive gradient, so set to nothing to avoid confusion end # check for allowed combinations of projector alg and decomposition rrule alg @@ -76,7 +79,7 @@ naive_gradient_done = Set() error("unknown projector alg: $projector_alg") end - @info "optimtest of ctmrg_alg=:$ctmrg_alg, projector_alg=:$projector_alg, decomposition_rrule_alg=:$decomposition_rrule_alg and gradient_alg=:$gradient_alg on $(names[i])" + @info "optimtest of ctmrg_alg=:$ctmrg_alg, projector_alg=:$projector_alg, decomposition_rrule_alg=:$decomposition_rrule_alg and gradient_alg=(; alg = :$gradient_alg, solver_alg = (; alg = :$gradient_solver_alg)) on $(names[i])" Random.seed!(sd) dir = InfinitePEPS(Pspace, Vspace) psi = InfinitePEPS(Pspace, Vspace) @@ -93,7 +96,7 @@ naive_gradient_done = Set() concrete_gradient_alg = if isnothing(gradient_alg) nothing # TODO: add this to the PEPSKit.GradMode selector? else - PEPSKit.GradMode(; alg = gradient_alg, tol = gradtol) + PEPSKit.GradMode(; alg = gradient_alg, solver_alg = (; alg = gradient_solver_alg, tol = gradtol)) end env0 = PEPSKit.initialize_random_c4v_env(psi, Espace) env, = leading_boundary(env0, psi, contrete_ctmrg_alg) diff --git a/test/gradients/ctmrg_gradients.jl b/test/gradients/ctmrg_gradients.jl index 10e5b5313..5ed82893a 100644 --- a/test/gradients/ctmrg_gradients.jl +++ b/test/gradients/ctmrg_gradients.jl @@ -36,7 +36,7 @@ naive_gradient_combinations = [ ] naive_gradient_done = Set() -# :fixed iterscheme is incompatible with sequential CTMRG +# fixed-point differentiation is incompatible with sequential CTMRG function _check_disallowed_combination( ctmrg_alg, projector_alg, decomposition_rrule_alg, gradient_alg ) @@ -59,7 +59,7 @@ end salgs = svd_rrule_algs[i] galgs = gradient_algs[i] gsalgs = gradient_solver_algs[i] - @testset "ctmrg_alg=:$ctmrg_alg, projector_alg=:$projector_alg, svd_rrule_alg=:$svd_rrule_alg, gradient_alg=:$gradient_alg and gradient_solver_alg=:$gradient_solver_alg" for ( + @testset "ctmrg_alg=:$ctmrg_alg, projector_alg=:$projector_alg, svd_rrule_alg=:$svd_rrule_alg, gradient_alg=(; alg = :$gradient_alg, solver_alg = (; alg = :$gradient_solver_alg))" for ( ctmrg_alg, projector_alg, svd_rrule_alg, gradient_alg, gradient_solver_alg, ) in Iterators.product( calgs, palgs, salgs, galgs, gsalgs @@ -83,9 +83,10 @@ end combo in naive_gradient_combinations || continue combo in naive_gradient_done && continue push!(naive_gradient_done, combo) + gradient_solver_alg = nothing # unused in naive gradient, so set to nothing to avoid confusion end - @info "optimtest of ctmrg_alg=:$ctmrg_alg, projector_alg=:$projector_alg, svd_rrule_alg=:$svd_rrule_alg and gradient_alg=:$gradient_alg on $(names[i])" + @info "optimtest of ctmrg_alg=:$ctmrg_alg, projector_alg=:$projector_alg, svd_rrule_alg=:$svd_rrule_alg and gradient_alg=(; alg = :$gradient_alg, solver_alg = (; alg = :$gradient_solver_alg)) on $(names[i])" Random.seed!(42039482030) dir = InfinitePEPS(Pspace, Vspace) psi = InfinitePEPS(Pspace, Vspace) From 3aa703f8ebce42163deb84e2fc9dd72a05f5c437 Mon Sep 17 00:00:00 2001 From: leburgel Date: Thu, 21 May 2026 16:54:20 +0200 Subject: [PATCH 3/9] Undo oopsie --- src/Defaults.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Defaults.jl b/src/Defaults.jl index 5a1a9aca5..4659f1abc 100644 --- a/src/Defaults.jl +++ b/src/Defaults.jl @@ -72,7 +72,7 @@ Module containing default algorithm parameter values and arguments. - `:C4vEighProjector` : Projection via truncated Eigh of an enlarged corner. - `:C4vQRProjector` : Projection via QR decomposition of a column-enlarged corner. -## Contraction +## Fixed-point gradient * `gradient_alg=:$(Defaults.gradient_alg)` : Algorithm variant for computing the implicit gradient of the contraction routine. * `gradient_tol=$(Defaults.gradient_tol)` : Convergence tolerance for the gradient algorithm. From 0359e56c23b1cab1d004317b680cd19525a54eb9 Mon Sep 17 00:00:00 2001 From: leburgel Date: Thu, 21 May 2026 16:55:00 +0200 Subject: [PATCH 4/9] Fix and finish docstring --- src/algorithms/optimization/fixed_point_differentiation.jl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/algorithms/optimization/fixed_point_differentiation.jl b/src/algorithms/optimization/fixed_point_differentiation.jl index 30aa8d4e9..8bd643c83 100644 --- a/src/algorithms/optimization/fixed_point_differentiation.jl +++ b/src/algorithms/optimization/fixed_point_differentiation.jl @@ -63,8 +63,8 @@ end """ $(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. +Gradient algorithm for computing the gradient of a fixed-point problem through +implicit fixed-point differentiation. ## Fields @@ -75,11 +75,10 @@ $(TYPEDFIELDS) FixedPointGradient(; kwargs...) Construct a fixed-point gradient algorithm struct based on keyword arguments. -For a full description, see [`leading_boundary`](@ref). The supported keywords are: +The supported keywords are: * `tol::Real=$(Defaults.gradient_tol)` * `maxiter::Int=$(Defaults.gradient_maxiter)` -* `miniter::Int=$(Defaults.gradient_miniter)` * `verbosity::Int=$(Defaults.gradient_verbosity)` * `solver_alg::Union{Algorithm,NamedTuple}=(; alg::Symbol=:$(Defaults.gradient_fixedpoint_solver_alg))`: solver algorithm for the `FixedPointGradient` gradient algorithm. - `:GMRES` : GMRES iterative linear solver, see [`KrylovKit.GMRES`](@extref) for details From 7fd3fc791c9caaad749e5acfd39dbed5e9ccaf79 Mon Sep 17 00:00:00 2001 From: leburgel Date: Thu, 21 May 2026 17:07:16 +0200 Subject: [PATCH 5/9] Only use existing references... --- src/Defaults.jl | 4 ++-- src/algorithms/optimization/fixed_point_differentiation.jl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Defaults.jl b/src/Defaults.jl index 4659f1abc..0dbf07b61 100644 --- a/src/Defaults.jl +++ b/src/Defaults.jl @@ -82,8 +82,8 @@ Module containing default algorithm parameter values and arguments. - `: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 - - `:GeomSum` : Geometric sum approximation of the Neumann series of the inverse Jacobian, see [`PEPSKit.GeomSumGradient`](@ref) for details - - `:ManualIter` : Manual fixed-point iteration, see [`PEPSKit.ManualIterGradient`](@ref) for details + - `:GeomSum` : Geometric sum approximation of the Neumann series of the inverse Jacobian, see [`PEPSKit.GeomSum`](@ref) for details + - `:ManualIter` : Manual fixed-point iteration, see [`PEPSKit.ManualIter`](@ref) for details * `gradient_fixedpoint_solver_eager=$(Defaults.gradient_fixedpoint_solver_eager)` : Enables `:Arnoldi` solver algorithm to finish before the full Krylov dimension is reached. ## Optimization diff --git a/src/algorithms/optimization/fixed_point_differentiation.jl b/src/algorithms/optimization/fixed_point_differentiation.jl index 8bd643c83..a6cf07993 100644 --- a/src/algorithms/optimization/fixed_point_differentiation.jl +++ b/src/algorithms/optimization/fixed_point_differentiation.jl @@ -84,8 +84,8 @@ The supported keywords are: - `: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 - - `:GeomSum` : Geometric sum approximation of the Neumann series of the inverse Jacobian, see [`PEPSKit.GeomSumGradient`](@ref) for details - - `:ManualIter` : Manual fixed-point iteration, see [`PEPSKit.ManualIterGradient`](@ref) for details + - `:GeomSum` : Geometric sum approximation of the Neumann series of the inverse Jacobian, see [`PEPSKit.GeomSum`](@ref) for details + - `:ManualIter` : Manual fixed-point iteration, see [`PEPSKit.ManualIter`](@ref) for details """ struct FixedPointGradient{A} <: GradMode{A} solver_alg::A From ab748b49b60fa90284e5df954366ea603ad9333f Mon Sep 17 00:00:00 2001 From: leburgel Date: Fri, 22 May 2026 09:35:01 +0200 Subject: [PATCH 6/9] Fix accidentally renamed keyword argument --- test/ctmrg/pepo.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ctmrg/pepo.jl b/test/ctmrg/pepo.jl index 23c0d5184..e2e0ec05a 100644 --- a/test/ctmrg/pepo.jl +++ b/test/ctmrg/pepo.jl @@ -115,11 +115,11 @@ end E, gs = withgradient(psi) do ψ n2 = InfiniteSquareNetwork(ψ) env2′, info = PEPSKit.hook_pullback( - leading_boundary, env2, n2, ctm_alg; gradient_alg + leading_boundary, env2, n2, ctm_alg; alg_rrule = gradient_alg ) n3 = InfiniteSquareNetwork(ψ, T) env3′, info = PEPSKit.hook_pullback( - leading_boundary, env3, n3, ctm_alg; gradient_alg + leading_boundary, env3, n3, ctm_alg; alg_rrule = gradient_alg ) PEPSKit.ignore_derivatives() do PEPSKit.update!(env2, env2′) From 8ca53a3728acb5ce8126fd3260eae10df537b9e7 Mon Sep 17 00:00:00 2001 From: leburgel Date: Fri, 22 May 2026 09:42:41 +0200 Subject: [PATCH 7/9] Unbreak input check --- src/algorithms/optimization/peps_optimization.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/optimization/peps_optimization.jl b/src/algorithms/optimization/peps_optimization.jl index 14c22c501..372d9e532 100644 --- a/src/algorithms/optimization/peps_optimization.jl +++ b/src/algorithms/optimization/peps_optimization.jl @@ -235,7 +235,7 @@ end Check compatibility of an initial PEPS and environment with a specified PEPS optimization algorithm. """ function check_input(::typeof(fixedpoint), peps₀, env₀, alg::PEPSOptimize) end -function check_input(::typeof(fixedpoint), peps₀, env₀, alg::PEPSOptimize{<:SimultaneousCTMRG, <:GradMode{:fixed}}) +function check_input(::typeof(fixedpoint), peps₀, env₀, alg::PEPSOptimize{<:SimultaneousCTMRG, <:FixedPointGradient}) if scalartype(env₀) <: Real # :fixed mode gauge fixing is incompatible with real environments msg = "the provided real environment is incompatible with :fixed mode \ since :fixed mode generally produces complex gauges" From 6ef13aece762b39b5e858500d0a8fd5390ca35f5 Mon Sep 17 00:00:00 2001 From: leburgel Date: Fri, 22 May 2026 15:56:47 +0200 Subject: [PATCH 8/9] Fixes and review comments --- examples/3d_ising_partition_function/main.jl | 4 +-- examples/fermi_hubbard/main.jl | 2 +- examples/xxz/main.jl | 2 +- .../fixed_point_differentiation.jl | 34 +++++++++---------- .../optimization/peps_optimization.jl | 8 ++--- test/examples/j1j2_model.jl | 6 +--- test/gradients/c4v_ctmrg_gradients.jl | 6 ++-- test/gradients/ctmrg_gradients.jl | 8 +++-- 8 files changed, 34 insertions(+), 36 deletions(-) diff --git a/examples/3d_ising_partition_function/main.jl b/examples/3d_ising_partition_function/main.jl index d3df0d4c3..e63afa667 100644 --- a/examples/3d_ising_partition_function/main.jl +++ b/examples/3d_ising_partition_function/main.jl @@ -151,9 +151,7 @@ of this cost function. """ boundary_alg = SimultaneousCTMRG(; maxiter = 150, tol = 1.0e-8, verbosity = 1) -rrule_alg = EigSolver(; - solver_alg = KrylovKit.Arnoldi(; maxiter = 30, tol = 1.0e-6, eager = true), -) +rrule_alg = FixedPointGradient(; solver_alg = KrylovKit.Arnoldi(; maxiter = 30, tol = 1.0e-6, eager = true)) T = InfinitePEPO(O) function pepo_costfun((peps, env_double_layer, env_triple_layer)) diff --git a/examples/fermi_hubbard/main.jl b/examples/fermi_hubbard/main.jl index c0dcd6093..bdf99b7bb 100644 --- a/examples/fermi_hubbard/main.jl +++ b/examples/fermi_hubbard/main.jl @@ -71,7 +71,7 @@ define all algorithmic parameters: """ boundary_alg = (; tol = 1.0e-8, alg = :SimultaneousCTMRG, trunc = (; alg = :FixedSpaceTruncation)) -gradient_alg = (; tol = 1.0e-6, alg = :EigSolver, maxiter = 10) +gradient_alg = (; tol = 1.0e-6, maxiter = 10, solver_alg = (; alg = :Arnoldi)) optimizer_alg = (; tol = 1.0e-4, alg = :LBFGS, maxiter = 80, ls_maxiter = 3, ls_maxfg = 3) md""" diff --git a/examples/xxz/main.jl b/examples/xxz/main.jl index fe370c526..36c1ac732 100644 --- a/examples/xxz/main.jl +++ b/examples/xxz/main.jl @@ -72,7 +72,7 @@ From this point onwards it's business as usual: Create an initial PEPS and envir """ boundary_alg = (; tol = 1.0e-8, alg = :SimultaneousCTMRG, trunc = (; alg = :FixedSpaceTruncation)) -gradient_alg = (; tol = 1.0e-6, alg = :EigSolver, maxiter = 10) +gradient_alg = (; tol = 1.0e-6, maxiter = 10, solver_alg = (; alg = :Arnoldi)) optimizer_alg = (; tol = 1.0e-4, alg = :LBFGS, maxiter = 85, ls_maxiter = 3, ls_maxfg = 3) peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) diff --git a/src/algorithms/optimization/fixed_point_differentiation.jl b/src/algorithms/optimization/fixed_point_differentiation.jl index a6cf07993..f684b66bd 100644 --- a/src/algorithms/optimization/fixed_point_differentiation.jl +++ b/src/algorithms/optimization/fixed_point_differentiation.jl @@ -1,32 +1,32 @@ -abstract type GradMode{A} end +abstract type GradientAlgorithm{A} end -const GRADIENT_MODE_SYMBOLS = IdDict{Symbol, Type{<:GradMode}}() +const GRADIENT_ALGORITHM_SYMBOLS = IdDict{Symbol, Type{<:GradientAlgorithm}}() # default solver algorithm for each gradient algorithm type -_default_solver_alg(::Type{T}) where {T <: GradMode} = +_default_solver_alg(::Type{T}) where {T <: GradientAlgorithm} = throw(ArgumentError("No default solver algorithm defined for gradient algorithm $(T)")) # map solver algorithm symbol to solver algorithm type for each gradient algorithm type -_select_solver_alg_symbol(::Type{T}, solver_alg) where {T <: GradMode} = +_select_solver_alg_symbol(::Type{T}, solver_alg) where {T <: GradientAlgorithm} = throw(ArgumentError("No solver algorithm symbols specified for gradient algorithm $(T)")) # add algorithm-specific keyword arguments to solver kwargs if needed _pad_solver_kwargs(::Type, solver_kwargs) = solver_kwargs """ - GradMode(; kwargs...) + GradientAlgorithm(; kwargs...) -Keyword argument parser returning the appropriate `GradMode` algorithm struct. +Keyword argument parser returning the appropriate `GradientAlgorithm` algorithm struct. """ -function GradMode(; +function GradientAlgorithm(; alg = Defaults.gradient_alg, tol = Defaults.gradient_tol, maxiter = Defaults.gradient_maxiter, verbosity = Defaults.gradient_verbosity, solver_alg = (;), ) - # replace symbol with GradMode alg type - haskey(GRADIENT_MODE_SYMBOLS, alg) || - throw(ArgumentError("unknown GradMode algorithm: $alg")) - alg_type = GRADIENT_MODE_SYMBOLS[alg] + # replace symbol with GradientAlgorithm alg type + haskey(GRADIENT_ALGORITHM_SYMBOLS, alg) || + throw(ArgumentError("unknown GradientAlgorithm algorithm: $alg")) + alg_type = GRADIENT_ALGORITHM_SYMBOLS[alg] # parse solver algorithm solver = if solver_alg isa NamedTuple # determine linear/eigen solver algorithm @@ -87,11 +87,11 @@ The supported keywords are: - `:GeomSum` : Geometric sum approximation of the Neumann series of the inverse Jacobian, see [`PEPSKit.GeomSum`](@ref) for details - `:ManualIter` : Manual fixed-point iteration, see [`PEPSKit.ManualIter`](@ref) for details """ -struct FixedPointGradient{A} <: GradMode{A} +struct FixedPointGradient{A} <: GradientAlgorithm{A} solver_alg::A end -FixedPointGradient(; kwargs...) = GradMode(; alg = :FixedPointGradient, kwargs...) -GRADIENT_MODE_SYMBOLS[:FixedPointGradient] = FixedPointGradient +FixedPointGradient(; kwargs...) = GradientAlgorithm(; alg = :FixedPointGradient, kwargs...) +GRADIENT_ALGORITHM_SYMBOLS[:FixedPointGradient] = FixedPointGradient const FIXEDPOINT_SOLVER_SYMBOLS = IdDict{Symbol, Type{<:Any}}( :GMRES => GMRES, :BiCGStab => BiCGStab, :Arnoldi => Arnoldi, @@ -225,7 +225,7 @@ function _rrule( # prepare iterating function corresponding to a single gauge-fixed CTMRG iteration alg_fixed = _set_fixed_truncation(alg) # fix spaces during differentiation - alg_gauge = _scrambling_env_gauge(alg) # TODO: make this a field in GradMode? + alg_gauge = _scrambling_env_gauge(alg) # select appropriate gauge-fixing algorithm env_conv, info = ctmrg_iteration(InfiniteSquareNetwork(state), env, alg_fixed) signs, corner_phases, edge_phases = compute_gauge_fix_gauge(env_conv, env, alg_gauge) function gauge_fixed_iteration(A, x) @@ -256,8 +256,8 @@ end fixedpoint_gradient(x̆, ∂ₓf, ∂ₚf, y₀, alg) Evaluates the VJP action ``x̆ ∂ₚx`` for an intermediate variable ``x \equiv x(p)`` -characterized which satisfies the fixed-point equation ``x = f(x, p)``, given the -VJP actions ``∂ₓf`` and ``∂ₚf`` of the iterating function ``f``. +which satisfies the fixed-point equation ``x = f(x, p)``, given the VJP actions ``∂ₓf`` +and ``∂ₚf`` of the iterating function ``f``. More specifically, given a cost function ``E(x(p), p)`` defined in terms of a set of variational parameters ``p`` and a set of intermediate variables ``x`` that depend on ``p``, diff --git a/src/algorithms/optimization/peps_optimization.jl b/src/algorithms/optimization/peps_optimization.jl index 372d9e532..5bf49e8bb 100644 --- a/src/algorithms/optimization/peps_optimization.jl +++ b/src/algorithms/optimization/peps_optimization.jl @@ -15,7 +15,7 @@ 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}` +* `gradient_alg::Union{NamedTuple,Nothing,<:GradientAlgorithm}` * `optimizer_alg::Union{NamedTuple,<:OptimKit.OptimizationAlgorithm}` * `reuse_env::Bool=$(Defaults.reuse_env)` * `symmetrization::Union{Nothing,SymmetrizationStyle}=nothing` @@ -41,7 +41,7 @@ function PEPSOptimize(; reuse_env = Defaults.reuse_env, symmetrization = nothing, ) boundary_algorithm = _alg_or_nt(CTMRGAlgorithm, boundary_alg) - gradient_algorithm = _alg_or_nt(GradMode, gradient_alg) + gradient_algorithm = _alg_or_nt(GradientAlgorithm, gradient_alg) optimizer_algorithm = _alg_or_nt(OptimKit.OptimizationAlgorithm, optimizer_alg) return PEPSOptimize( @@ -120,8 +120,8 @@ By default, a CTMRG tolerance of `tol=1e-4tol` and is used. ### Gradient algorithm -Supply gradient algorithm parameters via `gradient_alg::Union{NamedTuple,Nothing,<:GradMode}` -using either a `NamedTuple` of keyword arguments, `nothing`, or a `GradMode` struct directly. +Supply gradient algorithm parameters via `gradient_alg::Union{NamedTuple,Nothing,<:GradientAlgorithm}` +using either a `NamedTuple` of keyword arguments, `nothing`, or a `GradientAlgorithm` struct directly. Pass `nothing` to fully differentiate the CTMRG run, meaning that all iterations will be taken into account, instead of differentiating the fixed point. The supported `NamedTuple` keyword arguments are: diff --git a/test/examples/j1j2_model.jl b/test/examples/j1j2_model.jl index 5fe911c5e..3e4d70215 100644 --- a/test/examples/j1j2_model.jl +++ b/test/examples/j1j2_model.jl @@ -17,11 +17,7 @@ peps₀ = symmetrize!(peps₀, RotateReflect()) env₀, = leading_boundary(CTMRGEnv(peps₀, ComplexSpace(χenv)), peps₀) # find fixedpoint -peps, env, E, = fixedpoint( - H, peps₀, env₀; - tol = 1.0e-3, - symmetrization = RotateReflect(), -) +peps, env, E, = fixedpoint(H, peps₀, env₀; tol = 1.0e-3, symmetrization = RotateReflect()) ξ_h, ξ_v, = correlation_length(peps, env) # compare against Juraj Hasik's data: diff --git a/test/gradients/c4v_ctmrg_gradients.jl b/test/gradients/c4v_ctmrg_gradients.jl index 1f51c3d2d..de96cc0f7 100644 --- a/test/gradients/c4v_ctmrg_gradients.jl +++ b/test/gradients/c4v_ctmrg_gradients.jl @@ -94,9 +94,11 @@ naive_gradient_done = Set() ) # instantiate because hook_pullback doesn't go through the keyword selector... concrete_gradient_alg = if isnothing(gradient_alg) - nothing # TODO: add this to the PEPSKit.GradMode selector? + nothing # TODO: add this to the PEPSKit.GradientAlgorithm selector? else - PEPSKit.GradMode(; alg = gradient_alg, solver_alg = (; alg = gradient_solver_alg, tol = gradtol)) + PEPSKit.GradientAlgorithm(; + alg = gradient_alg, solver_alg = (; alg = gradient_solver_alg, tol = gradtol) + ) end env0 = PEPSKit.initialize_random_c4v_env(psi, Espace) env, = leading_boundary(env0, psi, contrete_ctmrg_alg) diff --git a/test/gradients/ctmrg_gradients.jl b/test/gradients/ctmrg_gradients.jl index 5ed82893a..4c6bd9395 100644 --- a/test/gradients/ctmrg_gradients.jl +++ b/test/gradients/ctmrg_gradients.jl @@ -99,9 +99,11 @@ end ) # instantiate because hook_pullback doesn't go through the keyword selector... concrete_gradient_alg = if isnothing(gradient_alg) - nothing # TODO: add this to the PEPSKit.GradMode selector? + nothing # TODO: add this to the PEPSKit.GradientAlgorithm selector? else - PEPSKit.GradMode(; alg = gradient_alg, solver_alg = (; alg = gradient_solver_alg, tol = gradtol)) + PEPSKit.GradientAlgorithm(; + alg = gradient_alg, solver_alg = (; alg = gradient_solver_alg, tol = gradtol) + ) end env, = leading_boundary(CTMRGEnv(psi, Espace), psi, contrete_ctmrg_alg) alphas, fs, dfs1, dfs2 = OptimKit.optimtest( @@ -133,7 +135,7 @@ end Random.seed!(1234) boundary_alg = PEPSKit.CTMRGAlgorithm(; tol = 1.0e-10) - gradient_alg = PEPSKit.GradMode(; tol = 5.0e-8) + gradient_alg = PEPSKit.GradientAlgorithm(; tol = 5.0e-8) function fg((peps, env)) E, g = Zygote.withgradient(peps) do ψ From 7d3df91c4e2273d2e8e6c82df0bb94e075fe1824 Mon Sep 17 00:00:00 2001 From: leburgel Date: Tue, 26 May 2026 14:41:56 +0200 Subject: [PATCH 9/9] Fix and rerun examples --- .../3d_ising_partition_function/index.md | 159 ++++---- .../3d_ising_partition_function/main.ipynb | 5 +- docs/src/examples/bose_hubbard/index.md | 308 +++++++------- docs/src/examples/bose_hubbard/main.ipynb | 6 +- docs/src/examples/c4v_ctmrg/index.md | 101 ++--- docs/src/examples/c4v_ctmrg/main.ipynb | 148 +++---- docs/src/examples/fermi_hubbard/index.md | 168 ++++---- docs/src/examples/fermi_hubbard/main.ipynb | 2 +- docs/src/examples/heisenberg/index.md | 188 +++++---- docs/src/examples/heisenberg/main.ipynb | 230 +++++------ docs/src/examples/heisenberg_su/index.md | 53 +-- docs/src/examples/heisenberg_su/main.ipynb | 110 ++--- docs/src/examples/hubbard_su/index.md | 53 +-- docs/src/examples/hubbard_su/main.ipynb | 110 ++--- docs/src/examples/j1j2_su/index.md | 381 +++++++++--------- docs/src/examples/j1j2_su/main.ipynb | 7 +- docs/src/examples/xxz/index.md | 176 ++++---- docs/src/examples/xxz/main.ipynb | 2 +- examples/Cache.toml | 18 +- examples/bose_hubbard/main.jl | 2 +- examples/c4v_ctmrg/main.jl | 2 +- 21 files changed, 1112 insertions(+), 1117 deletions(-) diff --git a/docs/src/examples/3d_ising_partition_function/index.md b/docs/src/examples/3d_ising_partition_function/index.md index cec367329..c489d1f5d 100644 --- a/docs/src/examples/3d_ising_partition_function/index.md +++ b/docs/src/examples/3d_ising_partition_function/index.md @@ -162,10 +162,7 @@ of this cost function. ````julia boundary_alg = SimultaneousCTMRG(; maxiter = 150, tol = 1.0e-8, verbosity = 1) -rrule_alg = EigSolver(; - solver_alg = KrylovKit.Arnoldi(; maxiter = 30, tol = 1.0e-6, eager = true), - iterscheme = :fixed, -) +rrule_alg = FixedPointGradient(; solver_alg = KrylovKit.Arnoldi(; maxiter = 30, tol = 1.0e-6, eager = true)) T = InfinitePEPO(O) function pepo_costfun((peps, env_double_layer, env_triple_layer)) @@ -294,83 +291,83 @@ optimizer_alg = LBFGS(32; maxiter = 100, gradtol = 1.0e-5, verbosity = 3) ```` [ Info: LBFGS: initializing with f = -5.540733951820e-01, ‖∇f‖ = 7.7844e-01 -┌ Warning: CTMRG cancel 150: obj = +1.702942228759e+01 +1.443123029406e-07im err = 2.4386740984e-05 time = 5.88 sec -└ @ PEPSKit ~/git/PEPSKit.jl/src/algorithms/ctmrg/ctmrg.jl:162 -[ Info: LBFGS: iter 1, Δt 18.49 s: f = -7.770809303692e-01, ‖∇f‖ = 3.1305e-02, α = 7.10e+02, m = 0, nfg = 7 -[ Info: LBFGS: iter 2, Δt 1.48 s: f = -7.841115159615e-01, ‖∇f‖ = 2.0103e-02, α = 1.00e+00, m = 1, nfg = 1 -[ Info: LBFGS: iter 3, Δt 857.1 ms: f = -7.927057334845e-01, ‖∇f‖ = 2.3327e-02, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 4, Δt 743.3 ms: f = -7.962897324757e-01, ‖∇f‖ = 2.2475e-02, α = 1.00e+00, m = 3, nfg = 1 -[ Info: LBFGS: iter 5, Δt 1.42 s: f = -7.996749023744e-01, ‖∇f‖ = 7.0288e-03, α = 1.00e+00, m = 4, nfg = 1 -[ Info: LBFGS: iter 6, Δt 695.0 ms: f = -8.000821001207e-01, ‖∇f‖ = 1.2717e-03, α = 1.00e+00, m = 5, nfg = 1 -[ Info: LBFGS: iter 7, Δt 655.4 ms: f = -8.001106031252e-01, ‖∇f‖ = 1.3384e-03, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 8, Δt 551.8 ms: f = -8.002622019964e-01, ‖∇f‖ = 2.4945e-03, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 9, Δt 560.7 ms: f = -8.004505054484e-01, ‖∇f‖ = 2.9259e-03, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 10, Δt 628.4 ms: f = -8.007649170868e-01, ‖∇f‖ = 1.7221e-03, α = 1.00e+00, m = 9, nfg = 1 -[ Info: LBFGS: iter 11, Δt 664.4 ms: f = -8.008760488382e-01, ‖∇f‖ = 2.2475e-03, α = 1.00e+00, m = 10, nfg = 1 -[ Info: LBFGS: iter 12, Δt 595.1 ms: f = -8.011008674672e-01, ‖∇f‖ = 1.5561e-03, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 13, Δt 659.7 ms: f = -8.013170488565e-01, ‖∇f‖ = 1.1561e-03, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 14, Δt 629.0 ms: f = -8.013730505450e-01, ‖∇f‖ = 7.1300e-04, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 15, Δt 624.0 ms: f = -8.013886152636e-01, ‖∇f‖ = 2.8462e-04, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 16, Δt 616.8 ms: f = -8.013946333330e-01, ‖∇f‖ = 2.7607e-04, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 17, Δt 585.2 ms: f = -8.014080615636e-01, ‖∇f‖ = 3.6096e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 18, Δt 710.2 ms: f = -8.015095421688e-01, ‖∇f‖ = 1.9822e-03, α = 1.00e+00, m = 17, nfg = 1 -[ Info: LBFGS: iter 19, Δt 1.53 s: f = -8.015784052508e-01, ‖∇f‖ = 1.8040e-03, α = 1.00e+00, m = 18, nfg = 1 -[ Info: LBFGS: iter 20, Δt 2.53 s: f = -8.016945244238e-01, ‖∇f‖ = 2.9356e-03, α = 5.48e-01, m = 19, nfg = 3 -[ Info: LBFGS: iter 21, Δt 1.71 s: f = -8.017619206832e-01, ‖∇f‖ = 1.1993e-03, α = 3.82e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 22, Δt 800.7 ms: f = -8.017977854941e-01, ‖∇f‖ = 6.0337e-04, α = 1.00e+00, m = 21, nfg = 1 -[ Info: LBFGS: iter 23, Δt 1.64 s: f = -8.018087478343e-01, ‖∇f‖ = 3.7053e-04, α = 5.24e-01, m = 22, nfg = 2 -[ Info: LBFGS: iter 24, Δt 801.1 ms: f = -8.018127291733e-01, ‖∇f‖ = 3.0781e-04, α = 1.00e+00, m = 23, nfg = 1 -[ Info: LBFGS: iter 25, Δt 947.9 ms: f = -8.018164452111e-01, ‖∇f‖ = 2.9994e-04, α = 1.00e+00, m = 24, nfg = 1 -[ Info: LBFGS: iter 26, Δt 1.50 s: f = -8.018247131297e-01, ‖∇f‖ = 3.6496e-04, α = 1.00e+00, m = 25, nfg = 1 -[ Info: LBFGS: iter 27, Δt 912.3 ms: f = -8.018396738228e-01, ‖∇f‖ = 5.4222e-04, α = 1.00e+00, m = 26, nfg = 1 -[ Info: LBFGS: iter 28, Δt 788.8 ms: f = -8.018574789038e-01, ‖∇f‖ = 2.7917e-04, α = 1.00e+00, m = 27, nfg = 1 -[ Info: LBFGS: iter 29, Δt 888.8 ms: f = -8.018645552239e-01, ‖∇f‖ = 1.2319e-04, α = 1.00e+00, m = 28, nfg = 1 -[ Info: LBFGS: iter 30, Δt 858.3 ms: f = -8.018655987357e-01, ‖∇f‖ = 8.6048e-05, α = 1.00e+00, m = 29, nfg = 1 -[ Info: LBFGS: iter 31, Δt 863.2 ms: f = -8.018675717547e-01, ‖∇f‖ = 8.8636e-05, α = 1.00e+00, m = 30, nfg = 1 -[ Info: LBFGS: iter 32, Δt 889.2 ms: f = -8.018703935281e-01, ‖∇f‖ = 2.6554e-04, α = 1.00e+00, m = 31, nfg = 1 -[ Info: LBFGS: iter 33, Δt 929.2 ms: f = -8.018747970386e-01, ‖∇f‖ = 2.7841e-04, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 34, Δt 934.8 ms: f = -8.018775666443e-01, ‖∇f‖ = 1.8523e-04, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 35, Δt 883.7 ms: f = -8.018785062445e-01, ‖∇f‖ = 2.0638e-04, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 36, Δt 853.0 ms: f = -8.018789950966e-01, ‖∇f‖ = 5.6081e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 37, Δt 850.4 ms: f = -8.018791535731e-01, ‖∇f‖ = 6.2356e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 38, Δt 1.71 s: f = -8.018793550753e-01, ‖∇f‖ = 6.0528e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 39, Δt 944.9 ms: f = -8.018801150998e-01, ‖∇f‖ = 6.2768e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 40, Δt 875.9 ms: f = -8.018814750648e-01, ‖∇f‖ = 6.2301e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 41, Δt 948.2 ms: f = -8.018822724254e-01, ‖∇f‖ = 9.5267e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 42, Δt 886.1 ms: f = -8.018826000327e-01, ‖∇f‖ = 5.1283e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 43, Δt 878.1 ms: f = -8.018827118752e-01, ‖∇f‖ = 2.6091e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 44, Δt 897.8 ms: f = -8.018828058280e-01, ‖∇f‖ = 2.9316e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 45, Δt 856.3 ms: f = -8.018830270596e-01, ‖∇f‖ = 2.7982e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 46, Δt 847.5 ms: f = -8.018834021781e-01, ‖∇f‖ = 3.8102e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 47, Δt 912.3 ms: f = -8.018837183208e-01, ‖∇f‖ = 5.3658e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 48, Δt 1.88 s: f = -8.018839628864e-01, ‖∇f‖ = 2.8728e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 49, Δt 1.05 s: f = -8.018841580849e-01, ‖∇f‖ = 3.0680e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 50, Δt 933.0 ms: f = -8.018843859400e-01, ‖∇f‖ = 4.1973e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 51, Δt 950.3 ms: f = -8.018848104588e-01, ‖∇f‖ = 6.8881e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 52, Δt 907.2 ms: f = -8.018850110140e-01, ‖∇f‖ = 3.8651e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 53, Δt 909.8 ms: f = -8.018851266254e-01, ‖∇f‖ = 1.9013e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 54, Δt 911.4 ms: f = -8.018851864896e-01, ‖∇f‖ = 3.2919e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 55, Δt 951.9 ms: f = -8.018853097129e-01, ‖∇f‖ = 4.8521e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 56, Δt 991.0 ms: f = -8.018854916306e-01, ‖∇f‖ = 1.1478e-04, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 57, Δt 999.6 ms: f = -8.018859128567e-01, ‖∇f‖ = 7.7221e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 58, Δt 1.83 s: f = -8.018864519794e-01, ‖∇f‖ = 6.5316e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 59, Δt 1.11 s: f = -8.018866398050e-01, ‖∇f‖ = 5.1566e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 60, Δt 1.79 s: f = -8.018866993724e-01, ‖∇f‖ = 4.5541e-05, α = 3.68e-01, m = 32, nfg = 2 -[ Info: LBFGS: iter 61, Δt 938.5 ms: f = -8.018867239929e-01, ‖∇f‖ = 2.1992e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 62, Δt 833.4 ms: f = -8.018867352019e-01, ‖∇f‖ = 1.8064e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 63, Δt 903.7 ms: f = -8.018867713956e-01, ‖∇f‖ = 3.8651e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 64, Δt 859.6 ms: f = -8.018868019526e-01, ‖∇f‖ = 4.2630e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 65, Δt 860.1 ms: f = -8.018868378565e-01, ‖∇f‖ = 3.9318e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 66, Δt 861.3 ms: f = -8.018869167865e-01, ‖∇f‖ = 3.8747e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 67, Δt 912.3 ms: f = -8.018870300592e-01, ‖∇f‖ = 3.7138e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 68, Δt 944.6 ms: f = -8.018871411997e-01, ‖∇f‖ = 5.7019e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 69, Δt 3.06 s: f = -8.018871992087e-01, ‖∇f‖ = 3.0698e-05, α = 5.24e-01, m = 32, nfg = 2 -[ Info: LBFGS: iter 70, Δt 861.7 ms: f = -8.018872466144e-01, ‖∇f‖ = 1.3886e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 71, Δt 881.0 ms: f = -8.018872637174e-01, ‖∇f‖ = 1.5769e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 72, Δt 918.2 ms: f = -8.018873194656e-01, ‖∇f‖ = 2.1426e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 73, Δt 953.3 ms: f = -8.018874061424e-01, ‖∇f‖ = 1.9898e-05, α = 1.00e+00, m = 32, nfg = 1 -[ Info: LBFGS: iter 74, Δt 1.89 s: f = -8.018874674599e-01, ‖∇f‖ = 1.9802e-05, α = 3.61e-01, m = 32, nfg = 2 -[ Info: LBFGS: converged after 75 iterations and time 18.21 m: f = -8.018875356692e-01, ‖∇f‖ = 9.9332e-06 +┌ Warning: CTMRG cancel 150: obj = +1.702942228759e+01 +1.443123029406e-07im err = 2.4386740984e-05 time = 5.77 sec +└ @ PEPSKit ~/git/PEPSKit.jl/src/algorithms/ctmrg/ctmrg.jl:170 +[ Info: LBFGS: iter 1, Δt 17.70 s: f = -7.770809303692e-01, ‖∇f‖ = 3.1305e-02, α = 7.10e+02, m = 0, nfg = 7 +[ Info: LBFGS: iter 2, Δt 2.55 s: f = -7.841115159615e-01, ‖∇f‖ = 2.0103e-02, α = 1.00e+00, m = 1, nfg = 1 +[ Info: LBFGS: iter 3, Δt 1.02 s: f = -7.927057334845e-01, ‖∇f‖ = 2.3327e-02, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 4, Δt 682.8 ms: f = -7.962897324757e-01, ‖∇f‖ = 2.2475e-02, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 5, Δt 560.8 ms: f = -7.996749023744e-01, ‖∇f‖ = 7.0288e-03, α = 1.00e+00, m = 4, nfg = 1 +[ Info: LBFGS: iter 6, Δt 558.2 ms: f = -8.000821001207e-01, ‖∇f‖ = 1.2717e-03, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 7, Δt 671.1 ms: f = -8.001106031252e-01, ‖∇f‖ = 1.3384e-03, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 8, Δt 593.9 ms: f = -8.002622019964e-01, ‖∇f‖ = 2.4945e-03, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 9, Δt 593.3 ms: f = -8.004505054484e-01, ‖∇f‖ = 2.9259e-03, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 10, Δt 643.0 ms: f = -8.007649170868e-01, ‖∇f‖ = 1.7221e-03, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 11, Δt 680.0 ms: f = -8.008760488382e-01, ‖∇f‖ = 2.2475e-03, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 12, Δt 592.1 ms: f = -8.011008674672e-01, ‖∇f‖ = 1.5561e-03, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 13, Δt 681.4 ms: f = -8.013170488565e-01, ‖∇f‖ = 1.1561e-03, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 14, Δt 634.7 ms: f = -8.013730505450e-01, ‖∇f‖ = 7.1300e-04, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 15, Δt 618.8 ms: f = -8.013886152636e-01, ‖∇f‖ = 2.8462e-04, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 16, Δt 632.8 ms: f = -8.013946333330e-01, ‖∇f‖ = 2.7607e-04, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 17, Δt 584.4 ms: f = -8.014080615636e-01, ‖∇f‖ = 3.6096e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 18, Δt 706.7 ms: f = -8.015095421688e-01, ‖∇f‖ = 1.9822e-03, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 19, Δt 721.9 ms: f = -8.015784052508e-01, ‖∇f‖ = 1.8040e-03, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 20, Δt 3.50 s: f = -8.016945244238e-01, ‖∇f‖ = 2.9356e-03, α = 5.48e-01, m = 19, nfg = 3 +[ Info: LBFGS: iter 21, Δt 1.93 s: f = -8.017619206832e-01, ‖∇f‖ = 1.1993e-03, α = 3.82e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 22, Δt 716.1 ms: f = -8.017977854941e-01, ‖∇f‖ = 6.0337e-04, α = 1.00e+00, m = 21, nfg = 1 +[ Info: LBFGS: iter 23, Δt 1.85 s: f = -8.018087478343e-01, ‖∇f‖ = 3.7053e-04, α = 5.24e-01, m = 22, nfg = 2 +[ Info: LBFGS: iter 24, Δt 979.0 ms: f = -8.018127291733e-01, ‖∇f‖ = 3.0781e-04, α = 1.00e+00, m = 23, nfg = 1 +[ Info: LBFGS: iter 25, Δt 812.9 ms: f = -8.018164452111e-01, ‖∇f‖ = 2.9994e-04, α = 1.00e+00, m = 24, nfg = 1 +[ Info: LBFGS: iter 26, Δt 797.6 ms: f = -8.018247131297e-01, ‖∇f‖ = 3.6496e-04, α = 1.00e+00, m = 25, nfg = 1 +[ Info: LBFGS: iter 27, Δt 874.5 ms: f = -8.018396738228e-01, ‖∇f‖ = 5.4222e-04, α = 1.00e+00, m = 26, nfg = 1 +[ Info: LBFGS: iter 28, Δt 883.8 ms: f = -8.018574789038e-01, ‖∇f‖ = 2.7917e-04, α = 1.00e+00, m = 27, nfg = 1 +[ Info: LBFGS: iter 29, Δt 875.0 ms: f = -8.018645552239e-01, ‖∇f‖ = 1.2319e-04, α = 1.00e+00, m = 28, nfg = 1 +[ Info: LBFGS: iter 30, Δt 836.6 ms: f = -8.018655987357e-01, ‖∇f‖ = 8.6048e-05, α = 1.00e+00, m = 29, nfg = 1 +[ Info: LBFGS: iter 31, Δt 874.5 ms: f = -8.018675717547e-01, ‖∇f‖ = 8.8636e-05, α = 1.00e+00, m = 30, nfg = 1 +[ Info: LBFGS: iter 32, Δt 896.7 ms: f = -8.018703935281e-01, ‖∇f‖ = 2.6554e-04, α = 1.00e+00, m = 31, nfg = 1 +[ Info: LBFGS: iter 33, Δt 933.3 ms: f = -8.018747970386e-01, ‖∇f‖ = 2.7841e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 34, Δt 2.20 s: f = -8.018775666443e-01, ‖∇f‖ = 1.8523e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 35, Δt 937.3 ms: f = -8.018785062445e-01, ‖∇f‖ = 2.0638e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 36, Δt 846.0 ms: f = -8.018789950966e-01, ‖∇f‖ = 5.6081e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 37, Δt 924.9 ms: f = -8.018791535731e-01, ‖∇f‖ = 6.2356e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 38, Δt 805.0 ms: f = -8.018793550753e-01, ‖∇f‖ = 6.0528e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 39, Δt 846.9 ms: f = -8.018801150998e-01, ‖∇f‖ = 6.2768e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 40, Δt 933.1 ms: f = -8.018814750648e-01, ‖∇f‖ = 6.2301e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 41, Δt 956.9 ms: f = -8.018822724254e-01, ‖∇f‖ = 9.5267e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 42, Δt 890.8 ms: f = -8.018826000327e-01, ‖∇f‖ = 5.1283e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 43, Δt 866.3 ms: f = -8.018827118752e-01, ‖∇f‖ = 2.6091e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 44, Δt 823.1 ms: f = -8.018828058280e-01, ‖∇f‖ = 2.9316e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 45, Δt 811.2 ms: f = -8.018830270596e-01, ‖∇f‖ = 2.7982e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 46, Δt 843.5 ms: f = -8.018834021781e-01, ‖∇f‖ = 3.8102e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 47, Δt 914.4 ms: f = -8.018837183208e-01, ‖∇f‖ = 5.3658e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 48, Δt 875.3 ms: f = -8.018839628864e-01, ‖∇f‖ = 2.8728e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 49, Δt 897.5 ms: f = -8.018841580849e-01, ‖∇f‖ = 3.0680e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 50, Δt 892.0 ms: f = -8.018843859400e-01, ‖∇f‖ = 4.1973e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 51, Δt 971.6 ms: f = -8.018848104588e-01, ‖∇f‖ = 6.8881e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 52, Δt 2.00 s: f = -8.018850110140e-01, ‖∇f‖ = 3.8651e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 53, Δt 1.04 s: f = -8.018851266254e-01, ‖∇f‖ = 1.9013e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 54, Δt 964.5 ms: f = -8.018851864896e-01, ‖∇f‖ = 3.2919e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 55, Δt 937.8 ms: f = -8.018853097129e-01, ‖∇f‖ = 4.8521e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 56, Δt 981.8 ms: f = -8.018854916306e-01, ‖∇f‖ = 1.1478e-04, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 57, Δt 998.8 ms: f = -8.018859128567e-01, ‖∇f‖ = 7.7221e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 58, Δt 991.9 ms: f = -8.018864519794e-01, ‖∇f‖ = 6.5316e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 59, Δt 981.8 ms: f = -8.018866398050e-01, ‖∇f‖ = 5.1566e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 60, Δt 2.01 s: f = -8.018866993724e-01, ‖∇f‖ = 4.5541e-05, α = 3.68e-01, m = 32, nfg = 2 +[ Info: LBFGS: iter 61, Δt 855.3 ms: f = -8.018867239929e-01, ‖∇f‖ = 2.1992e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 62, Δt 898.0 ms: f = -8.018867352019e-01, ‖∇f‖ = 1.8064e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 63, Δt 904.0 ms: f = -8.018867713956e-01, ‖∇f‖ = 3.8651e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 64, Δt 882.9 ms: f = -8.018868019526e-01, ‖∇f‖ = 4.2630e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 65, Δt 870.1 ms: f = -8.018868378565e-01, ‖∇f‖ = 3.9318e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 66, Δt 2.18 s: f = -8.018869167865e-01, ‖∇f‖ = 3.8747e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 67, Δt 1.02 s: f = -8.018870300592e-01, ‖∇f‖ = 3.7138e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 68, Δt 832.1 ms: f = -8.018871411997e-01, ‖∇f‖ = 5.7019e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 69, Δt 2.02 s: f = -8.018871992087e-01, ‖∇f‖ = 3.0698e-05, α = 5.24e-01, m = 32, nfg = 2 +[ Info: LBFGS: iter 70, Δt 921.1 ms: f = -8.018872466144e-01, ‖∇f‖ = 1.3886e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 71, Δt 915.9 ms: f = -8.018872637174e-01, ‖∇f‖ = 1.5769e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 72, Δt 929.3 ms: f = -8.018873194656e-01, ‖∇f‖ = 2.1426e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 73, Δt 1.01 s: f = -8.018874061424e-01, ‖∇f‖ = 1.9898e-05, α = 1.00e+00, m = 32, nfg = 1 +[ Info: LBFGS: iter 74, Δt 1.94 s: f = -8.018874674599e-01, ‖∇f‖ = 1.9802e-05, α = 3.61e-01, m = 32, nfg = 2 +[ Info: LBFGS: converged after 75 iterations and time 20.78 m: f = -8.018875356692e-01, ‖∇f‖ = 9.9332e-06 ```` diff --git a/docs/src/examples/3d_ising_partition_function/main.ipynb b/docs/src/examples/3d_ising_partition_function/main.ipynb index edcc2b4f6..3a2adf36c 100644 --- a/docs/src/examples/3d_ising_partition_function/main.ipynb +++ b/docs/src/examples/3d_ising_partition_function/main.ipynb @@ -200,10 +200,7 @@ "outputs": [], "source": [ "boundary_alg = SimultaneousCTMRG(; maxiter = 150, tol = 1.0e-8, verbosity = 1)\n", - "rrule_alg = EigSolver(;\n", - " solver_alg = KrylovKit.Arnoldi(; maxiter = 30, tol = 1.0e-6, eager = true),\n", - " iterscheme = :fixed,\n", - ")\n", + "rrule_alg = FixedPointGradient(; solver_alg = KrylovKit.Arnoldi(; maxiter = 30, tol = 1.0e-6, eager = true))\n", "T = InfinitePEPO(O)\n", "\n", "function pepo_costfun((peps, env_double_layer, env_triple_layer))\n", diff --git a/docs/src/examples/bose_hubbard/index.md b/docs/src/examples/bose_hubbard/index.md index 9ae3bbe0d..d881e1f9d 100644 --- a/docs/src/examples/bose_hubbard/index.md +++ b/docs/src/examples/bose_hubbard/index.md @@ -100,7 +100,7 @@ algorithms and their tolerances: ````julia boundary_alg = (; tol = 1.0e-8, alg = :SimultaneousCTMRG, trunc = (; alg = :FixedSpaceTruncation)) -gradient_alg = (; tol = 1.0e-6, maxiter = 10, alg = :FixedPointGradient) +gradient_alg = (; tol = 1.0e-6, maxiter = 10, solver_alg = (; alg = :GMRES)) optimizer_alg = (; tol = 1.0e-4, alg = :LBFGS, maxiter = 150, ls_maxiter = 2, ls_maxfg = 2); ```` @@ -126,7 +126,7 @@ 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.515735205612e-11im err = 3.6943029805e-09 time = 0.24 sec +[ Info: CTMRG conv 19: obj = +1.181834754305e+01 -1.515014203962e-11im err = 3.6943031709e-09 time = 1.09 sec ```` @@ -141,158 +141,158 @@ peps, env, E, info = fixedpoint( ```` [ Info: LBFGS: initializing with f = 9.360531870693e+00, ‖∇f‖ = 1.6944e+01 -[ Info: LBFGS: iter 1, Δt 8.22 s: f = 1.243263804654e-01, ‖∇f‖ = 6.2838e+00, α = 1.56e+02, m = 0, nfg = 7 -[ Info: LBFGS: iter 2, Δt 3.63 s: f = 6.592923309831e-02, ‖∇f‖ = 7.6343e+00, α = 5.34e-01, m = 1, nfg = 2 -[ Info: LBFGS: iter 3, Δt 722.6 ms: f = -4.434585356894e-02, ‖∇f‖ = 1.6162e+00, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 4, Δt 669.8 ms: f = -7.581641308235e-02, ‖∇f‖ = 1.4777e+00, α = 1.00e+00, m = 3, nfg = 1 -[ Info: LBFGS: iter 5, Δt 2.22 s: f = -1.270142972187e-01, ‖∇f‖ = 3.1212e+00, α = 5.23e-01, m = 4, nfg = 3 -[ Info: LBFGS: iter 6, Δt 652.8 ms: f = -1.633483775361e-01, ‖∇f‖ = 1.2563e+00, α = 1.00e+00, m = 5, nfg = 1 -[ Info: LBFGS: iter 7, Δt 667.0 ms: f = -1.937189397513e-01, ‖∇f‖ = 9.6787e-01, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 8, Δt 1.45 s: f = -2.086095056473e-01, ‖∇f‖ = 7.3708e-01, α = 1.49e-01, m = 7, nfg = 2 -[ Info: LBFGS: iter 9, Δt 1.56 s: f = -2.213320160969e-01, ‖∇f‖ = 4.5556e-01, α = 3.29e-01, m = 8, nfg = 2 -[ Info: LBFGS: iter 10, Δt 623.9 ms: f = -2.287763259808e-01, ‖∇f‖ = 6.3644e-01, α = 1.00e+00, m = 9, nfg = 1 -[ Info: LBFGS: iter 11, Δt 601.4 ms: f = -2.354779361407e-01, ‖∇f‖ = 4.5587e-01, α = 1.00e+00, m = 10, nfg = 1 -[ Info: LBFGS: iter 12, Δt 567.9 ms: f = -2.452786754607e-01, ‖∇f‖ = 3.7293e-01, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 13, Δt 547.8 ms: f = -2.511737944315e-01, ‖∇f‖ = 3.5345e-01, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 14, Δt 483.4 ms: f = -2.567831916068e-01, ‖∇f‖ = 2.7925e-01, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 15, Δt 486.6 ms: f = -2.644210470846e-01, ‖∇f‖ = 2.5999e-01, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 16, Δt 464.1 ms: f = -2.667624388742e-01, ‖∇f‖ = 3.8750e-01, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 17, Δt 456.4 ms: f = -2.691854381316e-01, ‖∇f‖ = 1.1926e-01, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 18, Δt 450.9 ms: f = -2.697593549258e-01, ‖∇f‖ = 8.8060e-02, α = 1.00e+00, m = 17, nfg = 1 -[ Info: LBFGS: iter 19, Δt 993.8 ms: f = -2.704149848038e-01, ‖∇f‖ = 8.0340e-02, α = 1.00e+00, m = 18, nfg = 1 -[ Info: LBFGS: iter 20, Δt 364.3 ms: f = -2.709871859088e-01, ‖∇f‖ = 5.6227e-02, α = 1.00e+00, m = 19, nfg = 1 -[ Info: LBFGS: iter 21, Δt 434.9 ms: f = -2.713280444404e-01, ‖∇f‖ = 8.7455e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 22, Δt 413.8 ms: f = -2.716153824055e-01, ‖∇f‖ = 4.4395e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 23, Δt 441.7 ms: f = -2.717554344943e-01, ‖∇f‖ = 3.7465e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 24, Δt 457.9 ms: f = -2.720212512862e-01, ‖∇f‖ = 4.9598e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 25, Δt 463.5 ms: f = -2.721510510078e-01, ‖∇f‖ = 7.7025e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 26, Δt 466.9 ms: f = -2.723111439950e-01, ‖∇f‖ = 3.3781e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 27, Δt 472.3 ms: f = -2.724110171666e-01, ‖∇f‖ = 1.9197e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 28, Δt 462.7 ms: f = -2.724644440119e-01, ‖∇f‖ = 1.9745e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 29, Δt 440.9 ms: f = -2.726363658069e-01, ‖∇f‖ = 3.1087e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 30, Δt 917.0 ms: f = -2.727060629591e-01, ‖∇f‖ = 2.3834e-02, α = 5.02e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 31, Δt 445.2 ms: f = -2.727581806789e-01, ‖∇f‖ = 1.2723e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 32, Δt 573.6 ms: f = -2.727851137084e-01, ‖∇f‖ = 1.3596e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 33, Δt 806.6 ms: f = -2.728202281569e-01, ‖∇f‖ = 1.3577e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 34, Δt 423.9 ms: f = -2.728822332116e-01, ‖∇f‖ = 1.7053e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 35, Δt 928.6 ms: f = -2.729248153492e-01, ‖∇f‖ = 3.1384e-02, α = 4.87e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 36, Δt 477.7 ms: f = -2.729812649791e-01, ‖∇f‖ = 1.4232e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 37, Δt 458.5 ms: f = -2.730056542779e-01, ‖∇f‖ = 9.5005e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 38, Δt 469.2 ms: f = -2.730253098317e-01, ‖∇f‖ = 1.1766e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 39, Δt 493.4 ms: f = -2.730452014699e-01, ‖∇f‖ = 1.3500e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 40, Δt 427.7 ms: f = -2.730601701290e-01, ‖∇f‖ = 6.9352e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 41, Δt 463.8 ms: f = -2.730697005888e-01, ‖∇f‖ = 5.7942e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 42, Δt 464.8 ms: f = -2.730721704336e-01, ‖∇f‖ = 1.0410e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 43, Δt 432.4 ms: f = -2.730768282437e-01, ‖∇f‖ = 5.8856e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 44, Δt 607.3 ms: f = -2.730873408022e-01, ‖∇f‖ = 7.8023e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 45, Δt 795.2 ms: f = -2.730968572102e-01, ‖∇f‖ = 1.0220e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 46, Δt 422.7 ms: f = -2.731119154643e-01, ‖∇f‖ = 1.0811e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 47, Δt 808.0 ms: f = -2.731222065641e-01, ‖∇f‖ = 1.4362e-02, α = 4.12e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 48, Δt 430.5 ms: f = -2.731365310275e-01, ‖∇f‖ = 6.3727e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 49, Δt 447.2 ms: f = -2.731445175618e-01, ‖∇f‖ = 8.2368e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 50, Δt 454.2 ms: f = -2.731516662222e-01, ‖∇f‖ = 9.6146e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 51, Δt 423.9 ms: f = -2.731573199914e-01, ‖∇f‖ = 8.4020e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 52, Δt 445.3 ms: f = -2.731616184908e-01, ‖∇f‖ = 3.3090e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 53, Δt 423.3 ms: f = -2.731636905345e-01, ‖∇f‖ = 3.6654e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 54, Δt 444.9 ms: f = -2.731657365792e-01, ‖∇f‖ = 4.0111e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 55, Δt 876.4 ms: f = -2.731675789298e-01, ‖∇f‖ = 6.3344e-03, α = 5.06e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 56, Δt 967.8 ms: f = -2.731704113587e-01, ‖∇f‖ = 3.5012e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 57, Δt 357.5 ms: f = -2.731731471721e-01, ‖∇f‖ = 2.9705e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 58, Δt 419.5 ms: f = -2.731756296229e-01, ‖∇f‖ = 4.3506e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 59, Δt 404.0 ms: f = -2.731771933453e-01, ‖∇f‖ = 8.4929e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 60, Δt 424.1 ms: f = -2.731802824513e-01, ‖∇f‖ = 3.5372e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 61, Δt 425.9 ms: f = -2.731825100077e-01, ‖∇f‖ = 3.1938e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 62, Δt 446.7 ms: f = -2.731849162403e-01, ‖∇f‖ = 3.8723e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 63, Δt 423.9 ms: f = -2.731890276955e-01, ‖∇f‖ = 6.0233e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 64, Δt 463.8 ms: f = -2.731906762173e-01, ‖∇f‖ = 7.5548e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 65, Δt 422.5 ms: f = -2.731931250629e-01, ‖∇f‖ = 2.3343e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 66, Δt 448.3 ms: f = -2.731937854638e-01, ‖∇f‖ = 2.2001e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 67, Δt 422.6 ms: f = -2.731951572123e-01, ‖∇f‖ = 3.1454e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 68, Δt 451.6 ms: f = -2.731982612016e-01, ‖∇f‖ = 4.5688e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 69, Δt 1.34 s: f = -2.732004425120e-01, ‖∇f‖ = 7.4161e-03, α = 4.97e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 70, Δt 415.0 ms: f = -2.732034978258e-01, ‖∇f‖ = 4.3965e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 71, Δt 400.2 ms: f = -2.732060317353e-01, ‖∇f‖ = 2.5959e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 72, Δt 420.2 ms: f = -2.732067653412e-01, ‖∇f‖ = 4.0226e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 73, Δt 418.0 ms: f = -2.732075286193e-01, ‖∇f‖ = 2.6208e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 74, Δt 449.4 ms: f = -2.732086394826e-01, ‖∇f‖ = 2.8144e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 75, Δt 428.7 ms: f = -2.732098613586e-01, ‖∇f‖ = 2.9348e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 76, Δt 441.6 ms: f = -2.732104250744e-01, ‖∇f‖ = 6.1063e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 77, Δt 427.8 ms: f = -2.732117991912e-01, ‖∇f‖ = 2.1887e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 78, Δt 458.8 ms: f = -2.732127290127e-01, ‖∇f‖ = 2.1978e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 79, Δt 432.6 ms: f = -2.732142378452e-01, ‖∇f‖ = 4.1889e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 80, Δt 452.3 ms: f = -2.732161076841e-01, ‖∇f‖ = 4.9611e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 81, Δt 1.04 s: f = -2.732168467935e-01, ‖∇f‖ = 1.1651e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 82, Δt 342.3 ms: f = -2.732207559069e-01, ‖∇f‖ = 4.3107e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 83, Δt 421.8 ms: f = -2.732224453896e-01, ‖∇f‖ = 1.5951e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 84, Δt 413.5 ms: f = -2.732236351981e-01, ‖∇f‖ = 2.3806e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 85, Δt 385.1 ms: f = -2.732245493598e-01, ‖∇f‖ = 2.1850e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 86, Δt 843.3 ms: f = -2.732250468594e-01, ‖∇f‖ = 3.5908e-03, α = 3.99e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 87, Δt 439.7 ms: f = -2.732258864564e-01, ‖∇f‖ = 1.7634e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 88, Δt 443.9 ms: f = -2.732264191346e-01, ‖∇f‖ = 1.5207e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 89, Δt 435.0 ms: f = -2.732270911530e-01, ‖∇f‖ = 2.0339e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 90, Δt 456.3 ms: f = -2.732275332266e-01, ‖∇f‖ = 3.4911e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 91, Δt 422.8 ms: f = -2.732281198242e-01, ‖∇f‖ = 1.8175e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 92, Δt 452.7 ms: f = -2.732286156101e-01, ‖∇f‖ = 1.7374e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 93, Δt 984.3 ms: f = -2.732290620520e-01, ‖∇f‖ = 2.4746e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 94, Δt 389.9 ms: f = -2.732298053289e-01, ‖∇f‖ = 2.7607e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 95, Δt 846.5 ms: f = -2.732303397137e-01, ‖∇f‖ = 4.7337e-03, α = 3.65e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 96, Δt 402.4 ms: f = -2.732315115338e-01, ‖∇f‖ = 2.6853e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 97, Δt 434.7 ms: f = -2.732327488682e-01, ‖∇f‖ = 2.1740e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 98, Δt 447.3 ms: f = -2.732338965315e-01, ‖∇f‖ = 2.8814e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 99, Δt 422.9 ms: f = -2.732348853203e-01, ‖∇f‖ = 2.6726e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 100, Δt 455.0 ms: f = -2.732360755628e-01, ‖∇f‖ = 3.3694e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 101, Δt 462.7 ms: f = -2.732374157251e-01, ‖∇f‖ = 2.2761e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 102, Δt 425.7 ms: f = -2.732384441348e-01, ‖∇f‖ = 1.8476e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 103, Δt 435.0 ms: f = -2.732391060163e-01, ‖∇f‖ = 2.1827e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 104, Δt 880.6 ms: f = -2.732393121228e-01, ‖∇f‖ = 1.1870e-03, α = 4.35e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 105, Δt 988.0 ms: f = -2.732394415105e-01, ‖∇f‖ = 9.6213e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 106, Δt 352.8 ms: f = -2.732396967055e-01, ‖∇f‖ = 1.1000e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 107, Δt 413.8 ms: f = -2.732401458599e-01, ‖∇f‖ = 2.8831e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 108, Δt 386.8 ms: f = -2.732406523075e-01, ‖∇f‖ = 2.0902e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 109, Δt 383.9 ms: f = -2.732410323389e-01, ‖∇f‖ = 1.1560e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 110, Δt 440.7 ms: f = -2.732412518839e-01, ‖∇f‖ = 1.0759e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 111, Δt 424.2 ms: f = -2.732414186268e-01, ‖∇f‖ = 1.1730e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 112, Δt 448.3 ms: f = -2.732418417966e-01, ‖∇f‖ = 2.1278e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 113, Δt 422.0 ms: f = -2.732427145624e-01, ‖∇f‖ = 3.0607e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 114, Δt 451.6 ms: f = -2.732436618205e-01, ‖∇f‖ = 2.4125e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 115, Δt 419.3 ms: f = -2.732443955919e-01, ‖∇f‖ = 3.9514e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 116, Δt 453.2 ms: f = -2.732454002143e-01, ‖∇f‖ = 1.8433e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 117, Δt 411.4 ms: f = -2.732458974944e-01, ‖∇f‖ = 1.4613e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 118, Δt 419.5 ms: f = -2.732463785883e-01, ‖∇f‖ = 1.7104e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 119, Δt 1.40 s: f = -2.732466044311e-01, ‖∇f‖ = 2.1166e-03, α = 5.19e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 120, Δt 356.3 ms: f = -2.732468613336e-01, ‖∇f‖ = 1.2965e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 121, Δt 420.7 ms: f = -2.732472718617e-01, ‖∇f‖ = 1.6179e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 122, Δt 453.3 ms: f = -2.732475792491e-01, ‖∇f‖ = 2.3507e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 123, Δt 395.6 ms: f = -2.732482303394e-01, ‖∇f‖ = 2.6828e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 124, Δt 903.9 ms: f = -2.732485536506e-01, ‖∇f‖ = 2.7793e-03, α = 4.74e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 125, Δt 419.1 ms: f = -2.732489011759e-01, ‖∇f‖ = 1.3803e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 126, Δt 458.5 ms: f = -2.732492455012e-01, ‖∇f‖ = 1.5179e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 127, Δt 428.4 ms: f = -2.732494608995e-01, ‖∇f‖ = 2.1760e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 128, Δt 449.3 ms: f = -2.732500173039e-01, ‖∇f‖ = 2.8077e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 129, Δt 423.0 ms: f = -2.732505577698e-01, ‖∇f‖ = 2.7372e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 130, Δt 448.1 ms: f = -2.732510414354e-01, ‖∇f‖ = 1.4427e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 131, Δt 429.0 ms: f = -2.732513479891e-01, ‖∇f‖ = 1.2583e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 132, Δt 429.8 ms: f = -2.732516964375e-01, ‖∇f‖ = 2.2233e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 133, Δt 995.9 ms: f = -2.732520411325e-01, ‖∇f‖ = 2.4544e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 134, Δt 365.6 ms: f = -2.732522275980e-01, ‖∇f‖ = 4.5553e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 135, Δt 421.6 ms: f = -2.732529533185e-01, ‖∇f‖ = 1.3649e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 136, Δt 406.0 ms: f = -2.732531854735e-01, ‖∇f‖ = 1.0602e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 137, Δt 418.9 ms: f = -2.732534308208e-01, ‖∇f‖ = 1.6110e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 138, Δt 479.5 ms: f = -2.732537475106e-01, ‖∇f‖ = 1.9066e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 139, Δt 432.7 ms: f = -2.732541958553e-01, ‖∇f‖ = 2.7130e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 140, Δt 458.5 ms: f = -2.732543692518e-01, ‖∇f‖ = 3.4246e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 141, Δt 447.5 ms: f = -2.732549342383e-01, ‖∇f‖ = 1.0514e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 142, Δt 452.3 ms: f = -2.732550885399e-01, ‖∇f‖ = 9.8876e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 143, Δt 442.1 ms: f = -2.732553016391e-01, ‖∇f‖ = 1.7312e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 144, Δt 497.9 ms: f = -2.732555304767e-01, ‖∇f‖ = 1.9487e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 145, Δt 463.5 ms: f = -2.732557706175e-01, ‖∇f‖ = 1.2634e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 146, Δt 618.1 ms: f = -2.732559583620e-01, ‖∇f‖ = 9.4509e-04, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 147, Δt 814.0 ms: f = -2.732560645489e-01, ‖∇f‖ = 1.1628e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 148, Δt 396.5 ms: f = -2.732563117685e-01, ‖∇f‖ = 1.9114e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 149, Δt 421.7 ms: f = -2.732568091557e-01, ‖∇f‖ = 2.6653e-03, α = 1.00e+00, m = 20, nfg = 1 -┌ Warning: LBFGS: not converged to requested tol after 150 iterations and time 1.96 m: f = -2.732575225334e-01, ‖∇f‖ = 2.5121e-03 +[ Info: LBFGS: iter 1, Δt 49.32 s: f = 1.243263783214e-01, ‖∇f‖ = 6.2855e+00, α = 1.56e+02, m = 0, nfg = 7 +[ Info: LBFGS: iter 2, Δt 17.52 s: f = 6.548777843543e-02, ‖∇f‖ = 7.6025e+00, α = 5.34e-01, m = 1, nfg = 2 +[ Info: LBFGS: iter 3, Δt 2.36 s: f = -4.461379131755e-02, ‖∇f‖ = 1.6140e+00, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 4, Δt 2.08 s: f = -7.609472691607e-02, ‖∇f‖ = 1.4762e+00, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 5, Δt 9.64 s: f = -1.249108213575e-01, ‖∇f‖ = 3.1985e+00, α = 5.23e-01, m = 4, nfg = 3 +[ Info: LBFGS: iter 6, Δt 2.44 s: f = -1.624764645567e-01, ‖∇f‖ = 1.2573e+00, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 7, Δt 2.12 s: f = -1.929649368717e-01, ‖∇f‖ = 9.7320e-01, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 8, Δt 5.09 s: f = -2.079922246280e-01, ‖∇f‖ = 7.4754e-01, α = 1.47e-01, m = 7, nfg = 2 +[ Info: LBFGS: iter 9, Δt 4.72 s: f = -2.208688416226e-01, ‖∇f‖ = 4.6773e-01, α = 3.12e-01, m = 8, nfg = 2 +[ Info: LBFGS: iter 10, Δt 1.80 s: f = -2.284025294095e-01, ‖∇f‖ = 6.7374e-01, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 11, Δt 2.60 s: f = -2.349433738399e-01, ‖∇f‖ = 4.4910e-01, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 12, Δt 1.65 s: f = -2.446392726723e-01, ‖∇f‖ = 3.6587e-01, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 13, Δt 1.47 s: f = -2.506137268599e-01, ‖∇f‖ = 3.1145e-01, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 14, Δt 2.15 s: f = -2.569782611539e-01, ‖∇f‖ = 2.5645e-01, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 15, Δt 1.32 s: f = -2.640189974559e-01, ‖∇f‖ = 2.9045e-01, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 16, Δt 1.13 s: f = -2.669361881754e-01, ‖∇f‖ = 3.6496e-01, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 17, Δt 2.08 s: f = -2.692294379003e-01, ‖∇f‖ = 1.1275e-01, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 18, Δt 1.12 s: f = -2.697415269340e-01, ‖∇f‖ = 9.0510e-02, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 19, Δt 1.09 s: f = -2.704462248900e-01, ‖∇f‖ = 8.3341e-02, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 20, Δt 1.19 s: f = -2.710177324987e-01, ‖∇f‖ = 5.9077e-02, α = 1.00e+00, m = 19, nfg = 1 +[ Info: LBFGS: iter 21, Δt 1.88 s: f = -2.713287436140e-01, ‖∇f‖ = 8.1709e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 22, Δt 1.09 s: f = -2.716041340213e-01, ‖∇f‖ = 3.8121e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 23, Δt 1.18 s: f = -2.717477824224e-01, ‖∇f‖ = 3.9733e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 24, Δt 2.03 s: f = -2.720364217449e-01, ‖∇f‖ = 4.5134e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 25, Δt 1.25 s: f = -2.722018371574e-01, ‖∇f‖ = 9.0995e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 26, Δt 1.08 s: f = -2.724075395452e-01, ‖∇f‖ = 3.4199e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 27, Δt 1.15 s: f = -2.724774787760e-01, ‖∇f‖ = 1.9122e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 28, Δt 1.95 s: f = -2.725210111610e-01, ‖∇f‖ = 2.2144e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 29, Δt 1.14 s: f = -2.726086792350e-01, ‖∇f‖ = 2.7391e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 30, Δt 1.18 s: f = -2.727251509421e-01, ‖∇f‖ = 2.4263e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 31, Δt 3.36 s: f = -2.727484993108e-01, ‖∇f‖ = 2.6267e-02, α = 1.99e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 32, Δt 1.08 s: f = -2.727961690428e-01, ‖∇f‖ = 1.3010e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 33, Δt 1.25 s: f = -2.728248487478e-01, ‖∇f‖ = 1.3368e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 34, Δt 1.81 s: f = -2.728766589958e-01, ‖∇f‖ = 2.1584e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 35, Δt 1.09 s: f = -2.729263182562e-01, ‖∇f‖ = 3.4474e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 36, Δt 1.06 s: f = -2.729793745526e-01, ‖∇f‖ = 2.4629e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 37, Δt 1.96 s: f = -2.730137433417e-01, ‖∇f‖ = 1.1231e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 38, Δt 1.05 s: f = -2.730274839335e-01, ‖∇f‖ = 1.0104e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 39, Δt 988.0 ms: f = -2.730397243723e-01, ‖∇f‖ = 1.1262e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 40, Δt 1.85 s: f = -2.730549146929e-01, ‖∇f‖ = 1.6667e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 41, Δt 1.15 s: f = -2.730664892653e-01, ‖∇f‖ = 6.6117e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 42, Δt 995.3 ms: f = -2.730700327201e-01, ‖∇f‖ = 4.8442e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 43, Δt 1.05 s: f = -2.730746811238e-01, ‖∇f‖ = 7.7188e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 44, Δt 1.90 s: f = -2.730806470258e-01, ‖∇f‖ = 8.2012e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 45, Δt 1.09 s: f = -2.730933394569e-01, ‖∇f‖ = 1.4327e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 46, Δt 1.19 s: f = -2.731047972690e-01, ‖∇f‖ = 1.2100e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 47, Δt 2.05 s: f = -2.731148278175e-01, ‖∇f‖ = 6.3224e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 48, Δt 1.16 s: f = -2.731213320589e-01, ‖∇f‖ = 5.3534e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 49, Δt 2.10 s: f = -2.731254405052e-01, ‖∇f‖ = 1.2948e-02, α = 3.19e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 50, Δt 1.84 s: f = -2.731326604931e-01, ‖∇f‖ = 1.0515e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 51, Δt 1.11 s: f = -2.731499345464e-01, ‖∇f‖ = 7.0551e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 52, Δt 1.03 s: f = -2.731563762104e-01, ‖∇f‖ = 8.3120e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 53, Δt 1.86 s: f = -2.731611892875e-01, ‖∇f‖ = 3.4373e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 54, Δt 1.22 s: f = -2.731631831907e-01, ‖∇f‖ = 2.9119e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 55, Δt 1.04 s: f = -2.731657032661e-01, ‖∇f‖ = 5.1838e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 56, Δt 1.06 s: f = -2.731682294144e-01, ‖∇f‖ = 4.2175e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 57, Δt 1.89 s: f = -2.731702062494e-01, ‖∇f‖ = 3.6058e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 58, Δt 1.08 s: f = -2.731737713134e-01, ‖∇f‖ = 6.6877e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 59, Δt 1.08 s: f = -2.731756813217e-01, ‖∇f‖ = 8.6637e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 60, Δt 1.89 s: f = -2.731783468135e-01, ‖∇f‖ = 3.7331e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 61, Δt 1.18 s: f = -2.731804331108e-01, ‖∇f‖ = 2.8581e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 62, Δt 1.06 s: f = -2.731825116682e-01, ‖∇f‖ = 3.6462e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 63, Δt 1.88 s: f = -2.731868013563e-01, ‖∇f‖ = 5.1067e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 64, Δt 2.35 s: f = -2.731893835912e-01, ‖∇f‖ = 5.6991e-03, α = 4.59e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 65, Δt 1.85 s: f = -2.731917403397e-01, ‖∇f‖ = 2.6086e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 66, Δt 1.15 s: f = -2.731930890558e-01, ‖∇f‖ = 2.6696e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 67, Δt 953.4 ms: f = -2.731943299400e-01, ‖∇f‖ = 5.3466e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 68, Δt 979.6 ms: f = -2.731961553760e-01, ‖∇f‖ = 4.6066e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 69, Δt 1.87 s: f = -2.732006803376e-01, ‖∇f‖ = 4.9900e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 70, Δt 2.08 s: f = -2.732022291409e-01, ‖∇f‖ = 2.7374e-03, α = 4.63e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 71, Δt 1.03 s: f = -2.732031225436e-01, ‖∇f‖ = 2.1229e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 72, Δt 1.81 s: f = -2.732044876901e-01, ‖∇f‖ = 3.3103e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 73, Δt 1.09 s: f = -2.732058172452e-01, ‖∇f‖ = 5.0518e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 74, Δt 931.2 ms: f = -2.732075576985e-01, ‖∇f‖ = 3.0706e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 75, Δt 1.79 s: f = -2.732105521499e-01, ‖∇f‖ = 2.6272e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 76, Δt 1.07 s: f = -2.732115612467e-01, ‖∇f‖ = 2.8835e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 77, Δt 950.3 ms: f = -2.732132760490e-01, ‖∇f‖ = 2.5377e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 78, Δt 991.2 ms: f = -2.732150752927e-01, ‖∇f‖ = 3.4192e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 79, Δt 2.00 s: f = -2.732160033803e-01, ‖∇f‖ = 7.7729e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 80, Δt 1.07 s: f = -2.732182608626e-01, ‖∇f‖ = 2.5165e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 81, Δt 1.02 s: f = -2.732190880091e-01, ‖∇f‖ = 2.3320e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 82, Δt 1.86 s: f = -2.732204121556e-01, ‖∇f‖ = 3.6079e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 83, Δt 1.14 s: f = -2.732222940502e-01, ‖∇f‖ = 4.1289e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 84, Δt 988.4 ms: f = -2.732240755730e-01, ‖∇f‖ = 4.8612e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 85, Δt 982.1 ms: f = -2.732250082423e-01, ‖∇f‖ = 2.7895e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 86, Δt 1.89 s: f = -2.732254926460e-01, ‖∇f‖ = 1.1541e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 87, Δt 1.04 s: f = -2.732256990970e-01, ‖∇f‖ = 1.4495e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 88, Δt 992.4 ms: f = -2.732261407777e-01, ‖∇f‖ = 2.1635e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 89, Δt 1.83 s: f = -2.732267043681e-01, ‖∇f‖ = 3.3924e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 90, Δt 1.16 s: f = -2.732274318649e-01, ‖∇f‖ = 2.0600e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 91, Δt 1.12 s: f = -2.732282242753e-01, ‖∇f‖ = 2.0805e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 92, Δt 1.10 s: f = -2.732290360985e-01, ‖∇f‖ = 3.4664e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 93, Δt 1.90 s: f = -2.732301377578e-01, ‖∇f‖ = 4.1746e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 94, Δt 1.09 s: f = -2.732325978764e-01, ‖∇f‖ = 4.4369e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 95, Δt 989.3 ms: f = -2.732341095297e-01, ‖∇f‖ = 7.0806e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 96, Δt 1.77 s: f = -2.732364368276e-01, ‖∇f‖ = 2.8124e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 97, Δt 968.5 ms: f = -2.732370793272e-01, ‖∇f‖ = 1.3079e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 98, Δt 944.4 ms: f = -2.732373227846e-01, ‖∇f‖ = 1.3785e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 99, Δt 998.0 ms: f = -2.732376364846e-01, ‖∇f‖ = 1.8519e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 100, Δt 1.87 s: f = -2.732379891386e-01, ‖∇f‖ = 1.5949e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 101, Δt 1.25 s: f = -2.732382904130e-01, ‖∇f‖ = 1.1470e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 102, Δt 1.03 s: f = -2.732386133041e-01, ‖∇f‖ = 1.6075e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 103, Δt 1.15 s: f = -2.732389945542e-01, ‖∇f‖ = 1.9587e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 104, Δt 1.88 s: f = -2.732391253464e-01, ‖∇f‖ = 3.6352e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 105, Δt 1.05 s: f = -2.732396550234e-01, ‖∇f‖ = 1.1129e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 106, Δt 958.7 ms: f = -2.732398414304e-01, ‖∇f‖ = 1.0435e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 107, Δt 1.79 s: f = -2.732401065373e-01, ‖∇f‖ = 1.8027e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 108, Δt 1.18 s: f = -2.732404865867e-01, ‖∇f‖ = 2.2939e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 109, Δt 1.02 s: f = -2.732411872010e-01, ‖∇f‖ = 3.1029e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 110, Δt 2.99 s: f = -2.732416998238e-01, ‖∇f‖ = 1.8237e-03, α = 4.78e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 111, Δt 1.08 s: f = -2.732422195229e-01, ‖∇f‖ = 1.1455e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 112, Δt 1.02 s: f = -2.732427237192e-01, ‖∇f‖ = 1.8701e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 113, Δt 1.89 s: f = -2.732430484742e-01, ‖∇f‖ = 2.6079e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 114, Δt 1.19 s: f = -2.732435106086e-01, ‖∇f‖ = 2.3797e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 115, Δt 1.94 s: f = -2.732440354662e-01, ‖∇f‖ = 3.2969e-03, α = 5.38e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 116, Δt 1.83 s: f = -2.732446658040e-01, ‖∇f‖ = 1.0791e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 117, Δt 1.14 s: f = -2.732449908285e-01, ‖∇f‖ = 1.4326e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 118, Δt 1.06 s: f = -2.732456543585e-01, ‖∇f‖ = 2.4725e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 119, Δt 1.09 s: f = -2.732461284439e-01, ‖∇f‖ = 3.2383e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 120, Δt 1.90 s: f = -2.732466132685e-01, ‖∇f‖ = 1.3599e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 121, Δt 1.15 s: f = -2.732468025166e-01, ‖∇f‖ = 8.3797e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 122, Δt 948.3 ms: f = -2.732469621320e-01, ‖∇f‖ = 1.4073e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 123, Δt 1.80 s: f = -2.732471506912e-01, ‖∇f‖ = 1.9992e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 124, Δt 1.12 s: f = -2.732476564761e-01, ‖∇f‖ = 2.7990e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 125, Δt 992.5 ms: f = -2.732483629197e-01, ‖∇f‖ = 3.3182e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 126, Δt 980.5 ms: f = -2.732490341880e-01, ‖∇f‖ = 3.8081e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 127, Δt 1.89 s: f = -2.732497880761e-01, ‖∇f‖ = 1.6275e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 128, Δt 1.14 s: f = -2.732502576459e-01, ‖∇f‖ = 1.4134e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 129, Δt 1.04 s: f = -2.732505347480e-01, ‖∇f‖ = 1.7939e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 130, Δt 1.86 s: f = -2.732510651202e-01, ‖∇f‖ = 2.0831e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 131, Δt 1.16 s: f = -2.732515321718e-01, ‖∇f‖ = 1.5868e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 132, Δt 952.7 ms: f = -2.732518500794e-01, ‖∇f‖ = 1.0354e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 133, Δt 928.9 ms: f = -2.732520365379e-01, ‖∇f‖ = 1.1351e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 134, Δt 1.84 s: f = -2.732521714799e-01, ‖∇f‖ = 1.0331e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 135, Δt 1.04 s: f = -2.732525866434e-01, ‖∇f‖ = 2.3283e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 136, Δt 983.0 ms: f = -2.732529450896e-01, ‖∇f‖ = 1.6069e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 137, Δt 1.80 s: f = -2.732531781180e-01, ‖∇f‖ = 1.3034e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 138, Δt 1.23 s: f = -2.732535377554e-01, ‖∇f‖ = 8.7693e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 139, Δt 968.3 ms: f = -2.732537389722e-01, ‖∇f‖ = 2.6041e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 140, Δt 1.10 s: f = -2.732540687868e-01, ‖∇f‖ = 1.8047e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 141, Δt 1.80 s: f = -2.732546952439e-01, ‖∇f‖ = 1.2800e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 142, Δt 1.14 s: f = -2.732550980791e-01, ‖∇f‖ = 1.4212e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 143, Δt 2.86 s: f = -2.732555224227e-01, ‖∇f‖ = 2.3446e-03, α = 3.40e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 144, Δt 1.16 s: f = -2.732562832751e-01, ‖∇f‖ = 1.7148e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 145, Δt 2.88 s: f = -2.732566764258e-01, ‖∇f‖ = 2.3554e-03, α = 4.77e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 146, Δt 1.22 s: f = -2.732571254083e-01, ‖∇f‖ = 9.4313e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 147, Δt 951.8 ms: f = -2.732573779944e-01, ‖∇f‖ = 9.7112e-04, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 148, Δt 967.2 ms: f = -2.732578907919e-01, ‖∇f‖ = 1.4705e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 149, Δt 2.87 s: f = -2.732581276257e-01, ‖∇f‖ = 1.6256e-03, α = 4.44e-01, m = 20, nfg = 2 +┌ Warning: LBFGS: not converged to requested tol after 150 iterations and time 6.56 m: f = -2.732584664470e-01, ‖∇f‖ = 8.3709e-04 └ @ OptimKit ~/.julia/packages/OptimKit/OEwMx/src/lbfgs.jl:199 -E = -0.2732575225334225 +E = -0.2732584664469536 ```` @@ -306,7 +306,7 @@ E_ref = -0.273284888 ```` ```` -(E - E_ref) / E_ref = -0.0001001353085337828 +(E - E_ref) / E_ref = -9.668135417127478e-5 ```` diff --git a/docs/src/examples/bose_hubbard/main.ipynb b/docs/src/examples/bose_hubbard/main.ipynb index 932af0a28..9c4ba4e3d 100644 --- a/docs/src/examples/bose_hubbard/main.ipynb +++ b/docs/src/examples/bose_hubbard/main.ipynb @@ -157,7 +157,7 @@ "outputs": [], "source": [ "boundary_alg = (; tol = 1.0e-8, alg = :SimultaneousCTMRG, trunc = (; alg = :FixedSpaceTruncation))\n", - "gradient_alg = (; tol = 1.0e-6, maxiter = 10, alg = :LinSolver, iterscheme = :fixed)\n", + "gradient_alg = (; tol = 1.0e-6, maxiter = 10, solver_alg = (; alg = :GMRES))\n", "optimizer_alg = (; tol = 1.0e-4, alg = :LBFGS, maxiter = 150, ls_maxiter = 2, ls_maxfg = 2);" ] }, @@ -174,7 +174,7 @@ " switch between the CTMRG flavors `alg=:SimultaneousCTMRG` and `alg=:SequentialCTMRG` to\n", " improve convergence. Of course the tolerances of the algorithms and their subalgorithms\n", " also have to be compatible. For more details on the available options, see the\n", - " [`fixedpoint`](@ref) docstring.\n", + " `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:" @@ -254,4 +254,4 @@ }, "nbformat": 4, "nbformat_minor": 3 -} +} \ No newline at end of file diff --git a/docs/src/examples/c4v_ctmrg/index.md b/docs/src/examples/c4v_ctmrg/index.md index 69f149fca..70728eabb 100644 --- a/docs/src/examples/c4v_ctmrg/index.md +++ b/docs/src/examples/c4v_ctmrg/index.md @@ -95,7 +95,7 @@ env₀, = leading_boundary(env_random_c4v, peps₀; alg = :C4vCTMRG, tol = 1.0e- ```` [ Info: CTMRG init: obj = -1.430301957018e-02 err = 1.0000e+00 -[ Info: CTMRG conv 36: obj = +8.685181513863e+00 err = 6.8459865700e-11 time = 1.30 sec +[ Info: CTMRG conv 36: obj = +8.685181513863e+00 err = 6.8747905068e-11 time = 1.82 sec ```` @@ -115,27 +115,27 @@ peps, env, E, = fixedpoint( ```` [ Info: LBFGS: initializing with f = -5.047653728981e-01, ‖∇f‖ = 1.9060e-01 -[ Info: LBFGS: iter 1, Δt 1.41 s: f = -5.056459159937e-01, ‖∇f‖ = 1.3798e-01, α = 1.00e+00, m = 0, nfg = 1 -[ Info: LBFGS: iter 2, Δt 737.1 ms: f = -6.375541333037e-01, ‖∇f‖ = 1.7202e-01, α = 2.79e+01, m = 1, nfg = 5 -[ Info: LBFGS: iter 3, Δt 26.1 ms: f = -6.486427009452e-01, ‖∇f‖ = 1.3183e-01, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 4, Δt 27.6 ms: f = -6.520903819553e-01, ‖∇f‖ = 1.2693e-01, α = 1.00e+00, m = 3, nfg = 1 -[ Info: LBFGS: iter 5, Δt 19.3 ms: f = -6.543775422131e-01, ‖∇f‖ = 8.4368e-02, α = 1.00e+00, m = 4, nfg = 1 -[ Info: LBFGS: iter 6, Δt 23.7 ms: f = -6.574414623345e-01, ‖∇f‖ = 9.2421e-02, α = 1.00e+00, m = 5, nfg = 1 -[ Info: LBFGS: iter 7, Δt 24.8 ms: f = -6.589599949721e-01, ‖∇f‖ = 4.1336e-02, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 8, Δt 19.2 ms: f = -6.593158985369e-01, ‖∇f‖ = 1.6527e-02, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 9, Δt 24.1 ms: f = -6.594942583549e-01, ‖∇f‖ = 1.3210e-02, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 10, Δt 22.2 ms: f = -6.598272997895e-01, ‖∇f‖ = 1.2343e-02, α = 1.00e+00, m = 9, nfg = 1 -[ Info: LBFGS: iter 11, Δt 18.5 ms: f = -6.600089784768e-01, ‖∇f‖ = 8.5851e-03, α = 1.00e+00, m = 10, nfg = 1 -[ Info: LBFGS: iter 12, Δt 21.3 ms: f = -6.601648097143e-01, ‖∇f‖ = 3.1456e-03, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 13, Δt 20.4 ms: f = -6.601883355292e-01, ‖∇f‖ = 2.2842e-03, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 14, Δt 17.2 ms: f = -6.602036974772e-01, ‖∇f‖ = 2.8361e-03, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 15, Δt 20.3 ms: f = -6.602112757039e-01, ‖∇f‖ = 2.0029e-03, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 16, Δt 16.5 ms: f = -6.602199349095e-01, ‖∇f‖ = 1.2421e-03, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 17, Δt 19.7 ms: f = -6.602252742030e-01, ‖∇f‖ = 7.3767e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 18, Δt 15.8 ms: f = -6.602292481916e-01, ‖∇f‖ = 6.4543e-04, α = 1.00e+00, m = 17, nfg = 1 -[ Info: LBFGS: iter 19, Δt 19.8 ms: f = -6.602308444814e-01, ‖∇f‖ = 3.7333e-04, α = 1.00e+00, m = 18, nfg = 1 -[ Info: LBFGS: iter 20, Δt 15.6 ms: f = -6.602310765298e-01, ‖∇f‖ = 2.5277e-04, α = 1.00e+00, m = 19, nfg = 1 -[ Info: LBFGS: converged after 21 iterations and time 1.42 m: f = -6.602310926956e-01, ‖∇f‖ = 2.8135e-05 +[ Info: LBFGS: iter 1, Δt 2.34 s: f = -5.056459154685e-01, ‖∇f‖ = 1.3798e-01, α = 1.00e+00, m = 0, nfg = 1 +[ Info: LBFGS: iter 2, Δt 1.35 s: f = -6.375540411480e-01, ‖∇f‖ = 1.7202e-01, α = 2.79e+01, m = 1, nfg = 5 +[ Info: LBFGS: iter 3, Δt 88.7 ms: f = -6.486432922192e-01, ‖∇f‖ = 1.3180e-01, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 4, Δt 83.6 ms: f = -6.520905366689e-01, ‖∇f‖ = 1.2693e-01, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 5, Δt 56.9 ms: f = -6.543779478695e-01, ‖∇f‖ = 8.4374e-02, α = 1.00e+00, m = 4, nfg = 1 +[ Info: LBFGS: iter 6, Δt 247.8 ms: f = -6.574474245322e-01, ‖∇f‖ = 9.2229e-02, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 7, Δt 61.8 ms: f = -6.589601436841e-01, ‖∇f‖ = 4.1340e-02, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 8, Δt 825.9 ms: f = -6.593161746362e-01, ‖∇f‖ = 1.6522e-02, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 9, Δt 54.0 ms: f = -6.594944356059e-01, ‖∇f‖ = 1.3207e-02, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 10, Δt 52.6 ms: f = -6.598273620830e-01, ‖∇f‖ = 1.2344e-02, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 11, Δt 57.6 ms: f = -6.600090370406e-01, ‖∇f‖ = 8.5852e-03, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 12, Δt 54.0 ms: f = -6.601648157098e-01, ‖∇f‖ = 3.1453e-03, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 13, Δt 52.2 ms: f = -6.601883494928e-01, ‖∇f‖ = 2.2795e-03, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 14, Δt 57.5 ms: f = -6.602037369209e-01, ‖∇f‖ = 2.8426e-03, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 15, Δt 72.6 ms: f = -6.602113170057e-01, ‖∇f‖ = 2.0017e-03, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 16, Δt 46.8 ms: f = -6.602199370404e-01, ‖∇f‖ = 1.2403e-03, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 17, Δt 50.6 ms: f = -6.602252410568e-01, ‖∇f‖ = 7.3832e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 18, Δt 49.3 ms: f = -6.602292169513e-01, ‖∇f‖ = 6.4978e-04, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 19, Δt 69.8 ms: f = -6.602308383663e-01, ‖∇f‖ = 3.7433e-04, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 20, Δt 45.6 ms: f = -6.602310776646e-01, ‖∇f‖ = 2.4482e-04, α = 1.00e+00, m = 19, nfg = 1 +[ Info: LBFGS: converged after 21 iterations and time 3.04 m: f = -6.602310927637e-01, ‖∇f‖ = 2.4546e-05 ```` @@ -153,7 +153,7 @@ E_ref = -0.6602310934799577 # Juraj's energy at D=2, χ=16 with C4v symmetry ```` ```` -(E - E_ref) / E_ref = -1.1879467582794218e-9 +(E - E_ref) / E_ref = -1.0848271652718446e-9 ```` @@ -166,8 +166,8 @@ and should find that they are equal (up to the sparse eigensolver tolerance): ```` ```` -ξ_h = [0.6625965820483917] -ξ_v = [0.6625965820483924] +ξ_h = [0.6625894993211241] +ξ_v = [0.6625894993211242] ```` @@ -195,9 +195,9 @@ env_qr₀, = leading_boundary( ```` ```` -[ Info: CTMRG init: obj = +5.600046917739e-03 err = 1.0000e+00 -┌ Warning: CTMRG cancel 500: obj = +5.924386039247e-01 err = 3.1337720153e-05 time = 0.23 sec -└ @ PEPSKit ~/repos/PEPSKit.jl/src/algorithms/ctmrg/ctmrg.jl:153 +[ Info: CTMRG init: obj = +5.600073848383e-03 err = 1.0000e+00 +┌ Warning: CTMRG cancel 500: obj = +5.924396753022e-01 err = 3.8244504145e-05 time = 0.97 sec +└ @ PEPSKit ~/git/PEPSKit.jl/src/algorithms/ctmrg/ctmrg.jl:170 ```` @@ -211,34 +211,35 @@ peps_qr, env_qr, E_qr, = fixedpoint( H, peps₀, env_qr₀; optimizer_alg = (; tol = 1.0e-4), boundary_alg = (; alg = :C4vCTMRG, projector_alg = :C4vQRProjector, maxiter = 500), - gradient_alg = (; alg = :LinSolver) + gradient_alg = (; solver_alg = (; alg = :GMRES)) ); @show (E_qr - E_ref) / E_ref; ```` ```` [ Info: LBFGS: initializing with f = -5.047653728981e-01, ‖∇f‖ = 1.9060e-01 -[ Info: LBFGS: iter 1, Δt 689.5 ms: f = -5.056459386582e-01, ‖∇f‖ = 1.3798e-01, α = 1.00e+00, m = 0, nfg = 1 -[ Info: LBFGS: iter 2, Δt 505.7 ms: f = -6.375600534372e-01, ‖∇f‖ = 1.7220e-01, α = 2.79e+01, m = 1, nfg = 5 -[ Info: LBFGS: iter 3, Δt 25.8 ms: f = -6.486459057961e-01, ‖∇f‖ = 1.3187e-01, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 4, Δt 34.8 ms: f = -6.520930551047e-01, ‖∇f‖ = 1.2680e-01, α = 1.00e+00, m = 3, nfg = 1 -[ Info: LBFGS: iter 5, Δt 21.3 ms: f = -6.543790524877e-01, ‖∇f‖ = 8.4444e-02, α = 1.00e+00, m = 4, nfg = 1 -[ Info: LBFGS: iter 6, Δt 22.8 ms: f = -6.576333383072e-01, ‖∇f‖ = 8.5748e-02, α = 1.00e+00, m = 5, nfg = 1 -[ Info: LBFGS: iter 7, Δt 34.4 ms: f = -6.589645527955e-01, ‖∇f‖ = 4.1392e-02, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 8, Δt 26.4 ms: f = -6.593253867913e-01, ‖∇f‖ = 1.6340e-02, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 9, Δt 175.3 ms: f = -6.595005575055e-01, ‖∇f‖ = 1.3085e-02, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 10, Δt 20.1 ms: f = -6.598308924091e-01, ‖∇f‖ = 1.2318e-02, α = 1.00e+00, m = 9, nfg = 1 -[ Info: LBFGS: iter 11, Δt 16.3 ms: f = -6.600131668884e-01, ‖∇f‖ = 8.7100e-03, α = 1.00e+00, m = 10, nfg = 1 -[ Info: LBFGS: iter 12, Δt 18.9 ms: f = -6.601658264061e-01, ‖∇f‖ = 3.0216e-03, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 13, Δt 14.0 ms: f = -6.601880521970e-01, ‖∇f‖ = 2.4696e-03, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 14, Δt 19.6 ms: f = -6.602022384904e-01, ‖∇f‖ = 2.3369e-03, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 15, Δt 14.6 ms: f = -6.602097424282e-01, ‖∇f‖ = 1.9888e-03, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 16, Δt 19.8 ms: f = -6.602207442903e-01, ‖∇f‖ = 1.3522e-03, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 17, Δt 161.0 ms: f = -6.602279508700e-01, ‖∇f‖ = 6.7499e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 18, Δt 99.1 ms: f = -6.602306993252e-01, ‖∇f‖ = 3.3521e-04, α = 1.00e+00, m = 17, nfg = 1 -[ Info: LBFGS: iter 19, Δt 185.0 ms: f = -6.602310628576e-01, ‖∇f‖ = 1.8734e-04, α = 1.00e+00, m = 18, nfg = 1 -[ Info: LBFGS: converged after 20 iterations and time 15.13 s: f = -6.602310908749e-01, ‖∇f‖ = 9.5413e-05 -(E_qr - E_ref) / E_ref = -3.945689570922226e-9 +[ Info: LBFGS: iter 1, Δt 1.32 s: f = -5.056459386885e-01, ‖∇f‖ = 1.3798e-01, α = 1.00e+00, m = 0, nfg = 1 +[ Info: LBFGS: iter 2, Δt 857.9 ms: f = -6.375600089257e-01, ‖∇f‖ = 1.7192e-01, α = 2.79e+01, m = 1, nfg = 5 +[ Info: LBFGS: iter 3, Δt 87.2 ms: f = -6.486276446423e-01, ‖∇f‖ = 1.3249e-01, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 4, Δt 82.9 ms: f = -6.520871588052e-01, ‖∇f‖ = 1.2678e-01, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 5, Δt 73.4 ms: f = -6.543687186065e-01, ‖∇f‖ = 8.4162e-02, α = 1.00e+00, m = 4, nfg = 1 +[ Info: LBFGS: iter 6, Δt 41.6 ms: f = -6.572356190771e-01, ‖∇f‖ = 9.8853e-02, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 7, Δt 99.4 ms: f = -6.589568069074e-01, ‖∇f‖ = 4.1118e-02, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 8, Δt 69.1 ms: f = -6.593071471815e-01, ‖∇f‖ = 1.6670e-02, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 9, Δt 166.5 ms: f = -6.594886940312e-01, ‖∇f‖ = 1.3322e-02, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 10, Δt 36.0 ms: f = -6.598248521120e-01, ‖∇f‖ = 1.2360e-02, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 11, Δt 49.9 ms: f = -6.600064497969e-01, ‖∇f‖ = 8.5278e-03, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 12, Δt 38.3 ms: f = -6.601643801022e-01, ‖∇f‖ = 3.2178e-03, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 13, Δt 35.5 ms: f = -6.601884099261e-01, ‖∇f‖ = 2.2290e-03, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 14, Δt 55.5 ms: f = -6.602039607999e-01, ‖∇f‖ = 2.9773e-03, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 15, Δt 38.9 ms: f = -6.602115692272e-01, ‖∇f‖ = 2.0068e-03, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 16, Δt 54.6 ms: f = -6.602198110522e-01, ‖∇f‖ = 1.2311e-03, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 17, Δt 45.4 ms: f = -6.602247768790e-01, ‖∇f‖ = 7.6180e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 18, Δt 424.3 ms: f = -6.602287407414e-01, ‖∇f‖ = 6.9448e-04, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 19, Δt 1.21 s: f = -6.602307244266e-01, ‖∇f‖ = 4.2786e-04, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 20, Δt 419.7 ms: f = -6.602310787528e-01, ‖∇f‖ = 2.3256e-04, α = 1.00e+00, m = 19, nfg = 1 +[ Info: LBFGS: converged after 21 iterations and time 42.33 s: f = -6.602310929582e-01, ‖∇f‖ = 1.0732e-05 +(E_qr - E_ref) / E_ref = -7.902520534221453e-10 ```` diff --git a/docs/src/examples/c4v_ctmrg/main.ipynb b/docs/src/examples/c4v_ctmrg/main.ipynb index 536ae7e97..edc65df99 100644 --- a/docs/src/examples/c4v_ctmrg/main.ipynb +++ b/docs/src/examples/c4v_ctmrg/main.ipynb @@ -1,16 +1,17 @@ { "cells": [ { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "using Markdown #hide" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "# C₄ᵥ CTMRG and QR-CTMRG\n", "\n", @@ -29,22 +30,22 @@ "$(J_x, J_y, J_z)=(-1, 1, -1)$.\n", "\n", "Let's get started by seeding the RNG and doing the imports:" - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "using Random\n", "using TensorKit, PEPSKit\n", "Random.seed!(123456789);" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "## Defining a specialized Hamiltonian for C₄ᵥ-symmetric PEPS\n", "\n", @@ -53,12 +54,13 @@ "contributions are exactly equivalent. This allows us to effectively halve the computational cost\n", "by evaluating only half of the terms and multiplying by 2. In practice, we implement this\n", "using a specialized `LocalOperator` that contains only the relevant terms:" - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "using MPSKitModels: S_xx, S_yy, S_zz\n", "\n", @@ -80,73 +82,72 @@ " spaces, (CartesianIndex(1, 1), CartesianIndex(1, 2)) => 2 * term\n", " )\n", "end;" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "## Initializing C₄ᵥ-invariant PEPSs and environments\n", "\n", "In order to use $C_{4v}$-symmetric algorithms, it is of course crucial to use initial guesses\n", "with $C_{4v}$ symmetry. First, we create a real-valued random PEPS that we explicitly\n", "symmetrize using `symmetrize!` and the $C_{4v}$ symmetry `RotateReflect`:" - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "symm = RotateReflect()\n", "D = 2\n", "T = Float64\n", "peps_random = InfinitePEPS(randn, T, ComplexSpace(2), ComplexSpace(D))\n", "peps₀ = symmetrize!(peps_random, symm);" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "Initializing an $C_{4v}$-invariant environment is a bit more subtle and there is no one-size-fits-all\n", "solution. As a good starting point one can use the initialization function `initialize_random_c4v_env`\n", "(or also `initialize_singlet_c4v_env`) where we construct a diagonal corner with random\n", "real entries and a random Hermitian edge tensor." - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "χ = 16\n", "env_random_c4v = initialize_random_c4v_env(peps₀, ComplexSpace(χ));" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "Then contracting the PEPS using $C_{4v}$ CTMRG is as easy as just calling `leading_boundary`\n", "but passing the initial PEPS and environment as well as the `alg = :C4vCTMRG` keyword argument:" - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "env₀, = leading_boundary(env_random_c4v, peps₀; alg = :C4vCTMRG, tol = 1.0e-10);" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "## C₄ᵥ-symmetric optimization\n", "\n", @@ -154,23 +155,23 @@ "minimization where we contract using $C_{4v}$ CTMRG such that the energy gradient will also\n", "exhibit $C_{4v}$ symmetry. For that, we call `fixedpoint` and specify `alg = :C4vCTMRG`\n", "as the boundary contraction algorithm:" - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "H = real(heisenberg_XYZ_c4v(InfiniteSquare())) # make Hamiltonian real-valued\n", "peps, env, E, = fixedpoint(\n", " H, peps₀, env₀; optimizer_alg = (; tol = 1.0e-4), boundary_alg = (; alg = :C4vCTMRG),\n", ");" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "We note that this energy is slightly higher than the one obtained from an\n", "optimization using asymmetric CTMRG with equivalent settings.\n", @@ -179,39 +180,39 @@ "Comparing against 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", "we find very good agreement:" - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "E_ref = -0.6602310934799577 # Juraj's energy at D=2, χ=16 with C4v symmetry\n", "@show (E - E_ref) / E_ref;" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "As a consistency check, we can compute the vertical and horizontal correlation lengths,\n", "and should find that they are equal (up to the sparse eigensolver tolerance):" - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "ξ_h, ξ_v, = correlation_length(peps, env)\n", "@show ξ_h ξ_v;" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "## QR-CTMRG\n", "\n", @@ -229,68 +230,67 @@ "used by the `C4vCTMRG` algorithm to `projector_alg = :C4vQRProjector` (as opposed to `:C4vEighProjector`).\n", "QR-CTMRG tends to need significantly more iterations to converge while still being much faster,\n", "hence we need to increase `maxiter`:" - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "env_qr₀, = leading_boundary(\n", " env_random_c4v, peps; alg = :C4vCTMRG, projector_alg = :C4vQRProjector, maxiter = 500,\n", ");" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "To optimize using QR-CTMRG we proceed analogously by specifiying `projector_alg = :C4vQRProjector` and\n", "increasing the `maxiter` when setting the boundary algorithm parameters. We make sure to supply\n", "the `env_qr₀` initial environment because it does not use `DiagonalTensorMap`s as its corner\n", "type (only regular `eigh`-based $C_{4v}$ CTMRG produces diagonal corners):" - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "peps_qr, env_qr, E_qr, = fixedpoint(\n", " H, peps₀, env_qr₀;\n", " optimizer_alg = (; tol = 1.0e-4),\n", " boundary_alg = (; alg = :C4vCTMRG, projector_alg = :C4vQRProjector, maxiter = 500),\n", - " gradient_alg = (; alg = :LinSolver)\n", + " gradient_alg = (; solver_alg = (; alg = :GMRES))\n", ");\n", "@show (E_qr - E_ref) / E_ref;" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "---\n", "\n", "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" - ], - "metadata": {} + ] } ], - "nbformat_minor": 3, "metadata": { + "kernelspec": { + "display_name": "Julia 1.12.5", + "language": "julia", + "name": "julia-1.12" + }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", "version": "1.12.5" - }, - "kernelspec": { - "name": "julia-1.12", - "display_name": "Julia 1.12.5", - "language": "julia" } }, - "nbformat": 4 + "nbformat": 4, + "nbformat_minor": 3 } \ No newline at end of file diff --git a/docs/src/examples/fermi_hubbard/index.md b/docs/src/examples/fermi_hubbard/index.md index d0d4b4576..6e7fc5c63 100644 --- a/docs/src/examples/fermi_hubbard/index.md +++ b/docs/src/examples/fermi_hubbard/index.md @@ -82,7 +82,7 @@ define all algorithmic parameters: ````julia boundary_alg = (; tol = 1.0e-8, alg = :SimultaneousCTMRG, trunc = (; alg = :FixedSpaceTruncation)) -gradient_alg = (; tol = 1.0e-6, alg = :EigSolver, maxiter = 10, iterscheme = :fixed) +gradient_alg = (; tol = 1.0e-6, maxiter = 10, solver_alg = (; alg = :Arnoldi)) optimizer_alg = (; tol = 1.0e-4, alg = :LBFGS, maxiter = 80, ls_maxiter = 3, ls_maxfg = 3) ```` @@ -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.790119080804e-07im err = 7.4963849914e-09 time = 36.38 sec +[ Info: CTMRG conv 26: obj = +8.371681846538e+04 -3.790119080804e-07im err = 7.4963849914e-09 time = 42.75 sec ```` @@ -120,91 +120,91 @@ 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/OEwMx/src/linesearches.jl:151 -[ Info: LBFGS: iter 1, Δt 38.64 s: f = 3.801336895927e+00, ‖∇f‖ = 2.3457e+01, α = 2.50e+01, m = 0, nfg = 4 +[ Info: LBFGS: iter 1, Δt 55.90 s: f = 3.801336895927e+00, ‖∇f‖ = 2.3457e+01, α = 2.50e+01, m = 0, nfg = 4 ┌ 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/OEwMx/src/linesearches.jl:151 -[ Info: LBFGS: iter 2, Δt 33.51 s: f = -9.717027903025e-03, ‖∇f‖ = 3.2049e+00, α = 2.50e+01, m = 0, nfg = 4 -[ Info: LBFGS: iter 3, Δt 6.56 s: f = -1.151937230814e-01, ‖∇f‖ = 2.7846e+00, α = 1.00e+00, m = 1, nfg = 1 -[ Info: LBFGS: iter 4, Δt 7.11 s: f = -6.164097151643e-01, ‖∇f‖ = 2.3680e+00, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 5, Δt 5.99 s: f = -8.177983968326e-01, ‖∇f‖ = 1.9112e+00, α = 1.00e+00, m = 3, nfg = 1 -[ Info: LBFGS: iter 6, Δt 5.39 s: f = -9.902797555067e-01, ‖∇f‖ = 2.3790e+00, α = 1.00e+00, m = 4, nfg = 1 -[ Info: LBFGS: iter 7, Δt 6.47 s: f = -1.142781183014e+00, ‖∇f‖ = 1.5680e+00, α = 1.00e+00, m = 5, nfg = 1 -[ Info: LBFGS: iter 8, Δt 4.97 s: f = -1.238252399424e+00, ‖∇f‖ = 3.5020e+00, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 9, Δt 5.92 s: f = -1.438152723955e+00, ‖∇f‖ = 1.3366e+00, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 10, Δt 4.83 s: f = -1.523106553003e+00, ‖∇f‖ = 1.3495e+00, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 11, Δt 11.09 s: f = -1.619309113033e+00, ‖∇f‖ = 1.1948e+00, α = 1.72e-01, m = 9, nfg = 2 -[ Info: LBFGS: iter 12, Δt 10.75 s: f = -1.681436580003e+00, ‖∇f‖ = 9.4842e-01, α = 2.37e-01, m = 10, nfg = 2 -[ Info: LBFGS: iter 13, Δt 4.81 s: f = -1.720664442091e+00, ‖∇f‖ = 1.4227e+00, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 14, Δt 5.91 s: f = -1.770786352947e+00, ‖∇f‖ = 6.2727e-01, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 15, Δt 4.69 s: f = -1.807472232437e+00, ‖∇f‖ = 5.1285e-01, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 16, Δt 6.02 s: f = -1.859749167278e+00, ‖∇f‖ = 7.1361e-01, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 17, Δt 4.65 s: f = -1.893132058603e+00, ‖∇f‖ = 6.7317e-01, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 18, Δt 4.84 s: f = -1.923092871787e+00, ‖∇f‖ = 5.5354e-01, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 19, Δt 5.89 s: f = -1.948135797818e+00, ‖∇f‖ = 4.7674e-01, α = 1.00e+00, m = 17, nfg = 1 -[ Info: LBFGS: iter 20, Δt 4.83 s: f = -1.969521620203e+00, ‖∇f‖ = 4.1602e-01, α = 1.00e+00, m = 18, nfg = 1 -[ Info: LBFGS: iter 21, Δt 6.12 s: f = -1.982569429583e+00, ‖∇f‖ = 4.5188e-01, α = 1.00e+00, m = 19, nfg = 1 -[ Info: LBFGS: iter 22, Δt 4.79 s: f = -1.994023088009e+00, ‖∇f‖ = 3.1544e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 23, Δt 6.09 s: f = -2.002841835268e+00, ‖∇f‖ = 3.0502e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 24, Δt 4.93 s: f = -2.014066311538e+00, ‖∇f‖ = 3.3498e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 25, Δt 5.04 s: f = -2.022003034919e+00, ‖∇f‖ = 4.3896e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 26, Δt 5.98 s: f = -2.030108714405e+00, ‖∇f‖ = 2.0527e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 27, Δt 4.94 s: f = -2.035064142878e+00, ‖∇f‖ = 1.6295e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 28, Δt 6.60 s: f = -2.038644459020e+00, ‖∇f‖ = 1.6908e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 29, Δt 4.92 s: f = -2.041287669506e+00, ‖∇f‖ = 2.4233e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 30, Δt 5.95 s: f = -2.044963015191e+00, ‖∇f‖ = 1.2134e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 31, Δt 4.83 s: f = -2.046709214218e+00, ‖∇f‖ = 9.5293e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 32, Δt 6.05 s: f = -2.048704711627e+00, ‖∇f‖ = 1.0554e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 33, Δt 4.78 s: f = -2.049753785745e+00, ‖∇f‖ = 1.7672e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 34, Δt 5.96 s: f = -2.051012657058e+00, ‖∇f‖ = 6.4429e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 35, Δt 4.80 s: f = -2.051487365494e+00, ‖∇f‖ = 4.8991e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 36, Δt 4.82 s: f = -2.051906995005e+00, ‖∇f‖ = 6.2050e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 37, Δt 6.04 s: f = -2.052351424092e+00, ‖∇f‖ = 9.2730e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 38, Δt 4.80 s: f = -2.052848308926e+00, ‖∇f‖ = 4.8571e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 39, Δt 5.93 s: f = -2.053135861688e+00, ‖∇f‖ = 3.5616e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 40, Δt 4.80 s: f = -2.053405790277e+00, ‖∇f‖ = 4.2303e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 41, Δt 4.88 s: f = -2.053600751472e+00, ‖∇f‖ = 5.7965e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 42, Δt 5.95 s: f = -2.053812276343e+00, ‖∇f‖ = 3.2230e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 43, Δt 4.68 s: f = -2.054009904322e+00, ‖∇f‖ = 3.1640e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 44, Δt 4.74 s: f = -2.054189829937e+00, ‖∇f‖ = 4.1575e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 45, Δt 5.93 s: f = -2.054332727237e+00, ‖∇f‖ = 6.9194e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 46, Δt 4.71 s: f = -2.054519396790e+00, ‖∇f‖ = 2.9113e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 47, Δt 5.92 s: f = -2.054613028290e+00, ‖∇f‖ = 2.5330e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 48, Δt 4.69 s: f = -2.054720909675e+00, ‖∇f‖ = 3.1755e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 49, Δt 5.72 s: f = -2.054879189481e+00, ‖∇f‖ = 3.4648e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 50, Δt 4.90 s: f = -2.054968277255e+00, ‖∇f‖ = 8.4871e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 51, Δt 4.71 s: f = -2.055240591253e+00, ‖∇f‖ = 3.1534e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 52, Δt 5.92 s: f = -2.055381130477e+00, ‖∇f‖ = 2.5669e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 53, Δt 4.75 s: f = -2.055572809496e+00, ‖∇f‖ = 3.8027e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 54, Δt 4.88 s: f = -2.055872578414e+00, ‖∇f‖ = 4.6489e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 55, Δt 6.02 s: f = -2.056396546910e+00, ‖∇f‖ = 8.8069e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 56, Δt 4.94 s: f = -2.056856099700e+00, ‖∇f‖ = 8.3587e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 57, Δt 6.07 s: f = -2.057479296853e+00, ‖∇f‖ = 4.4471e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 58, Δt 4.81 s: f = -2.057912211557e+00, ‖∇f‖ = 5.9322e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 59, Δt 6.08 s: f = -2.058287106374e+00, ‖∇f‖ = 6.0138e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 60, Δt 4.78 s: f = -2.058998688168e+00, ‖∇f‖ = 6.2214e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 61, Δt 10.81 s: f = -2.059475430386e+00, ‖∇f‖ = 1.0083e-01, α = 4.82e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 62, Δt 4.85 s: f = -2.060082712314e+00, ‖∇f‖ = 6.8338e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 63, Δt 6.18 s: f = -2.060482611701e+00, ‖∇f‖ = 7.3298e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 64, Δt 4.92 s: f = -2.060741140972e+00, ‖∇f‖ = 9.5443e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 65, Δt 4.88 s: f = -2.061312696274e+00, ‖∇f‖ = 7.1658e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 66, Δt 5.97 s: f = -2.061709741165e+00, ‖∇f‖ = 5.4940e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 67, Δt 4.87 s: f = -2.062078223556e+00, ‖∇f‖ = 5.4620e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 68, Δt 6.00 s: f = -2.062377140676e+00, ‖∇f‖ = 7.1416e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 69, Δt 10.93 s: f = -2.062698062544e+00, ‖∇f‖ = 9.6845e-02, α = 5.00e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 70, Δt 5.04 s: f = -2.063163727897e+00, ‖∇f‖ = 7.1580e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 71, Δt 6.13 s: f = -2.063925627174e+00, ‖∇f‖ = 9.0915e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 72, Δt 5.02 s: f = -2.064219513055e+00, ‖∇f‖ = 8.0698e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 73, Δt 4.91 s: f = -2.064673250535e+00, ‖∇f‖ = 7.5326e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 74, Δt 6.12 s: f = -2.065226882556e+00, ‖∇f‖ = 1.0638e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 75, Δt 4.85 s: f = -2.066059171824e+00, ‖∇f‖ = 9.5076e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 76, Δt 4.99 s: f = -2.067195111916e+00, ‖∇f‖ = 1.5006e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 77, Δt 5.94 s: f = -2.068289278812e+00, ‖∇f‖ = 2.3385e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 78, Δt 16.76 s: f = -2.068482519585e+00, ‖∇f‖ = 6.6865e-01, α = 1.56e-01, m = 20, nfg = 3 -[ Info: LBFGS: iter 79, Δt 12.04 s: f = -2.068666326649e+00, ‖∇f‖ = 3.3508e-01, α = 2.43e-01, m = 20, nfg = 2 -┌ Warning: LBFGS: not converged to requested tol after 80 iterations and time 21.90 m: f = -2.069886404460e+00, ‖∇f‖ = 2.6573e-01 +[ Info: LBFGS: iter 2, Δt 48.81 s: f = -9.717027903025e-03, ‖∇f‖ = 3.2049e+00, α = 2.50e+01, m = 0, nfg = 4 +[ Info: LBFGS: iter 3, Δt 10.98 s: f = -1.151937230814e-01, ‖∇f‖ = 2.7846e+00, α = 1.00e+00, m = 1, nfg = 1 +[ Info: LBFGS: iter 4, Δt 12.15 s: f = -6.164097151643e-01, ‖∇f‖ = 2.3680e+00, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 5, Δt 8.91 s: f = -8.177983968326e-01, ‖∇f‖ = 1.9112e+00, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 6, Δt 11.00 s: f = -9.902797555067e-01, ‖∇f‖ = 2.3790e+00, α = 1.00e+00, m = 4, nfg = 1 +[ Info: LBFGS: iter 7, Δt 8.50 s: f = -1.142781183014e+00, ‖∇f‖ = 1.5680e+00, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 8, Δt 8.70 s: f = -1.238252399424e+00, ‖∇f‖ = 3.5020e+00, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 9, Δt 8.67 s: f = -1.438152723955e+00, ‖∇f‖ = 1.3366e+00, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 10, Δt 6.58 s: f = -1.523106553003e+00, ‖∇f‖ = 1.3495e+00, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 11, Δt 17.05 s: f = -1.619309113033e+00, ‖∇f‖ = 1.1948e+00, α = 1.72e-01, m = 9, nfg = 2 +[ Info: LBFGS: iter 12, Δt 14.87 s: f = -1.681436580003e+00, ‖∇f‖ = 9.4842e-01, α = 2.37e-01, m = 10, nfg = 2 +[ Info: LBFGS: iter 13, Δt 8.28 s: f = -1.720664442091e+00, ‖∇f‖ = 1.4227e+00, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 14, Δt 6.70 s: f = -1.770786352947e+00, ‖∇f‖ = 6.2727e-01, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 15, Δt 9.84 s: f = -1.807472232437e+00, ‖∇f‖ = 5.1285e-01, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 16, Δt 6.64 s: f = -1.859749167278e+00, ‖∇f‖ = 7.1361e-01, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 17, Δt 9.08 s: f = -1.893132058603e+00, ‖∇f‖ = 6.7317e-01, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 18, Δt 8.65 s: f = -1.923092871787e+00, ‖∇f‖ = 5.5354e-01, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 19, Δt 6.38 s: f = -1.948135797818e+00, ‖∇f‖ = 4.7674e-01, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 20, Δt 8.62 s: f = -1.969521620203e+00, ‖∇f‖ = 4.1602e-01, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 21, Δt 6.67 s: f = -1.982569429583e+00, ‖∇f‖ = 4.5188e-01, α = 1.00e+00, m = 19, nfg = 1 +[ Info: LBFGS: iter 22, Δt 8.77 s: f = -1.994023088010e+00, ‖∇f‖ = 3.1544e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 23, Δt 8.78 s: f = -2.002841835268e+00, ‖∇f‖ = 3.0502e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 24, Δt 6.51 s: f = -2.014066311538e+00, ‖∇f‖ = 3.3498e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 25, Δt 9.07 s: f = -2.022003034919e+00, ‖∇f‖ = 4.3896e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 26, Δt 8.65 s: f = -2.030108714405e+00, ‖∇f‖ = 2.0527e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 27, Δt 6.52 s: f = -2.035064142878e+00, ‖∇f‖ = 1.6295e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 28, Δt 9.48 s: f = -2.038644459020e+00, ‖∇f‖ = 1.6908e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 29, Δt 6.76 s: f = -2.041287669506e+00, ‖∇f‖ = 2.4233e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 30, Δt 8.63 s: f = -2.044963015191e+00, ‖∇f‖ = 1.2134e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 31, Δt 8.52 s: f = -2.046709214218e+00, ‖∇f‖ = 9.5293e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 32, Δt 6.41 s: f = -2.048704711627e+00, ‖∇f‖ = 1.0554e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 33, Δt 8.75 s: f = -2.049753785745e+00, ‖∇f‖ = 1.7672e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 34, Δt 8.43 s: f = -2.051012657058e+00, ‖∇f‖ = 6.4429e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 35, Δt 6.45 s: f = -2.051487365494e+00, ‖∇f‖ = 4.8991e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 36, Δt 8.69 s: f = -2.051906995005e+00, ‖∇f‖ = 6.2050e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 37, Δt 6.57 s: f = -2.052351424092e+00, ‖∇f‖ = 9.2730e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 38, Δt 8.59 s: f = -2.052848308926e+00, ‖∇f‖ = 4.8571e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 39, Δt 6.56 s: f = -2.053135861688e+00, ‖∇f‖ = 3.5616e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 40, Δt 8.32 s: f = -2.053405790277e+00, ‖∇f‖ = 4.2303e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 41, Δt 8.70 s: f = -2.053600751472e+00, ‖∇f‖ = 5.7965e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 42, Δt 6.46 s: f = -2.053812276342e+00, ‖∇f‖ = 3.2230e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 43, Δt 8.32 s: f = -2.054009904322e+00, ‖∇f‖ = 3.1640e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 44, Δt 6.64 s: f = -2.054189829937e+00, ‖∇f‖ = 4.1575e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 45, Δt 8.57 s: f = -2.054332727236e+00, ‖∇f‖ = 6.9194e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 46, Δt 7.90 s: f = -2.054519396790e+00, ‖∇f‖ = 2.9113e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 47, Δt 7.19 s: f = -2.054613028290e+00, ‖∇f‖ = 2.5330e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 48, Δt 8.29 s: f = -2.054720909675e+00, ‖∇f‖ = 3.1755e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 49, Δt 6.62 s: f = -2.054879189481e+00, ‖∇f‖ = 3.4648e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 50, Δt 8.74 s: f = -2.054968277255e+00, ‖∇f‖ = 8.4871e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 51, Δt 8.27 s: f = -2.055240591253e+00, ‖∇f‖ = 3.1534e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 52, Δt 6.63 s: f = -2.055381130478e+00, ‖∇f‖ = 2.5669e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 53, Δt 8.60 s: f = -2.055572809496e+00, ‖∇f‖ = 3.8027e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 54, Δt 6.49 s: f = -2.055872578415e+00, ‖∇f‖ = 4.6489e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 55, Δt 8.91 s: f = -2.056396546909e+00, ‖∇f‖ = 8.8069e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 56, Δt 8.44 s: f = -2.056856099703e+00, ‖∇f‖ = 8.3587e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 57, Δt 6.69 s: f = -2.057479296853e+00, ‖∇f‖ = 4.4471e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 58, Δt 8.90 s: f = -2.057912211557e+00, ‖∇f‖ = 5.9322e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 59, Δt 6.49 s: f = -2.058287106375e+00, ‖∇f‖ = 6.0138e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 60, Δt 8.71 s: f = -2.058998688171e+00, ‖∇f‖ = 6.2214e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 61, Δt 15.04 s: f = -2.059475430392e+00, ‖∇f‖ = 1.0083e-01, α = 4.82e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 62, Δt 8.72 s: f = -2.060082712318e+00, ‖∇f‖ = 6.8338e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 63, Δt 8.69 s: f = -2.060482611702e+00, ‖∇f‖ = 7.3298e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 64, Δt 6.86 s: f = -2.060741140978e+00, ‖∇f‖ = 9.5443e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 65, Δt 8.82 s: f = -2.061312696269e+00, ‖∇f‖ = 7.1658e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 66, Δt 6.44 s: f = -2.061709741147e+00, ‖∇f‖ = 5.4940e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 67, Δt 8.63 s: f = -2.062078223544e+00, ‖∇f‖ = 5.4620e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 68, Δt 8.44 s: f = -2.062377140672e+00, ‖∇f‖ = 7.1416e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 69, Δt 15.15 s: f = -2.062698062519e+00, ‖∇f‖ = 9.6845e-02, α = 5.00e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 70, Δt 6.51 s: f = -2.063163727822e+00, ‖∇f‖ = 7.1580e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 71, Δt 8.89 s: f = -2.063925627112e+00, ‖∇f‖ = 9.0915e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 72, Δt 8.84 s: f = -2.064219513082e+00, ‖∇f‖ = 8.0698e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 73, Δt 6.38 s: f = -2.064673250590e+00, ‖∇f‖ = 7.5326e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 74, Δt 8.64 s: f = -2.065226882451e+00, ‖∇f‖ = 1.0638e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 75, Δt 8.39 s: f = -2.066059171976e+00, ‖∇f‖ = 9.5076e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 76, Δt 6.99 s: f = -2.067195112385e+00, ‖∇f‖ = 1.5006e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 77, Δt 9.08 s: f = -2.068289281689e+00, ‖∇f‖ = 2.3385e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 78, Δt 26.40 s: f = -2.068482510552e+00, ‖∇f‖ = 6.6864e-01, α = 1.56e-01, m = 20, nfg = 3 +[ Info: LBFGS: iter 79, Δt 17.21 s: f = -2.068666325968e+00, ‖∇f‖ = 3.3508e-01, α = 2.43e-01, m = 20, nfg = 2 +┌ Warning: LBFGS: not converged to requested tol after 80 iterations and time 27.68 m: f = -2.069886415612e+00, ‖∇f‖ = 2.6573e-01 └ @ OptimKit ~/.julia/packages/OptimKit/OEwMx/src/lbfgs.jl:199 -E = -2.069886404460094 +E = -2.0698864156120913 ```` @@ -219,7 +219,7 @@ E_ref = -2.09765625 ```` ```` -(E - E_ref) / E_ref = -0.013238511095374089 +(E - E_ref) / E_ref = -0.013238505778965785 ```` diff --git a/docs/src/examples/fermi_hubbard/main.ipynb b/docs/src/examples/fermi_hubbard/main.ipynb index ed8273401..84bde2747 100644 --- a/docs/src/examples/fermi_hubbard/main.ipynb +++ b/docs/src/examples/fermi_hubbard/main.ipynb @@ -130,7 +130,7 @@ "outputs": [], "source": [ "boundary_alg = (; tol = 1.0e-8, alg = :SimultaneousCTMRG, trunc = (; alg = :FixedSpaceTruncation))\n", - "gradient_alg = (; tol = 1.0e-6, alg = :EigSolver, maxiter = 10, iterscheme = :fixed)\n", + "gradient_alg = (; tol = 1.0e-6, maxiter = 10, solver_alg = (; alg = :Arnoldi))\n", "optimizer_alg = (; tol = 1.0e-4, alg = :LBFGS, maxiter = 80, ls_maxiter = 3, ls_maxfg = 3)" ] }, diff --git a/docs/src/examples/heisenberg/index.md b/docs/src/examples/heisenberg/index.md index 089742f7e..9c41ab783 100644 --- a/docs/src/examples/heisenberg/index.md +++ b/docs/src/examples/heisenberg/index.md @@ -48,7 +48,7 @@ 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{ComplexF64, TensorKit.ComplexSpace, 2, 2, Vector{ComplexF64}}(ComplexF64[-0.25 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, -0.5 + 0.0im, 0.0 + 0.0im, 0.25 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, 0.25 + 0.0im, 0.0 + 0.0im, -0.5 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, -0.25 + 0.0im], (ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)), (CartesianIndex(1, 1), CartesianIndex(2, 1)) => TensorMap{ComplexF64, TensorKit.ComplexSpace, 2, 2, Vector{ComplexF64}}(ComplexF64[-0.25 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, -0.5 + 0.0im, 0.0 + 0.0im, 0.25 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, 0.25 + 0.0im, 0.0 + 0.0im, -0.5 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, -0.25 + 0.0im], (ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)))) +LocalOperator{Any, TensorKit.ComplexSpace}(TensorKit.ComplexSpace[ℂ^2;;], Dict{Vector{CartesianIndex{2}}, Any}([CartesianIndex(1, 1), CartesianIndex(1, 2)] => TensorMap{ComplexF64, TensorKit.ComplexSpace, 2, 2, Vector{ComplexF64}}(ComplexF64[-0.25 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, -0.5 + 0.0im, 0.0 + 0.0im, 0.25 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, 0.25 + 0.0im, 0.0 + 0.0im, -0.5 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, -0.25 + 0.0im], (ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)), [CartesianIndex(1, 1), CartesianIndex(2, 1)] => TensorMap{ComplexF64, TensorKit.ComplexSpace, 2, 2, Vector{ComplexF64}}(ComplexF64[-0.25 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, -0.5 + 0.0im, 0.0 + 0.0im, 0.25 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, 0.25 + 0.0im, 0.0 + 0.0im, -0.5 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im, -0.25 + 0.0im], (ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)))) ```` ## Setting up the algorithms and initial guesses @@ -118,7 +118,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.6201834059e-11 time = 0.15 sec +[ Info: CTMRG conv 27: obj = +9.727103564786e+00 err = 2.6201048445e-11 time = 14.48 sec ```` @@ -134,7 +134,7 @@ number of the decomposition (the ratio of largest to smallest singular value): ```` ```` -info_ctmrg.contraction_metrics = (truncation_error = 0.0008076332824218654, condition_number = 1.0752351782145432e10) +info_ctmrg.contraction_metrics = (truncation_error = 0.00080763328242187,) ```` @@ -152,93 +152,87 @@ peps, env, E, info_opt = fixedpoint( ```` [ Info: LBFGS: initializing with f = 6.016453104372e-04, ‖∇f‖ = 9.3548e-01 -[ Info: LBFGS: iter 1, Δt 2.12 s: f = -4.897965201611e-01, ‖∇f‖ = 6.0022e-01, α = 5.94e+01, m = 0, nfg = 5 -[ Info: LBFGS: iter 2, Δt 505.0 ms: f = -5.019846351556e-01, ‖∇f‖ = 5.3738e-01, α = 2.80e-01, m = 1, nfg = 2 -[ Info: LBFGS: iter 3, Δt 191.1 ms: f = -5.231639268909e-01, ‖∇f‖ = 3.9927e-01, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 4, Δt 409.7 ms: f = -5.386543630053e-01, ‖∇f‖ = 4.1552e-01, α = 2.29e-01, m = 3, nfg = 2 -[ Info: LBFGS: iter 5, Δt 1.50 s: f = -5.498211739968e-01, ‖∇f‖ = 4.4002e-01, α = 6.90e-02, m = 4, nfg = 4 -[ Info: LBFGS: iter 6, Δt 467.4 ms: f = -5.690169638216e-01, ‖∇f‖ = 4.8450e-01, α = 2.26e-01, m = 5, nfg = 2 -[ Info: LBFGS: iter 7, Δt 198.0 ms: f = -5.871277575700e-01, ‖∇f‖ = 4.1970e-01, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 8, Δt 211.2 ms: f = -6.001554860753e-01, ‖∇f‖ = 2.1792e-01, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 9, Δt 222.6 ms: f = -6.068836020250e-01, ‖∇f‖ = 1.9566e-01, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 10, Δt 186.9 ms: f = -6.250397688020e-01, ‖∇f‖ = 3.0330e-01, α = 1.00e+00, m = 9, nfg = 1 -[ Info: LBFGS: iter 11, Δt 188.0 ms: f = -6.391660380237e-01, ‖∇f‖ = 2.3075e-01, α = 1.00e+00, m = 10, nfg = 1 -[ Info: LBFGS: iter 12, Δt 190.0 ms: f = -6.471796209809e-01, ‖∇f‖ = 2.6051e-01, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 13, Δt 179.6 ms: f = -6.503370022319e-01, ‖∇f‖ = 1.6112e-01, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 14, Δt 184.6 ms: f = -6.546061095581e-01, ‖∇f‖ = 7.7752e-02, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 15, Δt 178.9 ms: f = -6.559626479400e-01, ‖∇f‖ = 5.1323e-02, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 16, Δt 179.8 ms: f = -6.570345924079e-01, ‖∇f‖ = 5.6663e-02, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 17, Δt 157.1 ms: f = -6.586101544056e-01, ‖∇f‖ = 4.5249e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 18, Δt 176.5 ms: f = -6.594210781985e-01, ‖∇f‖ = 4.8908e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 19, Δt 176.0 ms: f = -6.595829405485e-01, ‖∇f‖ = 5.7868e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 20, Δt 172.7 ms: f = -6.598106976973e-01, ‖∇f‖ = 1.7743e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 21, Δt 171.2 ms: f = -6.598737917929e-01, ‖∇f‖ = 1.4674e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 22, Δt 154.8 ms: f = -6.600722398668e-01, ‖∇f‖ = 1.9297e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 23, Δt 175.7 ms: f = -6.602319320141e-01, ‖∇f‖ = 1.7537e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 24, Δt 177.3 ms: f = -6.603792239696e-01, ‖∇f‖ = 2.3875e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 25, Δt 182.8 ms: f = -6.604618339397e-01, ‖∇f‖ = 2.3372e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 26, Δt 183.2 ms: f = -6.605536673380e-01, ‖∇f‖ = 1.2672e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 27, Δt 157.3 ms: f = -6.606170022704e-01, ‖∇f‖ = 1.0507e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 28, Δt 182.3 ms: f = -6.608142105393e-01, ‖∇f‖ = 1.8082e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 29, Δt 185.2 ms: f = -6.609609282328e-01, ‖∇f‖ = 1.7516e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 30, Δt 185.1 ms: f = -6.610389077762e-01, ‖∇f‖ = 1.1313e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 31, Δt 184.6 ms: f = -6.610872587590e-01, ‖∇f‖ = 1.0263e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 32, Δt 184.3 ms: f = -6.611211818037e-01, ‖∇f‖ = 8.8770e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 33, Δt 553.3 ms: f = -6.611798476467e-01, ‖∇f‖ = 1.1487e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 34, Δt 312.0 ms: f = -6.612071946246e-01, ‖∇f‖ = 8.8668e-03, α = 5.31e-01, m = 16, nfg = 2 -[ Info: LBFGS: iter 35, Δt 160.2 ms: f = -6.612262741993e-01, ‖∇f‖ = 6.4671e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 36, Δt 202.0 ms: f = -6.612605502529e-01, ‖∇f‖ = 5.8761e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 37, Δt 151.9 ms: f = -6.612675213996e-01, ‖∇f‖ = 1.2104e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 38, Δt 189.9 ms: f = -6.612838268942e-01, ‖∇f‖ = 4.9174e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 39, Δt 182.5 ms: f = -6.612924068490e-01, ‖∇f‖ = 4.5920e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 40, Δt 178.3 ms: f = -6.613079387503e-01, ‖∇f‖ = 6.2779e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 41, Δt 192.4 ms: f = -6.613408210642e-01, ‖∇f‖ = 8.9068e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 42, Δt 190.8 ms: f = -6.614138251583e-01, ‖∇f‖ = 1.7164e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 43, Δt 199.2 ms: f = -6.614875672669e-01, ‖∇f‖ = 2.7431e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 44, Δt 194.5 ms: f = -6.616599057348e-01, ‖∇f‖ = 1.9066e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 45, Δt 195.6 ms: f = -6.618786161348e-01, ‖∇f‖ = 2.2183e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 46, Δt 213.4 ms: f = -6.619399318120e-01, ‖∇f‖ = 2.5716e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 47, Δt 220.7 ms: f = -6.620476911315e-01, ‖∇f‖ = 1.8966e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 48, Δt 217.7 ms: f = -6.621060522754e-01, ‖∇f‖ = 3.7665e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 49, Δt 204.7 ms: f = -6.622529089048e-01, ‖∇f‖ = 1.3397e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 50, Δt 204.7 ms: f = -6.623264743363e-01, ‖∇f‖ = 1.1672e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 51, Δt 218.7 ms: f = -6.623899178233e-01, ‖∇f‖ = 1.0882e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 52, Δt 202.0 ms: f = -6.624416247257e-01, ‖∇f‖ = 1.3597e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 53, Δt 394.1 ms: f = -6.624656425590e-01, ‖∇f‖ = 8.4420e-03, α = 4.81e-01, m = 16, nfg = 2 -[ Info: LBFGS: iter 54, Δt 197.6 ms: f = -6.624780538014e-01, ‖∇f‖ = 5.0929e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 55, Δt 197.8 ms: f = -6.624880049231e-01, ‖∇f‖ = 5.2666e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 56, Δt 204.1 ms: f = -6.624976954160e-01, ‖∇f‖ = 3.7037e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 57, Δt 190.4 ms: f = -6.625008721553e-01, ‖∇f‖ = 3.0362e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 58, Δt 191.2 ms: f = -6.625030516180e-01, ‖∇f‖ = 2.4284e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 59, Δt 191.0 ms: f = -6.625070638925e-01, ‖∇f‖ = 2.1069e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 60, Δt 192.7 ms: f = -6.625095206787e-01, ‖∇f‖ = 2.1549e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 61, Δt 193.1 ms: f = -6.625099661780e-01, ‖∇f‖ = 3.3860e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 62, Δt 167.6 ms: f = -6.625114675108e-01, ‖∇f‖ = 9.0292e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 63, Δt 186.0 ms: f = -6.625117499549e-01, ‖∇f‖ = 7.0427e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 64, Δt 187.9 ms: f = -6.625121897607e-01, ‖∇f‖ = 7.7226e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 65, Δt 191.2 ms: f = -6.625124959722e-01, ‖∇f‖ = 1.5554e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 66, Δt 283.0 ms: f = -6.625128507721e-01, ‖∇f‖ = 7.2954e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 67, Δt 449.0 ms: f = -6.625131170343e-01, ‖∇f‖ = 5.6393e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 68, Δt 152.8 ms: f = -6.625133171949e-01, ‖∇f‖ = 6.8116e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 69, Δt 154.0 ms: f = -6.625134074587e-01, ‖∇f‖ = 1.8486e-03, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 70, Δt 163.1 ms: f = -6.625137426718e-01, ‖∇f‖ = 5.2412e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 71, Δt 215.8 ms: f = -6.625138213073e-01, ‖∇f‖ = 3.5172e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 72, Δt 161.6 ms: f = -6.625138889403e-01, ‖∇f‖ = 4.0528e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 73, Δt 372.5 ms: f = -6.625139275261e-01, ‖∇f‖ = 6.8786e-04, α = 4.41e-01, m = 16, nfg = 2 -[ Info: LBFGS: iter 74, Δt 184.6 ms: f = -6.625139827091e-01, ‖∇f‖ = 4.5409e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 75, Δt 188.7 ms: f = -6.625140572020e-01, ‖∇f‖ = 4.6946e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 76, Δt 172.9 ms: f = -6.625140853562e-01, ‖∇f‖ = 7.8814e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 77, Δt 190.9 ms: f = -6.625141220057e-01, ‖∇f‖ = 3.9680e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 78, Δt 204.6 ms: f = -6.625141597038e-01, ‖∇f‖ = 2.8395e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 79, Δt 196.0 ms: f = -6.625141956011e-01, ‖∇f‖ = 3.7037e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 80, Δt 172.5 ms: f = -6.625142387667e-01, ‖∇f‖ = 3.0284e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 81, Δt 393.4 ms: f = -6.625142514813e-01, ‖∇f‖ = 3.4374e-04, α = 4.43e-01, m = 16, nfg = 2 -[ Info: LBFGS: iter 82, Δt 197.3 ms: f = -6.625142678369e-01, ‖∇f‖ = 1.1298e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 83, Δt 168.9 ms: f = -6.625142732358e-01, ‖∇f‖ = 1.0408e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 84, Δt 193.4 ms: f = -6.625142804397e-01, ‖∇f‖ = 1.4571e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 85, Δt 168.2 ms: f = -6.625142872563e-01, ‖∇f‖ = 1.4937e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 86, Δt 186.1 ms: f = -6.625142907784e-01, ‖∇f‖ = 1.2787e-04, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: converged after 87 iterations and time 1.41 m: f = -6.625142931902e-01, ‖∇f‖ = 4.7509e-05 +[ Info: LBFGS: iter 1, Δt 4.48 s: f = -4.897965201580e-01, ‖∇f‖ = 6.0022e-01, α = 5.94e+01, m = 0, nfg = 5 +[ Info: LBFGS: iter 2, Δt 2.58 s: f = -5.019846351523e-01, ‖∇f‖ = 5.3738e-01, α = 2.80e-01, m = 1, nfg = 2 +[ Info: LBFGS: iter 3, Δt 432.2 ms: f = -5.231639268895e-01, ‖∇f‖ = 3.9927e-01, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 4, Δt 970.0 ms: f = -5.386543630087e-01, ‖∇f‖ = 4.1552e-01, α = 2.29e-01, m = 3, nfg = 2 +[ Info: LBFGS: iter 5, Δt 4.16 s: f = -5.498211740251e-01, ‖∇f‖ = 4.4002e-01, α = 6.90e-02, m = 4, nfg = 4 +[ Info: LBFGS: iter 6, Δt 1.33 s: f = -5.690169637869e-01, ‖∇f‖ = 4.8450e-01, α = 2.26e-01, m = 5, nfg = 2 +[ Info: LBFGS: iter 7, Δt 433.5 ms: f = -5.871277574854e-01, ‖∇f‖ = 4.1970e-01, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 8, Δt 391.6 ms: f = -6.001554859580e-01, ‖∇f‖ = 2.1792e-01, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 9, Δt 414.0 ms: f = -6.068836019259e-01, ‖∇f‖ = 1.9566e-01, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 10, Δt 390.2 ms: f = -6.250397688236e-01, ‖∇f‖ = 3.0330e-01, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 11, Δt 390.3 ms: f = -6.391660378052e-01, ‖∇f‖ = 2.3075e-01, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 12, Δt 380.1 ms: f = -6.471796201327e-01, ‖∇f‖ = 2.6051e-01, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 13, Δt 332.9 ms: f = -6.503370024183e-01, ‖∇f‖ = 1.6112e-01, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 14, Δt 376.2 ms: f = -6.546061095291e-01, ‖∇f‖ = 7.7752e-02, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 15, Δt 1.77 s: f = -6.559626479321e-01, ‖∇f‖ = 5.1323e-02, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 16, Δt 329.6 ms: f = -6.570345924896e-01, ‖∇f‖ = 5.6663e-02, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 17, Δt 389.1 ms: f = -6.586101543932e-01, ‖∇f‖ = 4.5249e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 18, Δt 493.1 ms: f = -6.594210778183e-01, ‖∇f‖ = 4.8908e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 19, Δt 342.8 ms: f = -6.595829407827e-01, ‖∇f‖ = 5.7868e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 20, Δt 342.1 ms: f = -6.598106975843e-01, ‖∇f‖ = 1.7743e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 21, Δt 267.7 ms: f = -6.598737917130e-01, ‖∇f‖ = 1.4674e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 22, Δt 309.9 ms: f = -6.600722396803e-01, ‖∇f‖ = 1.9297e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 23, Δt 326.9 ms: f = -6.602319318297e-01, ‖∇f‖ = 1.7537e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 24, Δt 308.9 ms: f = -6.603792228360e-01, ‖∇f‖ = 2.3875e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 25, Δt 351.1 ms: f = -6.604618345320e-01, ‖∇f‖ = 2.3372e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 26, Δt 343.6 ms: f = -6.605536666268e-01, ‖∇f‖ = 1.2672e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 27, Δt 334.2 ms: f = -6.606170017453e-01, ‖∇f‖ = 1.0507e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 28, Δt 364.4 ms: f = -6.608142109566e-01, ‖∇f‖ = 1.8082e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 29, Δt 387.7 ms: f = -6.609609273898e-01, ‖∇f‖ = 1.7516e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 30, Δt 1.75 s: f = -6.610389071492e-01, ‖∇f‖ = 1.1313e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 31, Δt 318.4 ms: f = -6.610872576646e-01, ‖∇f‖ = 1.0263e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 32, Δt 420.4 ms: f = -6.611211810871e-01, ‖∇f‖ = 8.8770e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 33, Δt 446.3 ms: f = -6.611798459058e-01, ‖∇f‖ = 1.1488e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 34, Δt 656.0 ms: f = -6.612071947563e-01, ‖∇f‖ = 8.8665e-03, α = 5.31e-01, m = 16, nfg = 2 +[ Info: LBFGS: iter 35, Δt 307.7 ms: f = -6.612262740421e-01, ‖∇f‖ = 6.4669e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 36, Δt 358.7 ms: f = -6.612605506187e-01, ‖∇f‖ = 5.8759e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 37, Δt 346.8 ms: f = -6.612675198975e-01, ‖∇f‖ = 1.2106e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 38, Δt 324.4 ms: f = -6.612838276419e-01, ‖∇f‖ = 4.9172e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 39, Δt 359.6 ms: f = -6.612924061975e-01, ‖∇f‖ = 4.5917e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 40, Δt 354.8 ms: f = -6.613079393444e-01, ‖∇f‖ = 6.2780e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 41, Δt 360.7 ms: f = -6.613408203258e-01, ‖∇f‖ = 8.9066e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 42, Δt 371.3 ms: f = -6.614138087699e-01, ‖∇f‖ = 1.7168e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 43, Δt 460.5 ms: f = -6.614875451473e-01, ‖∇f‖ = 2.7425e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 44, Δt 1.77 s: f = -6.616598971995e-01, ‖∇f‖ = 1.9051e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 45, Δt 355.1 ms: f = -6.618786794855e-01, ‖∇f‖ = 2.2179e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 46, Δt 521.4 ms: f = -6.619401735562e-01, ‖∇f‖ = 2.5702e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 47, Δt 388.2 ms: f = -6.620475294793e-01, ‖∇f‖ = 1.8974e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 48, Δt 352.7 ms: f = -6.621066223746e-01, ‖∇f‖ = 3.7569e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 49, Δt 372.5 ms: f = -6.622531473936e-01, ‖∇f‖ = 1.3377e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 50, Δt 419.8 ms: f = -6.623267435765e-01, ‖∇f‖ = 1.1685e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 51, Δt 380.1 ms: f = -6.623901380349e-01, ‖∇f‖ = 1.0878e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 52, Δt 378.3 ms: f = -6.624418631454e-01, ‖∇f‖ = 1.3507e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 53, Δt 809.4 ms: f = -6.624657620885e-01, ‖∇f‖ = 8.4255e-03, α = 4.80e-01, m = 16, nfg = 2 +[ Info: LBFGS: iter 54, Δt 407.5 ms: f = -6.624781462654e-01, ‖∇f‖ = 5.0928e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 55, Δt 384.1 ms: f = -6.624881004550e-01, ‖∇f‖ = 5.2502e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 56, Δt 396.3 ms: f = -6.624977081423e-01, ‖∇f‖ = 3.7440e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 57, Δt 358.3 ms: f = -6.625008752159e-01, ‖∇f‖ = 3.0223e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 58, Δt 1.79 s: f = -6.625030100734e-01, ‖∇f‖ = 2.4319e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 59, Δt 321.3 ms: f = -6.625070447461e-01, ‖∇f‖ = 2.1035e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 60, Δt 432.5 ms: f = -6.625095270010e-01, ‖∇f‖ = 2.1426e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 61, Δt 842.1 ms: f = -6.625106812720e-01, ‖∇f‖ = 1.7899e-03, α = 5.39e-01, m = 16, nfg = 2 +[ Info: LBFGS: iter 62, Δt 369.5 ms: f = -6.625114664427e-01, ‖∇f‖ = 9.0043e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 63, Δt 292.0 ms: f = -6.625118759472e-01, ‖∇f‖ = 8.0076e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 64, Δt 330.7 ms: f = -6.625122692623e-01, ‖∇f‖ = 9.1155e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 65, Δt 312.2 ms: f = -6.625126277124e-01, ‖∇f‖ = 7.9980e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 66, Δt 345.3 ms: f = -6.625129184274e-01, ‖∇f‖ = 6.8112e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 67, Δt 366.9 ms: f = -6.625132414561e-01, ‖∇f‖ = 9.1523e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 68, Δt 393.9 ms: f = -6.625134613669e-01, ‖∇f‖ = 7.9805e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 69, Δt 372.3 ms: f = -6.625136544615e-01, ‖∇f‖ = 5.1708e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 70, Δt 349.5 ms: f = -6.625138313259e-01, ‖∇f‖ = 7.7793e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 71, Δt 711.6 ms: f = -6.625138930116e-01, ‖∇f‖ = 4.4140e-04, α = 4.92e-01, m = 16, nfg = 2 +[ Info: LBFGS: iter 72, Δt 336.0 ms: f = -6.625139309014e-01, ‖∇f‖ = 3.5569e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 73, Δt 1.74 s: f = -6.625140346682e-01, ‖∇f‖ = 2.7207e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 74, Δt 278.1 ms: f = -6.625140541155e-01, ‖∇f‖ = 1.3444e-03, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 75, Δt 397.8 ms: f = -6.625141433986e-01, ‖∇f‖ = 4.4360e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 76, Δt 412.7 ms: f = -6.625141810625e-01, ‖∇f‖ = 2.1664e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 77, Δt 285.8 ms: f = -6.625142097443e-01, ‖∇f‖ = 2.3226e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 78, Δt 276.3 ms: f = -6.625142395313e-01, ‖∇f‖ = 1.7812e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 79, Δt 345.0 ms: f = -6.625142482836e-01, ‖∇f‖ = 3.5608e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 80, Δt 334.4 ms: f = -6.625142671047e-01, ‖∇f‖ = 1.1471e-04, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: converged after 81 iterations and time 10.28 m: f = -6.625142723775e-01, ‖∇f‖ = 9.5547e-05 ```` @@ -252,8 +246,8 @@ the convergence rate: ```` ```` -info_opt.fg_evaluations = 102 -info_opt.gradnorms[1:10:end] = [0.9354752017270991, 0.30330341457423543, 0.0177426605071796, 0.011312951729783059, 0.006277932564908905, 0.011671619478046518, 0.00215494020578192, 0.0005241184037389059, 0.0003028446690714586] +info_opt.fg_evaluations = 96 +info_opt.gradnorms[1:10:end] = [0.9354752017288198, 0.3033034105172946, 0.017742661587312764, 0.01131275905161872, 0.00627799743470083, 0.011685290429669634, 0.0021425732842698052, 0.0007779335235130188, 0.00011470754279726877] ```` @@ -266,7 +260,7 @@ $E_{\text{ref}}=−0.6694421$. From our simple optimization we find: ```` ```` -E = -0.6625142931902406 +E = -0.6625142723774873 ```` @@ -293,8 +287,8 @@ correlation lengths and transfer matrix spectra for all unit cell coordinates: ```` ```` -ξ_h = [1.0343019387410264] -ξ_v = [1.0242266182712574] +ξ_h = [1.03450066818636] +ξ_v = [1.0244839903801328] ```` @@ -329,7 +323,7 @@ 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{Float64, TensorKit.ComplexSpace, 1, 1, Vector{Float64}}([1.0, 0.0, 0.0, -1.0], ℂ^2 ← ℂ^2),)) +LocalOperator{Any, TensorKit.ComplexSpace}(TensorKit.ComplexSpace[ℂ^2;;], Dict{Vector{CartesianIndex{2}}, Any}([CartesianIndex(1, 1)] => TensorMap{Float64, TensorKit.ComplexSpace, 1, 1, Vector{Float64}}([1.0, 0.0, 0.0, -1.0], ℂ^2 ← ℂ^2))) ```` Finally, to evaluate the expecation value on the `LocalOperator`, we call: @@ -339,7 +333,7 @@ Finally, to evaluate the expecation value on the `LocalOperator`, we call: ```` ```` -expectation_value(peps, M, env) = -0.7533147767992979 + 4.85722573273506e-17im +expectation_value(peps, M, env) = -0.7532814688078179 - 6.245004513516506e-17im ```` diff --git a/docs/src/examples/heisenberg/main.ipynb b/docs/src/examples/heisenberg/main.ipynb index 309932184..c8d0bd6f5 100644 --- a/docs/src/examples/heisenberg/main.ipynb +++ b/docs/src/examples/heisenberg/main.ipynb @@ -1,16 +1,17 @@ { "cells": [ { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "using Markdown #hide" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "# Optimizing the 2D Heisenberg model\n", "\n", @@ -29,58 +30,58 @@ "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "using Random\n", "Random.seed!(123456789);" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "using TensorKit, PEPSKit" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "H = heisenberg_XYZ(InfiniteSquare(); Jx = -1, Jy = 1, Jz = -1)" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "## Setting up the algorithms and initial guesses\n", "\n", @@ -93,115 +94,115 @@ "\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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "Dbond = 2\n", "χenv = 16;" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "boundary_alg = (; tol = 1.0e-10, trunc = (; alg = :FixedSpaceTruncation));" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "optimizer_alg = (; alg = :LBFGS, tol = 1.0e-4, maxiter = 100, lbfgs_memory = 16);" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "reuse_env = true\n", "verbosity = 3;" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "peps₀ = InfinitePEPS(randn, ComplexF64, ℂ^2, ℂ^Dbond)" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "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", + "metadata": {}, "source": [ "Besides the converged environment, `leading_boundary` also returns a `NamedTuple` of\n", "informational quantities which contains, among other things, a `contraction_metric` tuple.\n", @@ -209,79 +210,79 @@ "CTMRG variant we return the last maximal truncation error (the SVD approximation\n", "error maximized over all spatial directions and unit cell entries) as well as the condition\n", "number of the decomposition (the ratio of largest to smallest singular value):" - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "@show info_ctmrg.contraction_metrics;" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "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", + "metadata": {}, "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "@show info_opt.fg_evaluations info_opt.gradnorms[1:10:end];" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "@show E;" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", @@ -299,98 +300,97 @@ "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "ξ_h, ξ_v, λ_h, λ_v = correlation_length(peps, env)\n", "@show ξ_h ξ_v;" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "σ_z = TensorMap([1.0 0.0; 0.0 -1.0], ℂ^2, ℂ^2)" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "M = LocalOperator(fill(ℂ^2, 1, 1), (CartesianIndex(1, 1),) => σ_z)" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "Finally, to evaluate the expecation value on the `LocalOperator`, we call:" - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "@show expectation_value(peps, M, env);" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "---\n", "\n", "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" - ], - "metadata": {} + ] } ], - "nbformat_minor": 3, "metadata": { + "kernelspec": { + "display_name": "Julia 1.12.5", + "language": "julia", + "name": "julia-1.12" + }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", "version": "1.12.5" - }, - "kernelspec": { - "name": "julia-1.12", - "display_name": "Julia 1.12.5", - "language": "julia" } }, - "nbformat": 4 + "nbformat": 4, + "nbformat_minor": 3 } \ No newline at end of file diff --git a/docs/src/examples/heisenberg_su/index.md b/docs/src/examples/heisenberg_su/index.md index 4dd700f22..764b8253f 100644 --- a/docs/src/examples/heisenberg_su/index.md +++ b/docs/src/examples/heisenberg_su/index.md @@ -91,42 +91,45 @@ end ```` ```` +[ Info: --- Time evolution (simple update), dt = 0.01 --- [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 1 : dt = 0.01, |Δλ| = 1.683e+00. Time = 18.251 s/it +[ Info: SU iter 1 : E ≈ 0.49739, |Δλ| = 1.683e+00. Time = 15.386 s/it [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 500 : dt = 0.01, |Δλ| = 3.917e-06. Time = 0.002 s/it +[ Info: SU iter 500 : E ≈ -0.64895, |Δλ| = 3.917e-06. Time = 0.002 s/it [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 597 : dt = 0.01, |Δλ| = 9.938e-07. Time = 0.002 s/it +[ Info: SU iter 597 : E ≈ -0.65038, |Δλ| = 9.938e-07. Time = 0.002 s/it [ Info: SU: bond weights have converged. -[ Info: Simple update finished. Total time elapsed: 19.73 s +[ Info: Time evolution finished in 17.88 s +[ Info: --- Time evolution (simple update), dt = 0.001 --- [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 1 : dt = 0.001, |Δλ| = 2.135e-03. Time = 0.002 s/it +[ Info: SU iter 1 : E ≈ -0.65215, |Δλ| = 2.135e-03. Time = 0.002 s/it [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 500 : dt = 0.001, |Δλ| = 9.631e-07. Time = 0.002 s/it +[ Info: SU iter 500 : E ≈ -0.65248, |Δλ| = 9.631e-07. Time = 0.002 s/it [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 1000 : dt = 0.001, |Δλ| = 2.415e-07. Time = 0.002 s/it +[ Info: SU iter 1000 : E ≈ -0.65261, |Δλ| = 2.415e-07. Time = 0.002 s/it [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 1500 : dt = 0.001, |Δλ| = 6.291e-08. Time = 0.002 s/it +[ Info: SU iter 1500 : E ≈ -0.65268, |Δλ| = 6.291e-08. Time = 0.002 s/it [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 2000 : dt = 0.001, |Δλ| = 1.683e-08. Time = 0.002 s/it +[ Info: SU iter 2000 : E ≈ -0.65271, |Δλ| = 1.683e-08. Time = 0.002 s/it [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 2205 : dt = 0.001, |Δλ| = 9.981e-09. Time = 0.002 s/it +[ Info: SU iter 2205 : E ≈ -0.65271, |Δλ| = 9.981e-09. Time = 0.002 s/it [ Info: SU: bond weights have converged. -[ Info: Simple update finished. Total time elapsed: 5.31 s +[ Info: Time evolution finished in 7.67 s +[ Info: --- Time evolution (simple update), dt = 0.0004 --- [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 1 : dt = 0.0004, |Δλ| = 1.418e-04. Time = 0.002 s/it +[ Info: SU iter 1 : E ≈ -0.65284, |Δλ| = 1.418e-04. Time = 0.002 s/it [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 500 : dt = 0.0004, |Δλ| = 6.377e-08. Time = 0.002 s/it +[ Info: SU iter 500 : E ≈ -0.65285, |Δλ| = 6.377e-08. Time = 0.002 s/it [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 1000 : dt = 0.0004, |Δλ| = 3.544e-08. Time = 0.002 s/it +[ Info: SU iter 1000 : E ≈ -0.65285, |Δλ| = 3.544e-08. Time = 0.002 s/it [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 1500 : dt = 0.0004, |Δλ| = 2.013e-08. Time = 0.002 s/it +[ Info: SU iter 1500 : E ≈ -0.65285, |Δλ| = 2.013e-08. Time = 0.002 s/it [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 2000 : dt = 0.0004, |Δλ| = 1.157e-08. Time = 0.002 s/it +[ Info: SU iter 2000 : E ≈ -0.65286, |Δλ| = 1.157e-08. Time = 0.002 s/it [ Info: Space of x-weight at [1, 1] = ℂ^4 -[ Info: SU iter 2133 : dt = 0.0004, |Δλ| = 9.999e-09. Time = 0.002 s/it +[ Info: SU iter 2133 : E ≈ -0.65286, |Δλ| = 9.999e-09. Time = 0.002 s/it [ Info: SU: bond weights have converged. -[ Info: Simple update finished. Total time elapsed: 5.05 s +[ Info: Time evolution finished in 5.62 s ```` @@ -150,8 +153,8 @@ env, = leading_boundary( ```` ```` -[ Info: CTMRG init: obj = +1.852686271623e-15 err = 1.0000e+00 -[ Info: CTMRG conv 14: obj = +1.297823093604e+00 err = 5.1362926971e-11 time = 5.06 sec +[ Info: CTMRG init: obj = +6.831146883259e-16 err = 1.0000e+00 +[ Info: CTMRG conv 13: obj = +1.297823093603e+00 err = 6.2102244366e-11 time = 9.59 sec ```` @@ -185,9 +188,9 @@ M_norms = map( ```` ```` -E = -0.6674685370436856 -Ms = [0.027287162575913397 -0.02508741980582664; -0.025087419895358266 0.027287162545533143;;; -2.398913533097069e-11 2.64958523871206e-11; -4.82742162216665e-11 4.5509172819091503e-11;;; 0.37596759542522507 -0.37612078302041296; -0.37612078301296187 0.37596759542924413] -M_norms = [0.3769565254127723 0.3769565254142742; 0.37695652541279817 0.37695652541458163] +E = -0.6674685370436877 +Ms = [0.02728716246512403 -0.02508741959404704; -0.025087419828279812 0.02728716237745967;;; 1.5705857794867661e-10 -2.3803439601344234e-10; 1.3576939919546227e-11 6.754641464212785e-11;;; 0.37596759543330344 -0.376120783034371; -0.3761207830173624 0.3759675954415181] +M_norms = [0.37695652541280966 0.37695652541410685; 0.37695652541272473 0.3769565254146569] ```` @@ -206,8 +209,8 @@ M_ref = 0.3767 ```` ```` -(E - E_ref) / abs(E_ref) = 4.7135515077750805e-5 -(mean(M_norms) - M_ref) / M_ref = 0.0006809806573044887 +(E - E_ref) / abs(E_ref) = 4.713551507459062e-5 +(mean(M_norms) - M_ref) / M_ref = 0.0006809806572194609 ```` diff --git a/docs/src/examples/heisenberg_su/main.ipynb b/docs/src/examples/heisenberg_su/main.ipynb index 55721abe4..1a6c0ff39 100644 --- a/docs/src/examples/heisenberg_su/main.ipynb +++ b/docs/src/examples/heisenberg_su/main.ipynb @@ -1,16 +1,17 @@ { "cells": [ { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "using Markdown #hide" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "# Simple update for the Heisenberg model\n", "\n", @@ -26,24 +27,24 @@ "$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:" - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "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", + "metadata": {}, "source": [ "## Defining the Hamiltonian\n", "\n", @@ -52,22 +53,22 @@ "use PEPS and environments with real entries. We can either initialize the Hamiltonian with\n", "no internal symmetries (`symm = Trivial`) or use the global spin $U(1)$ symmetry\n", "(`symm = U1Irrep`):" - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "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", + "metadata": {}, "source": [ "## Simple updating\n", "\n", @@ -75,12 +76,13 @@ "the bipartite structure of the Heisenberg ground state when we run the simple update routine,\n", "we will make the initial PEPS bipartite explicitly. The weights used for simple update are\n", "initialized as identity matrices. First though, we need to define the appropriate (symmetric) spaces:" - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "Dbond = 4\n", "χenv = 16\n", @@ -100,12 +102,11 @@ "peps[2, 2] = copy(peps[1, 1]) ## make initial random state bipartite\n", "peps[2, 1] = copy(peps[1, 2])\n", "wts = SUWeight(peps);" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "Next, we can start the `SimpleUpdate` routine, successively decreasing the time intervals\n", "and singular value convergence tolerances. Here we set `bipartite = true` to exploit the\n", @@ -113,12 +114,13 @@ "and off-diagonal unit cell entries are equivalent. Note that TensorKit allows us to combine SVD\n", "truncation schemes, which we use here to set a maximal bond dimension and at the same time fix\n", "a truncation error (if that can be reached by remaining below `Dbond`):" - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "dts = [1.0e-2, 1.0e-3, 4.0e-4]\n", "tols = [1.0e-6, 1.0e-8, 1.0e-8]\n", @@ -128,23 +130,23 @@ "for (dt, tol) in zip(dts, tols)\n", " global peps, wts, = time_evolve(peps, H, dt, nstep, alg, wts; tol, check_interval = 500)\n", "end" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "normalize!.(peps.A, Inf)\n", "env₀ = CTMRGEnv(rand, Float64, peps, env_space)\n", @@ -157,22 +159,22 @@ " tol = 1.0e-10,\n", " trunc = trunc_env,\n", ");" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "function compute_mags(peps::InfinitePEPS, env::CTMRGEnv)\n", " lattice = collect(space(t, 1) for t in peps.A)\n", @@ -196,12 +198,11 @@ " rc -> norm(Ms[rc[1], rc[2], :]), Iterators.product(axes(peps, 1), axes(peps, 2))\n", ")\n", "@show E Ms M_norms;" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", @@ -209,44 +210,43 @@ "$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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "E_ref = -0.6675\n", "M_ref = 0.3767\n", "@show (E - E_ref) / abs(E_ref)\n", "@show (mean(M_norms) - M_ref) / M_ref;" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "---\n", "\n", "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" - ], - "metadata": {} + ] } ], - "nbformat_minor": 3, "metadata": { + "kernelspec": { + "display_name": "Julia 1.12.5", + "language": "julia", + "name": "julia-1.12" + }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", "version": "1.12.5" - }, - "kernelspec": { - "name": "julia-1.12", - "display_name": "Julia 1.12.5", - "language": "julia" } }, - "nbformat": 4 + "nbformat": 4, + "nbformat_minor": 3 } \ No newline at end of file diff --git a/docs/src/examples/hubbard_su/index.md b/docs/src/examples/hubbard_su/index.md index 9157a46d7..07f19bd03 100644 --- a/docs/src/examples/hubbard_su/index.md +++ b/docs/src/examples/hubbard_su/index.md @@ -79,42 +79,47 @@ end ```` ```` +[ Info: --- Time evolution (simple update), dt = 0.01 --- [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0 => 2, 1 => 2) -[ Info: SU iter 1 : dt = 0.01, |Δλ| = 1.316e+00. Time = 20.354 s/it +[ Info: SU iter 1 : E ≈ -1.45315, |Δλ| = 1.314e+00. Time = 32.087 s/it [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0 => 2, 1 => 2) -[ Info: SU iter 1045 : dt = 0.01, |Δλ| = 9.843e-08. Time = 0.006 s/it +[ Info: SU iter 982 : E ≈ -3.67046, |Δλ| = 9.978e-08. Time = 0.007 s/it [ Info: SU: bond weights have converged. -[ Info: Simple update finished. Total time elapsed: 27.82 s +[ Info: Time evolution finished in 106.57 s +[ Info: --- Time evolution (simple update), dt = 0.01 --- [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0 => 6, 1 => 6) -[ Info: SU iter 1 : dt = 0.01, |Δλ| = 2.047e-03. Time = 0.021 s/it +[ Info: SU iter 1 : E ≈ -3.67192, |Δλ| = 2.047e-03. Time = 0.479 s/it [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0 => 6, 1 => 6) -[ Info: SU iter 584 : dt = 0.01, |Δλ| = 9.946e-08. Time = 0.047 s/it +[ Info: SU iter 584 : E ≈ -3.68642, |Δλ| = 9.946e-08. Time = 0.073 s/it [ Info: SU: bond weights have converged. -[ Info: Simple update finished. Total time elapsed: 40.96 s +[ Info: Time evolution finished in 80.60 s +[ Info: --- Time evolution (simple update), dt = 0.001 --- [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0 => 3, 1 => 5) -[ Info: SU iter 1 : dt = 0.001, |Δλ| = 1.720e-02. Time = 0.043 s/it +[ Info: SU iter 1 : E ≈ -3.69034, |Δλ| = 1.720e-02. Time = 0.094 s/it [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0 => 3, 1 => 5) -[ Info: SU iter 2000 : dt = 0.001, |Δλ| = 1.418e-07. Time = 0.049 s/it +[ Info: SU iter 2000 : E ≈ -3.69206, |Δλ| = 1.473e-07. Time = 0.026 s/it [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0 => 3, 1 => 5) -[ Info: SU iter 3791 : dt = 0.001, |Δλ| = 9.990e-09. Time = 0.016 s/it +[ Info: SU iter 3816 : E ≈ -3.69206, |Δλ| = 9.988e-09. Time = 0.025 s/it [ Info: SU: bond weights have converged. -[ Info: Simple update finished. Total time elapsed: 96.28 s +[ Info: Time evolution finished in 144.03 s +[ Info: --- Time evolution (simple update), dt = 0.0004 --- [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0 => 3, 1 => 5) -[ Info: SU iter 1 : dt = 0.0004, |Δλ| = 3.256e-04. Time = 0.052 s/it +[ Info: SU iter 1 : E ≈ -3.69262, |Δλ| = 3.239e-04. Time = 0.025 s/it [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0 => 3, 1 => 5) -[ Info: SU iter 2000 : dt = 0.0004, |Δλ| = 1.888e-08. Time = 0.016 s/it +[ Info: SU iter 2000 : E ≈ -3.69263, |Δλ| = 1.902e-08. Time = 0.024 s/it [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0 => 3, 1 => 5) -[ Info: SU iter 3034 : dt = 0.0004, |Δλ| = 9.997e-09. Time = 0.015 s/it +[ Info: SU iter 3035 : E ≈ -3.69263, |Δλ| = 9.995e-09. Time = 0.025 s/it [ Info: SU: bond weights have converged. -[ Info: Simple update finished. Total time elapsed: 77.28 s +[ Info: Time evolution finished in 116.11 s +[ Info: --- Time evolution (simple update), dt = 0.0001 --- [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0 => 3, 1 => 5) -[ Info: SU iter 1 : dt = 0.0001, |Δλ| = 1.627e-04. Time = 0.015 s/it +[ Info: SU iter 1 : E ≈ -3.69291, |Δλ| = 1.619e-04. Time = 0.024 s/it [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0 => 3, 1 => 5) -[ Info: SU iter 2000 : dt = 0.0001, |Δλ| = 1.532e-08. Time = 0.016 s/it +[ Info: SU iter 2000 : E ≈ -3.69292, |Δλ| = 1.582e-08. Time = 0.024 s/it [ Info: Space of x-weight at [1, 1] = Vect[FermionParity](0 => 3, 1 => 5) -[ Info: SU iter 2916 : dt = 0.0001, |Δλ| = 9.997e-09. Time = 0.052 s/it +[ Info: SU iter 2992 : E ≈ -3.69292, |Δλ| = 9.996e-09. Time = 0.024 s/it [ Info: SU: bond weights have converged. -[ Info: Simple update finished. Total time elapsed: 74.92 s +[ Info: Time evolution finished in 111.09 s ```` @@ -139,10 +144,10 @@ end ```` ```` -[ Info: CTMRG init: obj = +2.003400419801e+00 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +1.777694992788e+00 err = 2.1568099508e-09 time = 3.31 sec -[ Info: CTMRG init: obj = +1.777694992788e+00 err = 1.0000e+00 -[ Info: CTMRG conv 7: obj = +1.781063096357e+00 err = 3.5793677599e-10 time = 16.01 sec +[ Info: CTMRG init: obj = +2.013336877050e+00 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +1.786512545441e+00 err = 1.7886034501e-09 time = 9.10 sec +[ Info: CTMRG init: obj = +1.786512545441e+00 err = 1.0000e+00 +[ Info: CTMRG conv 7: obj = +1.789897407320e+00 err = 3.2428564433e-10 time = 32.81 sec ```` @@ -155,7 +160,7 @@ E = expectation_value(peps, H, env) / (Nr * Nc) ```` ```` -E = -3.652497562261339 +E = -3.6524975267322732 ```` @@ -170,7 +175,7 @@ E_exact = Es_exact[U] - U / 2 ```` ```` -(E - E_exact) / abs(E_exact) = 0.001149243235338062 +(E - E_exact) / abs(E_exact) = 0.001149252951493588 ```` diff --git a/docs/src/examples/hubbard_su/main.ipynb b/docs/src/examples/hubbard_su/main.ipynb index 9e66747f5..9bfd133c0 100644 --- a/docs/src/examples/hubbard_su/main.ipynb +++ b/docs/src/examples/hubbard_su/main.ipynb @@ -1,16 +1,17 @@ { "cells": [ { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "using Markdown #hide" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "# Simple update for the Fermi-Hubbard model at half-filling\n", "\n", @@ -26,46 +27,46 @@ "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "using Random\n", "using TensorKit, PEPSKit\n", "Random.seed!(12329348592498);" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "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);\n", "physical_space = Vect[fℤ₂](0 => 2, 1 => 2);" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "## Running the simple update algorithm\n", "\n", @@ -78,33 +79,34 @@ "First, we shall use a small D for the random PEPS initialization, which is chosen as 4 here.\n", "For convenience, here we work with real tensors with `Float64` entries.\n", "The bond weights are still initialized as identity matrices." - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "virtual_space = Vect[fℤ₂](0 => 2, 1 => 2)\n", "peps = InfinitePEPS(rand, Float64, physical_space, virtual_space; unitcell = (Nr, Nc));\n", "wts = SUWeight(peps);" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "Starting from the random state, we first use a relatively large evolution time step\n", "`dt = 1e-2`. After convergence at D = 4, to avoid stucking at some bad local minimum,\n", "we first increase D to 12, and drop it back to D = 8 after a while.\n", "Afterwards, we keep D = 8 and gradually decrease `dt` to `1e-4` to improve convergence." - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "dts = [1.0e-2, 1.0e-2, 1.0e-3, 4.0e-4, 1.0e-4]\n", "tols = [1.0e-7, 1.0e-7, 1.0e-8, 1.0e-8, 1.0e-8]\n", @@ -116,12 +118,11 @@ " alg = SimpleUpdate(; trunc, bipartite = false)\n", " global peps, wts, = time_evolve(peps, H, dt, maxiter, alg, wts; tol, check_interval = 2000)\n", "end" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "## Computing the ground-state energy\n", "\n", @@ -130,12 +131,13 @@ "which is initialized using the simple update bond weights. Next we use it to initialize\n", "another run with bigger environment dimension. The dynamic adjustment of environment dimension\n", "is achieved by using `trunc=truncrank(χ)` with different `χ`s in the CTMRG runs:" - ], - "metadata": {} + ] }, { - "outputs": [], "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "χenv₀, χenv = 6, 16\n", "env_space = Vect[fℤ₂](0 => χenv₀ / 2, 1 => χenv₀ / 2)\n", @@ -146,71 +148,69 @@ " env, peps; alg = :SequentialCTMRG, tol = 1.0e-8, maxiter = 50, trunc = truncrank(χ)\n", " )\n", "end" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "E = expectation_value(peps, H, env) / (Nr * Nc)\n", "@show E;" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "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", + "execution_count": null, + "metadata": {}, + "outputs": [], "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) / abs(E_exact);" - ], - "metadata": {}, - "execution_count": null + ] }, { "cell_type": "markdown", + "metadata": {}, "source": [ "---\n", "\n", "*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*" - ], - "metadata": {} + ] } ], - "nbformat_minor": 3, "metadata": { + "kernelspec": { + "display_name": "Julia 1.12.5", + "language": "julia", + "name": "julia-1.12" + }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", "version": "1.12.5" - }, - "kernelspec": { - "name": "julia-1.12", - "display_name": "Julia 1.12.5", - "language": "julia" } }, - "nbformat": 4 + "nbformat": 4, + "nbformat_minor": 3 } \ No newline at end of file diff --git a/docs/src/examples/j1j2_su/index.md b/docs/src/examples/j1j2_su/index.md index 5f450fc18..9dea47294 100644 --- a/docs/src/examples/j1j2_su/index.md +++ b/docs/src/examples/j1j2_su/index.md @@ -71,39 +71,39 @@ end ```` [ Info: --- Time evolution (simple update), dt = 0.01 --- [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1/2 => 1, -1/2 => 1) -[ Info: SU iter 1 : |Δλ| = 1.190e+00. Time = 118.568 s/it +[ Info: SU iter 1 : E ≈ 0.14720, |Δλ| = 1.190e+00. Time = 101.219 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 1373 : |Δλ| = 9.898e-09. Time = 0.069 s/it +[ Info: SU iter 1373 : E ≈ -0.61100, |Δλ| = 9.898e-09. Time = 0.057 s/it [ Info: SU: bond weights have converged. -[ Info: Time evolution finished in 225.44 s +[ Info: Time evolution finished in 357.52 s [ Info: --- Time evolution (simple update), dt = 0.01 --- [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 1 : |Δλ| = 2.985e-04. Time = 0.089 s/it +[ Info: SU iter 1 : E ≈ -0.57025, |Δλ| = 2.985e-04. Time = 0.079 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 523 : |Δλ| = 9.955e-09. Time = 0.070 s/it +[ Info: SU iter 523 : E ≈ -0.56982, |Δλ| = 9.955e-09. Time = 0.057 s/it [ Info: SU: bond weights have converged. -[ Info: Time evolution finished in 38.09 s +[ Info: Time evolution finished in 35.53 s [ Info: --- Time evolution (simple update), dt = 0.01 --- [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 1 : |Δλ| = 3.001e-04. Time = 0.085 s/it +[ Info: SU iter 1 : E ≈ -0.53088, |Δλ| = 3.001e-04. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 610 : |Δλ| = 9.971e-09. Time = 0.070 s/it +[ Info: SU iter 610 : E ≈ -0.52928, |Δλ| = 9.971e-09. Time = 0.059 s/it [ Info: SU: bond weights have converged. -[ Info: Time evolution finished in 44.48 s +[ Info: Time evolution finished in 41.10 s [ Info: --- Time evolution (simple update), dt = 0.01 --- [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 1 : |Δλ| = 3.021e-04. Time = 0.084 s/it +[ Info: SU iter 1 : E ≈ -0.49248, |Δλ| = 3.021e-04. Time = 0.059 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 740 : |Δλ| = 9.953e-09. Time = 0.070 s/it +[ Info: SU iter 740 : E ≈ -0.48911, |Δλ| = 9.953e-09. Time = 0.058 s/it [ Info: SU: bond weights have converged. -[ Info: Time evolution finished in 53.86 s +[ Info: Time evolution finished in 49.49 s [ Info: --- Time evolution (simple update), dt = 0.01 --- [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 1 : |Δλ| = 3.089e-04. Time = 0.069 s/it +[ Info: SU iter 1 : E ≈ -0.45483, |Δλ| = 3.089e-04. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 1140 : |Δλ| = 1.000e-08. Time = 0.070 s/it +[ Info: SU iter 1140 : E ≈ -0.44932, |Δλ| = 1.000e-08. Time = 0.058 s/it [ Info: SU: bond weights have converged. -[ Info: Time evolution finished in 83.30 s +[ Info: Time evolution finished in 77.32 s ```` @@ -123,183 +123,183 @@ end ```` [ Info: --- Time evolution (simple update), dt = 0.001 --- [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 1 : |Δλ| = 7.604e-04. Time = 0.138 s/it +[ Info: SU iter 1 : E ≈ -0.44888, |Δλ| = 7.604e-04. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 500 : |Δλ| = 1.692e-06. Time = 0.085 s/it +[ Info: SU iter 500 : E ≈ -0.44905, |Δλ| = 1.692e-06. Time = 0.062 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 1000 : |Δλ| = 1.002e-06. Time = 0.069 s/it +[ Info: SU iter 1000 : E ≈ -0.44913, |Δλ| = 1.002e-06. Time = 0.064 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 1500 : |Δλ| = 6.304e-07. Time = 0.070 s/it +[ Info: SU iter 1500 : E ≈ -0.44917, |Δλ| = 6.304e-07. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 2000 : |Δλ| = 4.078e-07. Time = 0.069 s/it +[ Info: SU iter 2000 : E ≈ -0.44919, |Δλ| = 4.078e-07. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 2500 : |Δλ| = 2.688e-07. Time = 0.070 s/it +[ Info: SU iter 2500 : E ≈ -0.44920, |Δλ| = 2.688e-07. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 3000 : |Δλ| = 1.797e-07. Time = 0.070 s/it +[ Info: SU iter 3000 : E ≈ -0.44920, |Δλ| = 1.797e-07. Time = 0.056 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 3500 : |Δλ| = 1.217e-07. Time = 0.069 s/it +[ Info: SU iter 3500 : E ≈ -0.44921, |Δλ| = 1.217e-07. Time = 0.061 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 4000 : |Δλ| = 8.352e-08. Time = 0.084 s/it +[ Info: SU iter 4000 : E ≈ -0.44921, |Δλ| = 8.352e-08. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 4500 : |Δλ| = 5.817e-08. Time = 0.085 s/it +[ Info: SU iter 4500 : E ≈ -0.44921, |Δλ| = 5.817e-08. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 5000 : |Δλ| = 4.132e-08. Time = 0.069 s/it +[ Info: SU iter 5000 : E ≈ -0.44921, |Δλ| = 4.132e-08. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 5500 : |Δλ| = 3.002e-08. Time = 0.069 s/it +[ Info: SU iter 5500 : E ≈ -0.44921, |Δλ| = 3.002e-08. Time = 0.059 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 6000 : |Δλ| = 2.216e-08. Time = 0.069 s/it +[ Info: SU iter 6000 : E ≈ -0.44921, |Δλ| = 2.216e-08. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 6500 : |Δλ| = 1.651e-08. Time = 0.069 s/it +[ Info: SU iter 6500 : E ≈ -0.44921, |Δλ| = 1.651e-08. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 7000 : |Δλ| = 1.235e-08. Time = 0.084 s/it +[ Info: SU iter 7000 : E ≈ -0.44921, |Δλ| = 1.235e-08. Time = 0.060 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 7500 : |Δλ| = 9.271e-09. Time = 0.085 s/it +[ Info: SU iter 7500 : E ≈ -0.44921, |Δλ| = 9.271e-09. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 8000 : |Δλ| = 6.980e-09. Time = 0.086 s/it +[ Info: SU iter 8000 : E ≈ -0.44921, |Δλ| = 6.980e-09. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 8500 : |Δλ| = 5.278e-09. Time = 0.069 s/it +[ Info: SU iter 8500 : E ≈ -0.44921, |Δλ| = 5.278e-09. Time = 0.059 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 9000 : |Δλ| = 4.021e-09. Time = 0.069 s/it +[ Info: SU iter 9000 : E ≈ -0.44921, |Δλ| = 4.021e-09. Time = 0.061 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 9500 : |Δλ| = 3.090e-09. Time = 0.070 s/it +[ Info: SU iter 9500 : E ≈ -0.44921, |Δλ| = 3.090e-09. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 10000 : |Δλ| = 2.394e-09. Time = 0.085 s/it +[ Info: SU iter 10000 : E ≈ -0.44921, |Δλ| = 2.394e-09. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 10500 : |Δλ| = 1.878e-09. Time = 0.070 s/it +[ Info: SU iter 10500 : E ≈ -0.44921, |Δλ| = 1.878e-09. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 11000 : |Δλ| = 1.498e-09. Time = 0.070 s/it +[ Info: SU iter 11000 : E ≈ -0.44921, |Δλ| = 1.498e-09. Time = 0.064 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 11500 : |Δλ| = 1.209e-09. Time = 0.071 s/it +[ Info: SU iter 11500 : E ≈ -0.44921, |Δλ| = 1.209e-09. Time = 0.059 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 11962 : |Δλ| = 9.999e-10. Time = 0.070 s/it +[ Info: SU iter 11962 : E ≈ -0.44921, |Δλ| = 9.999e-10. Time = 0.059 s/it [ Info: SU: bond weights have converged. -[ Info: Time evolution finished in 870.98 s +[ Info: Time evolution finished in 800.74 s [ Info: --- Time evolution (simple update), dt = 0.0001 --- [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 1 : |Δλ| = 7.683e-05. Time = 0.070 s/it +[ Info: SU iter 1 : E ≈ -0.44917, |Δλ| = 7.683e-05. Time = 0.059 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 500 : |Δλ| = 3.277e-08. Time = 0.069 s/it +[ Info: SU iter 500 : E ≈ -0.44917, |Δλ| = 3.277e-08. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 1000 : |Δλ| = 2.995e-08. Time = 0.085 s/it +[ Info: SU iter 1000 : E ≈ -0.44917, |Δλ| = 2.995e-08. Time = 0.062 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 1500 : |Δλ| = 2.752e-08. Time = 0.070 s/it +[ Info: SU iter 1500 : E ≈ -0.44917, |Δλ| = 2.752e-08. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 2000 : |Δλ| = 2.540e-08. Time = 0.069 s/it +[ Info: SU iter 2000 : E ≈ -0.44917, |Δλ| = 2.540e-08. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 2500 : |Δλ| = 2.355e-08. Time = 0.069 s/it +[ Info: SU iter 2500 : E ≈ -0.44918, |Δλ| = 2.355e-08. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 3000 : |Δλ| = 2.193e-08. Time = 0.071 s/it +[ Info: SU iter 3000 : E ≈ -0.44918, |Δλ| = 2.193e-08. Time = 0.065 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 3500 : |Δλ| = 2.049e-08. Time = 0.069 s/it +[ Info: SU iter 3500 : E ≈ -0.44918, |Δλ| = 2.049e-08. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 4000 : |Δλ| = 1.920e-08. Time = 0.069 s/it +[ Info: SU iter 4000 : E ≈ -0.44918, |Δλ| = 1.920e-08. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 4500 : |Δλ| = 1.805e-08. Time = 0.069 s/it +[ Info: SU iter 4500 : E ≈ -0.44918, |Δλ| = 1.805e-08. Time = 0.061 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 5000 : |Δλ| = 1.700e-08. Time = 0.071 s/it +[ Info: SU iter 5000 : E ≈ -0.44918, |Δλ| = 1.700e-08. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 5500 : |Δλ| = 1.605e-08. Time = 0.087 s/it +[ Info: SU iter 5500 : E ≈ -0.44918, |Δλ| = 1.605e-08. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 6000 : |Δλ| = 1.518e-08. Time = 0.069 s/it +[ Info: SU iter 6000 : E ≈ -0.44918, |Δλ| = 1.518e-08. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 6500 : |Δλ| = 1.438e-08. Time = 0.070 s/it +[ Info: SU iter 6500 : E ≈ -0.44918, |Δλ| = 1.438e-08. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 7000 : |Δλ| = 1.363e-08. Time = 0.069 s/it +[ Info: SU iter 7000 : E ≈ -0.44919, |Δλ| = 1.363e-08. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 7500 : |Δλ| = 1.294e-08. Time = 0.069 s/it +[ Info: SU iter 7500 : E ≈ -0.44919, |Δλ| = 1.294e-08. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 8000 : |Δλ| = 1.230e-08. Time = 0.073 s/it +[ Info: SU iter 8000 : E ≈ -0.44919, |Δλ| = 1.230e-08. Time = 0.059 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 8500 : |Δλ| = 1.170e-08. Time = 0.069 s/it +[ Info: SU iter 8500 : E ≈ -0.44919, |Δλ| = 1.170e-08. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 9000 : |Δλ| = 1.114e-08. Time = 0.084 s/it +[ Info: SU iter 9000 : E ≈ -0.44919, |Δλ| = 1.114e-08. Time = 0.060 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 9500 : |Δλ| = 1.060e-08. Time = 0.070 s/it +[ Info: SU iter 9500 : E ≈ -0.44919, |Δλ| = 1.060e-08. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 10000 : |Δλ| = 1.011e-08. Time = 0.070 s/it +[ Info: SU iter 10000 : E ≈ -0.44919, |Δλ| = 1.011e-08. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 10500 : |Δλ| = 9.635e-09. Time = 0.069 s/it +[ Info: SU iter 10500 : E ≈ -0.44919, |Δλ| = 9.635e-09. Time = 0.059 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 11000 : |Δλ| = 9.190e-09. Time = 0.070 s/it +[ Info: SU iter 11000 : E ≈ -0.44919, |Δλ| = 9.190e-09. Time = 0.062 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 11500 : |Δλ| = 8.770e-09. Time = 0.070 s/it +[ Info: SU iter 11500 : E ≈ -0.44919, |Δλ| = 8.770e-09. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 12000 : |Δλ| = 8.372e-09. Time = 0.085 s/it +[ Info: SU iter 12000 : E ≈ -0.44919, |Δλ| = 8.372e-09. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 12500 : |Δλ| = 7.995e-09. Time = 0.070 s/it +[ Info: SU iter 12500 : E ≈ -0.44919, |Δλ| = 7.995e-09. Time = 0.117 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 13000 : |Δλ| = 7.637e-09. Time = 0.069 s/it +[ Info: SU iter 13000 : E ≈ -0.44919, |Δλ| = 7.637e-09. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 13500 : |Δλ| = 7.298e-09. Time = 0.093 s/it +[ Info: SU iter 13500 : E ≈ -0.44919, |Δλ| = 7.298e-09. Time = 0.062 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 14000 : |Δλ| = 6.976e-09. Time = 0.069 s/it +[ Info: SU iter 14000 : E ≈ -0.44919, |Δλ| = 6.976e-09. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 14500 : |Δλ| = 6.670e-09. Time = 0.070 s/it +[ Info: SU iter 14500 : E ≈ -0.44919, |Δλ| = 6.670e-09. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 15000 : |Δλ| = 6.379e-09. Time = 0.070 s/it +[ Info: SU iter 15000 : E ≈ -0.44919, |Δλ| = 6.379e-09. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 15500 : |Δλ| = 6.102e-09. Time = 0.085 s/it +[ Info: SU iter 15500 : E ≈ -0.44919, |Δλ| = 6.102e-09. Time = 0.064 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 16000 : |Δλ| = 5.839e-09. Time = 0.069 s/it +[ Info: SU iter 16000 : E ≈ -0.44919, |Δλ| = 5.839e-09. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 16500 : |Δλ| = 5.588e-09. Time = 0.071 s/it +[ Info: SU iter 16500 : E ≈ -0.44919, |Δλ| = 5.588e-09. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 17000 : |Δλ| = 5.349e-09. Time = 0.085 s/it +[ Info: SU iter 17000 : E ≈ -0.44919, |Δλ| = 5.349e-09. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 17500 : |Δλ| = 5.122e-09. Time = 0.070 s/it +[ Info: SU iter 17500 : E ≈ -0.44920, |Δλ| = 5.122e-09. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 18000 : |Δλ| = 4.905e-09. Time = 0.069 s/it +[ Info: SU iter 18000 : E ≈ -0.44920, |Δλ| = 4.905e-09. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 18500 : |Δλ| = 4.699e-09. Time = 0.070 s/it +[ Info: SU iter 18500 : E ≈ -0.44920, |Δλ| = 4.699e-09. Time = 0.059 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 19000 : |Δλ| = 4.502e-09. Time = 0.070 s/it +[ Info: SU iter 19000 : E ≈ -0.44920, |Δλ| = 4.502e-09. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 19500 : |Δλ| = 4.314e-09. Time = 0.086 s/it +[ Info: SU iter 19500 : E ≈ -0.44920, |Δλ| = 4.314e-09. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 20000 : |Δλ| = 4.134e-09. Time = 0.069 s/it +[ Info: SU iter 20000 : E ≈ -0.44920, |Δλ| = 4.134e-09. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 20500 : |Δλ| = 3.963e-09. Time = 0.069 s/it +[ Info: SU iter 20500 : E ≈ -0.44920, |Δλ| = 3.963e-09. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 21000 : |Δλ| = 3.800e-09. Time = 0.070 s/it +[ Info: SU iter 21000 : E ≈ -0.44920, |Δλ| = 3.800e-09. Time = 0.112 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 21500 : |Δλ| = 3.644e-09. Time = 0.069 s/it +[ Info: SU iter 21500 : E ≈ -0.44920, |Δλ| = 3.644e-09. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 22000 : |Δλ| = 3.494e-09. Time = 0.069 s/it +[ Info: SU iter 22000 : E ≈ -0.44920, |Δλ| = 3.494e-09. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 22500 : |Δλ| = 3.352e-09. Time = 0.085 s/it +[ Info: SU iter 22500 : E ≈ -0.44920, |Δλ| = 3.352e-09. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 23000 : |Δλ| = 3.216e-09. Time = 0.069 s/it +[ Info: SU iter 23000 : E ≈ -0.44920, |Δλ| = 3.216e-09. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 23500 : |Δλ| = 3.085e-09. Time = 0.070 s/it +[ Info: SU iter 23500 : E ≈ -0.44920, |Δλ| = 3.085e-09. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 24000 : |Δλ| = 2.961e-09. Time = 0.086 s/it +[ Info: SU iter 24000 : E ≈ -0.44920, |Δλ| = 2.961e-09. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 24500 : |Δλ| = 2.842e-09. Time = 0.070 s/it +[ Info: SU iter 24500 : E ≈ -0.44920, |Δλ| = 2.842e-09. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 25000 : |Δλ| = 2.728e-09. Time = 0.085 s/it +[ Info: SU iter 25000 : E ≈ -0.44920, |Δλ| = 2.728e-09. Time = 0.115 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 25500 : |Δλ| = 2.619e-09. Time = 0.069 s/it +[ Info: SU iter 25500 : E ≈ -0.44920, |Δλ| = 2.619e-09. Time = 0.059 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 26000 : |Δλ| = 2.515e-09. Time = 0.085 s/it +[ Info: SU iter 26000 : E ≈ -0.44920, |Δλ| = 2.515e-09. Time = 0.062 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 26500 : |Δλ| = 2.415e-09. Time = 0.069 s/it +[ Info: SU iter 26500 : E ≈ -0.44920, |Δλ| = 2.415e-09. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 27000 : |Δλ| = 2.319e-09. Time = 0.069 s/it +[ Info: SU iter 27000 : E ≈ -0.44920, |Δλ| = 2.319e-09. Time = 0.059 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 27500 : |Δλ| = 2.228e-09. Time = 0.084 s/it +[ Info: SU iter 27500 : E ≈ -0.44920, |Δλ| = 2.228e-09. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 28000 : |Δλ| = 2.140e-09. Time = 0.069 s/it +[ Info: SU iter 28000 : E ≈ -0.44920, |Δλ| = 2.140e-09. Time = 0.064 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 28500 : |Δλ| = 2.056e-09. Time = 0.069 s/it +[ Info: SU iter 28500 : E ≈ -0.44920, |Δλ| = 2.056e-09. Time = 0.058 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 29000 : |Δλ| = 1.976e-09. Time = 0.069 s/it +[ Info: SU iter 29000 : E ≈ -0.44920, |Δλ| = 1.976e-09. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 29500 : |Δλ| = 1.899e-09. Time = 0.069 s/it +[ Info: SU iter 29500 : E ≈ -0.44920, |Δλ| = 1.899e-09. Time = 0.057 s/it [ Info: Space of x-weight at [1, 1] = Rep[U₁](0 => 2, 1 => 1, -1 => 1) -[ Info: SU iter 30000 : |Δλ| = 1.825e-09. Time = 0.069 s/it +[ Info: SU iter 30000 : E ≈ -0.44920, |Δλ| = 1.825e-09. Time = 0.057 s/it ┌ Warning: SU: bond weights have not converged. -└ @ PEPSKit ~/git/PEPSKit.jl/src/algorithms/time_evolution/simpleupdate.jl:241 -[ Info: Time evolution finished in 2182.89 s +└ @ PEPSKit ~/git/PEPSKit.jl/src/algorithms/time_evolution/simpleupdate.jl:267 +[ Info: Time evolution finished in 2014.44 s ```` @@ -319,7 +319,7 @@ E = expectation_value(peps, H, env) / (Nr * Nc) ```` ```` --0.4908450911219574 +-0.4908450911219917 ```` Let us compare that estimate with benchmark data obtained from the @@ -332,7 +332,7 @@ E_ref = -0.49425 ```` ```` -(E - E_ref) / abs(E_ref) = 0.006889041736049819 +(E - E_ref) / abs(E_ref) = 0.006889041735980408 ```` @@ -347,9 +347,8 @@ In order to break some of the $C_{4v}$ symmetry of the PEPS, we will add a bit o This is conviently done using MPSKit's `randomize!` function. (Breaking some of the spatial symmetry can be advantageous for obtaining lower energies.) -In our optimization, we will use a fixed-point differentiation scheme which requires a -gauge fixing of the contraction environment -(specified by the `gradient_alg = (; iterscheme = :fixed)` setting). +In our optimization, we will use the default fixed-point differentiation scheme which +requires a gauge fixing of the contraction environment. Since this gauge fixing involves potentially complex phases, we have to convert our real-valued contraction environment to complex numbers before the optimization. @@ -360,92 +359,92 @@ noise_peps = InfinitePEPS(randomize!.(deepcopy(peps.A))) peps₀ = peps + 1.0e-1noise_peps peps_opt, env_opt, E_opt, = fixedpoint( H, peps₀, complex(env); - optimizer_alg = (; tol = 1.0e-4, maxiter = 80), gradient_alg = (; iterscheme = :fixed) + optimizer_alg = (; tol = 1.0e-4, maxiter = 80), ); ```` ```` [ Info: LBFGS: initializing with f = -1.887578587634e+00, ‖∇f‖ = 7.8780e-01 [ Info: LBFGS: iter 1, Δt 2.11 m: f = -1.926388092775e+00, ‖∇f‖ = 4.7092e-01, α = 1.19e+01, m = 0, nfg = 4 -[ Info: LBFGS: iter 2, Δt 30.68 s: f = -1.936546032899e+00, ‖∇f‖ = 2.1792e-01, α = 1.00e+00, m = 1, nfg = 1 -[ Info: LBFGS: iter 3, Δt 29.68 s: f = -1.942713411326e+00, ‖∇f‖ = 2.0267e-01, α = 1.00e+00, m = 2, nfg = 1 -[ Info: LBFGS: iter 4, Δt 29.00 s: f = -1.952873152491e+00, ‖∇f‖ = 1.6713e-01, α = 1.00e+00, m = 3, nfg = 1 -[ Info: LBFGS: iter 5, Δt 26.25 s: f = -1.958619448466e+00, ‖∇f‖ = 1.5871e-01, α = 1.00e+00, m = 4, nfg = 1 -[ Info: LBFGS: iter 6, Δt 27.27 s: f = -1.961555293087e+00, ‖∇f‖ = 9.2861e-02, α = 1.00e+00, m = 5, nfg = 1 -[ Info: LBFGS: iter 7, Δt 25.52 s: f = -1.962811912498e+00, ‖∇f‖ = 6.7900e-02, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 8, Δt 27.71 s: f = -1.965000830793e+00, ‖∇f‖ = 5.5994e-02, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 9, Δt 26.97 s: f = -1.966386885688e+00, ‖∇f‖ = 5.8303e-02, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 10, Δt 27.50 s: f = -1.967582741430e+00, ‖∇f‖ = 1.1340e-01, α = 1.00e+00, m = 9, nfg = 1 -[ Info: LBFGS: iter 11, Δt 24.91 s: f = -1.968967360870e+00, ‖∇f‖ = 4.1612e-02, α = 1.00e+00, m = 10, nfg = 1 -[ Info: LBFGS: iter 12, Δt 24.17 s: f = -1.969387768033e+00, ‖∇f‖ = 3.6625e-02, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 13, Δt 22.91 s: f = -1.970335449656e+00, ‖∇f‖ = 3.8759e-02, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 14, Δt 27.81 s: f = -1.971409090676e+00, ‖∇f‖ = 4.5864e-02, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 15, Δt 28.11 s: f = -1.972264675328e+00, ‖∇f‖ = 3.3125e-02, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 16, Δt 30.00 s: f = -1.972963700423e+00, ‖∇f‖ = 3.8311e-02, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 17, Δt 27.60 s: f = -1.973393808483e+00, ‖∇f‖ = 3.4025e-02, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 18, Δt 26.40 s: f = -1.973719445599e+00, ‖∇f‖ = 2.4697e-02, α = 1.00e+00, m = 17, nfg = 1 -[ Info: LBFGS: iter 19, Δt 28.38 s: f = -1.974117003995e+00, ‖∇f‖ = 2.3402e-02, α = 1.00e+00, m = 18, nfg = 1 -[ Info: LBFGS: iter 20, Δt 27.75 s: f = -1.974537198653e+00, ‖∇f‖ = 2.3338e-02, α = 1.00e+00, m = 19, nfg = 1 -[ Info: LBFGS: iter 21, Δt 27.06 s: f = -1.975099516920e+00, ‖∇f‖ = 2.6565e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 22, Δt 26.82 s: f = -1.975286936081e+00, ‖∇f‖ = 4.4455e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 23, Δt 25.91 s: f = -1.975701217338e+00, ‖∇f‖ = 1.5220e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 24, Δt 28.52 s: f = -1.975821697001e+00, ‖∇f‖ = 1.8130e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 25, Δt 26.42 s: f = -1.975915354964e+00, ‖∇f‖ = 2.1138e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 26, Δt 24.35 s: f = -1.975998069768e+00, ‖∇f‖ = 1.3443e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 27, Δt 24.80 s: f = -1.976153039607e+00, ‖∇f‖ = 1.4680e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 28, Δt 23.66 s: f = -1.976260274804e+00, ‖∇f‖ = 1.7700e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 29, Δt 24.93 s: f = -1.976336675890e+00, ‖∇f‖ = 3.6212e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 30, Δt 22.98 s: f = -1.976481030702e+00, ‖∇f‖ = 1.2667e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 31, Δt 23.03 s: f = -1.976539819784e+00, ‖∇f‖ = 1.2939e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 32, Δt 23.95 s: f = -1.976636245246e+00, ‖∇f‖ = 1.3135e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 33, Δt 48.36 s: f = -1.976684971058e+00, ‖∇f‖ = 1.9116e-02, α = 4.62e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 34, Δt 23.65 s: f = -1.976743262496e+00, ‖∇f‖ = 1.1658e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 35, Δt 23.80 s: f = -1.976804909822e+00, ‖∇f‖ = 9.8461e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 36, Δt 23.74 s: f = -1.976867380046e+00, ‖∇f‖ = 1.1271e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 37, Δt 24.66 s: f = -1.976958913613e+00, ‖∇f‖ = 1.1353e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 38, Δt 24.14 s: f = -1.977004149888e+00, ‖∇f‖ = 3.0196e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 39, Δt 24.29 s: f = -1.977132482812e+00, ‖∇f‖ = 8.3199e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 40, Δt 23.70 s: f = -1.977168854066e+00, ‖∇f‖ = 6.5281e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 41, Δt 24.26 s: f = -1.977230989059e+00, ‖∇f‖ = 9.2541e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 42, Δt 24.18 s: f = -1.977285220461e+00, ‖∇f‖ = 1.3935e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 43, Δt 23.53 s: f = -1.977362590244e+00, ‖∇f‖ = 1.0743e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 44, Δt 23.86 s: f = -1.977429195025e+00, ‖∇f‖ = 8.6810e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 45, Δt 25.41 s: f = -1.977458751818e+00, ‖∇f‖ = 2.5717e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 46, Δt 22.06 s: f = -1.977509209358e+00, ‖∇f‖ = 1.3339e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 47, Δt 22.96 s: f = -1.977531778536e+00, ‖∇f‖ = 1.0403e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 48, Δt 22.65 s: f = -1.977584620950e+00, ‖∇f‖ = 1.0581e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 49, Δt 23.16 s: f = -1.977638977445e+00, ‖∇f‖ = 1.1478e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 50, Δt 24.26 s: f = -1.977695226616e+00, ‖∇f‖ = 1.1637e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 51, Δt 22.61 s: f = -1.977738682348e+00, ‖∇f‖ = 1.8362e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 52, Δt 21.76 s: f = -1.977786348227e+00, ‖∇f‖ = 8.4144e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 53, Δt 23.05 s: f = -1.977834226107e+00, ‖∇f‖ = 9.5424e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 54, Δt 24.76 s: f = -1.977872709228e+00, ‖∇f‖ = 1.0069e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 55, Δt 23.20 s: f = -1.977896046364e+00, ‖∇f‖ = 1.1177e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 56, Δt 22.34 s: f = -1.977948855869e+00, ‖∇f‖ = 1.5958e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 57, Δt 22.56 s: f = -1.977994579851e+00, ‖∇f‖ = 8.9051e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 58, Δt 22.35 s: f = -1.978026072493e+00, ‖∇f‖ = 6.8546e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 59, Δt 24.53 s: f = -1.978061626606e+00, ‖∇f‖ = 9.8392e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 60, Δt 24.11 s: f = -1.978102554569e+00, ‖∇f‖ = 9.4732e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 61, Δt 22.77 s: f = -1.978139870452e+00, ‖∇f‖ = 9.1003e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 62, Δt 23.50 s: f = -1.978176133536e+00, ‖∇f‖ = 6.4191e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 63, Δt 23.05 s: f = -1.978213215021e+00, ‖∇f‖ = 6.9446e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 64, Δt 24.10 s: f = -1.978234971062e+00, ‖∇f‖ = 1.5980e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 65, Δt 25.47 s: f = -1.978268225326e+00, ‖∇f‖ = 8.5546e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 66, Δt 22.02 s: f = -1.978286888113e+00, ‖∇f‖ = 6.4777e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 67, Δt 23.79 s: f = -1.978300997146e+00, ‖∇f‖ = 8.0692e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 68, Δt 22.57 s: f = -1.978300528984e+00, ‖∇f‖ = 5.5147e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 69, Δt 23.63 s: f = -1.978328958743e+00, ‖∇f‖ = 6.3994e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 70, Δt 24.58 s: f = -1.978331153308e+00, ‖∇f‖ = 6.5489e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 71, Δt 24.48 s: f = -1.978363716954e+00, ‖∇f‖ = 5.9050e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 72, Δt 24.34 s: f = -1.978377069104e+00, ‖∇f‖ = 1.1874e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 73, Δt 23.47 s: f = -1.978401095295e+00, ‖∇f‖ = 5.3880e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 74, Δt 23.53 s: f = -1.978411402203e+00, ‖∇f‖ = 3.9472e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 75, Δt 23.03 s: f = -1.978423812150e+00, ‖∇f‖ = 5.1734e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 76, Δt 23.97 s: f = -1.978437405148e+00, ‖∇f‖ = 7.4640e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 77, Δt 23.49 s: f = -1.978449959375e+00, ‖∇f‖ = 4.6023e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 78, Δt 23.47 s: f = -1.978465209487e+00, ‖∇f‖ = 4.0286e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 79, Δt 23.17 s: f = -1.978478118790e+00, ‖∇f‖ = 6.5526e-03, α = 1.00e+00, m = 20, nfg = 1 -┌ Warning: LBFGS: not converged to requested tol after 80 iterations and time 52.05 m: f = -1.978491610275e+00, ‖∇f‖ = 7.4246e-03 +[ Info: LBFGS: iter 2, Δt 30.10 s: f = -1.936546032899e+00, ‖∇f‖ = 2.1792e-01, α = 1.00e+00, m = 1, nfg = 1 +[ Info: LBFGS: iter 3, Δt 26.79 s: f = -1.942713411326e+00, ‖∇f‖ = 2.0267e-01, α = 1.00e+00, m = 2, nfg = 1 +[ Info: LBFGS: iter 4, Δt 28.54 s: f = -1.952873152491e+00, ‖∇f‖ = 1.6713e-01, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 5, Δt 26.73 s: f = -1.958619448466e+00, ‖∇f‖ = 1.5871e-01, α = 1.00e+00, m = 4, nfg = 1 +[ Info: LBFGS: iter 6, Δt 26.99 s: f = -1.961555293087e+00, ‖∇f‖ = 9.2861e-02, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 7, Δt 23.68 s: f = -1.962811912498e+00, ‖∇f‖ = 6.7900e-02, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 8, Δt 27.04 s: f = -1.965000830793e+00, ‖∇f‖ = 5.5994e-02, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 9, Δt 26.47 s: f = -1.966386885688e+00, ‖∇f‖ = 5.8303e-02, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 10, Δt 28.06 s: f = -1.967582741430e+00, ‖∇f‖ = 1.1340e-01, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 11, Δt 23.87 s: f = -1.968967360870e+00, ‖∇f‖ = 4.1612e-02, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 12, Δt 26.47 s: f = -1.969387768033e+00, ‖∇f‖ = 3.6625e-02, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 13, Δt 26.62 s: f = -1.970335449656e+00, ‖∇f‖ = 3.8759e-02, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 14, Δt 24.86 s: f = -1.971409090676e+00, ‖∇f‖ = 4.5864e-02, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 15, Δt 27.45 s: f = -1.972264675328e+00, ‖∇f‖ = 3.3125e-02, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 16, Δt 27.63 s: f = -1.972963700423e+00, ‖∇f‖ = 3.8311e-02, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 17, Δt 28.42 s: f = -1.973393808483e+00, ‖∇f‖ = 3.4025e-02, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 18, Δt 27.42 s: f = -1.973719445599e+00, ‖∇f‖ = 2.4697e-02, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 19, Δt 28.34 s: f = -1.974117003995e+00, ‖∇f‖ = 2.3402e-02, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 20, Δt 27.31 s: f = -1.974537198653e+00, ‖∇f‖ = 2.3338e-02, α = 1.00e+00, m = 19, nfg = 1 +[ Info: LBFGS: iter 21, Δt 26.79 s: f = -1.975099516920e+00, ‖∇f‖ = 2.6565e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 22, Δt 24.36 s: f = -1.975286936080e+00, ‖∇f‖ = 4.4455e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 23, Δt 26.28 s: f = -1.975701217338e+00, ‖∇f‖ = 1.5220e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 24, Δt 26.99 s: f = -1.975821697001e+00, ‖∇f‖ = 1.8130e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 25, Δt 25.04 s: f = -1.975915354964e+00, ‖∇f‖ = 2.1138e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 26, Δt 25.82 s: f = -1.975998069768e+00, ‖∇f‖ = 1.3443e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 27, Δt 25.54 s: f = -1.976153039607e+00, ‖∇f‖ = 1.4680e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 28, Δt 23.28 s: f = -1.976260274805e+00, ‖∇f‖ = 1.7700e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 29, Δt 25.83 s: f = -1.976336675890e+00, ‖∇f‖ = 3.6212e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 30, Δt 26.52 s: f = -1.976481030702e+00, ‖∇f‖ = 1.2667e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 31, Δt 23.38 s: f = -1.976539819784e+00, ‖∇f‖ = 1.2939e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 32, Δt 24.60 s: f = -1.976636245246e+00, ‖∇f‖ = 1.3135e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 33, Δt 49.20 s: f = -1.976684971058e+00, ‖∇f‖ = 1.9116e-02, α = 4.62e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 34, Δt 24.86 s: f = -1.976743262496e+00, ‖∇f‖ = 1.1658e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 35, Δt 25.56 s: f = -1.976804909822e+00, ‖∇f‖ = 9.8461e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 36, Δt 23.13 s: f = -1.976867380046e+00, ‖∇f‖ = 1.1271e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 37, Δt 25.03 s: f = -1.976958913613e+00, ‖∇f‖ = 1.1353e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 38, Δt 23.37 s: f = -1.977004149890e+00, ‖∇f‖ = 3.0196e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 39, Δt 24.88 s: f = -1.977132482813e+00, ‖∇f‖ = 8.3199e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 40, Δt 24.85 s: f = -1.977168854067e+00, ‖∇f‖ = 6.5281e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 41, Δt 23.43 s: f = -1.977230989060e+00, ‖∇f‖ = 9.2541e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 42, Δt 23.77 s: f = -1.977285220462e+00, ‖∇f‖ = 1.3935e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 43, Δt 25.27 s: f = -1.977362590247e+00, ‖∇f‖ = 1.0743e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 44, Δt 25.60 s: f = -1.977429195029e+00, ‖∇f‖ = 8.6810e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 45, Δt 23.95 s: f = -1.977458751822e+00, ‖∇f‖ = 2.5717e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 46, Δt 25.42 s: f = -1.977509209361e+00, ‖∇f‖ = 1.3339e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 47, Δt 22.56 s: f = -1.977531778539e+00, ‖∇f‖ = 1.0403e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 48, Δt 24.86 s: f = -1.977584620951e+00, ‖∇f‖ = 1.0581e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 49, Δt 23.20 s: f = -1.977638977447e+00, ‖∇f‖ = 1.1478e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 50, Δt 25.21 s: f = -1.977695226616e+00, ‖∇f‖ = 1.1637e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 51, Δt 23.20 s: f = -1.977738682349e+00, ‖∇f‖ = 1.8362e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 52, Δt 24.21 s: f = -1.977786348228e+00, ‖∇f‖ = 8.4144e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 53, Δt 25.94 s: f = -1.977834226107e+00, ‖∇f‖ = 9.5424e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 54, Δt 24.54 s: f = -1.977872709228e+00, ‖∇f‖ = 1.0069e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 55, Δt 25.89 s: f = -1.977896046365e+00, ‖∇f‖ = 1.1177e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 56, Δt 22.63 s: f = -1.977948855864e+00, ‖∇f‖ = 1.5958e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 57, Δt 24.69 s: f = -1.977994579846e+00, ‖∇f‖ = 8.9051e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 58, Δt 24.98 s: f = -1.978026072488e+00, ‖∇f‖ = 6.8546e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 59, Δt 22.77 s: f = -1.978061626602e+00, ‖∇f‖ = 9.8392e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 60, Δt 25.27 s: f = -1.978102554566e+00, ‖∇f‖ = 9.4732e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 61, Δt 25.82 s: f = -1.978139870449e+00, ‖∇f‖ = 9.1003e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 62, Δt 23.64 s: f = -1.978176133537e+00, ‖∇f‖ = 6.4191e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 63, Δt 23.69 s: f = -1.978213215013e+00, ‖∇f‖ = 6.9445e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 64, Δt 25.13 s: f = -1.978234971028e+00, ‖∇f‖ = 1.5980e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 65, Δt 25.96 s: f = -1.978268225317e+00, ‖∇f‖ = 8.5546e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 66, Δt 22.69 s: f = -1.978286888113e+00, ‖∇f‖ = 6.4777e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 67, Δt 25.57 s: f = -1.978300997149e+00, ‖∇f‖ = 8.0692e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 68, Δt 22.75 s: f = -1.978300529026e+00, ‖∇f‖ = 5.5147e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 69, Δt 24.87 s: f = -1.978328958749e+00, ‖∇f‖ = 6.3994e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 70, Δt 23.26 s: f = -1.978331153288e+00, ‖∇f‖ = 6.5489e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 71, Δt 24.88 s: f = -1.978363716980e+00, ‖∇f‖ = 5.9050e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 72, Δt 23.84 s: f = -1.978377069059e+00, ‖∇f‖ = 1.1874e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 73, Δt 25.42 s: f = -1.978401095323e+00, ‖∇f‖ = 5.3880e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 74, Δt 25.36 s: f = -1.978411402198e+00, ‖∇f‖ = 3.9472e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 75, Δt 22.51 s: f = -1.978423812151e+00, ‖∇f‖ = 5.1734e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 76, Δt 26.05 s: f = -1.978437405160e+00, ‖∇f‖ = 7.4640e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 77, Δt 23.22 s: f = -1.978449959410e+00, ‖∇f‖ = 4.6023e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 78, Δt 23.33 s: f = -1.978465209508e+00, ‖∇f‖ = 4.0286e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 79, Δt 25.00 s: f = -1.978478118795e+00, ‖∇f‖ = 6.5526e-03, α = 1.00e+00, m = 20, nfg = 1 +┌ Warning: LBFGS: not converged to requested tol after 80 iterations and time 55.20 m: f = -1.978491610311e+00, ‖∇f‖ = 7.4245e-03 └ @ OptimKit ~/.julia/packages/OptimKit/OEwMx/src/lbfgs.jl:199 ```` @@ -461,8 +460,8 @@ E_opt /= (Nr * Nc) ```` ```` -E_opt = -0.4946229025687655 -(E_opt - E_ref) / abs(E_ref) = -0.0007544816768143398 +E_opt = -0.49462290257785074 +(E_opt - E_ref) / abs(E_ref) = -0.0007544816951961963 ```` diff --git a/docs/src/examples/j1j2_su/main.ipynb b/docs/src/examples/j1j2_su/main.ipynb index b90d577d1..55ae42a2b 100644 --- a/docs/src/examples/j1j2_su/main.ipynb +++ b/docs/src/examples/j1j2_su/main.ipynb @@ -182,9 +182,8 @@ "This is conviently done using MPSKit's `randomize!` function.\n", "(Breaking some of the spatial symmetry can be advantageous for obtaining lower energies.)\n", "\n", - "In our optimization, we will use a fixed-point differentiation scheme which requires a\n", - "gauge fixing of the contraction environment\n", - "(specified by the `gradient_alg = (; iterscheme = :fixed)` setting).\n", + "In our optimization, we will use the default fixed-point differentiation scheme which\n", + "requires a gauge fixing of the contraction environment.\n", "Since this gauge fixing involves potentially complex phases, we have to convert our\n", "real-valued contraction environment to complex numbers before the optimization." ] @@ -201,7 +200,7 @@ "peps₀ = peps + 1.0e-1noise_peps\n", "peps_opt, env_opt, E_opt, = fixedpoint(\n", " H, peps₀, complex(env);\n", - " optimizer_alg = (; tol = 1.0e-4, maxiter = 80), gradient_alg = (; iterscheme = :fixed)\n", + " optimizer_alg = (; tol = 1.0e-4, maxiter = 80),\n", ");" ] }, diff --git a/docs/src/examples/xxz/index.md b/docs/src/examples/xxz/index.md index 18d7c9178..5f86d6e7a 100644 --- a/docs/src/examples/xxz/index.md +++ b/docs/src/examples/xxz/index.md @@ -85,7 +85,7 @@ From this point onwards it's business as usual: Create an initial PEPS and envir ````julia boundary_alg = (; tol = 1.0e-8, alg = :SimultaneousCTMRG, trunc = (; alg = :FixedSpaceTruncation)) -gradient_alg = (; tol = 1.0e-6, alg = :EigSolver, maxiter = 10, iterscheme = :fixed) +gradient_alg = (; tol = 1.0e-6, maxiter = 10, solver_alg = (; alg = :Arnoldi)) optimizer_alg = (; tol = 1.0e-4, alg = :LBFGS, maxiter = 85, ls_maxiter = 3, ls_maxfg = 3) peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces) @@ -94,7 +94,7 @@ env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...); ```` [ Info: CTMRG init: obj = -2.356413456811e+03 +3.307968169629e+02im err = 1.0000e+00 -[ Info: CTMRG conv 30: obj = +6.245129734283e+03 -4.008506948594e-08im err = 5.3638614844e-09 time = 14.24 sec +[ Info: CTMRG conv 30: obj = +6.245129734283e+03 -4.011326382169e-08im err = 5.3638611585e-09 time = 15.78 sec ```` @@ -116,96 +116,96 @@ peps, env, E, info = fixedpoint( ┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: │ α = 2.50e+01, dϕ = -2.44e-02, ϕ - ϕ₀ = -4.56e-01 └ @ OptimKit ~/.julia/packages/OptimKit/OEwMx/src/linesearches.jl:151 -[ Info: LBFGS: iter 1, Δt 45.37 s: f = -5.947088553357e-01, ‖∇f‖ = 3.7329e+00, α = 2.50e+01, m = 0, nfg = 4 +[ Info: LBFGS: iter 1, Δt 51.04 s: f = -5.947088553357e-01, ‖∇f‖ = 3.7329e+00, α = 2.50e+01, m = 0, nfg = 4 ┌ Warning: Linesearch not converged after 1 iterations and 4 function evaluations: │ α = 2.50e+01, dϕ = -7.72e-03, ϕ - ϕ₀ = -1.52e+00 └ @ OptimKit ~/.julia/packages/OptimKit/OEwMx/src/linesearches.jl:151 -[ Info: LBFGS: iter 2, Δt 45.67 s: f = -2.114273976569e+00, ‖∇f‖ = 2.9121e+00, α = 2.50e+01, m = 0, nfg = 4 -[ Info: LBFGS: iter 3, Δt 9.49 s: f = -2.218657558447e+00, ‖∇f‖ = 1.4788e+00, α = 1.00e+00, m = 1, nfg = 1 -[ Info: LBFGS: iter 4, Δt 28.19 s: f = -2.473597365661e+00, ‖∇f‖ = 1.2506e+00, α = 3.17e+00, m = 2, nfg = 3 -[ Info: LBFGS: iter 5, Δt 9.28 s: f = -2.546159342811e+00, ‖∇f‖ = 1.4463e+00, α = 1.00e+00, m = 3, nfg = 1 -[ Info: LBFGS: iter 6, Δt 7.74 s: f = -2.614645567632e+00, ‖∇f‖ = 4.0554e-01, α = 1.00e+00, m = 4, nfg = 1 -[ Info: LBFGS: iter 7, Δt 8.85 s: f = -2.622673934023e+00, ‖∇f‖ = 1.8054e-01, α = 1.00e+00, m = 5, nfg = 1 -[ Info: LBFGS: iter 8, Δt 7.07 s: f = -2.626310260611e+00, ‖∇f‖ = 1.7749e-01, α = 1.00e+00, m = 6, nfg = 1 -[ Info: LBFGS: iter 9, Δt 8.59 s: f = -2.632769137184e+00, ‖∇f‖ = 1.8586e-01, α = 1.00e+00, m = 7, nfg = 1 -[ Info: LBFGS: iter 10, Δt 6.53 s: f = -2.639694621494e+00, ‖∇f‖ = 2.2500e-01, α = 1.00e+00, m = 8, nfg = 1 -[ Info: LBFGS: iter 11, Δt 8.00 s: f = -2.644827934020e+00, ‖∇f‖ = 1.2801e-01, α = 1.00e+00, m = 9, nfg = 1 -[ Info: LBFGS: iter 12, Δt 5.91 s: f = -2.646459705819e+00, ‖∇f‖ = 6.7575e-02, α = 1.00e+00, m = 10, nfg = 1 -[ Info: LBFGS: iter 13, Δt 6.22 s: f = -2.647499600831e+00, ‖∇f‖ = 6.0731e-02, α = 1.00e+00, m = 11, nfg = 1 -[ Info: LBFGS: iter 14, Δt 7.75 s: f = -2.648703045894e+00, ‖∇f‖ = 7.1313e-02, α = 1.00e+00, m = 12, nfg = 1 -[ Info: LBFGS: iter 15, Δt 6.29 s: f = -2.650602127388e+00, ‖∇f‖ = 9.3675e-02, α = 1.00e+00, m = 13, nfg = 1 -[ Info: LBFGS: iter 16, Δt 7.53 s: f = -2.652309117542e+00, ‖∇f‖ = 8.3679e-02, α = 1.00e+00, m = 14, nfg = 1 -[ Info: LBFGS: iter 17, Δt 5.86 s: f = -2.654182949224e+00, ‖∇f‖ = 9.5661e-02, α = 1.00e+00, m = 15, nfg = 1 -[ Info: LBFGS: iter 18, Δt 7.49 s: f = -2.655830713358e+00, ‖∇f‖ = 1.4282e-01, α = 1.00e+00, m = 16, nfg = 1 -[ Info: LBFGS: iter 19, Δt 5.62 s: f = -2.658506508894e+00, ‖∇f‖ = 8.6260e-02, α = 1.00e+00, m = 17, nfg = 1 -[ Info: LBFGS: iter 20, Δt 5.98 s: f = -2.660101929403e+00, ‖∇f‖ = 5.5569e-02, α = 1.00e+00, m = 18, nfg = 1 -[ Info: LBFGS: iter 21, Δt 7.27 s: f = -2.660655802769e+00, ‖∇f‖ = 5.0089e-02, α = 1.00e+00, m = 19, nfg = 1 -[ Info: LBFGS: iter 22, Δt 5.69 s: f = -2.661713752636e+00, ‖∇f‖ = 6.6020e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 23, Δt 6.23 s: f = -2.663782967628e+00, ‖∇f‖ = 1.4168e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 24, Δt 7.11 s: f = -2.664843906404e+00, ‖∇f‖ = 1.3559e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 25, Δt 6.05 s: f = -2.666211885495e+00, ‖∇f‖ = 6.7533e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 26, Δt 7.18 s: f = -2.666722965867e+00, ‖∇f‖ = 5.1877e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 27, Δt 6.02 s: f = -2.667030607084e+00, ‖∇f‖ = 4.7362e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 28, Δt 7.70 s: f = -2.668170313888e+00, ‖∇f‖ = 5.6311e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 29, Δt 6.04 s: f = -2.668423708832e+00, ‖∇f‖ = 1.1943e-01, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 30, Δt 7.68 s: f = -2.669339639442e+00, ‖∇f‖ = 4.0859e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 31, Δt 5.65 s: f = -2.669607092068e+00, ‖∇f‖ = 3.0582e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 32, Δt 6.03 s: f = -2.669888674448e+00, ‖∇f‖ = 3.6474e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 33, Δt 7.56 s: f = -2.670409260559e+00, ‖∇f‖ = 5.7241e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 34, Δt 6.35 s: f = -2.670955670621e+00, ‖∇f‖ = 6.0848e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 35, Δt 7.45 s: f = -2.671400740936e+00, ‖∇f‖ = 4.4890e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 36, Δt 6.16 s: f = -2.671654819742e+00, ‖∇f‖ = 2.3662e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 37, Δt 7.47 s: f = -2.671805688410e+00, ‖∇f‖ = 2.3809e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 38, Δt 6.15 s: f = -2.672069418094e+00, ‖∇f‖ = 3.7660e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 39, Δt 7.50 s: f = -2.672391998692e+00, ‖∇f‖ = 4.6082e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 40, Δt 6.15 s: f = -2.672631813229e+00, ‖∇f‖ = 2.8972e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 41, Δt 7.60 s: f = -2.672757646725e+00, ‖∇f‖ = 2.0266e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 42, Δt 5.76 s: f = -2.672874968531e+00, ‖∇f‖ = 2.3891e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 43, Δt 6.09 s: f = -2.673085935987e+00, ‖∇f‖ = 3.1467e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 44, Δt 7.17 s: f = -2.673264955042e+00, ‖∇f‖ = 5.1067e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 45, Δt 6.11 s: f = -2.673441653001e+00, ‖∇f‖ = 2.2050e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 46, Δt 7.64 s: f = -2.673518614777e+00, ‖∇f‖ = 1.6760e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 47, Δt 6.03 s: f = -2.673610642660e+00, ‖∇f‖ = 2.1356e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 48, Δt 7.60 s: f = -2.673749855167e+00, ‖∇f‖ = 3.0804e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 49, Δt 6.08 s: f = -2.673964481832e+00, ‖∇f‖ = 2.8038e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 50, Δt 6.24 s: f = -2.674085336827e+00, ‖∇f‖ = 3.7211e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 51, Δt 7.20 s: f = -2.674190542900e+00, ‖∇f‖ = 1.7211e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 52, Δt 6.09 s: f = -2.674244307002e+00, ‖∇f‖ = 1.4385e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 53, Δt 7.45 s: f = -2.674308652203e+00, ‖∇f‖ = 1.8132e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 54, Δt 6.28 s: f = -2.674434242130e+00, ‖∇f‖ = 2.0442e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 55, Δt 13.84 s: f = -2.674482156825e+00, ‖∇f‖ = 2.0921e-02, α = 3.35e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 56, Δt 7.94 s: f = -2.674544199355e+00, ‖∇f‖ = 1.1684e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 57, Δt 5.86 s: f = -2.674594731099e+00, ‖∇f‖ = 1.2135e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 58, Δt 6.35 s: f = -2.674646300923e+00, ‖∇f‖ = 1.7065e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 59, Δt 7.54 s: f = -2.674708781785e+00, ‖∇f‖ = 1.4159e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 60, Δt 6.33 s: f = -2.674769125064e+00, ‖∇f‖ = 1.4517e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 61, Δt 7.79 s: f = -2.674820428656e+00, ‖∇f‖ = 1.9999e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 62, Δt 6.10 s: f = -2.674864524466e+00, ‖∇f‖ = 1.5512e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 63, Δt 8.24 s: f = -2.674936594389e+00, ‖∇f‖ = 1.4904e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 64, Δt 6.26 s: f = -2.674955282643e+00, ‖∇f‖ = 1.9377e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 65, Δt 7.47 s: f = -2.674989475402e+00, ‖∇f‖ = 1.0749e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 66, Δt 5.94 s: f = -2.675008560457e+00, ‖∇f‖ = 9.3873e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 67, Δt 7.63 s: f = -2.675035121673e+00, ‖∇f‖ = 1.0893e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 68, Δt 5.88 s: f = -2.675093424988e+00, ‖∇f‖ = 1.5948e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 69, Δt 13.66 s: f = -2.675123092585e+00, ‖∇f‖ = 1.8297e-02, α = 5.07e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 70, Δt 6.11 s: f = -2.675158145862e+00, ‖∇f‖ = 1.0411e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 71, Δt 8.91 s: f = -2.675184397098e+00, ‖∇f‖ = 7.5551e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 72, Δt 6.70 s: f = -2.675202127278e+00, ‖∇f‖ = 1.0326e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 73, Δt 9.29 s: f = -2.675232074331e+00, ‖∇f‖ = 1.0276e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 74, Δt 15.73 s: f = -2.675249906405e+00, ‖∇f‖ = 1.7745e-02, α = 3.56e-01, m = 20, nfg = 2 -[ Info: LBFGS: iter 75, Δt 6.61 s: f = -2.675277747740e+00, ‖∇f‖ = 8.6877e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 76, Δt 6.90 s: f = -2.675295012134e+00, ‖∇f‖ = 5.9675e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 77, Δt 9.00 s: f = -2.675309457155e+00, ‖∇f‖ = 8.1916e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 78, Δt 6.50 s: f = -2.675327390804e+00, ‖∇f‖ = 1.1679e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 79, Δt 8.11 s: f = -2.675346033915e+00, ‖∇f‖ = 7.3995e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 80, Δt 6.22 s: f = -2.675361840744e+00, ‖∇f‖ = 6.2470e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 81, Δt 7.71 s: f = -2.675372633878e+00, ‖∇f‖ = 1.0378e-02, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 82, Δt 6.16 s: f = -2.675385864468e+00, ‖∇f‖ = 7.9203e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 83, Δt 8.23 s: f = -2.675408682962e+00, ‖∇f‖ = 5.6544e-03, α = 1.00e+00, m = 20, nfg = 1 -[ Info: LBFGS: iter 84, Δt 6.10 s: f = -2.675422272234e+00, ‖∇f‖ = 7.8184e-03, α = 1.00e+00, m = 20, nfg = 1 -┌ Warning: LBFGS: not converged to requested tol after 85 iterations and time 18.43 m: f = -2.675439882383e+00, ‖∇f‖ = 7.8348e-03 +[ Info: LBFGS: iter 2, Δt 46.08 s: f = -2.114273976569e+00, ‖∇f‖ = 2.9121e+00, α = 2.50e+01, m = 0, nfg = 4 +[ Info: LBFGS: iter 3, Δt 11.23 s: f = -2.218657558447e+00, ‖∇f‖ = 1.4788e+00, α = 1.00e+00, m = 1, nfg = 1 +[ Info: LBFGS: iter 4, Δt 29.05 s: f = -2.473597365661e+00, ‖∇f‖ = 1.2506e+00, α = 3.17e+00, m = 2, nfg = 3 +[ Info: LBFGS: iter 5, Δt 9.98 s: f = -2.546159342811e+00, ‖∇f‖ = 1.4463e+00, α = 1.00e+00, m = 3, nfg = 1 +[ Info: LBFGS: iter 6, Δt 7.54 s: f = -2.614645567632e+00, ‖∇f‖ = 4.0554e-01, α = 1.00e+00, m = 4, nfg = 1 +[ Info: LBFGS: iter 7, Δt 9.46 s: f = -2.622673934023e+00, ‖∇f‖ = 1.8054e-01, α = 1.00e+00, m = 5, nfg = 1 +[ Info: LBFGS: iter 8, Δt 9.27 s: f = -2.626310260611e+00, ‖∇f‖ = 1.7749e-01, α = 1.00e+00, m = 6, nfg = 1 +[ Info: LBFGS: iter 9, Δt 6.95 s: f = -2.632769137184e+00, ‖∇f‖ = 1.8586e-01, α = 1.00e+00, m = 7, nfg = 1 +[ Info: LBFGS: iter 10, Δt 8.65 s: f = -2.639694621494e+00, ‖∇f‖ = 2.2500e-01, α = 1.00e+00, m = 8, nfg = 1 +[ Info: LBFGS: iter 11, Δt 8.44 s: f = -2.644827934020e+00, ‖∇f‖ = 1.2801e-01, α = 1.00e+00, m = 9, nfg = 1 +[ Info: LBFGS: iter 12, Δt 6.13 s: f = -2.646459705819e+00, ‖∇f‖ = 6.7575e-02, α = 1.00e+00, m = 10, nfg = 1 +[ Info: LBFGS: iter 13, Δt 8.35 s: f = -2.647499600831e+00, ‖∇f‖ = 6.0731e-02, α = 1.00e+00, m = 11, nfg = 1 +[ Info: LBFGS: iter 14, Δt 5.88 s: f = -2.648703045894e+00, ‖∇f‖ = 7.1313e-02, α = 1.00e+00, m = 12, nfg = 1 +[ Info: LBFGS: iter 15, Δt 8.62 s: f = -2.650602127388e+00, ‖∇f‖ = 9.3675e-02, α = 1.00e+00, m = 13, nfg = 1 +[ Info: LBFGS: iter 16, Δt 5.82 s: f = -2.652309117542e+00, ‖∇f‖ = 8.3679e-02, α = 1.00e+00, m = 14, nfg = 1 +[ Info: LBFGS: iter 17, Δt 8.69 s: f = -2.654182949224e+00, ‖∇f‖ = 9.5661e-02, α = 1.00e+00, m = 15, nfg = 1 +[ Info: LBFGS: iter 18, Δt 5.84 s: f = -2.655830713358e+00, ‖∇f‖ = 1.4282e-01, α = 1.00e+00, m = 16, nfg = 1 +[ Info: LBFGS: iter 19, Δt 8.15 s: f = -2.658506508894e+00, ‖∇f‖ = 8.6260e-02, α = 1.00e+00, m = 17, nfg = 1 +[ Info: LBFGS: iter 20, Δt 5.84 s: f = -2.660101929403e+00, ‖∇f‖ = 5.5569e-02, α = 1.00e+00, m = 18, nfg = 1 +[ Info: LBFGS: iter 21, Δt 8.04 s: f = -2.660655802769e+00, ‖∇f‖ = 5.0089e-02, α = 1.00e+00, m = 19, nfg = 1 +[ Info: LBFGS: iter 22, Δt 5.81 s: f = -2.661713752636e+00, ‖∇f‖ = 6.6020e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 23, Δt 8.26 s: f = -2.663782967630e+00, ‖∇f‖ = 1.4168e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 24, Δt 5.98 s: f = -2.664843906402e+00, ‖∇f‖ = 1.3559e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 25, Δt 8.19 s: f = -2.666211885495e+00, ‖∇f‖ = 6.7533e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 26, Δt 5.59 s: f = -2.666722965867e+00, ‖∇f‖ = 5.1877e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 27, Δt 8.23 s: f = -2.667030607083e+00, ‖∇f‖ = 4.7362e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 28, Δt 5.90 s: f = -2.668170313884e+00, ‖∇f‖ = 5.6311e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 29, Δt 8.29 s: f = -2.668423708831e+00, ‖∇f‖ = 1.1943e-01, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 30, Δt 5.96 s: f = -2.669339639440e+00, ‖∇f‖ = 4.0859e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 31, Δt 7.95 s: f = -2.669607092067e+00, ‖∇f‖ = 3.0582e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 32, Δt 8.14 s: f = -2.669888674446e+00, ‖∇f‖ = 3.6474e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 33, Δt 6.02 s: f = -2.670409260557e+00, ‖∇f‖ = 5.7241e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 34, Δt 8.57 s: f = -2.670955670619e+00, ‖∇f‖ = 6.0848e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 35, Δt 5.85 s: f = -2.671400740935e+00, ‖∇f‖ = 4.4890e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 36, Δt 8.66 s: f = -2.671654819741e+00, ‖∇f‖ = 2.3662e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 37, Δt 5.93 s: f = -2.671805688409e+00, ‖∇f‖ = 2.3809e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 38, Δt 8.51 s: f = -2.672069418092e+00, ‖∇f‖ = 3.7660e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 39, Δt 6.08 s: f = -2.672391998692e+00, ‖∇f‖ = 4.6082e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 40, Δt 8.23 s: f = -2.672631813228e+00, ‖∇f‖ = 2.8972e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 41, Δt 6.23 s: f = -2.672757646725e+00, ‖∇f‖ = 2.0266e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 42, Δt 7.83 s: f = -2.672874968532e+00, ‖∇f‖ = 2.3891e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 43, Δt 8.20 s: f = -2.673085935987e+00, ‖∇f‖ = 3.1467e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 44, Δt 5.82 s: f = -2.673264955040e+00, ‖∇f‖ = 5.1067e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 45, Δt 8.12 s: f = -2.673441653001e+00, ‖∇f‖ = 2.2050e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 46, Δt 6.05 s: f = -2.673518614776e+00, ‖∇f‖ = 1.6760e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 47, Δt 8.24 s: f = -2.673610642658e+00, ‖∇f‖ = 2.1356e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 48, Δt 5.93 s: f = -2.673749855166e+00, ‖∇f‖ = 3.0804e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 49, Δt 9.19 s: f = -2.673964481828e+00, ‖∇f‖ = 2.8038e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 50, Δt 6.23 s: f = -2.674085336825e+00, ‖∇f‖ = 3.7211e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 51, Δt 8.52 s: f = -2.674190542895e+00, ‖∇f‖ = 1.7211e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 52, Δt 5.78 s: f = -2.674244306997e+00, ‖∇f‖ = 1.4385e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 53, Δt 8.36 s: f = -2.674308652196e+00, ‖∇f‖ = 1.8132e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 54, Δt 5.93 s: f = -2.674434242127e+00, ‖∇f‖ = 2.0442e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 55, Δt 14.61 s: f = -2.674482156822e+00, ‖∇f‖ = 2.0921e-02, α = 3.35e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 56, Δt 8.34 s: f = -2.674544199351e+00, ‖∇f‖ = 1.1684e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 57, Δt 5.82 s: f = -2.674594731095e+00, ‖∇f‖ = 1.2135e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 58, Δt 8.84 s: f = -2.674646300918e+00, ‖∇f‖ = 1.7065e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 59, Δt 6.16 s: f = -2.674708781780e+00, ‖∇f‖ = 1.4159e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 60, Δt 9.12 s: f = -2.674769125056e+00, ‖∇f‖ = 1.4517e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 61, Δt 6.00 s: f = -2.674820428652e+00, ‖∇f‖ = 1.9999e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 62, Δt 8.19 s: f = -2.674864524455e+00, ‖∇f‖ = 1.5512e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 63, Δt 8.88 s: f = -2.674936594392e+00, ‖∇f‖ = 1.4904e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 64, Δt 6.15 s: f = -2.674955282675e+00, ‖∇f‖ = 1.9377e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 65, Δt 8.25 s: f = -2.674989475413e+00, ‖∇f‖ = 1.0749e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 66, Δt 6.22 s: f = -2.675008560437e+00, ‖∇f‖ = 9.3873e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 67, Δt 8.74 s: f = -2.675035121630e+00, ‖∇f‖ = 1.0893e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 68, Δt 5.83 s: f = -2.675093424994e+00, ‖∇f‖ = 1.5948e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 69, Δt 15.63 s: f = -2.675123092489e+00, ‖∇f‖ = 1.8297e-02, α = 5.07e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 70, Δt 8.75 s: f = -2.675158145880e+00, ‖∇f‖ = 1.0411e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 71, Δt 6.10 s: f = -2.675184397120e+00, ‖∇f‖ = 7.5551e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 72, Δt 9.10 s: f = -2.675202127304e+00, ‖∇f‖ = 1.0326e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 73, Δt 6.10 s: f = -2.675232074014e+00, ‖∇f‖ = 1.0276e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 74, Δt 17.15 s: f = -2.675249906270e+00, ‖∇f‖ = 1.7745e-02, α = 3.56e-01, m = 20, nfg = 2 +[ Info: LBFGS: iter 75, Δt 6.17 s: f = -2.675277747818e+00, ‖∇f‖ = 8.6877e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 76, Δt 8.70 s: f = -2.675295012086e+00, ‖∇f‖ = 5.9675e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 77, Δt 6.08 s: f = -2.675309457130e+00, ‖∇f‖ = 8.1916e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 78, Δt 8.55 s: f = -2.675327390677e+00, ‖∇f‖ = 1.1679e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 79, Δt 5.93 s: f = -2.675346033750e+00, ‖∇f‖ = 7.3995e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 80, Δt 8.21 s: f = -2.675361840612e+00, ‖∇f‖ = 6.2470e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 81, Δt 8.34 s: f = -2.675372633737e+00, ‖∇f‖ = 1.0378e-02, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 82, Δt 6.01 s: f = -2.675385864464e+00, ‖∇f‖ = 7.9203e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 83, Δt 8.51 s: f = -2.675408682894e+00, ‖∇f‖ = 5.6545e-03, α = 1.00e+00, m = 20, nfg = 1 +[ Info: LBFGS: iter 84, Δt 6.08 s: f = -2.675422272331e+00, ‖∇f‖ = 7.8189e-03, α = 1.00e+00, m = 20, nfg = 1 +┌ Warning: LBFGS: not converged to requested tol after 85 iterations and time 17.09 m: f = -2.675439881627e+00, ‖∇f‖ = 7.8346e-03 └ @ OptimKit ~/.julia/packages/OptimKit/OEwMx/src/lbfgs.jl:199 -E / prod(size(lattice)) = -0.6688599705957462 +E / prod(size(lattice)) = -0.6688599704067948 ```` diff --git a/docs/src/examples/xxz/main.ipynb b/docs/src/examples/xxz/main.ipynb index d16f13ec6..65ef4b687 100644 --- a/docs/src/examples/xxz/main.ipynb +++ b/docs/src/examples/xxz/main.ipynb @@ -131,7 +131,7 @@ "outputs": [], "source": [ "boundary_alg = (; tol = 1.0e-8, alg = :SimultaneousCTMRG, trunc = (; alg = :FixedSpaceTruncation))\n", - "gradient_alg = (; tol = 1.0e-6, alg = :EigSolver, maxiter = 10, iterscheme = :fixed)\n", + "gradient_alg = (; tol = 1.0e-6, maxiter = 10, solver_alg = (; alg = :Arnoldi))\n", "optimizer_alg = (; tol = 1.0e-4, alg = :LBFGS, maxiter = 85, ls_maxiter = 3, ls_maxfg = 3)\n", "\n", "peps₀ = InfinitePEPS(randn, ComplexF64, physical_spaces, virtual_spaces)\n", diff --git a/examples/Cache.toml b/examples/Cache.toml index ee31b89a4..c617a4f4f 100644 --- a/examples/Cache.toml +++ b/examples/Cache.toml @@ -1,11 +1,11 @@ boundary_mps = "e935558f16247ba5532ce1e2fa5577574d75d9818ab9863775ff6b97a920affb" -heisenberg_su = "20949c9f88410a30de2e79b15c1af47dfa87be4b0203b99f703b757220d9497b" -bose_hubbard = "a006cc5ed863ce0a31b47ccfe861d4830157ddf0de6bacab03fcb5ba5ea348aa" -c4v_ctmrg = "75669dae8280d608fa83612bb44b2b28a28ef3297ff16d69fba2a216a1ca9697" -j1j2_su = "185d7e0475c2020fe86814537d648115c53770991a18d8ba941fb154308e8a70" -hubbard_su = "8060c867a1b50753f8482c5fc217c9ec12f6af4b9710fc6aefbd9d812edb218f" -heisenberg = "80bb9cc57ed85297b1b789a6c5f09494dac81b23631f48c6600ede9424c5d248" +heisenberg_su = "ece6bc444f970665b8d33a42e4fce4fb2f84c0bce246a328c94f46016faa2a67" +bose_hubbard = "19b4cffef158787be173fae44ea9507430762aab2824895d1d1d632aaab0c9b3" +c4v_ctmrg = "275a6e6fd010e5c39001ed05c11e904ec00f11ba265fc339cec61ffb2993f05e" +j1j2_su = "3703e4474b114e6e535bbf46728cb2e5698ba644fe71506a439d9f327e1a7c40" +hubbard_su = "1d737f84999852680157f7daab9897ca4ca2fca2e5f6c781eacd2d8d39fa91c1" +heisenberg = "9a51a621f079cbcf3257ebe52574fa62aa249bbbb3a7c8cd0c396f75a1c1210e" 2d_ising_partition_function = "043e1b0b97197ed611559f4a4683cb8f166c01af82a97f71364f2f5421abe3d2" -3d_ising_partition_function = "933663904d0652218951111d9c6c128ee03c1e8e3dd7c8c97177c15de9d74aef" -xxz = "b48824c6f56be5c6d113e25097ebc515c982907982d32a123f294e62c38b9e19" -fermi_hubbard = "9651a02a27d1a88dd96c3f1892a56ec7d5b5ec83edfb8feab65ab94c623de2bb" +3d_ising_partition_function = "140becfcb6bcb57895cc7e7935487608607e86e06242f6cf8e0beaf8896d0b04" +xxz = "bcbdc95e6f0d0e0586484807ea15693859d2573a006bfe2d89b2317ed3d334a4" +fermi_hubbard = "f557ce22972d49ee3f2c17398b1f57214a010b0e1400b24803d0c744a353689f" diff --git a/examples/bose_hubbard/main.jl b/examples/bose_hubbard/main.jl index cad9217a1..05af563a6 100644 --- a/examples/bose_hubbard/main.jl +++ b/examples/bose_hubbard/main.jl @@ -88,7 +88,7 @@ algorithms and their tolerances: """ boundary_alg = (; tol = 1.0e-8, alg = :SimultaneousCTMRG, trunc = (; alg = :FixedSpaceTruncation)) -gradient_alg = (; tol = 1.0e-6, maxiter = 10, solver_alg = (alg = :GMRES)) +gradient_alg = (; tol = 1.0e-6, maxiter = 10, solver_alg = (; alg = :GMRES)) optimizer_alg = (; tol = 1.0e-4, alg = :LBFGS, maxiter = 150, ls_maxiter = 2, ls_maxfg = 2); md""" diff --git a/examples/c4v_ctmrg/main.jl b/examples/c4v_ctmrg/main.jl index 66738e7af..ec2d47703 100644 --- a/examples/c4v_ctmrg/main.jl +++ b/examples/c4v_ctmrg/main.jl @@ -154,6 +154,6 @@ peps_qr, env_qr, E_qr, = fixedpoint( H, peps₀, env_qr₀; optimizer_alg = (; tol = 1.0e-4), boundary_alg = (; alg = :C4vCTMRG, projector_alg = :C4vQRProjector, maxiter = 500), - gradient_alg = (; solver_alg = (alg = :GMRES)) + gradient_alg = (; solver_alg = (; alg = :GMRES)) ); @show (E_qr - E_ref) / E_ref;