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

[QAOA] Documents Changes #754

Merged
merged 7 commits into from
Aug 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,22 @@
* Added an `ApproxTimeEvolution` template to the PennyLane templates module, which
can be used to implement Trotterized time-evolution under a Hamiltonian.
[(#710)](https://github.com/XanaduAI/pennylane/pull/710)

* Added a `qml.layer` template-constructing function, which takes a unitary, and
repeatedly applies it on a set of wires to a given depth.
[(#723)](https://github.com/PennyLaneAI/pennylane/pull/723)

* Added built-in QAOA functionality to PennyLane. This includes the following features:
* Added `qml.qaoa.x_mixer` and `qml.qaoa.xy_mixer` methods for defining Pauli-X and XY
mixer Hamiltonians.
[(#712)](https://github.com/PennyLaneAI/pennylane/pull/712)
* Added the `qml.qaoa.maxcut` method, which allows the user to get the cost Hamiltonian
and recommended mixer Hamiltonian for QAOA MaxCut, for a supplied graph.
[(#718)](https://github.com/PennyLaneAI/pennylane/pull/718)
[(#741)](https://github.com/PennyLaneAI/pennylane/pull/741)
* Added `qml.qaoa.cost_layer` and `qml.qaoa.mixer_layer`, which take cost and mixer Hamiltonians,
respectively, and apply the corresponding QAOA cost and mixer layers.
[(#720)](https://github.com/PennyLaneAI/pennylane/pull/720)

<h3>Improvements</h3>

Expand Down
23 changes: 21 additions & 2 deletions doc/code/qml_qaoa.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,26 @@ qml.qaoa

.. currentmodule:: pennylane.qaoa

.. automodapi:: pennylane.qaoa
Mixer Hamiltonians
------------------

.. automodapi:: pennylane.qaoa.mixers
:no-heading:
:no-inheritance-diagram:
:no-inherited-members:

Cost Hamiltonians
-----------------

.. automodapi:: pennylane.qaoa.cost
:no-heading:
:no-inheritance-diagram:
:no-inherited-members:

QAOA Layers
-----------

.. automodapi:: pennylane.qaoa.layers
:no-heading:
:no-inheritance-diagram:
:no-inherited-members:
:no-inherited-members:
2 changes: 1 addition & 1 deletion pennylane/qaoa/cost.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
r"""
This file contains functions that generate QAOA cost Hamiltonians corresponding to
Methods for generating QAOA cost Hamiltonians corresponding to
different optimization problems.
"""

Expand Down
2 changes: 1 addition & 1 deletion pennylane/qaoa/mixers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
r"""
This file contains built-in functions for constructing QAOA mixer Hamiltonians.
Methods for constructing QAOA mixer Hamiltonians.
"""
import networkx as nx
import pennylane as qml
Expand Down