Cube#
- class tqec.computation.Cube(position, kind, label='')[source]#
Bases:
object
A fundamental building block of the logical computation.
A cube is a high-level abstraction of a block of quantum operations within a specific spacetime volume. These operations preserve or manipulate the quantum information encoded in the logical qubits.
For example, a single
ZXZ
kind cube can represent a quantum memory experiment for a surface code patch in logical Z basis. The default circuit implementation of the cube will consist of transversal Z basis resets, syndrome extraction cycles, and finally the Z basis transversal measurements. The spatial location of the physical qubits in the code patch and the time when the operations are applied are specified by the spacetime position of the cube.- Parameters:
position (Position3D)
kind (CubeKind)
label (str)
- position#
The position of the cube in the spacetime. The spatial coordinates determines which code patch the operations are applied to, and the time coordinate determines when the operations are applied.
- kind#
The kind of the cube. It determines the basic logical operations represented by the cube.
- label#
The label of the cube. It’s mainly used for annotating the input/output ports of the block graph. If the cube is a port, the label must be non-empty. Default is an empty string.
- Type:
str
Methods
Attributes
is_port
Return whether the cube is of kind
Port
.is_spatial
Return whether the cube is a spatial cube.
is_y_cube
Return whether the cube is of kind
YCube
.is_zx_cube
Return whether the cube is of kind
ZXCube
.Detailed methods
- __init__(position, kind, label='')#
- Parameters:
position (Position3D)
kind (CubeKind)
label (str)
- Return type:
None