-
Notifications
You must be signed in to change notification settings - Fork 9
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
MarquessV
merged 63 commits into
1455-python-support-for-program-and-beyond
from
python-bindings
Mar 7, 2023
Merged
Introducing: quil-py #140
MarquessV
merged 63 commits into
1455-python-support-for-program-and-beyond
from
python-bindings
Mar 7, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…into python-bindings
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
requested review from
Shadow53,
kalzoo and
jselig-rigetti
and removed request for
Shadow53
March 6, 2023 17:25
kalzoo
approved these changes
Mar 6, 2023
Co-authored-by: Kalan <22137047+kalzoo@users.noreply.github.com>
This was referenced Mar 14, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 forfmt::Display
up to the types used forInstruction
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 forPyQuil
sProgram
, functionality was only ported back fromPyQuil
if it makes sense forquil-rs
to have. For example,Program
addition stands on its own as a feature this library have.num_shots
however is not aquil
concept, and wasn't ported back. This is important to keep in mind during review. I've tried my best to keep the responsibilities ofquil-rs
andPyQuil
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.