Skip to content

Commit

Permalink
Move tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
frankharkins committed Sep 27, 2023
1 parent 0ebea4e commit f301204
Show file tree
Hide file tree
Showing 47 changed files with 49 additions and 34 deletions.
4 changes: 2 additions & 2 deletions docs/cloud/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ Choose a primitive to run

Qiskit Runtime uses primitives to interface with quantum computers and they are publicly available. Choose the appropriate link to continue learning how to run a primitive.

`Getting started with Sampler <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/tutorials/how-to-getting-started-with-sampler.html>`__
`Getting started with Sampler <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/tutorials/how-to-getting-started-with-sampler/index.html>`__

`Getting started with Estimator <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/tutorials/how-to-getting-started-with-estimator.html>`__
`Getting started with Estimator <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/tutorials/how-to-getting-started-with-estimator/index.html>`__
16 changes: 15 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
'reno.sphinxext',
'nbsphinx',
'sphinx_design',
"qiskit_sphinx_theme",
'sphinxext.rediraffe',
'qiskit_sphinx_theme',
]
templates_path = ['_templates']

Expand Down Expand Up @@ -161,3 +162,16 @@
html_sourcelink_suffix = ''

autoclass_content = 'both'

# -- Redirects ---------------------------------------------------------------

rediraffe_redirects = {
"tutorials/chsh_with_estimator.ipynb": "tutorials/chsh-with-estimator/index.ipynb",
"tutorials/Error-Suppression-and-Error-Mitigation.ipynb": "tutorials/error-suppression-and-error-mitigation/index.ipynb",
"tutorials/grover_with_sampler.ipynb": "tutorials/grover-with-sampler/index.ipynb",
"tutorials/how-to-getting-started-with-estimator.ipynb": "tutorials/how-to-getting-started-with-estimator/index.ipynb",
"tutorials/how-to-getting-started-with-sampler.ipynb": "tutorials/how-to-getting-started-with-sampler/index.ipynb",
"tutorials/qaoa_with_primitives.ipynb": "tutorials/qaoa-with-primitives/index.ipynb",
"tutorials/user-transpiled-circuits.ipynb": "tutorials/user-transpiled-circuits/index.ipynb",
"tutorials/vqe_with_estimator.ipynb": "tutorials/vqe-with-estimator/index.ipynb"
}
4 changes: 2 additions & 2 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ Getting started with primitives

.. nbgallery::

tutorials/how-to-getting-started-with-sampler
tutorials/how-to-getting-started-with-estimator
tutorials/how-to-getting-started-with-sampler/index
tutorials/how-to-getting-started-with-estimator/index


`See more tutorials <tutorials.html>`_
6 changes: 3 additions & 3 deletions docs/how_to/noisy_simulators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ distribution using the `Sampler primitive
to do the same. To learn how to use the ``Sampler`` primitive and how to
get started using Qiskit Runtime Sessions, you can check this tutorial:
`Get started with the Sampler
primitive <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/tutorials/how-to-getting-started-with-sampler.html>`__.
primitive <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/tutorials/how-to-getting-started-with-sampler/index.html>`__.

.. code-block:: python
Expand Down Expand Up @@ -151,7 +151,7 @@ Run the circuits on Estimator

To learn how to start a session for Estimator, you may check this
tutorial: `Get started with the Estimator
primitive <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/tutorials/how-to-getting-started-with-estimator.html>`__.
primitive <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/tutorials/how-to-getting-started-with-estimator/index.html>`__.

The Estimator will bind single-qubit rotations to get Hamiltonians
before it returns expectation values of quantum operators. Therefore,
Expand Down Expand Up @@ -420,7 +420,7 @@ explore additional options offered by them. If you want to learn more
about activating features like *Digital-ZNE*, *PEC* in addition to *M3*
and *T-REx* as shown in the previous examples, check out this tutorial:
`Error suppression and error mitigation with Qiskit
Runtime <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/tutorials/Error-Suppression-and-Error-Mitigation.html>`__.
Runtime <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/tutorials/error-suppression-and-error-mitigation/index.html>`__.

.. code-block:: python
Expand Down
16 changes: 8 additions & 8 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ Next steps
:hidden:
:caption: Tutorials

Get started with Estimator <tutorials/how-to-getting-started-with-estimator>
Get started with Sampler <tutorials/how-to-getting-started-with-sampler>
Get started with error suppression and error mitigation <tutorials/Error-Suppression-and-Error-Mitigation>
CHSH with Estimator <tutorials/chsh_with_estimator>
VQE with Estimator <tutorials/vqe_with_estimator>
Grover with Sampler <tutorials/grover_with_sampler>
QAOA with Primitives <tutorials/qaoa_with_primitives>
Submit user-transpiled circuits using primitives <tutorials/user-transpiled-circuits>
Get started with Estimator <tutorials/how-to-getting-started-with-estimator/index>
Get started with Sampler <tutorials/how-to-getting-started-with-sampler/index>
Get started with error suppression and error mitigation <tutorials/error-suppression-and-error-mitigation/index>
CHSH with Estimator <tutorials/chsh-with-estimator/index>
VQE with Estimator <tutorials/vqe-with-estimator/index>
Grover with Sampler <tutorials/grover-with-sampler/index>
QAOA with Primitives <tutorials/qaoa-with-primitives/index>
Submit user-transpiled circuits using primitives <tutorials/user-transpiled-circuits/index>
All tutorials <tutorials>

.. toctree::
Expand Down
2 changes: 1 addition & 1 deletion docs/migrate/migrate-estimator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ Note that the Estimator returns a list of values, as it can perform batched eval
The ``Estimator`` Runtime primitive offers a series of features and tuning options that do not have a legacy alternative
to migrate from, but can help improve your performance and results. For more information, refer to the following:

- `Error mitigation tutorial <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/tutorials/Error-Suppression-and-Error-Mitigation.html>`_
- `Error mitigation tutorial <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/tutorials/error-suppression-and-error-mitigation/index.html>`_
- `Setting execution options topic <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/how_to/options.html>`_
- `Primitive execution options API reference <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/stubs/qiskit_ibm_runtime.options.Options.html#qiskit_ibm_runtime.options.Options>`_
- `How to run a session topic <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/how_to/run_session.html>`_
Expand Down
4 changes: 2 additions & 2 deletions docs/migrate/migrate-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,6 @@ often occurs in optimization problems or chemistry applications. For example, w
Related links
-------------

* `Get started with Estimator <../tutorials/how-to-getting-started-with-estimator.ipynb>`__
* `Get started with Sampler <../tutorials/how-to-getting-started-with-sampler.ipynb>`__
* `Get started with Estimator <../tutorials/how-to-getting-started-with-estimator/index.ipynb>`__
* `Get started with Sampler <../tutorials/how-to-getting-started-with-sampler/index.ipynb>`__
* `Tutorial: Migrate from qiskit-ibmq-provider to qiskit-ibm-provider <https://qiskit.org/documentation/partners/qiskit_ibm_provider/tutorials/Migration_Guide_from_qiskit-ibmq-provider.html>`__
2 changes: 1 addition & 1 deletion docs/migrate/migrate-sampler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ notice that the workflow is now simplified, as the quasi-probability distributio
The ``Sampler`` Runtime primitive offers several features and tuning options that do not have a legacy alternative
to migrate from, but can help improve your performance and results. For more information, refer to the following:

- `Error mitigation tutorial <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/tutorials/Error-Suppression-and-Error-Mitigation.html>`_
- `Error mitigation tutorial <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/tutorials/error-suppression-and-error-mitigation/index.html>`-
- `Setting execution options topic <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/how_to/options.html>`_
- `How to run a session topic <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/how_to/run_session.html>`_

Expand Down
2 changes: 1 addition & 1 deletion docs/migrate/migrate-tuning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ For more information, and a complete list of advanced transpilation options, see
Finally, you might want to specify settings that are not available through the primitives interface,
or use custom transpiler passes. In these cases, you can set ``skip_transpilation=True`` to submit
user-transpiled circuits. To learn how this is done, refer to the
`Submitting user-transpiled circuits using primitives tutorial <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/tutorials/user-transpiled-circuits.html>`_.
`Submitting user-transpiled circuits using primitives tutorial <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/tutorials/user-transpiled-circuits/index.html>`_.

The ``skip_transpilation`` option is an advanced transpilation option, set as follows:

Expand Down
4 changes: 2 additions & 2 deletions docs/primitives.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ How to use primitives

Primitive interfaces vary based on the type of task that you want to run on the quantum computer and the corresponding data that you want returned as a result. After identifying the appropriate primitive for your program, you can use Qiskit to prepare inputs, such as circuits, observables (for Estimator), and customizable options to optimize your job. For more information, see the appropriate topic:

* `Getting started with Estimator <./tutorials/how-to-getting-started-with-estimator.ipynb>`__
* `Getting started with Sampler <./tutorials/how-to-getting-started-with-sampler.ipynb>`__
* `Getting started with Estimator <./tutorials/how-to-getting-started-with-estimator/index.ipynb>`__
* `Getting started with Sampler <./tutorials/how-to-getting-started-with-sampler/index.ipynb>`__
* :ref:`Migrate from qiskit-ibmq-provider to qiskit-ibm-runtime <migrate to primitives>`
16 changes: 8 additions & 8 deletions docs/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ Estimator

.. nbgallery::

tutorials/how-to-getting-started-with-estimator
tutorials/Error-Suppression-and-Error-Mitigation
tutorials/chsh_with_estimator
tutorials/vqe_with_estimator
tutorials/how-to-getting-started-with-estimator/index
tutorials/error-suppression-and-error-mitigation/index
tutorials/chsh-with-estimator/index
tutorials/vqe-with-estimator/index

Sampler
=================================

.. nbgallery::

tutorials/how-to-getting-started-with-sampler
tutorials/grover_with_sampler
tutorials/user-transpiled-circuits
tutorials/qaoa_with_primitives
tutorials/how-to-getting-started-with-sampler/index
tutorials/grover-with-sampler/index
tutorials/user-transpiled-circuits/index
tutorials/qaoa-with-primitives/index


.. Hiding - Indices and tables
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
}
},
"source": [
"In this tutorial we will focus on the `Estimator` primitive. There is a separate tutorial on [Getting started with the Sampler primitive](how-to-getting-started-with-sampler.ipynb)."
"In this tutorial we will focus on the `Estimator` primitive. There is a separate tutorial on [Getting started with the Sampler primitive](../how-to-getting-started-with-sampler/index.ipynb)."
]
},
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
}
},
"source": [
"In this tutorial we will focus on the `Sampler` primitive. There is a separate tutorial on [Getting started with the Estimator primitive](how-to-getting-started-with-estimator.ipynb)."
"In this tutorial we will focus on the `Sampler` primitive. There is a separate tutorial on [Getting started with the Estimator primitive](../how-to-getting-started-with-estimator/index.ipynb)."
]
},
{
Expand Down
Binary file not shown.
Binary file removed docs/tutorials/images/chip.png
Binary file not shown.
Binary file removed docs/tutorials/images/estimator.png
Binary file not shown.
Binary file removed docs/tutorials/images/pec_multiple_axes.png
Binary file not shown.
Binary file removed docs/tutorials/images/plot_combined.png
Binary file not shown.
Binary file removed docs/tutorials/images/plot_dd.png
Binary file not shown.
Binary file removed docs/tutorials/images/plot_pec.png
Binary file not shown.
Binary file removed docs/tutorials/images/plot_trex.png
Binary file not shown.
Binary file removed docs/tutorials/images/plot_zne.png
Binary file not shown.
Binary file not shown.
Binary file removed docs/tutorials/images/subgraphs.png
Diff not rendered.
Binary file removed docs/tutorials/images/surface_code_resources.png
Diff not rendered.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
"id": "fe36b13c",
"metadata": {},
"source": [
"As with an iterative optimization procedure, we now need to define our cost function over which to minimize. We proceed in an identical manner to the [VQE tutorial](vqe_with_estimator.ipynb), computing the expectation value of our Hamiltonian with respect to the parameterized ansatz circuit using the Qiskit Runtime `Estimator` primitive:"
"As with an iterative optimization procedure, we now need to define our cost function over which to minimize. We proceed in an identical manner to the [VQE tutorial](../vqe-with-estimator/index.ipynb), computing the expectation value of our Hamiltonian with respect to the parameterized ansatz circuit using the Qiskit Runtime `Estimator` primitive:"
]
},
{
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ sphinx-automodapi
sphinx-autodoc-typehints<=1.19.2
sphinx-design>=0.4.0
sphinx-intl
sphinxext-rediraffe
jupyter-sphinx
reno>=2.11.0
qiskit-sphinx-theme~=1.12.0

0 comments on commit f301204

Please sign in to comment.