---
title: "GraphStateVis: Interactive Visual Analysis of Qubit Graph States and their Stabilizer Groups"
authors:
  - Matthias Miller
  - Daniel Miller
abstract: Fathoming out quantum state space is a challenging endeavor due to its exponentially growing dimensionality. At the expense of being bound in its expressiveness, the discrete and finite subspace of graph states is easier to investigate via a pictorial framework accompanied with a theoretical toolkit from the stabilizer formalism. Analyzing hand-drawn graphs is a tedious and time-consuming task and imposes limitations to the problem sizes that can be addressed. Similarly, algorithmic studies using adjacency matrices alone lack the benefit of a visual representation of the states. We argue that applying visual analytics to investigate graph states can be advantageous. To this end, we introduce GRAPHSTATEVIS, a web-based application for the visual analysis of qubit graph states and their stabilizer groups. Our tool facilitates the interactive construction of a graph through multiple components supported by linking and brushing. The user can explore graph-state-specific properties, including the Pauli-weight distribution of its stabilizer operators and noise thresholds for entanglement criteria. We propose a use case in the context of near-term quantum algorithms to illustrate the capabilities of our prototype. We provide access to GRAPHSTATEVIS as an open-source project and invite the broader quantum computing and engineering communities to take advantage of this tool and further boost its development.
summaryType: survey
sourceStatus: null
sources:
  - https://doi.org/10.1109/QCE52317.2021.00057
---

# GraphStateVis: Interactive Visual Analysis of Qubit Graph States and their Stabilizer Groups

[Read the original paper](https://doi.org/10.1109/QCE52317.2021.00057)

## Background and motivation

GraphStateVis supports interactive exploration of qubit graph states through linked graph, matrix, and stabilizer-property views.
A general pure state of $n$ qubits has $2^n$ complex amplitudes, making its structure difficult to understand directly.
Graph states restrict attention to a family that admits both a compact graph representation and analysis through the stabilizer formalism.
For a simple undirected graph $G=(V,E)$, one initializes each qubit in $|+\rangle$ and applies a controlled-$Z$ gate for each edge.
Figure 1 illustrates this correspondence with a six-vertex ring and its preparation circuit; it is a conceptual explanation, not a circuit-editor screenshot.
Every graph state is a stabilizer state, and every qubit stabilizer state is related to a graph state by suitable single-qubit transformations.
This relationship makes graph states useful in studying multipartite entanglement, quantum error correction, joint measurements of commuting Pauli operators, and measurement-based quantum computation.

The underlying analysis problem is established rather than newly introduced by the paper.
Researchers already investigate graph states using graph drawings, adjacency matrices, and results from stabilizer theory.
Hand-drawn diagrams require manual effort and constrain the size of tractable examples, whereas matrix-based computations alone make relationships in graph structure harder to inspect visually.
The authors draw on visual analytics and earlier visual analysis of graph structures, including social networks, to argue for combining interactive editing with mathematical calculations.
Their contribution is this integration for graph-state research, not a replacement for the stabilizer formalism or a general visualization of arbitrary quantum states.
The paper also builds on existing sector-length invariants, entanglement criteria, graph transformations, and VQE measurement strategies.

## Coordinated views and graph construction



Figure 2 from the paper shows the implemented interface with an eight-vertex Pusteblume graph.
The annotated regions include graph presets, an adjacency matrix, a node-link graph with a property panel and interaction toolbar, a sector-length histogram and table, and a noise-robustness panel.
The matrix explicitly numbers its rows and columns, displays existing edges as green cells containing 1, absent edges as red cells containing 0, and disables the diagonal visually in gray.
Graph properties include counts of vertices, edges, connected components, cycles, isolated vertices, leaves, and twins.
The screenshot's yellow vertices identify the pair selected by the distillation-related highlighting function.

Users can modify the initial graph, load a predefined family such as cycles, stars, or complete graphs, or generate a random graph with an adjustable edge probability.
Graph and matrix edits remain synchronized: changing an edge in the node-link view updates its matrix entries, and toggling matrix entries creates or removes the corresponding edge.
The workflow in Figure 3 uses context menus to add an isolated vertex, start an edge from a selected vertex, or delete an edge or vertex.
During edge creation, green vertices are valid targets and red vertices are unavailable because a simple graph cannot contain loops or parallel edges.
Right-clicking a matrix row or column header exposes the vertex menu as well.
This concrete correspondence between topology and matrix entries supports the paper's broader description of linked exploration.

A D3 force-directed layout reduces vertex overlap, while a lock control disables the layout forces for manual arrangement.
Zoom, pan, and zoom-to-fit support navigation.
Another context-menu operation performs local complementation: it toggles every possible edge among a chosen vertex's neighbors.
Graphs related by a sequence of these operations represent states related by single-qubit Clifford gates and are therefore local-unitary equivalent.
The application also exports a graph-specific URL or a graph ID consisting of the vertex count and a hexadecimal encoding of the upper triangular adjacency matrix.
The associated Python conversion functions are intended to connect visual graph editing with programmatic work.

## Sector-length analysis and visual encoding

The central derived representation is the sector length distribution, or SLD, which aggregates stabilizer operators by their Pauli weight rather than displaying all $2^n$ operators individually.
The Pauli weight counts the nonidentity tensor factors of an operator.
For a general $n$-qubit state $\rho$, the paper defines

$$
A_k[\rho]=\sum_{\substack{P\in\{I,X,Y,Z\}^{\otimes n}\\ \operatorname{wt}(P)=k}}\bigl(\operatorname{Tr}[\rho P]\bigr)^2.
$$

For a graph state, $A_k$ is exactly the number of weight-$k$ operators in its stabilizer group.
Given its binary adjacency matrix $\Gamma$, this can be computed as

$$
A_k[|G\rangle\langle G|]=\#\{r\in\mathbb F_2^n:\operatorname{swt}(r,\Gamma r)=k\},
$$

where $\operatorname{swt}(r,s)$ counts positions at which either vector has a 1.
The implementation enumerates these binary vectors for each connected component, then combines the component distributions through the tensor-product convolution

$$
A_k[\rho\otimes\rho']=\sum_{j=0}^{k}A_j[\rho]A_{k-j}[\rho'].
$$

This decomposition makes the largest connected component the principal computational bottleneck.
The paper reports that runtime doubles with each added vertex in that component and can take hours for a connected graph with approximately 30 vertices.
Consequently, the reported prototype automatically calculates the SLD for connected graphs with $n\leq16$, with an equivalent condition for disconnected graphs; users can explicitly request larger calculations.
Computed distributions are cached on a remote server for reuse, including across users.

The histogram places weight $k$ on the horizontal axis and $A_k$ on the vertical axis, with blue bars for even weights and red bars for odd weights.
A separate table provides the numerical values.
The colors help distinguish two known classes of stabilizer-state distributions: type II has no odd-weight stabilizers, while type I has equal total counts in its even- and odd-weight sectors.
Parity Coloring connects this distinction to graph structure by coloring vertices of odd degree blue and vertices of even degree red.
A graph state has a type-II distribution exactly when all vertices have odd degree, so all-blue vertices correspond to an all-blue histogram.
Figure 4 compares an edgeless graph, a star, and a connected graph with mixed vertex-degree parity, making the relation between these encodings visible.
The authors suggest using this feedback to find a near-minimal set of graph modifications that changes the distribution type; they do not present an optimal graph-editing algorithm.

## Noise analysis and entanglement bounds

A slider controls the probability $p$ of an independent depolarizing channel applied to each qubit, with the single-qubit action $\mathcal E_p(\rho)=pI/2+(1-p)\rho$.
The SLD is updated analytically according to

$$
A_k[\mathcal E_p^{\otimes n}(\rho)]=(1-p)^{2k}A_k[\rho].
$$

Higher-weight sectors therefore decay faster under this model.
Figure 4(c) shows the noisy distribution in red and blue while retaining the noiseless distribution as gray bars behind it, allowing users to compare the two at the same weights.
This visualizes a specified noise model rather than an experimentally measured device response.

The Noise Robustness panel displays three lower bounds on the noise threshold below which entanglement is guaranteed: N-Sector, Majorization, and Distillation.
The first uses the sufficient condition $A_n[\rho]>1$, and the second uses $\sum_k(2k-n)A_k[\rho]>0$.
The distillation bound depends on the maximum sum of degrees over adjacent vertices.
Its toolbar control highlights a maximizing pair in yellow, as shown in Figure 2, so users can locate the graph structure determining that bound.
These are sufficient entanglement guarantees, not exact transition points: failing a criterion does not establish that a noisy state is separable.

## Proposed application to VQE measurement design

The paper's application example concerns grouping Pauli observables for the variational quantum eigensolver, where the energy of a trial state is estimated from a Hamiltonian expansion $H=\sum_i\lambda_iP_i$.
Commuting observables can be measured together, but grouping them creates a trade-off between the number of measurement settings and circuit depth.
A tensor product basis can be measured with a layer of single-qubit gates and has the binomial weight distribution $A_k=\binom nk$.
The authors explain that such groupings can exhaust compatible low-weight operators while leaving high-weight operators that require many additional settings.
Earlier entangled-measurement strategies expand the available groups using a layer of two-qubit gates.

GraphStateVis is proposed as a way to explore a broader family of groups suited to a device's connectivity.
If a Clifford circuit $U$ prepares a stabilizer state, applying $U^\dagger$ to the VQE trial state and then reading out in the computational basis jointly measures operators of the form $UZ^rU^\dagger$.
A graph matching a device's connectivity, or one of its subgraphs, supplies a candidate graph-state preparation and uncomputation circuit.
Users can edit this graph while observing the SLD of the simultaneously measurable stabilizer group.
Single-qubit Clifford changes can vary the actual operators while preserving their Pauli-weight distribution.

Figure 5 plots the SLDs of the historical 27-qubit ibmq_sydney connectivity graph and a subgraph, illustrating how graph structure changes the available weight profile.
Figure 6 considers a 27-vertex system consisting of a star on 27, 25, or 23 vertices plus the remaining isolated vertices.
These examples have a broad central contribution and a strong high-weight contribution whose location shifts as isolated vertices are added; the plotted high-weight maxima occur at weights 27, 26, and 25, respectively.
The authors connect these distributions to GHZ states and suggest them as starting points when predominantly high-weight observables remain unassigned.
The figures illustrate candidate measurement structures and their computed distributions, not completed VQE runs or experimentally demonstrated measurement savings.

## Contributions, evidence, and limitations

The paper contributes an open-source web prototype that connects editable graph topology with stabilizer-weight calculations, parity relationships, and sufficient entanglement bounds.
Its mathematical machinery largely assembles established graph-state and sector-length results into an interactive analysis workflow.
The authors state that the application supported discoveries described in a separate sector-length-distribution manuscript, cited as work in preparation, and offer the VQE scenario as a use-case proposal.
The evidence in this paper consists of the interface, worked graph examples, mathematical relationships, and application reasoning.
It does not report a controlled user study, a comparative usability evaluation, or a benchmark showing improved VQE performance; the authors explicitly say that benefits for relevant VQE instances require further investigation.

The implemented scope is qubit graph states, and the compact SLD summarizes operator weights rather than exposing the identity of every stabilizer or all information about the state.
Exponential enumeration limits interactive calculation for large connected graphs despite component decomposition and caching.
The noise exploration assumes local depolarization, and its displayed thresholds remain lower bounds rather than exact entanglement thresholds.
The paper does not establish that the proposed visual workflow scales to all hardware sizes or automatically produces optimal measurement partitions.

The outlook proposes highlighting subgraphs that obstruct $k$-uniformity, extending the noise controls to additional error channels and their combined effects, and visualizing hypergraph states or qudit graph states.
It also suggests studying how SLDs evolve during noisy computation, initially through Clifford circuits with Pauli noise, to support future understanding of error mitigation.
These are extensions the authors invite the community to develop, rather than capabilities evaluated in the reported prototype.
