CustomB2QLayout¶
- class CustomB2QLayout(layout)¶
Bases:
GenericPass[DAGCircuit,DAGCircuit]Sets the user-provided
B2QLayoutin the transpiler.This pass simply populates the
b2q_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
B2QLayoutcorrectly.Initializing this transpiler pass can be done with the arguments listed below.
- Parameters:
layout (B2QLayout) – the custom
b2q_layoutto use.
Attributes
- layout: B2QLayout¶
The user-provided mapping of
BosonicRegistertoQuantumRegister.
Methods
- run(dag)¶
Runs this analysis pass.
- Parameters:
dag (DAGCircuit) – the DAG circuit representation of a
BosonicCircuit.- 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: