---
title: "HammingVis: A visual analytics approach for understanding erroneous outcomes of quantum computing in hamming space"
authors:
  - Jieyi Chen
  - Zhen Wen
  - Li Zheng
  - Jiaying Lu
  - Hui Lu
  - Yiwen Ren
  - Wei Chen
abstract: Advanced quantum computers have the capability to perform practical quantum computing to address specific problems that are intractable for classical computers. Nevertheless, these computers are susceptible to noise, leading to unexpectable errors in outcomes, which makes them less trustworthy. To address this challenge, we propose HammingVis, a visual analytics approach that helps identify and understand errors in quantum outcomes. Given that these errors exhibit latent structural patterns within Hamming space, we introduce two graph visualizations to reveal these patterns from distinct perspectives. One highlights the overall structure of errors, while the other focuses on the impact of errors within important subspaces. We further develop a prototype system for interactively exploring and discerning the correct outcomes within Hamming space. A novel design is presented to distinguish the neighborhood patterns between error and correct outcomes. The effectiveness of our approach is demonstrated through case studies involving two classic quantum algorithms’ outcome data.
summaryType: survey
sourceStatus: null
sources:
  - https://doi.org/10.1016/j.gmod.2024.101237
---

# HammingVis: Understanding noisy quantum outcomes through Hamming-space structure

[Original paper (PDF)](https://doi.org/10.1016/j.gmod.2024.101237)

## Background and motivation

HammingVis analyzes probability distributions of measured bitstrings to help quantum-computing researchers investigate erroneous outcomes.
For an $n$-qubit circuit, measurements produce strings in $\{0,1\}^n$, and repeated executions estimate their probabilities.
Noise can redistribute probability so that an erroneous string becomes more frequent than an expected solution.
A histogram exposes these frequencies but leaves relationships between bitstrings implicit, making a high bar an unreliable basis for identifying a correct outcome.
The paper instead uses Hamming distance, the number of differing bit positions, to organize possible error relationships.
Its Figure 3 illustrates the eight three-bit strings as vertices of a cube whose edges join strings differing in one bit.



Figure 2 is a motivating three-bit example: the original distribution favors the incorrect string $000$, while the processed distribution emphasizes the designated correct string $111$.
It illustrates the intended reconstruction behavior rather than reporting a separate experimental case study.

The underlying problem of unreliable quantum outcomes is established.
The paper discusses error-correcting encodings, circuit-level approaches, repeated executions, calibration-based measurement mitigation, and classical post-processing as existing responses with different resource and information requirements.
Its closest algorithmic foundation is HAMMER, which reconstructs a noisy distribution using the tendency of erroneous outcomes to occur near meaningful outcomes in Hamming space.
HammingVis adopts that reconstruction approach and makes its neighborhood relationships inspectable.
The earlier HAMMER result of a $1.37\times$ average improvement over more than 500 benchmarks is cited background, not a new HammingVis evaluation.

Related visualizations include Bloch-sphere and QSphere representations, VENUS, probability histograms, QuantumEyes, and graph-state visualizations.
These approaches address amplitudes, phases, distributions, circuit evolution, or properties of graph states, but do not directly expose the Hamming-neighborhood structure targeted here.
HammingVis contributes an interactive representation of noisy measurement outcomes rather than a representation of coherent state evolution or interference.
Its design requirements came from interviews lasting 45 to 60 minutes with two quantum-computing experts with three and five years of experience.
They requested explicit error structure, insight into the effects associated with particular qubit positions, support for distinguishing correct and incorrect outcomes, and familiar probability displays.

## Reconstruction and contribution-driven graph layout

The preprocessing treats each bitstring as a point with an observed probability $P_x$.
For each Hamming distance $d$, cumulative Hamming strength, $\mathrm{CHS}_d$, sums the lower probability over pairs of outcomes at that distance.
A point's restorative contribution to another point is its probability divided by the corresponding cumulative Hamming strength.
The reconstruction filters contributions by Hamming neighborhood and prevents an outcome from receiving contributions from a higher-probability outcome, so a prominent point does not automatically amplify every low-probability neighbor.
The resulting likelihood combines an outcome's original probability with the filtered contributions from its neighborhood.
This is the reconstruction adopted from earlier work; the new contribution lies in the graph layout and coordinated visual analysis built around its quantities.

The layout begins with all strings arranged on a circle in Gray-code order, using $\operatorname{Gray}(i)=i\oplus(i\gg1)$.
Consecutive strings, including the circular wraparound, differ by one bit.
The common circular arrangement gives the force simulation a structured initial placement, although the paper does not establish that it eliminates local optima.
Attraction between outcomes is proportional to their bilateral contribution,

$$
C_b(x,y)=\frac{\min(P_x,P_y)}{\mathrm{CHS}_{\operatorname{HD}(x,y)}}.
$$

Collision forces are intended to prevent overlapping nodes.
The resulting layout draws strongly related outcomes into clusters and leaves weakly connected outcomes nearer their initial peripheral positions.
Figure 4 shows the initial and final arrangements for the motivating three-bit example.

Two parameters have distinct effects.
The breakpoint $\beta$ removes weak attractive forces from the simulation and therefore changes node positions, as illustrated in Figure 5.
The edge threshold $\tau$ hides weak edges in the displayed graph without changing those positions, as illustrated in Figure 6.
The distinction lets users first establish a useful grouping and then simplify the visible connections.
Edges point from a higher-probability outcome toward a lower-probability outcome, which the authors interpret as a possible direction of error propagation.
These directions are derived from probabilities and the reconstruction model; they are not observations of individual error events or a temporal trace through a quantum circuit.
Restorative contributions in the matrix and detail displays run in the reverse interpretive direction, from lower-probability neighbors toward stronger candidate outcomes.

## Coordinated visual encodings and interaction



The Figure 1 interface combines a Data Distribution View, Contribution Matrix View, Overview View, and Detail View.
The Detail View contains separate state-list and neighborhood-context displays.
Together they support moving from candidate peaks to neighborhood structure and then to individual contribution patterns.



The Data Distribution View retains familiar bar charts of original and reconstructed probabilities, together with contributions received and offered.
Gray and orange distinguish unselected and selected outcomes in the illustrated interface; they do not encode the distinction between original and processed distributions, which appear in separate charts.
This provides an entry point for identifying prominent or suspicious outcomes while preserving the probability representation used in quantum toolkits.



The Contribution Matrix View uses color intensity to encode restorative contributions between outcome pairs.
Rows represent contributions received and columns represent contributions offered, so the matrix is asymmetric.
Gray-code ordering places strings that differ by one bit next to each other along each axis.
Horizontal and vertical strips summarize contributions and support both selection and cyclic scrolling.
Scrolling changes where the Gray-code sequence starts, allowing a neighborhood split across opposite ends of an axis to be brought together.
Selections in the matrix link to the graph overview.

Masking conceals selected bit positions and reduces the matrix to a coarser representation of the remaining positions.
Figure 7 explains two uses: masking consecutive trailing positions, which groups outcomes with shared prefixes, and masking a position with relatively low error occurrence to focus attention on other bits.
By comparing the remaining off-diagonal contributions under different masks, users can investigate which retained bit positions are associated with discrepancies.
This is a way to explore qubit-specific effects in the output distribution, rather than direct instrumentation of physical error mechanisms.



In the Overview View, node color encodes original probability, edge thickness encodes Hamming distance, and edge color and spatial arrangement reflect mutual influence.
The contribution-driven layout and its thresholds expose clusters at different levels of detail.
Hovering over a node retains its incident edges and reveals its information; hovering over an edge reveals its direction and endpoints.
Selecting a node updates the Detail View.
The central clusters are intended to direct attention to potentially meaningful outcomes and their neighborhoods, not to guarantee that every central node is correct.



The State List View orders other outcomes by Hamming distance from the selected outcome and then by original probability.
The selected outcome's row separates received contributions in blue, its own contribution in white, and offered contributions in red or pink.
Color depth distinguishes Hamming-distance groups, while the portion of a bar to the right of the reference axis represents reconstructed probability.
Other rows identify whether they contribute to, receive from, or do not participate with the selected outcome.
In the reported cases, correct outcomes mainly receive substantial neighborhood support, whereas prominent erroneous outcomes both receive and offer contributions.
That observed pattern supports interpretation in these examples; it is not proved as a universal classification rule.

The Context Visualization View compares the current and previous selections using two adjacent glyphs inspired by WiFi symbols.
Each arc represents a Hamming-distance neighborhood, and its color intensity encodes the total contribution from that neighborhood; noncontributing tracks are omitted.
Figure 8 also documents an earlier design with individual points on concentric tracks and average contributions encoded on the tracks.
The authors replaced it because dense points caused clutter and averages made the illustrated correct and incorrect outcomes hard to distinguish.
The final glyph highlights the stronger distance-one neighborhood around $110001$ compared with $101110$.
This design rationale and illustrated example are not a controlled comparison of the two encodings.

## Evaluation and findings

The evaluation combines layout timing, two case studies developed from expert exploration, and semi-structured interviews with two experts.
In the first case, a four-qubit Grover circuit executed on IBM's `ibm_brisbane` has the ideal solution $0000$ and a prominent erroneous outcome $1000$.
Figure 9 shows how scrolling the matrix reveals that these apparently separated histogram peaks are close in Hamming space and belong to the same graph cluster.
The state-list and context displays show stronger restorative support for $0000$ and a mixture of received and offered contributions for $1000$.
Masking all positions except the first leaves substantial off-diagonal contributions, leading the expert to attribute the discrepancy primarily to that bit position.
The case illustrates a diagnostic interpretation of the distribution, without independently identifying a gate-level or hardware-level cause.

The second case uses a six-qubit QAOA hardware-grid problem from the cited Google dataset.
The original distribution has prominent outcomes $000001$, $001110$, and $110001$.
Figure 11 shows that the neighborhood of $000001$ spans two clusters, while the neighborhoods of $001110$ and $110001$ each concentrate in one cluster.
The directed overview and detailed contribution patterns support identifying $001110$ and $110001$ as the correct outcomes.
Although $000001$ and $001110$ are visually close on the histogram axis, the relevant graph connection links $000001$ to $110001$, at Hamming distance two.
An expert notes that $000001$ still exceeds $001110$ in probability after reconstruction, so the visual neighborhood analysis adds information beyond ranking the reconstructed bars.

The interviews lasted approximately an hour each.
Experts reported that the linked views helped them recognize patterns at different granularities, valued the detail displays for distinguishing outcomes, and found edge filtering and masking useful for exploration.
One acknowledged an initial learning curve.
These findings support usefulness in the two demonstrated settings, but the study does not report a controlled comparison, quantitative diagnosis accuracy, or a broad user evaluation.
The paper therefore does not establish that the views outperform dimensionality-reduction layouts, unordered matrices, or alternative detail encodings.

The timing experiment measures average and maximum time per force-layout tick for datasets from 4- to 14-qubit circuits, with both thresholds set to zero.
Figure 10 shows a steep increase at 14 qubits.
The authors report that the number of edges exceeds the tested memory limit at 16 or more qubits under that unfiltered configuration.
They describe the unaccelerated iteration complexity as $O(2^{2n})$ and report using Barnes–Hut acceleration, with a stated resulting complexity of $O(n^2 2^n)$.
These are reported implementation and complexity claims; the timing plot measures individual simulation ticks rather than complete end-to-end interaction latency.

## Contributions, limitations, and future work

The paper contributes a contribution-driven Hamming-space layout, a maskable contribution matrix, and coordinated detail views that explain neighborhood support for noisy measurement outcomes.
Its main advance is to make the assumptions and relationships behind reconstruction accessible for interactive analysis.
The evidence consists of the two expert-driven examples, interview feedback, and the reported timing experiment.
It does not introduce a new quantum error-correcting code or demonstrate an additional automated fidelity improvement attributable to HammingVis itself.

Scalability is an explicit limitation because the number of outcomes and pairwise relationships grows rapidly with qubit count.
The authors propose edge filtering and more advanced layouts for larger circuits.
The approach also focuses on structure visible in classical measurement bitstrings and depends on the contribution model's assumptions about Hamming neighborhoods and probability relationships.
Consequently, the displayed propagation paths should be read as model-based explanations rather than unique causal reconstructions of physical noise.
The limited examples leave the reliability of the distinguishing patterns across other algorithms and noise conditions unestablished.

The authors propose integrating localized error-correcting methods after visual analysis identifies problematic regions, while explicitly stating that their current system does not further optimize circuit measurement outcomes beyond its adopted reconstruction.
They also suggest exploring graph-theoretic representations, analyzing errors through dimensions beyond Hamming space, and investigating richer interactions such as AR and VR.
These are future directions rather than implemented or evaluated capabilities.
