# [Julia]using a periodic boundary condition

+1 vote

Hi Miles

I want do time evolution in PBC with two sites Hamiltonian . For example, a chain made of 12 sites whose first site is related to the 12. I can only find code example in "Make a 2D Hamiltonian for DMRG" that uses
lattice = square_lattice(Nx, Ny; yperiodic = false)
If I imitate the code from "MPS Time Evolution" in document with my own Hamiltonian, how can I add PBC?

answered by (70.1k points)
selected by

Hi, to answer your question, I just added a "Frequently Asked Question" FAQ entry here:
https://itensor.github.io/ITensors.jl/dev/faq/DMRG.html#How-to-do-periodic-boundary-condition-DMRG

since it's something I get asked from time to time.

Please let me know if that FAQ doesn't answer your question & we could discuss it more.

Miles

commented by (320 points)
Thanks a lot. The code works well.Before you told me, I thought the PBC time evolution is different from  PBC DMRG. But I can do it the same way.
commented by (70.1k points)
I see, yes for time evolution it’s very similar. Though if you use Trotter gates then it can get expensive to do the “long bond” that way. We will soon release a TDVP code that will be a better option for complicated Hamiltonians such as periodic ones.