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

Function main

docs/sphinx/examples/cpp/executing_kernels_state_async.cpp:20–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20int main() {
21 // Get state asynchronously
22 auto state_future = cudaq::get_state_async(bell_state);
23 // Do other work while waiting for state computation
24 // Get and print the state when ready
25 auto state = state_future.get();
26 state.dump();
27 return 0;
28}
29// [End `GetStateAsync`]
30/* [Begin `GetStateAsyncOutput`]
31(0.707107,0)

Callers

nothing calls this directly

Calls 3

get_state_asyncFunction · 0.50
getMethod · 0.45
dumpMethod · 0.45

Tested by

no test coverage detected