CQCL / tket

Source code for the TKET quantum compiler, Python bindings and utilities
https://tket.quantinuum.com/
Apache License 2.0
252 stars 48 forks source link

Fix `QasmWriter.add_multi_bit()` for non-register-aligned arguments #1572

Closed cqc-alec closed 2 weeks ago

cqc-alec commented 2 weeks ago

Description

Don't assume the arguments in add_multibit_op() are register-aligned.

With this change, if the arguments aren't all whole registers we write out the operation as individual bit operations.

Related issues

Fixes #1327 .

Checklist

cqc-alec commented 2 weeks ago

Thanks, it seems that this has also fixed #1509 :)

Cool! Will let you close that one if it is fixed after merging this.