← Games

Circuit simplification

0 moves

Leaderboard

RankPlayerMoves

Rules

Reduce every wire to empty slots: this is the identity circuit. Read the circuit from left to right. Use as few moves as possible.

Select the gates, then choose a rule. Empty slots are included automatically; select them explicitly to introduce gates on empty wires. Drag or Shift-click for a rectangle; Enter applies the sole matching rule.

A yellow square (H) is a Hadamard gate, X flips a bit, and a green dot (Z) changes its phase. Linked green dots are a controlled Z; a red ⊕ endpoint turns the link into a controlled X (CNOT).

Click + to add a column on every wire. Right-click an empty slot to remove it; on touch screens, hold it. Tidy removes all unnecessary gaps. Space adjustments are free and can be undone.

Every rule works both ways. Introducing gates can help you simplify. Only rewrites count towards your score; moving gates through empty slots is free.

Keyboard: R to reset, Backspace or Ctrl/Cmd+Z to undo, Escape to clear the selection.

Input a json

GG

Advanced