In the Quantum Framework it is possible to display quantum circuits based on a list of edges from pairwise graphs. If one wished to do this for a hypergraph (which can have edges containing more than two vertices) one currently must convert the hypergraph into a graph as I understand things. Is there a way to have the Quantum Circuit Operator handle hypergraphs directly without having to perform this conversion? What might be needed in order to allow for this functionality? The file attached shows the current method.
All you have to do is to define what gate would correspond to each arity hyperedge, if itβs just Z, CZ, CZZ, etc., then something like this works (assuming a simple hypergraph with only unique vertices in every hyperedge):
QuantumCircuitOperator[
Switch[Length[#],
0,Nothing,
1,QuantumOperator["1"]->#,
_,{"C",QuantumOperator["1"]->First[#],Rest[#]}
]&/@DeleteDuplicates/@ResourceFunction["RandomHypergraph"][{10,{{3,1},{5,2},{4,3}}}]
]
N.B. In WQF operator β1β is the same as Z, and β0β is -Z
Thanks @NikolayMurzin for the tip. I will look into it.
