Skip to content

🐛 StabilizerCode init unhandled crash #739

Description

@MaxieHelenBichmann

System and Environment Information

Not applicable/relevant. (macOS 26.5.1, Python 3.13.13)

Bug Description

If the constructor of StabilizerCode receives the program state "there are no logical operators" as an empty list instead of None or an empty StabilizerTableau, it crashes because the method get_generators does not receive an additional n as a parameter.
That case of empty lists should either be handled gracefully or fixed easily.

Steps to Reproduce

StabilizerCode(["XX", "ZZ"], z_logicals=[], x_logicals=[])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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