PipeSpec#

class tqec.compile.PipeSpec(cube_specs, cube_templates, pipe_kind, at_temporal_hadamard_layer=False)[source]#

Bases: object

Specification of a pipe in a block graph.

The PipeSpec is used to determine the substitution rules between the two CompiledBlock`s connected by the pipe. The substitution rules are used to update the layers of the `CompiledBlock`s based on the plaquettes in the `Substitution.

Parameters:
  • cube_specs (tuple[CubeSpec, CubeSpec])

  • cube_templates (tuple[RectangularTemplate, RectangularTemplate])

  • pipe_kind (PipeKind)

  • at_temporal_hadamard_layer (bool)

cube_specs#

the ordered cube specifications. By convention, the cube corresponding to cube_specs[0] should have a smaller position than the cube corresponding to cube_specs[1].

Type:

tuple[tqec.compile.specs.base.CubeSpec, tqec.compile.specs.base.CubeSpec]

cube_templates#

templates used to implement the respective entry in cube_specs.

Type:

tuple[tqec.templates.base.RectangularTemplate, tqec.templates.base.RectangularTemplate]

pipe_type#

the type of the pipe connecting the two cubes.

at_temporal_hadamard_layer#

flag indicating whether the pipe is a temporal pipe and there is a temporal Hadamard pipe at the same Z position in the block graph.

Type:

bool

Methods

__init__(cube_specs, cube_templates, pipe_kind)

Attributes

Detailed methods

__init__(cube_specs, cube_templates, pipe_kind, at_temporal_hadamard_layer=False)#
Parameters:
  • cube_specs (tuple[CubeSpec, CubeSpec])

  • cube_templates (tuple[RectangularTemplate, RectangularTemplate])

  • pipe_kind (PipeKind)

  • at_temporal_hadamard_layer (bool)

Return type:

None