From cb24efdf35addcea056f2027dc416338bfcae9d2 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Tue, 22 Oct 2024 17:12:04 -0400 Subject: [PATCH] Delete unneeded extensions --- Project.toml | 8 ------ .../ITensorsObserversExt.jl | 11 -------- .../ITensorsPackageCompilerExt.jl | 3 -- ext/ITensorsPackageCompilerExt/compile.jl | 26 ----------------- .../precompile_itensors.jl | 28 ------------------- 5 files changed, 76 deletions(-) delete mode 100644 ext/ITensorsObserversExt/ITensorsObserversExt.jl delete mode 100644 ext/ITensorsPackageCompilerExt/ITensorsPackageCompilerExt.jl delete mode 100644 ext/ITensorsPackageCompilerExt/compile.jl delete mode 100644 ext/ITensorsPackageCompilerExt/precompile_itensors.jl diff --git a/Project.toml b/Project.toml index bdb339d633..7f3d26e596 100644 --- a/Project.toml +++ b/Project.toml @@ -31,15 +31,11 @@ Zeros = "bd1ec220-6eb4-527a-9b49-e79c3db6233b" [weakdeps] HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" -Observers = "338f10d5-c7f1-4033-a7d1-f9dec39bcaa0" -PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" VectorInterface = "409d34a3-91d5-4945-b6ec-7529ddf182d8" ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444" [extensions] ITensorsHDF5Ext = "HDF5" -ITensorsObserversExt = "Observers" -ITensorsPackageCompilerExt = "PackageCompiler" ITensorsVectorInterfaceExt = "VectorInterface" ITensorsZygoteRulesExt = "ZygoteRules" @@ -57,8 +53,6 @@ KrylovKit = "0.4.2, 0.5, 0.6, 0.7, 0.8" LinearAlgebra = "1.6" LinearMaps = "3" NDTensors = "0.3.34" -Observers = "0.2" -PackageCompiler = "1, 2" PackageExtensionCompat = "1" Pkg = "1.6" Printf = "1.6" @@ -78,7 +72,5 @@ julia = "1.10" [extras] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" -Observers = "338f10d5-c7f1-4033-a7d1-f9dec39bcaa0" -PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" VectorInterface = "409d34a3-91d5-4945-b6ec-7529ddf182d8" ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444" diff --git a/ext/ITensorsObserversExt/ITensorsObserversExt.jl b/ext/ITensorsObserversExt/ITensorsObserversExt.jl deleted file mode 100644 index f5829b99be..0000000000 --- a/ext/ITensorsObserversExt/ITensorsObserversExt.jl +++ /dev/null @@ -1,11 +0,0 @@ -module ITensorsObserversExt - -using Observers: Observers -using Observers.DataFrames: AbstractDataFrame -using ITensors.ITensorMPS: ITensorMPS - -function ITensorMPS.update_observer!(observer::AbstractDataFrame; kwargs...) - return Observers.update!(observer; kwargs...) -end - -end diff --git a/ext/ITensorsPackageCompilerExt/ITensorsPackageCompilerExt.jl b/ext/ITensorsPackageCompilerExt/ITensorsPackageCompilerExt.jl deleted file mode 100644 index 3bb7b57ac1..0000000000 --- a/ext/ITensorsPackageCompilerExt/ITensorsPackageCompilerExt.jl +++ /dev/null @@ -1,3 +0,0 @@ -module ITensorsPackageCompilerExt -include("compile.jl") -end diff --git a/ext/ITensorsPackageCompilerExt/compile.jl b/ext/ITensorsPackageCompilerExt/compile.jl deleted file mode 100644 index 5d08011abd..0000000000 --- a/ext/ITensorsPackageCompilerExt/compile.jl +++ /dev/null @@ -1,26 +0,0 @@ -using NDTensors: @Algorithm_str -using ITensors: ITensors -using PackageCompiler: PackageCompiler - -function ITensors.compile( - ::Algorithm"PackageCompiler"; - dir::AbstractString=ITensors.default_compile_dir(), - filename::AbstractString=ITensors.default_compile_filename(), -) - if !isdir(dir) - println("""The directory "$dir" doesn't exist yet, creating it now.""") - println() - mkdir(dir) - end - path = joinpath(dir, filename) - println( - """Creating the system image "$path" containing the compiled version of ITensors. This may take a few minutes.""", - ) - PackageCompiler.create_sysimage( - :ITensors; - sysimage_path=path, - precompile_execution_file=joinpath(@__DIR__, "precompile_itensors.jl"), - ) - println(ITensors.compile_note(; dir, filename)) - return path -end diff --git a/ext/ITensorsPackageCompilerExt/precompile_itensors.jl b/ext/ITensorsPackageCompilerExt/precompile_itensors.jl deleted file mode 100644 index 4d5d639359..0000000000 --- a/ext/ITensorsPackageCompilerExt/precompile_itensors.jl +++ /dev/null @@ -1,28 +0,0 @@ -using ITensors.ITensorMPS: MPO, OpSum, dmrg, random_mps, siteinds - -# TODO: This uses all of the tests to make -# precompile statements, but takes a long time -# (e.g. 700 seconds). -# Try again with later versions of PackageCompiler -# -# include(joinpath(joinpath(dirname(dirname(@__DIR__)), -# test"), -# "runtests.jl")) - -function main(; N, dmrg_kwargs) - opsum = OpSum() - for j in 1:(N - 1) - opsum += 0.5, "S+", j, "S-", j + 1 - opsum += 0.5, "S-", j, "S+", j + 1 - opsum += "Sz", j, "Sz", j + 1 - end - for conserve_qns in (false, true) - sites = siteinds("S=1", N; conserve_qns) - H = MPO(opsum, sites) - ψ0 = random_mps(sites, j -> isodd(j) ? "↑" : "↓"; linkdims=2) - dmrg(H, ψ0; outputlevel=0, dmrg_kwargs...) - end - return nothing -end - -main(; N=6, dmrg_kwargs=(; nsweeps=3, maxdim=10, cutoff=1e-13))