Layout.from_qubit_list

static Layout.from_qubit_list(qubit_list)[source]

Populates a Layout from a list containing virtual qubits, Qubit or None.

Parameters

qubit_list (list) – e.g.: [qr[0], None, qr[2], qr[3]]

Returns

the corresponding Layout object

Return type

Layout

Raises

LayoutError – If the elements are not Qubit or None