MuqcsCraft
Highlights gate-specific amplitude changes between circuit layers and displays pairwise qubit correlations and entanglement in a triangular matrix.
Visualization labels
03 / VisualizationA closer look
2 figuresVisualizing Quantum Circuits: State Vector Difference Highlighting and the Half-Matrix
Abstract
Existing graphical user interfaces for circuit simulators often show small visual summaries of the reduced state of each qubit, showing the probability, phase, purity, and/or Bloch sphere coordinates associated with each qubit. These necessarily provide an incomplete picture of the quantum state of the qubits, and can sometimes be confusing for students or newcomers to quantum computing. We contribute two novel visual approaches to provide more complete information about small circuits. First, to complement information about each qubit, we show the complete state vector, and illustrate the way that amplitudes change from layer-to-layer under the effect of different gates, by using a small set of colors, arrows, and symbols. We call this “state vector difference highlighting”, and show how it elucidates the effect of Hadamard, X, Y, Z, S, T, Phase, and SWAP gates, where each gate may have an arbitrary combination of control and anticontrol qubits. Second, we display pairwise information about qubits (such as concurrence and correlation) in a triangular “half-matrix” visualization. Our open source software implementation, called MuqcsCraft, is available as a live online demonstration that runs in a web browser without installing any additional software, allowing a user to define a circuit through drag-and-drop actions, and then simulate and visualize it.
Survey summary
From the survey collectionVisualizing Quantum Circuits: State Vector Difference Highlighting and the Half-Matrix
Background and motivation
McGuffin and Robert address the established problem of understanding how quantum gates change a circuit's state. A circuit diagram specifies operations but does not directly explain how complex amplitudes move, rotate, interfere, or encode relationships between qubits. Common graphical simulators supplement the diagram with single-qubit reduced states, showing quantities such as measurement probability, phase, purity, and Bloch-sphere coordinates. These displays reveal useful local information, but a fixed amount of information per qubit provides only values, while an arbitrary pure state of qubits requires complex amplitudes. The paper therefore targets small circuits used to develop intuition and support circuit construction.
The motivation is more specific than a general lack of quantum visualizations. Figures 1, 3, and 4 compare screenshots from IBM Quantum Composer and Quirk to show how reduced-state feedback can be difficult to interpret: a controlled rotation can produce a local phase change different from the gate parameter, phase kickback can affect a control qubit, and a local unitary leaves a maximally mixed reduced state unchanged. Likewise, identical single-qubit mixedness does not identify which pairs are correlated or entangled. These examples motivate two complementary views: an annotated full state vector for explaining gate effects, and a triangular matrix of pairwise statistics for examining qubit relationships.
The paper places its approach among existing circuit and state visualizations. Quirk already displays wrapped state vectors, QuFlow traces relationships between amplitudes across layers, and QuantumEyes shows the evolution of basis-state probabilities. Rainbow Boxes represents entanglement by merging adjacent qubit rectangles, while extensions of the Bloch sphere offer geometric representations with their own complexity and scaling constraints. Consequently, the contribution is not the first display of a state vector or the invention of triangular matrices. It is a gate-specific annotation scheme combined with a pairwise view and coordinated interactions in the MuqcsCraft simulator. The comparisons describe the software versions examined in the paper and do not establish current capabilities of those tools.
Interface and state-vector encoding
Figure 2 presents the implemented interface. The circuit diagram is above a sequence of state-vector displays, and gray connectors associate each display with a circuit position. The toolbar supports dragging gates, controls, and anticontrols onto the circuit. Single-qubit output statistics appear beside the wires, followed by the half-matrix. The figure is a software screenshot illustrating the design, rather than an experimental result about user performance.
Each state-vector cell represents one computational basis state and its complex amplitude. A horizontal blue bar encodes probability, amplitude magnitude, or a scaled linear function of log probability, depending on the selected display option. The last option makes differences among small probabilities easier to see. The numeric labels in the paper's screenshots give probabilities, not amplitude magnitudes. A disc with an oriented tick indicates phase, reflecting its periodicity, and zero amplitudes have no disc. The authors justify length for quantitative comparisons and orientation for phase using established visualization principles.
The layout can wrap a vector into rows and columns, such as the arrangement for four qubits in Figure 2. A compact option places bars behind the phase discs. Figures 5 and 6 demonstrate these layout and scaling choices. Bitstring labels provide the mapping back to basis states; the leftmost bit corresponds to the bottom circuit wire. Hovering a wire highlights the corresponding bit positions, hovering a state vector highlights its circuit position, and hovering a reduced-state display additionally highlights its qubit. Tooltips give precise values and use curved callout arrows to connect explanations with visual marks. Users can toggle the state vectors or reduced states for all layers, vary gate parameters by dragging, and receive updated visual feedback.
Difference highlighting and gate operations
Difference highlighting annotates the transformation between consecutive state vectors rather than simply marking changed numeric values. For a gate acting on wire , the amplitudes are divided into an even subset with and an odd subset with . Here “even” and “odd” refer to that selected bit, not necessarily the parity of the entire basis-state index. The recurring encodings are purple and green subsets, curved rotation arrows, double-headed exchange arrows, and addition and subtraction symbols. Controls and anticontrols restrict the affected amplitudes to bitstrings satisfying the required conditions, so the same visual vocabulary applies to controlled variants.
For , the odd amplitudes are highlighted in green and rotate by . The same pattern supports , , their inverses, , and phase gates by changing the displayed rotation angle. A GlobalPhase gate rotates the whole vector unless controls restrict its action. Figures 7–9 show that changing the target wire changes the highlighted pattern, while adding controls narrows it. For , even and odd amplitude blocks are colored purple and green and connected by exchange arrows. For , the interface combines a rotation of the even subset, a rotation of the odd subset, and an exchange. Figures 10–12 demonstrate these operations and their controlled forms.
Hadamard gates require amplitude addition and subtraction. For a matching even–odd pair , the transformation is
The display uses and to indicate these combinations, with the factor left implicit. Figures 13 and 14 show how successive Hadamards spread a nonzero amplitude and later cancel amplitudes. This explanation must operate on complex amplitudes: probabilities alone do not determine interference. For SWAP gates, double-headed arrows link the basis-state amplitudes whose target bits exchange. Figure 15 shows that these links can be vertical or diagonal depending on the wrapped layout and the swapped wires.
The authors define “visual universality” as representing every object in a specified set using a set of visual primitives. Their argument is that gates outside the directly supported core can be decomposed into sequences of core gates; known decompositions of general unitary operations then extend the representational coverage. This establishes coverage through decomposition, not equally concise or equally understandable displays for every gate. MuqcsCraft implements an “Expand Circuit” command for the listed non-core gate families.
To reduce expansion depth, the authors introduce generalized , , and gates with independently adjustable phase angles for the even and odd subsets. rotates the two subsets by and , adds an exchange, and applies a Hadamard after those rotations. Figure 16 reuses the existing arrow and arithmetic marks to depict them. For example, the paper's expansion of decreases from eight core-gate layers to four when generalized gates are available. These gates simplify some visual explanations but still require users to interpret sequences of operations.
The half-matrix and pairwise relationships
The half-matrix allocates one cell to every unordered pair of qubits, requiring cells. It shows the linear and von Neumann entropies of each two-qubit reduced state, together with computational-basis correlation and concurrence. Entropy marks describe mixedness of the pair; correlation and concurrence describe different aspects of the relationship within it. Correlation depends on the measurement basis and is not, by itself, an entanglement measure.
Figure 17 makes that distinction concrete. The top pair has correlation , the bottom pair has correlation , and both have concurrence approximately . The middle pair has correlation approximately but concurrence zero. Thus, the magnitude of correlation does not rank these pairs by entanglement. Hovering a matrix cell highlights its two circuit wires and opens a tooltip, making it possible to identify the pair and read its statistics.
The default cells use bars, with dark gray for mixedness metrics and blue or red for positive or negative relationship metrics. An alternative maps the two mixedness values to the dimensions of a gray rectangle and the two relationship values to the dimensions of another rectangle with colored sides. Figure 17 shows both variants. The authors suggest that experienced users could locate interesting pairs from glyph size and color, but do not test that suggestion. The matrix summarizes pairwise quantities; it should not be read as a complete representation of multipartite entanglement.
Implementation, examples, and evidence
MuqcsCraft is an open-source browser application built on the Muqcs state-vector simulator. It updates the state layer by layer and computes single-qubit and two-qubit reduced density matrices by partial trace. Those matrices supply the local statistics and half-matrix metrics. Circuits are encoded in the application's URL for bookmarking and sharing, browser navigation supports undo, and export features connect to Quirk and IBM Quantum Composer.
The paper demonstrates the design through worked circuits and screenshots. Figure 18 constructs a four-qubit W state and compares local reduced-state displays with annotations showing how gates reposition and rotate amplitudes. The authors connect this example to their own trial-and-error experience designing a W-state circuit. Figure 19 presents one iteration of Grover's algorithm, showing the initial distribution of probability, the oracle's phase change, and subsequent amplification of the marked basis state. These examples illustrate what the encodings expose and how they might guide gate placement or error correction.
There is no controlled user study, measured learning assessment, or comparative task-performance evaluation. Claims that the views make circuit design easier are supported by explanatory examples and the authors' experience, rather than evidence of improved accuracy or speed among users. The paper also reports simulation below 10 ms per gate for circuits of at most sixteen qubits on a 2022 laptop, but does not provide a systematic performance study with detailed workloads or variability. Sixteen-qubit simulator support is separate from the much smaller practical scope of the full visual display.
Contributions, limitations, and future work
The main contributions are the operation-oriented annotations for state-vector evolution, their decomposition-based coverage argument and generalized gates, and an interactive pairwise matrix integrated into a working circuit editor. Together they connect a gate's mathematical action with visible changes in amplitudes and expose relationships that single-qubit reduced states cannot specify.
The authors explicitly limit difference highlighting to roughly eight qubits, or 256 amplitudes, and require each gate to occupy its own layer. Expanding unsupported gates increases circuit depth and can make their cumulative action harder to understand. Wrapping saves vertical space but does not remove exponential growth in the number of amplitudes. The half-matrix grows quadratically and summarizes only pairs. The paper does not establish how easily newcomers learn the visual vocabulary or whether the benefits outweigh the additional display complexity.
Proposed extensions include applying difference highlighting to selected qubit subsets, depicting the aggregate effect of multi-qubit gates or higher-level blocks, and changing the basis used to display the state vector. The authors identify repeated Grover diffusion as one motivating example for aggregate explanations. For the half-matrix, they propose reordering wires to cluster interesting qubits and displaying selected pairs to reduce space. These are future directions rather than implemented or evaluated features in the reported work.
Cite this work
@article{mcguffin_visualizing_2025,
author = {McGuffin, Michael and Robert, Jean-Marc},
title = {Visualizing Quantum Circuits: State Vector Difference Highlighting and the Half-Matrix},
year = {2026},
issue_date = {September 2026},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
volume = {7},
number = {3},
url = {https://doi.org/10.1145/3786463},
doi = {10.1145/3786463},
journal = {ACM Transactions on Quantum Computing},
month = jul,
articleno = {17},
numpages = {20},
keywords = {Quantum circuit, quantum algorithm, graphical user interface, GUI, state vector simulation, entanglement}
}