QuTech-Delft / OpenQL

OpenQL: A Portable Quantum Programming Framework for Quantum Accelerators. https://dl.acm.org/doi/10.1145/3474222
https://openql.readthedocs.io
Other
97 stars 44 forks source link

CC backend can generate impossibly long seq_wait instructions in rare cases #470

Open wvlothuizen opened 1 year ago

wvlothuizen commented 1 year ago

If a single 'kernel' takes longer than 65535*20 ns (~1.3 ms), the backend can generate an operand to seq_wait exceeding the maximum of 65535 (2^16-1), causing assembly on the CC to fail (see https://github.com/QuTech-Delft/OpenQL/blob/develop/src/ql/arch/cc/pass/gen/vq1asm/detail/codegen.cc#L1259).

As a workaround, long programs can be broken up (e.g. by inserting labels in cQASM), for a true solution multiple seq_wait instructions need to be generated for the cases described above,