QIR generation makes use of some limited constant folding to enable features like loop unrolling and array access. However, exponentiation is not constant folded even when both parts of the call are known to be constant. This can cause otherwise valid loops to fail unrolling for hardware execution.
QIR generation makes use of some limited constant folding to enable features like loop unrolling and array access. However, exponentiation is not constant folded even when both parts of the call are known to be constant. This can cause otherwise valid loops to fail unrolling for hardware execution.
For example:
will not be unrolled while the equivalent:
will be unrolled fully.