Skip to content

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

Merged
merged 42 commits into from
Jul 30, 2025

Conversation

yaelbh
Copy link
Collaborator

@yaelbh yaelbh commented Feb 4, 2025

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.
  • Note the discussion in Convert pubs to equivalent pubs that are rzz-valid #2125 about an option that's not implemented here, to do it using a transpiler pass.

@yaelbh yaelbh marked this pull request as draft February 4, 2025 16:48
@yaelbh
Copy link
Collaborator Author

yaelbh commented Feb 9, 2025

I left undone for now:

  1. Support for dynamic circuits.
  2. Preserving the global phase.

Other than that it's ready to play with.

@yaelbh yaelbh marked this pull request as ready for review July 8, 2025 13:20
@yaelbh yaelbh requested review from ElePT and wshanks and removed request for ElePT July 8, 2025 13:20
Copy link
Collaborator

@wshanks wshanks left a 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.

Copy link
Collaborator

@ElePT ElePT left a 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.

@ElePT ElePT added enhancement New feature or request Changelog: New Feature Include in the Added section of the changelog labels Jul 16, 2025
@yaelbh yaelbh requested review from wshanks and ElePT July 24, 2025 14:48
Copy link
Collaborator

@wshanks wshanks left a 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.

Copy link
Collaborator

@wshanks wshanks left a 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.

@yaelbh yaelbh enabled auto-merge July 30, 2025 16:56
@yaelbh yaelbh added this pull request to the merge queue Jul 30, 2025
Merged via the queue into Qiskit:main with commit f828fa2 Jul 30, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the Added section of the changelog enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants