---
title: TrivialOccupationInitializeModesSynthesis (latest version)
description: API reference for qiskit_fermions.transpiler.passes.synthesis.TrivialOccupationInitializeModesSynthesis in the latest version of qiskit-fermions
source: https://quantum.cloud.ibm.com/docs/en/api/qiskit-fermions/transpiler-passes-synthesis-trivial-occupation-initialize-modes-synthesis
---

# TrivialOccupationInitializeModesSynthesis

*class* `TrivialOccupationInitializeModesSynthesis`

Bases: [`object`](https://docs.python.org/3/builtins/functions.html#object)

A [`F2QSynthesisPlugin`](/docs/api/qiskit-fermions/transpiler-passes-synthesis-f-2-q-synthesis-plugin "qiskit_fermions.transpiler.passes.synthesis.F2QSynthesisPlugin") for transpiling [`InitializeModes`](/docs/api/qiskit-fermions/circuit-library-initialize-modes "qiskit_fermions.circuit.library.InitializeModes") with trivial occupation.

> **Warning**
>
> This transpilation pass plugin makes the following assumptions:
>
> - an occupation-basis encoding (like Jordan-Wigner)
> - a trivial fermion-to-qubit layout (i.e. no change in their register lengths)
> - a 1-to-1 mapping of fermionic mode indices to qubit indices
> - the qubits start in the all-zero state, and the gate is the first one acting on its modes: the occupied modes are flipped with `X` gates, so a second [`InitializeModes`](/docs/api/qiskit-fermions/circuit-library-initialize-modes "qiskit_fermions.circuit.library.InitializeModes") gate on the same modes undoes the first one instead of replacing it

None of these are verified.

## Methods

### run

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

Runs this transpilation plugin.

**Parameters**

- **in\_node** ([*DAGOpNode*](/docs/api/qiskit/qiskit.dagcircuit.DAGOpNode)) – the input fermion-based circuit instruction. When this plugin gets called, the `in_node.op` attribute must be of type [`InitializeModes`](/docs/api/qiskit-fermions/circuit-library-initialize-modes "qiskit_fermions.circuit.library.InitializeModes").
- **out\_dag** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – the output qubit-based circuit.
- **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 global transpilation [`F2QLayout`](/docs/api/qiskit-fermions/transpiler-f-2-q-layout "qiskit_fermions.transpiler.F2QLayout") setting.

**Return type**

None

> **See also**
>
> The documentation of [`F2QSynthesisPlugin`](/docs/api/qiskit-fermions/transpiler-passes-synthesis-f-2-q-synthesis-plugin "qiskit_fermions.transpiler.passes.synthesis.F2QSynthesisPlugin") for more detailed explanations of the arguments.

**Raises**

[**NotImplementedError**](https://docs.python.org/3/builtins/exceptions.html#NotImplementedError) – when `in_node` acts on fermionic modes that are spread across multiple [`FermionicRegister`](/docs/api/qiskit-fermions/circuit-fermionic-register "qiskit_fermions.circuit.FermionicRegister") instances.

**Parameters**

- **in\_node** ([*DAGOpNode*](/docs/api/qiskit/qiskit.dagcircuit.DAGOpNode))
- **out\_dag** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit))
- **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)*]*)

**Return type**

None
