iqm.qiskit_iqm.iqm_move_layout.IQMMoveLayout#
- class iqm.qiskit_iqm.iqm_move_layout.IQMMoveLayout(*args, **kwargs)#
- Bases: - TrivialLayout- Create a layout that is valid on the dynamic quantum architecture of the given IQM target. - The architecture defines which gate loci are available. This class tries to map the virtual/logical components of the circuit to the physical QPU components of the architecture, such that the gates in the circuit can be applied on those components. - This class is required because Qiskit’s basic layout algorithm assumes all connections between two qubits have the same two-qubit gates available, which isn’t true in general. - Note - This version of the layout generator only works reliably with a single resonator, and can only handle pure Star architecture circuits. It also assumes that a valid layout exists for the circuit that does not require SWAPs, which isn’t true in general. - Attributes - Methods - _calculate_requirements(dag)- Determine the requirements for each used logical qubit in the circuit. - _determine_restrictions(dqa)- Determine which gates are restricted to specific qubits or resonators. - _is_restricted_gate(gate, index, components, dqa)- Check if the gate is restricted to a specific qubit or resonator. - Returns the initial layout generated by the algorithm. - run(dag)- Creates a valid layout for the given quantum circuit. - run(dag: DAGCircuit)#
- Creates a valid layout for the given quantum circuit. - Parameters:
- dag (DAGCircuit) – Circuit DAG to find layout for. 
- Raises:
- TranspilerError – A valid layout could not be found. 
 
 
