1
There are many quantum implementations of modular exponentiation to choose from depending on whether you want to optimize qubit count vs time and other similar tradeoffs. However, for the method closest in idea to this that is functional, first note a straight-up modular exponentiation truth tabl...