Layout (qiskit_paulice.layout)¶
Functionality for finding layouts for checks dressed with spacetime Pauli checks.
- get_low_overhead_ancillas(coupling_map, layout)[source]¶
Create a mapping from ancillas to
layoutqubits 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
layoutqubits 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:
- get_check_qubits(backend, layout)[source]¶
Pair qubits in
layoutwith neighboring ancillas.Generate equal-length lists of target and ancilla qubits, such that target qubit
iis adjacent to ancilla qubitiin the coupling map. Target and ancilla qubits may appear at most one time in their respective lists.- Parameters:
backend (BackendV2 | CouplingMap) – The target backend, or a
CouplingMapdescribing its connectivity.
- Returns:
A length-2 tuple of lists,
(target_qubits, ancilla_qubits).target_qubits[i]pairs withancilla_qubits[i].- Return type: