Tests the adjoint of a kernel that takes no arguments.
()
| 16 | |
| 17 | |
| 18 | def 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 |