Qualtran icon indicating copy to clipboard operation
Qualtran copied to clipboard

Improve handling of QROAMClean.adjoint()

Open wjhuggins opened this issue 1 year ago • 1 comments

Currently QROAMClean.adjoint() returns a QROAMCleanAdjointWrapper.

I understand that this is because the exact circuit construction for uncomputing the table lookup depends on the measurement outcomes and we do not have first-class support for measurement and classical data at this time (see #445). Even with support for classical data it seems difficult to handle this case because the classical data will be randomly determined.

One downside of using QROAMCleanAdjointWrapper as it is currently implemented is that the call graph only includes the Toffoli counts from the literature. It would be good to get better Clifford counts here, even if we can't fully decompose the circuits without knowing the measurement outcomes.

Also, I see that there is a construction fro QROAMCleanAdjoint in the repo already. At least for symbolically specified instances QROAMClean it seems like we would be better off using QROAMCleanAdjoint than QROAMCleanAdjointWrapper.

Perhaps someone who has a better handle on this part of the code would have better suggestions, but I thought I would create an issue to flag it.

wjhuggins avatar Oct 09 '24 18:10 wjhuggins

I think I captured the situation correctly @tanujkhattar, but please let me know if I'm missing something.

wjhuggins avatar Oct 09 '24 18:10 wjhuggins