Correlation functions

ctm.generic.corrf.apply_TM_0sO(coord, direction, state, env, edge, verbosity=0)[source]
Parameters:
  • coord (tuple(int,int)) – tuple (x,y) specifying vertex on a square lattice

  • direction (tuple(int,int)) – direction in which the transfer operator is applied

  • state (IPEPS) – underlying wavefunction

  • env (ENV) – environment corresponding to state

  • edge (torch.tensor) – tensor of dimensions \(\chi^2\)

  • verbosity (int) – logging verbosity

Returns:

edge with a single instance of the transfer matrix applied The resulting tensor has an identical index structure as the original edge

Return type:

torch.tensor

Applies a single instance of the “0-width channel” transfer matrix of site r=(x,y) to the edge tensor by contracting the following network, or its corresponding rotation depending on the direction:

direction:  right=(1,0)                down=(0,1)

         -----T--                    edge
        |     |                     |    |
         -----T--                   T----T
                                    |    |
ctm.generic.corrf.apply_TM_1sO(coord, direction, state, env, edge, op=None, verbosity=0)[source]
Parameters:
  • coord (tuple(int,int)) – tuple (x,y) specifying vertex on a square lattice

  • direction (tuple(int,int)) – direction in which the transfer operator is applied

  • state (IPEPS) – underlying wavefunction

  • env (ENV) – environment corresponding to state

  • edge (torch.tensor) – tensor of dimensions \(\chi \times D^2 \times \chi (\times d_{MPO})\), potentially with 4th index beloning to some MPO

  • op (torch.tensor) – operator to be inserted into transfer matrix

  • verbosity (int) – logging verbosity

Returns:

edge with a single instance of the transfer matrix applied The resulting tensor has an identical index structure as the original edge

Return type:

torch.tensor

Applies a single instance of the transfer matrix of site r=(x,y) to the edge tensor by contracting the following network, or its corresponding rotation depending on the direction:

direction:  right=(1,0)                down=(0,1)

         -----T----------------      --------edge--------
        |     |                     |         |          |\
       edge--(a(r)^+ op a(r))--     T--(a(r)^+ op a(r))--T \
        |     |                     |         |          | (MPO)
         -----T----------------
        (\-----------------MPO)

where the physical indices s and s’ of the on-site tensor \(a\) and it’s hermitian conjugate \(a^\dagger\) are contracted with identity \(\delta_{s,s'}\) or op (if supplied). Potentially, the edge can carry an extra MPO index.

ctm.generic.corrf.apply_TM_2sO_1sChannel(coord, direction, state, env, edge, op=None, verbosity=0)[source]
Parameters:
  • coord (tuple(int,int)) – tuple (x,y) specifying vertex on a square lattice

  • direction (tuple(int,int)) – direction in which the transfer operator is applied

  • state (IPEPS) – underlying wavefunction

  • env (ENV) – environment corresponding to state

  • edge (torch.tensor) – tensor of dimensions \(\chi \times D^2 \times \chi\)

  • op (torch.tensor) – two-site operator to be inserted into the two consecutive transfer matrices

  • verbosity (int) – logging verbosity

Returns:

edge with two transfer matrices (and operator op, if any) applied. The resulting tensor has an identical index structure as the original edge

Return type:

torch.tensor

Applies two transfer matrices to the edge tensor, including the two-site operator op. The applied transfer matrices depend on the selected site r=(x,y) and the direction of the growth. The following network is contracted:

  -----T-------------------T--------------------------
 |     |                   |
edge--(a(r)^+ op_l a(r))==(a(r+dir)^+ op_r a(r+dir))--
 |     |                   |
  -----T-------------------T--------------------------

where the physical indices s and s’ of the on-site tensor \(a\) and it’s hermitian conjugate \(a^\dagger\) are contracted with identity \(\delta_{s,s'}\) or op_l and op_r if op is supplied. The op_l and op_r are given by the SVD decomposition of the two-site operator op:

 0  1        0           1          0            1->0
 |  |  SVD   |           |          |            |
| op |  =  |op_l|--(S--|op^~_r|) = |op_l|--2 2--|op_r|
 |  |        |           |          |            |
 2  3        2           3          2->1         3->1
ctm.generic.corrf.apply_TM_2sO_2sChannel(coord, direction, state, env, edge, op=None, verbosity=0)[source]
Parameters:
  • coord (tuple(int,int)) – tuple (x,y) specifying vertex on a square lattice

  • direction (tuple(int,int)) – direction in which the transfer operator is applied

  • state (IPEPS) – underlying wavefunction

  • env (ENV) – environment corresponding to state

  • edge (torch.tensor) – tensor of dimensions \(\chi \times (D^2)^2 \times \chi\)

  • op (torch.tensor) – two-site operator to be inserted within the two-site transfer matrix

  • verbosity (int) – logging verbosity

Returns:

edge with a single instance of the transfer matrix applied The resulting tensor has an identical index structure as the original edge

Return type:

torch.tensor

Applies a single instance of the two-site “transfer matrix” with site r=(x,y) to the edge tensor by contracting the following network, or its corresponding rotation depending on the direction:

direction:  right=(1,0)                       down=(0,1)

         -----T--------------------     --------edge-------------
        |     |                        |    |          |         |
       edge--(a(r)^+ o1 a(r))------    T--(a(r)^+)---(a(r+x)^+)--T
        |     |        \               |\   o1---------o2        |
        |----(a(r+y)^+) o2 a(r+y)--    | --a(r)-------a(r+x)-----T
        |     |                        |    |          |         |
         -----T--------------------

The two-site operator is first decomposed into a simple MPO o1–o2 (TODO case where op comes with extra MPO index):

 s1'  s2'    s1'      s2'
|  op   | = |o1|-----|o2|
 s1   s2     s1       s2

where the physical indices s and s’ of the on-site tensor \(a\) and it’s hermitian conjugate \(a^\dagger\) are contracted with identity \(\delta_{s,s'}\) or o1, o2. The transfer matrix is always grown from left to right or from top to bottom.

ctm.generic.corrf.apply_edge(coord, direction, state, env, vec, verbosity=0)[source]
Parameters:
  • coord (tuple(int,int)) – tuple (x,y) specifying vertex on a square lattice

  • direction (tuple(int,int)) – direction of the edge

  • state (IPEPS) – underlying wavefunction

  • env (ENV) – environment corresponding to state

  • vec (torch.tensor) – tensor of dimensions \(\chi \times (D^2)^l \times \chi\) representing an edge of length l

  • verbosity (int) – logging verbosity

Returns:

scalar resulting from the contraction of vec with an edge built from the environment

Return type:

torch.tensor

Contracts vec tensor with the edge of length l defined by coord site and a chosen direction. Afterwards, their dot product is computed:

                    get_edge(coord,direction,...)
           ------0 0------C
          |               |
scalar = vec-----1 1------T
          |               |
         ...--         --...
          |               |
           --(V+1) (V+1)--C
ctm.generic.corrf.corrf_1sO1sO(coord, direction, state, env, op1, get_op2, dist, verbosity=0)[source]
Parameters:
  • coord (tuple(int,int)) – tuple (x,y) specifying vertex on a square lattice

  • direction (tuple(int,int)) – orientation of correlation function

  • state (IPEPS) – underlying wavefunction

  • env (ENV) – environment corresponding to state

  • op1 (torch.tensor) – first one-site operator \(O_1\)

  • get_op2 (function(int)->torch.tensor) – function returning (position-dependent) second one-site operator \(\text{get_op2}(r)=O_2\)

  • dist (int) – maximal distance of correlation function

  • verbosity (int) – logging verbosity

Returns:

vector corrf of length dist holding the values of correlation function \(\langle O_1(0) O_2(r) \rangle\) for \(r \in [1,dist]\)

Return type:

torch.tensor

Computes the two-point correlation function \(\langle O_1(0) O_2(r) \rangle\) by contracting the following network:

C-----T------- ... -----T------- ... ------T----------C
|     |                 |                  |          |
|    a(0)^+            a(i)^+             a(r)^+      |
T--( op_1  )-- ... --(  |    )-- ... --( gen_op2(r))--T
|    a(0))             a(i)               a(r)        |
|     |                 |                  |          |
C-----T------- ... -----T------- ... ------T----------C

for increasingly large distance r up to dist. The op1 is applied at site 0=(x,y), the transfer matrices are applied in the direction up to site \(r=(x,y) + \text{dist} \times \text{direction}\).

ctm.generic.corrf.corrf_2sOH2sOH_E1(coord, direction, state, env, op1, get_op2, dist, verbosity=0)[source]
Parameters:
  • coord (tuple(int,int)) – tuple (x,y) specifying vertex on a square lattice

  • direction (tuple(int,int)) – orientation of correlation function

  • state (IPEPS) – underlying wavefunction

  • env (ENV) – environment corresponding to state

  • op1 (torch.tensor) – first two-site operator \(O_1\)

  • get_op2 (function(int)->torch.tensor) – function returning (position-dependent) second two-site operator \(\text{get_op2}(r)=O_2\)

  • dist (int) – maximal distance of correlation function

  • verbosity (int) – logging verbosity

Returns:

vector corrf of length dist holding the values of correlation function \(\langle O_1(0) O_2(r) \rangle\) for \(r \in [1,dist]\)

Return type:

torch.tensor

Computes the correlation function \(\langle O_1(0) O_2(r) \rangle\) of two horizontaly-oriented two-site operators by contracting the following network:

C-----T-------T---------- ... ---T---- ... -----T-------T-------------C
|     |       |                  |              |       |             |
|   /-a(0)^+--a(1)^+-\           a(i)^+      /--a(r)^+--a(r+1)^+--\   |
T--<    ( op 1 )      >-- ... --<|>-- ... --<  (gen_op2(r))        >--T
|   \-a(0)----a(1)---/           a(i))       \--a(r)----a(r+1)----/   |
|     |       |                  |              |       |             |
C-----T-------T---------- ... ---T---- ... -----T-------T-------------C

for increasingly large distance r up to dist+1. The op1 is applied at site 0=(x,y) & 1, the transfer matrices are applied in the direction up to site \(r=(x,y) + \text{dist} \times \text{direction}\)

ctm.generic.corrf.corrf_2sOV2sOV_E2(coord, direction, state, env, op1, get_op2, dist, verbosity=0)[source]
Parameters:
  • coord (tuple(int,int)) – tuple (x,y) specifying vertex on a square lattice

  • direction (tuple(int,int)) – orientation of correlation function

  • state (IPEPS) – underlying wavefunction

  • env (ENV) – environment corresponding to state

  • op1 (torch.tensor) – first two-site operator \(O_1\)

  • get_op2 (function(int)->torch.tensor) – function returning (position-dependent) second two-site operator \(\text{get_op2}(r)=O_2\)

  • dist (int) – maximal distance of correlation function

  • verbosity (int) – logging verbosity

Returns:

vector corrf of length dist holding the values of correlation function \(\langle O_1(0) O_2(r) \rangle\) for \(r \in [1,dist]\)

Return type:

torch.tensor

Computes the four-point correlation function \(\langle O_1(0) O_2(r) \rangle\), where both O_1 and O_2 are two-site operator by contracting the following network:

C-----T--------------- ... ----T------------- ... -----T-------------C
|     |                        |                       |             |
T--(a(0)^+-----a(0))-- ... --a(i)^+(ai)------ ... --(a(r)^+a(r)------T
|          op1                 |                   ( gen_op2(r))     |
T--(a(y)^+-----a(y))-- ... --a(i+y)^+a(i+y)-- ... --(a(r+y)^+a(r+y)--T
|     |                        |                       |             |
C-----T--------------- ... ----T------------- ... -----T-------------C

for increasingly large distance r up to dist. The op1 is applied within the transfer matrix defined by site 0=(x,y). The transfer matrices are applied in the direction up to site \(r=(x,y) + \text{dist} \times \text{direction}\).

ctm.generic.corrf.get_edge(coord, direction, state, env, verbosity=0)[source]
Parameters:
  • coord (tuple(int,int)) – tuple (x,y) specifying vertex on a square lattice

  • direction (tuple(int,int)) – direction of the edge

  • state (IPEPS) – underlying wavefunction

  • env (ENV) – environment corresponding to state

  • verbosity (int) – logging verbosity

Returns:

tensor with indices \(\chi \times D^2 \times \chi\)

Return type:

torch.tensor

Build an edge of site coord by contracting one of the following networks depending on the chosen direction:

    up=(0,-1)   left=(-1,0)  down=(0,1)   right=(1,0)

                 C--0         0  1  2       0--C
                 |            |  |  |          |
E =  C--T--C     T--1         C--T--C       1--T
     |  |  |     |                             |
     0  1  2     C--2                       2--C

The indices of the resulting tensor are always ordered from left-to-right and from up-to-down.

ctm.generic.corrf.get_edge_2(coord, direction, state, env, verbosity=0)[source]
Parameters:
  • coord (tuple(int,int)) – tuple (x,y) specifying vertex on a square lattice

  • direction (tuple(int,int)) – direction of the edge

  • state (IPEPS) – underlying wavefunction

  • env (ENV) – environment corresponding to state

  • verbosity (int) – logging verbosity

Returns:

tensor with indices \(\chi \times D^2 \times \chi\)

Return type:

torch.tensor

Build an edge of two sites, starting at position coord, by contracting one of the following networks depending on the chosen direction:

    up=(0,-1)   left=(-1,0)  down=(0,1)   right=(1,0)

                C--0         0  1  2  3    0--C
                |            |  |  |  |       |
E = C--T--T--C  T--1         C--T--T--C    1--T
    |  |  |  |  |                             |
    0  1  2  3  T--2                       2--T
                |                             |
                C--3                       3--C

The edge itself is grown from top to bottom or from left to right. The indices of the resulting tensor are always ordered from left-to-right and from up-to-down.