This has been bothering me for a while.
Bitcoin mining involves repeatedly changing the nonce (and occasionally the timestamp and Merkle root) in a block header and hashing it repeatedly, until the resulting hash falls below the target value. Therefore, the only valid way to find a valid hash is via brute force on a classical computer.
However, quantum computers are on the rise. 8-qubit and 16-qubit systems are already somewhat accessible to the public (for example, the IBM Q experience, which allows for cloud-based quantum computing), and the biggest quantum computer ever constructed to-date is, to my knowledge, 72-qubits. Grover's algorithm, which can only be implemented on a quantum computer, is particularly suited for breaking SHA256, the encryption algorithm behind bitcoin mining.
And therefore my question is - is it possible to implement Grover’s algorithm to find the right nonce that allows the block header hash to satisfy the target value? How many qubits would be required - 8, 16, 32 or more? My understanding is that, since we only need to iterate between all possible combinations of the nonce, which is 32 bits, wouldn't it require only sqrt(2^32)=2^16 (16 qubits) to instantly find a valid block header hash if we use Grover's algorithm?
Or am I missing something? I'm not very familiar with encryption and quantum algorithms, so please correct me if I'm wrong.