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

Add new Observer that gets updated after each time step #22

Merged
merged 3 commits into from
Apr 21, 2022

Conversation

mtfishman
Copy link
Member

Often we just want the Observer to get updated after the full time step, however the current one gets updated at each bond.

This PR adds a new step_observer! keyword argument to tdvp where a user can pass an Observer that only gets updated at the end of the entire time step. This makes it simpler to define functions for that observer, since you don't have to check which fractional sweep and bond you are on like you would with the default observer. See the tests for an example.

I've also added an example code for making a custom TDVP with non-uniform time steps. We may want to support that natively by having a time_steps keyword argument where you can specify a vector of time steps. The total time would be determined from the sum of the time steps and the number of steps/sweeps would be the length of the vector of time steps.

@mtfishman mtfishman merged commit acd15ef into main Apr 21, 2022
@mtfishman mtfishman deleted the nonuniform_timestep_example branch April 21, 2022 18:50
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.

1 participant