tqec.computation.zx_graph.ZXEdge#

class ZXEdge(u: ZXNode, v: ZXNode, has_hadamard: bool = False)[source]#

An edge connecting two nodes in the ZX graph.

WARNING: The attributes u and v will be ordered to ensure the position of u is less than v.

u#

The first node of the edge. The position of u is guaranteed to be less than v.

Type:

tqec.computation.zx_graph.ZXNode

v#

The second node of the edge. The position of v is guaranteed to be greater than u.

Type:

tqec.computation.zx_graph.ZXNode

has_hadamard#

Whether the edge has a Hadamard transition.

Type:

bool

__init__(u: ZXNode, v: ZXNode, has_hadamard: bool = False) None#

Methods

__init__(u, v[, has_hadamard])

get_node_kind_at(position)

Get the node kind at the given position of the edge.

with_zx_flipped()

Get a new edge with the node kind flipped.

Attributes

direction

Get the 3D direction of the edge.

has_hadamard

u

v