ZXEdge#
- class tqec.computation.ZXEdge(u, v, has_hadamard=False)[source]#
Bases:
object
An edge connecting two neighboring nodes in the ZX graph.
Warning
The attributes
u
andv
will be ordered to ensure the position ofu
is smaller thanv
.- u#
The first node of the edge. The position of
u
is guaranteed to be smaller thanv
.
- v#
The second node of the edge. The position of
v
is guaranteed to be greater thanu
.
- has_hadamard#
Whether the edge is a Hadamard edge. Default to
False
.- Type:
bool
Methods
__init__
(u, v[, has_hadamard])Attributes
direction
3D direction of the edge.
Detailed methods