Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing edge interactions for lattices with PBC and size = 2 #1375

Open
jagunther opened this issue Jan 16, 2025 · 0 comments
Open

Missing edge interactions for lattices with PBC and size = 2 #1375

jagunther opened this issue Jan 16, 2025 · 0 comments
Labels

Comments

@jagunther
Copy link

Environment

  • Qiskit Nature version: 0.7.2
  • Python version: 3.12
  • Operating system: MacOS

What is happening?

Hi, it seems that the edge-edge interactions for a lattice with periodic boundary conditions are skipped in dimensions where the lattice has size two. It's true that in those dimensions adding the boundary interactions is the same as doubling the bulk interaction, however, the code simply skips that. The place to look at is the function _create_boundary_edges() in the class HyperCubicLattice.

How can we reproduce the issue?

from qiskit_nature.second_q.hamiltonians.lattices import SquareLattice, BoundaryCondition
from qiskit_nature.second_q.hamiltonians import FermiHubbardModel

U = 1
J = 0.1
lattice = SquareLattice(2, 3, edge_parameter=-J, boundary_condition=(BoundaryCondition.PERIODIC, BoundaryCondition.PERIODIC))
fh_model = FermiHubbardModel(lattice, onsite_interaction=U)
hamil = fh_model.second_q_op().simplify().normal_order()
print(hamil)

Output:

  (-0.1+0j) * ( +_0 -_2 )
+ (-0.1+0j) * ( +_2 -_0 )
+ (-0.1+0j) * ( +_0 -_4 )
+ (-0.1+0j) * ( +_4 -_0 )
+ (-0.1+0j) * ( +_4 -_6 )
+ (-0.1+0j) * ( +_6 -_4 )
+ (-0.1+0j) * ( +_4 -_8 )
+ (-0.1+0j) * ( +_8 -_4 )
+ (-0.1+0j) * ( +_8 -_10 )
+ (-0.1+0j) * ( +_10 -_8 )
+ (-0.1+0j) * ( +_2 -_6 )
+ (-0.1+0j) * ( +_6 -_2 )
+ (-0.1+0j) * ( +_6 -_10 )
+ (-0.1+0j) * ( +_10 -_6 )
+ (-0.1+0j) * ( +_0 -_8 )
+ (-0.1+0j) * ( +_8 -_0 )
+ (-0.1+0j) * ( +_2 -_10 )
+ (-0.1+0j) * ( +_10 -_2 )
+ (-0.1+0j) * ( +_1 -_3 )
+ (-0.1+0j) * ( +_3 -_1 )
+ (-0.1+0j) * ( +_1 -_5 )
+ (-0.1+0j) * ( +_5 -_1 )
+ (-0.1+0j) * ( +_5 -_7 )
+ (-0.1+0j) * ( +_7 -_5 )
+ (-0.1+0j) * ( +_5 -_9 )
+ (-0.1+0j) * ( +_9 -_5 )
+ (-0.1+0j) * ( +_9 -_11 )
+ (-0.1+0j) * ( +_11 -_9 )
+ (-0.1+0j) * ( +_3 -_7 )
+ (-0.1+0j) * ( +_7 -_3 )
+ (-0.1+0j) * ( +_7 -_11 )
+ (-0.1+0j) * ( +_11 -_7 )
+ (-0.1+0j) * ( +_1 -_9 )
+ (-0.1+0j) * ( +_9 -_1 )
+ (-0.1+0j) * ( +_3 -_11 )
+ (-0.1+0j) * ( +_11 -_3 )
+ (-1+0j) * ( +_0 +_1 -_0 -_1 )
+ (-1+0j) * ( +_2 +_3 -_2 -_3 )
+ (-1+0j) * ( +_4 +_5 -_4 -_5 )
+ (-1+0j) * ( +_6 +_7 -_6 -_7 )
+ (-1+0j) * ( +_8 +_9 -_8 -_9 )
+ (-1+0j) * ( +_10 +_11 -_10 -_11 )

What should happen?

The layout of the lattice is

0/1 - 2/3
 |     |
4/5 - 6/7
 |     | 
8/9 - 10/11

Even and odd number for spin up and down, respectively.

With periodic boundary conditions we should expect to see the edge interactions (0,2), (4,6), (8,10) in dimension 1 and interactions (0,8) and (2,10) in dimension 2. Same for the spin downs.
Since interactions (0,2), (4,6) and (8,10) also exist in the bulk, we should see that the corresponding coefficients double, but that is not the case.

So the lattice has open boundary conditions in dimensions with size 2, although periodic boundary conditions were specified.

Any suggestions?

No response

@jagunther jagunther added the bug label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant