qiskit.synthesis.synth_permutation_basic¶
- synth_permutation_basic(pattern)[ソース]¶
Synthesize a permutation circuit for a fully-connected architecture using sorting.
More precisely, if the input permutation is a cycle of length
m
, then this creates a quantum circuit withm-1
SWAPs (and of depthm-1
); if the input permutation consists of several disjoint cycles, then each cycle is essentially treated independently.- パラメータ
pattern (Union[list[int], np.ndarray]) – permutation pattern, describing which qubits occupy the positions 0, 1, 2, etc. after applying the permutation. That is,
pattern[k] = m
when the permutation maps qubitm
to positionk
. As an example, the pattern[2, 4, 3, 0, 1]
means that qubit2
goes to position0
, qubit4
goes to position1
, etc.- 戻り値
the synthesized quantum circuit.
- 戻り値の型