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

Method count

runtime/common/SampleResult.cpp:335–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335std::size_t sample_result::count(std::string_view bitStr,
336 const std::string_view registerName) const {
337 const auto &counts = retrieve_result(registerName.data()).counts;
338 auto it = counts.find(bitStr.data());
339 if (it == counts.cend())
340 return 0;
341 else
342 return it->second;
343}
344
345std::string
346sample_result::most_probable(const std::string_view registerName) const {

Callers 1

SampleResult.cppFile · 0.45

Calls 2

cendMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected