Group Abstract Group Abstract

Message Boards Message Boards

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

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