Skip to content

Commit

Permalink
Use autosummary to generate a summary of API docs (#99)
Browse files Browse the repository at this point in the history
* Use autosummary for the API doc

* Manually optimize the API docs
  • Loading branch information
BoxiLi committed Oct 13, 2021
1 parent 527c3c8 commit 6d4f07f
Show file tree
Hide file tree
Showing 34 changed files with 347 additions and 316 deletions.
21 changes: 0 additions & 21 deletions doc/source/_apidoc/qutip_qip.algorithms.rst

This file was deleted.

61 changes: 0 additions & 61 deletions doc/source/_apidoc/qutip_qip.compiler.rst

This file was deleted.

21 changes: 0 additions & 21 deletions doc/source/_apidoc/qutip_qip.decompose.rst

This file was deleted.

61 changes: 0 additions & 61 deletions doc/source/_apidoc/qutip_qip.device.rst

This file was deleted.

21 changes: 0 additions & 21 deletions doc/source/_apidoc/qutip_qip.operations.rst

This file was deleted.

90 changes: 0 additions & 90 deletions doc/source/_apidoc/qutip_qip.rst

This file was deleted.

21 changes: 0 additions & 21 deletions doc/source/_apidoc/qutip_qip.transpiler.rst

This file was deleted.

50 changes: 50 additions & 0 deletions doc/source/_templates/autosummary/module.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{{ fullname | escape | underline}}

.. automodule:: {{ fullname }}
:members:
:show-inheritance:
:imported-members:

{% block attributes %}
{% if attributes %}
.. rubric:: {{ _('Module Attributes') }}

.. autosummary::
{% for item in attributes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block classes %}
{% if classes %}
.. rubric:: {{ _('Classes') }}

.. autosummary::
{% for item in classes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block functions %}
{% if functions %}
.. rubric:: {{ _('Functions') }}

.. autosummary::
{% for item in functions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block exceptions %}
{% if exceptions %}
.. rubric:: {{ _('Exceptions') }}

.. autosummary::
{% for item in exceptions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
34 changes: 34 additions & 0 deletions doc/source/apidoc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
qutip\_qip package
==================


.. toctree::
:maxdepth: 1


Operator-level simulation
-------------------------
Simulation based on operator-state multiplication.

.. autosummary::
:toctree: apidoc/
:template: autosummary/module.rst

qutip_qip.circuit
qutip_qip.operations
qutip_qip.qubits
qutip_qip.decompose
qutip_qip.qasm

Pulse-level simulation
----------------------
Simulation based on the master equation.

.. autosummary::
:toctree: apidoc/
:template: autosummary/module.rst

qutip_qip.device
qutip_qip.compiler
qutip_qip.pulse
qutip_qip.noise

0 comments on commit 6d4f07f

Please sign in to comment.