Skip to content

Commit

Permalink
Add KagomeLattice class (#1038)
Browse files Browse the repository at this point in the history
* feat: add kagome lattice draft implementation

* chore: add unit tests

* fix: docstrings

* feat: shift nodes so that edges can seen for periodic boundary conditions

* fix: restore `_coordinate_to_index` for uniformity

* chore: add release note

* chore: lint

* fix: add 'kagome' to pylint dictionary

* fix: years in copyright headers

* fix: remove ascii kagome lattice

* Apply suggestions from code review

Co-authored-by: Max Rossmannek <[email protected]>

* Apply suggestions from code review

Co-authored-by: Max Rossmannek <[email protected]>

* fix: explicit documentation for `rows` and `cols` arguments

* chore: move over identical settings between the two subtests to `setUp`

* chore: expose relevant internal instance variables as read-only

* chore: appropriately demarcate class attributes and instance attributes

* fix: docstrings

* chore: expand docstring for class

* fix: typos

* chore: update dictionary

* fix: incorrect primitive basis

* Update test/second_q/hamiltonians/lattices/test_kagome_lattice.py

Co-authored-by: Max Rossmannek <[email protected]>

* Apply suggestions from code review

Co-authored-by: Max Rossmannek <[email protected]>

* Apply suggestions from code review

Co-authored-by: Max Rossmannek <[email protected]>

* Apply suggestions from code review

Co-authored-by: Max Rossmannek <[email protected]>

* chore: add usage example to release note

* Apply suggestions from code review

Co-authored-by: Max Rossmannek <[email protected]>

* fix: typo

* chore: lint and format

* Apply suggestions from code review

Co-authored-by: Max Rossmannek <[email protected]>

* chore: apply suggestions from code review

* removes redundant `with_boundaries` optional parameter
* moves `__init__` above all private methods
* removes various variable duplication
* fixes docstrings
* makes boundary conditions Enum clickable links on the online
  documentation

Co-authored-by: Max Rossmannek <[email protected]>

* feat: periodicity in only one direction and corresponding test cases

* fix: node default positions in mixed boundary case

* lint: fix mypy and updated headers

---------

Co-authored-by: Max Rossmannek <[email protected]>
Co-authored-by: Max Rossmannek <[email protected]>
  • Loading branch information
3 people authored Sep 4, 2023
1 parent 72f28aa commit 0f73ea7
Show file tree
Hide file tree
Showing 5 changed files with 736 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .pylintdict
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ boson
bosons
bosonic
bosonicop
bravais
bravyi
calcinfo
cargs
Expand Down Expand Up @@ -284,6 +285,7 @@ josé
json
jupyter
jw
kagome
kanav
ket
kitaev
Expand Down
3 changes: 3 additions & 0 deletions qiskit_nature/second_q/hamiltonians/lattices/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
SquareLattice
TriangularLattice
HyperCubicLattice
KagomeLattice
"""

Expand All @@ -33,6 +34,7 @@
from .line_lattice import LineLattice
from .square_lattice import SquareLattice
from .triangular_lattice import TriangularLattice
from .kagome_lattice import KagomeLattice

__all__ = [
"BoundaryCondition",
Expand All @@ -42,4 +44,5 @@
"SquareLattice",
"TriangularLattice",
"HyperCubicLattice",
"KagomeLattice",
]
Loading

0 comments on commit 0f73ea7

Please sign in to comment.