60 lines
2.1 KiB
Plaintext
60 lines
2.1 KiB
Plaintext
---
|
||
title: GatesInBasis
|
||
description: API reference for qiskit.transpiler.passes.GatesInBasis
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.transpiler.passes.GatesInBasis
|
||
---
|
||
|
||
# GatesInBasis
|
||
|
||
<Class id="qiskit.transpiler.passes.GatesInBasis" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.24/qiskit/transpiler/passes/utils/gates_basis.py" signature="GatesInBasis(*args, **kwargs)" modifiers="class">
|
||
Bases: [`AnalysisPass`](qiskit.transpiler.AnalysisPass "qiskit.transpiler.basepasses.AnalysisPass")
|
||
|
||
Check if all gates in a DAG are in a given set of gates
|
||
|
||
Initialize the GatesInBasis pass.
|
||
|
||
**Parameters**
|
||
|
||
* **basis\_gates** (*list*) – The list of strings representing the set of basis gates.
|
||
* **target** ([*Target*](qiskit.transpiler.Target "qiskit.transpiler.Target")) – The target representing the backend. If specified this will be used instead of the `basis_gates` parameter
|
||
|
||
## Methods
|
||
|
||
<span id="qiskit-transpiler-passes-gatesinbasis-name" />
|
||
|
||
### name
|
||
|
||
<Function id="qiskit.transpiler.passes.GatesInBasis.name" signature="GatesInBasis.name()">
|
||
Return the name of the pass.
|
||
</Function>
|
||
|
||
<span id="qiskit-transpiler-passes-gatesinbasis-run" />
|
||
|
||
### run
|
||
|
||
<Function id="qiskit.transpiler.passes.GatesInBasis.run" signature="GatesInBasis.run(dag)">
|
||
Run the GatesInBasis pass on dag.
|
||
</Function>
|
||
|
||
## Attributes
|
||
|
||
### is\_analysis\_pass
|
||
|
||
<Attribute id="qiskit.transpiler.passes.GatesInBasis.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.GatesInBasis.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>
|
||
|