Circuit Builder
The default simulator tab: qubit wires on the vertical axis, gate columns on the horizontal axis. Drag gates from the left palette, edit control-flow blocks in place, and keep the diagram aligned with the Qubi source in the right panel.
Building on the grid
Drop single-qubit gates onto a wire. Multi-qubit gates (CX, SWAP, custom controlled gates) attach across the wires you pick in the drop target. Control-flow tiles (LOOP, REPEAT, MEASURE, if/elseif/else) span columns; click them to edit scope, conditions, or measured qubits.
Edits in the builder rewrite the main Qubi layer while preserving sweep assignments, #import lines, and variable names you already wrote on gate rows. See Parametric Sweeps for sync rules.
Toolbar controls
- Qubit count (
+/−): adjusts allocated wires up toMaxQubits. - Zoom: scales tile size; mirrors
#settings Zoom. - Step-by-step (footsteps): toggles the timeline scrubber. Step 0 is the initial state; each later step applies one column (or one loop-iteration slice). Turn on with
#settings StepByStep trueor the toolbar button. - Undo / redo: circuit edit history, separate from the code editor undo stack.
- Depth / gate count: quick sanity metrics for the visible diagram.
Parametric combo bar
When your file declares sweep variables (a = <1..3>, gate sweeps like H <0..2>, and so on), a combo bar appears under the toolbar:
- Global combo index and per-dimension value inputs
- Reorder arrows when sweep order matters
The diagram always reflects the active combo. Stepping combos here is faster than running the full sweep chart when you only need to spot-check a few points. For every combination at once, use the Parametric Sweep tab.
Step-by-step on this tab
Step mode is optional here (unlike Data Analysis, where the stepper is always available). When enabled, scrubbing updates the bottom visualization panel and grays out branches that never executed (empty LOOP counts, false if/else paths).
Loops whose body changes wire indices per iteration expand visually so each pass is visible. Invariant loops collapse to a compact “× N” display when every pass would look identical.
Palette and examples
The left sidebar lists built-in gates, session custom gates from Gate Creator, and control-flow tiles. Example circuits load a full program into the editor so you can inspect a working pattern quickly.
Custom gates you create in-session appear under the custom section until you reload. To reuse them across projects, copy the generated gate { } block into a library file and #import it.