-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add C API function to add a delay #14347
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
Conversation
One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 14981318567Details
💛 - Coveralls |
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.
Thanks for tackling this! I left some comments below, mainly about making unit
an enum 🙂
let circuit = unsafe { mut_ptr_as_ref(circuit) }; | ||
|
||
let delay_unit_variant = match unit { | ||
QkDelayUnit::S => DelayUnit::S, |
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.
We typically don't add the Qk
prefix to the structs manually (see e.g. SparseTerm
or OpCounts
in the cext
crate), and have cbindgen
add this prefix. It would be more consistent to do the same here, but I'm not super set on this 🙂
Co-authored-by: Julien Gacon <gaconju@gmail.com>
Co-authored-by: Julien Gacon <gaconju@gmail.com>
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.
LGTM thanks for the quick updates!
* add delay c api function * add test * update test * lint * address comments * Update crates/cext/src/circuit.rs Co-authored-by: Julien Gacon <gaconju@gmail.com> * Update crates/cext/src/circuit.rs Co-authored-by: Julien Gacon <gaconju@gmail.com> * add return doc --------- Co-authored-by: Julien Gacon <gaconju@gmail.com>
Summary
fixes #14237
Details and comments