A matrix has two indices. Consider a
A matrix of size
A matrix of size
When we use index notation,
- The index before the comma "," is the row-index.
- The index after the comma "," is the column-index.
- The size
$D_1 \times D_2$ is the shape$(D_1, D_2)$ of the matrix.
A rank-N tensor or N-dimensional array
$$
A_{i_1 i_2 i_3 \cdots i_N}.
$$
Its shape
In order to map naturally a rank-N tensor to a matrix we put a comma "," among the indices. A rank-N tensor with
Note that the
For example,
- A rank-2 tensor with shape (1, D) represents a row vector, with entries
$A_{0,i}$ . - A rank-2 tensor with shape (D, 1) represents a column vector.
We can combined several (subsequent) indices into a single combined index. Consider three indices
We use the following convention: For
- $ (0,0,0) \rightarrow 0$
- $ (0,0,1) \rightarrow 1$
- $ (0,1,0) \rightarrow 2$
- $ (0,1,1) \rightarrow 3$
- $ (1,0,0) \rightarrow 4$
- $ (1,0,0) \rightarrow 5$
- $ (1,1,0) \rightarrow 6$
- $ (1,1,1) \rightarrow 7$
We represent a rank-2 tensor
┏━━━╳━━━┓
i─┨ A ┠─j
┗━━━━━━━┛
We put the name of the tensor at the centor of the box. If we want to specific the shape information, we can put them inside the box near the bond.
┏━━━━╳━━━━┓
i─┨Di A Dj┠─j
┗━━━━━━━━━┛
The ╳ on top is to break the rotational symmetry. So that even if we rotate the figure, it still uniquely represents the same tensor and will not be confused with its transpose.
┏━━━╳━━━┓ ┏━━━━━━━┓
i─┨ A ┠─j = j─┨ A ┠─i
┗━━━━━━━┛ ┗━━━╳━━━┛
When a line connects two tensors, it implies a summation. So the following figure corresponds to
┏━━━╳━━━┓ ┏━━━╳━━━┓
i─┨ A ┠──j──┨ B ┠─j
┗━━━━━━━┛ ┗━━━━━━━┛
Actually, we can remove the dummy index and represent
┏━━━╳━━━┓ ┏━━━╳━━━┓ ┏━━━╳━━━┓
─┨ C ┠─ = ─┨ A ┠──┨ B ┠─
┗━━━━━━━┛ ┗━━━━━━━┛ ┗━━━━━━━┛
Introduction to tensor Network
# 0
# ┌─────┘
# │ ┏━━━╳━━━┓
# └─┨d MT0 d┠─┐
# ┗━━━━━━━┛ │ 0
# ┌────100────┘ ┌─────┘
# │ ┏━━━╳━━━┓ │ ┏━━━╳━━━━┓
# ┏━━━╳━━━┓ └─┨d ┃ ┏━━━╳━━━┓ └─┨d ┃
# 1──┨d MT1 d┠─101──┨d T d┠──102─┨d M2 d┠──2 = 1 ────┨d TOUT d┠──── 2
# ┗━━━━━━━┛ ┃ d┠─┐ ┗━━━━━━━┛ ┃ d┠─┐
# ┗━━━━━━━┛ │ ┗━━━━━━━━┛ │
# ┌────103────┘ ┌──────┘
# │ ┏━━━╳━━━┓ 3
# └─┨d M3 d┠─┐
# ┗━━━━━━━┛ │
# ┌─────┘
# 3