pub fn validate_bloq_qubit_layout_for_source(
bloq: &Bloq,
source: &BlockGraph,
) -> Result<(), CompileError>Expand description
Validate same-layer physical-qubit ownership in bloq.
Two nodes may overlap where source adjacency permits it or their predicates
are mutually exclusive. Validation runs at every graph level, so nodes inside
RUS retry bodies are covered. Each
level is checked in isolation: separate SubGraphs never cross-check, which
is exactly the intended semantics — a region reports its whole footprint as
one node at the parent level, and each body has its own execution scope.
Hierarchical source graphs are explicitly projected to their flat topology
for this audit; native compilation retains its definition ownership.
§Errors
Returns CompileError::OverlappingNodeQubit for the first disallowed overlap.