qiskit-documentation/docs/api/qiskit/0.25/qiskit.transpiler.passes.De...

64 lines
3.0 KiB
Plaintext

---
title: Depth
description: API reference for qiskit.transpiler.passes.Depth
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.transpiler.passes.Depth
---
# qiskit.transpiler.passes.Depth
<Class id="qiskit.transpiler.passes.Depth" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.17/qiskit/transpiler/passes/analysis/depth.py" signature="Depth(*args, **kwargs)" modifiers="class">
Calculate the depth of a DAG circuit.
### \_\_init\_\_
<Function id="qiskit.transpiler.passes.Depth.__init__" signature="__init__()">
Initialize self. See help(type(self)) for accurate signature.
</Function>
## Methods
| | |
| -------------------------------------------------------------------------------------------------- | ---------------------------- |
| [`__init__`](#qiskit.transpiler.passes.Depth.__init__ "qiskit.transpiler.passes.Depth.__init__")() | Initialize self. |
| [`name`](#qiskit.transpiler.passes.Depth.name "qiskit.transpiler.passes.Depth.name")() | Return the name of the pass. |
| [`run`](#qiskit.transpiler.passes.Depth.run "qiskit.transpiler.passes.Depth.run")(dag) | Run the Depth pass on dag. |
## Attributes
| | |
| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------- |
| [`is_analysis_pass`](#qiskit.transpiler.passes.Depth.is_analysis_pass "qiskit.transpiler.passes.Depth.is_analysis_pass") | Check if the pass is an analysis pass. |
| [`is_transformation_pass`](#qiskit.transpiler.passes.Depth.is_transformation_pass "qiskit.transpiler.passes.Depth.is_transformation_pass") | Check if the pass is a transformation pass. |
### is\_analysis\_pass
<Attribute id="qiskit.transpiler.passes.Depth.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.passes.Depth.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>
### name
<Function id="qiskit.transpiler.passes.Depth.name" signature="name()">
Return the name of the pass.
</Function>
### run
<Function id="qiskit.transpiler.passes.Depth.run" signature="run(dag)">
Run the Depth pass on dag.
</Function>
</Class>