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

Function sum

python/tests/kernel/test_assignments.py:24–28  ·  view source on GitHub ↗
(l: list[int])

Source from the content-addressed store, hash-verified

22
23 @cudaq.kernel
24 def sum(l: list[int]) -> int:
25 total = 0
26 for item in l:
27 total += item
28 return total
29
30 @cudaq.kernel
31 def to_integer(ms: list[bool]) -> int:

Calls

no outgoing calls

Tested by

no test coverage detected