Problems with add_local_term and H.c
Posted: 01 Feb 2022, 19:42
Hi,
I'm trying to decrease the number of terms appearing in the Hamiltonian MPO by using H. c. in add_coupling_term. However, when I use plus_hc I always get an error. I have tried this with different models, and I get the same error. I provide an example below.
I have a ladder of SpinHalfFermions on a Chain lattice with the following hopping coupling terms:
self.add_local_term(-adj_mat[i, j], [('Cdu', (i, 0)), ('Cu', (j, 0))])
self.add_local_term(adj_mat[i, j], [('Cu', (i, 0)), ('Cdu', (j, 0))])
self.add_local_term(-adj_mat[i, j], [('Cdd', (i, 0)), ('Cd', (j, 0))])
self.add_local_term(adj_mat[i, j], [('Cd', (i, 0)), ('Cdd', (j, 0))])
This case works without any problem. However, when I change to:
self.add_local_term(-adj_mat[i, j], [('Cdu', (i, 0)), ('Cu', (j, 0))],plus_hc=True)
self.add_local_term(adj_mat[i, j], [('Cd', (i, 0)), ('Cdd', (j, 0))],plus_hc=True)
I receive the error:
IndexError: tuple index out of range
Am I doing something wrong?
F. P. M. Méndez-Cordoba.
I'm trying to decrease the number of terms appearing in the Hamiltonian MPO by using H. c. in add_coupling_term. However, when I use plus_hc I always get an error. I have tried this with different models, and I get the same error. I provide an example below.
I have a ladder of SpinHalfFermions on a Chain lattice with the following hopping coupling terms:
self.add_local_term(-adj_mat[i, j], [('Cdu', (i, 0)), ('Cu', (j, 0))])
self.add_local_term(adj_mat[i, j], [('Cu', (i, 0)), ('Cdu', (j, 0))])
self.add_local_term(-adj_mat[i, j], [('Cdd', (i, 0)), ('Cd', (j, 0))])
self.add_local_term(adj_mat[i, j], [('Cd', (i, 0)), ('Cdd', (j, 0))])
This case works without any problem. However, when I change to:
self.add_local_term(-adj_mat[i, j], [('Cdu', (i, 0)), ('Cu', (j, 0))],plus_hc=True)
self.add_local_term(adj_mat[i, j], [('Cd', (i, 0)), ('Cdd', (j, 0))],plus_hc=True)
I receive the error:
IndexError: tuple index out of range
Am I doing something wrong?
F. P. M. Méndez-Cordoba.