This repository keeps the latex files of the arXiv e-print, Scaling dimensions from linearized tensor renormalization group transformations, and the Python3 codes of the numerical calculations in the e-print, including the implementation of the graph independent local truncation (GILT) and the higer-order tensor renormalization group (HOTRG).
Apart from the standard computational libraries like NumPy and SciPy, the implementation here relies heavily on three other libraries: tn-tools, ncon and abeliantensors, all implemented by Markus Hauru.
- Anaconda packages, specifically NumPy and SciPy
- google/jax library, an extension of NumPy to support automatic differentiation
- tn-tools and ncon
- Installation of abeliantensors is not necessary, since I've made small adjustments to this package and copied it here.
All the Python3 codes of the numerical calulations for the 2D Ising model reported in the e-print are located in the analysisCodes
directory.
The calculations for the 1D Ising model are located in misc
directory.
All the remaining things are latex files of the e-print.
We give a detailed explanation of the Python3 codes in the analysisCodes
directory.
This is a package copied directly from the abeliantensors repository, with small adjustments to the abeliantensors/abeliantensor.py
file to make the tensor RG flow more stable. The adjustments involve the matrix_eig
function starting from line 1885. We add a boolean argument evenTrunc
for this function. If evenTrunc = True
, the bond dimension will be distributed evenly among two different sectors of a Z2 symmetric tensor.
jncon.py
— It is the jax version ofncon
function for tensor contractions. It is based on thencon
function provided in Evenbly's tensor network tutorial website. Basically, we replace NumPy matrix multiplications with the corresponding jax version. It will be useful when we linearize the RG equation of the HOTRG-like scheme to generate the linearized RG equation in Eq. (55) in the e-print.Isings.py
— Contain a function,Ising2dT
, to generate the initial tensor for the 2D Ising model, using the tn-tools library.gilts.py
— Implementation of the graph independent local truncation. I follow Markus Hauru's implementation of the GILT closely. Besides, I also implement Evenbly's full environment truncation (FET) here. I tried both the FET and GILT during the development phase of this research project, and my computations suggested that the GILT suits the purpose of this e-print better.HOTRG.py
— Implementation of the HOTRG, armed with the GILT and the sign fixing switches. Specifically, the functionnormFlowHOTRG
generates tensor RG flows using the RG equation of the HOTRG-like scheme implemented in the functiononeHOTRG
. The functionfixBestSign
fixes the sign ambiguity of the fixed-point tensor. The functiondiffGiltHOTRG
uses the automatical differentiation in the JAX library to linearize the tensor RG equation, and calculates the scaling dimensions from the eigenvalues of the linearized RG equation.
hotrgTc.py
— Analyze the flow of the tensor norm, and use bisection method to determine the approximated critical temeprature Tc. Save the estimated Tc to the disk.hotrgFlow.py
— Generate tensor RG flows right at the estimated critical temperature Tc. Save the critical fixed-point tensor A, the corresponding pieces of Q matrices and isometries w and v at each RG step to the disk.hotrgScale.py
— Use the flow of the tensors generated byhotrgFlow.py
to build the linearized RG equation at the critical fixed point. UsediffGiltHOTRG
function to calculated scaling dimensions and save them to the disk.
drawRGflow.py
— Draw tensor RG flows.drawScD.py
— Print out and draw scaling dimensions at various RG steps.
You can examine the help document of each script file by -h
argument. For example, python hotrgTc.py -h
will teach you how to use hotrgTc.py
script.
First of all, make sure you have installed all the required packages in the requirements section. To set up the environment, first install anaconda; then run the following commands in your terminal:
git clone https://github.com/brucelyu/tensorRGflow.git
cd tensorRGflow/analysisCodes
pip install --user -r requirements.txt
Let's say we want to perform the computation using a maximal bond dimension 20. We first estimate the critical temperature by running
python hotrgTc.py --chi 20 --isGilt --isSym --Ngilt 2 --legcut 2 --gilteps 6e-5 --maxiter 31 --rootiter 12 --Thi 1.001 --Tlow 0.9989
The estimated critical temperature will be saved as tensorRGflow/out/eps6e-05_chi20/Tc.pkl
. In the second step, we generate a tensor RG flow right at this estimated critlca temperature by running
python hotrgFlow.py --chi 20 --Ngilt 2 --legcut 2 --gilteps 6e-5 --maxiter 31
The tensors at each RG step will be save to tensorRGflow/analysisCodes/data
directory and tensorRGflow/out
directory. To plot various tensor RG flows, run
python drawRGflow.py --chi 20 --isGilt --gilteps 6e-5 --scheme Gilt-HOTRG --Ngilt 2 --legcut 2
All figures will be save to tensorRGflow/out/eps6e-05_chi20
directory. Finally, we can linearze the RG equation of the HOTRG-like scheme to calcuate scaling dimensions
python hotrgScale.py --chi 20 --gilteps 6e-5 --Ngilt 2 --legcut 2 --iRGlow 5 --iRGhi 21
Draw the estimated scaling dimensions at different RG steps by running
python drawScD.py --chi 20 --gilteps 6e-5 --Ngilt 2 --legcut 2
Again, the figure will be save to tensorRGflow/out/eps6e-05_chi20
directory.
At the bond dimension 20, the whole analysis will take a few minutes.