Skip to content

Error when implementing the example Fermi Hubbard model #288

@zxm403089989

Description

@zxm403089989

I receive the error when running the Fermi Hubbard model example in "/examples/fermi_hubbard/main.jl" https://github.com/QuantumKitHub/PEPSKit.jl/blob/master/examples/fermi_hubbard/main.jl. In line 85, env₀, = leading_boundary(CTMRGEnv(peps₀, V_env), peps₀; boundary_alg...);, https://github.com/QuantumKitHub/PEPSKit.jl/blob/master/examples/fermi_hubbard/main.jl#L85, REPL returns the method error. I paste them in following.

MethodError: no method matching PEPSKit.CTMRGAlgorithm(; alg::Symbol, tol::Float64, verbosity::Int64, svd_alg::SVDAdjoint{SDD, FullSVDReverseRule}, trunc::@NamedTuple{alg::Symbol})
This error has been manually thrown, explicitly, so the method may exist but be intentionally marked as unimplemented.

Closest candidates are:
  PEPSKit.CTMRGAlgorithm(; alg, tol, maxiter, miniter, verbosity, trscheme, svd_alg, projector_alg) got unsupported keyword argument "trunc"
   @ PEPSKit C:\Users\User\.julia\packages\PEPSKit\jRcMd\src\algorithms\ctmrg\ctmrg.jl:16


Stacktrace:
 [1] kwerr(kw::@NamedTuple{alg::Symbol, tol::Float64, verbosity::Int64, svd_alg::SVDAdjoint{SDD, FullSVDReverseRule}, trunc::@NamedTuple{alg::Symbol}}, args::Type)
   @ Base .\error.jl:165
 [2] select_algorithm(::typeof(leading_boundary), env₀::CTMRGEnv{TensorMap{ComplexF64, GradedSpace{ProductSector{Tuple{FermionParity, U1Irrep}}, TensorKit.SortedVectorDict{ProductSector{Tuple{FermionParity, U1Irrep}}, Int64}}, 1, 1, Vector{ComplexF64}}, TensorMap{ComplexF64, GradedSpace{ProductSector{Tuple{FermionParity, U1Irrep}}, TensorKit.SortedVectorDict{ProductSector{Tuple{FermionParity, U1Irrep}}, Int64}}, 3, 1, Vector{ComplexF64}}}; alg::Symbol, tol::Float64, verbosity::Int64, svd_alg::@NamedTuple{}, kwargs::@Kwargs{trunc::@NamedTuple{alg::Symbol}})
   @ PEPSKit C:\Users\User\.julia\packages\PEPSKit\jRcMd\src\algorithms\select_algorithm.jl:78
 [3] select_algorithm
   @ C:\Users\User\.julia\packages\PEPSKit\jRcMd\src\algorithms\select_algorithm.jl:53 [inlined]
 [4] leading_boundary(env₀::CTMRGEnv{TensorMap{ComplexF64, GradedSpace{ProductSector{Tuple{FermionParity, U1Irrep}}, TensorKit.SortedVectorDict{ProductSector{Tuple{FermionParity, U1Irrep}}, Int64}}, 1, 1, Vector{ComplexF64}}, TensorMap{ComplexF64, GradedSpace{ProductSector{Tuple{FermionParity, U1Irrep}}, TensorKit.SortedVectorDict{ProductSector{Tuple{FermionParity, U1Irrep}}, Int64}}, 3, 1, Vector{ComplexF64}}}, network::InfiniteSquareNetwork{Tuple{TensorMap{ComplexF64, GradedSpace{ProductSector{Tuple{FermionParity, U1Irrep}}, TensorKit.SortedVectorDict{ProductSector{Tuple{FermionParity, U1Irrep}}, Int64}}, 1, 4, Vector{ComplexF64}}, TensorMap{ComplexF64, GradedSpace{ProductSector{Tuple{FermionParity, U1Irrep}}, TensorKit.SortedVectorDict{ProductSector{Tuple{FermionParity, U1Irrep}}, Int64}}, 1, 4, Vector{ComplexF64}}}}; kwargs::@Kwargs{tol::Float64, alg::Symbol, trunc::@NamedTuple{alg::Symbol}})
   @ PEPSKit C:\Users\User\.julia\packages\PEPSKit\jRcMd\src\algorithms\ctmrg\ctmrg.jl:107
 [5] leading_boundary
   @ C:\Users\User\.julia\packages\PEPSKit\jRcMd\src\algorithms\ctmrg\ctmrg.jl:106 [inlined]
 [6] #leading_boundary#387
   @ C:\Users\User\.julia\packages\PEPSKit\jRcMd\src\algorithms\ctmrg\ctmrg.jl:139 [inlined]
 [7] top-level scope
   @ In[9]:3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions