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

Function test

python/tests/kernel/test_kernel_shadowing.py:47–53  ·  view source on GitHub ↗
(cond: bool)

Source from the content-addressed store, hash-verified

45
46 @cudaq.kernel
47 def test(cond: bool) -> bool:
48 q = cudaq.qubit()
49 if cond:
50 apply_x(q)
51 else:
52 apply_h(q)
53 return mz(q)
54
55 assert cudaq.run(test, True, shots_count=10) == [True] * 10
56

Calls 11

apply_hFunction · 0.85
apply_yFunction · 0.85
apply_zFunction · 0.85
bFunction · 0.85
nFunction · 0.85
qvectorMethod · 0.80
apply_xFunction · 0.70
flipFunction · 0.70
iFunction · 0.70
mzFunction · 0.50
rangeFunction · 0.50

Tested by

no test coverage detected