Skip to content

Commit 10a39d5

Browse files
committed
proofread implementation
1 parent ce1e6b8 commit 10a39d5

1 file changed

Lines changed: 22 additions & 25 deletions

File tree

docs/src/man/implementation.md

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
# [Symmetric tensor networks: $\mathsf{Rep(A_4)}$ as a guiding example](@id implementation)
22
This tutorial is dedicated to explaining how MultiTensorKit was implemented to be compatible with with TensorKit and MPSKit for matrix product state simulations.
3+
This section should be largely self-contained and is meant to be a practical guide to using MultiTensorKit.
34
In particular, we will be making a generalised anyonic spin chain.
45
We will demonstrate how to reproduce the entanglement spectra found in [Lootens_2024](@cite).
56
The model considered there is a spin-1 Heisenberg model with additional terms to break the usual $\mathsf{U_1}$ symmetry to $\mathsf{Rep(A_4)}$, while having a non-trivial phase diagram and relatively easy Hamiltonian to write down.
67

78
This will be done with the `A4Object = BimoduleSector{A4}` `Sector`, which is the multifusion category which contains the structure of the module categories over $\mathsf{Rep(A_4)}$.
89
Since there are 7 module categories, `A4Object` is a $r=7$ multifusion category.
910
There are 3 fusion categories up to equivalence:
10-
- ``\mathsf{Vec_{A_4}}``: the category of $\mathsf{A_4}$-graded vector spaces.
11-
The group $\mathsf{A}_4$ is order $4!/2 = 12$.
12-
It has thus 12 objects.
13-
- ``\mathsf{Rep(A_4)}``: the irreducible representations of the group $\mathsf{A}_4$, of which there are 4.
14-
One is the trivial representation, two are one-dimensional non-trivial and the last is three-dimensional.
15-
- ``\mathsf{Rep(H)}``: the representation category of some Hopf algebra which does not have a name.
16-
It has 6 simple objects.
11+
- ``\mathsf{Vec_{A_4}}``: the category of $\mathsf{A_4}$-graded vector spaces. The group $\mathsf{A}_4$ is order $4!/2 = 12$ and has thus 12 simple objects.
12+
- ``\mathsf{Rep(A_4)}``: the irreducible representations of the group $\mathsf{A}_4$, of which there are 4. One is the trivial representation, two are one-dimensional non-trivial and the last is three-dimensional.
13+
- ``\mathsf{Rep(H)}``: the representation category of some Hopf algebra which does not have a name. It has 6 simple objects.
1714

1815
For this example, we will require the following packages:
1916
````julia
@@ -37,11 +34,11 @@ Thus, the 7 module categories $\mathcal{M}$ one can choose over $\mathsf{Rep(A_4
3734
When referring to specific fusion and module categories, we will use this non-multifusion notation.
3835

3936
Now that we have identified the fusion and module categories, we want to select the relevant objects we wish to place in our graded spaces.
40-
Unfortunately, due to the nature of how the N-symbol and F-symbol data are generated, the objects of the fusion subcategories are not ordered such that `label=1` corresponds to the unit object.
37+
Unfortunately, due to the nature of how the N-symbol and F-symbol data are generated, the objects of the fusion subcategories are not ordered such that `label = 1` corresponds to the unit object.
4138
Hence, the simplest way to find the unit object of a fusion subcategory is
4239

4340
````julia
44-
unit(A4Object(i,i,1))
41+
unit(A4Object(i, i, 1))
4542
````
4643

4744
Left and right units of subcategories are uniquely specified by their fusion rules.
@@ -64,8 +61,8 @@ $$^{}_a \mathbb{1} \in a \times a^* \quad \text{and} \quad \mathbb{1}_a \in a^*
6461

6562
with multiplicity 1.
6663
## Constructing the Hamiltonian and matrix product state
67-
TensorKit has been made compatible with the multifusion structure by keeping track of the relevant units in the fusion tree manipulations.
68-
With this, we can make `GradedSpace`s whose objects are in `A4Object`:
64+
TensorKit has been made compatible with the multifusion structure.
65+
With this, we can make `GradedSpace`s whose objects are in `A4Object`:
6966

7067
````julia
7168
D1 = A4Object(6, 6, 1) # unit in this case
@@ -120,17 +117,17 @@ and construct the finite MPS:
120117
D = 40 # bond dimension
121118
V = Vect[A4Object](M => D)
122119
Vb = Vect[A4Object](M => 1) # non-degenerate boundary virtual space
123-
init_mps = FiniteMPS(L, P, V; left=Vb, right=Vb)
120+
init_mps = FiniteMPS(L, P, V; left = Vb, right = Vb)
124121
````
125122

126123
!!! warning "Important"
127124
We must pass on a left and right virtual space to the keyword arguments `left` and `right` of the `FiniteMPS` constructor, since these would by default try to place a trivial space of the `Sector`, which does not exist for any `BimoduleSector` due to the semisimple unit.
128125

129-
## DMRG2 and the entanglement spectrum
126+
## Two-site DMRG and the entanglement spectrum
130127
We can now look to find the ground state of the Hamiltonian with two-site DMRG.
131-
We use this instead of the "usual" one-site DMRG because the two-site one will smartly fill up the blocks of the local tensor during the sweep, allowing one to initialise as a product state in one block and more likely avoid local minima, a common occurence in symmetric tensor network simulations.
128+
We use this instead of the "usual" one-site DMRG because the two-site algorithm will smartly fill up the blocks of the local tensor during the sweep, allowing one to initialise as a product state in one block and more likely avoid local minima, a common occurence in symmetric tensor network simulations.
132129
````julia
133-
dmrg2alg = DMRG2(;verbosity=2, tol=1e-7, trscheme=truncbelow(1e-4))
130+
dmrg2alg = DMRG2(; verbosity = 2, tol = 1e-7, trscheme = truncbelow(1e-4))
134131
ψ, _ = find_groundstate(init_mps, H, dmrg2alg)
135132
````
136133
The truncation scheme keyword argument is mandatory when calling `DMRG2` in MPSKit.
@@ -146,49 +143,49 @@ This returns a dictionary which maps the objects grading the virtual space to th
146143
In this case, there is one key corresponding to $\mathsf{Vec}$.
147144
We can also immediately return a plot of this data by the following:
148145
````julia
149-
entanglementplot(ψ;site=round(Int, L/2))
146+
entanglementplot(ψ; site = round(Int, L/2))
150147
````
151-
This plot will show the singular values per object, as well as include the "effective" bond dimension, which is simply the dimension of the virtual space where we cut the system.
148+
This plot will show the singular values per simple object, as well as include the "effective" bond dimension, which is simply the dimension of the virtual space where we cut the system.
152149
The next section will show this plot along with those when selecting the other module categories.
153150

154151
## Search for the correct dual model
155152

156-
Consider a quantum lattice model with its symmetries determing the phase diagram.
153+
Consider a quantum lattice model with its symmetries determining the phase diagram.
157154
For every phase in the phase diagram, the dual model for which the ground state maximally breaks all symmetries spontaneously is the one where the entanglement is minimised and the tensor network is represented most efficiently [Lootens_2024](@cite).
158-
Let us confirm this result, starting with the $\mathsf{Rep(A_4)}$ spontaneous symmetry breaking phase.
155+
Let us confirm this result, starting with the $A_4$-symmetric phase whose ideal dual model is in the $\mathsf{Rep(A_4)}$ spontaneous symmetry breaking phase.
159156
The code will look exactly the same as above, except the virtual space of the MPS will change to be graded by the other module categories:
160157

161158
````julia
162159
module_numlabels(i) = MultiTensorKit._numlabels(A4Object, i, 6)
163160
V = Vect[A4Object]((i, 6, label) => D for label in 1:module_numlabels(i))
164161
Vb = Vect[A4Object](first(sectors(V)) => 1) # not all charges on boundary, play around with what is there
165162
````
166-
163+
#TODO: fix the figure
167164
```@raw html
168165
<img src="../img/A4_sym_entanglement_spectrum.svg" alt="" width="90%"/>
169166
```
170167

171-
The plot shows the entanglement spectra of the various dual models in the middle of the ground state for the original Hamiltonian probing the $\mathsf{Rep(A_4)}$-symmetric phase, along with the ground state without symmetries.
168+
The plot shows the entanglement spectra of the various dual models in the middle of the ground state for the original Hamiltonian probing the $A_4$-symmetric phase, along with the ground state without symmetries.
172169
Every subtitle also mentions the memory required to store the same middle ground state tensor.
173170
This plot should be compared to [Lootens_2024; Figure 2](@cite).
174171

175172
This can be repeated with other parameter values for $J_1$ and $J_2$ in the Hamiltonian to probe the $\mathsf{Rep(\mathbb{Z}_2 \times \mathbb{Z}_2)}$-symmetric or $\mathsf{Rep^\psi(A_4)}$ SPT phase.
176173

177174
!!! note "Additional functions and keyword arguments"
178175
Certain commonly used functions within MPSKit require extra keyword arguments to be compatible with multifusion MPS simulations.
179-
In particular, the keyword argument `sector` (note the lowercase "s") appears in
176+
In particular, the keyword argument `sector` (note the lowercase "s") appears in
180177
- `excitations` with `QuasiparticleAnsatz`: the sector is selected by adding an auxiliary space to the *domain* of each eigenvector of the transfer matrix.
181-
Since in a full contraction the domain of the eigenvector lies in the opposite side of the physical space (labeled by objects in $\mathcal{D} = \mathsf{Rep(A_4)}$), the charged excitations lie in the symmetry category $\mathcal{C} = \mathcal{D^*_M}$.
178+
Since in a full contraction the domain of the eigenvector lies in the opposite side of the physical space (labeled by objects in $\mathcal{D} = \mathsf{Rep(A_4)}$), the charged excitations lie in the symmetry category $\mathcal{C} = \mathcal{D^*_M}$.
182179
- `exact_diagonalization`: the `sector` keyword argument now requires an object in $\mathcal{D}$, since this is the fusion category which specifies the bond algebra from which the Hamiltonian is constructed.
183-
This is equivalent to adding a charged leg on the leftmost (or rightmost) virtual space of the MPS in conventional MPS cases.
180+
This is equivalent to adding a charged leg on the leftmost (or rightmost) virtual space of the MPS in conventional MPS cases.
184181

185182
## Differences with the infinite case
186183
We can repeat the above calcalations also for an infinite system.
187184
The `lattice` variable will change, as well as the MPS constructor and the algorithm:
188185
````julia
189186
lattice = InfiniteChain(1)
190187
init = InfiniteMPS([P], [V])
191-
inf_alg = VUMPS(; verbosity=2, tol=1e-7)
188+
inf_alg = VUMPS(; verbosity = 2, tol = 1e-7)
192189
````
193190

194191
Besides `VUMPS`, `IDMRG` and `IDMRG2` are as easy to run with the `A4Object` `BimoduleSector`.

0 commit comments

Comments
 (0)