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

Function test8

python/tests/kernel/test_assignments.py:146–151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

144
145 @cudaq.kernel
146 def test8() -> tuple[int, int, int]:
147 arg = [2, 2]
148 t = get_MyTuple(arg)
149 t.l1[0] = 4
150 t.l2[1] = 2
151 return sum(arg), sum(t.l1), sum(t.l2)
152
153 results = cudaq.run(test8, shots_count=1)
154 assert len(results) == 1 and results[0] == (4, 6, 3)

Calls 7

sumFunction · 0.85
modify_MyTupleFunction · 0.85
modify_and_return_itemFunction · 0.85
fctFunction · 0.85
get_MyTupleFunction · 0.70
MyTupleClass · 0.70
flattenFunction · 0.70

Tested by

no test coverage detected