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

Function runCase

targettests/execution/dem_from_kernel.cpp:224–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222
223template <typename Kernel, typename... Args>
224static void runCase(const char *label, Kernel &&kernel, Args &&...args) {
225 try {
226 std::string demText =
227 cudaq::dem_from_kernel(std::forward<Kernel>(kernel), &g_emptyNoise,
228 std::forward<Args>(args)...);
229 // Tally distinct DEM instructions.
230 std::printf("%s errors=%zu detectors=%zu observables=%zu\n", label,
231 countOccurrences(demText, "error("),
232 maxIndexAfter(demText, 'D'), maxIndexAfter(demText, 'L'));
233 } catch (const std::exception &e) {
234 std::printf("%s THREW: %s\n", label, e.what());
235 }
236}
237
238static void runTrivial() {
239 try {

Callers 1

mainFunction · 0.70

Calls 3

countOccurrencesFunction · 0.70
maxIndexAfterFunction · 0.70
dem_from_kernelFunction · 0.50

Tested by

no test coverage detected