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
99 stars 44 forks source link

Mapper resource usage and resource implementation discrepancy #406

Open jvanstraten opened 3 years ago

jvanstraten commented 3 years ago

While refactoring the resource management system, I added an asserion statement that checks whether the scheduling direction specified during construction is actually adhered to by the calls to available() and reserve(). Turns out that the mapper does not adhere to this.

Hans already noted that it is expected behavior that the mapper doesn't strictly adhere to the cycle order it specifies, but as far as I know the current resources cannot deal with this at all. This should probably be checked more closely. I'd already had the idea to extend the direction enumeration with a "random access" variant, but that's yet to be implemented for any resource.