-
Notifications
You must be signed in to change notification settings - Fork 13
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
Remove t argument from alternating_update and improve keyword argument handling #67
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #67 +/- ##
==========================================
- Coverage 76.82% 76.72% -0.10%
==========================================
Files 60 60
Lines 3115 3072 -43
==========================================
- Hits 2393 2357 -36
+ Misses 722 715 -7
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
What do you think of the keyword name? |
Also, what do you think about using the keyword argument |
I think making the interface take It will be interesting how much we can "orthogonalize" the alternating_update code away from TDVP-specific concepts. Right now, there is still a lot of the plumbing that e.g. relies on a Luckily I don't think |
Yes, I think we should push the (Not saying we need to do that in this PR, that sounds like a more involved change so maybe is better to do in future work.) |
The time-dependent Hamiltonian tests aren't passing. I'll work on it – |
Looks like tests are passing now. This PR overall is just a stepping stone and some initial cleanup to get the code to where a refactor is easier to do, and to check some boxes on the associated issue #60. Definitely a lot more work to do on this code! I think the rest of the #60 boxes will be easier to check when I put in the design we discussed about passing an array of sweeping steps and "payload" data for the solver to consume. |
I'm having trouble getting the tests to pass, and it seems to unfortunately be something not obviously related to this PR. I see an error about part of a graph related code trying to access an empty tuple at [1] but I'm not otherwise sure what is really behind this. I thought maybe it was a bug introduced by another recent PR, possibly, but when I run some of the ITensorNetworks tests on my own machine on the main branch they pass. This PR is ready to be merged in from my end, if you agree, and of course once tests pass. Meanwhile I am working on some of the other improvements to this code on a new branch starting from this one, to be sent in another PR. |
Looks like tests are passing, I'll merge. Thanks, nice to see some of this code getting cleaned up! EDIT: I hadn't reloaded the page and so was seeing old test results that had been passing, guess they are failing now. |
I think the failures are related to ITensor/DataGraphs.jl#17, I'll look into it. |
Alright, with the fix from ITensor/DataGraphs.jl#18 this now passes, I'll merge this. |
Thanks! The code is already simplifying a lot just from these changes and I think it can be simplified even more. |
Improvements Made in this PR
t
argument fromalternating_update
in favor of using thetdvp
interface to process time evolution related inputs. (alternating_update
is now only givennsweeps
, basically, plus some other time related keywords, some of which are slated for removal, others of which are just passed down to the ultimate solver)._compute_nsweeps
function has been moved intotdvp.jl
and is only used by thetdvp
interfacet
argument. The only solver which uses time concepts now is thetdvp
solver, which gets passed atime_step
keyword arg (this value includes all of the information about sub time steps, the forward or reverse sign, etc.)Planned Improvements in Future PRs (Can discuss moving them into this PR if it's a good idea)
current_time
computation and printing directly in thealternating_update
,update_step
etc. code directly (would let us remove most of the remaining time related keyword args, liketime_start
, or needing to passcurrent_time
up and down the function stack)TDVPOrder
type so that it only goes intdvp.jl
and is no longer involved in algorithms likedmrg
,linsolve
, etc.alternating_update