tqec.compile.specs.CubeSpec

class CubeSpec(cube_type: ~tqec.sketchup.block_graph.CubeType, junction_arms: ~tqec.compile.specs.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_type

Type of the cube.

Type:

tqec.sketchup.block_graph.CubeType

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.JunctionArms

__init__(cube_type: ~tqec.sketchup.block_graph.CubeType, junction_arms: ~tqec.compile.specs.JunctionArms = <JunctionArms.NONE: 0>) None

Methods

__init__(cube_type[, junction_arms])

from_cube(cube, graph)

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

Attributes

is_spatial_junction

junction_arms

cube_type