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

Add lattice and Fermi-Hubbard model #365

Merged
merged 67 commits into from
Dec 9, 2021
Merged
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
0fd806e
add lattice and FermiHubbard
k-tamuraphys Sep 16, 2021
41f1776
Merge branch 'main' into latticemodel
manoelmarques Sep 17, 2021
bd6b0ac
minor update
k-tamuraphys Sep 21, 2021
cc883b4
update
k-tamuraphys Sep 21, 2021
65265b1
fix lint and refactor
ikkoham Sep 27, 2021
1cf63a3
Merge pull request #1 from ikkoham/latticemodel
k-tamuraphys Sep 27, 2021
2137434
add unit tests
k-tamuraphys Sep 27, 2021
a65b44b
update unit tests
k-tamuraphys Sep 28, 2021
a363676
update unit tests
k-tamuraphys Sep 28, 2021
4d439a5
fix typo of apidocs
k-tamuraphys Sep 28, 2021
8a52c35
fix docs generation
ikkoham Sep 28, 2021
a0db0f8
Merge pull request #2 from ikkoham/latticemodel
k-tamuraphys Sep 29, 2021
d58848c
minor update
k-tamuraphys Sep 29, 2021
13773a5
fix docs
ikkoham Sep 30, 2021
7d12de7
Merge pull request #3 from ikkoham/latticemodel
k-tamuraphys Sep 30, 2021
d50bd6e
solve conflict
k-tamuraphys Sep 30, 2021
c968a48
minor update
k-tamuraphys Sep 30, 2021
8a666e4
fix lint
k-tamuraphys Sep 30, 2021
b25d149
minor update
k-tamuraphys Oct 2, 2021
861a5e3
updates
k-tamuraphys Oct 5, 2021
68ccdf0
add comments and documentation
k-tamuraphys Oct 5, 2021
f629772
fix spell
k-tamuraphys Oct 5, 2021
50cfa35
minor update
k-tamuraphys Oct 7, 2021
8b6b3e6
Revert unnecessary changes
ikkoham Oct 18, 2021
5accf61
improves docs
ikkoham Oct 18, 2021
731644c
Merge pull request #4 from ikkoham/latticemodel
k-tamuraphys Oct 18, 2021
577d953
Merge branch 'main' into latticemodel
k-tamuraphys Oct 19, 2021
12deb4e
dynamical annotations
ikkoham Oct 19, 2021
b6daf85
Merge pull request #5 from ikkoham/latticemodel
k-tamuraphys Oct 19, 2021
75cd864
add release note
k-tamuraphys Oct 27, 2021
652ad04
minor update
k-tamuraphys Oct 27, 2021
88ed9a2
update document
k-tamuraphys Oct 27, 2021
80d1dfd
add DrawStyle
ikkoham Nov 11, 2021
5019722
Merge pull request #6 from ikkoham/latticemodel
k-tamuraphys Nov 11, 2021
4b8ed1a
minor update
k-tamuraphys Nov 11, 2021
8b11705
fix conflicts
k-tamuraphys Nov 11, 2021
3aee9cb
add tutorial
k-tamuraphys Nov 11, 2021
3fd722c
fix documentation
k-tamuraphys Nov 11, 2021
1c329b2
minor update
k-tamuraphys Nov 11, 2021
2999b98
extract functions
k-tamuraphys Nov 11, 2021
e1d7b77
edit pylintdict
k-tamuraphys Nov 12, 2021
304135a
add BoundaryCondition Enum
k-tamuraphys Nov 12, 2021
a1a5c3d
minor change
k-tamuraphys Nov 12, 2021
cb7484a
delete tutorial
k-tamuraphys Nov 12, 2021
7b0f478
fix releasenote
k-tamuraphys Nov 13, 2021
359cce2
minor update
k-tamuraphys Nov 13, 2021
b7e20dd
fix matplotlib dependency
k-tamuraphys Nov 16, 2021
b503deb
fix mypy error
ikkoham Nov 17, 2021
166d976
Merge branch 'main' into latticemodel
ikkoham Nov 17, 2021
a640d93
Merge branch 'main' into latticemodel
ikkoham Nov 24, 2021
71630de
Merge branch 'main' into latticemodel
manoelmarques Nov 25, 2021
28836ab
Merge branch 'main' into latticemodel
manoelmarques Nov 26, 2021
f3148b2
Merge branch 'main' into latticemodel
manoelmarques Nov 29, 2021
531b885
minor update
k-tamuraphys Nov 30, 2021
dc19ec3
Merge branch 'latticemodel' of github.com:k-tamuraphys/qiskit-nature …
k-tamuraphys Nov 30, 2021
215289c
Merge branch 'main' into latticemodel
manoelmarques Dec 1, 2021
ebfac06
Merge branch 'main' into latticemodel
manoelmarques Dec 4, 2021
138de92
change filepath (lattice -> lattices)
ikkoham Dec 6, 2021
fa03581
Merge branch 'main' into latticemodel
manoelmarques Dec 7, 2021
8beeb63
remove unnecessary return docs
ikkoham Dec 7, 2021
8af7388
remove unnecessary setter
ikkoham Dec 7, 2021
36367eb
fix copy
ikkoham Dec 7, 2021
bbd6a65
Merge branch 'main' into latticemodel
manoelmarques Dec 7, 2021
c688128
remove unnecessary getter (dim, size, boundary_edges)
ikkoham Dec 8, 2021
71d263b
improve typehint by PEP-563
ikkoham Dec 8, 2021
bc2e887
Revert "improve typehint by PEP-563"
ikkoham Dec 8, 2021
e0a22f0
fix spells
ikkoham Dec 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .pylintdict
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ ao
april
arginine
args
arrowheads
arrowstyle
arxiv
asparagine
aspartic
Expand Down Expand Up @@ -58,14 +60,17 @@ clbits
clifford
cliffords
cls
cmap
cnot
codec
coeff
coeffs
colormap
commutativities
conda
conf
config
connectionstyle
coord
coords
coul
Expand Down Expand Up @@ -165,6 +170,7 @@ hilbert
histidine
html
https
hubbard
ia
iajb
ifdef
Expand Down Expand Up @@ -218,6 +224,7 @@ libor
libxc
lih
lijh
linewidths
linux
ljik
lk
Expand All @@ -226,6 +233,7 @@ lookback
lysine
macos
makefile
matplotlib
maxdepth
maxiter
maxiters
Expand Down Expand Up @@ -302,6 +310,7 @@ phenylalanine
phonons
polypeptides
popovas
pos
posteriori
pre
prebuilt
Expand Down Expand Up @@ -338,6 +347,9 @@ rebranding
refactor
regs
repr
retworkx
rgb
rgba
rhf
rhs
robert
Expand Down Expand Up @@ -378,6 +390,7 @@ stereochemistry
sto
stober
str
stylesheet
subcircuits
subclasses
submodules
Expand Down Expand Up @@ -437,6 +450,8 @@ verbatim
vibrational
vibrationalop
vibro
vmax
vmin
vqe
vscf
vwn
Expand Down
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ unsafe-load-any-extension=no
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=
extension-pkg-whitelist=retworkx


[MESSAGES CONTROL]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
:no-members:
:no-inherited-members:
:no-special-members:

1 change: 0 additions & 1 deletion qiskit_nature/problems/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@
:toctree:

sampling

"""
8 changes: 8 additions & 0 deletions qiskit_nature/problems/second_quantization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
BaseProblem
ElectronicStructureProblem
VibrationalStructureProblem

Submodules
==========
.. autosummary::
:toctree: ../stubs/

lattice
mrossinek marked this conversation as resolved.
Show resolved Hide resolved

"""

from .base_problem import BaseProblem
Expand Down
54 changes: 54 additions & 0 deletions qiskit_nature/problems/second_quantization/lattice/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

ikkoham marked this conversation as resolved.
Show resolved Hide resolved
"""
Lattice Problems (:mod:`qiskit_nature.problems.second_quantization.lattice`)
=============================================================================
The `Lattice` class is used to generate a general lattice,
which is a graph with complex-valued weights on its edges.
The `HyperCubicLattice` class and others provide standard lattices with certain
translational symmetries.
`Models` include classes that define Hamiltonians on a lattice.
It takes a lattice object and model parameters as input and
generates a Hamiltonian defined on the lattice.

.. currentmodule:: qiskit_nature.problems.second_quantization.lattice

mrossinek marked this conversation as resolved.
Show resolved Hide resolved
Lattice
==============
.. autosummary::
:toctree: ../stubs/

Lattice
HyperCubicLattice
LineLattice
SquareLattice
TriangularLattice

Models
=======
.. autosummary::
:toctree: ../stubs/

FermiHubbardModel

"""
from .lattice import (
BoundaryCondition,
LatticeDrawStyle,
HyperCubicLattice,
Lattice,
LineLattice,
SquareLattice,
TriangularLattice,
)
from .models import FermiHubbardModel
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""A class containing information about the Lattice."""
from .boundary_condition import BoundaryCondition
from .hyper_cubic_lattice import HyperCubicLattice
from .lattice import LatticeDrawStyle, Lattice
from .line_lattice import LineLattice
from .square_lattice import SquareLattice
from .triangular_lattice import TriangularLattice
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""
This module declares the available boundary conditions.
"""

from enum import Enum


class BoundaryCondition(Enum):
"""Boundary condition Enum"""

OPEN = "open"
PERIODIC = "periodic"
Loading