Details
If ResourceFunction["ZXDiagramToQuantumDiscreteOperator"] succeeds in converting the specified ZXDiagramObject into a discrete quantum operator, it will return a QuantumDiscreteOperator object.
ResourceFunction["ZXDiagramToQuantumDiscreteOperator"] works by converting each sequential composition of Z-spider and X-spider generators into sequential compositions of rotations around the z axis and the x axis of the Bloch sphere, respectively, before eventually taking the tensor product of all such compositions to yield the desired QuantumDiscreteOperator.
The generators/spiders within the specified ZXDiagramObject may have arbitrary input and output arities.
In the resulting QuantumDiscreteOperator, the following properties are supported:
| "Operator" | association <|b11→e11,b12→e12,…|> of tensor products of basis names and matrix elements |
| "Basis" | which QuantumBasis the operator is defined with respect to |
| "Picture" | which quantum mechanical picture the operator is defined with respect to |
| "BasisElements" | list of basis elements bi |
| "MatrixRepresentation" | matrix representation mat of the operator |
| "OrderedMatrixRepresentation" | matrix representation adjusted according to the order of the operator, assuming an input state containing Max[order] qudits (subsystems) |
| {"OrderedMatrixRepresentation",n} | matrix representation adjusted according to the order of the operator, assuming an input state containing n qudits (subsystems) |
| "Arity" | arity of the operator |
| "Dimensions" | dimensionality of each qudit (subsystem) in the input state for the operator |
| "Order" | order in which the operator should be applied to qudits (subsystems) in the input state |
| "HermitianQ" | whether the operator is Hermitian (self-adjoint) |
| "UnitaryQ" | whether the operator is unitary (an automorphism of Hilbert space) |
| "Eigenvalues" | eigenvalues of the matrix representation of the operator |
| "Eigenvectors" | eigenvectors of the matrix representation of the operator |
| "Properties" | list of all property names |
The default convention is to name Z-spiders as z1,z2,…; X-spiders as x1,x2,…; black diamonds as d1,d2,…; inputs as i1,i2,…; outputs as o1,o2,…; etc.