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

Allow string keys in QuantumCircuit.assign_parameters #11432

Merged
merged 1 commit into from Jan 8, 2024

Conversation

jakelishman
Copy link
Member

@jakelishman jakelishman commented Dec 19, 2023

Summary

These are looked up using the new get_parameter method to convert them into an actual Parameter instance. This is not available in the fast path (which is allowed to assume that the caller has taken care of providing the most efficient inputs).

Details and comments

Depends on #11431, which this PR currently contains. edit: now rebased.

Close #7107.

@jakelishman jakelishman added Changelog: New Feature Include in the "Added" section of the changelog mod: circuit Related to the core of the `QuantumCircuit` class or the circuit library labels Dec 19, 2023
@jakelishman jakelishman added this to the 1.0.0 milestone Dec 19, 2023
@jakelishman jakelishman requested a review from a team as a code owner December 19, 2023 12:33
@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

@coveralls
Copy link

coveralls commented Dec 19, 2023

Pull Request Test Coverage Report for Build 7448501896

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.007%) to 87.581%

Totals Coverage Status
Change from base Build 7448002797: 0.007%
Covered Lines: 59486
Relevant Lines: 67921

💛 - Coveralls

These are looked up using the new `get_parameter` method to convert them
into an actual `Parameter` instance.  This is not available in the fast
path (which is allowed to assume that the caller has taken care of
providing the most efficient inputs).
@jakelishman
Copy link
Member Author

Rebased and ready for review.

Copy link
Contributor

@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for tackling this often-requested feature!

@Cryoris Cryoris added this pull request to the merge queue Jan 8, 2024
Merged via the queue into Qiskit:main with commit 4084382 Jan 8, 2024
13 checks passed
@jakelishman jakelishman deleted the assign-by-name branch January 8, 2024 16:42
ShellyGarion pushed a commit to ShellyGarion/qiskit-terra that referenced this pull request Jan 18, 2024
These are looked up using the new `get_parameter` method to convert them
into an actual `Parameter` instance.  This is not available in the fast
path (which is allowed to assume that the caller has taken care of
providing the most efficient inputs).
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 mod: circuit Related to the core of the `QuantumCircuit` class or the circuit library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support binding/assigning parameters by name
5 participants