ZXNode#
- class tqec.computation.ZXNode(position, kind, label='')[source]#
Bases:
object
A node in the ZX graph.
- Parameters:
position (Position3D)
kind (ZXKind)
label (str)
- position#
The 3D position of the node.
- kind#
The kind of the node.
- label#
The label of the node. The label of a port must be non-empty. Default to an empty string.
- Type:
str
Methods
__init__
(position, kind[, label])Return a new node with the flipped kind.
Attributes
is_port
Return True if the node is a port.
is_y_node
Return True is the node is of
Y
kind.is_zx_node
Return True if the node is of kind
X
orZ
.Detailed methods
- __init__(position, kind, label='')#
- Parameters:
position (Position3D)
kind (ZXKind)
label (str)
- Return type:
None