# Reduced Density Matrices¶

ctm.generic.rdm.rdm1x1(coord, state, env, operator=None, sym_pos_def=False, force_cpu=False, verbosity=0)[source]
Parameters
• coord (tuple(int,int)) – vertex (x,y) for which reduced density matrix is constructed

• state (IPEPS) – underlying wavefunction

• env (ENV) – environment corresponding to state

• state – 1-site operator to contract with the two physical indices of the rdm

• verbosity (int) – logging verbosity

Returns

1-site reduced density matrix with indices $$s;s'$$. If an operator was provided, returns the expectation value of this operator (not normalized by the norm of the wavefunction).

Return type

torch.tensor

Computes 1-site reduced density matrix $$\rho_{1x1}$$ centered on vertex coord by contracting the following tensor network:

C--T-----C
|  |     |
T--A^+A--T
|  |     |
C--T-----C


If no operator was provided, the physical indices s and s’ of on-site tensor $$A$$ at vertex coord and it’s hermitian conjugate $$A^\dagger$$ are left uncontracted. Else, they are contracted with the operator.

ctm.generic.rdm.rdm1x2(coord, state, env, sym_pos_def=False, verbosity=0)[source]
Parameters
• coord (tuple(int,int)) – vertex (x,y) specifies position of 1x2 subsystem

• state (IPEPS) – underlying wavefunction

• env (ENV) – environment corresponding to state

• verbosity (int) – logging verbosity

Returns

2-site reduced density matrix with indices $$s_0s_1;s'_0s'_1$$

Return type

torch.tensor

Computes 2-site reduced density matrix $$\rho_{1x2}$$ of a vertical 1x2 subsystem using following strategy:

1. compute four individual corners

2. construct upper and lower half of the network

3. contract upper and lower halt to obtain final reduced density matrix

C--T------------------C = C2x2_LU(coord)--------C1x2(coord)
|  |                  |   |                     |
T--A^+A(coord)--------T   C2x2_LD(coord+(0,1))--C1x2(coord+0,1))
|  |                  |
T--A^+A(coord+(0,1))--T
|  |                  |
C--T------------------C


The physical indices s and s’ of on-sites tensors $$A$$ (and $$A^\dagger$$) at vertices coord, coord+(0,1) are left uncontracted

ctm.generic.rdm.rdm2x1(coord, state, env, sym_pos_def=False, verbosity=0)[source]
Parameters
• coord (tuple(int,int)) – vertex (x,y) specifies position of 2x1 subsystem

• state (IPEPS) – underlying wavefunction

• env (ENV) – environment corresponding to state

• verbosity (int) – logging verbosity

Returns

2-site reduced density matrix with indices $$s_0s_1;s'_0s'_1$$

Return type

torch.tensor

Computes 2-site reduced density matrix $$\rho_{2x1}$$ of a horizontal 2x1 subsystem using following strategy:

1. compute four individual corners

2. construct right and left half of the network

3. contract right and left halt to obtain final reduced density matrix

C--T------------T------------------C = C2x2_LU(coord)--C2x2(coord+(1,0))
|  |            |                  |   |               |
T--A^+A(coord)--A^+A(coord+(1,0))--T   C2x1_LD(coord)--C2x1(coord+(1,0))
|  |            |                  |
C--T------------T------------------C


The physical indices s and s’ of on-sites tensors $$A$$ (and $$A^\dagger$$) at vertices coord, coord+(1,0) are left uncontracted

ctm.generic.rdm.rdm2x2(coord, state, env, sym_pos_def=False, verbosity=0)[source]
Parameters
• coord (tuple(int,int)) – vertex (x,y) specifies upper left site of 2x2 subsystem

• state (IPEPS) – underlying wavefunction

• env (ENV) – environment corresponding to state

• verbosity (int) – logging verbosity

Returns

4-site reduced density matrix with indices $$s_0s_1s_2s_3;s'_0s'_1s'_2s'_3$$

Return type

torch.tensor

Computes 4-site reduced density matrix $$\rho_{2x2}$$ of 2x2 subsystem specified by the vertex coord of its upper left corner using strategy:

1. compute four individual corners

2. construct upper and lower half of the network

3. contract upper and lower half to obtain final reduced density matrix

C--T------------------T------------------C = C2x2_LU(coord)--------C2x2(coord+(1,0))
|  |                  |                  |   |                     |
T--A^+A(coord)--------A^+A(coord+(1,0))--T   C2x2_LD(coord+(0,1))--C2x2(coord+(1,1))
|  |                  |                  |
T--A^+A(coord+(0,1))--A^+A(coord+(1,1))--T
|  |                  |                  |
C--T------------------T------------------C


The physical indices s and s’ of on-sites tensors $$A$$ (and $$A^\dagger$$) at vertices coord, coord+(1,0), coord+(0,1), and coord+(1,1) are left uncontracted and given in the same order:

s0 s1
s2 s3


# Specific RDMs for Kagome iPEPS¶

ctm.pess_kagome.rdm_kagome.double_layer_a(state, coord, open_sites=[], force_cpu=False)[source]
Parameters
• state (IPEPS_KAGOME) – underlying wavefunction

• coord (tuple(int,int)) – vertex (x,y) for which the reduced density matrix is constructed

• open_sites (list(int)) – a list DoFs to leave open (uncontracted).

• force_cpu (bool) – perform on CPU

Returns

result of (partial) contraction of double-layer tensor

Return type

torch.tensor

Build double-layer tensor of Kagome iPEPS with open, partially, or fully contracted physical space of 3 DoFs on down triangle:

   u
|                            /
l--\                         --A*--
\                         /|\ \            /
s0--s2--r          ->      | | \  ->   --a*a--
| /                    s' 0 1 2         / \
|/   <- DOWN_T            ? ? ?           |s><s'|
s1                       s 0 1 2
|                         | | /
d                         |///
--A--
/


Default results in contraction over all 3 DoFs. Physical indices are aggregated into a single index with structure $$|ket \rangle\langle bra| = s_0,...,s_2;s'_0,...,s'_2$$.

The available choices for open_sites are: [], , , , [0,1], [0,2], [1,2], and [0,1,2].

ctm.pess_kagome.rdm_kagome.enlarged_corner(coord, state, env, corner, open_sites=[], force_cpu=False, verbosity=0)[source]
Parameters
• coord (tuple(int,int)) – vertex (x,y) for which the enlarged corner is constructed

• state (IPEPS_KAGOME) – underlying wavefunction

• env (ENV) – environment corresponding to state

• corner (str) – which corner to construct. The four options are: ‘LU’, ‘RU’, ‘RD’, and ‘LD’ for “left up” corner, “right up” corner, “right down” corner, and “left down” corner.

• open_sites (list(int)) – a list DoFs to leave open (uncontracted).

• force_cpu (bool) – perform on CPU

Returns

result of (partial) contraction of double-layer tensor

Return type

torch.tensor

Builds enlarged corner relative to the site at coord from the environment:

C---T---                            |   |
|   |                            --a*a--T
T--a*a--                            |   |
|   |     for corner='LU', or    ---T---C  for corner='RD'


The resulting tensor is always reshaped into either rank-2 or rank-3 if some DoFs are left open on the double-layer. In the latter case, these open physical indices are aggregated into the last index of the resulting tensor. The index-ordering convention for enlarged corners follows convention for corner tensors of the environment env.

If open_sites=0 returned tensor has rank-2, where env. indices and auxiliary indices of double-layer tensor in the same direction were reshaped into a single index. If some DoFs remain open, then returned tensor is rank-3 with extra index carrying all physical DoFs reshaped in :math:|ket ranglelangle bra| order:

C---T---\                             C---T---\
|   |    --1                          |   |    --1
T--a*a--/                             T--a*a--/
\ /                                   \ / \
|                                     |   2
0           for open_sites=[], or     0           for non-empty open_sites

ctm.pess_kagome.rdm_kagome.rdm1x1_kagome(coord, state, env, sites_to_keep=('A', 'B', 'C'), force_cpu=False, sym_pos_def=False, verbosity=0, **kwargs)[source]
Parameters
• coord (tuple(int,int)) – vertex (x,y) for which reduced density matrix is constructed

• state (IPEPS_KAGOME) – underlying wavefunction

• env (ENV) – environment corresponding to state

• verbosity (int) – logging verbosity

• sites_to_keep – physical degrees of freedom to be kept. Default: “ABC” - keep all the DOF

• force_cpu (bool) – perform on CPU

• sym_pos_def (bool) – make reduced density matrix positive-(semi)definite

Returns

1-site reduced density matrix with indices $$s;s'$$

Return type

torch.tensor

Compute 1-kagome-site reduced density matrix $$\rho_{1x1,\textrm{sites_to_keep}}$$ centered on vertex coord:

y\x -1 0   1
-1  C1 T4  C4
0  T1 a*a T3
1  C2 T2  C3


The physical indices are ordered as $$|ket \rangle\langle bra|$$ from on-site tensor A (ket) and then A^dag (bra).

ctm.pess_kagome.rdm_kagome.rdm1x2_kagome(coord, state, env, sites_to_keep_00=('A', 'B', 'C'), sites_to_keep_01=('A', 'B', 'C'), sym_pos_def=False, force_cpu=False, verbosity=0, **kwargs)[source]
Parameters
• coord (tuple(int,int)) – vertex (x,y) specifies position of 1x2 subsystem

• state (IPEPS_KAGOME) – underlying wavefunction

• env (ENV) – environment corresponding to state

• verbosity (int) – logging verbosity

• sites_to_keep_00 – physical sites needed for the unit cell at coord + (0, 0)

• sites_to_keep_01 – physical sites needed for the unit cell at coord + (0, 1)

Returns

2-site reduced density matrix with indices $$s_0s_1;s'_0s'_1$$

Return type

torch.tensor

Computes 2-site reduced density matrix $$\rho_{1x2}$$ of a vertical 1x2 subsystem using following strategy:

ctm.pess_kagome.rdm_kagome.rdm2x1_kagome(coord, state, env, sites_to_keep_00=('A', 'B', 'C'), sites_to_keep_10=('A', 'B', 'C'), force_cpu=False, sym_pos_def=False, verbosity=0, **kwargs)[source]
Parameters
• coord (tuple(int,int)) – vertex (x,y) specifies position of 2x1 subsystem

• state (IPEPS_KAGOME) – underlying wavefunction

• env (ENV) – environment corresponding to state

• verbosity (int) – logging verbosity

• sites_to_keep_00 – physical sites needed for the unit cell at coord + (0, 0)

• sites_to_keep_10 – physical sites needed for the unit cell at coord + (1, 0)

Returns

2-site reduced density matrix with indices $$s_0s_1;s'_0s'_1$$

Return type

torch.tensor

Computes 2-site reduced density matrix $$\rho_{2x1}$$ of a horizontal 2x1 subsystem using following strategy:

1. compute four individual corners

2. construct right and left half of the network

3. contract right and left halt to obtain final reduced density matrix

C--T------------T------------------C = C2x2_LU(coord)--C2x2(coord+(1,0))
|  |            |                  |   |               |
T--A^+A(coord)--A^+A(coord+(1,0))--T   C2x1_LD(coord)--C2x1(coord+(1,0))
|  |            |                  |
C--T------------T------------------C


The physical indices s and s’ of on-sites tensors $$A$$ (and $$A^\dagger$$) at vertices coord, coord+(1,0) are left uncontracted

ctm.pess_kagome.rdm_kagome.rdm2x2_dn_triangle_with_operator(coord, state, env, op, force_cpu=False, verbosity=0, **kwargs)[source]
Parameters
• coord (tuple(int,int)) – vertex (x,y) for which the reduced density matrix is constructed

• state (IPEPS_KAGOME) – underlying wavefunction

• env (ENV) – environment corresponding to state

• verbosity (int) – logging verbosity

• op (torch.tensor) – operator to be contracted. It is expected that the op is either rank-6 tensor of shape [physical_dim]*6 or rank-2 tensor of shape [physical_dim**3]*2 (fused bra and ket spaces)

• force_cpu (bool) – perform on CPU

Returns

normalized expectation value of the operator op and the norm of the reduced density matrix

Return type

torch.tensor, torch.tensor

Returns a normalized expectation value of operator inserted into down triangle of upper left corner of 2x2 subsystem:

C    T             T          C
a             a
|             |
T b--\          b--\
\        /    \
s0--s2--d     XX--XX--d T
| /           | /
|/            |/
s1            XX
|             |
c             c
/             /
a             a
|             |
T b--\          b--\
\        /    \
XX--XX--d     XX--XX--d T
| /           | /
|/            |/
XX            XX
|             |
c             c
C      T             T        C

ctm.pess_kagome.rdm_kagome.rdm2x2_kagome(coord, state, env, sites_to_keep_00=('A', 'B', 'C'), sites_to_keep_10=('A', 'B', 'C'), sites_to_keep_01=('A', 'B', 'C'), sites_to_keep_11=('A', 'B', 'C'), force_cpu=False, sym_pos_def=False, verbosity=0, **kwargs)[source]
Parameters
• coord (tuple(int,int)) – vertex (x,y) specifies upper left site of 2x2 subsystem

• state (IPEPS_KAGOME) – underlying wavefunction

• env (ENV) – environment corresponding to state

• verbosity (int) – logging verbosity

• sites_to_keep_00 – physical sites needed for the unit cell at coord + (0, 0)

• sites_to_keep_10 – physical sites needed for the unit cell at coord + (1, 0)

• sites_to_keep_01 – physical sites needed for the unit cell at coord + (0, 1)

• sites_to_keep_11 – physical sites needed for the unit cell at coord + (1, 1)

• force_cpu (bool) – perform on CPU

• sym_pos_def (bool) – make reduced density matrix positive-(semi)definite

Returns

4-site reduced density matrix with indices $$s_0s_1s_2s_3;s'_0s'_1s'_2s'_3$$

Return type

torch.tensor

Computes 4-site reduced density matrix $$\rho_{2x2}$$ of 2x2 subsystem specified by the vertex coord of its upper left corner using strategy:

1. compute four individual corners

2. construct upper and lower half of the network

3. contract upper and lower half to obtain final reduced density matrix

C--T------------------T------------------C = C2x2_LU(coord)--------C2x2_RU(coord+(1,0))
|  |                  |                  |   |                     |
T--A^+A(coord)--------A^+A(coord+(1,0))--T   C2x2_LD(coord+(0,1))--C2x2_RD(coord+(1,1))
|  |                  |                  |
T--A^+A(coord+(0,1))--A^+A(coord+(1,1))--T
|  |                  |                  |
C--T------------------T------------------C


The physical indices s and s’ of on-sites tensors $$A$$ (and $$A^\dagger$$) at vertices coord, coord+(1,0), coord+(0,1), and coord+(1,1) are left uncontracted and given in the same order:

s0 s1
s2 s3

ctm.pess_kagome.rdm_kagome.rdm2x2_up_triangle_open(coord, state, env, sym_pos_def=False, force_cpu=False, verbosity=0, **kwargs)[source]
Parameters
• coord (tuple(int,int)) – vertex (x,y) specifies upper left site of 2x2 subsystem

• state (IPEPS_KAGOME) – underlying wavefunction

• env (ENV) – environment corresponding to state

• verbosity (int) – logging verbosity

• force_cpu (bool) – perform on CPU

• sym_pos_def (bool) – make reduced density matrix positive-(semi)definite

Returns

reduced density matrix as rank-6 tensor

Return type

torch.tensor

Build reduced density matrix corresponding to the three sites s0, s1, and s2 of the “up” triangle of Kagome lattice:

C    T             T          C => C2x2_LU(coord)--------C2x2(coord+(1,0))
a             a               |                  s1/|
|             |               |/s2               s0\|
T b--\          b--\               C2x2_LD(coord+(0,1))--C2x2(coord+(1,1))
\        /    \
XX--XX--d     XX--XX--d T
| /           | /
|/            |/
XX            s1
|             |
c             c
/             /
a             a
|             |
T b--\          b--\
\        /    \
XX--s2--d     s0--XX--d T
| /           | /
|/            |/
XX            XX
|             |
c             c
C      T             T        C

ctm.pess_kagome.rdm_kagome.trace1x1_dn_kagome(coord, state, env, op, verbosity=0, force_cpu=False)[source]
Parameters
• coord (tuple(int,int)) – vertex (x,y) for which the reduced density matrix is constructed

• state (IPEPS_KAGOME) – underlying wavefunction

• env (ENV) – environment corresponding to state

• op (torch.tensor) – operator to be contracted. It is expected that the op is either rank-6 tensor of shape [physical_dim]*6 or rank-2 tensor of shape [physical_dim**3]*2 (fused bra and ket spaces)

• verbosity (int) – logging verbosity

• force_cpu (bool) – perform on CPU

Returns

expectation value of the given on-site observable op

Return type

torch.tensor

y\x -1 0   1
-1  C1 T4  C4
0  T1 a*a T3
1  C2 T2  C3


Evaluate operator op supported on the three sites of the down triangle of Kagome lattice $$Tr{\rho_{1x1,ABC} op}$$ centered on vertex coord`.