Transpiler Pass Synthesis (F2Q)

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. It is the counterpart of the fermion-to-fermion synthesis that the F2FSynthesis pass performs one stage earlier (see synthesis).

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.

Builtin 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 plugins, organized by the FermionicGate that they act upon. These are the entry points of the qiskit_fermions.transpiler.synthesis group, named <gate>.<method>:

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

Circuit instruction name

Plugin method name

Reference

Notes

Evolution

MapperFn

MapperFnEvolutionSynthesis

InitializeModes

TrivialOccupation

TrivialOccupationInitializeModesSynthesis

FermionicMeasure

TrivialOccupation

TrivialOccupationFermionicMeasureSynthesis

OrbitalRotation

GivensDecomposition

GivensDecompositionOrbitalRotationSynthesis

DEPRECATED

PrepareSlaterDeterminant

GivensDecompositionSlater

GivensDecompositionSlaterDeterminantSynthesis

DEPRECATED

MapperFnEvolutionSynthesis(mapper_fn[, ...])

A F2QSynthesisPlugin for transpiling Evolution under a custom mapping.

TrivialOccupationFermionicMeasureSynthesis()

A F2QSynthesisPlugin for transpiling FermionicMeasure with trivial occupation.

TrivialOccupationInitializeModesSynthesis()

A F2QSynthesisPlugin for transpiling InitializeModes with trivial occupation.

GivensDecompositionOrbitalRotationSynthesis()

DEPRECATED The former plugin for transpiling an OrbitalRotation into Givens rotations.

GivensDecompositionSlaterDeterminantSynthesis(*)

DEPRECATED The former plugin for transpiling a PrepareSlaterDeterminant into Givens rotations.

Qubit-stage synthesis

The plugins above map fermionic instructions to qubit ones. The following is instead a plugin of Qiskit’s HighLevelSynthesis for the qubit stage, which recognizes the image of a fermionic hop between adjacent modes and emits it as a single XXPlusYYGate. The Jordan-Wigner preset registers it.

HopEvolutionSynthesis(*[, atol])

A high-level synthesis plugin for the evolution under a hop between two qubits.

Additional helper functions

The Pauli term order that a mapper function produces is preserved through synthesis, since a product formula synthesizes the terms in the order it receives them. These adapters wrap a mapper function to choose that order:

group_wise(mapper_fn)

Wraps a mapper function so that it maps an operator one group at a time.

simplify(mapper_fn)

Wraps a mapper function so that it simplifies the operator it returns.