tqec.computation.cube.Cube#

class Cube(position: Position3D, kind: CubeKind, label: str = '')[source]#

A block representing a unit of code patch in the spacetime.

position#

The position of the cube in the 3D spacetime.

Type:

tqec.position.Position3D

kind#

The kind of the cube. It specifies the functionality of the cube.

Type:

tqec.computation.cube.CubeKind

label#

The label of the cube. If the cube is a port, the label must be non-empty. Default to an empty string.

Type:

str

__init__(position: Position3D, kind: CubeKind, label: str = '') None#

Methods

__init__(position, kind[, label])

to_zx_node()

Convert the cube to a ZX node.

Attributes

is_port

Check if the cube is an open port.

is_spatial_junction

Check if the cube is a spatial junction.

is_y_cube

is_zx_cube

Check if the cube is a ZX cube.

label

position

kind