tqec.computation.pipe.Pipe#

class Pipe(u: Cube, v: Cube, kind: PipeKind)[source]#

A block connecting two cubes in spacetime.

The pipes guide the logical computation and the information flow between the code patches over spacetime.

WARNING: The attributes u and v will be ordered to ensure the position of u is less than v.

u#

The first cube of the pipe. The position of u will be guaranteed to be less than v.

Type:

tqec.computation.cube.Cube

v#

The second cube of the pipe. The position of v will be guaranteed to be greater than u.

Type:

tqec.computation.cube.Cube

kind#

The kind of the pipe.

Type:

tqec.computation.pipe.PipeKind

__init__(u: Cube, v: Cube, kind: PipeKind) None#

Methods

__init__(u, v, kind)

from_cubes(u, v)

Create a pipe connecting two cubes and infer the pipe kind.

validate()

Check the color of the pipe can match the cubes at its endpoints.

Attributes

direction

Get the direction of the pipe.

u

v

kind