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/man/implementation.md
+17-35Lines changed: 17 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
explain the f-symbol and n-symbol storage system
2
2
3
-
# MultiTensorKit implementation: $\mathsf{Rep(A_4)}$ as an example
3
+
# MultiTensorKit implementation: $\mathsf{Rep(A_4)}$ as a guiding example
4
4
This tutorial is dedicated to explaining how MultiTensorKit was implemented to be compatible with with TensorKit and MPSKit for matrix product state simulations. In particular, we will be making a generalised anyonic spin chain. We will demonstrate how to reproduce the entanglement spectra found in [Lootens_2024](@cite). 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.
5
5
6
6
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)}$. Since there are 7 module categories, `A4Object` is a $r=7$ multifusion category. There are 3 fusion categories up to equivalence:
@@ -10,7 +10,7 @@ This will be done with the `A4Object = BimoduleSector{A4}` `Sector`, which is th
10
10
11
11
For this example, we will require the following packages:
12
12
````julia
13
-
using TensorKit, MultiTensorKit, MPSKit, MPSKitModels
13
+
using TensorKit, MultiTensorKit, MPSKit, MPSKitModels, Plots
We can now look to find the ground state of the Hamiltonian with two-site DMRG. 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.
The truncation scheme keyword argument is mandatory when calling `DMRG2` in MPSKit. Here, we choose to truncate such that all singular values are larger than $10^{-4}$, while setting the default tolerance for convergence to $10^{-8}$. More information on this can be found in the [MPSKit](https://github.com/QuantumKitHub/MPSKit.jl) documentation.
119
+
The truncation scheme keyword argument is mandatory when calling `DMRG2` in MPSKit. Here, we choose to truncate such that all singular values are larger than $10^{-4}$, while setting the default tolerance for convergence to $10^{-7}$. More information on this can be found in the [MPSKit](https://github.com/QuantumKitHub/MPSKit.jl) documentation. To run one-site DMRG anyway, use `DMRG` which does not require a truncation scheme.
120
120
121
121
Now that we've found the ground state, we can compute the entanglement spectrum in the middle of the chain.
122
122
````julia
123
123
spec =entanglement_spectrum(ψ, round(Int, L/2))
124
124
````
125
125
This returns a dictionary which maps the objects grading the virtual space to the singular values. In this case, there is one key corresponding to $\mathsf{Vec}$. We can also immediately return a plot of this data by the following:
126
126
````julia
127
-
using Plots # !
128
127
entanglementplot(ψ;site=round(Int, L/2))
129
128
````
130
-
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. #TODO: actually include the plot (or run everything as ipynb)
129
+
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. #TODO: actually include the plot
131
130
132
131
## Search for the correct dual model
133
132
@@ -139,38 +138,21 @@ V = Vect[A4Object](A4Object(i, 6, label) => D for label in 1:module_numlabels(i)
139
138
Vb = Vect[A4Object](c =>1for c infirst(sectors(V))) # not all charges on boundary, play around with what is there
140
139
````
141
140
141
+
#TODO: show all the plots
142
142
143
+
!!! note "Additional functions and keyword arguments"
144
+
Certain commonly used functions within MPSKit require extra keyword arguments to be compatible with multifusion MPS simulations. In particular, the keyword argument `sector` (note the lowercase "s") appears in
145
+
- `transfer_spectrum`: the sector is selected by adding an auxiliary space to the *domain* of each eigenvector of the transfer matrix. 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 sectors lie in the symmetry category $\mathcal{C} = \mathcal{D^*_M}$.
146
+
- `correlation_length`: since this function calls `transfer_spectrum`, the same logic applies.
147
+
- `excitations` with `QuasiparticleAnsatz`: similar to the previous functions, charged excitations are selected by adding a charged auxiliary space to the eigenvectors representing the quasiparticle states.
148
+
- `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. This is equivalent to adding a charged leg on the leftmost (or rightmost) virtual space of the MPS in conventional MPS cases.
143
149
144
-
145
-
146
-
### Infinite case
147
-
Now, using MPKSit, we can perform matrix product state calculations. We construct some nearest-neighbour Hamiltonian and find the MPS representation of the ground state.
150
+
## Differences with the infinite case
151
+
We can repeat the above calcalations also for an infinite system. The `lattice` variable will change, as well as the MPS constructor and the algorithm:
148
152
````julia
149
-
h =ones(ComplexF64, P ⊗ P ← P ⊗ P)
150
-
H =@mpoham-sum(h{i,j} for (i,j) innearest_neighbours(InfiniteChain(1)))
153
+
lattice =InfiniteChain(1)
151
154
init =InfiniteMPS([P], [V])
152
-
153
-
gs, envs =find_groundstate(init, H, VUMPS())
154
-
````
155
-
156
-
Besides `VUMPS`, `IDMRG` and `IDMRG2` are as easy to run with the `A4Object``Sector`.
157
-
158
-
A couple of MPSKit functions require an additional keyword argument `sector` (note the lowercase "s") specifying which sector to target within the function. These are:
159
-
-`transfer_spectrum`: the sector is selected by adding an auxiliary space to the *domain* of each eigenvector of the transfer matrix. 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}$), the sectors lie in the symmetry category $\mathcal{C}$.
160
-
-`correlation_length`: since this function calls `transfer_spectrum`, the same logic applies.
161
-
-`excitations` with `QuasiparticleAnsatz`: similar to the previous functions, charged excitations are selected by adding a charged auxiliary space to the eigenvectors representing the quasiparticle states.
162
-
163
-
### Finite case
164
-
There are minor differences to pay attention to when simulating matrix product states with a finite length. The first noticeable difference is in the `FiniteMPS` constructor itself to build an initial state. We must pass on a left and right virtual space to the keyword arguments `left` and `right`, since these would by default try to place a trivial space of the `Sector`, which does not exist for `BimoduleSector` due to the semisimple unit. Performing parallel calculations to the previous section now looks like
165
-
166
-
````julia
167
-
L =10# length of the MPS
168
-
init =FiniteMPS(L, P, V; left=V, right=V) # put Vec on the boundaries as well
169
-
H =@mpohamsum(h{i,j} for (i,j) innearest_neighbours(FiniteChain(L)))
170
-
171
-
gs, envs =find_groundstate(init, H, DMRG())
155
+
inf_alg =VUMPS(; verbosity=2, tol=1e-7)
172
156
````
173
157
174
-
`DMRG2` will run in a similar manner. Additional `sector` keywords are present for the following:
175
-
-`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. This is equivalent to adding a charged leg on the leftmost (or rightmost) virtual space of the MPS in conventional MPS cases.
176
-
-`excitations` with `QuasiparticleAnsatz`: see infinite case.
158
+
Besides `VUMPS`, `IDMRG` and `IDMRG2` are as easy to run with the `A4Object``Sector`. It is also clear that boundary terms do not play a role in this case.
0 commit comments