PlaquettePosition2D#

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

Bases: Position2D

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

Methods

__init__(x, y)

get_origin_position(shift)

Returns the position of the plaquette origin.

is_neighbour(other)

Check if the other position is near to this position, i.e. Manhattan distance is 1.

to_3d([z])

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_origin_position(shift)[source]#

Returns the position of the plaquette origin.

Parameters:

shift (Shift2D)

Return type:

PhysicalQubitPosition2D

is_neighbour(other)#

Check if the other position is near to this position, i.e. Manhattan distance is 1.

Parameters:

other (Position2D)

Return type:

bool

to_3d(z=0)#
Parameters:

z (int)

Return type:

Position3D

with_block_coordinate_system()#
Return type:

BlockPosition2D