Visualizing Quantum Circuits: State Vector Difference Highlighting and the Half-Matrix
Michael J. McGuffin, Jean-Marc Robert
TL;DR
This paper introduces two novel visualizations for small quantum circuits—state vector difference highlighting and a triangular half-matrix—implemented in MuqcsCraft, an open-source web tool for interactive circuit design and visualization. By displaying the full state vector layer-by-layer and providing pairwise qubit information, the approach addresses the limitations of traditional per-qubit reduced-state displays and clarifies gate-induced dynamics and entanglement structure. The visual primitives enable a visually universal representation for single-qubit gates (with controls) via core gate sequences, while the half-matrix exposes correlations and concurrences that are not evident from reduced states alone. The work offers practical tools for designing and understanding quantum circuits, with potential extensions to subsets, higher-level blocks, and reconfigurable qubit clustering to scale to larger systems.
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.
