iqm.qiskit_iqm.iqm_move_layout.IQMMoveLayout

iqm.qiskit_iqm.iqm_move_layout.IQMMoveLayout#

class iqm.qiskit_iqm.iqm_move_layout.IQMMoveLayout(*args, **kwargs)#

Bases: TrivialLayout

Creates a qubit layout that is valid on the quantum architecture specification of the given IQM backend with regard to the move gate. In more detail, assumes that the move operations in the quantum architecture define which physical qubit is the resonator and which is a move qubit, and shuffles the logical indices of the circuit so that they match the requirements.

This is required because Qiskit’s basic layout algorithm assumes each connection between two qubits has the same gates defined.

Note: This simple version of the mapper only works reliably with a single move qubit and resonator, and only if the circuit contains at least one move gate.

TrivialLayout initializer.

Parameters:

coupling_map (Union[CouplingMap, Target]) – directed graph representing a coupling map.

Raises:

TranspilerError – if invalid options

Attributes

Methods

_calculate_requirements(dag)

Calculates the requirements for each logical qubit in the circuit.

_determine_required_changes(dag)

Scans the operations in the given circuit and determines what qubits need to be switched so that the operations are valid for the specified quantum architecture.

_get_qubit_types()

Determines the types of qubits in the quantum architecture.

get_initial_layout()

Returns the initial layout generated by the algorithm.

run(dag)

Creates the qubit layout for the given quantum circuit.

run(dag)#

Creates the qubit layout for the given quantum circuit.

Parameters:

dag (DAGCircuit) – DAG to find layout for.

Raises:

TranspilerError – if dag wider than the target backend or if a valid mapping could not be found

get_initial_layout()#

Returns the initial layout generated by the algorithm.

Returns:

the initial layout