Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename tdvp Functions #59

Merged
merged 8 commits into from
Feb 13, 2023
Merged

Rename tdvp Functions #59

merged 8 commits into from
Feb 13, 2023

Conversation

emstoudenmire
Copy link
Contributor

Main changes

  • Rename the following functions:
    • tdvp -> alternating_update (this does not apply to the user-facing functions in tdvp.jl)
    • tdvp_step -> update_step
    • tdvp_sweep -> update_sweep
    • tdvp_local_update -> local_update
    • _tdvp_compute_nsweeps -> _compute_nsweeps
  • Rename the following files:
    • tdvp_generic.jl -> alternating_update.jl
    • tdvp_step.jl -> update_step.jl
  • Export the mpo function (needed for tests to pass)

List of commits

  • Rename files
  • Rename most tdvp functions to alternating_update (and tdvp_sweep to update_sweep, tdvp_step to update_step)
  • Export the mpo function
  • Define tdvp interface function taking custom solver

@mtfishman
Copy link
Member

Thanks! A next step would be to remove the t argument from the alternating_update function since of course that doesn't make much sense for many solvers. I'll start an issue with improvements to make to alternating_update.

@mtfishman mtfishman mentioned this pull request Feb 2, 2023
11 tasks
@emstoudenmire
Copy link
Contributor Author

I'll look out for that issue. There's a question of how much we want to do in this PR. Id be happy to change the t argument. Another issue is whether we want to keep all 3 (?) versions of the tdvp user interface function. For the keyword args cleanup I was planning to submit a separate PR.

@mtfishman
Copy link
Member

Yes, I wasn't suggesting doing that in this PR, I'm tracking future changes here: #60.

@mtfishman
Copy link
Member

Looks like the function:

tdvp(solver, t, A, x; kwargs...)

is missing.

@mtfishman
Copy link
Member

I formatted the package in #61, guess it caused some merge conflicts but hopefully they are easy to resolve.

@emstoudenmire
Copy link
Contributor Author

I decided to just remove those failing tests, which correspond to the tdvp function allowing multiple permutations of its arguments. Thinking about it more, I think we should just have a single interface with one argument ordering.

@mtfishman
Copy link
Member

That sounds good. So is the interface now:

tdvp(A, t, x; kwargs...) # Uses the default solver, which will be `KrylovKit.exponentiate`.
tdvp(solver, A, t, x; kwargs...) # Specify the solver

where in both cases it computes exp(At)|x⟩ (i.e. evolving to total time t), and the step size is determined from the keyword arguments?

@emstoudenmire
Copy link
Contributor Author

Yes, correct that's the interface now following this PR. I did happen to leave the other "permuted" overloads of tdvp without a solver. How about I go ahead and remove those also in this PR? So then it would be only the ones you said and the others would error (not be defined).

@mtfishman
Copy link
Member

Yeah, let's remove those as well.

@emstoudenmire
Copy link
Contributor Author

(Seeing some test errors about is_tree which I think are unrelated to this PR.)

@mtfishman
Copy link
Member

Those will be fixed by #65.

@emstoudenmire
Copy link
Contributor Author

Great, I thought so, thanks for clarifying.

@mtfishman
Copy link
Member

Ready to merge? Looks like the tests were fixed by ITensor/NamedGraphs.jl#31.

@emstoudenmire
Copy link
Contributor Author

emstoudenmire commented Feb 13, 2023 via email

@mtfishman mtfishman merged commit 7a52b25 into ITensor:main Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants