From ca8a23cbbd10547568e48336097facbf1bbc2391 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Wed, 23 Oct 2024 12:39:49 -0400 Subject: [PATCH] Fix more tests --- Project.toml | 8 ++++++++ ext/ITensorMPSHDF5Ext/ITensorMPSHDF5Ext.jl | 2 +- ext/ITensorMPSHDF5Ext/mpo.jl | 2 +- ext/ITensorMPSHDF5Ext/mps.jl | 2 +- .../ITensorMPSPackageCompilerExt.jl | 2 +- .../ITensorMPSZygoteRulesExt.jl | 2 +- test/Project.toml | 1 + test/base/test_solvers/test_exports.jl | 10 ---------- 8 files changed, 14 insertions(+), 15 deletions(-) delete mode 100644 test/base/test_solvers/test_exports.jl diff --git a/Project.toml b/Project.toml index 3064cac..62c9bf7 100644 --- a/Project.toml +++ b/Project.toml @@ -19,9 +19,17 @@ TupleTools = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" [weakdeps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" +Observers = "338f10d5-c7f1-4033-a7d1-f9dec39bcaa0" +PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" +ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444" [extensions] ITensorMPSChainRulesCoreExt = "ChainRulesCore" +ITensorMPSHDF5Ext = "HDF5" +ITensorMPSObserversExt = "Observers" +ITensorMPSPackageCompilerExt = "PackageCompiler" +ITensorMPSZygoteRulesExt = ["ChainRulesCore", "ZygoteRules"] [compat] Adapt = "4.1.0" diff --git a/ext/ITensorMPSHDF5Ext/ITensorMPSHDF5Ext.jl b/ext/ITensorMPSHDF5Ext/ITensorMPSHDF5Ext.jl index 6848f2f..db65136 100644 --- a/ext/ITensorMPSHDF5Ext/ITensorMPSHDF5Ext.jl +++ b/ext/ITensorMPSHDF5Ext/ITensorMPSHDF5Ext.jl @@ -1,4 +1,4 @@ -module ITensorsHDF5Ext +module ITensorMPSHDF5Ext include("mps.jl") include("mpo.jl") end diff --git a/ext/ITensorMPSHDF5Ext/mpo.jl b/ext/ITensorMPSHDF5Ext/mpo.jl index 722d0be..90a53a0 100644 --- a/ext/ITensorMPSHDF5Ext/mpo.jl +++ b/ext/ITensorMPSHDF5Ext/mpo.jl @@ -1,6 +1,6 @@ using HDF5: HDF5, attributes, create_group, open_group, read, write using ITensors: ITensor -using ITensors.ITensorMPS: MPO +using ITensorMPS: MPO function HDF5.write(parent::Union{HDF5.File,HDF5.Group}, name::AbstractString, M::MPO) g = create_group(parent, name) diff --git a/ext/ITensorMPSHDF5Ext/mps.jl b/ext/ITensorMPSHDF5Ext/mps.jl index 45e479e..619a381 100644 --- a/ext/ITensorMPSHDF5Ext/mps.jl +++ b/ext/ITensorMPSHDF5Ext/mps.jl @@ -1,6 +1,6 @@ using HDF5: HDF5, attributes, create_group, open_group, read, write using ITensors: ITensor -using ITensors.ITensorMPS: MPS +using ITensorMPS: MPS function HDF5.write(parent::Union{HDF5.File,HDF5.Group}, name::AbstractString, M::MPS) g = create_group(parent, name) diff --git a/ext/ITensorMPSPackageCompilerExt/ITensorMPSPackageCompilerExt.jl b/ext/ITensorMPSPackageCompilerExt/ITensorMPSPackageCompilerExt.jl index 3bb7b57..0310dc7 100644 --- a/ext/ITensorMPSPackageCompilerExt/ITensorMPSPackageCompilerExt.jl +++ b/ext/ITensorMPSPackageCompilerExt/ITensorMPSPackageCompilerExt.jl @@ -1,3 +1,3 @@ -module ITensorsPackageCompilerExt +module ITensorMPSPackageCompilerExt include("compile.jl") end diff --git a/ext/ITensorMPSZygoteRulesExt/ITensorMPSZygoteRulesExt.jl b/ext/ITensorMPSZygoteRulesExt/ITensorMPSZygoteRulesExt.jl index 3101f6b..f79322b 100644 --- a/ext/ITensorMPSZygoteRulesExt/ITensorMPSZygoteRulesExt.jl +++ b/ext/ITensorMPSZygoteRulesExt/ITensorMPSZygoteRulesExt.jl @@ -1,6 +1,6 @@ module ITensorMPSZygoteRulesExt using ChainRulesCore: ChainRulesCore -using ITensors.ITensorMPS: MPO, MPS +using ITensorMPS: MPO, MPS using ZygoteRules: @adjoint # Needed for defining the rule for `adjoint(A::ITensor)` diff --git a/test/Project.toml b/test/Project.toml index 4847655..ca4d25b 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -10,6 +10,7 @@ KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" NDTensors = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf" Observers = "338f10d5-c7f1-4033-a7d1-f9dec39bcaa0" OptimKit = "77e91f04-9b3b-57a6-a776-40b61faaebe0" +OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a" StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" diff --git a/test/base/test_solvers/test_exports.jl b/test/base/test_solvers/test_exports.jl deleted file mode 100644 index ab457cd..0000000 --- a/test/base/test_solvers/test_exports.jl +++ /dev/null @@ -1,10 +0,0 @@ -@eval module $(gensym()) -using ITensorTDVP: ITensorTDVP -using Test: @test, @testset -@testset "Test exports" begin - @test issetequal( - names(ITensorTDVP), - [:ITensorTDVP, :TimeDependentSum, :dmrg_x, :expand, :linsolve, :tdvp, :to_vec], - ) -end -end