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.
- v#
The second cube of the pipe. The position of v will be guaranteed to be greater than u.
- kind#
The kind of the pipe.
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