tqec.computation.cube.ZXCube#
- class ZXCube(x: ZXBasis, y: ZXBasis, z: ZXBasis)[source]#
Cube kind representing the cube surrounded by all X/Z basis walls.
Methods
__init__
(x, y, z)all_kinds
()Return all the possible ZXCube kinds.
as_tuple
()from_normal_basis
(basis, direction)Create a cube kind with the given normal basis and direction.
from_str
(string)Create a cube kind from the string representation.
get_basis_along
(direction)Get the basis of the wall in the given direction.
to_zx_kind
()Convert the cube kind to a ZX node kind.
Attributes
cube_basis
Return the basis of the cube.
is_spatial_junction
Check if the cube is a spatial junction.
normal_direction
Get the direction in which the wall basis is the same as the cube basis.
x
y
z