r/QuantumComputing • • Feb 10 '20

Can a quantum computer be used for bitcoin mining?

This has been bothering me for a while.

I'm a newbie in computer science, and I just found out about Grover’s algorithm, which can only be implemented on a quantum computer. Supposedly it can achieve a quadratic speedup over a classical computer, brute-forcing a solution to a n-bit symmetric encryption key in 2^n/2 iterations.

This led me to think that, by utilizing a quantum computer or quantum simulator of about 40-qubits that runs Grover's algorithm, is it possible to mine bitcoins this way? The current difficulty of bitcoin mining is about 15,466,098,935,554 (approximately 2^44), which means that it would take about 2^44*2^32=2^76 SHA256 hashes before a valid block header hash is found.

However, by implementing Grover's algorithm, we would only need to sort through 2^76/2=2^38 hashes to discover a valid block header hash. A 38-qubit quantum computer should be sufficient in this case - which means the 40-qubit quantum computer should be more than enough to handle bitcoin mining.

Therefore - is it possible to use quantum computers to mine bitcoins this way? I'm not too familiar with quantum computers, so please correct me if I missed something.......

NOTE: I am NOT asking whether it is possible to use quantum computers to break the ECDSA secp256k1 algorithm, which would effectively allow anyone to steal bitcoins from wallets. I know that this would require much more than 40 qubits, and is definitely not happening in the near-future.

Rather, I'm asking about bitcoin mining, which is a much easier problem than trying to break ECDSA secp256k1.

17 Upvotes

17 comments sorted by

5

u/stylewarning Working in Industry Feb 10 '20

Not in practice.

1

u/Palpatine88888 Feb 10 '20

Please elaborate a little more, thanks! I'm still really confused right now........

7

u/stylewarning Working in Industry Feb 10 '20

Quantum computers aren’t good enough and won’t be good enough for many years to come to even contemplate a computation like this.

In theory, however, you could use one.

1

u/mbergman42 Feb 10 '20

Learning here myself, is part of your point that the “40 qubits” would be 40 “logical” qubits, which are (I think) the error-corrected equivalent made from a bunch of actual “physical” (noisy, error-prone) qubits? Or something like that?

3

u/stylewarning Working in Industry Feb 10 '20

Yes that’s right, but there’s also more. Just because there are N of something doesn’t mean you only need log(N) qubits. You might even need N qubits for some problems in some cases. “Exponential state space” is only good if you can actually use that state space profitably, not if you can get two numbers to match.

1

u/mbergman42 Feb 10 '20

The number of logical qubits depends on the algorithm implementation? I’ve seen something like that. It’s O(N2 ) or something but the actual implementation needs more than that would imply.

1

u/Bighearteddude Apr 17 '24

how about now?

1

u/stylewarning Working in Industry Apr 17 '24

Same disposition, but things have improved a lot.

3

u/[deleted] Feb 10 '20

I like the question and it would be very interesting to further investigate in that cause. Without giving you too much hope about it working, I think it would be worth to test it on a smaller problem space and see how many qbits you need in fact to implement the hashing algorithm and if the current quantum computers have high enough precision and can maintain a stable state for long enough. IMHO giving it a try and sharing your work would be of great value for the field.

PS: Questions like yours are very much needed in the current quantum computer community and we need more people thinking about where quantum computing could get them an advantage, don't get demotivated about people telling you it's not working in practice when when you can always test it on a smaller problem space and make extrapolations about the requirements of bigger problems.

3

u/Mquantum Feb 10 '20

40 not-error-corrected qubits are not sufficient to run Grover with 256bit hashes. You need at least to be able to represent the number, so 256 qubits, moreover you need ancillary qubits to actually perform the calculation: in this paper it is estimated one need 2402 (https://ledgerjournal.org/ojs/index.php/ledger/article/view/127).

Finally, you have to consider that the calculation is not instantaneous, it is made in steps (gates), so you cannot perform the complete calculation using only 2402 physical qubits, because they would decohere before the calculation is done. One needs other auxiliary qubits to perform error correction. With current knowledge, one would need a factor of around x1000 more qubits. So in practice, with current knowledge one would need a QC with about 3million physical qubits.

By the way, a similar amount of physical qubits would be needed to completely crack ECDSA secp256k1 with Shor. The difference is that Shor's algo is polynomial so that once secp256k1 is broken it is useless to increase keysize, while with Grover it is sufficient to double hashsize to obtain again reasonable mining times (for QC).

EDIT: Even though the difficulty is shorter than 256 bits, I think you still have to implement the complete Grover algorithm for 256, but I might be wrong. Please read the referred paper. In any case, please keep considering the x1000 factor

1

u/mankinskin Dec 08 '21

Yes. Proof of work relies on finding cryptographic numbers by brute force. A quantum computer will be much more efficient and faster, so it will basically take up most of the hash rate in the network and be the major voting power. No classical computers would be able to compete with that, so decentralization would be broken until quantum computers are widely available.

0

u/[deleted] Feb 17 '22

[deleted]

1

u/mankinskin Feb 17 '22

The thing is, the more Bitcoin you have, the more mining hardware you can buy, which translates to more hash rate and more voting power. Proof of Work is just Proof of Stake with hardware.

1

u/Alert-Employment5606 Mar 24 '24

94% of BTC is mined so I would disagree with your claim that decentralisation would be broken

1

u/mankinskin Mar 24 '24 edited Mar 24 '24

The fact that rewards decrease means that eventually mining will become less profitable. This will mean only the most efficient miners survive and the mining network will become smaller, decreasing decentralization. Whether BTC bulls like it or not, BTC is completely overrated for what it does.