All publications & toolsQuantum Image Visualizer
Research2025arXiv

Quantum Image Visualizer

Traces quantum images through circuit gates using image summaries, difference views, and selected-pixel probability distributions to inspect processing behavior.

1 publication

Visualization labels

03 / Visualization

Visual representations

Combined representations

01Publication · 2025

Quantum Image Visualizer: Visual Debugging of Quantum Image Processing Circuits

Anja Heim, Thomas Lang, Alexander Gall, Eduard Gröller, Christoph Heinzl

Quantum computing is an emerging field that utilizes the unique principles of quantum mechanics to offer significant advantages in algorithm execution over classical approaches. This potential is particularly promising in the domain of quantum image processing, which aims to manipulate all pixels simultaneously. However, the process of designing and verifying these algorithms remains a complex and error-prone task. To address this challenge, new methods are needed to support effective debugging of quantum circuits. The Quantum Image Visualizer is an interactive visual analysis tool that allows for the examination of quantum images and their transformation throughout quantum circuits. The framework incorporates two overview visualizations that trace image evolution across a sequence of gates based on the most probable outcomes. Interactive exploration allows users to focus on relevant gates, and select pixels of interest. Upon selection, detailed visualizations enable in-depth inspection of individual pixels and their probability distributions, revealing how specific gates influence the likelihood of pixel color values and the magnitude of these changes. An evaluation of Quantum Image Visualizer was conducted through in-depth interviews with eight domain experts. The findings demonstrate the effectiveness and practical value of our approach in supporting visual debugging of quantum image processing circuits.

From the survey collection

Quantum Image Visualizer: Visual Debugging of Quantum Image Processing Circuits

Background and problem

Quantum Image Visualizer is an implemented visual debugging framework for quantum image processing circuits that use the Novel Enhanced Quantum Representation, or NEQR, to encode two-dimensional grayscale images. The motivating application is X-ray computed tomography, where researchers investigate quantum representations and operations for large image datasets. The paper treats the possible computational advantages of quantum image processing as a motivation for research; its own contribution is a tool for understanding and debugging simulated circuits, rather than a demonstration of quantum speedup or processing of large tomography volumes.

Debugging quantum image processing is an existing development problem with specific visual requirements. A composite gate can carry a plausible name while containing an incorrect sequence of elementary gates, and mistakes in gate selection, ordering, or framework conventions can change many pixels simultaneously. The participating researchers previously relied mainly on manual calculations, circuit inspection, Bloch spheres, and Qiskit histograms. Single-qubit views cannot show an encoded image, while a histogram of basis-state probabilities does not directly connect an operation to its effects on image positions and grayscale values. The paper also distinguishes its needs from general circuit visualization tools such as QuantumEyes: following selected quantum states provides insufficient image context when many states change together. Its visual approach draws on image comparison through juxtaposition and explicit difference encodings, and on hybrid bar-and-line representations for comparing distributions.

NEQR data and design process

For a grayscale image of size 2n×2n2^n \times 2^n with 2b2^b possible intensities, NEQR uses 2n2n position qubits and bb color qubits. For each gate, the simulator supplies a statevector with 22n+b2^{2n+b} amplitudes, which the framework decomposes into pixel positions, grayscale values, and their probabilities. The running example is a 2×22 \times 2 image with eight-bit color, so each statevector contains 1,024 entries. Figure 1 introduces the four grayscale pixels and their associated color distributions; it explains the representation rather than reporting an evaluation result. Although an ideally prepared NEQR image associates a single intended color with each position, intermediate or faulty states can assign probability to several colors at the same position. Consequently, a single grayscale image is only a summary of the quantum state and must be accompanied by distribution views. The paper also observes that the joint probability of an intended position-color outcome is 1/m1/m for an ideally prepared image with mm pixels; this should not be confused with the probability of that color conditional on a particular position.

The design study lasted ten months and involved eight experts working mainly on quantum image processing for tomography. An initial month of group meetings established requirements, followed by more than nine months of iterative design with expert E1, a computer scientist and coauthor. The other seven experts participated in the final evaluation. The resulting requirements were to render NEQR states as recognizable images, expose gate effects across an image, support detailed inspection of individual pixels, and accommodate increasing image and circuit complexity. The implementation described in the paper uses Python 3.12, PySide6, and D3.js to visualize circuits created with Qiskit 1.2. These versions describe the reported prototype.

Image overview and gate effects

A familiar circuit diagram provides the gate and qubit context, while the Image View places grayscale images before and after each gate alongside its label. Each square represents a pixel and displays its most probable intensity; tied probabilities are resolved by choosing the smallest, darkest intensity. Figure 2 shows a prepared image, its color inversion, and a faulty pixel-setting operation that makes every displayed pixel black. The black output alone does not mean that every pixel has become a definite black value: in this example, all colors have equal probability and the display's tie-breaking rule selects black.

The Modality View addresses this ambiguity by coloring the same pixel grid according to distribution shape. The implementation counts local maxima, assigns purple to unimodal distributions and red to uniform distributions, and uses a blue-to-orange gradient for increasing numbers of peaks. In Figure 2, the correctly prepared and inverted images have purple modality grids, whereas the faulty operation produces a red grid. The intended debugging criterion depends on the algorithm stage: multimodal intermediate states can be legitimate, while the image-preparation and output scenarios considered in the paper expect a single intended color per pixel. The modality encoding is therefore an indicator to investigate, rather than an automatic correctness proof.

The Variation View places another colored pixel grid between the before and after images to show the direction and magnitude of distribution shifts. It applies the existing departure index, reported on the interval [−2,2][-2,2], using nine discrete colors from a Spectral palette. Warm colors indicate movement toward brighter intensities, cool colors indicate movement toward darker intensities, and yellow represents no detected shift. Figure 3 shows that image inversion brightens initially dark pixels and darkens initially bright pixels, while the erroneous final gate changes their distributions in a different pattern. Users can filter the display to positive or negative shifts by scrolling over the legend, with excluded pixels shown in black. This view makes small changes and unintended spatial effects easier to locate than comparing grayscale images alone.

Users can hide gates to reduce the displayed sequence and hover over image pixels to read exact intensity and probability values. Clicking a before or after image opens an enlarged selection view with brushing and multiple-pixel selection. Selected pixels acquire pink outlines and populate the detailed Pixel View. The tool provides vertical and horizontal layouts: the vertical layout places gate steps in rows and the image and pixel views side by side, whereas the horizontal layout follows the left-to-right circuit direction and places pixel details below the image sequence.

Pixel distributions and normalized differences

The Color Probability View organizes selected pixels as columns and executed gates as rows in the vertical layout. Each cell contains a distribution aggregated into eight grayscale bins, with probability encoded by colored background bars and a superimposed line. The color encoding helps retain visible evidence of low peaks that would be difficult to compare using height alone. Figure 4 follows four pixels through the running example and shows the shift from concentrated probabilities to a uniform distribution after the faulty gate. Tooltips reveal a bin's color interval and probability. Eight bins were chosen through subjective testing with E1 for the distributions in the use cases, rather than through an established optimal binning procedure.

Two additional views explicitly compare consecutive distributions while retaining a smaller grayscale bar-and-line chart for context. Before comparison, each histogram's bin probabilities are divided by that histogram's maximum probability, and corresponding normalized bins are subtracted. The Absolute Difference View displays the magnitude of these differences; the Difference View retains their signs. Thus, these encodings concern changes in normalized histogram values, not raw probability-point differences. The signed view shown in Figure 5 uses upward warm-colored bars for increases and downward cool-colored bars for decreases, with a seven-step diverging palette. The absolute view offers larger marks for scanning change magnitude, while the signed view conveys the direction of change at the cost of smaller bars. Users switch among the pixel views by scrolling over a legend and inspect precise values through tooltips.

Case study and observed debugging behavior

The case study involved E1, who already knew the interface but was not told the specific bugs embedded by another author. The paper describes five planned scenarios covering correct and incorrect image preparation, correct and incorrect color inversion, and thresholding; its detailed account in Section 6.1 focuses on the two preparation scenarios. Both prepared 8×88 \times 8 images with 256 grayscale values using 14 qubits and 65 gates, comprising an initial Hadamard operation and sequential pixel setters. In the correct preparation example, E1 used the image and modality views to confirm row-by-row construction, hid unrelated gates, and inspected distribution shifts for one image column.

Figure 6 reproduces the paper's interface examples. Panel A1 shows selected pixel setters; panel A2 shows additional changes in the Variation View that were not visibly reflected in the binned Color Probability View. The authors interpret this discrepancy as evidence of small numerical instabilities in the simulator. The case does not provide an independent numerical validation of that diagnosis. In panel B, a Hadamard gate inserted into a pixel setter causes the modality display to change from purple to red and the pixel distributions to become uniform. E1 traced this visual change to the corresponding Qiskit gate implementation and identified the erroneous Hadamard operation. The visualization helped localize an implementation problem that the composite gate's descriptive label did not expose.

User study and strength of evidence

The final qualitative evaluation used seven experts, distinct from E1, in individual sessions with a 15-minute tutorial, five analysis tasks, a post-study interview, and a five-point Likert questionnaire. Participants used both layouts in counterbalanced order. The two evaluated circuits both involved 4×44 \times 4 images: one used 256 grayscale values and 20 gates, including erroneous pixel setters, while the other used eight grayscale values and 18 gates, including thresholding and inversion. The tasks asked participants to identify influential gates, describe distribution shapes and overall changes, identify alternative colors for selected pixels, and explain detailed probability changes. Table 1 lists the questionnaire, and Figure 7 presents the response distributions.

Most participants reported that the coordinated views supported understanding and debugging, particularly by linking a gate sequence to image evolution. Participants P2 through P5 preferred the signed Difference View to its absolute counterpart because the direction of change was useful despite the smaller marks. Feedback also exposed limitations: one participant wanted more varied cases to judge the Modality View, three reported unclear interaction affordances, and accidental legend scrolling could change a view unintentionally. The learning-related question received a mean score of 3.43 with standard deviation 1.18, which the authors interpret as a moderate learning curve. The abstract's eight-expert description refers to the broader collaboration; the final study described in the methods contains seven participants. These case observations and expert judgments support perceived usefulness within the studied workflow, but the paper does not report a baseline comparison or a statistically established improvement in debugging speed or accuracy.

Contributions, limitations, and future work

The central contribution is a domain-specific combination of image-space overviews and selected-pixel distribution comparisons, developed from an extended study of NEQR debugging practices. It connects recognizable image changes to the probabilistic effects of individual gates and provides concrete interactions for locating a suspicious operation and inspecting its consequences. The contribution includes the requirements, implemented framework, illustrative debugging cases, and qualitative evaluation; the departure index and the underlying quantum image representation are adopted techniques.

The framework requires full simulated statevectors, whose storage and computation grow exponentially with qubit count. Its evaluated scope is small two-dimensional NEQR images, and the authors report tool testing up to 8×88 \times 8 pixels. An earlier background discussion mentions experts having successfully handled 16×1616 \times 16 images, but this does not establish a corresponding evaluation of the visualizer. Larger images and longer circuits therefore remain a scalability question. The small expert sample, involvement of a coauthor in the case study, and absence of a comparative baseline also limit conclusions about broader developer populations and performance benefits.

The authors propose supporting partial measurement data from quantum hardware, evaluating larger images, and investigating other encodings such as FRQI. They also identify three-dimensional images and visualization of auxiliary qubits as extensions, since tomography involves volumes and some computational gates affect working qubits without directly changing image structure. These are future directions, not implemented or evaluated capabilities of the reported system.

Download .bib
@misc{heim_quantum_2025,
  author = {Heim, Anja and others},
  language = {en},
  publisher = {arXiv},
  url = {http://arxiv.org/abs/2504.09902},
  doi = {10.48550/arXiv.2504.09902},
  keywords = {Computer Science - Human-Computer Interaction},
  month = apr,
  shorttitle = {Quantum {Image} {Visualizer}},
  title = {Quantum {Image} {Visualizer}: {Visual} {Debugging} of {Quantum} {Image} {Processing} {Circuits}},
  urldate = {2025-10-17},
  year = {2025},
}