Skip to content

AASRouting doesn't work for circuits with non-default register names. #1534

@IlanIwumbwe

Description

@IlanIwumbwe

Benny and I found this by running a randomly generated circuit through the compiler

Related to this and this.

subcirc_4 = Circuit(2, 2, "subcirc_4")
subcirc_4.add_q_register("qreg", 1)
subcirc_4.measure_all()
AASRouting(RingArch(subcirc_4.n_qubits)).apply(subcirc_4)

Results in:

----> 7 AASRouting(RingArch(subcirc_4.n_qubits)).apply(subcirc_4)
      9 draw(subcirc_4)

RuntimeError: Circuit does not contain unit with id: q[2]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions