Skip to content

Commit 6912226

Browse files
mtfishmanclaude
andauthored
Remove EinExprs dependency (#327)
## Summary - **Breaking**: removes the `alg = "einexpr"` contraction sequence optimizer. Downstream users should switch to one of `"optimal"`, `"greedy"`, `"tree_sa"`, `"sa_bipartite"`, or `"kahypar_bipartite"` (all still dispatched through the OMEinsumContractionOrders extension). - Deletes the `ITensorNetworksEinExprsExt` weak-dep extension and drops `EinExprs` from both the root and `test/` Project.toml. - Removes the `alg = "einexpr"` cases (and the commented-out KaHyPar/einexpr block) from `test/test_contraction_sequence.jl`. - Bumps the version to `0.16.0` (minor bump for a pre-1.0 breaking change) and updates pinned `ITensorNetworks` compat in `test/`, `docs/`, and `examples/` Project.toml accordingly. --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b9fa26d commit 6912226

6 files changed

Lines changed: 4 additions & 76 deletions

File tree

Project.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ITensorNetworks"
22
uuid = "2919e153-833c-4bdc-8836-1ea460a35fc7"
3-
version = "0.15.27"
3+
version = "0.16.0"
44
authors = ["Matthew Fishman <mfishman@flatironinstitute.org>, Joseph Tindall <jtindall@flatironinstitute.org> and contributors"]
55

66
[workspace]
@@ -39,14 +39,12 @@ TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
3939
TupleTools = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6"
4040

4141
[weakdeps]
42-
EinExprs = "b1794770-133b-4de1-afb4-526377e9f4c5"
4342
GraphsFlows = "06909019-6f44-4949-96fc-b9d9aaa02889"
4443
OMEinsumContractionOrders = "6f22d1fd-8eed-4bb7-9776-e7d684900715"
4544
Observers = "338f10d5-c7f1-4033-a7d1-f9dec39bcaa0"
4645
TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2"
4746

4847
[extensions]
49-
ITensorNetworksEinExprsExt = "EinExprs"
5048
ITensorNetworksGraphsFlowsExt = "GraphsFlows"
5149
ITensorNetworksOMEinsumContractionOrdersExt = "OMEinsumContractionOrders"
5250
ITensorNetworksObserversExt = "Observers"
@@ -64,7 +62,6 @@ DataStructures = "0.18"
6462
Dictionaries = "0.4"
6563
Distributions = "0.25.86"
6664
DocStringExtensions = "0.9"
67-
EinExprs = "0.6.4, 0.7"
6865
Graphs = "1.8"
6966
GraphsFlows = "0.1.1"
7067
ITensors = "0.7, 0.8, 0.9"

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ path = ".."
1616
Documenter = "1.10"
1717
Graphs = "1"
1818
ITensorFormatter = "0.2.27"
19-
ITensorNetworks = "0.15"
19+
ITensorNetworks = "0.16"
2020
ITensors = "0.9"
2121
Literate = "2.20.1"
2222
NamedGraphs = "0.8.2"

examples/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ ITensorNetworks = "2919e153-833c-4bdc-8836-1ea460a35fc7"
55
path = ".."
66

77
[compat]
8-
ITensorNetworks = "0.15"
8+
ITensorNetworks = "0.16"

ext/ITensorNetworksEinExprsExt/ITensorNetworksEinExprsExt.jl

Lines changed: 0 additions & 53 deletions
This file was deleted.

test/Project.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
66
DataGraphs = "b5a273c3-7e6c-41f6-98bd-8d7f1525a36a"
77
Dictionaries = "85a47980-9c8c-11e8-2b9f-f7ca1fa99fb4"
88
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
9-
EinExprs = "b1794770-133b-4de1-afb4-526377e9f4c5"
109
Glob = "c27321d9-0574-5035-807b-f59d2c89b15c"
1110
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
1211
GraphsFlows = "06909019-6f44-4949-96fc-b9d9aaa02889"
@@ -43,12 +42,11 @@ Compat = "4.16"
4342
DataGraphs = "0.2.13"
4443
Dictionaries = "0.4.4"
4544
Distributions = "0.25.118"
46-
EinExprs = "0.6.8, 0.7"
4745
Glob = "1.3.1"
4846
Graphs = "1.12"
4947
GraphsFlows = "0.1.1"
5048
ITensorMPS = "0.3.6"
51-
ITensorNetworks = "0.15"
49+
ITensorNetworks = "0.16"
5250
ITensorPkgSkeleton = "0.3.42"
5351
ITensors = "0.7, 0.8, 0.9"
5452
KrylovKit = "0.8, 0.9, 0.10"

test/test_contraction_sequence.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
@eval module $(gensym())
2-
using EinExprs: Exhaustive, Greedy
32
using ITensorNetworks:
43
contraction_sequence, norm_sqr_network, random_tensornetwork, siteinds
54
using ITensors: ITensors, contract
@@ -25,18 +24,9 @@ using Test: @test, @testset
2524
res_tree_sa = contract(tn; sequence = seq_tree_sa)[]
2625
seq_sa_bipartite = contraction_sequence(tn; alg = "sa_bipartite")
2726
res_sa_bipartite = contract(tn; sequence = seq_sa_bipartite)[]
28-
seq_einexprs_exhaustive = contraction_sequence(
29-
tn; alg = "einexpr", optimizer = Exhaustive()
30-
)
31-
res_einexprs_exhaustive = contract(tn; sequence = seq_einexprs_exhaustive)[]
32-
seq_einexprs_greedy =
33-
contraction_sequence(tn; alg = "einexpr", optimizer = Greedy())
34-
res_einexprs_greedy = contract(tn; sequence = seq_einexprs_exhaustive)[]
3527
@test res_greedy res_optimal
3628
@test res_tree_sa res_optimal
3729
@test res_sa_bipartite res_optimal
38-
@test res_einexprs_exhaustive res_optimal
39-
@test res_einexprs_greedy res_optimal
4030

4131
if !Sys.iswindows()
4232
# KaHyPar doesn't work on Windows
@@ -50,10 +40,6 @@ using Test: @test, @testset
5040
Pkg.rm("KaHyPar"; io = devnull)
5141
res_kahypar_bipartite = contract(tn; sequence = seq_kahypar_bipartite)[]
5242
@test res_optimal res_kahypar_bipartite
53-
#These tests were leading to CI issues that need to be investigated
54-
# seq_einexprs_kahypar = contraction_sequence(tn; alg="einexpr", optimizer=HyPar())
55-
# res_einexprs_kahypar = contract(tn; sequence=seq_einexprs_kahypar)[]
56-
# @test res_einexprs_kahypar ≈ res_optimal
5743
end
5844
end
5945
end

0 commit comments

Comments
 (0)