Skip to content

Generic Tensor Network Operator (GTNO) for studying the quantum many-body spin systems.

Notifications You must be signed in to change notification settings

j9263178/gtno1D

Repository files navigation

Generic Tensor Network Operator (GTNO)

Generic Tensor Network Operator (GTNO) combines the insight of imaginary time evolution and variational optimization for studying the quantum many-body spin systems. The central idea of GTNO is to construct several operators generated from the Hamiltonian and lift the weight of different operators as the variational parameters, this ansatz results in promising ground states and symmetries of the local tensor characterizing the quantum phases.

In this repository we provide minimum example codes for the construction of GTNO for several 1D models, we implement the GMPOmodel() class for applying GTNO to cutomized initial states and to variantionally obtain the ground states via automatic differentiation (AD). Several observable measuments for probing the quantum phase are also included.

Note that the example codes provided here do not guarantee to reproduce all the results on the paper, especially when higher numG (e.g. >2) is applied, one may observe the energy expectation value is trapped to local minima and unexpected behavior of observables might occurs. To avoid being trapped in local minima one should modify the codes and implement more complicated optimization procedures (e.g. start from the optimal parameters of smaller numG and freeze some parameters during the optimization).

The full paper of GTNO is now available on Arxiv.

Installation

Make sure you have installed:

Then clone this repo directly and start with example codes.

Examples

pic1

pic2

GMPOmodel

The class GMPOmodel() inherits from torch.nn.module, this object contains information and optimization process of our 1D GTNO optimization problem.

To initialize the model we have to pass several functions for GTNO state construction and info about number of parameters.

GMPOmodel(localh, gmpo, A, numG, Aparas, Gparas)

Arguments:

  • localh: Function that returns a two-sites hamitonian torch.Tensor with shape (d, d, d, d).
  • gmpo: Function that returns a GMPO torch.Tensor with shape (d, d, D, D).
  • A: Function that returns a state that GMPO will apply to, should be torch.Tensor with shape (d) or (d, D, D).
  • numG: Number of times we apply GMPO to A.
  • Aparas: Number of parameters in A.
  • Gparas: Number of parameters in single GMPO.

Apart from methods in torch.nn.module, GMPOmodel have some methods which help to reduce the coding work when studying the problem.

Methods:

  • .setcs(cs = torch.Tensor): Assign the parameters in the ansatz with specific values, the argument should be a tensor with shape (Aparas + numG * Gparas,).

  • .setreqgrad(reqgrad = torch.Tensor): Assign a vector describe the req_grad value of parameters, the argument should be a tensor contains either 0( req_grad will be False ) or 1 ( req_grad will be True ) with shape (Aparas + numG * Gparas,).

  • .getcsarray(): Return a copy tensor torch.Tensor of the current paramters in the GMPOmodel.

About

Generic Tensor Network Operator (GTNO) for studying the quantum many-body spin systems.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published