Skip to content
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

Introducing: quil-py #140

Merged
merged 63 commits into from
Mar 7, 2023

Conversation

MarquessV
Copy link
Contributor

@MarquessV MarquessV commented Jan 6, 2023

This PR turns this repo into a workspace and adds quil-py as a new crate and Python package.

In order to support the Python bindings, some breaking changes were necessary. Primarily, any enum struct variant had to be broken out into its own type.

In other cases, code in quil-rs was refactored in a non-breaking way to support the Python bindings, such as by lifting the implementations for fmt::Display up to the types used for Instruction variants. Some bugs were revealed and squashed in the process as well.

Some features like Program addition have been added as well. While motivated by the goal to use this as a backend for PyQuils Program, functionality was only ported back from PyQuil if it makes sense for quil-rs to have. For example, Program addition stands on its own as a feature this library have. num_shots however is not a quil concept, and wasn't ported back. This is important to keep in mind during review. I've tried my best to keep the responsibilities of quil-rs and PyQuil separate, but the lines are sometimes blurry.

This PR is targeting a feature branch because it is not a complete implementation of quil-py. This PR, along with the pyQuil counterpart should form the foundation for all the future work that needs to be done. Unlike the pyQuil PR though, most of the crate is still functional with these changes.

All feedback is welcome, I've also included discussion prompts and clarifications as comments on the PR.

MarquessV and others added 8 commits March 1, 2023 10:35
Co-authored-by: Michael Bryant <mbryant@rigetti.com>
Co-authored-by: Michael Bryant <mbryant@rigetti.com>
Co-authored-by: Michael Bryant <mbryant@rigetti.com>
Co-authored-by: Michael Bryant <mbryant@rigetti.com>
@MarquessV MarquessV requested review from Shadow53, kalzoo and jselig-rigetti and removed request for Shadow53 March 6, 2023 17:25
CONTRIBUTING.md Outdated Show resolved Hide resolved
MarquessV and others added 4 commits March 6, 2023 15:40
@MarquessV MarquessV merged commit 6615f02 into 1455-python-support-for-program-and-beyond Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants