TrivialF2QLayout¶
- class TrivialF2QLayout¶
Bases:
GenericPass[DAGCircuit,DAGCircuit]Trivially maps \(n\) fermionic modes to \(n\) qubits.
This pass simply populates the
f2q_layoutfield of theproperty_set, with a dictionary associating eachFermionicRegisterwith an equally sizedQuantumRegister.Methods
- run(dag)¶
Runs this analysis pass.
- Parameters:
dag (DAGCircuit) – the DAG circuit representation of a
FermionicCircuit.- Returns:
The unchanged input. But the
property_setof this transpilation pipeline will be updated.- Return type:
Inherited Methods
- execute(passmanager_ir, state, callback=None)¶
Execute optimization task for input Qiskit IR.
- Parameters:
passmanager_ir (IR) – Qiskit IR to optimize.
state (PassManagerState) – State associated with workflow execution by the pass manager itself.
callback (Callable[[Task, IR_OUT, PropertySet, float, int], None] | None) – A callback function which is called per execution of optimization task.
- Returns:
Optimized Qiskit IR and state of the workflow.
- Return type:
tuple[IR_OUT, PassManagerState]
- update_status(state, run_state)¶
Update workflow status.
- Parameters:
state (PassManagerState) – Pass manager state to update.
run_state (RunState) – Completion status of current task.
- Returns:
Updated pass manager state.
- Return type: