domain_wall¶
- domain_wall(array: PolyArray[Dim1], label: str = '', *, ascending: bool = True) Constraint¶
- domain_wall(array: PolyArray[_Dim], label: str = '', *, ascending: bool = True) ConstraintList
Create domain wall constraints for a variable array. domain_wall
For 1D arrays, return a single constraint. For higher-dimensional arrays, apply the same construction to each slice of the last axis and return a constraint list.
Overload 1.
- Args:
array (amplify.PolyArray[Dim1])
label (str): Defaults to
''.ascending (bool): Defaults to
True.
- Returns:
amplify.Constraint:
Overload 2.
- Args:
array (amplify.PolyArray[_Dim]): array
label (str): Base label for generated constraints. Defaults to
''.ascending (bool): If
True(default), the wall transitions from0to1; ifFalse, from1to0. Defaults toTrue.
- Returns:
amplify.ConstraintList: Single constraint for 1D input; otherwise one constraint per slice on the last axis.