012 Secret Key With Qubits

Simulator

Alice and Bob build a shared key from qubits. Turn the eavesdropper on and watch the error rate jump to about 25%.

Simulator running in your browser. Real hardware: coming soon (planned provider: IBM Quantum).

What's happening?

Simulate BB84 quantum key distribution: Alice sends random qubits, Bob reads them in random ways, they keep the matching ones, and an eavesdropper switch shows the error rate jump to about 25%. Simulator only.

You will learn: How measuring a qubit disturbs it, and how that lets two people detect an eavesdropper.

The protocol

Alice picks a random bit and a random way (up-down, or sideways) for each qubit. An up-down qubit is Heads or Tails. A sideways qubit is the same bit written after a Spin the coin step. Bob reads each qubit in a random way: up-down means look straight away, sideways means Spin the coin first and then look. When his way matches Alice's he gets her bit. When it does not, his result is a fair coin flip. This is the BB84 protocol of Bennett and Brassard (1984).

Why an eavesdropper shows up

Eve has to read each qubit to learn the bit, and she does not know Alice's way. Half the time she guesses wrong, which disturbs the qubit. When Alice's and Bob's ways then match, Bob gets the wrong bit half of the time Eve guessed wrong, so about one quarter of the kept bits are wrong. With no eavesdropper and a perfect channel the error rate is about zero. This is the same measurement rule you saw in the coin flip: looking changes the qubit.

Honest notes

Why quantum networks matter

A quantum network lets distant devices share quantum states, which is the basis for key distribution today and for linking quantum computers later. See Satellite QKD for what has been demonstrated.

Run on real hardware: coming soon. The planned provider is IBM Quantum. It is not connected yet. Every result on this page comes from a simulator running in your browser, not from a quantum computer.

How it works: the simulator keeps the exact quantum state of the qubits as a list of complex numbers, applies each gate to it, and draws random samples from the resulting probabilities. The random numbers are ordinary pseudo random numbers from your browser, and a real device would add noise. No QNT, wallet or account is needed.

Sources

This is an educational simulator, not financial advice. QUANTUM (QNT) is an independent community token on Solana and does not perform quantum computation.

Updated | Free, no account, no token needed