Details and Options
If ResourceFunction["MakeZXDiagram"] succeeds in constructing the specified ZX-diagram, then it returns a ZXDiagramObject expression.
The following generator types are supported:
Z[name,in,out,phase] | a Z-spider with name name, input arity in, output arity out and phase phase |
X[name,in,out,phase] | an X-spider with name name, input arity in, output arity out and phase phase |
H[name] | a Hadamard gate with name name |
B[name] | a black diamond with name name |
W[name1,name2] | a wire connecting generators name1 and name2 |
When specified in
Association form
<|"ZSpiders"→z,"XSpiders"→x,"HadamardGates"→h,"Diamonds"→d,"Wires"→w|>,
z and
x are nested lists of input arities, output arities and phases;
h and
d are integers representing the number of Hadamard gates and black diamonds; and
w is a nested list of generator names connected by wires.
In ZXDiagramObject, the following properties are supported:
"LabeledGraph" | graph form of the ZX-diagram with phases labeled |
"UnlabeledGraph" | graph form of the ZX-diagram without phases labeled |
"OperatorForm" | ZX-diagram represented as a tensor product of generators |
"ListForm" | ZX-diagram represented as a list of generators |
"MatrixForm" | ZX-diagram represented as an explicit linear map on qubits |
"ZSpiders" | list of Z-spiders in the ZX-diagram |
"XSpiders" | list of X-spiders in the ZX-diagram |
"HadamardGates" | list of Hadamard gates in the ZX-diagram |
"Diamonds" | list of black diamonds in the ZX-diagram |
"Wires" | list of wires in the ZX-diagram |
"ZSpiderCount" | number of Z-spiders in the ZX-diagram |
"XSpiderCount" | number of X-spiders in the ZX-diagram |
"HadamardGateCount" | number of Hadamard gates in the ZX-diagram |
"DiamondCount" | number of black diamonds in the ZX-diagram |
"WireCount" | number of wires in the ZX-diagram |
The default convention is to name Z-spiders as z1,z2,…; X-spiders as x1,x2,…; Hadamard gates as h1,h2,…; black diamonds as d1,d2,…; inputs as i1,i2,…; and outputs as o1,o2,….