What quantum states represent
When a quantum circuit finishes executing, the qubits exist in a superposition described by a state vector. Each component of that vector corresponds to a classical bit string (a basis state) and carries a complex-valued amplitude. The probability of measuring that basis state is the squared magnitude of its amplitude. The playground surfaces three values per basis state:- Basis string — the classical bit pattern in ket notation
- Probability — the likelihood of measuring that basis state
- Amplitude — the complex number whose squared magnitude equals the probability
State cards
Each state in the results panel is rendered as a card with the following layout.Basis (ket notation)
The top of each card shows the basis state in ket notation. For example, a two-qubit state with bits0 and 1 is displayed as |01⟩.
Bit strings are displayed in declaration order — the order in which qubits are declared in your OpenQASM program. The first declared qubit occupies the most significant bit position (leftmost character) in the string.
If your circuit uses multiple qubit registers, each register produces its own ket label and they are concatenated: for example, |01⟩|10⟩.
Probability
The probability is shown as a six-decimal-place value, for example0.500000. Below it, a horizontal bar visualizes the probability relative to 1.0. The bar is always at least 6 px wide so that low-probability states remain visible.
Amplitude
The complex amplitude is shown in rectangular form:For a state with probability
p, the amplitude a + bi satisfies a² + b² = p. A pure basis state (probability 1.0) has amplitude 1.000000 + 0.000000i. An equal superposition of two states each has amplitude approximately 0.707107 + 0.000000i.Sort modes
The Sort button in the results toolbar cycles through two ordering modes:
Sort mode applies to both the side-panel cards and the full-screen results table. Clicking Sort again returns to index order.
Full-screen results table
Clicking the Quantum States heading in the results panel opens a full-screen dialog with a tabular layout. This is useful when a circuit produces many states and the card layout becomes hard to read. The table has four columns:
The Basis column is sticky — it remains pinned to the left edge as you scroll the table horizontally, which is helpful for circuits with long bit strings.
To close the dialog, click the Close button in the dialog header, or click anywhere on the backdrop behind the dialog.
The Quantum States heading is only clickable when results are loaded and there is no active error. When no results are available, the heading is non-interactive.
Copying results as JSON
The Copy button in the results toolbar serializes all current results to JSON and writes them to your clipboard. The JSON follows this structure:binaryString is an array of strings — one per qubit register — giving the bit pattern for that register. int is the integer value of each bit string. amplitude.real and amplitude.imag are both optional fields; if a component is zero, it may be omitted from the response.