tqec.position.Position2D#
- class Position2D(x: int, y: int)[source]#
Simple wrapper around tuple[int, int].
This class is here to explicitly name the type of variables as positions 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_grid_qubit
()Returns the position as a tuple following the cirq.GridQubit coordinate system.
Attributes
x
y