Hello ,
I have been learning to construct my own model on TenPy using "add_multi_coupling" command.
Suppose I have a square lattice and my terms in the Hamiltonian have staggered coefficients such as (-1)^(x+y) where (x,y) is a lattice coefficient, can I simply do this using "add_multi_coupling" ?
I was able to do this in 1-D using a vector such as [[-1,1]] for the coupling strength. For 2-D, since there are two directions, is there a similar way to incorporate staggering ?
Thank you !
Incorporating staggering in a 2-D model
Re: Incorporating staggering in a 2-D model
Sure, just use a corresponding 2D array for the strength should work.
It's documented in add_multi_coupling, by the way, but probably not clear enough?
The reference in there should have pointed to possible_multi_couplings, which directly gives you the valid shape for the strength, e.g. trying
outputs
For periodic boundary conditions (in both directions), you would rather get the full (4,6) shape.
If you get shapes with even length like (4,6), you can do the same
For odd length, you need explicitly to specify the full set of stengths for each coupling, i.e. something like
It's documented in add_multi_coupling, by the way, but probably not clear enough?
The reference in there should have pointed to possible_multi_couplings, which directly gives you the valid shape for the strength, e.g. trying
Python: Select all
square = tenpy.models.lattice.Square(4, 6, None)
mps_ijkl, lat_inds, coupling_shape = square.possible_multi_couplings(
[('A', [0, 0], 0), ('B', [0, 1], 0), ('C', [1, 1], 0), ('D', [0, 1], 0)])
print(coupling_shape)
(3, 5)
, since you can fit 3x5 plaquette-couplings into the 4x6 lattice.For periodic boundary conditions (in both directions), you would rather get the full (4,6) shape.
If you get shapes with even length like (4,6), you can do the same
strength = np.array([[1, -1], [-1, 1]])
as in the 1D case, because this fits by tiling uniquely without "broken" tiles.For odd length, you need explicitly to specify the full set of stengths for each coupling, i.e. something like
Python: Select all
_, _, (sx, sy) = lat.possible_multi_couplings(ops)
strength = (-1)**np.arange(sx)[:, np.newaxis] * (-1)**np.arange(sy)[np.newaxis, :]
-
- Posts: 3
- Joined: 21 Aug 2023, 17:07
Re: Incorporating staggering in a 2-D model
Thank you very much ! That helped me..