Portuguese
Idiomas
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.synthesis.synth_permutation_basic

synth_permutation_basic(pattern)[código fonte]

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 with m-1 SWAPs (and of depth m-1); if the input permutation consists of several disjoint cycles, then each cycle is essentially treated independently.

Parâmetros

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 qubit m to position k. As an example, the pattern [2, 4, 3, 0, 1] means that qubit 2 goes to position 0, qubit 4 goes to position 1, etc.

Retorno

the synthesized quantum circuit.

Tipo de retorno

QuantumCircuit