TrivialF2QLayout
class TrivialF2QLayout
Bases: GenericPass[DAGCircuit, DAGCircuit]
Trivially maps fermionic modes to qubits.
This pass simply populates the f2q_layout field of the property_set, with a dictionary associating each FermionicRegister with an equally sized QuantumRegister.
Methods
run
run(dag)
Runs this analysis pass.
Parameters
dag (DAGCircuit) – the DAG circuit representation of a FermionicCircuit.
Returns
The unchanged input. But the property_set of this transpilation pipeline will be updated.
Return type
Inherited Methods
execute
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]
name
update_status
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