While looking at the approximate documentation, I noticed it suggests the function can be called with keyword arguments, but I couldn't find a matching method — happy to be told I'm missing something!
julia> methods(approximate)
# 8 methods for generic function "approximate" from MPSKit:
[1] approximate(mps::MultilineMPS, toapprox::Tuple{MultilineMPO, MultilineMPS}, alg::VOMPS, envs)
@ MPSKit src/algorithms/approximate/vomps.jl:13
[2] approximate(ψ::MultilineMPS, toapprox::Tuple{MultilineMPO, MultilineMPS}, alg::VUMPS, envs...; kwargs...)
@ deprecated.jl:213
[3] approximate(mps::MultilineMPS, toapprox::Tuple{MultilineMPO, MultilineMPS}, alg::VOMPS)
@ MPSKit src/algorithms/approximate/vomps.jl:13
[4] approximate(ψ::InfiniteMPS, toapprox::Tuple{InfiniteMPO, InfiniteMPS}, algorithm::Union{IDMRG, IDMRG2})
@ MPSKit src/algorithms/approximate/approximate.jl:61
[5] approximate(ψ::InfiniteMPS, toapprox::Tuple{InfiniteMPO, InfiniteMPS}, algorithm)
@ MPSKit src/algorithms/approximate/approximate.jl:39
[6] approximate(ψ::InfiniteMPS, toapprox::Tuple{InfiniteMPO, InfiniteMPS}, algorithm::Union{IDMRG, IDMRG2}, envs)
@ MPSKit src/algorithms/approximate/approximate.jl:61
[7] approximate(ψ::InfiniteMPS, toapprox::Tuple{InfiniteMPO, InfiniteMPS}, algorithm, envs)
@ MPSKit src/algorithms/approximate/approximate.jl:39
[8] approximate(ψ, toapprox, alg::Union{DMRG, DMRG2, IDMRG, IDMRG2}, envs...)
@ MPSKit src/algorithms/approximate/approximate.jl:54
The only method that accepts kwargs... [2] is marked @ deprecated.jl, so it doesn't look like the intended public signature either. It might just be that the docs are slightly out of sync with the current method signatures above — or maybe keyword-argument support was planned/removed at some point and the docs weren't updated to match.
I'd be happy to take a look and open a PR — just let me know which direction is preferred: dropping the explicit algorithm argument in favor of keyword-based dispatch (matching what the docs currently describe), or updating the docs to align with the existing method signatures.
While looking at the
approximatedocumentation, I noticed it suggests the function can be called with keyword arguments, but I couldn't find a matching method — happy to be told I'm missing something!julia> methods(approximate) # 8 methods for generic function "approximate" from MPSKit: [1] approximate(mps::MultilineMPS, toapprox::Tuple{MultilineMPO, MultilineMPS}, alg::VOMPS, envs) @ MPSKit src/algorithms/approximate/vomps.jl:13 [2] approximate(ψ::MultilineMPS, toapprox::Tuple{MultilineMPO, MultilineMPS}, alg::VUMPS, envs...; kwargs...) @ deprecated.jl:213 [3] approximate(mps::MultilineMPS, toapprox::Tuple{MultilineMPO, MultilineMPS}, alg::VOMPS) @ MPSKit src/algorithms/approximate/vomps.jl:13 [4] approximate(ψ::InfiniteMPS, toapprox::Tuple{InfiniteMPO, InfiniteMPS}, algorithm::Union{IDMRG, IDMRG2}) @ MPSKit src/algorithms/approximate/approximate.jl:61 [5] approximate(ψ::InfiniteMPS, toapprox::Tuple{InfiniteMPO, InfiniteMPS}, algorithm) @ MPSKit src/algorithms/approximate/approximate.jl:39 [6] approximate(ψ::InfiniteMPS, toapprox::Tuple{InfiniteMPO, InfiniteMPS}, algorithm::Union{IDMRG, IDMRG2}, envs) @ MPSKit src/algorithms/approximate/approximate.jl:61 [7] approximate(ψ::InfiniteMPS, toapprox::Tuple{InfiniteMPO, InfiniteMPS}, algorithm, envs) @ MPSKit src/algorithms/approximate/approximate.jl:39 [8] approximate(ψ, toapprox, alg::Union{DMRG, DMRG2, IDMRG, IDMRG2}, envs...) @ MPSKit src/algorithms/approximate/approximate.jl:54The only method that accepts
kwargs...[2] is marked@ deprecated.jl, so it doesn't look like the intended public signature either. It might just be that the docs are slightly out of sync with the current method signatures above — or maybe keyword-argument support was planned/removed at some point and the docs weren't updated to match.I'd be happy to take a look and open a PR — just let me know which direction is preferred: dropping the explicit algorithm argument in favor of keyword-based dispatch (matching what the docs currently describe), or updating the docs to align with the existing method signatures.