Skip to content

[Bug]: Pattern.get_layers does not support non-runnable patterns #368

@matulni

Description

@matulni

Consider the following pattern where the corrections define a closed loop:

from graphix.pattern import Pattern
p1 = Pattern(input_nodes=[0, 1, 2], cmds=[X(0, domain={1}), X(1, domain={2}), X(2, domain={0})])

Calling p1.get_layers() results in an infinite loop. Desired behaviour should be to return None or raise an exception.

To be fixed in Flow refactor part 2.

Related #364

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions