Does there exist an oracle that inputs a quantum state, say for example
$$ \frac{1}{2^N} \sum_{n=0}^{2^N - 1} \left | n \right > \left | f(n) \right > $$
and allows us to find $n$ such that $f(n) = A$ for some given $A$? Or easier, $f(n) = 0^{\otimes N}$.
This state can be represented, in vector form, like this
$$ \begin{pmatrix} \left | f(000) \right > \\ \left | f(001) \right > \\ \left | f(010) \right > \\ \left | f(011) \right > \\ \vdots \end{pmatrix} $$
This question is very similar to Grover's algorithm, which instead asks:
find x such that $f(x) = 1$
$$ \frac{1}{\sqrt{2^N}} \sum_{n=0}^{2^N -1} (-1)^{f(n)} \left | n \right > $$
Of course Grover's algorithm has a solution that runs in $O(\sqrt{2^N})$ time. Does the problem I pose have a solution, and is it efficient?