Circuit Builder

Drag gates onto the wires. Each qubit's result updates at the end of its wire, and the full results sit on the right. Single-qubit circuits are free. Two or more qubits need Pro, and noise needs Pro+.

Initial state

Noise (open system)

The channel below acts after every step, on each qubit that step's gates touch. The whole register is simulated as one density matrix, so noise on one qubit also shows up in the correlations between qubits.

0.020
0.000
Kraus operators, ρ → Σ K ρ K†

Challenge: build the target state

Starting resets the circuit to the right number of qubits. Your circuit is checked by state fidelity against the real target, and a wrong answer tells you what is different.
How this builder works: conventions, limits and shortcuts

Reading the circuit

Time runs left to right. Each column is one step. Basis states are written |q0 q1 q2…⟩, with q0 on the left. Qiskit prints bitstrings the other way round (q0 on the right), and the exported code says so. Angles are in degrees here and are exported to code as radians.

Controls

A • or ◦ controls every gate in its column. On a normal wire it is a quantum control. After a measurement the wire turns into a double line holding a classical bit, and a control on it means "do this only if the bit is 1" (or 0 for ◦). That is how teleportation's corrections work.

What is simulated

The full density matrix of the register, step by step, kept separately for each possible measurement record. So measurement, classical control and reset are exact, and noise acts on the whole register, not one qubit at a time. Outcomes show exact probabilities and, if you pick a number of shots, random samples like a real run.

Why 6 qubits at most

A density matrix for n qubits holds 4ⁿ numbers: 4,096 for 6 qubits, and it doubles twice with every qubit you add. Six keeps every step instant in a browser and a phone. Real devices have far more qubits, but nobody can look at their full state like this. That is exactly why a simulator like this one is useful for learning.

Keyboard

H X Y Z S T M add that gate to the selected wire.
Click a placed gate to select it. ← → move it in time, ↑ ↓ move it to another wire, Delete removes it, Esc clears the selection.
Ctrl+Z undo, Ctrl+Y redo, Ctrl+C / Ctrl+V copy and paste the selected column.

Mouse and touch

Drag a tile onto a wire, or tap a tile to add it to the selected wire. Drag a placed gate to move it, or drag it off the circuit to delete it. Dropping onto a taken spot inserts a new step there.