Skip to content

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

@daanish-arya

Description

@daanish-arya

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions