Currently the symbolic executor doesn't attempt to lower conditionals even though the skeletons are there.
Requires:
Python APIs added to the builder to allow backends to make the correct decisions.
Projection objects to store the lowering. This may interfere with the new Forq-based state representation.
Add a step in the executor that if it is processing a conditional branch that it checks the body of the if, if it's fully quantum it then asks if any backends support lowering, if some do then it squashes that block into the projection and then continue from the end of the if.
Initially lowering can be simplistic and only requires a few checks: that the condition of the if is either quantum or a value that has been resolved; that every operation within the if is quantum as well, which should then recurse so we can squash nested if statements in.
Currently the symbolic executor doesn't attempt to lower conditionals even though the skeletons are there.
Requires:
Initially lowering can be simplistic and only requires a few checks: that the condition of the if is either quantum or a value that has been resolved; that every operation within the if is quantum as well, which should then recurse so we can squash nested if statements in.