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

Switch to Furo docs theme #10498

Closed
wants to merge 7 commits into from
Closed
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
32 changes: 20 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

"""Sphinx documentation builder."""

# -- General configuration ---------------------------------------------------
import datetime
import doctest
import os

project = "Qiskit"
copyright = f"2017-{datetime.date.today().year}, Qiskit Development Team" # pylint: disable=redefined-builtin
project_copyright = f"2017-{datetime.date.today().year}, Qiskit Development Team"
author = "Qiskit Development Team"

# The short X.Y version
Expand All @@ -32,14 +32,14 @@
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx.ext.doctest",
"reno.sphinxext",
"sphinx_design",
"sphinx_remove_toctrees",
"matplotlib.sphinxext.plot_directive",
"sphinx.ext.doctest"
"qiskit_sphinx_theme",
]

templates_path = ["_templates"]
Expand Down Expand Up @@ -72,17 +72,15 @@
"matplotlib": ("https://matplotlib.org/stable/", None),
}

# This speeds up the docs build because it works around the Furo theme's slowdown from the left
# sidebar when the site has lots of HTML pages. But, it results in a much worse user experience,
# so we only use it in dev/CI builds.
remove_from_toctrees = ["stubs/*"]

# -- Options for HTML output -------------------------------------------------

html_theme = "qiskit_sphinx_theme"
html_theme = "qiskit"
html_last_updated_fmt = "%Y/%m/%d"
html_theme_options = {
"logo_only": True,
"display_version": True,
"prev_next_buttons_location": "bottom",
"style_external_links": True,
}


# -- Options for Autosummary and Autodoc -------------------------------------

Expand Down Expand Up @@ -134,3 +132,13 @@
# >> code
# output
doctest_test_doctest_blocks = ""

# ---------------------------------------------------------------------------------------
# Prod changes
# ---------------------------------------------------------------------------------------

if os.getenv("DOCS_PROD_BUILD"):
# `viewcode` down the Furo-based theme by about 14 minutes.
extensions.append("sphinx.ext.viewcode")
# Include all pages in the left sidebar in prod.
remove_from_toctrees = []
26 changes: 9 additions & 17 deletions qiskit/algorithms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,23 +277,7 @@
Exceptions
----------

.. autosummary::
:toctree: ../stubs/

AlgorithmError


Utility methods
---------------

Utility methods used by algorithms.

.. autosummary::
:toctree: ../stubs/

eval_observables
estimate_observables

.. autoexception:: AlgorithmError

Utility classes
---------------
Expand All @@ -305,6 +289,14 @@

AlgorithmJob

Utility functions
-----------------

Utility functions used by algorithms.

.. autofunction:: eval_observables
.. autofunction:: estimate_observables

"""
import warnings

Expand Down
15 changes: 3 additions & 12 deletions qiskit/assembler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,17 @@
Circuit Assembler
=================

.. autosummary::
:toctree: ../stubs/

assemble_circuits
.. autofunction:: assemble_circuits

Schedule Assembler
==================

.. autosummary::
:toctree: ../stubs/

assemble_schedules
.. autofunction:: assemble_schedules

Disassembler
============

.. autosummary::
:toctree: ../stubs/

disassemble
.. autofunction:: disassemble

RunConfig
=========
Expand Down
5 changes: 1 addition & 4 deletions qiskit/circuit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,7 @@
Random Circuits
---------------

.. autosummary::
:toctree: ../stubs/

random.random_circuit
.. autofunction:: qiskit.circuit.random.random_circuit
"""
from .quantumcircuit import QuantumCircuit
from .classicalregister import ClassicalRegister, Clbit
Expand Down
151 changes: 71 additions & 80 deletions qiskit/circuit/library/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,98 +394,89 @@
Techniques for the synthesis of reversible Toffoli networks, 2007
http://dx.doi.org/10.1145/1278349.1278355

.. autosummary::
:toctree: ../stubs/

templates.nct.template_nct_2a_1
templates.nct.template_nct_2a_2
templates.nct.template_nct_2a_3
templates.nct.template_nct_4a_1
templates.nct.template_nct_4a_2
templates.nct.template_nct_4a_3
templates.nct.template_nct_4b_1
templates.nct.template_nct_4b_2
templates.nct.template_nct_5a_1
templates.nct.template_nct_5a_2
templates.nct.template_nct_5a_3
templates.nct.template_nct_5a_4
templates.nct.template_nct_6a_1
templates.nct.template_nct_6a_2
templates.nct.template_nct_6a_3
templates.nct.template_nct_6a_4
templates.nct.template_nct_6b_1
templates.nct.template_nct_6b_2
templates.nct.template_nct_6c_1
templates.nct.template_nct_7a_1
templates.nct.template_nct_7b_1
templates.nct.template_nct_7c_1
templates.nct.template_nct_7d_1
templates.nct.template_nct_7e_1
templates.nct.template_nct_9a_1
templates.nct.template_nct_9c_1
templates.nct.template_nct_9c_2
templates.nct.template_nct_9c_3
templates.nct.template_nct_9c_4
templates.nct.template_nct_9c_5
templates.nct.template_nct_9c_6
templates.nct.template_nct_9c_7
templates.nct.template_nct_9c_8
templates.nct.template_nct_9c_9
templates.nct.template_nct_9c_10
templates.nct.template_nct_9c_11
templates.nct.template_nct_9c_12
templates.nct.template_nct_9d_1
templates.nct.template_nct_9d_2
templates.nct.template_nct_9d_3
templates.nct.template_nct_9d_4
templates.nct.template_nct_9d_5
templates.nct.template_nct_9d_6
templates.nct.template_nct_9d_7
templates.nct.template_nct_9d_8
templates.nct.template_nct_9d_9
templates.nct.template_nct_9d_10
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_2a_1
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_2a_2
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_2a_3
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_4a_1
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_4a_2
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_4a_3
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_4b_1
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_4b_2
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_5a_1
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_5a_2
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_5a_3
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_5a_4
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_6a_1
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_6a_2
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_6a_3
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_6a_4
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_6b_1
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_6b_2
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_6c_1
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_7a_1
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_7b_1
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_7c_1
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_7d_1
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_7e_1
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9a_1
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9c_1
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9c_2
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9c_3
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9c_4
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9c_5
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9c_6
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9c_7
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9c_8
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9c_9
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9c_10
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9c_11
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9c_12
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9d_1
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9d_2
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9d_3
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9d_4
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9d_5
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9d_6
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9d_7
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9d_8
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9d_9
.. autofunction:: qiskit.circuit.library.templates.nct.template_nct_9d_10

Clifford template circuits
--------------------------

Template circuits over Clifford gates.

.. autosummary::
:toctree: ../stubs/

clifford_2_1
clifford_2_2
clifford_2_3
clifford_2_4
clifford_3_1
clifford_4_1
clifford_4_2
clifford_4_3
clifford_4_4
clifford_5_1
clifford_6_1
clifford_6_2
clifford_6_3
clifford_6_4
clifford_6_5
clifford_8_1
clifford_8_2
clifford_8_3
.. autofunction:: clifford_2_1
.. autofunction:: clifford_2_2
.. autofunction:: clifford_2_3
.. autofunction:: clifford_2_4
.. autofunction:: clifford_3_1
.. autofunction:: clifford_4_1
.. autofunction:: clifford_4_2
.. autofunction:: clifford_4_3
.. autofunction:: clifford_4_4
.. autofunction:: clifford_5_1
.. autofunction:: clifford_6_1
.. autofunction:: clifford_6_2
.. autofunction:: clifford_6_3
.. autofunction:: clifford_6_4
.. autofunction:: clifford_6_5
.. autofunction:: clifford_8_1
.. autofunction:: clifford_8_2
.. autofunction:: clifford_8_3

RZXGate template circuits
-------------------------

Template circuits with :class:`~qiskit.circuit.library.RZXGate`.

.. autosummary::
:toctree: ../stubs/

rzx_yz
rzx_xz
rzx_cy
rzx_zz1
rzx_zz2
rzx_zz3
.. autofunction:: rzx_yz
.. autofunction:: rzx_xz
.. autofunction:: rzx_cy
.. autofunction:: rzx_zz1
.. autofunction:: rzx_zz2
.. autofunction:: rzx_zz3

"""

Expand Down
11 changes: 4 additions & 7 deletions qiskit/compiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@
Circuit and Pulse Compilation Functions
=======================================

.. autosummary::
:toctree: ../stubs/

assemble
schedule
transpile
sequence
.. autofunction:: assemble
.. autofunction:: schedule
.. autofunction:: transpile
.. autofunction:: sequence

"""

Expand Down
21 changes: 9 additions & 12 deletions qiskit/converters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,15 @@

.. currentmodule:: qiskit.converters

.. autosummary::
:toctree: ../stubs/

circuit_to_dag
dag_to_circuit
circuit_to_instruction
circuit_to_gate
ast_to_dag
dagdependency_to_circuit
circuit_to_dagdependency
dag_to_dagdependency
dagdependency_to_dag
.. autofunction:: circuit_to_dag
.. autofunction:: dag_to_circuit
.. autofunction:: circuit_to_instruction
.. autofunction:: circuit_to_gate
.. autofunction:: ast_to_dag
.. autofunction:: dagdependency_to_circuit
.. autofunction:: circuit_to_dagdependency
.. autofunction:: dag_to_dagdependency
.. autofunction:: dagdependency_to_dag
"""

from .circuit_to_dag import circuit_to_dag
Expand Down
14 changes: 4 additions & 10 deletions qiskit/opflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,21 +149,15 @@
Utility functions
=================

.. autosummary::
:toctree: ../stubs/

commutator
anti_commutator
double_commutator
.. autofunction:: commutator
.. autofunction:: anti_commutator
.. autofunction:: double_commutator


Exceptions
==========

.. autosummary::
:toctree: ../stubs/

OpflowError
.. autoexception:: OpflowError
"""
import warnings

Expand Down
Loading