Skip to main content
The circuit builder is this page

Build a circuit gate by gate,
and watch it run on the computer you have.

Build a circuit — or load an algorithm — and run it on a byte-exact classical simulator, right here. It runs entirely in this tab. Inspect the amplitudes and their interference, per-qubit entanglement, and measurement statistics; import and export OpenQASM so your circuits move in and out as a standard text format.

For circuits with any angles, many qubits or noise, run them on the job service, or write them in Quantum Studio.

The gates here are the ones whose amplitudes can be held exactly: H, X, Y, Z, S, T, and phase turns of a half, a quarter, an eighth… of a circle, each with as many controls as you like. That is why every machine gets the same bits from this page, and why each run can be sealed in a signed receipt.

For the record

The exact dense backend is byte-exact, and each run is sealed into a signed receipt; tensor-network runs are deterministic on one build. The gate set is the dyadic family (Clifford + T + phase P(k)) with arbitrary controls, in either of the standard's two capabilities: wai.quantum.circuit2, the default, whose phase table is correctly rounded, or the frozen wai.quantum.circuit. A circuit's hashes belong to the capability it is built in. The IDE's other backends are reference code in the open-standards repo, Apache-2.0.

Pick a gate, then click a qubit lane to place it. For CX/CZ, click the control lane, then the target.

Circuit

—
—
—

Provenance & backend

—

What identifies this run: its gate set, the method this page picks for it and why, the hashes of the circuit and of its final state, and whether its signed receipt checks. The receipt is signed with a key made for this browser and kept in it.

Tensor-network backend

—

The state held as a chain of small tensors, each link at most χ wide. While the qubits stay lightly entangled this is exact and far smaller than the full state; past that it approximates, and says how well.

Stabilizer backend

—

Circuits of only H, S and CX gates (Clifford circuits) can be sampled in time that grows with the square of the qubits. This says whether yours is one, then samples a 200-qubit example no full state could hold.

Observable backend

—

⟨Z₀⟩, qubit 0’s average reading on a scale of +1 for 0 and −1 for 1, worked out by carrying the observable backwards through the circuit instead of the state forwards; then a 40-qubit example.

Noise & decoherence

—

⟨Z₀⟩ again, on a device whose gates go wrong at random: as the error rate rises it drifts toward 0, where qubit 0’s reading is a coin toss.

Transpiler

—

The circuit rewritten for qubits in a line, where a two-qubit gate needs neighbours: the swaps that takes, and a proof that the result is the same circuit.

OpenQASM

Run on the service ↗

The circuit as text, in the standard format other tools read. Run it on the quantum service to add noise, observables, many shots or many more qubits.

Where to go from here