tqec.position.Shape2D#
- class Shape2D(x: int, y: int)[source]#
Simple wrapper around tuple[int, int].
This class is here to explicitly name the type of variables as shapes instead of having a tuple[int, int] that could be: - a position, - a shape, - coefficients for positions, - displacements.
- __init__(x: int, y: int) None #
Methods
__init__
(x, y)to_numpy_shape
()Returns the shape according to numpy indexing.
Attributes
x
y