LineQPU#

class iqm.qaoa.transpiler.quantum_hardware.LineQPU(length)[source]#

Bases: QPU

A linear QPU (qubits on a line).

Nothing fancy here, just a special case of a qubit hardware connectivity graph, which is a line. Given a length, creates a path hardware_graph and the corresponding hardware_layout which are then passed to QPU class initialization.

Parameters:

length (int) – The length of the QPU (as number of qubits).

Attributes

Methods

embedded_chain()

Embeds a chain in the line QPU (which is just a line).

embedded_chain()[source]#

Embeds a chain in the line QPU (which is just a line).

Yields:

Integer index of the next qubit in the chain.

Return type:

Iterator[HardQubit]