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

Function test_QComplement

test/QAlg/ArithmeticUnit.test.cpp:123–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123void test_QComplement()
124{
125 int n = 1;
126 int m = 1;
127 //scanf("%d%d", &n, &m);
128 auto a = qAllocMany(n);
129 auto k = qAllocMany(n + 2);
130 QProg prog;
131 prog << bind_data(m, a)
132 << QComplement(a, k);
133 auto result = probRunDict(prog, a);
134 for (auto& val : result)
135 {
136 if (val.second > 0)
137 std::cout << val.first << ", " << val.second << std::endl;
138 }
139}
140
141bool test_QSub()
142{

Callers

nothing calls this directly

Calls 3

probRunDictFunction · 0.85
bind_dataFunction · 0.50
QComplementFunction · 0.50

Tested by

no test coverage detected