From 692287755f8063fe14c846f2f2b4445a905927b6 Mon Sep 17 00:00:00 2001 From: Matt Fishman Date: Tue, 14 May 2024 13:35:55 -0400 Subject: [PATCH] Define ITensorMPS.Experimental.dmrg (#10) --- Project.toml | 2 +- src/Deprecated.jl | 3 +++ src/Experimental.jl | 3 +++ src/ITensorMPS.jl | 8 +++++--- test/runtests.jl | 3 ++- 5 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 src/Deprecated.jl create mode 100644 src/Experimental.jl diff --git a/Project.toml b/Project.toml index 8a00067..bf87762 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ITensorMPS" uuid = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2" authors = ["Matthew Fishman ", "Miles Stoudenmire "] -version = "0.1.7" +version = "0.1.8" [deps] ITensorTDVP = "25707e16-a4db-4a07-99d9-4d67b7af0342" diff --git a/src/Deprecated.jl b/src/Deprecated.jl new file mode 100644 index 0000000..d56b368 --- /dev/null +++ b/src/Deprecated.jl @@ -0,0 +1,3 @@ +module Deprecated +using ITensors.ITensorMPS: dmrg +end diff --git a/src/Experimental.jl b/src/Experimental.jl new file mode 100644 index 0000000..42be6dc --- /dev/null +++ b/src/Experimental.jl @@ -0,0 +1,3 @@ +module Experimental +using ITensorTDVP: dmrg +end diff --git a/src/ITensorMPS.jl b/src/ITensorMPS.jl index 5f7fcba..6f5097b 100644 --- a/src/ITensorMPS.jl +++ b/src/ITensorMPS.jl @@ -1,12 +1,15 @@ module ITensorMPS using Reexport: @reexport @reexport using ITensorTDVP: TimeDependentSum, dmrg_x, linsolve, tdvp, to_vec -using ITensorTDVP: ITensorTDVP -const alternating_update_dmrg = ITensorTDVP.dmrg # Not re-exported, but this makes these types and functions accessible # as `ITensorMPS.x`. using ITensors.ITensorMPS: AbstractProjMPO, AbstractSum, ProjMPS, makeL!, makeR!, set_terms, sortmergeterms, terms +include("Experimental.jl") +using .Experimental: Experimental +include("Deprecated.jl") +using .Deprecated: Deprecated, dmrg +export dmrg @reexport using ITensors.ITensorMPS: @OpName_str, @SiteType_str, @@ -63,7 +66,6 @@ using ITensors.ITensorMPS: cutoff, cutoff!, # deprecate disk, - dmrg, dot, # remove export eigs, # deprecate energies, # deprecate diff --git a/test/runtests.jl b/test/runtests.jl index b03ae99..2459086 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -18,7 +18,8 @@ using Test: @test, @test_broken, @testset ) end @testset "Aliases" begin - @test ITensorMPS.alternating_update_dmrg === ITensorTDVP.dmrg + @test ITensorMPS.Experimental.dmrg === ITensorTDVP.dmrg + @test ITensorMPS.dmrg === ITensors.ITensorMPS.dmrg end @testset "Not exported" begin @test ITensorMPS.sortmergeterms === ITensors.ITensorMPS.sortmergeterms