MCPcopy Create free account
hub / github.com/NVIDIA/cuda-quantum / deserializeCounts

Function deserializeCounts

runtime/common/SampleResult.cpp:31–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31static void
32deserializeCounts(std::vector<std::size_t> &data, std::size_t &stride,
33 std::unordered_map<std::string, std::size_t> &localCounts) {
34 auto nBs = data[stride];
35 stride++;
36
37 for (std::size_t j = stride; j < stride + nBs * 3; j += 3) {
38 auto bitstring_as_long = data[j];
39 auto size_of_bitstring = data[j + 1];
40 auto count = data[j + 2];
41 auto bs = longToBitString(size_of_bitstring, bitstring_as_long);
42 localCounts.insert({bs, count});
43 }
44 stride += nBs * 3;
45}
46
47static std::string extractNameFromData(std::vector<std::size_t> &data,
48 std::size_t &stride) {

Callers 1

deserializeMethod · 0.85

Calls 2

longToBitStringFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected