-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Make V2 primitive input container classes private #11678
Conversation
One or more of the the following people are requested to review this:
|
c64a831
to
35cd07b
Compare
Pull Request Test Coverage Report for Build 7731026313
💛 - Coveralls |
6c053b1
to
7ee729e
Compare
Don't we need to rename classes with prefix "_", e.g., |
I don't think the definition of private in Qiskit is clear. Is it private if it is not in |
From qiskit 1.0 moving forward we're being more explicit about what are public stable interface is. We've documented the stable public interface for qiskit as being anything documented: https://docs.quantum.ibm.com/start/install#qiskit-versioning (it's annoyingly under the "release schedule" section and I can't directly link to it). So ensuring that we're not re-exporting it from |
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.
I have a slight preference not to rename them to start with _
because about 4 other repos would need to be changed to accommodate, both now, and when we make them public. Maybe I should be more concerned about user confusion, but since these things are silently created inside of the primitive and not returned, I can't see how it would be common-place.
7ee729e
to
2c641a4
Compare
This removes the EstimatorPub, SamplerPub, BindingsArray, ObservablesArray classes from API docs to make them internal and not subject to qiskits deprecation policies for public classes.
f2a6401
to
1c709ef
Compare
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.
LGTM, but I would like to brainstorm a bit more improving the visibility of the *Like union types in our api docs.
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 because concerns in my previous comment can be their own PR.
Summary
Make the V2 primitives input container and pubs classes private and removes them from public API Docs
Details and comments
This removes the EstimatorPub, SamplerPub, BindingsArray, ObservablesArray classes from API docs to make them internal and not subject to qiskits deprecation policies for public classes. This is because we have not had sufficient time to fully finalize these classes before the 1.0 release and anticipate making possibly breaking changes to them in future qiskit releases.
Note that we still intend for the
<class>Like
type hints to be in the API docs, though im not entirely sure how to get these to build and render in sphinx with propert doc strings and without unrolling all the composite type hints.