About ketch

ketch is a quantum circuit explorer. Build a circuit in your browser and step through it gate by gate to see exactly what each gate does to the state. There’s nothing to install, and you don’t need an account.

Why ketch? A ket, written |ψ⟩, is how physicists write a quantum state. The logo writes the name as one, ending in a “step forward” triangle. (A ketch is also a two-masted sailing boat.)

q0 |0⟩ q1 |0⟩ H
The Bell state, the first circuit in the library. It ends in (|00⟩ + |11⟩)/√2 before the measurements.

What it does

Get started in five minutes

  1. Step through a circuit. Open ketch and choose Bell state from the Circuit menu. Press Next, or use the ← → keys, to apply one column of gates at a time.
  2. Read the state. After step 2 the step viewer shows (|00⟩ + |11⟩)/√2 and marks both qubits as entangled. Click a ket in the input line to see which output kets it feeds into.
  3. Look inside a gate. Click any gate in the circuit to see its matrix.
  4. Change the circuit. Drag a gate from the palette onto a wire. Editing a library circuit makes your own copy under My circuits, so the original stays as it was. To delete a gate, drag it off the circuit, or select it and press Backspace.
  5. Run it. Measure 1024 times samples the state you’re looking at. Run 1024 shots, in the Qiskit panel, runs the whole circuit and shows the counts Qiskit would report.

Then try the other circuits in the library. Quantum teleportation shows measurement and classical corrections step by step, and Grover search and Phase estimation of T show two well-known algorithms at a small size.

Keeping your work

Your circuits are backed up in your browser as you work, so a reload won’t lose them. To keep them elsewhere, sign in to Google Drive and use Save as… to save all your circuits as a named suite. ketch can only see the files it creates, not the rest of your Drive.

On a phone

Swipe the row of gates sideways to see more of them, and drag a gate downwards to pick it up. Prev and Next stay at the bottom of the screen.

Open ketch