Dragonfall said:
Yes. Say f(3)=4, then somewhere in the superposition is the term \left| 3\right>\left| 4\right>. Basically you'd get a superposition of all the input and values of f from 0 to 2^n.
Yeah, you could do this I think, but I don't know why. It would throw away the parallelism that you'd be gaining in doing it in the first place.
Let me clean up some of your notation first, if I may. Normally you'd have two registers, x and y. The x register (call it 8 bits long) would be prepared as a superposition of all binary values from 0 to 2^8-1=255. All the binary numbers from 0 to 255 would be equally represented in x. Register y is initialized to 8 bits of binary zero, |00000000>. Usually the word length (how many bits) is implied and just written as y=|0>.
\left| x \right> = \frac{1}{\sqrt{2^n}}\sum_{i=0}^{2^n-1}\left| i \right>
\left| y \right> = \left| 0 \right>
Note that I fixed the index limit to 2n-1 so that there are 256 numbers respresented, in total.
The idea is to take the register
pair \left| x \right>\left| 0 \right> to \left| x \right>\left| f(x) \right> by applying some quantum gate that will mix |x> and |0> together to get y=f(x) and still leave you |x> so that the operation is reversible. (How, or if this manages to conserve information without mixing with the environment, is the question I'd like answered).
After the gate operation is preformed, y = f(x). The register pair become:
\left| x \right> \left| y \right> = \left| x \right> \left| f(x) \right>
Now I want to somehow extract a PARTICULAR piece of information from that superposition, say f(3). Is this possible? I mean if I just measure the qubits without doing anything to them first then I'd just get a random term, and hence a random value of f.
We're both learning this material :

: so I had to think a bit to come up with a "method". It would be do-able, just as much as any of this is do-able, given the current technology. Begin with the pair |3> |y> by thowing away the |x> superposition and preparing x = |3> without effecting |y>. Apply a gate operation to obtain |3> |f(3)>. This looks a lot like an inverse gate where |x> has been prepared in a singular state.
Eventually you should need something like this to extract classical information, I think. Maybe that's what you're asking. If so, I've been curious too. If we're lucky someone like Hirkyl will step in and clear up some uncertainty.
Now unfortunately I don't actually know any physical interpretation of all this stuff, so I can't refer to it as a "spin-1/2" particle.
No worries.