qiskit.synthesis.synth_permutation_acg¶
- synth_permutation_acg(pattern)[Quellcode]¶
Synthesize a permutation circuit for a fully-connected architecture using the Alon, Chung, Graham method.
This produces a quantum circuit of depth 2 (measured in the number of SWAPs).
This implementation is based on the Theorem 2 in the paper „Routing Permutations on Graphs Via Matchings“ (1993), available at https://www.cs.tau.ac.il/~nogaa/PDFS/r.pdf.
- Parameter
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.- Rückgabe
the synthesized quantum circuit.
- Rückgabetyp