ZXNode#

class tqec.computation.ZXNode(position, kind, label='')[source]#

Bases: object

A node in the ZX graph.

Parameters:
position#

The 3D position of the node.

Type:

tqec.utils.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 must be non-empty. Default to an empty string.

Type:

str

Methods

__init__(position, kind[, label])

with_zx_flipped()

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 or Z.

label

position

kind

Detailed methods

__init__(position, kind, label='')#
Parameters:
Return type:

None

with_zx_flipped()[source]#

Return a new node with the flipped kind.

Return type:

ZXNode