Problem while simulating spin polarized interacting SSH model

  • Context: Graduate 
  • Thread starter Thread starter Dhiman9163
  • Start date Start date
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
Dhiman9163
Messages
1
Reaction score
0
TL;DR
I am trying to solve the system using exact diagonalization
I want to simulate a spin polarized SSH model with Hamiltonian of the form
$$\hat{H} = v \sum_{i = 1}^N (\hat{C}_{i,A}^\dagger \hat{C}_{i,B} + h.c.) + w \sum_{i = 1}^N (\hat{C}_{i+1,A}^\dagger \hat{C}_{i,B} + h.c.) + V_1 \sum_{i = 1}^N \hat{n}_{i, A}\hat{n}_{i, B} + V_2 \sum_{i = 1}^N \hat{n}_{i+1, A}\hat{n}_{i, B}$$
I have already simulated the non-interacting part, which works fine. The code for it can be seen [here][1]. But when I include the interacting part, the Hamiltonian matrix become non-hermitian. The code for the interacting system can be seen [here][2].\
From the analytical Hamiltonian, it is clear that the Hamiltonian matrix should be Hermitian. Therefore, I have made some mistake while implementing it. But I can not understand what the mistake is or how to fix it. Can anyone help me do that?


[1]: https://github.com/dhimankchakraborty/Non-Interacting-SSH-Model-without-Spin
[2]: https://github.com/dhimankchakraborty/Interacting-SSH-Model-without-Spin/blob/main/test_01.ipynb
 
Physics news on Phys.org
Looking at the notebook (test_01.ipynb), the interaction part likely uses a function that loops over all pairs of sites for V1V1 and V2V2, but maybe the indexing of sites in the two sublattices is messed up.

For example, in a 1D chain of 2N sites (N unit cells, each with A and B),
site index for A in cell i = 2*i - 2 (if starting from 0)
site index for B in cell i = 2*i - 1

Then V1V1 term: ni,Ani,Bni,Ani,B → sites (2i-2) and (2i-1)
V2V2 term: ni+1,Ani,Bni+1,Ani,B → sites (2i) and (2i-1)

If i runs up to N, then for V2V2, when i = N, site 2N (which is i+1,A) may be beyond the number of sites if not careful with boundary conditions.

If OBC, then for i=N, site 2N doesn’t exist — so must skip that term. If code doesn’t skip, it might try to access an invalid index, leading to a wrong matrix element or even an out-of-bounds write that corrupts the matrix.

Possible fix:

Check boundary conditions explicitly — for OBC, V2V2 sum should be over i=1 to N-1 only.

Verify indexing function — make sure the function that maps (unit_cell, sublattice) to site index is correct and consistent.

Print the Hamiltonian matrix for a very small system (N=2) and check which off-diagonal elements are non-zero — they should be symmetric.

Ensure that H[bra,ket] = value and H[ket,bra] = conj(value) are both set for off-diagonal hopping terms. For diagonal terms (like interactions), they are real and symmetric automatically.