Skip to content

Zygote struggles with circuits that have a nested structure such as put => chain => put #569

Description

@dandanua

Hi!

I have noticed that Zygote struggles with gradient computation for circuits that have nested put components - e.g., chain(10, [put(10, (i,j) => chain(2, [put(2, 1=>Rx(0)), put(2, 2=>Ry(0))])) for i=1:5, j=6:10]). The gradient computation time (it could be the compilation time, though) grows enormously in comparison to the equivalent "flat" circuit without nested puts.

I don't know what's the issue, but I think it would be good to have a method in YaoBlocks.Optimise that removes nested puts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsneed to do with documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions