def energy_2x2_1site_BP(self,state,env): r""" :param state: wavefunction :param env: CTM environment :type state: IPEPS :type env: ENV :return: energy per site :rtype: float We assume 1x1 iPEPS which tiles the lattice with a bipartite pattern composed of two tensors A, and B=RA, where R rotates approriately the physical Hilbert space of tensor A on every "odd" site:: 1x1 C4v => rotation P => BIPARTITE A A A A A B A B A A A A B A B A A A A A A B A B A A A A B A B A A single reduced density matrix :py:func:`ctm.rdm.rdm2x2` of a 2x2 plaquette is used to evaluate the energy. """ if not (hasattr(self, 'h2x2_nn_rot') or hasattr(self, 'h2x2_nn_nrot')): s2 = su2.SU2(self.phys_dim, dtype=self.dtype, device=self.device) rot_op= s2.BP_rot() self.h2x2_nn_rot= torch.einsum('irtlaxyd,jr,kt,xb,yc->ijklabcd',\ self.h2x2_nn,rot_op,rot_op,rot_op,rot_op) self.h2x2_nnn_rot= torch.einsum('irtlaxyd,jr,kt,xb,yc->ijklabcd',\ self.h2x2_nnn,rot_op,rot_op,rot_op,rot_op) tmp_rdm= rdm.rdm2x2((0,0),state,env) energy_nn= torch.einsum('ijklabcd,ijklabcd',tmp_rdm,self.h2x2_nn_rot) energy_nnn= torch.einsum('ijklabcd,ijklabcd',tmp_rdm,self.h2x2_nnn_rot) energy_per_site = 2.0*(self.j1*energy_nn/4.0 + self.j2*energy_nnn/2.0) return energy_per_site
def energy_2x2_2site(self, state, env): r""" :param state: wavefunction :param env: CTM environment :type state: IPEPS :type env: ENV :return: energy per site :rtype: float We assume iPEPS with 2x1 unit cell containing two tensors A, B. We can tile the square lattice in two ways:: BIPARTITE STRIPE A B A B A B A B B A B A A B A B A B A B A B A B B A B A A B A B Taking reduced density matrix :math:`\rho_{2x2}` of 2x2 cluster with indexing of sites as follows :math:`\rho_{2x2}(s_0,s_1,s_2,s_3;s'_0,s'_1,s'_2,s'_3)`:: s0--s1 | | s2--s3 and without assuming any symmetry on the indices of individual tensors a following set of terms has to be evaluated in order to compute energy-per-site:: 0 1--A--3 2 Ex.1 unit cell A B, with BIPARTITE tiling A3--1B, B3--1A, A, B, A3 , B3 , 1A, 1B 2 0 \ \ / / 0 2 \ \ / / B A 1A 1B A3 B3 Ex.2 unit cell A B, with STRIPE tiling A3--1A, B3--1B, A, B, A3 , B3 , 1A, 1B 2 0 \ \ / / 0 2 \ \ / / A B 1B 1A B3 A3 """ # A3--1B B3 1A # 2 \/ 2 2 \/ 2 # 0 /\ 0 0 /\ 0 # B3--1A & A3 1B # A3--1B B3--1A # 2 \/ 2 2 \/ 2 # 0 /\ 0 0 /\ 0 # A3--1B & B3--1A energy_nn = 0 energy_nnn = 0 for coord in state.sites.keys(): tmp_rdm = rdm.rdm2x2(coord, state, env) energy_nn += torch.einsum('ijklabcd,ijklabcd', tmp_rdm, self.h2x2_nn) energy_nnn += torch.einsum('ijklabcd,ijklabcd', tmp_rdm, self.h2x2_nnn) energy_per_site = 2.0 * (self.j1 * energy_nn / 8.0 + self.j2 * energy_nnn / 4.0) energy_per_site = _cast_to_real(energy_per_site) return energy_per_site
def energy_2x2_1site(self, state, env): rdm2x2 = rdm.rdm2x2((0, 0), state, env) energy_per_site = torch.einsum("ijklabcd,ijklabcd", rdm2x2, self.Ham) return energy_per_site