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

Function test_bind_nonnegative_data

test/QAlg/ArithmeticUnit.test.cpp:23–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23void test_bind_nonnegative_data()
24{
25 int n, m;
26 scanf("%d%d", &n, &m);
27 auto a = qAllocMany(n);
28 QProg prog;
29 prog << bind_nonnegative_data(m, a);
30 auto result = probRunDict(prog, a);
31 for (auto& val : result)
32 {
33 if (val.second > 0)
34 std::cout << val.first << ", " << val.second << std::endl;
35 }
36}
37
38bool test_QAdder()
39{

Callers

nothing calls this directly

Calls 2

probRunDictFunction · 0.85
bind_nonnegative_dataFunction · 0.50

Tested by

no test coverage detected