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

Reorganize transpiler modules in API docs #1645

Merged
merged 3 commits into from
Apr 30, 2024
Merged
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
2 changes: 1 addition & 1 deletion docs/apidocs/transpiler.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. automodule:: qiskit_ibm_runtime.transpiler
.. automodule:: qiskit_ibm_runtime.transpiler.passes
:no-members:
:no-inherited-members:
:no-special-members:
9 changes: 6 additions & 3 deletions qiskit_ibm_runtime/options/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

Options that can be passed to the primitives.

**V2 Primitives**
V2 Primitives
=============

``SamplerV2`` and ``EstimatorV2`` each have their own options. You can use the
``options`` attribute to set the options. For example::
Expand Down Expand Up @@ -49,7 +50,8 @@
for the latest defaults.


**V1 Primitives**
V1 Primitives
=============

The :class:`Options` class encapsulates all the options you can specify
when invoking a V1 primitive. It includes frequently used options,
Expand All @@ -71,7 +73,8 @@


Classes
==========================
=======

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

Expand Down
20 changes: 1 addition & 19 deletions qiskit_ibm_runtime/transpiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,4 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""
====================================================================
IBM Backend Transpiler Tools (:mod:`qiskit_ibm_runtime.transpiler`)
====================================================================

A collection of transpiler tools for working with IBM Quantum's
next-generation backends that support advanced "dynamic circuit"
capabilities. Ie., circuits with support for classical
compute and control-flow/feedback based off of measurement results.

Transpiler Passes
==================

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

passes

"""
"""Tools for transpilation."""
9 changes: 5 additions & 4 deletions qiskit_ibm_runtime/transpiler/passes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@

"""
================================================================
Transpiler Passes (:mod:`qiskit_ibm_runtime.transpiler.passes`)
Transpiler passes (:mod:`qiskit_ibm_runtime.transpiler.passes`)
================================================================

.. currentmodule:: qiskit_ibm_runtime.transpiler.passes

A collection of transpiler passes for IBM backends.
A collection of transpiler passes for IBM backends. Refer to
https://docs.quantum.ibm.com/transpile to learn more about
transpilation and passes.

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

basis
ConvertIdToDelay
scheduling


"""

from .basis import ConvertIdToDelay
Expand Down
10 changes: 1 addition & 9 deletions qiskit_ibm_runtime/transpiler/passes/basis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""
==========================================================
Basis (:mod:`qiskit_ibm_runtime.transpiler.passes.basis`)
==========================================================

.. currentmodule:: qiskit_ibm_runtime.transpiler.passes.basis

Passes to layout circuits to IBM backend's instruction sets.
"""
"""Passes to layout circuits to IBM backend's instruction sets."""

from .convert_id_to_delay import ConvertIdToDelay
31 changes: 17 additions & 14 deletions qiskit_ibm_runtime/transpiler/passes/scheduling/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@
:func:`~qiskit.compiler.transpile` or
:func:`~qiskit.transpiler.preset_passmanagers.generate_preset_pass_manager`.

Classes
=======
.. autosummary::
:toctree: ../stubs/

BlockBasePadder
ALAPScheduleAnalysis
ASAPScheduleAnalysis
DynamicCircuitInstructionDurations
PadDelay
PadDynamicalDecoupling

Example usage
=============

Below we demonstrate how to schedule and pad a teleportation circuit with delays
for a dynamic circuit backend's execution model:

Expand Down Expand Up @@ -114,7 +129,7 @@


Scheduling old format ``c_if`` conditioned gates
------------------------------------------------
================================================

Scheduling with old format ``c_if`` conditioned gates is not supported.

Expand Down Expand Up @@ -171,7 +186,7 @@


Exploiting IBM backend's local parallel "fast-path"
---------------------------------------------------
===================================================

IBM quantum hardware supports a localized "fast-path" which enables a block of gates
applied to a *single qubit* that are conditional on an immediately predecessor measurement
Expand Down Expand Up @@ -375,18 +390,6 @@

qc.draw(output="mpl", style="iqp")


Scheduling & Dynamical Decoupling
=================================
.. autosummary::
:toctree: ../stubs/

BlockBasePadder
ALAPScheduleAnalysis
ASAPScheduleAnalysis
DynamicCircuitInstructionDurations
PadDelay
PadDynamicalDecoupling
"""

from .block_base_padder import BlockBasePadder
Expand Down
25 changes: 1 addition & 24 deletions qiskit_ibm_runtime/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""
==============================================================================
Utilities (:mod:`qiskit_ibm_runtime.utils`)
==============================================================================

.. currentmodule:: qiskit_ibm_runtime.utils

Utility functions related to the IBM Runtime Services.

Conversion
==========
.. autosummary::
:toctree: ../stubs/

seconds_to_duration
utc_to_local

Misc Functions
==============
.. autosummary::
:toctree: ../stubs/

to_python_identifier
"""
"""Internal utilities."""

from .converters import (
utc_to_local,
Expand Down
Loading