-
Notifications
You must be signed in to change notification settings - Fork 183
Update parameters to accommodate with RZZ constraints #2126
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
I left undone for now:
Other than that it's ready to play with. |
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 good to me! My main comments are to handle the case of mutlidimensional parameter arrays and to expose the function publicly. My other comments are just suggestions.
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 @yaelbh, sorry for the late review. I added a couple of small comments on top of Will's.
Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.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.
Looks good to me besides getting feedback from @ElePT on where to document the function.
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.
Approving now because I don't expect @ElePT to be available to give feedback soon and the code all seems good. We can have a follow up PR just to add the function to the public API at a later point and that should be easy to review.
Summary
Solves #2125 through a function that translates from pub to pub.
Only stared - work is still in progress.
Details and comments
In fact, in order not to have to bother with the different structures parameter values can have in pubs, at least for now we translate a pair of circuit and parameter values to another pair, and require the parameter values to be just a list of tuples. The order inside each tuple matches the order of appearance of parameters in the circuit, just like one of the options users have to specify parameter values when defining pubs.