Skip to main content

normalize_initial_layout

Function normalize_initial_layout 

Source
pub fn normalize_initial_layout(
    logical_qubits: &[LogicalQubit],
    device: &Device,
    initial_layout: &Layout,
) -> Result<Layout, CompilerError>
Expand description

Normalizes an initial layout against a device’s usable physical topology.

The returned layout contains the supplied logical qubits and every usable physical qubit from device. Logical qubits must already be mapped by initial_layout; extra usable physical qubits remain vacant.