-
Notifications
You must be signed in to change notification settings - Fork 157
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
SamplerV2 update #1420
SamplerV2 update #1420
Conversation
Pull Request Test Coverage Report for Build 8100319895Details
💛 - Coveralls |
Converting to draft as per @gadial's request. |
qiskit_ibm_runtime/sampler.py
Outdated
@@ -42,7 +42,7 @@ class Sampler: | |||
version = 0 | |||
|
|||
|
|||
class SamplerV2(BasePrimitiveV2[SamplerOptions], Sampler, BaseSamplerV2): | |||
class SamplerV2(BasePrimitiveV2, Sampler, BaseSamplerV2): |
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.
Why was SamplerOptions
removed? It's meant to set the expected options class.
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.
Seems to me I accidently reverted to an older version. Will fix.
qiskit_ibm_runtime/sampler.py
Outdated
@@ -148,23 +150,16 @@ class SamplerV1(BasePrimitiveV1, Sampler, BaseSampler): | |||
|
|||
Example:: | |||
|
|||
from qiskit.circuit import QuantumCircuit, QuantumRegister, ClassicalRegister | |||
from qiskit.test.reference_circuits import ReferenceCircuits |
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.
qiskit.test
no longer exists in 1.0
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.
Replaced with explicit code for generating bell circuit - is there a better alternative? Also, we have similar example in provider_session.py
Summary
Finalizes the
SamplerV2
class and adds relevant tests.Replaces #1326
Details and comments
Fixes #1313
Most of the work required to run
SamplerV2
was done in previous PR's and support for V2 containers inqiskit
is now full, so this PR mainly addsSamplerV2
to the Primitives V2 unit tests, and copies over theSamplerV2
integration tests from qiskit.