qiskit-documentation/docs/api/qiskit/0.43/qiskit.transpiler.AnalysisP...

61 lines
1.9 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: AnalysisPass
description: API reference for qiskit.transpiler.AnalysisPass
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.transpiler.AnalysisPass
---
# AnalysisPass
<Class id="qiskit.transpiler.AnalysisPass" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.24/qiskit/transpiler/basepasses.py" signature="AnalysisPass(*args, **kwargs)" modifiers="class">
Bases: `BasePass`
An analysis pass: change property set, not DAG.
## Methods
<span id="qiskit-transpiler-analysispass-name" />
### name
<Function id="qiskit.transpiler.AnalysisPass.name" signature="AnalysisPass.name()">
Return the name of the pass.
</Function>
<span id="qiskit-transpiler-analysispass-run" />
### run
<Function id="qiskit.transpiler.AnalysisPass.run" signature="AnalysisPass.run(dag)" modifiers="abstract">
Run a pass on the DAGCircuit. This is implemented by the pass developer.
**Parameters**
**dag** ([*DAGCircuit*](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit")) the dag on which the pass is run.
**Raises**
**NotImplementedError** when this is left unimplemented for a pass.
</Function>
## Attributes
### is\_analysis\_pass
<Attribute id="qiskit.transpiler.AnalysisPass.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.AnalysisPass.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>
</Class>