-
Notifications
You must be signed in to change notification settings - Fork 0
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 Python crate and improve error handling #23
Conversation
and rework some other stuff to be more rusty
* improves error support * improves libquilc.core loading * fixes libquilc.so missing symbols * adds lib tests * renames python module to libquil_py
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.
A few minor comments, might be good to have some type stubs validated via stubtest, but would be fine with adding those later too, if we think the API might drift from this point.
python/src/lib.rs
Outdated
) | ||
.unwrap(); | ||
} | ||
init_submodule("libquil_py", py, m)?; |
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.
module name should be libquil
right?
Originally had it in the Python bindings, but if Python bindings (e.g. qcs-sdk-rust) depend on this library, they won't necessarily import the Python code and thus won't hit the path that loads libquilc.so. By having it in the library's init, we can ensure that libquilc.so is always loaded.
This MR:
python
crate which provides bindings to build programs and chips, and compile programs (depends on an as-yet unmerged quilc change: Add chip parser and program stringer functions to the C library quil-lang/quilc#893)libquilc.so
were not visible to thelibsbcl.so
libraryCloses #20
Closes #21
Closes #22