Skip to content
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

Gradient executions in ParameterShiftGradient shifts multiple parameters at the same time #563

Open
daanish-arya opened this issue Nov 25, 2022 · 0 comments

Comments

@daanish-arya
Copy link

When obtaining (shifted) gradient executions using ParameterShiftGradient , any parameters set to the same value will all be shifted at once. That is, if multiple (uniquely named) parameters have the same numerical runtime value, the gradient executions will shift them all within consecutive circuits (+/-), then return a number of unaltered gradient execution circuits. For example, a circuit with parameters named theta_1, theta_2, theta_2 all being set to pi/4 will return a circuit with all of these rotations shifted to 3pi/4, another with the parameters shifted to -pi/4, and 4 circuits with no shifts present. This behaviour is not seen when the named parameters are set to unique values, either by manual assignment or through randomly sampling from a probability distribution, and the function performs as expected.

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

No branches or pull requests

1 participant