Skip to content

Commit 4292678

Browse files
Catalina demos tiny fixes1 (#1553)
Fixed some links in demos
1 parent 9fd2eb8 commit 4292678

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

demonstrations_v2/tutorial_qaoa_intro/demo.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
# :align: center
7777
# :width: 70%
7878
#
79-
# In PennyLane, this is implemented using the :func:`~.pennylane.templates.ApproxTimeEvolution`
79+
# In PennyLane, this is implemented using the :func:`~.pennylane.ApproxTimeEvolution`
8080
# template. For example, let's say we have the following Hamiltonian:
8181

8282
import pennylane as qml
@@ -284,9 +284,9 @@ def circuit(params, **kwargs):
284284
# :align: center
285285
# :width: 90%
286286
#
287-
# While it is possible to use :func:`~.pennylane.templates.ApproxTimeEvolution`, the QAOA module allows you to
288-
# build the cost and mixer layers directly using the functions :func:`~.pennylane.qaoa.cost_layer` and
289-
# :func:`~.pennylane.qaoa.mixer_layer`, which take as input the respective Hamiltonian and variational parameters:
287+
# While it is possible to use :func:`~.pennylane.ApproxTimeEvolution`, the QAOA module allows you to
288+
# build the cost and mixer layers directly using the functions :func:`~.pennylane.qaoa.layers.cost_layer` and
289+
# :func:`~.pennylane.qaoa.layers.mixer_layer`, which take as input the respective Hamiltonian and variational parameters:
290290

291291

292292
def qaoa_layer(gamma, alpha):
@@ -424,7 +424,7 @@ def probability_circuit(gamma, alpha):
424424
# favour :math:`|10\rangle,` making it the only true ground state.
425425
#
426426
# It is easy to introduce constraints of this form in PennyLane.
427-
# We can use the :func:`~.pennylane.qaoa.edge_driver` cost
427+
# We can use the :func:`~.pennylane.qaoa.cost.edge_driver` cost
428428
# Hamiltonian to "reward" cases in which the first and last vertices of the graph
429429
# are :math:`0:`
430430

demonstrations_v2/tutorial_vqe/demo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
# tutorial :doc:`demos/tutorial_givens_rotations`.
132132
#
133133
# Implementing the circuit above using PennyLane is straightforward. First, we use the
134-
# :func:`hf_state` function to generate the vector representing the Hartree-Fock state.
134+
# :func:`~.pennylane.qchem.hf_state` function to generate the vector representing the Hartree-Fock state.
135135

136136
electrons = 2
137137
hf = qml.qchem.hf_state(electrons, qubits)
@@ -142,7 +142,7 @@
142142
# the qubit register. Then, we just act with the :class:`~.pennylane.DoubleExcitation` operation
143143
# on the four qubits. The next step is to compute the expectation value
144144
# of the molecular Hamiltonian in the trial state prepared by the circuit.
145-
# We do this using the :func:`~.expval` function. The decorator syntax allows us to
145+
# We do this using the :func:`~.pennylane.expval` function. The decorator syntax allows us to
146146
# run the cost function as an executable QNode with the gate parameter :math:`\theta:`
147147

148148
@qml.qnode(dev, interface="jax")
@@ -263,7 +263,7 @@ def cost_fn(param):
263263
# molecular Hamiltonian in the trial state.
264264
#
265265
# The VQE algorithm can be used to simulate other chemical phenomena.
266-
# In the tutorial :doc:`demos/tutorial_vqe_bond_dissociation`, we use VQE to explore the
266+
# In the tutorial :doc:`demos/tutorial_chemical_reactions`, we use VQE to explore the
267267
# potential energy surface of molecules to simulate chemical reactions.
268268
# Another interesting application is to probe the lowest-lying states of molecules
269269
# in specific sectors of the Hilbert space. For example, see the tutorial

0 commit comments

Comments
 (0)