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

Function test_kernel_adjoint_list_args

python/tests/mlir/adjoint.py:179–191  ·  view source on GitHub ↗

Tests the adjoint of a kernel that is parameterized by a list.

()

Source from the content-addressed store, hash-verified

177
178
179def test_kernel_adjoint_list_args():
180 """
181 Tests the adjoint of a kernel that is parameterized
182 by a list.
183 """
184 other_kernel, other_value = cudaq.make_kernel(list)
185 other_qubit = other_kernel.qalloc()
186 other_kernel.rx(other_value[0], other_qubit)
187
188 kernel, _list = cudaq.make_kernel(list)
189 kernel.adjoint(other_kernel, _list)
190
191 print(kernel)
192
193
194# CHECK-LABEL: func.func @__nvqpp__mlirgen__PythonKernelBuilderInstance

Callers

nothing calls this directly

Calls 3

printFunction · 0.50
qallocMethod · 0.45
adjointMethod · 0.45

Tested by

no test coverage detected