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

Function main

targettests/execution/lambda_introspection.cpp:33–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33int main() {
34
35 auto lambdaMain = []() __qpu__ {
36 cudaq::qubit q;
37 h(q);
38 h(q);
39 mz(q);
40 };
41
42 auto lambdaAgain = []() __qpu__ {
43 cudaq::qubit q;
44 h(q);
45 h(q);
46 mz(q);
47 };
48
49 lambdaMain();
50
51 printf("2: %s", cudaq::get_quake(lambdaMain).data());
52 printf("3: %s", cudaq::get_quake(lambdaAgain).data());
53 printf("4: %s", cudaq::get_quake(ghz{}).data());
54
55 function();
56
57 return 0;
58}
59
60// clang-format off
61// CHECK: 2: module {{.*}} func.func @__nvqpp__mlirgen__Z4mainE3$_0() attributes {

Callers

nothing calls this directly

Calls 5

functionFunction · 0.85
hClass · 0.50
mzFunction · 0.50
get_quakeFunction · 0.50
dataMethod · 0.45

Tested by

no test coverage detected