Commit 04b80c5
Remove approximate-contract (density_matrix / ttn_svd) algorithms (#329)
## Summary
Delete the entire `src/contract_approx/` module (8 files, ~1200 lines)
and the dead `ITensorNetworksGraphsFlowsExt` extension that only served
it.
**Breaking:**
- `contract(tn; alg = "density_matrix")` and `contract(tn; alg =
"ttn_svd")` are removed.
- The `contract_approx` function and all of its supporting machinery
(`path_graph_structure`, `binary_tree_structure`, `_partition`,
`_mincut_partitions`, `_contract_deltas`, `_rem_leaf_vertices!`, …) are
gone.
- `GraphsFlows` is no longer a weak-dep / extension trigger of
`ITensorNetworks`. It remains a direct test-time dep for the graph
mincut test in `test/test_itensornetwork.jl`.
**What stays:**
- `contract(tn; alg = "exact")` and the rest of the contraction pipeline
(TensorOperations / OMEinsumContractionOrders extensions) are
unaffected.
**Incidental import cleanups**
A few imports were previously available inside `ITensorNetworks` as a
side effect of `using` clauses in `src/contract_approx/*.jl`. They are
now imported directly by the files that actually use them:
- `Graphs: rem_vertex!` —
`src/treetensornetworks/opsum_to_ttn/opsum_to_ttn.jl`
- `ITensors: inds` — `src/abstractitensornetwork.jl`
- `ITensors: noncommoninds` — `src/apply.jl`
- `NamedGraphs.GraphsExtensions: disjoint_union` —
`src/formnetworks/linearformnetwork.jl`,
`src/formnetworks/bilinearformnetwork.jl`
**Version**
Bumps to `0.17.0` (pre-1.0 minor bump = breaking) and updates pinned
`ITensorNetworks` compat in `test/`, `docs/`, and `examples/`
Project.toml.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6912226 commit 04b80c5
22 files changed
Lines changed: 10 additions & 1328 deletions
File tree
- docs
- examples
- ext/ITensorNetworksGraphsFlowsExt
- src
- contract_approx
- formnetworks
- treetensornetworks/opsum_to_ttn
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | | - | |
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
| |||
63 | 61 | | |
64 | 62 | | |
65 | 63 | | |
66 | | - | |
67 | 64 | | |
68 | 65 | | |
69 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
Lines changed: 0 additions & 19 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 16 | | |
25 | 17 | | |
26 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 23 | | |
33 | 24 | | |
34 | 25 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments