# How to construct a multi-qubit controlled rotation with variable angle?

I'm trying to construct a circuit that performs the quantum transformation :

Where $$f$$ is some function. Is there a way to do it without going through every possible value of $$i$$ ?