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

Add V2 primitive container classes #11524

Merged
merged 5 commits into from
Jan 9, 2024

Conversation

chriseclectic
Copy link
Member

Add required container classes for V2 primitive implementations. Separated out from 11227 to unblock other PRs

Summary

This separates the common V2 primitives container classes from #11227 so discussion and modifications to SamplerV2 and EstimatorV2 can be worked on without blocking each other.

Note that this PR does not initially change any code from the subset of files from #11227 other than fixings some typos in doc strings.

Details and comments

My proposal to streamline getting the V2 primitives merged, and make it easier for the runtime to implement its primitives is to break #11227 and #11264 up 5 PRs (dependencies shown via nesting) for

  • Containers
    • BaseEstimatorV2
      • StatevectorEstimator
      • (Runtime estimator in its repo)
    • BaseSamplerV2
      • StatevectorSampler
      • (runtime sampler in its repo)

@chriseclectic chriseclectic added priority: high mod: primitives Related to the Primitives module labels Jan 9, 2024
@qiskit-bot
Copy link
Collaborator

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

  • @Qiskit/terra-core
  • @ajavadia
  • @ikkoham
  • @levbishop
  • @t-imamichi

Copy link
Contributor

@ikkoham ikkoham left a comment

Choose a reason for hiding this comment

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

I would approve, but since it is partially a self review, I think this PR needs to be approved by others as well.

Copy link
Contributor

@ihincks ihincks left a comment

Choose a reason for hiding this comment

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

Thanks @chriseclectic and @ikkoham .

I left some minor comments all to do with docstrings.

There are a bunch of # (C) Copyright IBM 2023. that we might want to change to 2024. Otherwise, LGTM!

qiskit/primitives/containers/bindings_array.py Outdated Show resolved Hide resolved
qiskit/primitives/containers/bindings_array.py Outdated Show resolved Hide resolved
qiskit/primitives/containers/bindings_array.py Outdated Show resolved Hide resolved
qiskit/primitives/containers/bindings_array.py Outdated Show resolved Hide resolved
qiskit/primitives/containers/pub_result.py Show resolved Hide resolved
qiskit/primitives/containers/pub_result.py Outdated Show resolved Hide resolved
qiskit/primitives/containers/pub_result.py Outdated Show resolved Hide resolved
ihincks
ihincks previously approved these changes Jan 9, 2024
@ihincks
Copy link
Contributor

ihincks commented Jan 9, 2024

Also as @ikkoham said, FWIW, "partially a self review" applies to me too, as I wrote bits and pieces of a couple of things.

@chriseclectic chriseclectic mentioned this pull request Jan 9, 2024
@coveralls
Copy link

coveralls commented Jan 9, 2024

Pull Request Test Coverage Report for Build 7465264931

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 87.55%

Totals Coverage Status
Change from base Build 7463210826: -0.01%
Covered Lines: 59794
Relevant Lines: 68297

💛 - Coveralls

chriseclectic and others added 4 commits January 9, 2024 12:58
Add required container classes for V2 primitive implementations. Separated out from 11227 to unblock other PRs

Co-Authored-By: Ikko Hamamura <ikkoham@users.noreply.github.com>
Co-Authored-By: Takashi Imamichi <31178928+t-imamichi@users.noreply.github.com>
Co-Authored-By: Ian Hincks <2229105+ihincks@users.noreply.github.com>
Co-authored-by: Ian Hincks <ian.hincks@gmail.com>
@chriseclectic chriseclectic requested a review from a team as a code owner January 9, 2024 19:17
@chriseclectic chriseclectic added this pull request to the merge queue Jan 9, 2024
Merged via the queue into Qiskit:main with commit f663a64 Jan 9, 2024
13 checks passed
@t-imamichi t-imamichi mentioned this pull request Jan 10, 2024
4 tasks
ShellyGarion pushed a commit to ShellyGarion/qiskit-terra that referenced this pull request Jan 18, 2024
* Add V2 primitive container classes

Add required container classes for V2 primitive implementations. Separated out from 11227 to unblock other PRs

Co-Authored-By: Ikko Hamamura <ikkoham@users.noreply.github.com>
Co-Authored-By: Takashi Imamichi <31178928+t-imamichi@users.noreply.github.com>
Co-Authored-By: Ian Hincks <2229105+ihincks@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Ian Hincks <ian.hincks@gmail.com>

* Update copyright to 2024

* Fix linting errors

---------

Co-authored-by: Ikko Hamamura <ikkoham@users.noreply.github.com>
Co-authored-by: Takashi Imamichi <31178928+t-imamichi@users.noreply.github.com>
Co-authored-by: Ian Hincks <2229105+ihincks@users.noreply.github.com>
Co-authored-by: Ian Hincks <ian.hincks@gmail.com>
@t-imamichi t-imamichi mentioned this pull request Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod: primitives Related to the Primitives module priority: high
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants