Open mmvandieren opened 5 months ago
Adding to this issue, there is a lack of clarity (or potential source of confusion) in the documentation that the adj and ctrl only work for the kernel-builder construction of kernels and not with the decorator function kernels. That said, there is no documentation (or it's difficult to locate) where to find the control and adjoint syntax for kernels built as decorated functions in Python.
Required prerequisites
Describe the bug
The text and example code for the section titled "Adjoint and Controlled Operations" of the documentation on the page https://nvidia.github.io/cuda-quantum/latest/api/default_ops.html doesn't fully clarify the scope of these operations. In particular, both can be applied to kernels in addition to the built in gates.
Steps to reproduce the bug
N/A
Expected behavior
N/A
Is this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
Suggestions
Suggested edits to the text:
adj
method of any gate or unitary quantum kernel can be used to invoke the adjoint transformation:"ctrl
method of any gate can or quantum kernel be used to apply the transformation conditional on the state of one or more control qubits, see also this Wikipedia entry.Suggested edits to the code: Demonstrate the operations applied to both a built-in gate (as is currently demonstrated) and a user-defined kernel