-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support applying controlled parametrized gates in kernel_builder
with double
#723
Closed
1 task done
Comments
anthony-santana
added a commit
that referenced
this issue
Oct 18, 2023
Closes #723 Closes #751 Binds the controlled versions of: r1, rx, ry, rz to python New python unit tests for existing: cx, cy, cz, ch, cs, ct New python compiler tests for existing: cx, cy, cz, ch, cs, ct New python unit tests for r1, rx, ry, rz New python compiler tests for r1, rx, ry, rz Update existing python documentation and tests to reflect that we can now pass a register of controls to our c-gates What this PR doesn't address: A follow-up PR will handle the controlled SWAP implementation in the C++/python builder * everything except controlled swaps Signed-off-by: A.M. Santana <[email protected]> * forgot the parameter annotations Signed-off-by: A.M. Santana <[email protected]> * add keywords back to compiler test Signed-off-by: A.M. Santana <[email protected]> * swap implementation Signed-off-by: A.M. Santana <[email protected]> * remove swap work for separate pr Signed-off-by: A.M. Santana <[email protected]> * format compiler test Signed-off-by: A.M. Santana <[email protected]> * incorrect filecheck string Signed-off-by: A.M. Santana <[email protected]> * hard coded kernel names in filecheck Signed-off-by: A.M. Santana <[email protected]> * forgot to add new gates to api docs Signed-off-by: A.M. Santana <[email protected]> * replace references to doubles with floats in python docs Signed-off-by: A.M. Santana <[email protected]> --------- Signed-off-by: A.M. Santana <[email protected]>
MarkusPfundstein
pushed a commit
to fermioniq/cuda-quantum
that referenced
this issue
Sep 23, 2024
Closes NVIDIA#723 Closes NVIDIA#751 Binds the controlled versions of: r1, rx, ry, rz to python New python unit tests for existing: cx, cy, cz, ch, cs, ct New python compiler tests for existing: cx, cy, cz, ch, cs, ct New python unit tests for r1, rx, ry, rz New python compiler tests for r1, rx, ry, rz Update existing python documentation and tests to reflect that we can now pass a register of controls to our c-gates What this PR doesn't address: A follow-up PR will handle the controlled SWAP implementation in the C++/python builder * everything except controlled swaps Signed-off-by: A.M. Santana <[email protected]> * forgot the parameter annotations Signed-off-by: A.M. Santana <[email protected]> * add keywords back to compiler test Signed-off-by: A.M. Santana <[email protected]> * swap implementation Signed-off-by: A.M. Santana <[email protected]> * remove swap work for separate pr Signed-off-by: A.M. Santana <[email protected]> * format compiler test Signed-off-by: A.M. Santana <[email protected]> * incorrect filecheck string Signed-off-by: A.M. Santana <[email protected]> * hard coded kernel names in filecheck Signed-off-by: A.M. Santana <[email protected]> * forgot to add new gates to api docs Signed-off-by: A.M. Santana <[email protected]> * replace references to doubles with floats in python docs Signed-off-by: A.M. Santana <[email protected]> --------- Signed-off-by: A.M. Santana <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Required prerequisites
Describe the feature
The
r1
,rx
,ry
andrz
methods allow to apply a parameterized gate to the current kernel.There is an overload for this functions that accept a
double
parameter and a single qubit:cuda-quantum/runtime/cudaq/builder/kernel_builder.h
Lines 468 to 469 in da6d0b9
and there is an overload that accept a
QuakeValue
for the parameter, a vector of qubits for control operation and a single qubit for the target:cuda-quantum/runtime/cudaq/builder/kernel_builder.h
Lines 464 to 465 in da6d0b9
I was wondering if it's possible to add an overload that accept a
double
parameter, a vector of qubits for control and a single qubit of target. It seems like convert a double to aQuakeValue
requires access to theopBuilder
member but it is private so I can't do that externally.The text was updated successfully, but these errors were encountered: