EDIT: It is also true that if we saw this coming we could switch to another encryption scheme.
This is the part so many people neglect to realize. If quantum computing made any real impact on things like encryption, we'd have more processing power to create a better, more secure one. And since BTC is open source, that is a quick and easy solution. At the same time, however, it would disable all current ASICs, and I do believe most altcoins would be susceptible (as the majority don't even follow current development).
Bitcoin modified to use a quantum cryptography algorithm would probably make it even more secure. Quantum techniques could strengthen a modified Bitcoin's security, not destroy it. There is a paper at SANS discussing quantum cryptography which concludes that "quantum techniques should meet the encryption needs of users, perhaps indefinitely".
Quantum Encryption - A Means to Perfect Security?It gives three reasons that make quantum cryptography uncrackable in the paragraph below.
Quantum cryptography is thought to be secure for three main reasons (Lo). One, the quantum no-cloning theorem states that an unknown quantum state cannot be cloned. Theoretically, messages sent using quantum cryptography would be in an unknown quantum state, so they could not be copied and sent on. Two, in a quantum system, which can be in one of two states, any attempt to measure the quantum state will disturb the system. A quantum message that is intercepted and read by an eavesdropper will become garbled and useless to the intended recipient of the message. Three, the effects produced by measuring a quantum property are irreversible, which means an eavesdropper cannot “put back” a quantum message to its original state. These three properties provide the power of quantum cryptography. No amount of effort or genius can alter the fact that observing a quantum property irrevocably alters the object being observed.
It also adds that the first prototype demonstrating encrypting and decrypting quantum messages was invented in 1989, so quantum cryptography is no longer just theoretical.
Public key cryptography was invented in the 1970s by Diffie, Hellman and Merkle. It differed from previous encryption systems in that the groups sending messages did not have to agree on a key beforehand. The encryption key is in the public domain, so anyone can encrypt a message, while the related decryption key is held privately so that one person or a trusted group of people are the only ones able to decrypt the message. In 1989, the first fully working prototype of an instrument that encrypted and decrypted quantum messages was produced at the IBM Thomas Watson Research Center. In this case, the information was transmitted over a distance of only a few inches and the transmission rate was very low (Dwyer).