Circuit Bench

The companion simulator for Quantum Computing from Scratch. Build the circuit, commit a prediction, then run the shots.

Predict → Calculate → Test

Circuit

Click a gate, then click the wire

State

Check this against your paper
Show state after the last gate
positive amplitude (+) negative amplitude (−) probability

Your prediction

Which outcomes will appear?

Shots

Locked predictions unlock the runs
0% Each measured bit is reported wrongly this often. Turn it up to about 3% to reproduce the noisy Bell data in Challenge 9.2.

House conventions

Bit order
Top wire is q₀ and the first digit: |q₀q₁q₂q₃⟩. Other tools differ — run Ordering check from the preset list to see it.
Amplitudes
Real numbers only, as in the book. Every gate here keeps them real, so nothing needs complex arithmetic.
Measurement
All wires, in the 0/1 basis, at the end of the circuit.
Gate set
X, H, Z, CNOT, open-control CNOT, CZ, SWAP and Toffoli — exactly the gates the workbook teaches, and no others.