Skip to content

Classical bitset of size zero not supportedΒ #37

@garrison

Description

@garrison

If one creates a bit array of size zero (e.g. bit[0] c1;), the program will fail to parse

assert(S > 0 && "Invalid bitset of size zero!");

However, this is not explicitly forbidden by the openqasm3 spec, as far as I can tell (see https://openqasm.com/language/types.html#arrays).

In the circuit-knitting-toolbox, we programmatically generate many circuits, all of which have two registers for consistency in handling them. But, one of the registers has zero bits in some of the circuits.

We can work around this easily, but I wanted to flag it as something that would be desirable to either support or clarify.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions