-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix bad indentation and missing hyphen on vqd.py
#12162
Conversation
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
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.
Wow, I had forgotten that qiskit.algorithms was still there in qiskit 0.46. I should probably check and see if the same issue is present in the VQD
class of qiskit-algorithms
. I found a way to fix the lint complaint, but qiskit-neko is always a bit of a mess with 0.46. I think that this might need to be fixed on the neko side, it might be worth looking into how other PRs against 0.46 handle it (Edit: or we can just move on, given that it's not part of the branch protection rules).
that takes an array as input and returns a Qiskit or SciPy optimization result. | ||
k (int): the number of eigenvalues to return. Returns the lowest k eigenvalues. | ||
betas (list[float]): Beta parameters in the VQD paper. | ||
Should have length k - 1, with k the number of excited states. | ||
These hyper-parameters balance the contribution of each overlap term to the cost | ||
function and have a default value computed as the mean square sum of the | ||
coefficients of the observable. | ||
initial point (Sequence[float] | Sequence[Sequence[float]] | None): An optional initial | ||
initial_point (Sequence[float] | Sequence[Sequence[float]] | None): An optional initial |
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.
Now that the initial point's attribute name is correct, sphinx complains that it shows up both here and as a property. You can just remove lines 170 - 178.
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.
@ElePT this was a bad change. It's removing actual code that will impact runtime behavior. The better fix is to delete this line of the docs and not mess with the code.
@@ -102,11 +102,6 @@ class VQD(VariationalAlgorithm, Eigensolver): | |||
These hyper-parameters balance the contribution of each overlap term to the cost | |||
function and have a default value computed as the mean square sum of the | |||
coefficients of the observable. | |||
initial_point (Sequence[float] | Sequence[Sequence[float]] | None): An optional initial |
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.
Docs for the attribute removed 👍 We can still find the same description under the Args
section (line 140) and we shouldn't have the warning. Thank you both for the review!
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.
Nice, thanks a lot for the effort, LGTM.
8a9cc82
This little PR fixes the docs of two attributes of
qiskit/algorithms/eigensolvers/vqd.py
The attribute
optimizer
had bad indentation and was split between two bullet points in the list of attributes.The attribute
initial_point
was missing a hyphen.This issue is tracked by Qiskit/documentation#1120