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

Function test5

python/tests/kernel/test_assignments.py:102–105  ·  view source on GitHub ↗
(arg: list[int])

Source from the content-addressed store, hash-verified

100
101 @cudaq.kernel
102 def test5(arg: list[int]) -> tuple[int, int]:
103 alias = modify_and_return(arg)
104 alias[0] = 5
105 return sum(alias), sum(arg)
106
107 results = cudaq.run(test5, [0, 1, 2], shots_count=1)
108 assert len(results) == 1 and results[0] == (10, 5)

Calls 7

modify_and_returnFunction · 0.85
sumFunction · 0.85
update_tuple3Function · 0.85
fctFunction · 0.85
MyTupleClass · 0.70
flattenFunction · 0.70
rangeFunction · 0.50

Tested by

no test coverage detected