iqm.cpc.compiler.layering_stages.layer_circuits#
- iqm.cpc.compiler.layering_stages.layer_circuits(circuits, components, skip_layering=False)#
Layer circuits into flux and non-flux layers.
The algorithm maximises the flux-layer depth, by merging any
CircuitOperationinvolving flux pulses into the previous flux layer if there’s no operations in between that with colliding loci. The layers containing flux pulses will have CircuitLayer.layer_type == “flux”, and the ones that do not contain flux pulses will have CircuitLayer.layer_type == “non-flux”.Note
If a flux CircuitOperation resolves into
Schedulethat contains also drive pulses (like ACStark CZ gate), this pass will not produce correct flux layering.- Parameters:
components (ComponentGrouping) – The full set of active locus components for the circuit batch.
skip_layering (bool) – Iff True, group the whole circuit into a single layer with CircuitLayer.layer_type == “full_circuit”.
- Returns:
For each circuit, its layering into flux and non-flux layers.
- Return type: