qiskit-documentation/docs/api/qiskit/0.24/qiskit.transpiler.passes.Un...

88 lines
3.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: UnitarySynthesis
description: API reference for qiskit.transpiler.passes.UnitarySynthesis
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.transpiler.passes.UnitarySynthesis
---
<span id="qiskit-transpiler-passes-unitarysynthesis" />
# qiskit.transpiler.passes.UnitarySynthesis
<Class id="qiskit.transpiler.passes.UnitarySynthesis" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.16/qiskit/transpiler/passes/synthesis/unitary_synthesis.py" signature="UnitarySynthesis(basis_gates)" modifiers="class">
Synthesize gates according to their basis gates.
SynthesizeUnitaries initializer.
**Parameters**
**basis\_gates** (`List`\[`str`]) List of gate names to target.
### \_\_init\_\_
<Function id="qiskit.transpiler.passes.UnitarySynthesis.__init__" signature="__init__(basis_gates)">
SynthesizeUnitaries initializer.
**Parameters**
**basis\_gates** (`List`\[`str`]) List of gate names to target.
</Function>
## Methods
| | |
| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------- |
| [`__init__`](#qiskit.transpiler.passes.UnitarySynthesis.__init__ "qiskit.transpiler.passes.UnitarySynthesis.__init__")(basis\_gates) | SynthesizeUnitaries initializer. |
| [`name`](#qiskit.transpiler.passes.UnitarySynthesis.name "qiskit.transpiler.passes.UnitarySynthesis.name")() | Return the name of the pass. |
| [`run`](#qiskit.transpiler.passes.UnitarySynthesis.run "qiskit.transpiler.passes.UnitarySynthesis.run")(dag) | Run the UnitarySynthesis pass on dag. |
## Attributes
| | |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| [`is_analysis_pass`](#qiskit.transpiler.passes.UnitarySynthesis.is_analysis_pass "qiskit.transpiler.passes.UnitarySynthesis.is_analysis_pass") | Check if the pass is an analysis pass. |
| [`is_transformation_pass`](#qiskit.transpiler.passes.UnitarySynthesis.is_transformation_pass "qiskit.transpiler.passes.UnitarySynthesis.is_transformation_pass") | Check if the pass is a transformation pass. |
### is\_analysis\_pass
<Attribute id="qiskit.transpiler.passes.UnitarySynthesis.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.UnitarySynthesis.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.UnitarySynthesis.name" signature="name()">
Return the name of the pass.
</Function>
### run
<Function id="qiskit.transpiler.passes.UnitarySynthesis.run" signature="run(dag)">
Run the UnitarySynthesis pass on dag.
**Parameters**
**dag** (`DAGCircuit`) input dag.
**Return type**
`DAGCircuit`
**Returns**
Output dag with UnitaryGates synthesized to target basis.
</Function>
</Class>