Skip to content

Pass common keyword arguments to local updaters in a NamedTuple internal_kwargs #177

@mtfishman

Description

@mtfishman

Pass common keyword arguments to local updaters in a keyword argument internal_kwargs that stores them in a NamedTuple instead of individually/splatted into the updater. Many updaters don't use most of the keyword arguments being passed to them from alternating_update: https://github.com/ITensor/ITensorNetworks.jl/tree/v0.11.6/src/solvers/local_solvers so that would simplify the code a lot.

I plan to use that design in ITensorTDVP.jl v0.4: ITensor/ITensorTDVP.jl#74 and I think it is quite nice, since then updaters only need to do a bit of extra work to extract the keyword arguments they are actually using. updater_kwargs will still be splatted into the updaters.

@b-kloss I think we discussed this design and decided against it but now I'm convinced it is the way to go since it makes most updater definitions a lot simpler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions