Part A · Lesson 4
Reading the workspace
The workspace puts one run of the simulator on one screen: a 3D stage of the machine, a time track, four program layers and an inspector, all following the same trace step. This lesson tells you which region answers which question, and how to move through a run quickly.
You have seen the workspace in lessons A1 to A3. Open it in its own
tab at /riscq-studio and follow along.
Its reference is docs/riscq-workspace.md.
1One screen, one step
Where on the screen is the answer to "what is happening now"?
A run is a list of frames. The workspace always shows one of them, the current step, and everything on screen is computed from the frames up to that step. Step 0 is the reset state before the first frame; the feed-forward run has 451 steps after it. Five regions show that step:
| Region | Where | The question it answers |
|---|---|---|
| Step card | Top left of the stage | What is executing: step, batch, time, frame, hardware instruction, source line, firmware word |
| Stage | Centre | Which parts act, which they target, how the cause got there, which windows are open |
| Time track | Under the stage | Where this step lies in the run, and which instructions overlap it |
| Dock | Bottom | The exact fields: the frame, its causes, the machine state, the trace |
| Program layers | Right column | Which line of each program produced this step |
The left rail lists the Parts of this run by kind, with counts. Hover a kind for what it is and which RISC-Q source it follows; click it to select its parts one after another. Under it, Highlights is the legend of the stage's colours and Selection holds the part you clicked, with buttons to jump to its previous or next frame. If you are lost, press Explain (key h) in the header and hover any region for a label.
2The four program layers
In this section: the right column, its colour highlights, and how it links back to the stage.
The program column stacks the layers of lesson A1 from top to bottom:
- Source. The program you wrote: OpenQASM, a ZAC program, a list of system calls, or C for the decoder.
- Intermediate. Only for trapped-ion runs: the TSIR program QCCD Studio compiled the OpenQASM to.
- Hardware instructions. The timed physical operations, with start and duration, grouped in segments. The header states the count and the batch length ("21 in 2 segments · one batch is 2 ns").
- Control firmware. The RV32I words of one core: address, machine word, disassembly and the instruction it was emitted for. The selector chooses the core; acting core follows the core of the current step.
Three highlights tie the layers together. Yellow marks the row of the current step in every layer. Blue marks hardware instructions whose pulse windows are open at the current batch, and their source lines. Hovering a row tints the related rows of the other layers violet and lights the channels and apparatus they act on. In the firmware listing a pale green band marks the words emitted for the current hardware instruction.
Clicking a source, intermediate or hardware row jumps to its first frame. Clicking a firmware word jumps to its next traced execution. With Follow ticked, every layer scrolls to keep its yellow row in view.
trace: "io"): loads and stores of the control block, the put window and the
host window. Arithmetic and branches run but leave no frame, so many firmware words have no step of their own. The
detailed debugger can record every instruction ("Trace every instruction").Go to step 333 of the feed-forward run. The firmware layer highlights the store that fires the first
x90 on qubit 0. What is its address? You may type it in hexadecimal, such as 0x8000….
sw x0, 0(x5) sits at 0x80000224 in core q0's RAM, which starts
at 0x80000000. The step card shows the same address on its firmware line.3The stage and its three views
The stage draws one 3D part for every core, posted link, inbox, channel, converter, the board hub, the host and the apparatus: qubits and resonators, trap sites and ions, or atoms and tweezers. Drag to orbit, scroll to zoom, Fit (key f) to frame it again. At each step:
- the acting part of the frame is lit, and its targets in a second colour;
- the causal path back to the core instruction, from
causalPath, is lit in a third; - channels with an open window, and the apparatus they drive, stay lit while the window is open;
- an ion or atom in transit and any fault have their own colours.
The exact colours are in the Highlights legend of the rail. The three view buttons in the header only choose which parts are drawn; every part keeps running in every view, and its instructions stay in the program column.
| View | What it draws |
|---|---|
| Chip | The apparatus in the centre, converters on a ring around it, channels on an outer ring, coax from each converter to its parts |
| Control system | Host, hub, cores, links, inboxes, channels and converters at their schematic floorplan positions |
| Whole machine | Every part |
When the acting part is not drawn in the current view, a badge Acting off view appears on the stage. Click it to switch to a view that shows the part. Positions outside the apparatus are schematic, and the rail's Display geometry note says so for each run.
You want to watch a posted write cross the link from core q0 to its channel. Which view draws the link?
- Chip only.
- Control system and Whole machine.
- None: links are not drawn.
- Chip and Control system.
4Moving through a run
In this section: the transport bar, the two kinds of playback, and the time track.
The transport bar under the time track steps one frame at a time with ‹ Step and Step › (arrow keys),
and returns to reset with ⏮ (Home). Three buttons skip ahead to the next step of a kind, using predicates
from stops in studio/riscq-model.js:
- Next instruction (n): the first frame of the next hardware instruction.
- Next pulse (p): the next frame in which a pulse or demodulation window opens, or digital lines update.
- Next fault: the next frame that reports a fault. It is disabled in a clean run.
Play (space) has two modes, chosen in the menu beside the counter. Real-time playback, the default Whole run in 30 s, advances the batch time continuously and draws moving things between steps, so an ion is drawn partway along its segment. Step playback (5 steps/s up to 500 steps/s) jumps from frame to frame at a fixed rate. On the transmon ring the difference is small. On the ion machine a 64 µs shuttle covers few trace steps, so step playback shows the ion jumping between sites while real-time playback shows it gliding.
The time track draws each hardware instruction as a bar over its windows, one lane per kind of operation. A gold line marks the current batch, red lines mark faults. Hover it to list the instructions open at that time; click it to go to the last step at or before that time.
Press ⏮ to return to the reset state, then Next pulse once. Which step number does the counter show?
x90 on qubit 0, opening at batch 320. Steps before it
are the cores programming their pulse tables and meeting at the first barrier.5The dock: inspector, state, trace
The dock under the stage has four tabs.
- Step, the inspector: the frame's title and a one-sentence explanation, its ID, part, targets, time in batches and nanoseconds, hardware instruction and firmware address; every field of the state committed by this frame; and its causes, with the chain back to the core instruction as clickable frame IDs.
- Machine state: every core's status (running, stalled and on which register, or stopped), its last
instruction, the windows open at this batch, and the hub's group words, open barriers and waiting messages. It is
rebuilt from the frames up to this step by
stateAtand from nothing else. - Trace: every frame with step, batch, time, operation, part, source and frame ID. Click a row to go there.
- Write a program: edit the OpenQASM or the system calls of the run and compile it again on the server.
In the Trace tab, find the first frame whose operation is result. What is its frame ID?
Go to step 355 and open the Machine state tab. How many windows are open at that batch?
x90 windows of h2 on q0.gate and h7 on q1.gate, both
opening at batch 320. The Hardware instructions layer marks both rows in blue.6Hover cards
Almost everything answers a hover. A part on the stage shows what it is, the RISC-Q source it follows, and live lines at this step: a core's status and last instruction, a channel's open window and start time, a converter's open windows, the hub's open barriers. A row in a program layer shows its links: a source line lists its hardware instructions; a hardware instruction shows its schedule, the batches its windows open and close, and how many frames carry it; a firmware word shows its address, machine word, region and how many times it executed. On the superconducting stage, the moving signal packets on the coax have cards too, with the window, the converter and the wire delay.
Hover hardware instruction h20, the conditioned x. Its card gives the batches its window
opens and closes. At which batch does it close?
x pulse, so it closes at
1,274. That is also the last batch of the run's work: segment 1 ends when this window closes.7The detailed debugger and headless use
The header link Detailed debugger opens the same run at /riscq. It trades the program column for a long page: a controller schematic with a step inspector, a Channel timeline of every pulse window, carrier update and digital update (late, misaligned or overlapping windows in red), the list of faults, the apparatus parts and the effects that reached them, the program with a firmware table per core, and the execution trace. Use it when you need every field at once.
Neither page computes anything that a script cannot. Save a run with
node riscq/cli.mjs --example superconducting-feedforward --outcome c=1 --out run.json and call the same
functions the pages call: stateAt, causalChain, nextIndex and
stops from studio/riscq-model.js, or focusAt and firmware from
studio/riscq-layers.js. A person at the workspace and an agent reading run.json see the
same step. The answer checks of this course do exactly that.
What to remember
- Every region shows the same step, rebuilt from the frames up to it.
- Yellow is the current step, blue the instructions with open windows, violet the rows linked to the one you hover.
- Views choose what is drawn, not what runs.
- Next instruction and Next pulse skip to the events you usually want; real-time playback shows motion between steps.
- The detailed debugger and
studio/riscq-model.jsread the same trace.