BlockPosition2D#

class tqec.utils.BlockPosition2D(x, y)[source]#

Bases: Position2D

Represents the position of a block on a 2-dimensional plane.

Methods

__init__(x, y)

get_top_left_plaquette_position(block_shape)

Returns the position of the top-left plaquette of the block.

with_block_coordinate_system()

Attributes

x

y

Detailed methods

Parameters:
  • x (int)

  • y (int)

__init__(x, y)#
Parameters:
  • x (int)

  • y (int)

Return type:

None

get_top_left_plaquette_position(block_shape)[source]#

Returns the position of the top-left plaquette of the block.

Parameters:

block_shape (Shape2D)

Return type:

PlaquettePosition2D

with_block_coordinate_system()#
Return type:

BlockPosition2D