Message Boards Message Boards

Is there any current work on the quantum circuit operator function to handle hypergraphs directly?

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.

POSTED BY: Jeffrey Tate
2 Replies

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

Attachment

Attachments:
POSTED BY: Nikolay Murzin

Thanks @NikolayMurzin for the tip. I will look into it.

POSTED BY: Jeffrey Tate
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract