CircuitRegion
- class CircuitRegion(intervals)[source]
Bases:
Mapping
[int
,CycleInterval
]The CircuitRegion class.
A CircuitRegion is an contiguous, convex area in a circuit. It is represented as a map from qudit indices to cycle intervals.
- __init__(intervals)[source]
CircuitRegion Initializer.
- Parameters:
intervals (
Mapping[int, IntervalLike]
) – A map from qudit indices to cycle intervals. The cycle intervals can be given as either a CycleInterval object or a tuple of two ints that represent the lower and upper bound of the inclusive interval.
Notes
All cycle intervals are inclusive.
Attributes
Return true if this region is empty.
Return the qudits this region includes as a CircuitLocation.
Return the largest cycle index for any qudit.
Return the largest cycle index for any lower bound.
Return the largest qudit index.
Return the smallest cycle index for any qudit.
Return the smallest cycle index for any upper bound.
Return the smallest qudit index.
Return the points described by this region.
Return the volume of this region measured in qudit-cycles.
Return the number of cycles this region participates in.
Methods
dependency
(other)Return 1 if self depends on other.
depends_on
(other)Return true if self depends on other.
get
(k[,d])intersection
(other)is_region
(region)Return true if region is a CircuitRegionLike.
items
()keys
()overlaps
(other)Return true if other overlaps this region.
shift_left
(amount_to_shift)Shift the region to the left by amount_to_shift.
shift_right
(amount_to_shift)Shift the region to the right by amount_to_shift.
Flip region to map cycle indices to qudit indices.
union
(other)values
()