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

Function test_kernel_adjoint_no_args

python/tests/mlir/adjoint.py:18–29  ·  view source on GitHub ↗

Tests the adjoint of a kernel that takes no arguments.

()

Source from the content-addressed store, hash-verified

16
17
18def test_kernel_adjoint_no_args():
19 """
20 Tests the adjoint of a kernel that takes no arguments.
21 """
22 other_kernel = cudaq.make_kernel()
23 other_qubit = other_kernel.qalloc()
24 other_kernel.x(other_qubit)
25
26 kernel = cudaq.make_kernel()
27 kernel.adjoint(other_kernel)
28
29 print(kernel)
30
31
32# CHECK-LABEL: func.func @__nvqpp__mlirgen__PythonKernelBuilderInstance

Callers

nothing calls this directly

Calls 4

printFunction · 0.50
qallocMethod · 0.45
xMethod · 0.45
adjointMethod · 0.45

Tested by

no test coverage detected