ACGSynthesisPermutation¶
- class ACGSynthesisPermutation[source]¶
Bases:
qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPlugin
The permutation synthesis plugin based on the Alon, Chung, Graham method.
This plugin can be accessed by the
acg
method name in theHLSConfig
forpermutation
. For example:from qiskit.circuit import QuantumCircuit from qiskit.circuit.library import PermutationGate from qiskit.transpiler import PassManager from qiskit.transpiler.passes.synthesis.high_level_synthesis import HLSConfig, HighLevelSynthesis from qiskit.transpiler.passes.synthesis.plugin import HighLevelSynthesisPluginManager # Create a permutation and add it to a quantum circuit perm = PermutationGate([4, 6, 3, 7, 1, 2, 0, 5]) qc = QuantumCircuit(8) qc.append(perm, range(8)) # ACGSynthesisPermutation plugin for permutations # Returns a quantum circuit with size 6 and depth 2 qct = PassManager(HighLevelSynthesis(HLSConfig(permutation=[("acg", {})]))).run(qc) print(f"acg: {qct.size() = }, {qct.depth() = }")
Methods
Run synthesis for the given Permutation.