-
Notifications
You must be signed in to change notification settings - Fork 177
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
Add overload to handle the case when the user writes: #32
Conversation
Will you check that the following makes it through the bridge with this PR: struct givens {
void operator()(double lambda, cudaq::qubit &q, cudaq::qubit &r) __qpu__ {
ry(M_PI_2, q);
ry(M_PI_2, r);
z<cudaq::ctrl>(q, r);
ry(lambda, q);
ry(-lambda, r);
z<cudaq::ctrl>(q, r);
ry(-M_PI_2, q);
ry(-M_PI_2, r);
}
};
__qpu__ void qnppx(double theta, cudaq::qubit &q, cudaq::qubit &r,
cudaq::qubit &s, cudaq::qubit &t) {
x<cudaq::ctrl>(r, q);
x<cudaq::ctrl>(s, t);
cudaq::control(givens{}, {q, t}, theta, r, s);
x<cudaq::ctrl>(r, q);
x<cudaq::ctrl>(s, t);
} |
Thanks for the test. I'm getting a failure on this code. Investigating. Update: added fix. |
Thanks for the bug fix, the code snippet works for me now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved pending CI
cudaq::control(Kernel{}, {ctrl1, ctrl2}, args...); Get vector<reference_wrapper<qubit>> through the bridge. Add simple test.
abc717c
to
03f3edf
Compare
Rel notes: see also #35. |
cudaq::control(Kernel{}, {ctrl1, ctrl2}, args...);
Get vector<reference_wrapper> through the bridge.
Add simple test.