# Applying 4-site gates to PEPS with ITensorNetworks

**URL:** <https://itensor.discourse.group/t/applying-4-site-gates-to-peps-with-itensornetworks/1618>\
**Category:** DMRG and Numerical Methods\
**Tags:** julia, gate\_evolution\
**Created:** [April 5, 2024, 9:17am UTC](https://itensor.discourse.group/t/applying-4-site-gates-to-peps-with-itensornetworks/1618 "2024-04-05T09:17:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafa-carreira](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/rafa-carreira/32/504_2.png) [@rafa-carreira](https://itensor.discourse.group/u/rafa-carreira)\
**Post date:** [April 5, 2024, 9:17am UTC](https://itensor.discourse.group/t/applying-4-site-gates-to-peps-with-itensornetworks/1618/1 "2024-04-05T09:17:09Z")

</div>

I’m trying to implement a code performing TEBD for a toric code Hamiltonian in a 2D square lattice using ITensorNetworks. I’m facing an issue related to applying a 4-site gate to a PEPS and retrieving the state as a PEPS again. While in the case of 2 site gates it is clear what to after applying the gate to decompose the resulting tensor back to the PEPS structure, if I decompose the 4-site tensor (resulting from applying the gate) naively, I will end up with a missing bond between two of the sites in the final PEPS, which breaks the entanglement structure of my state.

What is the correct way of applying 4-site gates to a PEPS? If someone could point me to some reference where I can check the algorithm for this, it would be very helpful.

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![mtfishman](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/mtfishman/32/11_2.png) [@mtfishman](https://itensor.discourse.group/u/mtfishman)\
**Post date:** [April 5, 2024, 12:30pm UTC](https://itensor.discourse.group/t/applying-4-site-gates-to-peps-with-itensornetworks/1618/2 "2024-04-05T12:30:35Z")

</div>

The best description I can find of applying 4-site gates is Section 4.2.2 of [[1110.3632] Breakdown of a perturbed Z\_N topological phase](https://arxiv.org/abs/1110.3632), though it is lacking in details.

The optimization of the 4 PEPS tensors where the plaquette term is being applied can be carried out by the same optimization procedure that is used in the so-called “full update” PEPS gate application algorithm, described in Section 6.4 of [[0907.2796] Matrix Product States, Projected Entangled Pair States, and variational renormalization group methods for quantum spin systems](https://arxiv.org/abs/0907.2796). Another description of that optimization procedure that includes tensor network diagrams can be found in Section II. B. of [[1503.05345] The iPEPS algorithm, improved: fast full update and gauge fixing](https://arxiv.org/abs/1503.05345) and starting at Slide 44 of [https://www.benasque.org/2020scs/talks\_contr/113\_tensornetworks\_lecture2.pdf](https://www.benasque.org/2020scs/talks_contr/113_tensornetworks_lecture2.pdf). That procedure should generalize in a straightforward way to 4-site gates, but of course at higher cost.

---

<div class="post-metadata">

**Author:** ![mtfishman](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/mtfishman/32/11_2.png) [@mtfishman](https://itensor.discourse.group/u/mtfishman)\
**Post date:** [April 5, 2024, 12:35pm UTC](https://itensor.discourse.group/t/applying-4-site-gates-to-peps-with-itensornetworks/1618/3 "2024-04-05T12:35:19Z")

</div>

Of course it would be best if you can break down the 4-site gates into a series of 2-site gates, though maybe there isn’t a straightforward way to do that in your case.
