iqm.qiskit_iqm.iqm_naive_move_pass.IQMNaiveResonatorMoving

iqm.qiskit_iqm.iqm_naive_move_pass.IQMNaiveResonatorMoving#

class iqm.qiskit_iqm.iqm_naive_move_pass.IQMNaiveResonatorMoving(*args, **kwargs)#

Bases: TransformationPass

WIP Naive transpilation pass for resonator moving

A naive transpiler pass for use with the Qiskit PassManager. Although it requires a CouplingMap, Target, or Backend, it does not take this into account when adding MoveGates. It assumes target connectivity graph is star shaped with a single resonator in the middle. Which qubit is the resonator is represented with the resonator_register attribute. The pass assumes that all single qubit and two-qubit gates are allowed. The resonator is used to swap the qubit states for the two-qubit gates. Additionally, it assumes that no single qubit gates are allowed on the resonator.

Attributes

Methods

_lookahead_first_qubit_used(full_dag, ...)

Lookahead function to see which qubit will be used first again for a CZ gate.

_move_resonator(qubit, canonical_register, ...)

Logic for creating the DAG for swapping a qubit in and out of the resonator.

run(dag)

Run the IQMNaiveResonatorMoving pass on dag.

run(dag: DAGCircuit)#

Run the IQMNaiveResonatorMoving pass on dag.

Parameters:

dag (DAGCircuit) – DAG to map.

Returns:

A mapped DAG.

Return type:

DAGCircuit

Raises:

TranspilerError – if the layout are not compatible with the DAG, or if the input gate set is incorrect.