---
title: F2QSynthesisPlugin (latest version)
description: API reference for qiskit_fermions.transpiler.passes.synthesis.F2QSynthesisPlugin in the latest version of qiskit-fermions
source: https://quantum.cloud.ibm.com/docs/en/api/qiskit-fermions/transpiler-passes-synthesis-f-2-q-synthesis-plugin
---

# F2QSynthesisPlugin

*class* `F2QSynthesisPlugin(*args, **kwargs)`

Bases: [`Protocol`](https://docs.python.org/3/library/typing.html#typing.Protocol)

The protocol for plugins to the [`F2QSynthesis`](/docs/api/qiskit-fermions/transpiler-passes-f-2-q-synthesis "qiskit_fermions.transpiler.passes.F2QSynthesis") transpiler pass.

## Methods

### run

`run(in_node, out_dag, *, f2q_layout)`

Translates the provided fermion-based circuit instruction to a qubit-based one.

**Parameters**

- **in\_node** ([*DAGOpNode*](/docs/api/qiskit/qiskit.dagcircuit.DAGOpNode)) – a fermion-based circuit instruction stored in a [`DAGOpNode`](/docs/api/qiskit/qiskit.dagcircuit.DAGOpNode). Specifically, this guarantees that [`op`](/docs/api/qiskit/qiskit.dagcircuit.DAGOpNode#op) is of type [`FermionicGate`](/docs/api/qiskit-fermions/circuit-fermionic-gate "qiskit_fermions.circuit.FermionicGate").
- **out\_dag** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – the qubit-based [`DAGCircuit`](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit) into which this plugin must insert the translated circuit instruction.
- **f2q\_layout** ([*dict*](https://docs.python.org/3/builtins/stdtypes.html#dict)*\[*[*QuantumRegister*](/docs/api/qiskit/circuit#qiskit.circuit.QuantumRegister)*,* [*QuantumRegister*](/docs/api/qiskit/circuit#qiskit.circuit.QuantumRegister)*]*) – the [`F2QLayout`](/docs/api/qiskit-fermions/transpiler-f-2-q-layout "qiskit_fermions.transpiler.F2QLayout") setting that is global to the transpilation process. It is the plugin’s responsibility to respect this mapping of [`FermionicRegister`](/docs/api/qiskit-fermions/circuit-fermionic-register "qiskit_fermions.circuit.FermionicRegister") to [`QuantumRegister`](/docs/api/qiskit/circuit#qiskit.circuit.QuantumRegister).

**Return type**

None
