Circuit.check_region
- Circuit.check_region(region, strict=False)[source]
Check region to be a valid in the context of this circuit.
A CircuitRegion is valid if it is within the bounds of the circuit and for every pair of operations in the region, there is no path between them that exits the region.
- Parameters:
region (
Mapping[int,tuple[int,int] |CycleInterval] |CircuitRegion) – The region to check.strict (
bool) – If True, fail on any disconnect, even if there are no gates in the disconnect. (Default: False)
- Raises:
ValueError – If region includes qudits not in the circuit, or if the region is too large for the circuit.
ValueError – If the region cannot be folded due to a possible change to simulation order. This can happen when the region is disconnected between qudits and outside gates occur in the disconnect.
- Return type:
None