iqm.qiskit_iqm.iqm_naive_move_pass.IQMNaiveResonatorMoving#
- class iqm.qiskit_iqm.iqm_naive_move_pass.IQMNaiveResonatorMoving(*args, **kwargs)#
Bases:
TransformationPassNaive transpilation pass for resonator moving.
The logic of this pass is deferred to
transpile_insert_moves(). This pass is a wrapper that converts the circuit into the IQM circuit format, runs thetranspile_insert_movesfunction, and then converts the result back to a Qiskit circuit.- Parameters:
target – Transpilation target.
existing_moves_handling – How to handle existing MOVE gates in the circuit.
Attributes
Methods
_calculate_final_layout(dag, layout)Calculate the final physical to logical qubit layout after the circuit.
_calculate_initial_layout(dag)Calculate the initial physical to logical qubit layout before the circuit.
_insert_move_gate(dag, layout)Insert MOVE gates into the circuit using the IQM transpiler.
_insert_parameterized_gates(dag, symbolic_gates)Reinsert parameterized gates into the DAGCircuit.
_remove_parameterized_gates(dag)Remove parameterized gates from the DAGCircuit.
run(dag)Run the pass on a circuit.
- run(dag: DAGCircuit) DAGCircuit#
Run the pass on a circuit.
- Parameters:
dag (DAGCircuit) – DAG to insert MOVE gates into.
- Returns:
The new
dagnow including MOVE gates as needed.- Raises:
TranspilerError – The layout is not compatible with the DAG, or if something goes wrong during transpilation.
- Return type: