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

Function test_bind_data

test/QAlg/ArithmeticUnit.test.cpp:8–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6using namespace std;
7
8void test_bind_data()
9{
10 int n, m;
11 scanf("%d%d", &n, &m);
12 auto a = qAllocMany(n);
13 QProg prog;
14 prog << bind_data(m, a);
15 auto result = probRunDict(prog, a);
16 for (auto& val : result)
17 {
18 if (val.second > 0)
19 std::cout << val.first << ", " << val.second << std::endl;
20 }
21}
22
23void test_bind_nonnegative_data()
24{

Callers

nothing calls this directly

Calls 2

probRunDictFunction · 0.85
bind_dataFunction · 0.50

Tested by

no test coverage detected