Simulator Overview
The Quantum Circuit Simulator is where Qubi lives. Syntax pages explain the language; these pages explain the workspace: tabs, side panels, and how the builder stays in sync with your code.
Window layout
- Left sidebar: gate palette (built-in gates, custom gates, control-flow tiles) and quick-load example circuits.
- Center: main tabs (Circuit Builder, Data Analysis, Spreadsheet, Slides, Videos, Gate Creator, Parametric Sweep, NMR Analysis, Storage) and, below them, the collapsible visualization strip.
- Right sidebar: Qubi Code Editor with file tabs, layer tabs (prepended / main / appended), toolbar actions, and the compilation log.
- Header bar: Settings, Clear Circuit, Export, and Run Circuit.
Drag the vertical handles between panels to resize. Layout choices usually persist for the session.
Main tabs
Each center tab has its own doc page with full detail:
- Circuit Builder (default grid, combo bar, step-by-step)
- Data Analysis (density matrix, probabilities, Bloch, always-on stepper)
- Spreadsheet (grid, From Circuit import, charts)
- Slides (walkthrough deck from the live circuit)
- Videos (timeline editor, From Circuit clips, .qvid files)
- Gate Creator (visual authoring for custom
gate { }blocks) - Parametric Sweep (full Cartesian sweep runs and charts)
- NMR Analysis (spin samples, pulse sequences, spectra, gyromagnetic tables)
- Storage (project files, .qubi / .qsp / .qsl / .qvid, trash)
- Snapshot & Export (high-resolution PNG, SVG, and PDF exports)
- 3D Preview & 3MF (interactive Three.js 3D viewport and 3D print models)
Panels outside the center tabs
- Visualization Panel (probabilities, state vector, bar/pie, Bloch under the tab row)
- Qubi Code Editor (multi-file tabs, layers, validation, compilation log)
Run, export, settings
Run Circuit runs the full state-vector simulation and refreshes every visualization. The button stays disabled while the editor reports validation errors.
Export can save PNG, SVG, PDF, and 3MF snapshots of the circuit depending on the dialog (Snapshot & Export, 3D Preview & 3MF). Use Export → As another language… for Qiskit or OpenQASM (Language Conversion).
Settings mirrors every #settings key: qubit limits, scheduling, angle units, sweep optimization, step mode, display toggles, and editor layer text areas. See #settings.
Evaluated labels and control-flow visuals
With ShowEvaluatedLabels (default on), LOOP tiles and some registers show resolved numbers after expression evaluation. Handy when you wrote visiblemax-1 and want to confirm it became 2.
LOOP, MEASURE, and if blocks render as column-spanning regions. MEASURE shows M on measured wires and · on skipped visible rows. Inactive or never-taken branches gray out in step mode.