---
title: passes (latest version)
description: API reference for qiskit_fermions.transpiler.passes in the latest version of qiskit-fermions
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit-fermions/transpiler-passes
---

# Transpiler Passes

This module provides various transpiler passes for the stages explained in [`qiskit_fermions.transpiler`](/docs/api/qiskit-fermions/transpiler#module-qiskit_fermions.transpiler "qiskit_fermions.transpiler").

## Optimization Passes

These passes provide different kinds of optimization of [`FermionicDAGCircuit`](/docs/api/qiskit-fermions/circuit-fermionic-dag-circuit#qiskit_fermions.circuit.FermionicDAGCircuit "qiskit_fermions.circuit.FermionicDAGCircuit") instances.

|                                                                                                                                                                                                                                                                     |                                                                                                                                                                                                                            |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`MergeOrbitalRotations`](/docs/api/qiskit-fermions/transpiler-passes-merge-orbital-rotations#qiskit_fermions.transpiler.passes.MergeOrbitalRotations "qiskit_fermions.transpiler.passes.MergeOrbitalRotations")()                                                  | A transpilation pass merging runs of consecutive orbital rotations into a single one.                                                                                                                                      |
| [`MergeSlaterDeterminantPreparation`](/docs/api/qiskit-fermions/transpiler-passes-merge-slater-determinant-preparation#qiskit_fermions.transpiler.passes.MergeSlaterDeterminantPreparation "qiskit_fermions.transpiler.passes.MergeSlaterDeterminantPreparation")() | A transpilation pass fusing an initialization and rotation into a Slater determinant prep.                                                                                                                                 |
| [`QDriftTrotterization`](/docs/api/qiskit-fermions/transpiler-passes-q-drift-trotterization#qiskit_fermions.transpiler.passes.QDriftTrotterization "qiskit_fermions.transpiler.passes.QDriftTrotterization")(num\_terms, \*\[, ...])                                | A transpilation pass to Trotterize [`Evolution`](/docs/api/qiskit-fermions/circuit-library-evolution#qiskit_fermions.circuit.library.Evolution "qiskit_fermions.circuit.library.Evolution") gates via the qDRIFT protocol. |
| [`RelabelModes`](/docs/api/qiskit-fermions/transpiler-passes-relabel-modes#qiskit_fermions.transpiler.passes.RelabelModes "qiskit_fermions.transpiler.passes.RelabelModes")(\[permutation, solver])                                                                 | A transpilation pass to relabel the fermionic modes.                                                                                                                                                                       |

## Layouting Passes

These passes are designed to help configuring the global [`F2QLayout`](/docs/api/qiskit-fermions/transpiler-f-2-q-layout#qiskit_fermions.transpiler.F2QLayout "qiskit_fermions.transpiler.F2QLayout") setting for the transpilation process. This setting needs to be placed in the `f2q_layout` field of the [`property_set`](/docs/api/qiskit/qiskit.passmanager.PassManagerState#property_set), from where it will be read during the [Synthesis Passes](#qiskit-fermions-transpiler-passes-synthesis).

|                                                                                                                                                                                                    |                                                                                                                                                                                        |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`TrivialF2QLayout`](/docs/api/qiskit-fermions/transpiler-passes-trivial-f-2-q-layout#qiskit_fermions.transpiler.passes.TrivialF2QLayout "qiskit_fermions.transpiler.passes.TrivialF2QLayout")()   | Trivially maps $n$ fermionic modes to $n$ qubits.                                                                                                                                      |
| [`CustomF2QLayout`](/docs/api/qiskit-fermions/transpiler-passes-custom-f-2-q-layout#qiskit_fermions.transpiler.passes.CustomF2QLayout "qiskit_fermions.transpiler.passes.CustomF2QLayout")(layout) | Sets the user-provided [`F2QLayout`](/docs/api/qiskit-fermions/transpiler-f-2-q-layout#qiskit_fermions.transpiler.F2QLayout "qiskit_fermions.transpiler.F2QLayout") in the transpiler. |

## Synthesis Passes

The main logic for mapping a [`FermionicDAGCircuit`](/docs/api/qiskit-fermions/circuit-fermionic-dag-circuit#qiskit_fermions.circuit.FermionicDAGCircuit "qiskit_fermions.circuit.FermionicDAGCircuit") to a [`DAGCircuit`](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit) is implemented by a single synthesis pass, namely the [`F2QSynthesis`](/docs/api/qiskit-fermions/transpiler-passes-f-2-q-synthesis#qiskit_fermions.transpiler.passes.F2QSynthesis "qiskit_fermions.transpiler.passes.F2QSynthesis"). It is conceptually similar to Qiskit’s [`HighLevelSynthesis`](/docs/api/qiskit/qiskit.transpiler.passes.HighLevelSynthesis) because it simply iterates over the [`FermionicDAGCircuit`](/docs/api/qiskit-fermions/circuit-fermionic-dag-circuit#qiskit_fermions.circuit.FermionicDAGCircuit "qiskit_fermions.circuit.FermionicDAGCircuit") instructions and delegates the mapping to qubit-based instructions to [Transpiler Pass Plugins](/docs/api/qiskit-fermions/transpiler-passes-plugins#qiskit-fermions-transpiler-passes-synthesis-plugins) for each of the encountered types of [`FermionicGate`](/docs/api/qiskit-fermions/circuit-fermionic-gate#qiskit_fermions.circuit.FermionicGate "qiskit_fermions.circuit.FermionicGate").

|                                                                                                                                                                                                                                                                    |                                                                                                                                                                                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [`F2QSynthesis`](/docs/api/qiskit-fermions/transpiler-passes-f-2-q-synthesis#qiskit_fermions.transpiler.passes.F2QSynthesis "qiskit_fermions.transpiler.passes.F2QSynthesis")(\[config])                                                                           | A transpilation pass to map fermion-based circuit instructions to qubit-based ones.                                                                                                                                                              |
| [`F2QSynthesisConfig`](/docs/api/qiskit-fermions/transpiler-passes-synthesis-synthesis-f-2-q-synthesis-config#qiskit_fermions.transpiler.passes.synthesis.synthesis.F2QSynthesisConfig "qiskit_fermions.transpiler.passes.synthesis.synthesis.F2QSynthesisConfig") | The dictionary type used to configure the [`F2QSynthesis.methods`](/docs/api/qiskit-fermions/transpiler-passes-f-2-q-synthesis#qiskit_fermions.transpiler.passes.F2QSynthesis.methods "qiskit_fermions.transpiler.passes.F2QSynthesis.methods"). |
