-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add lattice and Fermi-Hubbard model (#365)
* add lattice and FermiHubbard * minor update * update * fix lint and refactor * add unit tests * update unit tests * update unit tests * fix typo of apidocs * fix docs generation * minor update * fix docs * minor update * fix lint * minor update * updates * add comments and documentation * fix spell * minor update * Revert unnecessary changes * improves docs * dynamical annotations * add release note * minor update * update document * add DrawStyle * minor update * add tutorial * fix documentation * minor update * extract functions * edit pylintdict * add BoundaryCondition Enum * minor change * delete tutorial * fix releasenote * minor update * fix matplotlib dependency * fix mypy error * minor update * change filepath (lattice -> lattices) * remove unnecessary return docs * remove unnecessary setter * fix copy * remove unnecessary getter (dim, size, boundary_edges) * improve typehint by PEP-563 * Revert "improve typehint by PEP-563" This reverts commit 71d263b. * fix spells Co-authored-by: Manoel Marques <[email protected]> Co-authored-by: ikkoham <[email protected]>
- Loading branch information
1 parent
714b88b
commit 25c72a0
Showing
26 changed files
with
2,151 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ | |
:no-members: | ||
:no-inherited-members: | ||
:no-special-members: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,5 +32,4 @@ | |
:toctree: | ||
sampling | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
qiskit_nature/problems/second_quantization/lattice/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
""" | ||
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 | ||
Lattice | ||
============== | ||
.. autosummary:: | ||
:toctree: ../stubs/ | ||
Lattice | ||
HyperCubicLattice | ||
LineLattice | ||
SquareLattice | ||
TriangularLattice | ||
Models | ||
======= | ||
.. autosummary:: | ||
:toctree: ../stubs/ | ||
FermiHubbardModel | ||
""" | ||
from .lattices import ( | ||
BoundaryCondition, | ||
LatticeDrawStyle, | ||
HyperCubicLattice, | ||
Lattice, | ||
LineLattice, | ||
SquareLattice, | ||
TriangularLattice, | ||
) | ||
from .models import FermiHubbardModel |
19 changes: 19 additions & 0 deletions
19
qiskit_nature/problems/second_quantization/lattice/lattices/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
24 changes: 24 additions & 0 deletions
24
qiskit_nature/problems/second_quantization/lattice/lattices/boundary_condition.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
Oops, something went wrong.