diff --git a/demonstrations/tutorial_qaoa_intro.py b/demonstrations/tutorial_qaoa_intro.py index 7caed2f250..befd317d91 100644 --- a/demonstrations/tutorial_qaoa_intro.py +++ b/demonstrations/tutorial_qaoa_intro.py @@ -76,7 +76,7 @@ # :align: center # :width: 70% # -# In PennyLane, this is implemented using the :func:`~.pennylane.templates.ApproxTimeEvolution` +# In PennyLane, this is implemented using the :func:`~.pennylane.ApproxTimeEvolution` # template. For example, let's say we have the following Hamiltonian: import pennylane as qml @@ -284,9 +284,9 @@ def circuit(params, **kwargs): # :align: center # :width: 90% # -# While it is possible to use :func:`~.pennylane.templates.ApproxTimeEvolution`, the QAOA module allows you to -# build the cost and mixer layers directly using the functions :func:`~.pennylane.qaoa.cost_layer` and -# :func:`~.pennylane.qaoa.mixer_layer`, which take as input the respective Hamiltonian and variational parameters: +# While it is possible to use :func:`~.pennylane.ApproxTimeEvolution`, the QAOA module allows you to +# build the cost and mixer layers directly using the functions :func:`~.pennylane.qaoa.layers.cost_layer` and +# :func:`~.pennylane.qaoa.layers.mixer_layer`, which take as input the respective Hamiltonian and variational parameters: def qaoa_layer(gamma, alpha): @@ -424,7 +424,7 @@ def probability_circuit(gamma, alpha): # favour :math:`|10\rangle,` making it the only true ground state. # # It is easy to introduce constraints of this form in PennyLane. -# We can use the :func:`~.pennylane.qaoa.edge_driver` cost +# We can use the :func:`~.pennylane.qaoa.cost.edge_driver` cost # Hamiltonian to "reward" cases in which the first and last vertices of the graph # are :math:`0:` diff --git a/demonstrations/tutorial_vqe.py b/demonstrations/tutorial_vqe.py index 5795b87464..50203b7785 100644 --- a/demonstrations/tutorial_vqe.py +++ b/demonstrations/tutorial_vqe.py @@ -133,7 +133,7 @@ # tutorial :doc:`tutorial_givens_rotations`. # # Implementing the circuit above using PennyLane is straightforward. First, we use the -# :func:`hf_state` function to generate the vector representing the Hartree-Fock state. +# :func:`~.pennylane.qchem.hf_state` function to generate the vector representing the Hartree-Fock state. electrons = 2 hf = qml.qchem.hf_state(electrons, qubits) @@ -144,7 +144,7 @@ # the qubit register. Then, we just act with the :class:`~.pennylane.DoubleExcitation` operation # on the four qubits. The next step is to compute the expectation value # of the molecular Hamiltonian in the trial state prepared by the circuit. -# We do this using the :func:`~.expval` function. The decorator syntax allows us to +# We do this using the :func:`~.pennylane.expval` function. The decorator syntax allows us to # run the cost function as an executable QNode with the gate parameter :math:`\theta:` @qml.qnode(dev, interface="jax") @@ -265,7 +265,7 @@ def cost_fn(param): # molecular Hamiltonian in the trial state. # # The VQE algorithm can be used to simulate other chemical phenomena. -# In the tutorial :doc:`tutorial_vqe_bond_dissociation`, we use VQE to explore the +# In the tutorial :doc:`tutorial_chemical_reactions`, we use VQE to explore the # potential energy surface of molecules to simulate chemical reactions. # Another interesting application is to probe the lowest-lying states of molecules # in specific sectors of the Hilbert space. For example, see the tutorial