tqec.computation.zx_graph.ZXNode#

class ZXNode(position: Position3D, kind: ZXKind, label: str = '')[source]#

A node in the ZX graph.

position#

The position of the node in the 3D spacetime.

Type:

tqec.position.Position3D

kind#

The kind of the node.

Type:

tqec.computation.zx_graph.ZXKind

label#

The label of the node. The label of a port node must be non-empty. Default to an empty string.

Type:

str

__init__(position: Position3D, kind: ZXKind, label: str = '') None#

Methods

__init__(position, kind[, label])

with_zx_flipped()

Get a new node with the ZX kind flipped.

Attributes

is_port

Check if the node is an open port, i.e. represents the input/output of the computation.

is_y_node

Check if the node is a Y node.

is_zx_node

Check if the node is an X or Z node.

label

position

kind