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

Function testGetStateAsync

python/tests/parallel/test_mqpu.py:230–243  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

228
229@skipIfNoMQPU
230def testGetStateAsync():
231
232 (kernel, iters) = cudaq.make_kernel(int)
233 num_qubits = 1
234 qubits = kernel.qalloc(num_qubits)
235 theta = 0.2
236
237 def trotter(index):
238 for i in range(num_qubits):
239 kernel.rx(theta, qubits[i])
240
241 kernel.for_loop(start=0, stop=iters, function=trotter)
242
243 check_get_state_async(kernel)
244
245
246@skipIfNoMQPU

Callers

nothing calls this directly

Calls 3

check_get_state_asyncFunction · 0.85
qallocMethod · 0.45
for_loopMethod · 0.45

Tested by

no test coverage detected