catalyst
catalyst copied to clipboard
[Frontend] Late result type unification in catalyst.cond during the quantum tracing
This is a potential issue which was discovered during the Jax dynamic API development. In the two-stage quantum tracing, we do the type unification of all the conditional branches after user transformations are applied. That means, that during the quantum-tape transformations, users will see a non-unified result type which happens to be the result type of the last branch of the conditional statement.
In order to fix this issue, we suggest to do the type unification both before and after applying user quantum-tape transformations. See the following fixme in the development branch