-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementation of the dynamic MPF feature
Co-authored-by: Kate Marshall <kate.marshall@ibm.com> Co-authored-by: Niall Robertson <niall.robertson@ibm.com> Co-authored-by: Alberto Baiardi <alberto.baiardi@ibm.com>
- Loading branch information
Showing
63 changed files
with
4,592 additions
and
334 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
37 changes: 37 additions & 0 deletions
37
docs/_templates/autosummary/class_without_inherited_members.rst
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,37 @@ | ||
{# | ||
We show all the class's methods and attributes on the same page. By default, we document | ||
all methods, including those defined by parent classes. | ||
-#} | ||
|
||
{{ objname | escape | underline }} | ||
|
||
.. currentmodule:: {{ module }} | ||
|
||
.. autoclass:: {{ objname }} | ||
:no-members: | ||
:no-inherited-members: | ||
:no-special-members: | ||
:show-inheritance: | ||
|
||
{% block attributes_summary %} | ||
{% if attributes %} | ||
.. rubric:: Attributes | ||
{% for item in attributes %} | ||
{%- if item not in inherited_members %} | ||
.. autoattribute:: {{ item }} | ||
{%- endif -%} | ||
{%- endfor %} | ||
{% endif %} | ||
{% endblock -%} | ||
|
||
{% block methods_summary %} | ||
{% set wanted_methods = (methods | reject('==', '__init__') | list) %} | ||
{% if wanted_methods %} | ||
.. rubric:: Methods | ||
{% for item in wanted_methods %} | ||
{%- if item not in inherited_members %} | ||
.. automethod:: {{ item }} | ||
{%- endif -%} | ||
{%- endfor %} | ||
{% endif %} | ||
{% endblock %} |
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 |
---|---|---|
|
@@ -6,3 +6,6 @@ | |
:maxdepth: 1 | ||
|
||
qiskit_addon_mpf.static | ||
qiskit_addon_mpf.dynamic | ||
qiskit_addon_mpf.costs | ||
qiskit_addon_mpf.backends |
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,8 @@ | ||
============================================================================ | ||
Quimb circuit-based backend (:mod:`qiskit_addon_mpf.backends.quimb_circuit`) | ||
============================================================================ | ||
|
||
.. automodule:: qiskit_addon_mpf.backends.quimb_circuit | ||
: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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
========================================================================= | ||
Quimb layer-based backend (:mod:`qiskit_addon_mpf.backends.quimb_layers`) | ||
========================================================================= | ||
|
||
.. automodule:: qiskit_addon_mpf.backends.quimb_layers | ||
: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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
================================================================ | ||
Quimb TEBD backend (:mod:`qiskit_addon_mpf.backends.quimb_tebd`) | ||
================================================================ | ||
|
||
.. automodule:: qiskit_addon_mpf.backends.quimb_tebd | ||
: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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
=========================================== | ||
Backends (:mod:`qiskit_addon_mpf.backends`) | ||
=========================================== | ||
|
||
.. automodule:: qiskit_addon_mpf.backends | ||
: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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
========================================================================= | ||
TeNPy layer-based backend (:mod:`qiskit_addon_mpf.backends.tenpy_layers`) | ||
========================================================================= | ||
|
||
.. automodule:: qiskit_addon_mpf.backends.tenpy_layers | ||
: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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
================================================================ | ||
TeNPy TEBD backend (:mod:`qiskit_addon_mpf.backends.tenpy_tebd`) | ||
================================================================ | ||
|
||
.. automodule:: qiskit_addon_mpf.backends.tenpy_tebd | ||
: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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
============================================== | ||
Cost Functions (:mod:`qiskit_addon_mpf.costs`) | ||
============================================== | ||
|
||
.. automodule:: qiskit_addon_mpf.costs | ||
: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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
============================================== | ||
Dynamic MPFs (:mod:`qiskit_addon_mpf.dynamic`) | ||
============================================== | ||
|
||
.. automodule:: qiskit_addon_mpf.dynamic | ||
: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
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
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,64 @@ | ||
# This code is a Qiskit project. | ||
# | ||
# (C) Copyright IBM 2024. | ||
# | ||
# 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. | ||
|
||
"""Optional backends for the :class:`.DynamicMPF` algorithm. | ||
.. currentmodule:: qiskit_addon_mpf.backends | ||
Availability | ||
------------ | ||
Whether a certain backend can be used depends on the availability of the underlying tensor network | ||
library. This can easily be asserted at runtime using the following indicators: | ||
.. autoclass:: HAS_QUIMB | ||
.. autoclass:: HAS_TENPY | ||
Backends | ||
-------- | ||
Depending on the availability (see above), the following backends are available: | ||
.. autosummary:: | ||
:toctree: | ||
quimb_tebd | ||
quimb_layers | ||
quimb_circuit | ||
tenpy_tebd | ||
tenpy_layers | ||
Interface | ||
--------- | ||
The interface implemented by any one of these optional backends is made up of the following classes: | ||
.. autoclass:: Evolver | ||
.. autoclass:: State | ||
""" | ||
|
||
from qiskit.utils import LazyImportTester as _LazyImportTester | ||
|
||
from .interface import Evolver, State | ||
|
||
HAS_QUIMB = _LazyImportTester("quimb", install="pip install qiskit-addon-mpf[quimb]") | ||
"""Indicates whether the optional :external:mod:`quimb` dependency is installed.""" | ||
|
||
HAS_TENPY = _LazyImportTester("tenpy", install="pip install qiskit-addon-mpf[tenpy]") | ||
"""Indicates whether the optional :external:mod:`tenpy` dependency is installed.""" | ||
|
||
__all__ = [ | ||
"Evolver", | ||
"State", | ||
] |
Oops, something went wrong.