Search found 4 matches

by stabel
10 Feb 2025, 16:29
Forum: HowTos and FAQ for TeNPy
Topic: Problem defining nearest neighbour model
Replies: 4
Views: 63996

Re: Problem defining nearest neighbour model

Hi there, - Ah - add_coupling is repeated automatically over the sites. It seems to be working now thanks !!
by stabel
08 Feb 2025, 16:45
Forum: HowTos and FAQ for TeNPy
Topic: Problem defining nearest neighbour model
Replies: 4
Views: 63996

Re: Problem defining nearest neighbour model

Update ... sorry for the spam but at least I understood something ... judging by https://github.com/tenpy/tenpy/blob/main/tenpy/networks/terms.py#L707-L742 which has ... def add_coupling_term(self, strength, i, j, op_i, op_j, op_string='Id'): """Add a two-site coupling term on given M...
by stabel
08 Feb 2025, 14:37
Forum: HowTos and FAQ for TeNPy
Topic: Problem defining nearest neighbour model
Replies: 4
Views: 63996

Re: Problem defining nearest neighbour model

Addendum --- If I manually add the nearest neighbor couplings class Field(CouplingModel, NearestNeighborModel): def __init__(self): # Define the lattice with custom sites site = Qumode() lattice = Chain(lattice_size, site=site, bc='periodic') # Use open boundary conditions super().__init__(lattice) ...
by stabel
08 Feb 2025, 13:23
Forum: HowTos and FAQ for TeNPy
Topic: Problem defining nearest neighbour model
Replies: 4
Views: 63996

Problem defining nearest neighbour model

Hi there -- I have a problem defining nearest neighbor models. I'm still in the discovery phase of TeNPy so please be gentle. Here is my code .. class Field(CouplingModel, NearestNeighborModel): def __init__(self): # Define the lattice with custom sites site = Qumode() lattice = Chain(lattice_size, ...