Grid2DQPU#
- class iqm.qaoa.transpiler.quantum_hardware.Grid2DQPU(num_rows, num_columns)[source]#
Bases:
QPU
Class for 2D rectangular QPU.
Contains variables for number of rows and columns, which determine the hardware graph and layout. Also contains a simple
embedded_chain()
method to embed a chain in the hardware graph.- Parameters:
Attributes
Methods
Embeds a chain in the grid QPU (by going around like a snake).
- embedded_chain()[source]#
Embeds a chain in the grid QPU (by going around like a snake):
-----------------╷ ╷----------------╵ ╵----------------╷ ╷----------------╵ ╵----------------╷ ╷----------------╵ ╵-----------------
- Yields:
Integer index of the next qubit in the chain.
- Return type:
Iterator[HardQubit]