CustomF2QLayout¶
- class CustomF2QLayout(layout)¶
Bases:
GenericPass[DAGCircuit,DAGCircuit]Sets the user-provided
F2QLayoutin the transpiler.This pass simply populates the
f2q_layoutfield of theproperty_set, with the value oflayout.Note
It is the user’s responsibility to ensure that subsequently used transpilation passes (and plugins) are configured to adhere to this
F2QLayoutcorrectly.Initializing this transpiler pass can be done with the arguments listed below.
- Parameters:
layout (F2QLayout) – the custom
f2q_layoutto use.
Attributes
- layout: F2QLayout¶
The user-provided mapping of
FermionicRegistertoQuantumRegister.
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: