Skip to main contentIBM Quantum Documentation

TokenSwapperSynthesisPermutation

class qiskit.transpiler.passes.synthesis.high_level_synthesis.TokenSwapperSynthesisPermutation

GitHub

Bases: HighLevelSynthesisPlugin

The permutation synthesis plugin based on the token swapper algorithm.

This plugin name is :permutation.token_swapper which can be used as the key on an HLSConfig object to use this method with HighLevelSynthesis.

In more detail, this plugin is used to synthesize objects of type PermutationGate. When synthesis succeeds, the plugin outputs a quantum circuit consisting only of swap gates. When synthesis does not succeed, the plugin outputs None.

If either coupling_map or qubits is None, then the synthesized circuit is not required to adhere to connectivity constraints, as is the case when the synthesis is done before layout/routing.

On the other hand, if both coupling_map and qubits are specified, the synthesized circuit is supposed to adhere to connectivity constraints. At the moment, the plugin only creates swap gates between qubits in qubits, i.e. it does not use any other qubits in the coupling map (if such synthesis is not possible, the plugin outputs None).

The plugin supports the following plugin-specific options:

  • trials: The number of trials for the token swapper to perform the mapping. The circuit with the smallest number of SWAPs is returned.
  • seed: The argument to the token swapper specifying the seed for random trials.
  • parallel_threshold: The argument to the token swapper specifying the number of nodes in the graph beyond which the algorithm will use parallel processing.

For more details on the token swapper algorithm, see to the paper: arXiv:1902.09102.


Methods

run

run(high_level_object, coupling_map=None, target=None, qubits=None, **options)

GitHub

Run synthesis for the given Permutation.

Was this page helpful?
Report a bug or request content on GitHub.