-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Qiskit Transpiler Service client docs
- Loading branch information
1 parent
e2e765a
commit 851f09d
Showing
12 changed files
with
269 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "qiskit-transpiler-service", | ||
"version": "0.3.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"title": "Qiskit Transpiler Service Client", | ||
"children": [ | ||
{ | ||
"title": "API index", | ||
"url": "/api/qiskit-transpiler-service" | ||
}, | ||
{ | ||
"title": "qiskit_transpiler_service.ai", | ||
"children": [ | ||
{ | ||
"title": "Module overview", | ||
"url": "/api/qiskit-transpiler-service/ai" | ||
}, | ||
{ | ||
"title": "AIRouting", | ||
"url": "/api/qiskit-transpiler-service/qiskit_transpiler_service.ai.AIRouting" | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "qiskit_transpiler_service.transpiler_service", | ||
"children": [ | ||
{ | ||
"title": "Module overview", | ||
"url": "/api/qiskit-transpiler-service/transpiler_service" | ||
}, | ||
{ | ||
"title": "TranspilerService", | ||
"url": "/api/qiskit-transpiler-service/qiskit_transpiler_service.transpiler_service.TranspilerService" | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "qiskit_transpiler_service.utils", | ||
"url": "/api/qiskit-transpiler-service/utils" | ||
} | ||
], | ||
"collapsed": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: ai | ||
description: API reference for qiskit_transpiler_service.ai | ||
in_page_toc_min_heading_level: 2 | ||
python_api_type: module | ||
python_api_name: qiskit_transpiler_service.ai | ||
--- | ||
|
||
<span id="ai-qiskit-transpiler-service-ai" /> | ||
|
||
<span id="module-qiskit_transpiler_service.ai" /> | ||
|
||
# AI | ||
|
||
<span id="module-qiskit_transpiler_service.ai" /> | ||
|
||
`qiskit_transpiler_service.ai` | ||
|
||
## Classes | ||
|
||
| | | | ||
| ------------------------------------------------------------------------------------------------------------------ | - | | ||
| [`AIRouting`](qiskit_transpiler_service.ai.AIRouting "qiskit_transpiler_service.ai.AIRouting")(\*args, \*\*kwargs) | | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# qiskit-transpiler-service API reference | ||
|
||
* [AI (`qiskit_transpiler_service.ai`)](ai) | ||
* [Qiskit Transpiler Service (`qiskit_transpiler_service.transpiler_service`)](transpiler_service) | ||
* [Utilities (`qiskit_transpiler_service.utils`)](utils) |
94 changes: 94 additions & 0 deletions
94
docs/api/qiskit-transpiler-service/qiskit_transpiler_service.ai.AIRouting.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
--- | ||
title: AIRouting | ||
description: API reference for qiskit_transpiler_service.ai.AIRouting | ||
in_page_toc_min_heading_level: 1 | ||
python_api_type: class | ||
python_api_name: qiskit_transpiler_service.ai.AIRouting | ||
--- | ||
|
||
# AIRouting | ||
|
||
<Class id="qiskit_transpiler_service.ai.AIRouting" isDedicatedPage={true} signature="qiskit_transpiler_service.ai.AIRouting(*args, **kwargs)"> | ||
Bases: [`TransformationPass`](/api/qiskit/qiskit.transpiler.TransformationPass "(in Qiskit v1.0)") | ||
|
||
## Attributes | ||
|
||
### is\_analysis\_pass | ||
|
||
<Attribute id="qiskit_transpiler_service.ai.AIRouting.is_analysis_pass"> | ||
Check if the pass is an analysis pass. | ||
|
||
If the pass is an AnalysisPass, that means that the pass can analyze the DAG and write the results of that analysis in the property set. Modifications on the DAG are not allowed by this kind of pass. | ||
</Attribute> | ||
|
||
### is\_transformation\_pass | ||
|
||
<Attribute id="qiskit_transpiler_service.ai.AIRouting.is_transformation_pass"> | ||
Check if the pass is a transformation pass. | ||
|
||
If the pass is a TransformationPass, that means that the pass can manipulate the DAG, but cannot modify the property set (but it can be read). | ||
</Attribute> | ||
|
||
## Methods | ||
|
||
### execute | ||
|
||
<Function id="qiskit_transpiler_service.ai.AIRouting.execute" signature="execute(passmanager_ir: Any, state: PassManagerState, callback: Callable | None = None) → tuple[Any, PassManagerState]"> | ||
Execute optimization task for input Qiskit IR. | ||
|
||
**Parameters** | ||
|
||
* **passmanager\_ir** – Qiskit IR to optimize. | ||
* **state** – State associated with workflow execution by the pass manager itself. | ||
* **callback** – A callback function which is caller per execution of optimization task. | ||
|
||
**Returns** | ||
|
||
Optimized Qiskit IR and state of the workflow. | ||
</Function> | ||
|
||
### name | ||
|
||
<Function id="qiskit_transpiler_service.ai.AIRouting.name" signature="name() → str"> | ||
Name of the pass. | ||
</Function> | ||
|
||
### run | ||
|
||
<Function id="qiskit_transpiler_service.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_transpiler_service.ai.AIRouting.update_status" signature="update_status(state: PassManagerState, run_state: RunState) → PassManagerState"> | ||
Update workflow status. | ||
|
||
**Parameters** | ||
|
||
* **state** – Pass manager state to update. | ||
* **run\_state** – Completion status of current task. | ||
|
||
**Returns** | ||
|
||
Updated pass manager state. | ||
</Function> | ||
</Class> | ||
|
20 changes: 20 additions & 0 deletions
20
...iler-service/qiskit_transpiler_service.transpiler_service.TranspilerService.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: TranspilerService | ||
description: API reference for qiskit_transpiler_service.transpiler_service.TranspilerService | ||
in_page_toc_min_heading_level: 1 | ||
python_api_type: class | ||
python_api_name: qiskit_transpiler_service.transpiler_service.TranspilerService | ||
--- | ||
|
||
# TranspilerService | ||
|
||
<Class id="qiskit_transpiler_service.transpiler_service.TranspilerService" isDedicatedPage={true} signature="qiskit_transpiler_service.transpiler_service.TranspilerService(optimization_level: int, ai: bool = True, coupling_map: List[List[int]] | None = None, backend_name: str | None = None, qiskit_transpile_options: dict | None = None, ai_layout_mode: str | None = None)"> | ||
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.12)") | ||
|
||
## Methods | ||
|
||
### run | ||
|
||
<Function id="qiskit_transpiler_service.transpiler_service.TranspilerService.run" signature="run(circuits: List[str | QuantumCircuit] | str | QuantumCircuit)" /> | ||
</Class> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: transpiler_service | ||
description: API reference for qiskit_transpiler_service.transpiler_service | ||
in_page_toc_min_heading_level: 2 | ||
python_api_type: module | ||
python_api_name: qiskit_transpiler_service.transpiler_service | ||
--- | ||
|
||
<span id="qiskit-transpiler-service-qiskit-transpiler-service-transpiler-service" /> | ||
|
||
<span id="module-qiskit_transpiler_service.transpiler_service" /> | ||
|
||
# Qiskit Transpiler Service | ||
|
||
<span id="module-qiskit_transpiler_service.transpiler_service" /> | ||
|
||
`qiskit_transpiler_service.transpiler_service` | ||
|
||
## Classes | ||
|
||
| | | | ||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | | ||
| [`TranspilerService`](qiskit_transpiler_service.transpiler_service.TranspilerService "qiskit_transpiler_service.transpiler_service.TranspilerService")(optimization\_level\[, ai, ...]) | | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: utils | ||
description: API reference for qiskit_transpiler_service.utils | ||
in_page_toc_min_heading_level: 2 | ||
python_api_type: module | ||
python_api_name: qiskit_transpiler_service.utils | ||
--- | ||
|
||
<span id="utilities-qiskit-transpiler-service-utils" /> | ||
|
||
<span id="module-qiskit_transpiler_service.utils" /> | ||
|
||
# Utilities | ||
|
||
<span id="module-qiskit_transpiler_service.utils" /> | ||
|
||
`qiskit_transpiler_service.utils` | ||
|
||
## Functions | ||
|
||
### create\_random\_linear\_function | ||
|
||
<Function id="qiskit_transpiler_service.utils.create_random_linear_function" signature="qiskit_transpiler_service.utils.create_random_linear_function(n_qubits: int, seed: int = 123) → LinearFunction" /> | ||
|
||
### get\_metrics | ||
|
||
<Function id="qiskit_transpiler_service.utils.get_metrics" signature="qiskit_transpiler_service.utils.get_metrics(qc: QuantumCircuit) → dict[str, int]"> | ||
Returns a dict with metrics from a QuantumCircuit | ||
</Function> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters