As for bitcoin, though, I don't think there's too much to worry about. If a quantum algorithm grants a complexity speed up (or some sort of deal-breaking cryptographic weakness is discovered in sha-256 for that matter), I imagine the network could agree to update to a new protocol using a different hash, if that was the proper solution. If a quantum computer just gave integer-factor speedups such as ASICs are currently doing to GPUs and FPGAs, then I suspect by the time a quantum computer is made that can efficiently mine bitcoins, enough can be made at once that, just as we're seeing with ASICs, quite a lot of miners will grab them (avoiding a 51% issue) and the difficulty will simply rise.
Edit: https://bitcointalk.org/index.php?topic=78693.0 tells me http://en.wikipedia.org/wiki/Grover%27s_algorithm would work, making the algorithm O(sqrt(N)) and effectively making the problem of finding a sha-256 hash into finding a sha-128 hash.
> Computers using D-Wave's devices will always
> differ from gate-based quantum computers in one key way:
> D-Wave's devices do not lead to universal computers that
> can be programmed with any algorithm, as an ordinary computer can.
> Instead, says D-Wave's Colin Williams, their chips focus
> on solving a particular class of optimisation problems.
> "That's such an important class that commercially it is
> a much better strategy than trying to make a universal machine."
Perhaps the problem of bitcoins can be reduced to hill/valley optimization, but I don't think that's how bitcoin works.
Putting the cost of the machine aside, would a computer like this be able to mine coins at high speeds using relatively little electricity. Seems like it could crush the market with inflation.