You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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
The text was updated successfully, but these errors were encountered:
Environment
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 classHyperCubicLattice
.How can we reproduce the issue?
Output:
What should happen?
The layout of the lattice is
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
The text was updated successfully, but these errors were encountered: