-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat(python): Constructors, iterators, and other utility methods have been added to make working with ResultData
, RegisterMap
, and others easier.
#342
Conversation
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 suggestions, but looks good overall
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.
This looks reasonable to me. I've added lots of questions for my own edification, but I'm not sure any of them indicate a lack of sufficient comments or documentation so much as my own lack of context.
This supports pyQuil#1630 by making it easier to construct and iterate over the result data types.
This does not change the return shape of
qpu::api::retrieve_results
. The target would be to construct aQpuResultData
, but the data we need simply isn't available in that function to build it.We could alternatively use the
Executable
struct, which has it's own workflow that already returnsQpuResultData
, but pyQuil'sQAM
is already workflow based and it's quite clunky to try and use one in the other.I think it would be good to reconcile this before a v1.0 release, but this gets us passed the issue for now. In the end, this actually doesn't shove off too much to pyQuil.
TODO:
Figure out if we can better expose types forTook a different approach.QPU/QVMResultData.asdict()