---
title: Visualizing the Effects of Measurements and Logic Gates On Multi-Qubit Systems Using Fractal Representation
authors:
  - Mate Galambos
  - Sandor Imre
abstract: Visual representation is essential to share ideas, interpret previous achievements or formulate new algorithms quickly and intuitively. Fractal representations of multi-qubit systems can visualize individual qubits even in case of entanglement. The proposed representation can be used to easily determine measurement probabilities. Connections with density matrices for pure and mixed states are also discussed. Finally, we visualize the effects of several single-qubit gates and controlled gates.
summaryType: survey
sourceStatus: null
sources:
  - https://www.thinkmind.org/library/SysMea/SysMea_v5_n12_2012/sysmea_v5_n12_2012_1.html
---

# Visualizing the Effects of Measurements and Logic Gates On Multi-Qubit Systems Using Fractal Representation

[Read the original paper](https://www.thinkmind.org/library/SysMea/SysMea_v5_n12_2012/sysmea_v5_n12_2012_1.html).

## Background and motivation

Galambos and Imre investigate how a two-dimensional representation of a quantum state can expose both its full measurement distribution and the roles of individual qubits.
The underlying problem is established: a Bloch sphere gives a useful picture of one qubit, but separate single-qubit pictures do not describe the correlations and phases of a general entangled state.
The authors also discuss higher-dimensional geometric approaches, including generalizations involving Hopf fibrations, and argue that their mathematical expressiveness does not automatically make them easy to interpret visually.
Their particular concern is that a picture of the whole system should still support reasoning about measurements of only some qubits, changes in subsystem structure, and the action of quantum gates.

This paper develops the fractal representation introduced in the authors' 2011 work, rather than originating the entire approach here.
Its emphasis is on rules for reading conditional measurement probabilities, relating the drawing to density matrices, representing mixtures, changing qubit order, and depicting single-qubit and controlled operations.
The goal is a visual notation for explaining and manipulating known quantum states.
The paper does not present an interactive application, a procedure for experimentally estimating an unknown state, or an empirical assessment of learning and usability.

## Encoding amplitudes, phases, and tensor products

For a single qubit,

$$
|\psi\rangle=Ae^{i\alpha}|0\rangle+Be^{i\beta}|1\rangle,\qquad A^2+B^2=1,
$$

the representation is a horizontal unit-width bar with a black segment of width $A^2$ followed by a white segment of width $B^2$.
Black denotes the computational-basis value $0$, and white denotes $1$.
A horizontal line within each segment encodes its amplitude's phase through vertical position, with phase interpreted modulo $2\pi$.
A zero-phase line coincides with the frame and is therefore not separately visible.
Thus segment width encodes a probability, not the amplitude magnitude itself, while the line supplies the phase information that a probability-only display would omit.



Figure 1 of the paper illustrates the single-qubit encoding from which the multi-qubit construction is built.

For an expanded $n$-qubit state $|\psi\rangle=\sum_x c_x|x\rangle$, each computational-basis string $x$ becomes a column containing one black or white bar for each qubit.
The column width is $|c_x|^2$, its top-to-bottom colors spell the bit string, and its phase line is placed in the bottom bar.
Columns are arranged in ascending binary order, and adjacent compatible bars are merged.
Figure 2 shows both the separate columns and the resulting compact drawing.
The stacked rows retain a visible correspondence with individual qubits, while the widths and phase lines collectively encode the state-vector coefficients.

For a separated tensor product, the construction instead places scaled copies of each factor's representation beneath the segments of the preceding factor.
Figure 3 illustrates this recursive construction with three single-qubit factors.
The authors call the resulting patterns fractal because the bar structures repeat at different scales.
This recursion also applies when the factors are groups of internally entangled qubits, in which case each repeated object is a multi-qubit drawing.
The separated and expanded forms differ in where phase information is stored: moving the component phase lines to the bottom row and adding their heights modulo $2\pi$ produces the combined phases of the expanded state.
Conversely, recovering repeated factors requires consistent widths and phases; failure to factor the drawing into such copies indicates inseparability across the proposed division.

The paper also proposes a generalization to subsystems with more than two discrete states.
Additional colors identify their basis states, column widths still encode joint probabilities, and complementary-colored phase lines preserve contrast.
This is a conceptual extension described with an example of three five-level particles, rather than an evaluated color design or a demonstrated software feature.

## Measurement, conditional probability, and qubit order

The central measurement operation is selection and renormalization of the appropriate part of the drawing.
When the top qubit is measured in the computational basis, outcome $0$ retains the columns below its black segment, while outcome $1$ retains those below its white segment.
The retained width becomes the new unit against which subsequent probabilities are read.
For a projector $M$ and an outcome of nonzero probability, this corresponds to

$$
|\psi'\rangle=\frac{M|\psi\rangle}{\sqrt{\langle\psi|M|\psi\rangle}}.
$$

Figure 4 follows an outcome sequence beginning with $0$ and then $1$.
A column representing the remaining outcome is compared with successively smaller reference widths, giving the joint probability and then conditional probabilities such as $P(10\mid 0)$ and $P(0\mid 01)$.
The figure therefore explains a probabilistic calculation through width ratios; its successive drawings are schematic states conditioned on specified outcomes, not recorded measurements from hardware.
The derivation concerns measurements in the basis encoded by the colors.
It does not establish a direct selection rule for every possible measurement basis.

Qubits should be ordered from top to bottom according to the intended measurement sequence.
Changing that order requires more than exchanging row labels: the relevant rows are exchanged, the drawing is split into its constituent columns, phase information is retained in the bottom bars, columns are sorted by their new bit strings, and compatible neighbors are merged again.
Figure 6 explicitly depicts these stages.
This procedure also supports a test of interchangeability: if swapping two qubits leaves the full drawing unchanged, the state is invariant under that exchange.
For separated factors, Figure 5 identifies identical qubit states through scaled copies of the same single-qubit bar, including phase information.

## Density matrices and mixed states

The representation connects to a pure-state density matrix through the same amplitudes used to construct its columns.
If $c_x=\sqrt{p_x}e^{i\gamma_x}$, then

$$
\rho_{xy}=c_xc_y^*=\sqrt{p_xp_y}\,e^{i(\gamma_x-\gamma_y)}.
$$

Diagonal elements are therefore the column widths, while off-diagonal elements require a geometric mean of widths and a difference of phase-line heights.
Figure 7 supplies a geometric construction using the parabola $y=x^2$ to obtain square roots and products, then shows the corresponding complex vectors.
This connection explains why the width alone cannot provide the quantities needed for interference or density-matrix coherences.
The authors also discuss constructing a pure-state drawing from a density matrix, while noting that the drawing's correspondence with a state vector is not a one-to-one correspondence with a density matrix.
In particular, the density matrix does not retain the vector's overall phase.

A mixed state is drawn from an explicitly supplied ensemble,

$$
\rho=\sum_k w_k|\psi_k\rangle\langle\psi_k|,\qquad \sum_k w_k=1.
$$

Each pure-state drawing is scaled horizontally by $w_k$ and placed beside the others.
Extended gray separators and triangular markers identify boundaries between ensemble components so that they are not mistaken for ordinary neighboring columns of a single pure state.
Figure 8 illustrates a mixture of $|00\rangle$ and $|11\rangle$.
A joint outcome probability is obtained by adding the widths of every matching column across the components.
Figure 9 extends the selection-and-renormalization argument to sequential measurements, retaining matching regions across the ensemble and using their combined width as the reference for conditional probabilities.
Density matrices are recovered by calculating each component's density matrix and adding them with the ensemble weights.

The paper further suggests a graphical route to reduced subsystem states: reorder the desired subsystem below the other qubits and treat its pieces under different upper-bit configurations as ensemble components.
Figure 10 illustrates the proposed construction for two subsystems.
The authors explicitly state that they lack a general proof of this procedure.
It should therefore be understood as a proposed connection with reduced density matrices, rather than a fully established replacement for computing partial traces.

## Visual rules for quantum gates

The gate examples describe transformations of this notation, with color changes, phase-line movement, regrouping, and column reordering reflecting the underlying linear operation.
Figure 11 shows Pauli $X$: invert the colors in the affected row, then restore ascending column order and merge compatible bars.
Figure 12 adds the phase shifts required for Pauli $Y$ along with its bit flip.
For Pauli $Z$, the colors and probabilities remain unchanged, while phases of columns whose target bit is $1$ shift by $\pi$.
Figure 13 depicts this $Z$ transformation through half-height shifts of the relevant bottom-row phase lines, despite its caption mistakenly naming Pauli $Y$.
Changes in phase can require splitting or merging bars even when the binary ordering stays unchanged.

The Hadamard example makes the need for complex amplitudes especially clear.
The affected qubit is first moved to the bottom row.
Columns are grouped by the values of all the other qubits, so that the two amplitudes in each group differ only in the target bit.
The Hadamard acts on each pair by its normalized sum and difference, and the updated amplitudes determine the new widths and phases.
Figure 14 shows the group boundaries and the altered bottom-row bars.
These groups behave algebraically like two-component vectors; they do not imply that an entangled target qubit has become an independent pure qubit.

The paper generalizes this grouping rule to any single-qubit matrix $U$ using the block structure of $I\otimes\cdots\otimes I\otimes U$.
A gate on another row can be handled by reordering the qubits before and after the operation.
Controlled gates apply the corresponding transformation only within columns where the control bit is $1$, identified by a white bar in the control row.
Figure 15 illustrates CNOT by flipping the target colors only in those columns, followed by reordering.
This conditional change provides a way to discuss how CNOT can create entanglement, without treating every CNOT application as necessarily entangling.
For a general controlled single-qubit gate, the same restriction is applied to the bottom-row amplitude groups.

## Contributions, evidence, and limitations

The main contribution is a set of connected graphical rules that extends the earlier fractal state notation to measurement, mixed states, subsystem rearrangement, and gate action.
The representation ties outcome probabilities to widths, basis values to colors, and phases to line heights, while its recursive structure connects tensor products with repeated graphical components.
Its mathematical explanations and fifteen schematic figures demonstrate how to carry out these operations on illustrative states.
The paper contains no controlled user study, quantitative comparison with other visualizations, runtime benchmark, or reported implementation of an interactive interface.
Claims that the notation improves intuition or communication are motivations and intended benefits, rather than measured outcomes.

The most explicit unresolved issue is the proposed construction of subsystem density matrices without directly calculating partial traces, for which the authors report no general proof.
The mixed-state discussion is framed around ensembles with a small number of distinct pure components, and its drawing depends on the chosen ensemble decomposition.
Although the construction can describe finite multi-qubit systems, that expressiveness does not establish visual scalability: a generic expanded state still contains up to $2^n$ basis columns, and small probabilities produce correspondingly narrow features.
This is a consequence of the encoding, not a scalability experiment reported by the authors.
The paper does not present a separate future-work agenda; establishing the proposed subsystem rule and empirically evaluating readability remain open issues evident from the work's scope.
