Does anybody give a good textbook description of a quantum computer algorithm and how its different from an ordinary algorithm?
I'll avoid talking about Shor's algorithm and leave it for you to read on your own -- Shor's algorithm is the quantum algorithm, and is the reason quantum computing has become such a hot topic, and is not only a must read, but Scott Aaronson has provided a better introduction than I could ever manage, http://www.scottaaronson.com/blog/?p=208

Instead, I will guide you through Deutsch's algorithm, which solves a fantastically useless problem exponentially faster than any classical algorithm:



Imagine I have a function $f$ on a configuration of $n$ bits, $C=\{0,1\}^n$ that takes each configuration to a single bit. I promise you beforehand that this function is either:


Constant - all configurations are mapped to the same value.
Balanced - exactly half of the configurations map to $1$, the other half to $0$.


So classically, in the worst case you must evaluate the function for $2^{n-1}+1$ configurations ($O(2^n)$) to verify which category $f$ falls into.



Now, a quantum computer isn't just a parallel processor, where you can give it a superposition of the configurations and get back $f$ evaluated on all of them. At the end of the day, you have to make a measurement which destroys our carefully crafted superposition -- so we have to be clever! The fundamental feature of a quantum algorithm is that we use unitary operations to transform our state and use interference between states so that when we measure the state at the end, it tells us something unambiguous.

So without further ado, the Deutsch algorithm for $n=2$ qubits (you can do this for many more qubits, of course, but you wanted a simple example). The "quantum version" of our function is a unitary operation (a "quantum gate") that takes me from $|a\rangle|b\rangle$ to $|a\rangle|b+f(a)\rangle$ (where the addition is modulo 2). Also at my disposal is a gate that takes any single bit and puts it in a particular superposition:

$$|1\rangle\rightarrow(|0\rangle-|1\rangle)/\sqrt{2}$$

$$|0\rangle\rightarrow(|0\rangle+|1\rangle)/\sqrt{2}$$

The first step in the algorithm is to prepare my two qubits as $|0\rangle|1\rangle$ and then apply this transformation, giving me the state $(|0\rangle+|1\rangle)(|0\rangle-|1\rangle)/2$. Now I evaluate the function by applying the gate I described earlier, taking my state to

$$[|0\rangle(|0+f(0)\rangle-|1+f(0)\rangle)+|1\rangle(|0+f(1)\rangle-|1+f(1)\rangle)]/2$$

If we stare at this carefully, and think about arithmetic mod 2, we see that if $f(0)=1$ the first term picks up a minus sign relative to its state before, and if $f(0)=0$ nothing happens. So we can rewrite the state as

$$[(-1)^{f(0)}|0\rangle(|0\rangle-|1\rangle)+(-1)^{f(1)}|1\rangle(|0\rangle-|1\rangle)]/2$$

or regrouping

$$(|0\rangle+(-1)^{f(0)+f(1)}|1\rangle)(|0\rangle-|1\rangle)/2$$

Now we shed the second qubit (we don't need it anymore, and it's not entangled with the first bit), and apply the second transformation I listed once more (and regrouping, the algebra is simple but tedious) -- at last, our final state is

$$[(1+(-1)^{f(0)+f(1)})|0\rangle+((1-(-1)^{f(0)+f(1)})|1\rangle]/2$$

And lastly, we measure! It should be clear from the state above that we've solved the problem... If $f$ is constant, then $f(0)=f(1)$ and we will always measure $|0\rangle$, and if $f$ is balanced then $f(0) \neq f(1)$ and we always measure $|1\rangle$.

Some final comments: hopefully this gives you some taste for the structure of a quantum algorithm, even if it seems like kind of a useless thing -- I strongly recommend going and reading the article I linked to at the beginning of this answer.
