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

Function swap

python/tests/kernel/test_kernel_qvector_init.py:25–28  ·  view source on GitHub ↗
(arr, index1, index2)

Source from the content-addressed store, hash-verified

23
24
25def swap(arr, index1, index2):
26 t = arr[index2]
27 arr[index2] = arr[index1]
28 arr[index1] = t
29
30
31# state preparation and synthesis

Calls

no outgoing calls

Tested by

no test coverage detected