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
Copy file name to clipboardExpand all lines: docs/src/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ solve(
41
41
Here the main function [`solve`](@ref) takes three input arguments, the problem instance of type [`IndependentSet`](@ref), the property instance of type [`GraphPolynomial`](@ref) and an optional key word argument `usecuda` to decide use GPU or not.
42
42
If one wants to use GPU to accelerate the computation, the `, CUDA` should be uncommented.
43
43
44
-
An [`IndependentSet`](@ref) instance takes two positional arguments to initialize, the graph instance that one wants to solve and the get_weights for each vertex. Here, we use a random regular graph with 20 vertices and degree 3, and the default uniform weight 1.
44
+
An [`IndependentSet`](@ref) instance takes two positional arguments to initialize, the graph instance that one wants to solve and the weights for each vertex. Here, we use a random regular graph with 20 vertices and degree 3, and the default uniform weight 1.
45
45
46
46
The [`GenericTensorNetwork`](@ref) function is a constructor for the problem instance, which takes the problem instance as the first argument and optional key word arguments. The key word argument `optimizer` is for specifying the tensor network optimization algorithm.
47
47
The keyword argument `openvertices` is a tuple of labels for specifying the degrees of freedom not summed over, and `fixedvertices` is a label-value dictionary for specifying the fixed values of the degree of freedoms.
Let $G = (V, E)$ be a hypergraph, where $V$ is the set of vertices and $E$ is the set of hyperedges. Each vertex $v \in V$ is associated with a local variable, e.g. "spin" and "bit". A hyperedge $e \in E$ is a subset of vertices $e \subseteq V$. On top of which, we can define a local Hamiltonian $H$ as a sum of local terms $h_e$ over all hyperedges $e \in E$:
4
+
5
+
```math
6
+
H(\sigma) = \sum_{e \in E} h_e(\sigma_e)
7
+
```
8
+
9
+
where $\sigma_e$ is the restriction of the configuration $\sigma$ to the vertices in $e$.
10
+
11
+
The following solution space properties are of interest:
12
+
13
+
* The partition function,
14
+
```math
15
+
Z = \sum_{\sigma} e^{-\beta H(\sigma)}
16
+
```
17
+
where $\beta$ is the inverse temperature.
18
+
* The maximum/minimum solution sizes,
19
+
```math
20
+
\max_{\sigma} H(\sigma), \min_{\sigma} H(\sigma)
21
+
```
22
+
* The number of solutions at certain sizes,
23
+
```math
24
+
N(k) = \sum_{\sigma} \delta(k, H(\sigma))
25
+
```
26
+
* The enumeration of solutions at certain sizes.
27
+
```math
28
+
S = \{ \sigma | H(\sigma) = k \}
29
+
```
30
+
* The direct sampling of solutions at certain sizes.
31
+
```math
32
+
\sigma \sim S
33
+
```
34
+
35
+
## Tensor network representation
36
+
37
+
### Partition function
38
+
It is well known that the partition function of an energy model can be represented as a tensor network[^Levin2007]. The partition function can be written in a sum-product form as
where $T_e(\sigma_e) = e^{-\beta h_e(\sigma_e)}$ is a tensor associated with the hyperedge $e$.
43
+
44
+
This sum-product form is directly related to a tensor network $(V, \{T_{\sigma_e} \mid e\in E\}, \emptyset)$, where $T_{\sigma_e}$ is a tensor labeled by $\sigma_e \subseteq V$, and its elements are defined by $T_{\sigma_e}= T_e(\sigma_e)$. $\emptyset$ is the set of open vertices in a tensor network, which are not summed over.
45
+
46
+
### Maximum/minimum solution sizes
47
+
The maximum/minimum solution sizes can be represented as a tensor network as well. The maximum solution size can be written as
which can be represented as a tropical tensor network[^Liu2021] $(V, \{h_{\sigma_e} \mid e\in E\}, \emptyset)$, where $h_{\sigma_e}$ is a tensor labeled by $\sigma_e \subseteq V$, and its elements are defined by $h_{\sigma_e}= h_e(\sigma_e)$.
52
+
53
+
## Problems
54
+
### Independent set problem
55
+
The independent set problem on graph $G=(V, E)$ is characterized by the Hamiltonian
where $n_i \in \{0, 1\}$ is a binary variable associated with vertex $i$, and $U\rightarrow \infty$ is a large constant. The goal is to find the maximum independent set, i.e. the maximum number of vertices such that no two vertices are connected by an edge.
60
+
The partition function for an independent set problem is
61
+
```math
62
+
Z = \sum_{\sigma} e^{-\beta H(\sigma)} = \sum_{\sigma} \prod_{(i, j) \in E} e^{-\beta U n_in_j} \prod_{i \in V} e^{\beta n_i}
63
+
```
64
+
65
+
Let $x = e^{\beta}$, the partition function can be written as
where $B_{n_in_j} = \lim_{U \rightarrow \infty} e^{-U \beta n_in_j}=\begin{cases}0, \quad n_in_j = 1\\1,\quad n_in_j = 0\end{cases}$ and $W_{n_i} = x^{n_i}$ are tensors associated with the hyperedge $(i, j)$ and the vertex $i$, respectively.
70
+
71
+
The tensor network representation for the partition function is
where $\Lambda = \{n_i \mid i \in V\}$ is the set of binary variables, $B_{n_in_j}$ is a tensor associated with the hyperedge $(i, j)$ and $W_{n_i}$ is a tensor associated with the vertex $i$. The tensors are defined as
76
+
```math
77
+
W = \left(\begin{matrix}
78
+
1 \\
79
+
x
80
+
\end{matrix}\right)
81
+
```
82
+
where $x$ is a variable associated with $v$.
83
+
```math
84
+
B = \left(\begin{matrix}
85
+
1 & 1\\
86
+
1 & 0
87
+
\end{matrix}\right).
88
+
```
89
+
90
+
The contraction of the tensor network $\mathcal{N}_{IS}$ gives the partition function $Z$. It is implicitly assumed that the tensor elements are real numbers.
91
+
92
+
However, by replacing the tensor elements with tropical numbers, the tensor network $\mathcal{N}_{IS}$ can be used to compute the maximum independent set size and its degeneracy[^Liu2021].
93
+
94
+
An algebra can be defined by
95
+
```math
96
+
\begin{align*}
97
+
\oplus &= \max\\
98
+
\otimes &= +
99
+
\end{align*}
100
+
```
101
+
102
+
[^Levin2007]: Levin, M., Nave, C.P., 2007. Tensor renormalization group approach to two-dimensional classical lattice models. Physical Review Letters 99, 1–4. https://doi.org/10.1103/PhysRevLett.99.120601
103
+
[^Liu2021]: Liu, J.-G., Wang, L., Zhang, P., 2021. Tropical Tensor Network for Ground States of Spin Glasses. Phys. Rev. Lett. 126, 090506. https://doi.org/10.1103/PhysRevLett.126.090506
# The only solution space property that can not be defined for general real-weighted (not including integer-weighted) graphs is the [`GraphPolynomial`](@ref).
28
28
29
-
# For the weighted MIS problem, a useful solution space property is the "energy spectrum", i.e. the largest several configurations and their get_weights.
30
-
# We can use the solution space property is [`SizeMax`](@ref)`(10)` to compute the largest 10 get_weights.
29
+
# For the weighted MIS problem, a useful solution space property is the "energy spectrum", i.e. the largest several configurations and their weights.
30
+
# We can use the solution space property is [`SizeMax`](@ref)`(10)` to compute the largest 10 weights.
31
31
spectrum =solve(problem, SizeMax(10))[]
32
32
33
33
# The return value has type [`ExtendedTropical`](@ref), which contains one field `orders`.
0 commit comments