iqm.iqm_client.transpile.transpile_insert_moves#
- iqm.iqm_client.transpile.transpile_insert_moves(circuit: Circuit, arch: DynamicQuantumArchitecture, *, existing_moves: ExistingMoveHandlingOptions = ExistingMoveHandlingOptions.KEEP, qubit_mapping: dict[str, str] | None = None, restore_states: bool = True) Circuit #
Convert a simplified architecture circuit into an equivalent Star architecture circuit with resonators and MOVE gates, if needed.
In the typical use case
circuit
has been transpiled to a simplified architecture where the resonators have been abstracted away, and this function converts it into the corresponding Star architecture circuit.It can also handle the case where
circuit
already contains MOVE gates and resonators, which are treated according toexisting_moves
, followed by the conversion of the two-qubit gates that are not supported by the Star architecture.The function does nothing if
arch
does not support MOVE gates.- Parameters:
circuit (Circuit) – The circuit to convert.
arch (DynamicQuantumArchitecture) – Real Star architecture of the target device.
existing_moves (ExistingMoveHandlingOptions) – Specifies how to deal with existing MOVE instructions in
circuit
, if any.qubit_mapping (dict[str, str] | None) – Mapping of logical qubit names to physical qubit names. Can be set to
None
ifcircuit
already uses physical qubit names.restore_states (bool) – Iff True, all qubit states held in resonators are returned to their qubits at the end of the circuit (i.e. all MOVE sandwiches are closed), even when there is no computational reason to do so.
- Returns:
Equivalent Star architecture circuit with MOVEs and resonators added.
- Return type: