What is qhash, the quantum-circuit hash?
How qhash works: SHA-256 of the block header sets a simulated 16-qubit circuit, its measured output is hashed again, and why GPUs mine it.
What is qhash?
qhash is Qubitcoin's proof of work: a hash with a small quantum circuit inside. Between two SHA-256 steps, it runs that circuit, simulated on an ordinary graphics card.
Most proof-of-work coins hash the block header with one function, such as SHA-256. They compare the result with a target. qhash makes the same comparison.
The work a miner does is the circuit simulation. It is done once for every nonce the miner tries. A nonce is the number a miner changes to get a new hash.
How does qhash work, step by step?
- Hash the 80-byte block header with SHA-256.
- Split that hash into 64 small pieces. Use them as the rotation angles of a simulated circuit of 16 qubits.
- The circuit has two layers of rotations and a chain of CNOT gates.
- Measure each qubit and turn the result into a 16-bit number. This gives 32 bytes.
- Hash the first hash together with those 32 bytes, using SHA-256.
- That result is the block hash. Like any proof of work, it must be below the network target.
Why do GPUs mine qhash?
Simulating a circuit is the kind of parallel maths graphics cards are built for. The project's own miner runs it on NVIDIA's cuQuantum library.
- SRBMiner-Multi and WildRig NG: NVIDIA, AMD and Intel cards.
- ForgeMiner: NVIDIA and AMD cards.
A Bitcoin ASIC only computes SHA-256. So it cannot run the circuit step.
What does qhash mean for you as a miner?
Nothing changes in how you connect. The pool sends a job, and your GPU searches for nonces. Every share is verified with the same qhash code the network uses.
The chain has changed qhash a few times since launch. So run a current release of your miner, or its shares will not match the network.