104 lines
3.9 KiB
Plaintext
104 lines
3.9 KiB
Plaintext
---
|
||
title: ConsolidateResets (v0.9)
|
||
description: API reference for qiskit_addon_cutting.utils.transpiler_passes.ConsolidateResets in qiskit-addon-cutting v0.9
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit_addon_cutting.utils.transpiler_passes.ConsolidateResets
|
||
---
|
||
|
||
# ConsolidateResets
|
||
|
||
<Class id="qiskit_addon_cutting.utils.transpiler_passes.ConsolidateResets" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-addon-cutting/tree/stable/0.9/qiskit_addon_cutting/utils/transpiler_passes.py" signature="ConsolidateResets(*args, **kwargs)" modifiers="class">
|
||
Bases: [`TransformationPass`](/api/qiskit/qiskit.transpiler.TransformationPass "(in Qiskit v1.3)")
|
||
|
||
Consolidate a run duplicate resets in to a single reset.
|
||
|
||
## Attributes
|
||
|
||
### is\_analysis\_pass
|
||
|
||
<Attribute id="qiskit_addon_cutting.utils.transpiler_passes.ConsolidateResets.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_addon_cutting.utils.transpiler_passes.ConsolidateResets.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_addon_cutting.utils.transpiler_passes.ConsolidateResets.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.13)")) – Qiskit IR to optimize.
|
||
* **state** ([`PassManagerState`](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.3)")) – State associated with workflow execution by the pass manager itself.
|
||
* **callback** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional "(in Python v3.13)")\[[`Callable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable "(in Python v3.13)")]) – A callback function which is caller per execution of optimization task.
|
||
|
||
**Return type**
|
||
|
||
[`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.13)")\[[`Any`](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.13)"), [`PassManagerState`](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.3)")]
|
||
|
||
**Returns**
|
||
|
||
Optimized Qiskit IR and state of the workflow.
|
||
</Function>
|
||
|
||
### name
|
||
|
||
<Function id="qiskit_addon_cutting.utils.transpiler_passes.ConsolidateResets.name" signature="name()">
|
||
Name of the pass.
|
||
|
||
**Return type**
|
||
|
||
[`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")
|
||
</Function>
|
||
|
||
### run
|
||
|
||
<Function id="qiskit_addon_cutting.utils.transpiler_passes.ConsolidateResets.run" signature="run(dag)">
|
||
Run the ConsolidateResets pass on `dag`.
|
||
|
||
**Parameters**
|
||
|
||
**dag** (*DAGCircuit*) – the DAG to be optimized.
|
||
|
||
**Returns**
|
||
|
||
the optimized DAG.
|
||
|
||
**Return type**
|
||
|
||
DAGCircuit
|
||
</Function>
|
||
|
||
### update\_status
|
||
|
||
<Function id="qiskit_addon_cutting.utils.transpiler_passes.ConsolidateResets.update_status" signature="update_status(state, run_state)">
|
||
Update workflow status.
|
||
|
||
**Parameters**
|
||
|
||
* **state** ([`PassManagerState`](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.3)")) – Pass manager state to update.
|
||
* **run\_state** (`RunState`) – Completion status of current task.
|
||
|
||
**Return type**
|
||
|
||
[`PassManagerState`](/api/qiskit/qiskit.passmanager.PassManagerState "(in Qiskit v1.3)")
|
||
|
||
**Returns**
|
||
|
||
Updated pass manager state.
|
||
</Function>
|
||
</Class>
|
||
|