-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
"Given a Hermitian operator $g$ with two unique eigenvalues $\\pm r$ which acts as generator for a parameterized quantum gate $$G(\\theta)= e^{-i\\theta g}.$$\n", | ||
"Then, quantum gradients can be computed by using eigenvalue $r$ dependent shifts to parameters. \n", | ||
"All [standard, parameterized Qiskit gates](https://github.com/Qiskit/qiskit-terra/tree/master/qiskit/circuit/library/standard_gates) can be shifted with $\\pi/2$, i.e.,\n", | ||
" $$ \\frac{\\partial\\langle\\psi\\left(\\theta\\right)|\\hat{O}\\left(\\omega\\right)|\\psi\\left(\\theta\\right)\\rangle}{\\partial\\theta} = 2 \\left(\\langle\\psi\\left(\\theta+\\pi/2\\right)|\\hat{O}\\left(\\omega\\right)|\\psi\\left(\\theta+\\pi/2\\right)\\rangle -\\partial\\langle\\psi\\left(\\theta-\\pi/2\\right)|\\hat{O}\\left(\\omega\\right)|\\psi\\left(\\theta-\\pi/2\\right)\\rangle\\right).$$\n", |
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.
Is rhs of param shift rule\left( ... \right) / 2
instead of 2 \left( ...\right)
?
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.
You are right
"The entries of the QFI for a pure state reads\n", | ||
"\n", | ||
"$$\n", | ||
"QFI_{kl} = 4 * \\text{Re}\\left[\\langle\\partial_k\\psi|\\partial_l|psi\\rangle-\\langle\\partial_k\\psi|\\psi\\rangle\\langle\\psi|\\partial_l\\psi\\rangle \\right].$$" |
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.
rhs remains |psi\\rangle
. Need to replace it with |\psi\\rangle
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.
It's also good to move $$
in the end of sense to the next line.
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.
Thanks. Took care of it.
- minor fixes - rename to `02_gradients...` to prepare for `01_operator_flow...`
You are getting a 180 sec timeout isse:
Perhaps going to Aer from BasicAer will help? |
* Update qgans_for_loading_random_distributions.ipynb * move qGAN tutorial from legacy_tutorials to tutorials * Update qgans_for_loading_random_distributions.ipynb * Remove Torch import * change Kernel * Update qgans_for_loading_random_distributions.ipynb * include gradient module tutorial * update naming -> gradient framework * update gradient tutorial * update gradient framework, delete black picture * fix typos * Update 02_gradients_framework.ipynb - minor fixes - rename to `02_gradients...` to prepare for `01_operator_flow...` * use circuit instead of circuitfactory * Update 02_gradients_framework.ipynb Co-authored-by: Paul Nation <nonhermitian@gmail.com> Co-authored-by: Cryoris <jules.gacon@googlemail.com> Co-authored-by: Stefan Woerner <WOR@zurich.ibm.com>
Summary
This adds a tutorial for the new Gradient Module.
Details and comments