Problemm calculating H bonds
Posted: 06 Oct 2023, 18:05
I'm trying to build a cavity array with a spin coupled to one of them in the middle of the array. This is the Hamiltonian:
, where the two first terms are the energy and hopping for the photons in cavities and the last two represents the energy and coupling of the spin to the cavity in single excitation and two-level-system regime.
The model is a Bosonsite array and a SpinHalfSite added in the middle with IrregularLattice, in index 1 of that unit cell. I made the couplings with add_local_term as it follows:
...and there is no errors. Everything seems to be ok, but when I try to calculate the H bonds via calc_H_bond(), gives me this error:
I give you URL's if you want to try to figure out where is the problem:
calc_H_bond(): https://github.com/tenpy/tenpy/blob/mai ... l.py#L1618
to_nn_bond_Arrays(): https://github.com/tenpy/tenpy/blob/mai ... #L707-L742
to_TermList(): https://github.com/tenpy/tenpy/blob/mai ... ms.py#L441
I made a piece of code trying to see the output of to_TermList() applied to my case, and I don't really understand what it makes. It seems that it takes the category string from each opname in onsite_terms and creates one term for each character in it.
I know it is so complicated to follow my explanation, but I would appreciate any kind of help.
Thank you
, where the two first terms are the energy and hopping for the photons in cavities and the last two represents the energy and coupling of the spin to the cavity in single excitation and two-level-system regime.
The model is a Bosonsite array and a SpinHalfSite added in the middle with IrregularLattice, in index 1 of that unit cell. I made the couplings with add_local_term as it follows:
...and there is no errors. Everything seems to be ok, but when I try to calculate the H bonds via calc_H_bond(), gives me this error:
I give you URL's if you want to try to figure out where is the problem:
calc_H_bond(): https://github.com/tenpy/tenpy/blob/mai ... l.py#L1618
to_nn_bond_Arrays(): https://github.com/tenpy/tenpy/blob/mai ... #L707-L742
to_TermList(): https://github.com/tenpy/tenpy/blob/mai ... ms.py#L441
I made a piece of code trying to see the output of to_TermList() applied to my case, and I don't really understand what it makes. It seems that it takes the category string from each opname in onsite_terms and creates one term for each character in it.
I know it is so complicated to follow my explanation, but I would appreciate any kind of help.
Thank you