What is this?
A simulated quantum computer that lives in your browser. You build a
circuit (a sequence of quantum gates on wires called qubits), then the engine
computes the exact quantum state and can “measure” it many times.
First 60 seconds
-
In the left panel, click a Demo circuit such as
Bell pair.
-
Look at the Circuit panel: horizontal lines are qubits; boxes are gates.
-
Look at Statevector: you should see ~50% on
|00⟩ and
~50% on |11⟩ for a Bell pair.
-
Click Sample — the histogram wiggles a little (random measurement noise).
-
Click Clear, then try building: select H, click wire
q0, select CX, click q0 then
q1.
Changing the Qubits dropdown only resizes the register (more wires).
It does not run a new algorithm by itself. Use demos or place gates, then
Run.
What are the Gate buttons for?
They are a toolbox, not “run this now” buttons. Clicking a gate
selects it (highlighted). Then you place it by clicking a qubit wire
on the circuit.
| Gate |
What it does |
H |
Hadamard — creates superposition (|0⟩ ↔ equal |0⟩ and |1⟩) |
X / Y / Z |
Pauli gates — bit flip (X), phase flips (Z), both (Y) |
S / T |
Phase gates (S = 90°, T = 45° phase on |1⟩) |
Rx / Ry / Rz |
Rotations — use the angle slider, then place on a wire |
CX |
CNOT — flip target if control is |1⟩ (creates entanglement with H) |
CZ / SWAP / CCX |
Controlled-Z, swap two qubits, Toffoli (two controls) |
M |
Measure one qubit (collapses it to 0 or 1 randomly) |
‖ |
Barrier — visual separator only (does not change the state) |
Multi-qubit placement
- CX / CZ: click control qubit, then target qubit.
- SWAP: click first qubit, then second.
- CCX (Toffoli): click control₁, control₂, then target.
Click the small × on a gate in the circuit to delete it. Use Undo for the last gate.
Qubits dropdown
Sets how many wires the computer has (1–8). More qubits → larger state
(2n amplitudes). Extra unused qubits stay in |0⟩ and do not change the
interesting part of the circuit.
Run
Computes the exact quantum state after all gates, from |00…0⟩.
Updates the statevector, ideal histogram, Bloch sphere, and QASM text.
If nothing seems to change when you click Run, the circuit did not change — the answer
is the same. Try Clear, place an H on q0, then Run.
Or click Sample to see random variation.
Sample
Simulates a real experiment: for each of N shots, run the circuit and
measure all qubits. Counts fluctuate around the ideal probabilities.
- Bell pair → roughly half |00⟩, half |11⟩ (not exactly 256/256 every time).
- Grover |11⟩ → almost always |11⟩ (ideal is 100%).
- Increase Shots for smoother histograms.
Export QASM downloads the circuit in OpenQASM 2.0 format (usable in
other quantum toolchains).
Why do q0, q1, q2… look the same?
Often they really are the same — that is correct physics, not a bug.
-
Empty circuit / all |0⟩: every qubit points straight up (+Z). Switching
q0→q4 looks identical.
-
Bell or GHZ (entangled): each single qubit is
maximally mixed. The Bloch vector shrinks to the center (|r| ≈ 0). Every
entangled qubit looks like a tiny/zero arrow at the origin.
-
To see different arrows: load the Bloch tour demo,
or put
H only on q0, X only on q1, leave q2 idle — then
switch the Bloch dropdown.
The sphere shows one qubit’s reduced state. Entanglement with others makes that
qubit look classical/mixed even though the full system is pure.
Drag on the sphere to rotate the camera. Coordinates x, y, z are shown below the canvas.
Statevector panel
Lists every basis state with non-zero amplitude, e.g.
|01⟩ 0.707 50%. Labels use little-endian order:
rightmost bit is q0. So |01⟩ means q1=0, q0=1.
Entropy H
Shannon entropy of the measurement probabilities (in bits). 0 = definite outcome;
1 bit for a fair coin (like one Hadamard); higher for more spread-out distributions.
Histogram
Bars show how often each bitstring would (ideal) or did (sample) appear.
Bitstring order matches the statevector labels.
FAQ
Q: I clicked Run and nothing happened.
A: Run always recomputes the same answer for the same circuit. Watch for the green toast
“Exact simulation complete” and a brief highlight on the results panels. Change a gate
or use Sample to see a difference.
Q: Gate buttons do nothing.
A: They only select a tool. After selecting, click a horizontal wire in the Circuit panel.
Q: Sample looks the same as ideal.
A: With many shots, noise is small. Try 64 shots, or a Bell pair where 50/50 fluctuates.
The histogram title switches to “Sampled (random shots)”.
Q: Is this a real quantum computer?
A: No — it is an exact mathematical simulation on your CPU. Real hardware has noise and
limited connectivity; Sample approximates the randomness of measurement only.
Q: Why only up to 8 qubits?
A: State size is 2ⁿ complex numbers. 8 qubits = 256 amplitudes (fine); 20+ needs heavy
resources.