You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* use `contraction_complexity` and deprecate `timespacereadwrite_complexity`
* clean up pluto notebook building
* bump version
* update
* fix-cuda onehot
Copy file name to clipboardExpand all lines: docs/src/performancetips.md
+13-7Lines changed: 13 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,11 +28,13 @@ It can remove all vertex tensors (vectors) before entering the contraction order
28
28
29
29
The returned object `problem` contains a field `code` that specifies the tensor network with optimized contraction order.
30
30
For an independent set problem, the optimal contraction time/space complexity is ``\sim 2^{{\rm tw}(G)}``, where ``{\rm tw(G)}`` is the [tree-width](https://en.wikipedia.org/wiki/Treewidth) of ``G``.
31
-
One can check the time, space and read-write complexity with the [`timespacereadwrite_complexity`](@ref) function.
31
+
One can check the time, space and read-write complexity with the [`contraction_complexity`](@ref) function.
32
32
33
33
```julia
34
-
julia>timespacereadwrite_complexity(problem)
35
-
(21.90683335864693, 17.0, 20.03588509836998)
34
+
julia>contraction_complexity(problem)
35
+
Time complexity (number of element-wise multiplications) =2^20.568850503058382
36
+
Space complexity (number of elements in the largest intermediate tensor) =2^16.0
37
+
Read-write complexity (number of element-wise read and write) =2^18.70474460304404
36
38
```
37
39
38
40
The return values are `log2` values of the number of multiplications, the number elements in the largest tensor during contraction and the number of read-write operations to tensor elements.
Copy file name to clipboardExpand all lines: examples/IndependentSet.jl
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -51,9 +51,8 @@ problem = IndependentSet(graph; optimizer=TreeSA());
51
51
# where ``{\rm tw(G)}`` is the [tree-width](https://en.wikipedia.org/wiki/Treewidth) of ``G`` (or `graph` in the code).
52
52
# We can check the time, space and read-write complexities by typing
53
53
54
-
timespacereadwrite_complexity(problem)
54
+
contraction_complexity(problem)
55
55
56
-
# The three return values are `log2` values of the the number of element-wise multiplication operations, the number elements in the largest tensor during contraction and the number of tensor element read-write operations.
57
56
# For more information about how to improve the contraction order, please check the [Performance Tips](@ref).
0 commit comments