Skip to content

Commit

Permalink
Document functions on module pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Arellano committed Jul 25, 2023
1 parent 07b06f9 commit 3389c83
Show file tree
Hide file tree
Showing 25 changed files with 293 additions and 473 deletions.
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:: 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:: templates.nct.template_nct_2a_1
.. autofunction:: templates.nct.template_nct_2a_2
.. autofunction:: templates.nct.template_nct_2a_3
.. autofunction:: templates.nct.template_nct_4a_1
.. autofunction:: templates.nct.template_nct_4a_2
.. autofunction:: templates.nct.template_nct_4a_3
.. autofunction:: templates.nct.template_nct_4b_1
.. autofunction:: templates.nct.template_nct_4b_2
.. autofunction:: templates.nct.template_nct_5a_1
.. autofunction:: templates.nct.template_nct_5a_2
.. autofunction:: templates.nct.template_nct_5a_3
.. autofunction:: templates.nct.template_nct_5a_4
.. autofunction:: templates.nct.template_nct_6a_1
.. autofunction:: templates.nct.template_nct_6a_2
.. autofunction:: templates.nct.template_nct_6a_3
.. autofunction:: templates.nct.template_nct_6a_4
.. autofunction:: templates.nct.template_nct_6b_1
.. autofunction:: templates.nct.template_nct_6b_2
.. autofunction:: templates.nct.template_nct_6c_1
.. autofunction:: templates.nct.template_nct_7a_1
.. autofunction:: templates.nct.template_nct_7b_1
.. autofunction:: templates.nct.template_nct_7c_1
.. autofunction:: templates.nct.template_nct_7d_1
.. autofunction:: templates.nct.template_nct_7e_1
.. autofunction:: templates.nct.template_nct_9a_1
.. autofunction:: templates.nct.template_nct_9c_1
.. autofunction:: templates.nct.template_nct_9c_2
.. autofunction:: templates.nct.template_nct_9c_3
.. autofunction:: templates.nct.template_nct_9c_4
.. autofunction:: templates.nct.template_nct_9c_5
.. autofunction:: templates.nct.template_nct_9c_6
.. autofunction:: templates.nct.template_nct_9c_7
.. autofunction:: templates.nct.template_nct_9c_8
.. autofunction:: templates.nct.template_nct_9c_9
.. autofunction:: templates.nct.template_nct_9c_10
.. autofunction:: templates.nct.template_nct_9c_11
.. autofunction:: templates.nct.template_nct_9c_12
.. autofunction:: templates.nct.template_nct_9d_1
.. autofunction:: templates.nct.template_nct_9d_2
.. autofunction:: templates.nct.template_nct_9d_3
.. autofunction:: templates.nct.template_nct_9d_4
.. autofunction:: templates.nct.template_nct_9d_5
.. autofunction:: templates.nct.template_nct_9d_6
.. autofunction:: templates.nct.template_nct_9d_7
.. autofunction:: templates.nct.template_nct_9d_8
.. autofunction:: templates.nct.template_nct_9d_9
.. autofunction:: 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
11 changes: 4 additions & 7 deletions qiskit/providers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,10 @@
Exceptions
----------
.. autosummary::
:toctree: ../stubs/
QiskitBackendNotFoundError
BackendPropertyError
JobError
JobTimeoutError
.. autoexception:: QiskitBackendNotFoundError
.. autoexception:: BackendPropertyError
.. autoexception:: JobError
.. autoexception:: JobTimeoutError
======================
Writing a New Provider
Expand Down
2 changes: 1 addition & 1 deletion qiskit/pulse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
Exceptions
==========
.. autoclass:: PulseError
.. autoexception:: PulseError
"""

# Builder imports.
Expand Down
Loading

0 comments on commit 3389c83

Please sign in to comment.