Tests the adjoint of a kernel that takes a qubit as an argument.
()
| 44 | |
| 45 | |
| 46 | def test_kernel_adjoint_qubit_args(): |
| 47 | """ |
| 48 | Tests the adjoint of a kernel that takes a qubit as an argument. |
| 49 | """ |
| 50 | other_kernel, other_qubit = cudaq.make_kernel(cudaq.qubit) |
| 51 | other_kernel.h(other_qubit) |
| 52 | |
| 53 | kernel = cudaq.make_kernel() |
| 54 | qubit = kernel.qalloc() |
| 55 | kernel.adjoint(other_kernel, qubit) |
| 56 | print(kernel) |
| 57 | |
| 58 | |
| 59 | # CHECK-LABEL: func.func @__nvqpp__mlirgen__PythonKernelBuilderInstance |