134 lines
6.1 KiB
Plaintext
134 lines
6.1 KiB
Plaintext
---
|
||
title: AQCSynthesisPlugin
|
||
description: API reference for qiskit.transpiler.synthesis.aqc.AQCSynthesisPlugin
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.transpiler.synthesis.aqc.AQCSynthesisPlugin
|
||
---
|
||
|
||
# AQCSynthesisPlugin
|
||
|
||
<Class id="qiskit.transpiler.synthesis.aqc.AQCSynthesisPlugin" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.20/qiskit/transpiler/synthesis/aqc/aqc_plugin.py" signature="AQCSynthesisPlugin" modifiers="class">
|
||
Bases: [`qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPlugin`](qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPlugin "qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPlugin")
|
||
|
||
An AQC-based Qiskit unitary synthesis plugin.
|
||
|
||
This plugin is invoked by [`transpile()`](qiskit.compiler.transpile "qiskit.compiler.transpile") when the `unitary_synthesis_method` parameter is set to `"aqc"`.
|
||
|
||
This plugin supports customization and additional parameters can be passed to the plugin by passing a dictionary as the `unitary_synthesis_plugin_config` parameter of the [`transpile()`](qiskit.compiler.transpile "qiskit.compiler.transpile") function.
|
||
|
||
Supported parameters in the dictionary:
|
||
|
||
**network\_layout (str)**
|
||
|
||
Type of network geometry, one of \{`"sequ"`, `"spin"`, `"cart"`, `"cyclic_spin"`, `"cyclic_line"`}. Default value is `"spin"`.
|
||
|
||
**connectivity\_type (str)**
|
||
|
||
type of inter-qubit connectivity, \{`"full"`, `"line"`, `"star"`}. Default value is `"full"`.
|
||
|
||
**depth (int)**
|
||
|
||
depth of the CNOT-network, i.e. the number of layers, where each layer consists of a single CNOT-block.
|
||
|
||
**optimizer ([`Optimizer`](qiskit.algorithms.optimizers.Optimizer "qiskit.algorithms.optimizers.Optimizer"))**
|
||
|
||
An instance of optimizer to be used in the optimization process.
|
||
|
||
**seed (int)**
|
||
|
||
A random seed.
|
||
|
||
**initial\_point (`ndarray`)**
|
||
|
||
Initial values of angles/parameters to start the optimization process from.
|
||
|
||
## Methods Defined Here
|
||
|
||
### run
|
||
|
||
<Function id="qiskit.transpiler.synthesis.aqc.AQCSynthesisPlugin.run" signature="AQCSynthesisPlugin.run(unitary, **options)">
|
||
Run synthesis for the given unitary matrix
|
||
|
||
**Parameters**
|
||
|
||
* **unitary** (*numpy.ndarray*) – The unitary matrix to synthesize to a [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") object
|
||
* **options** – The optional kwargs that are passed based on the output the `support_*` methods on the class. Refer to the documentation for these methods on [`UnitarySynthesisPlugin`](qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPlugin "qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPlugin") to see what the keys and values are.
|
||
|
||
**Returns**
|
||
|
||
The dag circuit representation of the unitary. Alternatively, you can return a tuple of the form `(dag, wires)` where `dag` is the dag circuit representation of the circuit representation of the unitary and `wires` is the mapping wires to use for [`qiskit.dagcircuit.DAGCircuit.substitute_node_with_dag()`](qiskit.dagcircuit.DAGCircuit#substitute_node_with_dag "qiskit.dagcircuit.DAGCircuit.substitute_node_with_dag"). If you return a tuple and `wires` is `None` this will behave just as if only a [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") was returned. Additionally if this returns `None` no substitution will be made.
|
||
|
||
**Return type**
|
||
|
||
[DAGCircuit](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit")
|
||
</Function>
|
||
|
||
## Attributes
|
||
|
||
### max\_qubits
|
||
|
||
<Attribute id="qiskit.transpiler.synthesis.aqc.AQCSynthesisPlugin.max_qubits">
|
||
Maximum number of supported qubits is `14`.
|
||
</Attribute>
|
||
|
||
### min\_qubits
|
||
|
||
<Attribute id="qiskit.transpiler.synthesis.aqc.AQCSynthesisPlugin.min_qubits">
|
||
Minimum number of supported qubits is `3`.
|
||
</Attribute>
|
||
|
||
### supported\_bases
|
||
|
||
<Attribute id="qiskit.transpiler.synthesis.aqc.AQCSynthesisPlugin.supported_bases">
|
||
The plugin does not support bases for synthesis.
|
||
</Attribute>
|
||
|
||
### supports\_basis\_gates
|
||
|
||
<Attribute id="qiskit.transpiler.synthesis.aqc.AQCSynthesisPlugin.supports_basis_gates">
|
||
The plugin does not support basis gates and by default it synthesizes a circuit using `["rx", "ry", "rz", "cx"]` gate basis.
|
||
</Attribute>
|
||
|
||
### supports\_coupling\_map
|
||
|
||
<Attribute id="qiskit.transpiler.synthesis.aqc.AQCSynthesisPlugin.supports_coupling_map">
|
||
The plugin does not support coupling maps.
|
||
</Attribute>
|
||
|
||
### supports\_gate\_errors
|
||
|
||
<Attribute id="qiskit.transpiler.synthesis.aqc.AQCSynthesisPlugin.supports_gate_errors">
|
||
The plugin does not support gate errors.
|
||
</Attribute>
|
||
|
||
### supports\_gate\_lengths
|
||
|
||
<Attribute id="qiskit.transpiler.synthesis.aqc.AQCSynthesisPlugin.supports_gate_lengths">
|
||
The plugin does not support gate lengths.
|
||
</Attribute>
|
||
|
||
### supports\_natural\_direction
|
||
|
||
<Attribute id="qiskit.transpiler.synthesis.aqc.AQCSynthesisPlugin.supports_natural_direction">
|
||
The plugin does not support natural direction, it assumes bidirectional two qubit gates.
|
||
</Attribute>
|
||
|
||
### supports\_pulse\_optimize
|
||
|
||
<Attribute id="qiskit.transpiler.synthesis.aqc.AQCSynthesisPlugin.supports_pulse_optimize">
|
||
The plugin does not support optimization of pulses.
|
||
</Attribute>
|
||
|
||
### supports\_target
|
||
|
||
<Attribute id="qiskit.transpiler.synthesis.aqc.AQCSynthesisPlugin.supports_target">
|
||
Whether the plugin supports taking `target` as an option
|
||
|
||
`target` will be a [`Target`](qiskit.transpiler.Target "qiskit.transpiler.Target") object representing the target device for the output of the synthesis pass.
|
||
|
||
By default this will be `False` since the plugin interface predates the [`Target`](qiskit.transpiler.Target "qiskit.transpiler.Target") class. If a plugin returns `True` for this attribute, it is expected that the plugin will use the [`Target`](qiskit.transpiler.Target "qiskit.transpiler.Target") instead of the values passed if any of `supports_gate_lengths`, `supports_gate_errors`, `supports_coupling_map`, and `supports_basis_gates` are set (although ideally all those parameters should contain duplicate information).
|
||
</Attribute>
|
||
</Class>
|
||
|