From 50d4da7dc8cd4ae7a3a2140b4a7020eb7ae9c30d Mon Sep 17 00:00:00 2001 From: mtfishman Date: Mon, 6 May 2024 08:20:12 -0400 Subject: [PATCH 01/12] Start reexporting ITensorTDVP and ITensors.ITensorMPS --- src/ITensorMPS.jl | 9 ++++++--- test/Project.toml | 3 +++ test/runtests.jl | 24 ++++++++++++++++++++---- 3 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 test/Project.toml diff --git a/src/ITensorMPS.jl b/src/ITensorMPS.jl index f302f08..abf6120 100644 --- a/src/ITensorMPS.jl +++ b/src/ITensorMPS.jl @@ -1,5 +1,8 @@ module ITensorMPS - -# Write your package code here. - +using ITensorTDVP: TimeDependentSum, dmrg_x, linsolve, tdvp, to_vec +export TimeDependentSum, dmrg_x, linsolve, tdvp, to_vec +using ITensorTDVP: ITensorTDVP +alternating_update_dmrg(args...; kwargs...) = ITensorTDVP.dmrg(args...; kwargs...) +using ITensors.ITensorMPS: dmrg +export dmrg end diff --git a/test/Project.toml b/test/Project.toml new file mode 100644 index 0000000..8e52c88 --- /dev/null +++ b/test/Project.toml @@ -0,0 +1,3 @@ +[deps] +ITensorMPS = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/test/runtests.jl b/test/runtests.jl index bfca00c..8a561c4 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,6 +1,22 @@ -using ITensorMPS -using Test - +@eval module $(gensym()) +using ITensorMPS: ITensorMPS +using Test: @test, @testset @testset "ITensorMPS.jl" begin - # Write your tests here. + @testset "exports" begin + @test issetequal( + names(ITensorMPS), + [ + :ITensorMPS, + # ITensorMPS reexports + :dmrg, + # ITensorTDVP reexports + :TimeDependentSum, + :dmrg_x, + :linsolve, + :tdvp, + :to_vec, + ], + ) + end +end end From d6cc3815fa9c7fa438cc390b5591231de019ed90 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Mon, 6 May 2024 08:26:12 -0400 Subject: [PATCH 02/12] Update workflows --- .github/workflows/CI.yml | 42 +++++++++++++++++++++--------- .github/workflows/CompatHelper.yml | 2 +- .github/workflows/TagBot.yml | 16 ++++++++++++ .github/workflows/register.yml | 2 ++ 4 files changed, 49 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 17a4df6..2308472 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -3,8 +3,9 @@ on: push: branches: - main - tags: '*' + tags: ['*'] pull_request: + workflow_dispatch: concurrency: # Skip intermediate builds: always. # Cancel intermediate builds: only if it is a pull request build. @@ -14,12 +15,15 @@ jobs: test: name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} + timeout-minutes: 60 + permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created + actions: write + contents: read strategy: fail-fast: false matrix: version: - - '1.6' - - '1' + - '1.10' os: - ubuntu-latest - macOS-latest @@ -27,7 +31,7 @@ jobs: arch: - x64 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v1 with: version: ${{ matrix.version }} @@ -36,25 +40,39 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v2 + - uses: codecov/codecov-action@v4 with: files: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false docs: name: Documentation runs-on: ubuntu-latest + permissions: + actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created + contents: write + statuses: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v1 with: version: '1' + - uses: julia-actions/cache@v1 + - name: Configure doc environment + shell: julia --project=docs --color=yes {0} + run: | + using Pkg + Pkg.develop(PackageSpec(path=pwd())) + Pkg.instantiate() - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-docdeploy@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} - - run: | - julia --project=docs -e ' - using Documenter: DocMeta, doctest - using ITensorMPS - DocMeta.setdocmeta!(ITensorMPS, :DocTestSetup, :(using ITensorMPS); recursive=true) - doctest(ITensorMPS)' + - name: Run doctests + shell: julia --project=docs --color=yes {0} + run: | + using Documenter: DocMeta, doctest + using ITensorMPS + DocMeta.setdocmeta!(ITensorMPS, :DocTestSetup, :(using ITensorMPS); recursive=true) + doctest(ITensorMPS) diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index da266b9..cba9134 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -1,7 +1,7 @@ name: CompatHelper on: schedule: - - cron: '00 00 * * *' + - cron: 0 0 * * * workflow_dispatch: jobs: CompatHelper: diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index f49313b..0cd3114 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -4,6 +4,22 @@ on: types: - created workflow_dispatch: + inputs: + lookback: + default: "3" +permissions: + actions: read + checks: read + contents: write + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: read + statuses: read jobs: TagBot: if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' diff --git a/.github/workflows/register.yml b/.github/workflows/register.yml index 6e71f2f..5b7cd3b 100644 --- a/.github/workflows/register.yml +++ b/.github/workflows/register.yml @@ -8,6 +8,8 @@ on: jobs: register: runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: julia-actions/RegisterAction@latest with: From a54b3452acd3dca02ee9605902ff09fa0ec93087 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Mon, 6 May 2024 08:31:14 -0400 Subject: [PATCH 03/12] Add docs --- README.md | 7 +++++++ docs/Project.toml | 3 +++ docs/make.jl | 23 +++++++++++++++++++++++ docs/src/index.md | 14 ++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 docs/Project.toml create mode 100644 docs/make.jl create mode 100644 docs/src/index.md diff --git a/README.md b/README.md index 6c56278..cf554f4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,11 @@ # ITensorMPS.jl + +[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://itensor.github.io/ITensorMPS.jl/stable/) +[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://itensor.github.io/ITensorMPS.jl/dev/) +[![Build Status](https://github.com/ITensor/ITensorMPS.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/ITensor/ITensorMPS.jl/actions/workflows/CI.yml?query=branch%3Amain) +[![Coverage](https://codecov.io/gh/ITensor/ITensorMPS.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/ITensor/ITensorMPS.jl) +[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle) + MPS and MPO methods based on ITensor (ITensors.jl). This package supercedes the MPS codes previously located in the ITensors.jl and ITensorTDVP.jl packages, including applications like DMRG, TDVP, applying MPO to MPS, applying gates, etc. diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 0000000..39303f4 --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,3 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +ITensorMPS = "10ea5e1e-0ede-47d2-81e8-27a421adbc4d" diff --git a/docs/make.jl b/docs/make.jl new file mode 100644 index 0000000..a7cedf8 --- /dev/null +++ b/docs/make.jl @@ -0,0 +1,23 @@ +using ITensorMPS +using Documenter + +DocMeta.setdocmeta!(ITensorMPS, :DocTestSetup, :(using ITensorMPS); recursive=true) + +makedocs(; + modules=[ITensorMPS], + authors="ITensor developers", + sitename="ITensorMPS.jl", + format=Documenter.HTML(; + canonical="https://ITensor.github.io/ITensorMPS.jl", + edit_link="main", + assets=String[], + ), + pages=[ + "Home" => "index.md", + ], +) + +deploydocs(; + repo="github.com/ITensor/ITensorMPS.jl", + devbranch="main", +) diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 0000000..6dbda31 --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1,14 @@ +```@meta +CurrentModule = ITensorMPS +``` + +# ITensorMPS + +Documentation for [ITensorMPS](https://github.com/ITensor/ITensorMPS.jl). + +```@index +``` + +```@autodocs +Modules = [ITensorMPS] +``` From 4210789def54544bef2883a071c2fb54696de4ce Mon Sep 17 00:00:00 2001 From: mtfishman Date: Mon, 6 May 2024 08:32:05 -0400 Subject: [PATCH 04/12] CI versions --- .github/workflows/CI.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2308472..58d1767 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,7 +23,8 @@ jobs: fail-fast: false matrix: version: - - '1.10' + - '1.6' + - '1' os: - ubuntu-latest - macOS-latest From 91db2f9cb3ef6afae8ac1eaac1932f0f2f75739c Mon Sep 17 00:00:00 2001 From: mtfishman Date: Mon, 6 May 2024 08:34:28 -0400 Subject: [PATCH 05/12] Update test --- src/ITensorMPS.jl | 2 +- test/Project.toml | 1 + test/runtests.jl | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ITensorMPS.jl b/src/ITensorMPS.jl index abf6120..dca6795 100644 --- a/src/ITensorMPS.jl +++ b/src/ITensorMPS.jl @@ -2,7 +2,7 @@ module ITensorMPS using ITensorTDVP: TimeDependentSum, dmrg_x, linsolve, tdvp, to_vec export TimeDependentSum, dmrg_x, linsolve, tdvp, to_vec using ITensorTDVP: ITensorTDVP -alternating_update_dmrg(args...; kwargs...) = ITensorTDVP.dmrg(args...; kwargs...) +const alternating_update_dmrg = ITensorTDVP.dmrg using ITensors.ITensorMPS: dmrg export dmrg end diff --git a/test/Project.toml b/test/Project.toml index 8e52c88..d1392c8 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,3 +1,4 @@ [deps] ITensorMPS = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2" +ITensorTDVP = "25707e16-a4db-4a07-99d9-4d67b7af0342" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/test/runtests.jl b/test/runtests.jl index 8a561c4..ba12a69 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,6 @@ @eval module $(gensym()) using ITensorMPS: ITensorMPS +using ITensorTDVP: ITensorTDVP using Test: @test, @testset @testset "ITensorMPS.jl" begin @testset "exports" begin @@ -18,5 +19,8 @@ using Test: @test, @testset ], ) end + @testset "aliases" begin + @test ITensorMPS.alternating_update_dmrg === ITensorTDVP.dmrg + end end end From 896d9ca973adff60400386a558adb3435f1621fb Mon Sep 17 00:00:00 2001 From: mtfishman Date: Mon, 6 May 2024 08:38:03 -0400 Subject: [PATCH 06/12] Format --- docs/Project.toml | 1 - docs/make.jl | 23 ++++++++--------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/docs/Project.toml b/docs/Project.toml index 39303f4..dfa65cd 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,3 +1,2 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -ITensorMPS = "10ea5e1e-0ede-47d2-81e8-27a421adbc4d" diff --git a/docs/make.jl b/docs/make.jl index a7cedf8..3468de0 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -4,20 +4,13 @@ using Documenter DocMeta.setdocmeta!(ITensorMPS, :DocTestSetup, :(using ITensorMPS); recursive=true) makedocs(; - modules=[ITensorMPS], - authors="ITensor developers", - sitename="ITensorMPS.jl", - format=Documenter.HTML(; - canonical="https://ITensor.github.io/ITensorMPS.jl", - edit_link="main", - assets=String[], - ), - pages=[ - "Home" => "index.md", - ], + modules=[ITensorMPS], + authors="ITensor developers", + sitename="ITensorMPS.jl", + format=Documenter.HTML(; + canonical="https://ITensor.github.io/ITensorMPS.jl", edit_link="main", assets=String[] + ), + pages=["Home" => "index.md"], ) -deploydocs(; - repo="github.com/ITensor/ITensorMPS.jl", - devbranch="main", -) +deploydocs(; repo="github.com/ITensor/ITensorMPS.jl", devbranch="main") From a6d882c59fbd1cd7ee38b51a57453dba6e9f93a4 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Mon, 6 May 2024 09:40:34 -0400 Subject: [PATCH 07/12] Add more reexports --- Project.toml | 4 +- src/ITensorMPS.jl | 167 ++++++++++++++++++++++++++++++++++++++++++++-- test/Project.toml | 1 + test/runtests.jl | 31 ++++++--- 4 files changed, 190 insertions(+), 13 deletions(-) diff --git a/Project.toml b/Project.toml index 69c0bd3..1c7f5b1 100644 --- a/Project.toml +++ b/Project.toml @@ -6,10 +6,12 @@ version = "0.1.0" [deps] ITensorTDVP = "25707e16-a4db-4a07-99d9-4d67b7af0342" ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5" +Reexport = "189a3867-3050-52da-a836-e630ba90ab69" [compat] -ITensorTDVP = "0.3.0" +ITensorTDVP = "0.3" ITensors = "0.5.2" +Reexport = "1" julia = "1.6" [extras] diff --git a/src/ITensorMPS.jl b/src/ITensorMPS.jl index dca6795..cbf5d20 100644 --- a/src/ITensorMPS.jl +++ b/src/ITensorMPS.jl @@ -1,8 +1,167 @@ module ITensorMPS -using ITensorTDVP: TimeDependentSum, dmrg_x, linsolve, tdvp, to_vec -export TimeDependentSum, dmrg_x, linsolve, tdvp, to_vec +using Reexport: @reexport +@reexport using ITensorTDVP: TimeDependentSum, dmrg_x, linsolve, tdvp, to_vec using ITensorTDVP: ITensorTDVP const alternating_update_dmrg = ITensorTDVP.dmrg -using ITensors.ITensorMPS: dmrg -export dmrg +@reexport using ITensors.ITensorMPS: + @OpName_str, + @SiteType_str, + @StateName_str, + @TagType_str, + @ValName_str, + @preserve_ortho, + @visualize, + @visualize!, + @visualize_noeval, + @visualize_noeval!, + @visualize_sequence, + @visualize_sequence_noeval, + AbstractMPS, + AbstractObserver, + Apply, + AutoMPO, + DMRGMeasurement, + DMRGObserver, + Lattice, + LatticeBond, + MPO, + MPS, + NoObserver, + Op, + OpName, + OpSum, + Ops, + Prod, + ProjMPO, + ProjMPOSum, + ProjMPO_MPS, + Scaled, + SiteType, + Spectrum, + StateName, + Sum, + Sweeps, + Trotter, + ValName, + add, + add!, + apply, + applyMPO, + applympo, + argsdict, + checkdone!, # remove export + coefficient, + common_siteind, + common_siteinds, + correlation_matrix, + cutoff, + cutoff!, # deprecate + disk, + dmrg, + dot, # remove export + eigs, # deprecate + energies, # deprecate + entropy, # deprecate + errorMPOprod, # deprecate + error_contract, + error_mpoprod, # deprecate + error_mul, # deprecate + expect, + findfirstsiteind, # deprecate + findfirstsiteinds, # deprecate + findsite, # deprecate + findsites, # deprecate + firstsiteind, # deprecate + firstsiteinds, # deprecate + get_cutoffs, # deprecate + get_maxdims, # deprecate + get_mindims, # deprecate + get_noises, # deprecate + has_fermion_string, # remove export + hassameinds, + inner, + isortho, + linkdim, + linkdims, + linkind, + linkindex, + linkinds, + logdot, + loginner, + lognorm, + lproj, + maxdim, + maxdim!, + maxlinkdim, + measure!, + measurements, + mindim, + mindim!, + movesite, + movesites, + mul, # deprecate + multMPO, + multmpo, + noise, + noise!, + noiseterm, + nsite, + nsweep, + op, + ops, + orthoCenter, + ortho_lims, + orthocenter, + orthogonalize, + orthogonalize!, + outer, + position!, + product, + primelinks!, + productMPS, + projector, + promote_itensor_eltype, + randomITensor, + randomMPO, + randomMPS, + replace_siteinds, + replace_siteinds!, + replacebond, + replacebond!, + replaceprime, + replacesites!, + reset_ortho_lims!, + rproj, + sample, + sample!, + set_leftlim!, + set_ortho_lims!, + set_rightlim!, + setcutoff!, + setmaxdim!, + setmindim!, + setnoise!, + simlinks!, + siteind, + siteindex, + siteinds, + splitblocks, + square_lattice, + state, + sum, + swapbondsites, + sweepnext, + tensors, + toMPO, + totalqn, + tr, + triangular_lattice, + truncate, + truncate!, + truncerror, + truncerrors, + unique_siteind, + unique_siteinds, + val, + ⋅ end diff --git a/test/Project.toml b/test/Project.toml index d1392c8..72cc60a 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,4 +1,5 @@ [deps] ITensorMPS = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2" ITensorTDVP = "25707e16-a4db-4a07-99d9-4d67b7af0342" +ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/test/runtests.jl b/test/runtests.jl index ba12a69..e2e07fa 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,21 +1,36 @@ @eval module $(gensym()) using ITensorMPS: ITensorMPS using ITensorTDVP: ITensorTDVP +using ITensors: ITensors +include( + joinpath( + pkgdir(ITensors), + "test", + "base", + "utils", + "TestITensorsExportedNames", + "TestITensorsExportedNames.jl", + ), +) using Test: @test, @testset @testset "ITensorMPS.jl" begin @testset "exports" begin @test issetequal( names(ITensorMPS), [ - :ITensorMPS, - # ITensorMPS reexports - :dmrg, + [ + :ITensorMPS, + ] # ITensorTDVP reexports - :TimeDependentSum, - :dmrg_x, - :linsolve, - :tdvp, - :to_vec, + [ + :TimeDependentSum, + :dmrg_x, + :linsolve, + :tdvp, + :to_vec, + ] + # ITensors.ITensorMPS reexports + TestITensorsExportedNames.ITENSORMPS_EXPORTED_NAMES ], ) end From 5f8a18b3f807e4cb86789a982d6c4f365b550d49 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Mon, 6 May 2024 09:46:19 -0400 Subject: [PATCH 08/12] Move export names list into package --- test/runtests.jl | 15 +- test/utils/TestITensorMPSExportedNames.jl | 165 ++++++++++++++++++++++ 2 files changed, 168 insertions(+), 12 deletions(-) create mode 100644 test/utils/TestITensorMPSExportedNames.jl diff --git a/test/runtests.jl b/test/runtests.jl index e2e07fa..aa759f2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,16 +2,7 @@ using ITensorMPS: ITensorMPS using ITensorTDVP: ITensorTDVP using ITensors: ITensors -include( - joinpath( - pkgdir(ITensors), - "test", - "base", - "utils", - "TestITensorsExportedNames", - "TestITensorsExportedNames.jl", - ), -) +include("utils/TestITensorMPSExportedNames.jl") using Test: @test, @testset @testset "ITensorMPS.jl" begin @testset "exports" begin @@ -29,8 +20,8 @@ using Test: @test, @testset :tdvp, :to_vec, ] - # ITensors.ITensorMPS reexports - TestITensorsExportedNames.ITENSORMPS_EXPORTED_NAMES + # ITensors and ITensors.ITensorMPS reexports + TestITensorMPSExportedNames.ITENSORMPS_EXPORTED_NAMES ], ) end diff --git a/test/utils/TestITensorMPSExportedNames.jl b/test/utils/TestITensorMPSExportedNames.jl new file mode 100644 index 0000000..b98d39c --- /dev/null +++ b/test/utils/TestITensorMPSExportedNames.jl @@ -0,0 +1,165 @@ +module TestITensorMPSExportedNames +const ITENSORMPS_EXPORTED_NAMES = [ + Symbol("@OpName_str"), + Symbol("@SiteType_str"), + Symbol("@StateName_str"), + Symbol("@TagType_str"), + Symbol("@ValName_str"), + Symbol("@preserve_ortho"), + Symbol("@visualize"), + Symbol("@visualize!"), + Symbol("@visualize_noeval"), + Symbol("@visualize_noeval!"), + Symbol("@visualize_sequence"), + Symbol("@visualize_sequence_noeval"), + :AbstractMPS, + :AbstractObserver, + :Apply, + :AutoMPO, + :DMRGMeasurement, + :DMRGObserver, + :ITensorMPS, + :Lattice, + :LatticeBond, + :MPO, + :MPS, + :NoObserver, + :Op, + :OpName, + :OpSum, + :Ops, + :Prod, + :ProjMPO, + :ProjMPOSum, + :ProjMPO_MPS, + :Scaled, + :SiteType, + :Spectrum, + :StateName, + :Sum, + :Sweeps, + :Trotter, + :ValName, + :add, + :add!, + :apply, + :applyMPO, + :applympo, + :argsdict, + :checkdone!, # remove export + :coefficient, + :common_siteind, + :common_siteinds, + :correlation_matrix, + :cutoff, + :cutoff!, # deprecate + :disk, + :dmrg, + :dot, # remove export + :eigs, # deprecate + :energies, # deprecate + :entropy, # deprecate + :errorMPOprod, # deprecate + :error_contract, + :error_mpoprod, # deprecate + :error_mul, # deprecate + :expect, + :findfirstsiteind, # deprecate + :findfirstsiteinds, # deprecate + :findsite, # deprecate + :findsites, # deprecate + :firstsiteind, # deprecate + :firstsiteinds, # deprecate + :get_cutoffs, # deprecate + :get_maxdims, # deprecate + :get_mindims, # deprecate + :get_noises, # deprecate + :has_fermion_string, # remove export + :hassameinds, + :inner, + :isortho, + :linkdim, + :linkdims, + :linkind, + :linkindex, + :linkinds, + :logdot, + :loginner, + :lognorm, + :lproj, + :maxdim, + :maxdim!, + :maxlinkdim, + :measure!, + :measurements, + :mindim, + :mindim!, + :movesite, + :movesites, + :mul, # deprecate + :multMPO, + :multmpo, + :noise, + :noise!, + :noiseterm, + :nsite, + :nsweep, + :op, + :ops, + :orthoCenter, + :ortho_lims, + :orthocenter, + :orthogonalize, + :orthogonalize!, + :outer, + :position!, + :product, + :primelinks!, + :productMPS, + :projector, + :promote_itensor_eltype, + :randomITensor, + :randomMPO, + :randomMPS, + :replace_siteinds, + :replace_siteinds!, + :replacebond, + :replacebond!, + :replaceprime, + :replacesites!, + :reset_ortho_lims!, + :rproj, + :sample, + :sample!, + :set_leftlim!, + :set_ortho_lims!, + :set_rightlim!, + :setcutoff!, + :setmaxdim!, + :setmindim!, + :setnoise!, + :simlinks!, + :siteind, + :siteindex, + :siteinds, + :splitblocks, + :square_lattice, + :state, + :sum, + :swapbondsites, + :sweepnext, + :tensors, + :toMPO, + :totalqn, + :tr, + :triangular_lattice, + :truncate, + :truncate!, + :truncerror, + :truncerrors, + :unique_siteind, + :unique_siteinds, + :val, + :⋅, +] +end From b455b73337bc153af48034d86eeeb855e2101060 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Mon, 6 May 2024 09:47:05 -0400 Subject: [PATCH 09/12] Format --- test/runtests.jl | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index aa759f2..a820021 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -9,17 +9,9 @@ using Test: @test, @testset @test issetequal( names(ITensorMPS), [ - [ - :ITensorMPS, - ] + [:ITensorMPS] # ITensorTDVP reexports - [ - :TimeDependentSum, - :dmrg_x, - :linsolve, - :tdvp, - :to_vec, - ] + [:TimeDependentSum, :dmrg_x, :linsolve, :tdvp, :to_vec] # ITensors and ITensors.ITensorMPS reexports TestITensorMPSExportedNames.ITENSORMPS_EXPORTED_NAMES ], From c32e2538d930f70c7f995b24e69d4c78390fdeb2 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Mon, 6 May 2024 09:53:01 -0400 Subject: [PATCH 10/12] Another export --- src/ITensorMPS.jl | 1 + test/utils/TestITensorMPSExportedNames.jl | 1 + 2 files changed, 2 insertions(+) diff --git a/src/ITensorMPS.jl b/src/ITensorMPS.jl index cbf5d20..c4bba68 100644 --- a/src/ITensorMPS.jl +++ b/src/ITensorMPS.jl @@ -41,6 +41,7 @@ const alternating_update_dmrg = ITensorTDVP.dmrg StateName, Sum, Sweeps, + TagType, # deprecate Trotter, ValName, add, diff --git a/test/utils/TestITensorMPSExportedNames.jl b/test/utils/TestITensorMPSExportedNames.jl index b98d39c..fab99cc 100644 --- a/test/utils/TestITensorMPSExportedNames.jl +++ b/test/utils/TestITensorMPSExportedNames.jl @@ -37,6 +37,7 @@ const ITENSORMPS_EXPORTED_NAMES = [ :Spectrum, :StateName, :Sum, + :TagType, # deprecate :Sweeps, :Trotter, :ValName, From eae5b484a33bb70570328d6b8efa8c0fe928d184 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Mon, 6 May 2024 09:55:47 -0400 Subject: [PATCH 11/12] Another export --- src/ITensorMPS.jl | 1 + test/utils/TestITensorMPSExportedNames.jl | 1 + 2 files changed, 2 insertions(+) diff --git a/src/ITensorMPS.jl b/src/ITensorMPS.jl index c4bba68..842d279 100644 --- a/src/ITensorMPS.jl +++ b/src/ITensorMPS.jl @@ -54,6 +54,7 @@ const alternating_update_dmrg = ITensorTDVP.dmrg coefficient, common_siteind, common_siteinds, + convert_leaf_eltype, # remove export correlation_matrix, cutoff, cutoff!, # deprecate diff --git a/test/utils/TestITensorMPSExportedNames.jl b/test/utils/TestITensorMPSExportedNames.jl index fab99cc..4b49657 100644 --- a/test/utils/TestITensorMPSExportedNames.jl +++ b/test/utils/TestITensorMPSExportedNames.jl @@ -51,6 +51,7 @@ const ITENSORMPS_EXPORTED_NAMES = [ :coefficient, :common_siteind, :common_siteinds, + :convert_leaf_eltype, # remove export :correlation_matrix, :cutoff, :cutoff!, # deprecate From 391e41a7132053f72ff87e4abceda34d6265b54b Mon Sep 17 00:00:00 2001 From: mtfishman Date: Mon, 6 May 2024 10:26:08 -0400 Subject: [PATCH 12/12] Delete comments from test export list --- test/utils/TestITensorMPSExportedNames.jl | 46 +++++++++++------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/test/utils/TestITensorMPSExportedNames.jl b/test/utils/TestITensorMPSExportedNames.jl index 4b49657..158a847 100644 --- a/test/utils/TestITensorMPSExportedNames.jl +++ b/test/utils/TestITensorMPSExportedNames.jl @@ -37,7 +37,7 @@ const ITENSORMPS_EXPORTED_NAMES = [ :Spectrum, :StateName, :Sum, - :TagType, # deprecate + :TagType, :Sweeps, :Trotter, :ValName, @@ -47,36 +47,36 @@ const ITENSORMPS_EXPORTED_NAMES = [ :applyMPO, :applympo, :argsdict, - :checkdone!, # remove export + :checkdone!, :coefficient, :common_siteind, :common_siteinds, - :convert_leaf_eltype, # remove export + :convert_leaf_eltype, :correlation_matrix, :cutoff, - :cutoff!, # deprecate + :cutoff!, :disk, :dmrg, - :dot, # remove export - :eigs, # deprecate - :energies, # deprecate - :entropy, # deprecate - :errorMPOprod, # deprecate + :dot, + :eigs, + :energies, + :entropy, + :errorMPOprod, :error_contract, - :error_mpoprod, # deprecate - :error_mul, # deprecate + :error_mpoprod, + :error_mul, :expect, - :findfirstsiteind, # deprecate - :findfirstsiteinds, # deprecate - :findsite, # deprecate - :findsites, # deprecate - :firstsiteind, # deprecate - :firstsiteinds, # deprecate - :get_cutoffs, # deprecate - :get_maxdims, # deprecate - :get_mindims, # deprecate - :get_noises, # deprecate - :has_fermion_string, # remove export + :findfirstsiteind, + :findfirstsiteinds, + :findsite, + :findsites, + :firstsiteind, + :firstsiteinds, + :get_cutoffs, + :get_maxdims, + :get_mindims, + :get_noises, + :has_fermion_string, :hassameinds, :inner, :isortho, @@ -98,7 +98,7 @@ const ITENSORMPS_EXPORTED_NAMES = [ :mindim!, :movesite, :movesites, - :mul, # deprecate + :mul, :multMPO, :multmpo, :noise,