🔧 Visual Circuit Builder
Build quantum circuits visually. Watch the output state evolve in real-time.
Placing Gates
- 1. Click a gate in the palette above (it gets a white ring)
- 2. A cyan dashed outline appears on the grid as you hover
- 3. Click an empty cell on the circuit wire to place the gate
- 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
Gate Palette
Click to select, then click a cell. Or drag onto the grid.
Single Qubit
Two Qubit
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.
GHZ State (3-Qubit Entanglement)
Extends Bell state to 3 qubits: (|000⟩+|111⟩)/√2. Key for quantum error correction and multi-party entanglement demonstrations.
Quantum Superposition (Uniform)
Apply Hadamard to each qubit to create an equal superposition of all computational basis states: (|00⟩+|01⟩+|10⟩+|11⟩)/2.
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.
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.
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.