tqec.compile.specs.base.CubeSpec#

class CubeSpec(kind: ~tqec.computation.cube.CubeKind, junction_arms: ~tqec.compile.specs.enums.JunctionArms = <JunctionArms.NONE: 0>)[source]#

Specification of a cube in a block graph.

The template of the CompiledBlock will be determined based on the specification. This class can be used as a key to look up the corresponding CompiledBlock before applying the substitution rules.

cube_kind#

The kind of the cube.

junction_arms#

Flag indicating the spatial directions the cube connects to the adjacent cubes. This is useful for spatial junctions (XXZ and ZZX) where the arms can determine the template used to implement the cube.

Type:

tqec.compile.specs.enums.JunctionArms

__init__(kind: ~tqec.computation.cube.CubeKind, junction_arms: ~tqec.compile.specs.enums.JunctionArms = <JunctionArms.NONE: 0>) None#

Methods

__init__(kind[, junction_arms])

from_cube(cube, graph)

Returns the cube spec from a cube in a block graph.

Attributes

is_regular

is_spatial_junction

junction_arms

kind