Generate qiskit-ibm-transpiler 0.6 (#1942)

We enable release notes and source code links.

---------

Co-authored-by: Frank Harkins <frankharkins@hotmail.co.uk>
This commit is contained in:
Eric Arellano 2024-09-16 10:12:25 -04:00 committed by GitHub
parent e071f789f2
commit 451e2ec13b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
38 changed files with 1184 additions and 25 deletions

View File

@ -58,6 +58,10 @@
{
"title": "qiskit_transpiler_service.utils",
"url": "/api/qiskit-ibm-transpiler/0.3/utils"
},
{
"title": "Release notes",
"url": "/api/qiskit-ibm-transpiler/release-notes"
}
],
"collapsed": true

View File

@ -1,4 +1,4 @@
{
"name": "qiskit-ibm-transpiler",
"version": "0.4.8"
"version": "0.4.9"
}

View File

@ -58,6 +58,10 @@
{
"title": "qiskit_transpiler_service.utils",
"url": "/api/qiskit-ibm-transpiler/0.4/utils"
},
{
"title": "Release notes",
"url": "/api/qiskit-ibm-transpiler/release-notes"
}
],
"collapsed": true

View File

@ -0,0 +1,4 @@
{
"name": "qiskit-ibm-transpiler",
"version": "0.5.2"
}

View File

@ -0,0 +1,68 @@
{
"title": "Qiskit Transpiler Service Client",
"children": [
{
"title": "API index",
"url": "/api/qiskit-ibm-transpiler/0.5"
},
{
"title": "qiskit_ibm_transpiler.ai",
"children": [
{
"title": "Module overview",
"url": "/api/qiskit-ibm-transpiler/0.5/ai"
},
{
"title": "AICliffordSynthesis",
"url": "/api/qiskit-ibm-transpiler/0.5/qiskit_ibm_transpiler.ai.AICliffordSynthesis"
},
{
"title": "AILinearFunctionSynthesis",
"url": "/api/qiskit-ibm-transpiler/0.5/qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis"
},
{
"title": "AIPermutationSynthesis",
"url": "/api/qiskit-ibm-transpiler/0.5/qiskit_ibm_transpiler.ai.AIPermutationSynthesis"
},
{
"title": "AIRouting",
"url": "/api/qiskit-ibm-transpiler/0.5/qiskit_ibm_transpiler.ai.AIRouting"
},
{
"title": "CollectCliffords",
"url": "/api/qiskit-ibm-transpiler/0.5/qiskit_ibm_transpiler.ai.CollectCliffords"
},
{
"title": "CollectLinearFunctions",
"url": "/api/qiskit-ibm-transpiler/0.5/qiskit_ibm_transpiler.ai.CollectLinearFunctions"
},
{
"title": "CollectPermutations",
"url": "/api/qiskit-ibm-transpiler/0.5/qiskit_ibm_transpiler.ai.CollectPermutations"
}
]
},
{
"title": "qiskit_ibm_transpiler.transpiler_service",
"children": [
{
"title": "Module overview",
"url": "/api/qiskit-ibm-transpiler/0.5/transpiler_service"
},
{
"title": "TranspilerService",
"url": "/api/qiskit-ibm-transpiler/0.5/qiskit_ibm_transpiler.transpiler_service.TranspilerService"
}
]
},
{
"title": "qiskit_ibm_transpiler.utils",
"url": "/api/qiskit-ibm-transpiler/0.5/utils"
},
{
"title": "Release notes",
"url": "/api/qiskit-ibm-transpiler/release-notes"
}
],
"collapsed": true
}

View File

@ -0,0 +1,30 @@
---
title: ai
description: API reference for qiskit_ibm_transpiler.ai
in_page_toc_min_heading_level: 2
python_api_type: module
python_api_name: qiskit_ibm_transpiler.ai
---
<span id="ai-qiskit-ibm-transpiler-ai" />
<span id="module-qiskit_ibm_transpiler.ai" />
# AI
<span id="module-qiskit_ibm_transpiler.ai" />
`qiskit_ibm_transpiler.ai`
## Classes
| | |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| [`AIRouting`](qiskit_ibm_transpiler.ai.AIRouting "qiskit_ibm_transpiler.ai.AIRouting")(\[backend\_name, coupling\_map, ...]) | The AIRouting pass acts both as a layout stage and a routing stage. |
| [`AICliffordSynthesis`](qiskit_ibm_transpiler.ai.AICliffordSynthesis "qiskit_ibm_transpiler.ai.AICliffordSynthesis")(backend\_name\[, ...]) | Synthesis for Clifford circuits (blocks of H, S and CX gates). |
| [`AILinearFunctionSynthesis`](qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis "qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis")(backend\_name\[, ...]) | Synthesis for Linear Function circuits (blocks of CX and SWAP gates). |
| [`AIPermutationSynthesis`](qiskit_ibm_transpiler.ai.AIPermutationSynthesis "qiskit_ibm_transpiler.ai.AIPermutationSynthesis")(backend\_name\[, ...]) | Synthesis for Permutation circuits (blocks of SWAP gates). |
| [`CollectCliffords`](qiskit_ibm_transpiler.ai.CollectCliffords "qiskit_ibm_transpiler.ai.CollectCliffords")(\[do\_commutative\_analysis, ...]) | Collects Clifford blocks as Instruction objects and stores the original sub-circuit to compare against it after synthesis. |
| [`CollectLinearFunctions`](qiskit_ibm_transpiler.ai.CollectLinearFunctions "qiskit_ibm_transpiler.ai.CollectLinearFunctions")(\[...]) | Collects blocks of SWAP and CX as LinearFunction objects and stores the original sub-circuit to compare against it after synthesis. |
| [`CollectPermutations`](qiskit_ibm_transpiler.ai.CollectPermutations "qiskit_ibm_transpiler.ai.CollectPermutations")(\[...]) | Collects blocks of SWAP circuits as Permutations. |

View File

@ -0,0 +1,11 @@
---
title: Qiskit Transpiler Service Client Docs
description: API documentation for the qiskit-ibm-transpiler client
---
# qiskit-ibm-transpiler API reference
* [AI (`qiskit_ibm_transpiler.ai`)](ai)
* [Qiskit IBM Transpiler (`qiskit_ibm_transpiler.transpiler_service`)](transpiler_service)
* [Utilities (`qiskit_ibm_transpiler.utils`)](utils)

View File

@ -0,0 +1,91 @@
---
title: AICliffordSynthesis
description: API reference for qiskit_ibm_transpiler.ai.AICliffordSynthesis
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit_ibm_transpiler.ai.AICliffordSynthesis
---
# AICliffordSynthesis
<Class id="qiskit_ibm_transpiler.ai.AICliffordSynthesis" isDedicatedPage={true} signature="qiskit_ibm_transpiler.ai.AICliffordSynthesis(backend_name: str, replace_only_if_better: bool = True, max_threads: int | None = None)" modifiers="class">
Bases: `AISynthesis`
Synthesis for Clifford circuits (blocks of H, S and CX gates). Currently up to 9 qubit blocks.
**Parameters**
* **backend\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Name of the backend used for doing the AI Clifford synthesis.
* **replace\_only\_if\_better** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")*, optional*) Determine if replace the original circuit with the synthesized one if its better, defaults to True.
* **max\_threads** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*, optional*) Set the number of requests to send in parallel.
## Methods
### execute
<Function id="qiskit_ibm_transpiler.ai.AICliffordSynthesis.execute" signature="execute(passmanager_ir, state, callback=None)">
Execute optimization task for input Qiskit IR.
**Parameters**
* **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")) Qiskit IR to optimize.
* **state** ([*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")) State associated with workflow execution by the pass manager itself.
* **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable "(in Python v3.12)")) A callback function which is caller per execution of optimization task.
**Returns**
Optimized Qiskit IR and state of the workflow.
**Return type**
[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)"), [*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")]
</Function>
### name
<Function id="qiskit_ibm_transpiler.ai.AICliffordSynthesis.name" signature="name()">
Name of the pass.
**Return type**
[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")
</Function>
### run
<Function id="qiskit_ibm_transpiler.ai.AICliffordSynthesis.run" signature="run(dag)">
Run a pass on the DAGCircuit. This is implemented by the pass developer.
**Parameters**
**dag** ([*DAGCircuit*](/api/qiskit/qiskit.dagcircuit.DAGCircuit "(in Qiskit v1.2)")) the dag on which the pass is run.
**Raises**
[**NotImplementedError**](https://docs.python.org/3/library/exceptions.html#NotImplementedError "(in Python v3.12)") when this is left unimplemented for a pass.
</Function>
### synth\_nodes
<Function id="qiskit_ibm_transpiler.ai.AICliffordSynthesis.synth_nodes" signature="synth_nodes(nodes)" />
### update\_status
<Function id="qiskit_ibm_transpiler.ai.AICliffordSynthesis.update_status" signature="update_status(state, run_state)">
Update workflow status.
**Parameters**
* **state** ([*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")) Pass manager state to update.
* **run\_state** (*RunState*) Completion status of current task.
**Returns**
Updated pass manager state.
**Return type**
[*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")
</Function>
</Class>

View File

@ -0,0 +1,91 @@
---
title: AILinearFunctionSynthesis
description: API reference for qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis
---
# AILinearFunctionSynthesis
<Class id="qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis" isDedicatedPage={true} signature="qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis(backend_name: str, replace_only_if_better: bool = True, max_threads: int | None = None)" modifiers="class">
Bases: `AISynthesis`
Synthesis for Linear Function circuits (blocks of CX and SWAP gates). Currently up to 9 qubit blocks.
**Parameters**
* **backend\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Name of the backend used for doing the AI Linear Function synthesis.
* **replace\_only\_if\_better** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")*, optional*) Determine if replace the original circuit with the synthesized one if its better, defaults to True.
* **max\_threads** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*, optional*) Set the number of requests to send in parallel.
## Methods
### execute
<Function id="qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis.execute" signature="execute(passmanager_ir, state, callback=None)">
Execute optimization task for input Qiskit IR.
**Parameters**
* **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")) Qiskit IR to optimize.
* **state** ([*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")) State associated with workflow execution by the pass manager itself.
* **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable "(in Python v3.12)")) A callback function which is caller per execution of optimization task.
**Returns**
Optimized Qiskit IR and state of the workflow.
**Return type**
[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)"), [*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")]
</Function>
### name
<Function id="qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis.name" signature="name()">
Name of the pass.
**Return type**
[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")
</Function>
### run
<Function id="qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis.run" signature="run(dag)">
Run a pass on the DAGCircuit. This is implemented by the pass developer.
**Parameters**
**dag** ([*DAGCircuit*](/api/qiskit/qiskit.dagcircuit.DAGCircuit "(in Qiskit v1.2)")) the dag on which the pass is run.
**Raises**
[**NotImplementedError**](https://docs.python.org/3/library/exceptions.html#NotImplementedError "(in Python v3.12)") when this is left unimplemented for a pass.
</Function>
### synth\_nodes
<Function id="qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis.synth_nodes" signature="synth_nodes(nodes)" />
### update\_status
<Function id="qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis.update_status" signature="update_status(state, run_state)">
Update workflow status.
**Parameters**
* **state** ([*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")) Pass manager state to update.
* **run\_state** (*RunState*) Completion status of current task.
**Returns**
Updated pass manager state.
**Return type**
[*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")
</Function>
</Class>

View File

@ -0,0 +1,91 @@
---
title: AIPermutationSynthesis
description: API reference for qiskit_ibm_transpiler.ai.AIPermutationSynthesis
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit_ibm_transpiler.ai.AIPermutationSynthesis
---
# AIPermutationSynthesis
<Class id="qiskit_ibm_transpiler.ai.AIPermutationSynthesis" isDedicatedPage={true} signature="qiskit_ibm_transpiler.ai.AIPermutationSynthesis(backend_name: str, replace_only_if_better: bool = True, max_threads: int | None = None)" modifiers="class">
Bases: `AISynthesis`
Synthesis for Permutation circuits (blocks of SWAP gates). Currently available for 65, 33, and 27 qubit blocks.
**Parameters**
* **backend\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Name of the backend used for doing the AI Linear Function synthesis.
* **replace\_only\_if\_better** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")*, optional*) Determine if replace the original circuit with the synthesized one if its better, defaults to True.
* **max\_threads** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*, optional*) Set the number of requests to send in parallel.
## Methods
### execute
<Function id="qiskit_ibm_transpiler.ai.AIPermutationSynthesis.execute" signature="execute(passmanager_ir, state, callback=None)">
Execute optimization task for input Qiskit IR.
**Parameters**
* **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")) Qiskit IR to optimize.
* **state** ([*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")) State associated with workflow execution by the pass manager itself.
* **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable "(in Python v3.12)")) A callback function which is caller per execution of optimization task.
**Returns**
Optimized Qiskit IR and state of the workflow.
**Return type**
[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)"), [*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")]
</Function>
### name
<Function id="qiskit_ibm_transpiler.ai.AIPermutationSynthesis.name" signature="name()">
Name of the pass.
**Return type**
[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")
</Function>
### run
<Function id="qiskit_ibm_transpiler.ai.AIPermutationSynthesis.run" signature="run(dag)">
Run a pass on the DAGCircuit. This is implemented by the pass developer.
**Parameters**
**dag** ([*DAGCircuit*](/api/qiskit/qiskit.dagcircuit.DAGCircuit "(in Qiskit v1.2)")) the dag on which the pass is run.
**Raises**
[**NotImplementedError**](https://docs.python.org/3/library/exceptions.html#NotImplementedError "(in Python v3.12)") when this is left unimplemented for a pass.
</Function>
### synth\_nodes
<Function id="qiskit_ibm_transpiler.ai.AIPermutationSynthesis.synth_nodes" signature="synth_nodes(nodes)" />
### update\_status
<Function id="qiskit_ibm_transpiler.ai.AIPermutationSynthesis.update_status" signature="update_status(state, run_state)">
Update workflow status.
**Parameters**
* **state** ([*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")) Pass manager state to update.
* **run\_state** (*RunState*) Completion status of current task.
**Returns**
Updated pass manager state.
**Return type**
[*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")
</Function>
</Class>

View File

@ -0,0 +1,97 @@
---
title: AIRouting
description: API reference for qiskit_ibm_transpiler.ai.AIRouting
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit_ibm_transpiler.ai.AIRouting
---
# AIRouting
<Class id="qiskit_ibm_transpiler.ai.AIRouting" isDedicatedPage={true} signature="qiskit_ibm_transpiler.ai.AIRouting(backend_name: str | None = None, coupling_map: list[list[int]] | None = None, optimization_level: int = 2, layout_mode: str = 'OPTIMIZE')" modifiers="class">
Bases: [`TransformationPass`](/api/qiskit/qiskit.transpiler.TransformationPass "(in Qiskit v1.2)")
The AIRouting pass acts both as a layout stage and a routing stage.
**Parameters**
* **backend\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*, optional*) Name of the backend used for doing the transpilation.
* **coupling\_map** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]], optional*) A list of pairs that represents physical links between qubits.
* **optimization\_level** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) With a range from 1 to 3, determines the computational effort to spend in the process (higher usually gives better results but takes longer), defaults to 2.
* **layout\_mode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Specifies how to handle the layout selection. There are 3 layout modes: keep (respects the layout set by the previous transpiler passes), improve (uses the layout set by the previous transpiler passes as a starting point) and optimize (ignores previous layout selections), defaults to OPTIMIZE.
## Methods
### execute
<Function id="qiskit_ibm_transpiler.ai.AIRouting.execute" signature="execute(passmanager_ir, state, callback=None)">
Execute optimization task for input Qiskit IR.
**Parameters**
* **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")) Qiskit IR to optimize.
* **state** ([*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")) State associated with workflow execution by the pass manager itself.
* **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable "(in Python v3.12)")) A callback function which is caller per execution of optimization task.
**Returns**
Optimized Qiskit IR and state of the workflow.
**Return type**
[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)"), [*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")]
</Function>
### name
<Function id="qiskit_ibm_transpiler.ai.AIRouting.name" signature="name()">
Name of the pass.
**Return type**
[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")
</Function>
### run
<Function id="qiskit_ibm_transpiler.ai.AIRouting.run" signature="run(dag)">
Run the AIRouting pass on dag.
**Parameters**
**dag** (*DAGCircuit*) the directed acyclic graph to be mapped.
**Returns**
A dag mapped to be compatible with the coupling\_map.
**Return type**
DAGCircuit
**Raises**
* **TranspilerError** if the coupling map or the layout are not
* **compatible with the DAG**\*\*, or \*\***if the coupling\_map=None**
</Function>
### update\_status
<Function id="qiskit_ibm_transpiler.ai.AIRouting.update_status" signature="update_status(state, run_state)">
Update workflow status.
**Parameters**
* **state** ([*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")) Pass manager state to update.
* **run\_state** (*RunState*) Completion status of current task.
**Returns**
Updated pass manager state.
**Return type**
[*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")
</Function>
</Class>

View File

@ -0,0 +1,89 @@
---
title: CollectCliffords
description: API reference for qiskit_ibm_transpiler.ai.CollectCliffords
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit_ibm_transpiler.ai.CollectCliffords
---
# CollectCliffords
<Class id="qiskit_ibm_transpiler.ai.CollectCliffords" isDedicatedPage={true} signature="qiskit_ibm_transpiler.ai.CollectCliffords(do_commutative_analysis: bool = True, min_block_size: int = 2, max_block_size: int = CLIFFORD_MAX_BLOCK_SIZE, collect_from_back: bool = False, num_reps: int = 10)" modifiers="class">
Bases: `RepeatedCollectAndCollapse`
Collects Clifford blocks as Instruction objects and stores the original sub-circuit to compare against it after synthesis.
**Parameters**
* **do\_commutative\_analysis** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")*, optional*) Enable or disable commutative analysis, defaults to True
* **min\_block\_size** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*, optional*) Set the minimum size for blocks generated during the collect Cliffords pass, defaults to 2.
* **max\_block\_size** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*, optional*) Set the maximum size for blocks generated during the collect Cliffords pass, defaults to 9.
* **collect\_from\_back** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")*, optional*) Specify if collect blocks in reverse order or not, defaults to False.
* **num\_reps** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*, optional*) Specify how many times to repeat the optimization process, defaults to 10.
## Methods
### execute
<Function id="qiskit_ibm_transpiler.ai.CollectCliffords.execute" signature="execute(passmanager_ir, state, callback=None)">
Execute optimization task for input Qiskit IR.
**Parameters**
* **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")) Qiskit IR to optimize.
* **state** ([*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")) State associated with workflow execution by the pass manager itself.
* **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable "(in Python v3.12)")) A callback function which is caller per execution of optimization task.
**Returns**
Optimized Qiskit IR and state of the workflow.
**Return type**
[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)"), [*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")]
</Function>
### name
<Function id="qiskit_ibm_transpiler.ai.CollectCliffords.name" signature="name()">
Name of the pass.
**Return type**
[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")
</Function>
### run
<Function id="qiskit_ibm_transpiler.ai.CollectCliffords.run" signature="run(dag)">
Run the CollectLinearFunctions pass on dag. :param dag: the DAG to be optimized. :type dag: DAGCircuit
**Returns**
the optimized DAG.
**Return type**
DAGCircuit
</Function>
### update\_status
<Function id="qiskit_ibm_transpiler.ai.CollectCliffords.update_status" signature="update_status(state, run_state)">
Update workflow status.
**Parameters**
* **state** ([*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")) Pass manager state to update.
* **run\_state** (*RunState*) Completion status of current task.
**Returns**
Updated pass manager state.
**Return type**
[*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")
</Function>
</Class>

View File

@ -0,0 +1,89 @@
---
title: CollectLinearFunctions
description: API reference for qiskit_ibm_transpiler.ai.CollectLinearFunctions
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit_ibm_transpiler.ai.CollectLinearFunctions
---
# CollectLinearFunctions
<Class id="qiskit_ibm_transpiler.ai.CollectLinearFunctions" isDedicatedPage={true} signature="qiskit_ibm_transpiler.ai.CollectLinearFunctions(do_commutative_analysis: bool = True, min_block_size: int = 4, max_block_size: int = LINEAR_MAX_BLOCK_SIZE, collect_from_back: bool = False, num_reps: int = 10)" modifiers="class">
Bases: `RepeatedCollectAndCollapse`
Collects blocks of SWAP and CX as LinearFunction objects and stores the original sub-circuit to compare against it after synthesis.
**Parameters**
* **do\_commutative\_analysis** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")*, optional*) Enable or disable commutative analysis, defaults to True
* **min\_block\_size** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*, optional*) Set the minimum size for blocks generated during the collect linear functions pass, defaults to 4.
* **max\_block\_size** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*, optional*) Set the maximum size for blocks generated during the collect linear functions pass, defaults to 9.
* **collect\_from\_back** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")*, optional*) Specify if collect blocks in reverse order or not, defaults to False.
* **num\_reps** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*, optional*) Specify how many times to repeat the optimization process, defaults to 10.
## Methods
### execute
<Function id="qiskit_ibm_transpiler.ai.CollectLinearFunctions.execute" signature="execute(passmanager_ir, state, callback=None)">
Execute optimization task for input Qiskit IR.
**Parameters**
* **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")) Qiskit IR to optimize.
* **state** ([*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")) State associated with workflow execution by the pass manager itself.
* **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable "(in Python v3.12)")) A callback function which is caller per execution of optimization task.
**Returns**
Optimized Qiskit IR and state of the workflow.
**Return type**
[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)"), [*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")]
</Function>
### name
<Function id="qiskit_ibm_transpiler.ai.CollectLinearFunctions.name" signature="name()">
Name of the pass.
**Return type**
[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")
</Function>
### run
<Function id="qiskit_ibm_transpiler.ai.CollectLinearFunctions.run" signature="run(dag)">
Run the CollectLinearFunctions pass on dag. :param dag: the DAG to be optimized. :type dag: DAGCircuit
**Returns**
the optimized DAG.
**Return type**
DAGCircuit
</Function>
### update\_status
<Function id="qiskit_ibm_transpiler.ai.CollectLinearFunctions.update_status" signature="update_status(state, run_state)">
Update workflow status.
**Parameters**
* **state** ([*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")) Pass manager state to update.
* **run\_state** (*RunState*) Completion status of current task.
**Returns**
Updated pass manager state.
**Return type**
[*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")
</Function>
</Class>

View File

@ -0,0 +1,89 @@
---
title: CollectPermutations
description: API reference for qiskit_ibm_transpiler.ai.CollectPermutations
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit_ibm_transpiler.ai.CollectPermutations
---
# CollectPermutations
<Class id="qiskit_ibm_transpiler.ai.CollectPermutations" isDedicatedPage={true} signature="qiskit_ibm_transpiler.ai.CollectPermutations(do_commutative_analysis: bool = True, min_block_size: int = 4, max_block_size: int = PERMUTATION_MAX_BLOCK_SIZE, collect_from_back: bool = False, num_reps: int = 10)" modifiers="class">
Bases: `RepeatedCollectAndCollapse`
Collects blocks of SWAP circuits as Permutations.
**Parameters**
* **do\_commutative\_analysis** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")*, optional*) Enable or disable commutative analysis, defaults to True
* **min\_block\_size** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*, optional*) Set the minimum size for blocks generated during the collect permutations pass, defaults to 4.
* **max\_block\_size** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*, optional*) Set the maximum size for blocks generated during the collect permutations pass, defaults to 12.
* **collect\_from\_back** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")*, optional*) Specify if collect blocks in reverse order or not, defaults to False.
* **num\_reps** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*, optional*) Specify how many times to repeat the optimization process, defaults to 10.
## Methods
### execute
<Function id="qiskit_ibm_transpiler.ai.CollectPermutations.execute" signature="execute(passmanager_ir, state, callback=None)">
Execute optimization task for input Qiskit IR.
**Parameters**
* **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")) Qiskit IR to optimize.
* **state** ([*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")) State associated with workflow execution by the pass manager itself.
* **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable "(in Python v3.12)")) A callback function which is caller per execution of optimization task.
**Returns**
Optimized Qiskit IR and state of the workflow.
**Return type**
[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)"), [*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")]
</Function>
### name
<Function id="qiskit_ibm_transpiler.ai.CollectPermutations.name" signature="name()">
Name of the pass.
**Return type**
[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")
</Function>
### run
<Function id="qiskit_ibm_transpiler.ai.CollectPermutations.run" signature="run(dag)">
Run the CollectLinearFunctions pass on dag. :param dag: the DAG to be optimized. :type dag: DAGCircuit
**Returns**
the optimized DAG.
**Return type**
DAGCircuit
</Function>
### update\_status
<Function id="qiskit_ibm_transpiler.ai.CollectPermutations.update_status" signature="update_status(state, run_state)">
Update workflow status.
**Parameters**
* **state** ([*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")) Pass manager state to update.
* **run\_state** (*RunState*) Completion status of current task.
**Returns**
Updated pass manager state.
**Return type**
[*PassManagerState*](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.2)")
</Function>
</Class>

View File

@ -0,0 +1,41 @@
---
title: TranspilerService
description: API reference for qiskit_ibm_transpiler.transpiler_service.TranspilerService
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit_ibm_transpiler.transpiler_service.TranspilerService
---
# TranspilerService
<Class id="qiskit_ibm_transpiler.transpiler_service.TranspilerService" isDedicatedPage={true} signature="qiskit_ibm_transpiler.transpiler_service.TranspilerService(optimization_level, ai='true', coupling_map=None, backend_name=None, qiskit_transpile_options=None, ai_layout_mode=None, **kwargs)" modifiers="class">
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.12)")
Class for using the transpiler service.
**Parameters**
* **optimization\_level** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) The optimization level to use during the transpilation. There are 4 optimization levels ranging from 0 to 3, where 0 is intended for not performing any optimizations and 3 spends the most effort to optimize the circuit.
* **ai** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*, optional*) Specifies if the transpilation should use AI or not, defaults to True.
* **coupling\_map** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]], optional*) A list of pairs that represents physical links between qubits.
* **backend\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*, optional*) Name of the backend used for doing the transpilation.
* **qiskit\_transpile\_options** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)")*, optional*) Other options to transpile with qiskit.
* **ai\_layout\_mode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*, optional*) Specifies how to handle the layout selection. There are 3 layout modes: keep (respects the layout set by the previous transpiler passes), improve (uses the layout set by the previous transpiler passes as a starting point) and optimize (ignores previous layout selections).
## Methods
### run
<Function id="qiskit_ibm_transpiler.transpiler_service.TranspilerService.run" signature="run(circuits)">
Transpile the circuit(s) by calling the service /transpile endpoint.
**Parameters**
**circuits** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*QuantumCircuit*](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.2)")*] |* [*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*QuantumCircuit*](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.2)")) circuit(s) to transpile.
**Returns**
The transpiled circuit(s)
</Function>
</Class>

View File

@ -0,0 +1,24 @@
---
title: transpiler_service
description: API reference for qiskit_ibm_transpiler.transpiler_service
in_page_toc_min_heading_level: 2
python_api_type: module
python_api_name: qiskit_ibm_transpiler.transpiler_service
---
<span id="qiskit-ibm-transpiler-qiskit-ibm-transpiler-transpiler-service" />
<span id="module-qiskit_ibm_transpiler.transpiler_service" />
# Qiskit IBM Transpiler
<span id="module-qiskit_ibm_transpiler.transpiler_service" />
`qiskit_ibm_transpiler.transpiler_service`
## Classes
| | |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
| [`TranspilerService`](qiskit_ibm_transpiler.transpiler_service.TranspilerService "qiskit_ibm_transpiler.transpiler_service.TranspilerService")(optimization\_level\[, ai, ...]) | Class for using the transpiler service. |

View File

@ -0,0 +1,47 @@
---
title: utils
description: API reference for qiskit_ibm_transpiler.utils
in_page_toc_min_heading_level: 2
python_api_type: module
python_api_name: qiskit_ibm_transpiler.utils
---
<span id="utilities-qiskit-ibm-transpiler-utils" />
<span id="module-qiskit_ibm_transpiler.utils" />
# Utilities
<span id="module-qiskit_ibm_transpiler.utils" />
`qiskit_ibm_transpiler.utils`
## Functions
### create\_random\_linear\_function
<Function id="qiskit_ibm_transpiler.utils.create_random_linear_function" signature="qiskit_ibm_transpiler.utils.create_random_linear_function(n_qubits, seed=123)">
**Parameters**
* **n\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)"))
* **seed** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)"))
**Return type**
[*LinearFunction*](/api/qiskit/qiskit.circuit.library.LinearFunction "(in Qiskit v1.2)")
</Function>
### get\_metrics
<Function id="qiskit_ibm_transpiler.utils.get_metrics" signature="qiskit_ibm_transpiler.utils.get_metrics(qc)">
Returns a dict with metrics from a QuantumCircuit
**Parameters**
**qc** ([*QuantumCircuit*](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.2)"))
**Return type**
[*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)"), [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")]
</Function>

View File

@ -1,4 +1,4 @@
{
"name": "qiskit-ibm-transpiler",
"version": "0.5.1"
"version": "0.6.0"
}

View File

@ -58,6 +58,10 @@
{
"title": "qiskit_ibm_transpiler.utils",
"url": "/api/qiskit-ibm-transpiler/utils"
},
{
"title": "Release notes",
"url": "/api/qiskit-ibm-transpiler/release-notes"
}
],
"collapsed": true

View File

@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_transpiler.ai.AICliffordSynthesis
# AICliffordSynthesis
<Class id="qiskit_ibm_transpiler.ai.AICliffordSynthesis" isDedicatedPage={true} signature="qiskit_ibm_transpiler.ai.AICliffordSynthesis(backend_name: str, replace_only_if_better: bool = True, max_threads: int | None = None)" modifiers="class">
<Class id="qiskit_ibm_transpiler.ai.AICliffordSynthesis" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/ai/synthesis.py#L131-L174" signature="qiskit_ibm_transpiler.ai.AICliffordSynthesis(backend_name: str, replace_only_if_better: bool = True, max_threads: int | None = None)" modifiers="class">
Bases: `AISynthesis`
Synthesis for Clifford circuits (blocks of H, S and CX gates). Currently up to 9 qubit blocks.
@ -53,7 +53,7 @@ python_api_name: qiskit_ibm_transpiler.ai.AICliffordSynthesis
### run
<Function id="qiskit_ibm_transpiler.ai.AICliffordSynthesis.run" signature="run(dag)">
<Function id="qiskit_ibm_transpiler.ai.AICliffordSynthesis.run" github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/ai/synthesis.py#L111-L128" signature="run(dag)">
Run a pass on the DAGCircuit. This is implemented by the pass developer.
**Parameters**
@ -67,7 +67,7 @@ python_api_name: qiskit_ibm_transpiler.ai.AICliffordSynthesis
### synth\_nodes
<Function id="qiskit_ibm_transpiler.ai.AICliffordSynthesis.synth_nodes" signature="synth_nodes(nodes)" />
<Function id="qiskit_ibm_transpiler.ai.AICliffordSynthesis.synth_nodes" github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/ai/synthesis.py#L69-L109" signature="synth_nodes(nodes)" />
### update\_status

View File

@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis
# AILinearFunctionSynthesis
<Class id="qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis" isDedicatedPage={true} signature="qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis(backend_name: str, replace_only_if_better: bool = True, max_threads: int | None = None)" modifiers="class">
<Class id="qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/ai/synthesis.py#L177-L216" signature="qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis(backend_name: str, replace_only_if_better: bool = True, max_threads: int | None = None)" modifiers="class">
Bases: `AISynthesis`
Synthesis for Linear Function circuits (blocks of CX and SWAP gates). Currently up to 9 qubit blocks.
@ -53,7 +53,7 @@ python_api_name: qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis
### run
<Function id="qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis.run" signature="run(dag)">
<Function id="qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis.run" github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/ai/synthesis.py#L111-L128" signature="run(dag)">
Run a pass on the DAGCircuit. This is implemented by the pass developer.
**Parameters**
@ -67,7 +67,7 @@ python_api_name: qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis
### synth\_nodes
<Function id="qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis.synth_nodes" signature="synth_nodes(nodes)" />
<Function id="qiskit_ibm_transpiler.ai.AILinearFunctionSynthesis.synth_nodes" github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/ai/synthesis.py#L69-L109" signature="synth_nodes(nodes)" />
### update\_status

View File

@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_transpiler.ai.AIPermutationSynthesis
# AIPermutationSynthesis
<Class id="qiskit_ibm_transpiler.ai.AIPermutationSynthesis" isDedicatedPage={true} signature="qiskit_ibm_transpiler.ai.AIPermutationSynthesis(backend_name: str, replace_only_if_better: bool = True, max_threads: int | None = None)" modifiers="class">
<Class id="qiskit_ibm_transpiler.ai.AIPermutationSynthesis" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/ai/synthesis.py#L219-L255" signature="qiskit_ibm_transpiler.ai.AIPermutationSynthesis(backend_name: str, replace_only_if_better: bool = True, max_threads: int | None = None)" modifiers="class">
Bases: `AISynthesis`
Synthesis for Permutation circuits (blocks of SWAP gates). Currently available for 65, 33, and 27 qubit blocks.
@ -53,7 +53,7 @@ python_api_name: qiskit_ibm_transpiler.ai.AIPermutationSynthesis
### run
<Function id="qiskit_ibm_transpiler.ai.AIPermutationSynthesis.run" signature="run(dag)">
<Function id="qiskit_ibm_transpiler.ai.AIPermutationSynthesis.run" github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/ai/synthesis.py#L111-L128" signature="run(dag)">
Run a pass on the DAGCircuit. This is implemented by the pass developer.
**Parameters**
@ -67,7 +67,7 @@ python_api_name: qiskit_ibm_transpiler.ai.AIPermutationSynthesis
### synth\_nodes
<Function id="qiskit_ibm_transpiler.ai.AIPermutationSynthesis.synth_nodes" signature="synth_nodes(nodes)" />
<Function id="qiskit_ibm_transpiler.ai.AIPermutationSynthesis.synth_nodes" github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/ai/synthesis.py#L69-L109" signature="synth_nodes(nodes)" />
### update\_status

View File

@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_transpiler.ai.AIRouting
# AIRouting
<Class id="qiskit_ibm_transpiler.ai.AIRouting" isDedicatedPage={true} signature="qiskit_ibm_transpiler.ai.AIRouting(backend_name: str | None = None, coupling_map: list[list[int]] | None = None, optimization_level: int = 2, layout_mode: str = 'OPTIMIZE')" modifiers="class">
<Class id="qiskit_ibm_transpiler.ai.AIRouting" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/ai/routing.py#L33-L169" signature="qiskit_ibm_transpiler.ai.AIRouting(backend_name: str | None = None, coupling_map: list[list[int]] | None = None, optimization_level: int = 2, layout_mode: str = 'OPTIMIZE')" modifiers="class">
Bases: [`TransformationPass`](/api/qiskit/qiskit.transpiler.TransformationPass "(in Qiskit v1.2)")
The AIRouting pass acts both as a layout stage and a routing stage.
@ -54,7 +54,7 @@ python_api_name: qiskit_ibm_transpiler.ai.AIRouting
### run
<Function id="qiskit_ibm_transpiler.ai.AIRouting.run" signature="run(dag)">
<Function id="qiskit_ibm_transpiler.ai.AIRouting.run" github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/ai/routing.py#L92-L169" signature="run(dag)">
Run the AIRouting pass on dag.
**Parameters**

View File

@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_transpiler.ai.CollectCliffords
# CollectCliffords
<Class id="qiskit_ibm_transpiler.ai.CollectCliffords" isDedicatedPage={true} signature="qiskit_ibm_transpiler.ai.CollectCliffords(do_commutative_analysis: bool = True, min_block_size: int = 2, max_block_size: int = CLIFFORD_MAX_BLOCK_SIZE, collect_from_back: bool = False, num_reps: int = 10)" modifiers="class">
<Class id="qiskit_ibm_transpiler.ai.CollectCliffords" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/ai/collection.py#L223-L260" signature="qiskit_ibm_transpiler.ai.CollectCliffords(do_commutative_analysis: bool = True, min_block_size: int = 2, max_block_size: int = CLIFFORD_MAX_BLOCK_SIZE, collect_from_back: bool = False, num_reps: int = 10)" modifiers="class">
Bases: `RepeatedCollectAndCollapse`
Collects Clifford blocks as Instruction objects and stores the original sub-circuit to compare against it after synthesis.

View File

@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_transpiler.ai.CollectLinearFunctions
# CollectLinearFunctions
<Class id="qiskit_ibm_transpiler.ai.CollectLinearFunctions" isDedicatedPage={true} signature="qiskit_ibm_transpiler.ai.CollectLinearFunctions(do_commutative_analysis: bool = True, min_block_size: int = 4, max_block_size: int = LINEAR_MAX_BLOCK_SIZE, collect_from_back: bool = False, num_reps: int = 10)" modifiers="class">
<Class id="qiskit_ibm_transpiler.ai.CollectLinearFunctions" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/ai/collection.py#L263-L300" signature="qiskit_ibm_transpiler.ai.CollectLinearFunctions(do_commutative_analysis: bool = True, min_block_size: int = 4, max_block_size: int = LINEAR_MAX_BLOCK_SIZE, collect_from_back: bool = False, num_reps: int = 10)" modifiers="class">
Bases: `RepeatedCollectAndCollapse`
Collects blocks of SWAP and CX as LinearFunction objects and stores the original sub-circuit to compare against it after synthesis.

View File

@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_transpiler.ai.CollectPermutations
# CollectPermutations
<Class id="qiskit_ibm_transpiler.ai.CollectPermutations" isDedicatedPage={true} signature="qiskit_ibm_transpiler.ai.CollectPermutations(do_commutative_analysis: bool = True, min_block_size: int = 4, max_block_size: int = PERMUTATION_MAX_BLOCK_SIZE, collect_from_back: bool = False, num_reps: int = 10)" modifiers="class">
<Class id="qiskit_ibm_transpiler.ai.CollectPermutations" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/ai/collection.py#L303-L340" signature="qiskit_ibm_transpiler.ai.CollectPermutations(do_commutative_analysis: bool = True, min_block_size: int = 4, max_block_size: int = PERMUTATION_MAX_BLOCK_SIZE, collect_from_back: bool = False, num_reps: int = 10)" modifiers="class">
Bases: `RepeatedCollectAndCollapse`
Collects blocks of SWAP circuits as Permutations.

View File

@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_transpiler.transpiler_service.TranspilerService
# TranspilerService
<Class id="qiskit_ibm_transpiler.transpiler_service.TranspilerService" isDedicatedPage={true} signature="qiskit_ibm_transpiler.transpiler_service.TranspilerService(optimization_level, ai='true', coupling_map=None, backend_name=None, qiskit_transpile_options=None, ai_layout_mode=None, **kwargs)" modifiers="class">
<Class id="qiskit_ibm_transpiler.transpiler_service.TranspilerService" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/transpiler_service.py#L42-L124" signature="qiskit_ibm_transpiler.transpiler_service.TranspilerService(optimization_level, ai='true', coupling_map=None, backend_name=None, qiskit_transpile_options=None, ai_layout_mode=None, optimization_preferences=None, **kwargs)" modifiers="class">
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.12)")
Class for using the transpiler service.
@ -16,6 +16,7 @@ python_api_name: qiskit_ibm_transpiler.transpiler_service.TranspilerService
**Parameters**
* **optimization\_level** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) The optimization level to use during the transpilation. There are 4 optimization levels ranging from 0 to 3, where 0 is intended for not performing any optimizations and 3 spends the most effort to optimize the circuit.
* **optimization\_preferences** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*], optional*) Describe your preferences with a value or a list of values when prioritizing optimization. Allowed options: noise, n\_cnots, n\_gates, cnot\_layers, layers.
* **ai** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*, optional*) Specifies if the transpilation should use AI or not, defaults to True.
* **coupling\_map** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]], optional*) A list of pairs that represents physical links between qubits.
* **backend\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*, optional*) Name of the backend used for doing the transpilation.
@ -26,7 +27,7 @@ python_api_name: qiskit_ibm_transpiler.transpiler_service.TranspilerService
### run
<Function id="qiskit_ibm_transpiler.transpiler_service.TranspilerService.run" signature="run(circuits)">
<Function id="qiskit_ibm_transpiler.transpiler_service.TranspilerService.run" github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/transpiler_service.py#L95-L124" signature="run(circuits)">
Transpile the circuit(s) by calling the service /transpile endpoint.
**Parameters**

View File

@ -0,0 +1,279 @@
---
title: Qiskit Transpiler Service Client release notes
description: Changes made to Qiskit Transpiler Service Client
in_page_toc_max_heading_level: 2
---
<span id="qiskit-ibm-transpiler-release-notes" />
# Qiskit Transpiler Service Client release notes
<span id="id1" />
## 0.6.0 (2024-09-16)
### New features
* Add optimization\_preferences optional input to [`TranspilerService`](qiskit_ibm_transpiler.transpiler_service.TranspilerService "qiskit_ibm_transpiler.transpiler_service.TranspilerService") constructor.
With this new feature, users could specify by which properties they want to optimize on the transpiler process. Allowed options are: “n\_cnots”, “n\_gates”, “cnot\_layers”, “layers”, “noise”, and these options can be provided in two ways: - Only an option, as a string value: Transpilation will be done priorizating this element and then the rest of the options - Several options, as a list: Transpilation will be done only with the specified elements ([67](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/67))
* Enabling coupling\_map as options to the AI Synthesis passes ([70](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/70))
### Bug fixes
* Keep trying to get results even in case of HTTPError exception with status 520 ([52](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/52))
* Fixing the type of ECR gates when loading circuits from the Qiskit Transpiler Service ([63](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/63))
<span id="id2" />
## 0.5.2 (2024-09-12)
<span id="id3" />
### Bug fixes
* Fixing the type of ECR gates when loading circuits from the qiskit transpiler service ([63](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/63))
<span id="id4" />
## 0.5.1 (2024-08-29)
<span id="id5" />
### Bug fixes
* Keep trying getting result even in case of HTTPError exception with status 520 ([52](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/52))
<span id="id6" />
## 0.5.0 (2024-08-27)
### Upgrade notes
* Rename package to `qiskit-ibm-transpiler` ([43](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/43))
<span id="id7" />
## 0.4.9 (2024-09-12)
<span id="id8" />
### Bug fixes
* Fixing the type of ECR gates when loading circuits from the qiskit transpiler service ([64](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/64))
<span id="id9" />
## 0.4.8 (2024-08-29)
<span id="id10" />
### Bug fixes
* Keep trying getting result even in case of HTTPError exception with status 520 ([54](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/54))
<span id="id11" />
## 0.4.7 (2024-08-27)
<span id="id12" />
### Bug fixes
* Add stacklevel to DeprecationWarning so it appears in Jupyter notebooks ([49](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/49))
<span id="id13" />
## 0.4.6 (2024-08-23)
### Deprecation notes
* Add deprecation notice in preparation for project rename to `qiskit-ibm-transpiler` ([40](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/40))
<span id="id14" />
### Bug fixes
* Forward incoming error when decoding fails ([36](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/36))
<span id="id15" />
## 0.4.5 (2024-08-01)
<span id="id16" />
### New features
* Enable programmatic config of polling timeout ([28](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/28))
<span id="id17" />
### Bug fixes
* Using the declared `ai_layout_mode` in the TranspilerServices run method ([25](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/25))
<span id="id18" />
## 0.4.4 (2024-07-25)
<span id="id19" />
### Upgrade notes
* Increasing timeout to 600s instead of 120s ([21](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/21))
<span id="id20" />
### New features
* Expose service errors to users ([8](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/8))
* Configure logging for a library ([10](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/10))
<span id="id21" />
### Bug fixes
* Correctly parse string boolean for ai param ([7](https://github.com/Qiskit/qiskit-ibm-transpiler/pull/7))
<span id="id22" />
## 0.4.3 (2024-06-07)
<span id="id23" />
### Upgrade notes
* Check existence of credentials and raise related exceptions instead of breaking
<span id="id24" />
## 0.4.2 (2024-06-07)
<span id="id25" />
### Bug fixes
* Python 3.8 support. Back to specify types with typing
* Fixing some import errors for local modules
### Other notes
* Relaxing pin of local dependencies
<span id="id26" />
## 0.4.1 (2024-06-06)
<span id="id27" />
### Upgrade notes
* Updating logs levels
<span id="id28" />
### Bug fixes
* Rebuild layout in transpiled circuit
* Avoid barrier nodes in collection
<span id="id29" />
### Other notes
* Refactoring the extension code
<span id="id30" />
## 0.4.0 (2024-05-28)
<span id="id31" />
### Upgrade notes
* Updating Clifford service URL
* Replace `use_ai` by `ai` param in requests
<span id="id32" />
### New features
* Request the synthesis of a list of circuits to the service.
* Adding docstrings for public documentation
<span id="id33" />
### Bug fixes
* Adjust dependencies to be less strict and support minor version updates for qiskit & patch updates for qiskit-qasm3-import
<span id="id34" />
### Other notes
* Move type hints in documentation.
* Set name to logger
<span id="id35" />
## 0.3.0 (2024-02-29)
<span id="id36" />
### Upgrade notes
* Updating the plugin to use Qiskit 1.0 by default
<span id="id37" />
### Bug fixes
* Supporting measurements in circuits when transpiling using `ai=true` option
<span id="id38" />
## 0.2.1 (2024-02-22)
<span id="id39" />
### New features
* Add multithreading to synth requests. The requests to the service for transpile and transpile now are done in parallel.
<span id="id40" />
### Upgrade notes
* Updated collection passes. Now the passes could work up to N of qubits or with any block size of qubits.
<span id="id41" />
## 0.2.0 (2024-02-12)
<span id="id42" />
### New features
* Added support for synthesis and transpilation of Clifford, Permutation and Linear Function circuits. Using new URLs for the service.
<span id="id43" />
## 0.1.3 (2023-12-11)
<span id="id44" />
### Bug fixes
* Fixing layout integration with Qiskit for the transpiler service
* Fixing hardcoded input to routing
* Fix bug in input and refactor
<span id="id45" />
## 0.1.2 (2023-12-04)
### Prelude
* Publishing first version 0.1.2 for the IBM Quantum Summit.

View File

@ -20,7 +20,7 @@ python_api_name: qiskit_ibm_transpiler.utils
### create\_random\_linear\_function
<Function id="qiskit_ibm_transpiler.utils.create_random_linear_function" signature="qiskit_ibm_transpiler.utils.create_random_linear_function(n_qubits, seed=123)">
<Function id="qiskit_ibm_transpiler.utils.create_random_linear_function" github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/utils.py#L54-L59" signature="qiskit_ibm_transpiler.utils.create_random_linear_function(n_qubits, seed=123)">
**Parameters**
* **n\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)"))
@ -33,7 +33,7 @@ python_api_name: qiskit_ibm_transpiler.utils
### get\_metrics
<Function id="qiskit_ibm_transpiler.utils.get_metrics" signature="qiskit_ibm_transpiler.utils.get_metrics(qc)">
<Function id="qiskit_ibm_transpiler.utils.get_metrics" github="https://github.com/Qiskit/qiskit-ibm-transpiler/tree/stable/0.6/qiskit_ibm_transpiler/utils.py#L38-L46" signature="qiskit_ibm_transpiler.utils.get_metrics(qc)">
Returns a dict with metrics from a QuantumCircuit
**Parameters**

Binary file not shown.

View File

@ -48,6 +48,7 @@
"0.14": "https://ibm.box.com/shared/static/t37e7jjsi0hii4j3xoorwpwso5m03jqn.zip"
},
"qiskit-ibm-transpiler": {
"0.6": "https://ibm.box.com/shared/static/oaon22ismcdep31qbw7zz2f04b9ej2fw.zip",
"0.5": "https://ibm.box.com/shared/static/kg4rp8mkkw7ydruz8fvemvfu7aqomy83.zip",
"0.4": "https://ibm.box.com/shared/static/9y66qk3nim6oejzq8phpctxkt0j6o19z.zip",
"0.3": "https://ibm.box.com/shared/static/qiskfdazhq1dpxcl9b627x9yi60gncb4.zip"

View File

@ -18661,6 +18661,7 @@
"qiskit_transpiler_service.ai.CollectLinearFunctions": "/qiskit_ibm_transpiler.ai.CollectLinearFunctions",
"qiskit_transpiler_service.ai.CollectPermutations": "/qiskit_ibm_transpiler.ai.CollectPermutations",
"qiskit_transpiler_service.transpiler_service.TranspilerService": "/qiskit_ibm_transpiler.transpiler_service.TranspilerService"
}
},
"0.5": {}
}
}

View File

@ -109,8 +109,7 @@ export class Pkg {
...args,
title: "Qiskit Transpiler Service Client",
name: "qiskit-ibm-transpiler",
githubSlug: undefined,
releaseNotesConfig: new ReleaseNotesConfig({ enabled: false }),
githubSlug: "qiskit/qiskit-ibm-transpiler",
});
}

View File

@ -84,6 +84,7 @@ async function determineFilePaths(
"apidoc/**.html",
"stubs/**.html",
"release_notes.html",
"release-notes.html",
],
{
cwd: htmlPath,

View File

@ -42,7 +42,9 @@ export async function processHtml(options: {
const $ = load(html);
const $main = $(`[role='main']`);
const isReleaseNotes = fileName.endsWith("release_notes.html");
const isReleaseNotes =
fileName.endsWith("release_notes.html") ||
fileName.endsWith("release-notes.html");
const images = loadImages(
$,
$main,

View File

@ -38,7 +38,8 @@ export async function saveImages(
// in the current version to avoid having duplicate files.
if (
pkg.isHistorical() &&
img.fileName.includes("release_notes") &&
(img.fileName.includes("release_notes") ||
img.fileName.includes("release-notes")) &&
!pkg.hasSeparateReleaseNotes()
) {
return;