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

Move code to ITensors.ITensorMPS #67

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
40ce92c
Remove codes, now moved to ITensors.ITensorMPS
emstoudenmire Mar 27, 2024
b7ee90b
Update tests
emstoudenmire Mar 27, 2024
86afc5d
Add Reexport to dependencies
emstoudenmire Mar 27, 2024
344d485
Update test_tdvp to avoid warning
emstoudenmire Mar 27, 2024
4e5d5d9
Update example code
emstoudenmire Mar 27, 2024
7ddf347
Update src/ITensorTDVP.jl
emstoudenmire Mar 29, 2024
f4d56fc
Update test/test_dmrg.jl
emstoudenmire Mar 29, 2024
a8eeacc
Update test/test_dmrg_x.jl
emstoudenmire Mar 29, 2024
eadd062
Restore test of applyexp solver backend
emstoudenmire Mar 29, 2024
80b4da7
Bump ITensors compat to v0.3.59
mtfishman Mar 30, 2024
91cd565
Reflect rename to ITensorMPS.alternating_update_dmrg
emstoudenmire Mar 31, 2024
261ff90
Remove unused dependencies
emstoudenmire Mar 31, 2024
204a765
Add compat entry for Reexport
emstoudenmire Mar 31, 2024
010a696
Bump ITensors compat to v0.3.60
mtfishman Mar 31, 2024
8042972
Remove example that was using code internals
emstoudenmire Apr 1, 2024
d7a587b
Restore solver_utils.jl and associated exports
emstoudenmire Apr 1, 2024
62d08eb
Call new internal names for ITensorTDVP functions inside ITensorMPS
emstoudenmire Apr 1, 2024
9358bf3
Bump to v0.3
mtfishman Apr 1, 2024
58ef5d7
More specific wrappers for ITensorTDVP interface
emstoudenmire Apr 1, 2024
34e4b19
Update naming conventions
emstoudenmire Apr 1, 2024
e825129
Update function argument names
emstoudenmire Apr 3, 2024
70e4442
Merge branch 'main' into import_from_ITensorMPS
mtfishman Apr 15, 2024
24572a2
Merge branch 'main' into import_from_ITensorMPS
mtfishman Apr 15, 2024
590f13c
Merge branch 'main' into import_from_ITensorMPS
emstoudenmire Apr 25, 2024
3777752
Add Reexport as dependency
emstoudenmire Apr 25, 2024
2e1f1ad
Change most functions to be reexported from ITensorMPS
emstoudenmire Apr 25, 2024
f78b291
Reexport linsolve from KrylovKit
emstoudenmire Apr 25, 2024
0094d7e
Add test of exports
emstoudenmire Apr 28, 2024
1bcded0
Restore ITensorMPS wrappers and remove Reexport dependency
emstoudenmire Apr 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions Project.toml
emstoudenmire marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,11 @@ version = "0.2.1"

[deps]
ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"
KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Observers = "338f10d5-c7f1-4033-a7d1-f9dec39bcaa0"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"

[compat]
ITensors = "0.3.58"
KrylovKit = "0.6"
Observers = "0.2"
TimerOutputs = "0.5"
ITensors = "0.3.59"
mtfishman marked this conversation as resolved.
Show resolved Hide resolved
Reexport = "1"
julia = "1.6"

[extras]
Expand Down
33 changes: 16 additions & 17 deletions examples/05_utils.jl
emstoudenmire marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using ITensors: MPS, maxlinkdim
using ITensorTDVP: ITensorTDVP
using ITensors.ITensorMPS: ITensorMPS, MPS, maxlinkdim
using Observers: observer, update!
using Printf: @printf

Expand All @@ -12,22 +11,22 @@ function tdvp_nonuniform_timesteps(
time_start=0.0,
order=2,
(step_observer!)=observer(),
maxdim=ITensorTDVP.default_maxdim(),
mindim=ITensorTDVP.default_mindim(),
cutoff=ITensorTDVP.default_cutoff(),
noise=ITensorTDVP.default_noise(),
outputlevel=ITensorTDVP.default_outputlevel(),
maxdim=ITensorMPS.default_maxdim(),
mindim=ITensorMPS.default_mindim(),
cutoff=ITensorMPS.default_cutoff(),
noise=ITensorMPS.default_noise(),
outputlevel=ITensorMPS.default_outputlevel(),
kwargs...,
)
nsweeps = length(time_steps)
maxdim, mindim, cutoff, noise = ITensorTDVP.process_sweeps(;
maxdim, mindim, cutoff, noise = ITensorMPS.process_sweeps(;
nsweeps, maxdim, mindim, cutoff, noise
)
tdvp_order = ITensorTDVP.TDVPOrder(order, Base.Forward)
tdvp_order = ITensorMPS.TDVPOrder(order, Base.Forward)
current_time = time_start
for sw in 1:nsweeps
sw_time = @elapsed begin
psi, PH, info = ITensorTDVP.sweep_update(
psi, PH, info = ITensorMPS.sweep_update(
tdvp_order,
solver,
PH,
Expand Down Expand Up @@ -61,16 +60,16 @@ end
function tdvp_nonuniform_timesteps(
H,
psi::MPS;
ishermitian=ITensorTDVP.default_ishermitian(),
issymmetric=ITensorTDVP.default_issymmetric(),
solver_tol=ITensorTDVP.default_solver_tol(exponentiate),
solver_krylovdim=ITensorTDVP.default_solver_krylovdim(exponentiate),
solver_maxiter=ITensorTDVP.default_solver_maxiter(exponentiate),
solver_outputlevel=ITensorTDVP.default_solver_outputlevel(exponentiate),
ishermitian=ITensorMPS.default_ishermitian(),
issymmetric=ITensorMPS.default_issymmetric(),
solver_tol=ITensorMPS.default_solver_tol(exponentiate),
solver_krylovdim=ITensorMPS.default_solver_krylovdim(exponentiate),
solver_maxiter=ITensorMPS.default_solver_maxiter(exponentiate),
solver_outputlevel=ITensorMPS.default_solver_outputlevel(exponentiate),
kwargs...,
)
return tdvp_nonuniform_timesteps(
ITensorTDVP.tdvp_solver(
ITensorMPS.tdvp_solver(
exponentiate;
ishermitian,
issymmetric,
Expand Down
22 changes: 6 additions & 16 deletions src/ITensorTDVP.jl
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
module ITensorTDVP
export TimeDependentSum, dmrg_x, linsolve, tdvp, to_vec

include("defaults.jl")
include("update_observer.jl")
include("solver_utils.jl")
include("tdvporder.jl")
include("tdvpinfo.jl")
include("sweep_update.jl")
include("alternating_update.jl")
include("tdvp.jl")
include("dmrg.jl")
include("dmrg_x.jl")
include("projmpo_apply.jl")
include("contract_mpo_mps.jl")
include("projmps2.jl")
include("projmpo_mps2.jl")
include("linsolve.jl")
using Reexport: @reexport
emstoudenmire marked this conversation as resolved.
Show resolved Hide resolved
@reexport using ITensors.ITensorMPS: tdvp, dmrg_x, to_vec, TimeDependentSum, linsolve

using ITensors.ITensorMPS: ITensorMPS
dmrg(args...; kwargs...) = ITensorMPS.alternating_update_dmrg(args...; kwargs...)
emstoudenmire marked this conversation as resolved.
Show resolved Hide resolved

end
157 changes: 0 additions & 157 deletions src/alternating_update.jl

This file was deleted.

59 changes: 0 additions & 59 deletions src/contract_mpo_mps.jl

This file was deleted.

50 changes: 0 additions & 50 deletions src/defaults.jl

This file was deleted.

Loading
Loading