MCPcopy Create free account
hub / github.com/OriginQ/QPanda-2 / UMA

Function UMA

QAlg/ArithmeticUnit/ArithmeticUnit.cpp:16–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14}
15
16QCircuit UMA(Qubit* a, Qubit* b, Qubit* c)
17{
18 QCircuit circuit;
19 circuit << X(c).control({ a, b }) << CNOT(c, a) << CNOT(a, b);
20
21 return circuit;
22}
23
24QCircuit MAJ2(QVec &adder1, QVec &adder2, Qubit* c)
25{

Callers 2

addWithCinMethod · 0.70
QAdderFunction · 0.70

Calls 3

XClass · 0.85
CNOTClass · 0.85
controlMethod · 0.45

Tested by

no test coverage detected