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

add synthesis plugin docs #11763

Merged
merged 11 commits into from
Feb 15, 2024
155 changes: 155 additions & 0 deletions qiskit/transpiler/passes/synthesis/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,161 @@ def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **
HighLevelSynthesisPlugin
HighLevelSynthesisPluginManager
high_level_synthesis_plugin_names

Available Plugins
=================

Below are the synthesis plugin classes available in Qiskit. These classes should not be
used directly, but instead should be used through the plugin interface documented
above. The classes are listed here to ease finding the documentation for each of the
included plugins and to ease the comparison between different synthesis methods for
a given object.


Unitary Synthesis Plugins
-------------------------

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

/qiskit/transpiler/passes/synthesis/unitary_synthesis/DefaultUnitarySynthesis
/qiskit/transpiler/passes/synthesis/solovay_kitaev_synthesis/SolovayKitaevSynthesis
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should these docs replace the docs here: https://docs.quantum.ibm.com/api/qiskit/dev/transpiler_passes#synthesis
as it seems that there is some overlap between them



High Level Synthesis
--------------------

For each high-level object we give a table that lists all of its plugins available
directly in Qiskit. We include the name of the plugin, the class of the plugin,
the targeted connectivity map and optionally additional information. Recall the plugins
should be used via the previously described :class:`.HLSConfig`, for example::

HLSConfig(permutation=["kms"])

creates a high-level synthesis configuration that uses the ``kms`` plugin
for synthesizing :class:`.PermutationGate` objects -- i.e. those with
``name = "permutation"``. In this case, the plugin name is "kms", the plugin class
is :class:`~.KMSSynthesisPermutation`. This particular synthesis algorithm created
a circuit adhering to the linear nearest-neighbor connectivity.


Clifford Synthesis
''''''''''''''''''

.. list-table:: Plugins for :class:`qiskit.quantum_info.Clifford` (key = "clifford")
:header-rows: 1

* - Plugin name
- Plugin class
- Targeted connectivity
- Description
* - "ag"
- :class:`~.AGSynthesisClifford`
- all-to-all
-
* - "bm"
- :class:`~.BMSynthesisClifford`
- all-to-all
-
* - "greedy"
- :class:`~.GreedySynthesisClifford`
- all-to-all
-
* - "layers"
- :class:`~.LayerSynthesisClifford`
- all-to-all
-
* - "lnn"
- :class:`~.LayerLnnSynthesisClifford`
- linear
-
* - "default"
- :class:`~.DefaultSynthesisClifford`
- all-to-all
-

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

/qiskit/transpiler/passes/synthesis/high_level_synthesis/AGSynthesisClifford
/qiskit/transpiler/passes/synthesis/high_level_synthesis/BMSynthesisClifford
/qiskit/transpiler/passes/synthesis/high_level_synthesis/GreedySynthesisClifford
/qiskit/transpiler/passes/synthesis/high_level_synthesis/LayerSynthesisClifford
/qiskit/transpiler/passes/synthesis/high_level_synthesis/LayerLnnSynthesisClifford
/qiskit/transpiler/passes/synthesis/high_level_synthesis/DefaultSynthesisClifford


Linear Function Synthesis
'''''''''''''''''''''''''

.. list-table:: Plugins for :class:`.LinearFunction` (key = "linear")
:header-rows: 1

* - Plugin name
- Plugin class
- Targeted connectivity
- Description
* - "kms"
- :class:`~.KMSSynthesisLinearFunction`
- linear
-
* - "pmh"
- :class:`~.PMHSynthesisLinearFunction`
- all-to-all
-
* - "default"
- :class:`~.DefaultSynthesisLinearFunction`
- all-to-all
-

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

/qiskit/transpiler/passes/synthesis/high_level_synthesis/KMSSynthesisLinearFunction
/qiskit/transpiler/passes/synthesis/high_level_synthesis/PMHSynthesisLinearFunction
/qiskit/transpiler/passes/synthesis/high_level_synthesis/DefaultSynthesisLinearFunction


Permutation Synthesis
'''''''''''''''''''''

.. list-table:: Plugins for :class:`.PermutationGate` (key = "permutation")
:header-rows: 1

* - Plugin name
- Plugin class
- Targeted connectivity
- Description
* - "basic"
- :class:`~.BasicSynthesisPermutation`
- all-to-all
- optimal swap count
* - "acg"
- :class:`~.ACGSynthesisPermutation`
- all-to-all
- swap depth of at most `2`
* - "kms"
- :class:`~.KMSSynthesisPermutation`
- linear
- swap depth of at most `n`
* - "token_swapper"
- :class:`~.TokenSwapperSynthesisPermutation`
- any
-
* - "default"
- :class:`~.BasicSynthesisPermutation`
- all-to-all
- same as "basic"

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

/qiskit/transpiler/passes/synthesis/high_level_synthesis/BasicSynthesisPermutation
/qiskit/transpiler/passes/synthesis/high_level_synthesis/ACGSynthesisPermutation
/qiskit/transpiler/passes/synthesis/high_level_synthesis/KMSSynthesisPermutation
/qiskit/transpiler/passes/synthesis/high_level_synthesis/TokenSwapperSynthesisPermutation


"""

import abc
Expand Down
Loading