Transpiler Pass Plugins

The F2QSynthesis transpiler pass exposes a plugin interface (see F2QSynthesisPlugin) through which implementations for mapping fermion-based instructions to qubit-based ones can be registered.

The available plugins are managed by the F2QSynthesisPluginManager. Choosing the right combination of synthesis plugins is crucial and the F2QSynthesis transpilation pass does not have any default plugins defined! For this, refer to the transpiler presets.

F2QSynthesisPlugin(*args, **kwargs)

The protocol for plugins to the F2QSynthesis transpiler pass.

F2QSynthesisPluginManager()

A simple manager of the installed fermion-to-qubit synthesis plugins.

The plugins to use at runtime have to be registered in the F2QSynthesis.methods attribute. This can be done easily through the config argument of F2QSynthesis which specifies the plugins to use from the F2QSynthesisPluginManager or it can be done manually by writing into F2QSynthesis.methods directly.

The table below lists the builtin synthesis plugins, organized by the FermionicGate that they act upon:

Table 1 An overview of the builtin qiskit_fermions.transpiler.synthesis entry-points.

Circuit instruction name

Plugin method name

Reference

Evolution

MapperFn

MapperFnEvolutionSynthesis

InitializeModes

TrivialOccupation

TrivialOccupationInitializeModesSynthesis

OrbitalRotation

GivensDecomposition

GivensDecompositionOrbitalRotationSynthesis

GivensDecompositionOrbitalRotationSynthesis()

A F2QSynthesisPlugin for transpiling OrbitalRotation into Givens rotations.

MapperFnEvolutionSynthesis(mapper_fn)

A F2QSynthesisPlugin for transpiling Evolution under a custom mapping.

TrivialOccupationInitializeModesSynthesis()

A F2QSynthesisPlugin for transpiling InitializeModes with trivial occupation.