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

Function QAdd

QAlg/ArithmeticUnit/ArithmeticUnit.cpp:128–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128QCircuit QAdd(QVec& a, QVec& b, QVec& k)
129{
130 auto len = a.size();
131 QCircuit circ;
132 circ << X(b[len - 1]);
133 circ << QSub(a, b, k);
134 circ << X(b[len - 1]);
135 return circ;
136}
137
138QCircuit QComplement(QVec& a, QVec& k)
139{

Callers 2

test_QAddFunction · 0.50
checkAdderFunction · 0.50

Calls 3

XClass · 0.85
QSubFunction · 0.70
sizeMethod · 0.45

Tested by 2

test_QAddFunction · 0.40
checkAdderFunction · 0.40