🔧 Visual Circuit Builder

Build quantum circuits visually. Watch the output state evolve in real-time.

Placing Gates

  1. 1. Click a gate in the palette above (it gets a white ring)
  2. 2. A cyan dashed outline appears on the grid as you hover
  3. 3. Click an empty cell on the circuit wire to place the gate
  4. 4. Gate stays selected for rapid placement. Press Esc to deselect

Tips

  • Click a placed gate to remove it
  • Two-qubit gates (CNOT, CZ, SWAP): click control qubit first, then target qubit in the same column
  • Undo/Redo: Ctrl+Z / Ctrl+Y
  • Output State panel updates in real-time as you build
Qubits:

Gate Palette

Click to select, then click a cell. Or drag onto the grid.

Single Qubit

H
Hadamard
X
Pauli-X
Y
Pauli-Y
Z
Pauli-Z
S
S Gate
T
T Gate

Two Qubit

CX
CNOT
CZ
Controlled-Z
SW
SWAP
q0
|0⟩
q1
|0⟩
t0
t1
t2
t3
t4
t5
t6
t7

Output State

Place gates on the circuit to see the output state.

Circuit Challenges

Build circuits to match target quantum states and earn XP!

📘 Example Circuits

Load these well-known quantum circuits to learn how they work. Based on standard circuits from the IBM Qiskit Textbook.

Bell State (|00⟩+|11⟩)/√2

The most famous entangled state. Used in quantum teleportation and superdense coding. H on q0 creates superposition, then CNOT entangles q0 and q1.

2 qubits2 gates
Example Circuit — Basics of Quantum Information

GHZ State (3-Qubit Entanglement)

Extends Bell state to 3 qubits: (|000⟩+|111⟩)/√2. Key for quantum error correction and multi-party entanglement demonstrations.

3 qubits3 gates
Example Circuit — Entangled States

Quantum Superposition (Uniform)

Apply Hadamard to each qubit to create an equal superposition of all computational basis states: (|00⟩+|01⟩+|10⟩+|11⟩)/2.

2 qubits2 gates
Example Circuit — Single Qubit Gates

Quantum NOT (Bit Flip)

The X gate is the quantum equivalent of a classical NOT gate. It flips |0⟩ to |1⟩ and vice versa. The simplest single-qubit operation.

1 qubit1 gate
Example Circuit — Pauli-X Gate

Phase Kickback Circuit

Demonstrates phase kickback: H on q0, X on q1 to prepare |1⟩, then CNOT. The phase from the target qubit 'kicks back' to the control qubit.

2 qubits4 gates
Example Circuit — Phase Kickback

Quantum Swap (using 3 CNOTs)

Swaps the states of two qubits using three CNOT gates. This decomposition is how SWAP is implemented on real quantum hardware with only nearest-neighbor gates.

2 qubits4 gates
Example Circuit — Multiple Qubits and Entanglement