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

ITensorTDVP.jl v0.4 #74

Merged
merged 29 commits into from
May 14, 2024
Merged

ITensorTDVP.jl v0.4 #74

merged 29 commits into from
May 14, 2024

Conversation

mtfishman
Copy link
Member

@mtfishman mtfishman commented May 12, 2024

Closes #14 and closes #35.

Some breaking changes and new features:

  • Remove tdvp(t, operator, state; kwargs...) and tdvp(operator, state, t; kwargs...).
  • tdvp(operator, t, state; kwargs...) now interprets t as the total time, i.e. outputs the approximation of apply(exp(t * operator), state). Before, it was interpreting t as the time step, which was confusing and also inconsistent with the docstring for tdvp. It also brings the API for ITensorTDVP.tdvp/ITensorMPS.tdvp closer to that of KrylovKit.exponentiate, and my plan would be to rename tdvp to exponentiate in the future. To set the tdvp time step, the recommended API will now be either tdvp(operator, t, state; nsteps, kwargs...) to set a time step of t / nsteps or tdvp(operator, t, state; time_step, kwargs...) which will set nsteps = Int(t / time_step). nsweeps is kept as an alias for nsteps for backwards compatibility and consistency with other solvers like dmrg, linsolve, etc.
  • The time step is now removed as an argument to the local solvers and moved to a keyword argument time_step.
  • Observer keyword psi changed to state.
  • Drop support for ITensor AbstractOberver interface.
  • Syntax for passing solver/updater kwargs is changed from tdvp(operator, t, init; nsteps, cutoff, solver_tol=1e-12) to tdvp(operator, t, init; nsteps, cutoff, updater_kwargs=(; tol=1e-12)) (same for ITensorTDVP.dmrg). Syntax tries to match ITensorNetworks solvers as much as possible12.
  • Specifying a custom local updater/solver with tdvp(operator, t, init; nsteps, cutoff, updater=...) (same for ITensorTDVP.dmrg, ITensorTDVP.dmrg_x, and ITensorTDVP.linsolve). Syntax tries to match ITensorNetworks solvers as much as possible12. Before a solver/updater could be passed as the first argument to certain solvers like tdvp but now support is consistent across all solvers through the updater keyword argument.

To-do:

  • In contract(::Algorithm"fit", operator::MPO, state::MPS; init, kwargs...), require that init has the unique indices of operator (i.e. for standard MPO and MPS they should be primed).
  • Make a News item on the README.
  • Make sure the examples are using the latest recommended syntax.
  • Make an announcement on ITensor discourse and Slack.
  • Make a new breaking release of ITensorMPS.jl v0.2 using ITensorTDVP.jl v0.4.

@emstoudenmire

Footnotes

  1. https://github.com/ITensor/ITensorNetworks.jl/blob/v0.11.6/test/test_treetensornetworks/test_solvers/test_tdvp.jl 2

  2. https://github.com/ITensor/ITensorNetworks.jl/blob/v0.11.6/test/test_treetensornetworks/test_solvers/test_dmrg.jl 2

src/projmpo_apply.jl Outdated Show resolved Hide resolved
src/dmrg_x.jl Outdated Show resolved Hide resolved
src/dmrg_x.jl Outdated Show resolved Hide resolved
src/linsolve.jl Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
examples/02_dmrg-x.jl Outdated Show resolved Hide resolved
test/test_dmrg_x.jl Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 91.78886% with 28 lines in your changes are missing coverage. Please review.

Project coverage is 87.56%. Comparing base (21db181) to head (a97489e).
Report is 1 commits behind head on main.

Files Patch % Lines
src/reducedconstantterm.jl 80.32% 12 Missing ⚠️
src/tdvp.jl 74.07% 7 Missing ⚠️
src/reducedlinearproblem.jl 85.71% 4 Missing ⚠️
src/sweep_update.jl 97.67% 2 Missing ⚠️
src/timedependentsum.jl 91.66% 2 Missing ⚠️
src/alternating_update.jl 94.73% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #74      +/-   ##
==========================================
+ Coverage   85.99%   87.56%   +1.57%     
==========================================
  Files          19       18       -1     
  Lines         621      571      -50     
==========================================
- Hits          534      500      -34     
+ Misses         87       71      -16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@mtfishman mtfishman changed the title v0.4 ITensorTDVP.jl v0.4 May 14, 2024
@mtfishman mtfishman merged commit 0bf0936 into main May 14, 2024
8 checks passed
@mtfishman mtfishman deleted the v0.4 branch May 14, 2024 23:52
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.

Remove versions taking various argument orderings? Should reverse keyword default to false?
2 participants