Skip to main contentIBM Quantum Documentation Mirror

Layout

qiskit_paulice.layout

Functionality for finding layouts for checks dressed with spacetime Pauli checks.

get_low_overhead_ancillas

get_low_overhead_ancillas(coupling_map, layout)

GitHub

Create a mapping from ancillas to layout qubits to which they are adjacent.

Parameters

  • coupling_map (CouplingMap) – A qubit connectivity graph.
  • layout (Sequence[int]) – Physical qubit indices occupied by the payload circuit.

Returns

A mapping from ancilla indices to the list of layout qubits to which it is adjacent. An ancilla bordering several layout qubits maps to all of them, and a layout qubit bordering several ancillas appears in each of their lists.

Return type

dict[int, list[int]]

get_check_qubits

get_check_qubits(backend, layout)

GitHub

Pair qubits in layout with neighboring ancillas.

Generate equal-length lists of target and ancilla qubits, such that target qubit i is adjacent to ancilla qubit i in the coupling map. Target and ancilla qubits may appear at most one time in their respective lists.

Parameters

Returns

A length-2 tuple of lists, (target_qubits, ancilla_qubits). target_qubits[i] pairs with ancilla_qubits[i].

Return type

tuple[list[int], list[int]]