UnitSum#
- class hugr.val.UnitSum(tag: int, size: int)[source]#
Bases:
Sum
Simple
Sum
with each variant being an empty row.Example
>>> UnitSum(0, 3) UnitSum(0, 3) >>> UnitSum(0, 1) Unit >>> assert UnitSum(0, 2) == FALSE >>> assert UnitSum(1, 2) == TRUE
Methods
Report the type of the value.
Attributes
n_variants
Tag identifying the variant.
defines all possible variants.
The values of this variant row.