Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Update 02_gradients_framework.ipynb #1481

Closed
wants to merge 1 commit into from
Closed

Update 02_gradients_framework.ipynb #1481

wants to merge 1 commit into from

Conversation

pearcandy
Copy link

Typo correction

removal of "\partial" in the second term on the right-hand side

Typo correction: removal of "\\partial" in the second expression on the right-hand side
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@CLAassistant
Copy link

CLAassistant commented Jun 26, 2023

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Eric-Arellano
Copy link
Collaborator

Hi! Thanks for the contribution. What is the motivation for this change?

@pearcandy
Copy link
Author

I am new to quantum computation and was just learning about gradients. At the time, I felt that I did not need the partial symbol on the right side in the finite difference formula. If I am wrong, please ignore my pull request.

@Eric-Arellano
Copy link
Collaborator

Okay, thanks. I'm going to assume that the original author and code reviewers were correct in having it, then.

In the future, when making contributions, it is helpful to put in the PR description what the motivation for the change is. If you're not sure whether a change is good or not, either don't open it or ask for feedback, e.g. by opening a GitHub issue or using the project's Slack.

Cheers in your quantum computing journey!

@pearcandy
Copy link
Author

Thanks for your advice. Next time, I will try to discuss on Slack projects.

In this issue, I think the symbol for partial on the right-hand side in the equation, i.e., \partial \langle \psi(\theta..., does not make sense mathematically. This is because the equation implies rewriting the continuous derivative with respect to ε into a discrete numerical derivative. Nevertheless, the sign of the partial derivative remains on the right-hand side, which is obviously not correct. It is clear from a comparison with the formula for Parameter Shift Gradients discussed above in this chapter.

@Eric-Arellano
Copy link
Collaborator

Eric-Arellano commented Jul 17, 2023

Ah, I realize either way, opflow is deprecated and will soon be removed, per Qiskit/qiskit#10666. (We're still working out the specific plan to remove them)

Thank you again for the contribution!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants