pyqir icon indicating copy to clipboard operation
pyqir copied to clipboard

Integer division and remainder instructions

Open RolandMacDoland opened this issue 2 years ago • 2 comments

Division by constant is supported in pytket and our lower level compiler. It would be good (but not critical) to have it supported in pyqir. The division by zero issue is also easier.

RolandMacDoland avatar Oct 04 '22 08:10 RolandMacDoland

From PyQIR's side, I think it would be easiest and consistent with the other instructions to support any value (constant or not constant) as the operands, but you could of course restrict yourself to constant denominators. Also, I think we might as well add the whole suite of unsigned and signed division and remainder instructions udiv, urem, sdiv and srem, since it's not much work.

bamarsha avatar Oct 04 '22 17:10 bamarsha

This will be handled when updating to support the adaptive profile specification.

idavis avatar Oct 23 '23 17:10 idavis