You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
I agree this sounds nice. I like the options in Julia for extracting keyword arguments now too, like the (; a,b,c) destructuring syntax if that's applicable here.
Sounds good. I assume the idea is to put the common keyword arguments into the existing NamedTuple internal_kwargs, which is currently reserved for keyword arguments that can only be inferred when the sweep_plan is created? Or would these be kept in a separate one?
I guess so, I forget why in the current code certain keyword arguments are going into internal_kwargs while others are not but I don't see why they couldn't all just go into a single internal_kwargs.
I agree this sounds nice. I like the options in Julia for extracting keyword arguments now too, like the (; a,b,c) destructuring syntax if that's applicable here.
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 fromalternating_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.
The text was updated successfully, but these errors were encountered: