The playground’s code editor occupies the left panel and is where you write all your OpenQASM programs. It behaves like a minimal text editor tuned for quantum circuit code — with line numbers, monospace fonts, keyboard shortcuts, and an examples menu to get you started quickly.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/itsubaki/qasm-playground/llms.txt
Use this file to discover all available pages before exploring further.
Editor layout
The editor fills the full height of the left panel. On the left side of the editor area, a gutter displays line numbers so you can orient yourself in longer programs. The main editing surface sits to the right of the gutter and scrolls independently in both axes. When the editor is taller than the content, the line numbers stay synchronized as you scroll vertically. The editor renders all text in a monospace font stack — Monaco, Menlo, Ubuntu Mono, Consolas, and Courier New — in that priority order, depending on which is available in your operating system. Font size is set to 0.83 rem with a 1.4 line height, matching what most code editors use for comfortable reading.Keyboard shortcuts
| Key | Action |
|---|---|
| Tab | Insert four spaces at the cursor position |
| Escape | Remove focus from the editor (blur) |
The Tab key inserts a literal four-space indent rather than a tab character. This matches the convention used in most OpenQASM examples and keeps indentation consistent when you copy code between environments.
Loading examples
The Examples dropdown in the editor toolbar lets you load any of the built-in circuit programs directly into the editor. Selecting an example immediately replaces the current editor content with that program’s code.Open the Examples menu
Click the Examples dropdown in the top-right area of the editor toolbar. The menu lists all available built-in programs, including Bell state, quantum teleportation, Deutsch-Jozsa, and others.
Select an example
Click any example name. The editor content is replaced with the selected program’s OpenQASM code.
The Examples menu is hidden while a shared URL is displayed in the toolbar. If you have just shared your code and want to load a new example, reload the page to reset the toolbar.