Skip to content

Commit

Permalink
Add Migration Guide for Opflow (Qiskit#9549)
Browse files Browse the repository at this point in the history
* Add draft

* Remove qiskit

* Apply review

* Apply comments boxnote

* Small edit

* Apply review

* Update up to primitive ops

* Dump changes from sphinx repo

* Add twisties

* Update information, add examples

* Formatting changes

* Simplify intro

* Add links

* Add sampler example

* Update docs/migration_guides/opflow_migration.rst

Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>

* Update docs/migration_guides/opflow_migration.rst

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Update docs/migration_guides/opflow_migration.rst

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Update docs/migration_guides/opflow_migration.rst

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Update docs/migration_guides/opflow_migration.rst

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Apply suggestions from code review

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Update CircuitOp

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Applied suggestions locally

* Change format, links

* Add grouping, algorithms link

* Fix indentation

* Final review, add links

* Add gradients

* Apply heading suggestions

Co-authored-by: Junye Huang <h.jun.ye@gmail.com>

* Add tags

* Apply suggestions code review

* Correct code examples, add outputs

* Run code examples by doctest

* Remove underscores

* Apply suggestions second round of review

Co-authored-by: Junye Huang <h.jun.ye@gmail.com>

* Add globals link

* Change links to refs

* Add dropdowns

* Change doctest syntax, apply reviews

* Try CI config

* Add internal links

* Fix lint, add doctest import

* Fix cyclic import

* Fix cyclic import

* Apply suggestions from Declan's code review

Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Update qiskit/quantum_info/__init__.py

* Fix import

* Copy docs config from Qiskit#9716

* Make black

* Remove duplicate

* Reorder

---------

Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
Co-authored-by: Julien Gacon <gaconju@gmail.com>
Co-authored-by: Junye Huang <h.jun.ye@gmail.com>
Co-authored-by: Declan Millar <declan.millar@ibm.com>
  • Loading branch information
5 people authored and giacomoRanieri committed Apr 16, 2023
1 parent 5dae2dc commit 5667271
Show file tree
Hide file tree
Showing 10 changed files with 1,714 additions and 13 deletions.
20 changes: 17 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"sphinx.ext.viewcode",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx.ext.doctest",
"reno.sphinxext",
"sphinx_design",
"matplotlib.sphinxext.plot_directive",
Expand Down Expand Up @@ -65,7 +66,9 @@

intersphinx_mapping = {
"retworkx": ("https://qiskit.org/documentation/retworkx/", None),
"qiskit_ibm_runtime": ("https://qiskit.org/documentation/partners/qiskit_ibm_runtime/", None)
"qiskit-ibm-runtime": ("https://qiskit.org/documentation/partners/qiskit_ibm_runtime/", None),
"qiskit-aer": ("https://qiskit.org/documentation/aer/", None),
"numpy": ("https://numpy.org/doc/stable/", None)
}

# -- Options for HTML output -------------------------------------------------
Expand Down Expand Up @@ -113,6 +116,17 @@

autoclass_content = "both"

# -- Options for doctest -------------------------------------
# -- Options for Doctest --------------------------------------------------------

doctest_default_flags = doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE | doctest.IGNORE_EXCEPTION_DETAIL | doctest.DONT_ACCEPT_TRUE_FOR_1
import sphinx.ext.doctest

# This option will make doctest ignore whitespace when testing code.
# It's specially important for circuit representation as it gives an
# error otherwise
doctest_default_flags = sphinx.ext.doctest.doctest.NORMALIZE_WHITESPACE

# Leaving this string empty disables testing of doctest blocks from docstrings.
# Doctest blocks are structures like this one:
# >> code
# output
doctest_test_doctest_blocks = ""
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Qiskit Terra documentation
:hidden:

API References <apidocs/terra>
Release Notes <release_notes>
Migration Guides <migration_guides/index>

Release Notes <release_notes>

.. Hiding - Indices and tables
:ref:`genindex`
:ref:`modindex`
Expand Down
5 changes: 3 additions & 2 deletions docs/migration_guides/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
=======================
#######################
Qiskit Migration Guides
=======================
#######################

.. toctree::
:maxdepth: 1

opflow_migration
algorithms_migration
Loading

0 comments on commit 5667271

Please sign in to comment.