|
| 1 | +# An introduction to tensor networks |
| 2 | + |
| 3 | +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 |
| 39 | +```math |
| 40 | +Z = \sum_{\sigma} e^{-\beta H(\sigma)} = \sum_{\sigma} \prod_{e \in E} T_e(\sigma_e) |
| 41 | +``` |
| 42 | +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 |
| 48 | +```math |
| 49 | +\max_{\sigma} H(\sigma) = \max_{\sigma} \sum_{e \in E} h_e(\sigma_e) |
| 50 | +``` |
| 51 | +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 | +The independent set problem on graph $G=(V, E)$ is characterized by the Hamiltonian |
| 55 | +```math |
| 56 | +H(\sigma) = U \sum_{(i, j) \in E} n_i n_j - \sum_{i \in V} n_i |
| 57 | +``` |
| 58 | +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. |
| 59 | +The partition function for an independent set problem is |
| 60 | +```math |
| 61 | +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} |
| 62 | +``` |
| 63 | + |
| 64 | +Let $x = e^{\beta}$, the partition function can be written as |
| 65 | +```math |
| 66 | +Z = \sum_{\sigma} \prod_{(i, j) \in E} B_{n_in_j} \prod_{i \in V} W_{n_i} |
| 67 | +``` |
| 68 | +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. |
| 69 | + |
| 70 | +The tensor network representation for the partition function is |
| 71 | +```math |
| 72 | +\mathcal{N}_{IS} = (\Lambda, \{B_{n_in_j} \mid (i, j)\in E\} \cup \{W_{n_i} \mid i\in \Lambda\}, \emptyset) |
| 73 | +``` |
| 74 | +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 |
| 75 | +```math |
| 76 | +W = \left(\begin{matrix} |
| 77 | + 1 \\ |
| 78 | + x |
| 79 | + \end{matrix}\right) |
| 80 | +``` |
| 81 | +where $x$ is a variable associated with $v$. |
| 82 | +```math |
| 83 | +B = \left(\begin{matrix} |
| 84 | +1 & 1\\ |
| 85 | +1 & 0 |
| 86 | +\end{matrix}\right). |
| 87 | +``` |
| 88 | + |
| 89 | +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. |
| 90 | + |
| 91 | +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]. |
| 92 | + |
| 93 | +An algebra can be defined by |
| 94 | +```math |
| 95 | +\begin{align*} |
| 96 | +\oplus &= \max\\ |
| 97 | +\otimes &= + |
| 98 | +\end{align*} |
| 99 | +``` |
| 100 | + |
| 101 | +[^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 |
| 102 | +[^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 |
0 commit comments