# How the lab works

Start with the short explanation below, then use the contents to find a particular score or experiment. Each section connects the quantities in the interface to their mathematical definitions.

## Start here: what the pictures and scores mean

This research designs graphs whose eigenvectors encode quantum-like states. An eigenvector is a pattern of node values that keeps its shape when the weighted adjacency matrix acts on it. Choosing the connections therefore determines which patterns the graph supports. The lab lets you build those graphs, transform their encoded patterns, and test what changes under perturbations.

A community is a group of nodes that the encoding treats together. The chosen community patterns give all nodes in a community the same complex amplitude, including the same phase. Different communities can have different amplitudes and phases. The displayed arrows show a selected eigenvector or an explicitly prepared comparison state, as identified in the interface. Graph gates conjugate the adjacency matrix and carry its eigenvectors into the transformed graph. Prepared-state evolution is an additional experiment with its own stated generator.

**Leakage means the network state contains a pattern that these community-wide patterns cannot describe.** For example, some nodes inside a community may have a different amplitude or phase from their neighbors. The part left out is still in the network. It is not a node moving off the screen, an edge disappearing, or energy vanishing.

To read the network as a one- through five-bit state, the lab projects onto the chosen community patterns. This calculation separates the part those patterns can represent from the rest. It does not remove anything from the saved full-network state. Leakage measures the share outside the chosen community patterns. The larger that share, the less of the full network state the encoded description captures.

| Label | Question it answers |
|---|---|
| Full target fidelity | How much of the whole state matches the target pattern? |
| Leakage | How much of the state cannot be expressed using the chosen community patterns? |
| Conditional logical fidelity | After keeping only the part the encoding can describe, how well does its direction match the target? |
| Outside-encoding view | At which nodes does the state differ from its projection onto the chosen community patterns? |

**Why conditional fidelity needs the leakage score:** in the opening leakage example, about 72.4% of the state weight remains in the encoding and 27.6% lies outside it. After normalizing the retained projection, it points exactly toward the target, so its conditional fidelity is 100%. That normalization ignores the 27.6% outside the encoding. The full target fidelity is 72.4%, which includes the retained-weight factor. These percentages are squared norms in the mathematical model, not a claim about a physical measurement apparatus.

**How to read a node:** its displayed size increases with that node's state weight, which is its squared amplitude. The size scale is fixed across checkpoints. A minimum visible size keeps very small weights selectable, so screen area is not a literal percentage scale. Selecting the node gives its numerical weight. The color meaning depends on the selected view.

**Where node size comes from:** in a graph-selected mode, connections help determine the node amplitudes. A node adds up its neighbors’ arrows, with each arrow multiplied by the corresponding edge weight. For a mode, this weighted sum must equal the node’s own arrow times one common eigenvalue. Stronger connections to neighbors that reinforce one another can therefore support a larger node amplitude. Edge count alone does not determine it, especially with signs or phases that cancel. A prepared state instead sets the arrows directly, so changing connections does not instantly resize its nodes.

**What “target” means:** the comparison target is the reference relationship between all the group arrows. It stays fixed while you apply damage or gates, so changes in fidelity compare against the same reference. A low match can be the intended result of a gate, rather than a failed experiment. The target bit in a controlled gate is a different use of the word: it identifies the bit acted on by that gate.

The sections below give the precise definitions, assumptions, and reproducible examples. “Logical,” “encoded,” and “inside the code” all refer to the same chosen community-pattern description.

## 1. Graph, encoding, and state

The simulator studies finite-dimensional, weighted Hermitian graphs and the states encoded by their eigenvectors. Graph construction and conjugation specify mathematical changes to that encoding. The auxiliary prepared-state tools allow numerical comparisons without assuming a physical state-control mechanism. These definitions do not by themselves establish a physical quantum implementation, Bell nonlocality, or a computational speedup.

The full graph has \(N\) vertices and a Hermitian adjacency matrix \(A\in\mathbb C^{N\times N}\). A complex edge satisfies \(A_{ji}=\overline{A_{ij}}\). Diagonal entries are real. General weighted constructions can include signed weights and nonzero diagonal entries.

For \(k\in\{1,2,3,4,5\}\), there are \(d=2^k\) nonempty communities \(C_0,\ldots,C_{d-1}\). Their sizes are \(n_r=|C_r|\). The encoding matrix contains normalized community indicators:

\[
P_{vr}=\begin{cases}1/\sqrt{n_r},&v\in C_r,\\0,&\text{otherwise}.
\end{cases}
\qquad P^\dagger P=I_d,\qquad \Pi=PP^\dagger.
\]

The synchronized or code subspace is \(\operatorname{im}P\). A logical vector \(c\in\mathbb C^d\) lifts to \(Pc\). Within each community, a lifted vector has the same complex amplitude at every vertex. Community membership is part of the mathematical model. Display positions, camera orientation, label visibility, collapsed communities, and edge filters are not.

Logical labels use ascending binary order: \(00,01,10,11\) for two bits. Four bits use sixteen labels and a 16-by-16 logical matrix. Five bits use 32 labels, from 00000 through 11111, and a 32-by-32 logical matrix. Bit 0 is the most significant bit. Tensor products, partial traces, local operators, and correlation labels follow this convention. A passive change of logical basis \(P'=PV\) transforms coordinates to \(c'=V^\dagger c\) and the logical operator to \(Q'=V^\dagger QV\). Targets and observables transform in the same basis.

The application distinguishes two state-selection rules:

* **Leading mode:** after an ordinary graph edit, select a normalized eigenvector with largest algebraic eigenvalue. “Largest” does not mean largest absolute eigenvalue. A graph conjugation carries the selected eigenvector into the transformed graph instead.
* **Prepared state:** retain an explicitly normalized full-network vector through ordinary graph edits. A preparation, gate, joint phase transformation, or evolution can explicitly change that vector. Holding the state fixed is a rule of this selected mode, not the default interpretation of every graph edit.

In **Spectrum**, **Use this pattern as the state** selects the corresponding full-network eigenvector and records it as a prepared state. It changes the inspected state and its scores without editing the adjacency matrix or comparison target. Later graph edits retain this vector until a new selection, preparation, gate, or evolution changes it. This action is an experimental choice in the simulator, not a physical process that drives a device into that mode.

An optional mode-following calculation selects an eigenvector with maximal overlap with a previous reference state. That tracked mode need not remain leading. Degenerate eigenspaces require explicit warnings: one displayed basis vector is not a unique physical prediction.

## 2. Compression and exact invariance

The logical operator is

\[
Q=P^\dagger AP,\qquad Q_{rs}=\frac{1}{\sqrt{n_rn_s}}\sum_{i\in C_r,j\in C_s}A_{ij}.
\]

This compression is defined even when the code is not invariant. The exact invariance condition and the displayed Frobenius residual are

\[
AP=PQ,\qquad R=AP-PQ=(I-\Pi)AP,\qquad \varepsilon_{\rm inv}=\|R\|_F.
\]

The residual measures whether the graph preserves the chosen subspace, in weight units. It is a property of the graph and encoding, not of a particular displayed state, and is not bounded by one. Leakage instead measures the part of a selected state outside that subspace. A graph with zero residual can still have an exterior eigenvector with full leakage. Because \(A\) is Hermitian, an invariant code has an invariant orthogonal complement as well. Its logical eigenvectors then lift to full-graph eigenvectors. Invariance does not imply that a logical eigenvalue is globally leading.

A useful general construction is

\[
A=PQP^\dagger+(I-\Pi)B(I-\Pi),\qquad B=B^\dagger.
\]

It fixes the code action while allowing an exterior operator. For a normalized target \(t\), one possible inverse construction uses

\[
Q=\lambda_0I_d+gtt^\dagger,\qquad g>0.
\]

The target is the unique leading full-graph mode if \(\lambda_0+g\) exceeds both \(\lambda_0\) and the largest exterior eigenvalue. The general construction may require dense, signed, complex, or diagonal weights. It is not an existence claim for every restricted regular, sparse, nonnegative, unweighted, or loop-free graph family. The builder identifies which family is active.

## 3. Fidelity, survival, and leakage

Let \(\phi\in\mathbb C^N\) be a normalized full-network state and \(t\in\mathbb C^d\) a normalized fixed logical target. Define

\[
c=P^\dagger\phi,\qquad s=c^\dagger c,\qquad \ell=1-s=\|(I-\Pi)\phi\|^2.
\]

Here \(s\) is code survival and \(\ell\) is leakage. If \(s>0\), the normalized conditional logical vector is \(\psi_L=c/\sqrt{s}\). Normalizing this retained projection discards information about how much weight was lost. Conditional fidelity describes its direction, so it must be read alongside survival or leakage. This application uses **squared fidelity**:

\[
F_{\rm logical}=|t^\dagger\psi_L|^2,
\qquad F_{\rm full}=|(Pt)^\dagger\phi|^2=sF_{\rm logical}.
\]

The three-part bar has segments

\[
\underbrace{F_{\rm full}}_{\text{target overlap}}+
\underbrace{s-F_{\rm full}}_{\text{other logical content}}+
\underbrace{\ell}_{\text{leakage}}=1.
\]

The middle segment is the weight in logical directions orthogonal to the target. A conditional fidelity of one can coexist with substantial leakage. Conversely, leakage can be zero when the logical direction is wrong.

At zero survival, the conditional vector, conditional density matrix, conditional fidelity, angle, reduced states, and conditional observables are mathematically undefined. The full target fidelity remains defined and is zero. At or below the numerical survival tolerance, the interface also withholds conditional quantities, while full fidelity retains its directly computed value. A zero matrix does not represent a normalized logical state.

The displayed projective angle is

\[
\theta=\arccos|t^\dagger\psi_L|=\arccos\sqrt{F_{\rm logical}}\in[0,\pi/2].
\]

It ignores global phase. For pure one-bit states, the geometric angle between their Bloch vectors is twice this angle.

### Change the comparison target without changing the experiment

The target is a reference vector, not another dynamical variable. A target-only change keeps the graph \(A\), encoding \(P\), and displayed state \(\phi\) fixed and replaces \(t\) by a new normalized vector \(t'\). The new full fidelity is therefore \(|t'^\dagger P^\dagger\phi|^2\). Survival, leakage and the state-selection mode are unchanged. For a leading-mode input, the selected representative is retained even at a tied eigenvalue without freezing its response to later graph edits. A changed score means the same pattern is being compared with a different goal, not that the graph or state improved or deteriorated.

Resetting the comparison target restores the original reference saved for that graph. It does not restore earlier edges or node values. The builder is a separate operation that constructs a new graph around its chosen target. A gate keeps the comparison reference fixed, even though it changes the current state.

## 4. Populations, phase, and mixed states

For \(\phi_v=r_ve^{i\alpha_v}\), node intensity is \(|\phi_v|^2=r_v^2\). Phase is undefined when \(r_v=0\). A common phase on the whole vector changes none of the scores above. Relative phases affect coherent sums.

Community intensity and unnormalized logical population are different:

\[
p_r^{\rm community}=\sum_{v\in C_r}|\phi_v|^2,
\qquad p_r^{\rm logical}=\left|\frac{1}{\sqrt{n_r}}\sum_{v\in C_r}\phi_v\right|^2.
\]

The first set sums to one and the second to \(s\). Cauchy–Schwarz gives \(p_r^{\rm logical}\leq p_r^{\rm community}\). Phase cancellation can erase logical population without changing a single vertex intensity.

For a full normalized density matrix \(\rho\), define

\[
\sigma=P^\dagger\rho P,\qquad s=\operatorname{tr}\sigma,\qquad \rho_L=\sigma/s\quad(s>0).
\]

With the same pure target,

\[
F_{\rm full}=t^\dagger\sigma t=s\,t^\dagger\rho_Lt,
\qquad \mathcal P=\operatorname{tr}(\rho_L^2).
\]

Purity measures mixing within the normalized logical state, not leakage. Every nonzero projected pure vector still has purity one. An ensemble of distinct preparations can have lower purity.

For an ensemble with weights \(p_a\), states \(\phi_a\), projections \(c_a\), and survivals \(s_a\), conditioning the combined mixture once gives

\[
\rho_L=\frac{\sum_a p_ac_ac_a^\dagger}{\sum_a p_as_a}
=\frac{\sum_a p_as_a\rho_{L,a}}{\sum_a p_as_a}.
\]

This is survival-weighted. An equal-weight average of individually normalized projections is generally a different ensemble. Means of scalar scores in the trial table summarize separate trials. Fidelity and purity of the ensemble density matrix describe the combined mixture and can differ from those means.

## 5. Multi-bit state inspection

The logical tensor-product basis is declared by the bit labels. The reduced state of bit \(i\) is \(\rho_i=\operatorname{tr}_{\bar i}\rho_L\). In the standard Pauli convention,

\[
\rho_i=\tfrac12(I+x_iX+y_iY+z_iZ),
\quad x_i=2\Re(\rho_i)_{01},
\quad y_i=-2\Im(\rho_i)_{01},
\quad z_i=(\rho_i)_{00}-(\rho_i)_{11}.
\]

The Bloch view is optional and is not the opening visualization. Bloch-vector length measures purity of the reduced state. It is not a leakage meter. Separate reduced Bloch vectors do not determine a multi-bit state.

The coherent three-bit GHZ vector and its incoherent counterpart illustrate the distinction:

\[
|\mathrm{GHZ}\rangle=\frac{|000\rangle+|111\rangle}{\sqrt2},
\qquad \rho_{\rm mix}=\tfrac12|000\rangle\langle000|+\tfrac12|111\rangle\langle111|.
\]

All single-bit reductions are \(I/2\) in both cases, while the GHZ density matrix has nonzero global coherences between 000 and 111.

For four bits, the analogous GHZ pattern combines 0000 and 1111. The lab computes the full 16-by-16 logical density matrix, four single-bit reductions, and 255 nonidentity Pauli correlations. Five bits extend these to a 32-by-32 density matrix, five reductions, and 1023 nonidentity Pauli correlations. In general there are \(4^k-1\) nonidentity Pauli strings. These quantities remain conditional on nonzero survival.

The application can display Pauli-string expectations \(\operatorname{tr}(\rho_LO)\), reduced entropy \(S(\rho_i)=-\operatorname{tr}(\rho_i\log_2\rho_i)\), and negativity for each single-bit cut:

\[
\mathcal N_i=\frac{\|\rho_L^{T_i}\|_1-1}{2}.
\]

For a pure global logical state, positive reduced entropy certifies entanglement across that cut. For a mixed global state, reduced entropy alone does not. For four bits, the lab also reports the three distinct two-bit versus two-bit cuts: 01|23, 02|13, and 03|12, where these numbers label bit positions. Five bits have fifteen distinct cuts: five one-versus-four and ten two-versus-three partitions. Positive negativity certifies entanglement, but zero negativity is not a general separability certificate in these larger dimensions. These statements concern the declared encoded tensor product, not spatial separation of physical parties or an actual Bell test.

## 6. Matrix blocks and dynamics diagnostics

For the block \(A_{rs}\) between communities \(r,s\), the application uses

\[
W_{rs}=\|A_{rs}\|_F,
\qquad \chi_{rs}=\frac{|\sum_{ij}(A_{rs})_{ij}|}{\sum_{ij}|(A_{rs})_{ij}|},
\qquad C_{rs}=|Q_{rs}|.
\]

* \(W_{rs}\) measures microscopic weighted strength before phase cancellation.
* \(\chi_{rs}\) measures weighted phase alignment. It lies in \([0,1]\) for a nonempty weighted block and is undefined when every entry is zero.
* \(C_{rs}\) measures effective coupling between normalized uniform community patterns. It is in weight units and is not a probability.

All three are single-snapshot metrics. Their time traces, finite-window averages, and frequency spectra require multiple checkpoints. A block can have large \(W_{rs}\), zero \(\chi_{rs}\), and zero \(C_{rs}\). A block-summary heatmap is not interchangeable with the compression \(Q\).

Block density counts entries above the numerical nonzero threshold divided by \(n_rn_s\). On diagonal blocks this convention includes diagonal entries and counts the two entries of an off-diagonal Hermitian pair separately. It is a matrix-entry density, not a simple-graph edge probability.

The magnetizations use the conditional normalized logical state:

\[
m_i=\operatorname{tr}(\rho_LZ_i),\qquad M_z=\frac1k\sum_i m_i.
\]

The expectation of the lifted full-space observable \(PZ_iP^\dagger\) is \(s m_i\). The extra factor of survival distinguishes these two valid conventions. The displayed conditional magnetizations are undefined at zero survival.

These block measures match Equations 14–17 in **Quantum dynamics of spin systems using QL-resources** ([source record](#ql-dynamics-source-record)). Its Supplementary Information §3 follows their long-time traces and frequency content. In the lab, inspect these measures in Advanced **Matrix** and follow their computed time traces in **Evolve**. Magnetization and its finite-window average connect the encoded state to the dynamics comparison.

The paper uses a Hadamard-related collective-state basis for its gate conventions, whereas the lab labels its logical coordinates directly by normalized community indicators. A passive Hadamard basis conversion changes state coordinates, operators, targets, and observables together. It is different from clicking **H** as an active gate. The paper’s full-graph gate lift also acts on intra-block directions through its tensor-product construction. This lab uses a lift that is identity outside the synchronized subspace. The two agree on the declared encoded action after consistent basis conversion, but need not produce the same microscopic block-strength trajectory. These tools explore the paper’s diagnostics on the chosen lab model, rather than reproducing every plotted network and lift from the manuscript.

## 7. State evolution, graph evolution, and gates

### Graph gates carry the encoded eigenvectors

A graph gate starts with a logical unitary \(U\). The lab extends it to the full node space as

\[
V=PUP^\dagger+(I-\Pi).
\]

This acts as \(U\) on the encoded coordinates and as identity on the orthogonal complement. The primary gate operation conjugates the graph:

\[
A'=VAV^\dagger.
\]

Its action on encoded eigenvectors follows from this transformation. If \(A\phi=\lambda\phi\), then

\[
A'(V\phi)=VAV^\dagger V\phi=VA\phi=\lambda(V\phi).
\]

Every eigenvector is carried to an eigenvector of the transformed graph with the same eigenvalue. The displayed state changes to \(V\phi\) so that the interface follows this corresponding pattern. This is graph programming, not a claim that changing couplings makes a physical system relax into that pattern. A saved prepared state is transformed by the same algebraic rule, but it need not have been an eigenvector.

The **Graph and state** option performs this coordinated transformation. It can require dense, signed, complex, or diagonal weights. If \(V\) commutes with \(A\), the conjugation leaves the graph unchanged. The encoding and comparison target stay fixed, so a changed target fidelity reflects the transformed state relative to the original reference.

The optional **State only** comparison applies \(\phi'=V\phi\) while retaining \(A\). It is an algebraic and numerical comparison that separates transforming the displayed vector from conjugating the graph. It does not specify a physical operation on a fixed device, and the transformed vector need not be an eigenvector of the unchanged graph. Both options give the same immediate state from the same starting point, but only graph conjugation transports the graph's eigenvectors by construction.

Because \(V\) commutes with \(\Pi\), both options preserve survival and leakage of the transformed state. Under graph conjugation,

\[
Q'=UQU^\dagger,\qquad R'=RU^\dagger.
\]

Thus the invariance residual norm is also preserved. This is a graph-subspace statement, separate from the preserved leakage of a particular state. Target fidelity can change even when both quantities are unchanged.

A CZ gate changes the sign of amplitudes whose selected pair of bits is 11. Applied to a balanced \(k\)-bit state with \(k\geq2\), it gives overlap amplitude \(1-2/4=1/2\) with that unchanged balanced target, hence fidelity \(1/4\). It leaves survival one and conditional fidelity defined. Starting with zero survival is different: every lifted logical gate preserves that zero survival, so conditional fidelity remains undefined after CZ or any other such gate.

Local H, X, Y, Z, S, and T gates can be applied to any selected subset of distinct bit positions at once. H denotes the Hadamard gate throughout this guide. Their tensor-product factors commute because they act on different bits. A single-bit gate has no separate controlled-gate target selector. CNOT and CZ use distinct control and target bits, while SWAP exchanges a pair. Bit 0 is the leftmost bit in the labels. These gates act on the encoded tensor-product factors, not on single graph vertices.

### Continuous graph conjugation and auxiliary state evolution

A chosen Hermitian generator \(G\) defines a continuous unitary family

\[
V(\tau)=e^{-iG\tau},\qquad A(\tau)=V(\tau)A(0)V(\tau)^\dagger.
\]

This graph trajectory preserves its full spectrum and Frobenius norm. It carries every initial eigenvector \(\phi(0)\) to \(V(\tau)\phi(0)\) with the same eigenvalue. The lab follows that transformed state alongside the graph. If \(G=A(0)\), conjugation is stationary because the adjacency matrix commutes with its exponential. A different, noncommuting generator is needed to change the graph.

The auxiliary state-only evolution experiment instead keeps the graph fixed and computes

\[
\phi(\tau)=e^{-iG\tau}\phi(0),\qquad A(\tau)=A(0).
\]

This follows the explicitly chosen linear evolution rule from a saved initial vector. The adjacency matrix is the generator only when that model is selected. An eigenvector of a fixed generator gains only a global phase, so its intensities and projective direction remain fixed. A superposition of its eigenvectors can change relative phases and group populations. Neither this calculation nor graph conjugation models relaxation into a new leading eigenvector.

A run starts from the exact displayed state of its selected checkpoint. This matters when an eigenvalue is degenerate, because recomputing an eigenbasis could choose a different representative. The target remains fixed throughout the trajectory. A demonstration that prepares a different initial pattern records that preparation before the evolution begins.

A custom matrix may use logical alternative order or full-network node order. A Hermitian logical generator \(G_L\) is lifted as \(G=PG_LP^\dagger\). Its exponential is \(Pe^{-iG_L\tau}P^\dagger+(I-\Pi)\), which preserves code survival. For an initially invariant graph, its conjugation preserves invariance. A general full-space generator can mix the code and complement.

The input dimension normally distinguishes logical and full-network generators. When each community contains one node and the dimensions coincide, the ordering control makes the intended interpretation explicit. The resolved ordering is saved with the trajectory. Here \(\tau\) is model time, distinct from the comparison target \(t\).

The transverse-field Ising option uses an open chain:

\[
G_L=-J\sum_{i=1}^{k-1}Z_iZ_{i+1}-h\sum_{i=1}^k X_i.
\]

Exact steps use a matrix exponential. The product-formula option uses a symmetric second-order sequence of half-steps through the individual Pauli terms and back in reverse order. The difference from the exact result measures its finite-step error. A smooth animation can still correspond to an inaccurate approximation. Temporal noise is a sequence of recorded graph perturbations between time steps, not a continuum stochastic differential equation. A run with \(K\) checkpoints includes \(\tau=0\) and \(\tau=T\), with \(K-1\) intervals. Each interval evolves using its current generator, then applies its recorded graph perturbation before the next interval. When G = A, that changed adjacency drives the next state update. An externally specified fixed generator does not change when these kicks change A. Noise amplitude is per kick, so changing K also changes the discrete noise experiment. Zero-duration noisy runs are rejected.

Exact matrix-exponential steps are used unless the second-order logical product formula is selected. The latter is available for the built-in X, Z and Ising generators. Their finer-step comparison returns to the saved original state and generator, irrespective of later edits to the setup form. Graph spectra and Frobenius norms are conserved by unitary conjugation alone. Added temporal perturbations need not preserve either invariant. An unconverged trajectory is rejected. A completed run is kept temporarily by default, independently of experiment history. Saving all its samples to history is optional. That save is checked atomically, so a history-capacity failure leaves the complete computed run available in memory for inspection or download without partially filling history.

### Sampling and run capacity

A run records actual computed states at equally spaced times, including both endpoints. With \(K\) checkpoints and duration \(T\), the spacing is \(\Delta\tau=T/(K-1)\). These samples are separate from display animation. A progress update counts completed checkpoints, while preparation or a single expensive eigensolve may take time without advancing that count.

The allowed checkpoint count scales with the full node count \(n\) and logical dimension \(d=2^k\). The current implementation estimates a working cost per retained frame of

\[
b(n,k)=32n^2+128d^2+128n+2048k+16384\quad\text{bytes}.
\]

It budgets 256 MiB for a run, rounds the corresponding frame count down to a multiple of 16, and caps it at 1024 frames. Small graphs can therefore request up to 1024 checkpoints. A 128-node, four-bit graph allows 448, while a 256-node, five-bit graph allows 112. This is a conservative working-memory estimate that includes room for copies and numerical arrays. It is not a measurement of available device memory or a speed guarantee.

Run capacity and portable experiment-history capacity are separate. A temporary run can retain more samples than would fit in the current history. Download the complete run to preserve its recorded graphs, states, settings and diagnostics, or save selected samples to history. Temporary results can disappear when the run is replaced, an experiment is imported, a new session starts, or the page reloads. A CSV download preserves plotted values, not the complete experiment needed to reproduce them.

## 8. Frequency analysis and time averages

For \(N_s\) equally spaced samples with positive spacing \(\Delta\tau\), the analysis removes a least-squares linear trend and applies a symmetric Hann window

\[
w_j=\tfrac12\left(1-\cos\frac{2\pi j}{N_s-1}\right).
\]

It computes a discrete Fourier transform and a one-sided periodogram. Frequencies are cycles per model-time unit, not angular frequencies. For a signal proportional to \(\cos(\omega\tau)\), the corresponding frequency is \(f=\omega/(2\pi)\). Frequency bins are \(f_k=k/(N_s\Delta\tau)\). The Nyquist frequency is \(1/(2\Delta\tau)\). The bin spacing is \(1/(N_s\Delta\tau)\), while the first-to-last sample span is \((N_s-1)\Delta\tau\). The sample span is shorter than the Fourier normalization window by one time step. A Hann window broadens peaks, so bin spacing alone is not a guarantee that nearby physical frequencies can be resolved.

The optional paper-style comparison uses the periodic Hann window \(w_j=\tfrac12[1-\cos(2\pi j/N_s)]\), matching the dynamics Supplementary Information, instead of the default symmetric window above. Its relative-power view omits DC and divides each nonzero-frequency power by that trace’s largest nonzero-frequency bin power. This comparison highlights peak locations within one trace rather than absolute power between traces. Constant and trend-only traces have no meaningful nonzero peak to normalize. The adaptive run limit above permits more samples on smaller graphs, but matching the paper’s sampling also requires its duration, spacing, generator, initial state and observable. The periodic window alone does not reproduce the paper’s experiment.

Interior positive-frequency bins are doubled in the one-sided spectrum. DC and an even-length Nyquist bin are not. The power-density normalization is proportional to

\[
\frac{\Delta\tau\,|X_k|^2}{\sum_jw_j^2}.
\]

The amplitude display uses coherent-gain normalization by \(\sum_jw_j\). At least four finite samples are required. A zero-duration run has no valid frequency spectrum. An undefined observable is a missing sample, not a measurement of zero.

The reported peaks are local maxima of the nonzero-frequency spectrum. Adjacent bins around one Hann-broadened peak are not reported as separate modes. A constant trace has no resolved oscillation. A straight trend also has none after detrending. By default, variations at or below \(128\epsilon_{\rm mach}\max(1,\max_j|y_j|)\) are treated as numerical residue, where \(\epsilon_{\rm mach}\) is double-precision machine epsilon. The numerical API accepts an explicit absolute tolerance when studying smaller signals. Suppressed numerical peaks are not interpreted as evidence that the exact mathematical signal is identically constant.

### A frequency example with a known answer

The repeating-pulse example in **Optional state-only comparisons** prepares \(|0\cdots0\rangle\) as a comparison vector and uses the separately chosen logical generator

\[
G_L=\frac{\pi}{4}\sum_{j=0}^{k-1}X_j.
\]

Each bit then has \(\langle Z_j(\tau)\rangle=\cos(\pi\tau/2)\), so the displayed average 0-versus-1 balance is the same cosine for every register size. Its period is 4 model-time units and its frequency is 0.25 cycles per model-time unit. The example samples every 0.5 time unit and uses 128 checkpoints, or 112 for the largest five-bit graph, so that frequency falls exactly on a Fourier bin. These are full-network computed states under the stated auxiliary evolution rule. The graph, target and encoded weight stay fixed, while the amplitudes rotate. This example does not assume a physical mechanism for preparing or directly controlling those amplitudes. In particular, a flat leakage trace is expected here and is a useful contrast with the oscillating balance.

Norms, magnitudes, squared amplitudes, and other nonlinear observables can generate harmonics and combination frequencies. A peak in such a trace does not by itself identify an independent eigenmode. Finite-window time averages use the trapezoidal rule over the computed checkpoints and are not labeled as infinite-time limits.

## 9. Controlled failures

These examples expose different failure mechanisms. Each intervention records its matrix change and any state-preparation change. Each construction below assumes that its graph family permits the indicated weights.

### 9.0 The exact opening comparison

The opening example starts from an eight-vertex base with two communities of size four:

\[
A_0=\begin{pmatrix}B_0&J_4/4\\J_4/4&B_0\end{pmatrix},
\qquad (B_0)_{01}=(B_0)_{10}=(B_0)_{23}=(B_0)_{32}=3,
\]

with all other entries of \(B_0\) zero. Its logical compression is \(Q=\begin{pmatrix}3&1\\1&3\end{pmatrix}\), with target \(|+\rangle\) at eigenvalue four. The default 32-node graph uses the blowup \(A_0\otimes J_4/4\). Every intervention is lifted by the same tensor factor, whose Frobenius norm is one. The additional clone directions have eigenvalue zero. Community membership follows the original two groups.

For the base graph, write \(s=(1,1,-1,-1)^T\), and define the three perturbations

\[
\Delta_{\rm tilt}=\operatorname{diag}\left(\frac{J_4-I_4}{\sqrt6},-\frac{J_4-I_4}{\sqrt6}\right),
\]

\[
R=\frac{s\mathbf1^T+\mathbf1s^T}{4},\qquad
\Delta_{\rm leak}=\begin{pmatrix}0&R\\R^T&0\end{pmatrix},
\]

\[
\Delta_{\rm rival}=\operatorname{diag}\left(\sqrt{8/3}\,B,0\right),
\quad B_{ij}=\begin{cases}
0&i=j,\\
1/2&i\ne j\text{ and }s_i=s_j,\\
-1/4&s_i\ne s_j.
\end{cases}
\]

All three have \(\|\Delta\|_F=2\). Applied independently to the original graph at strength one, they give the following unique leading-mode outcomes:

| Intervention | Conditional fidelity | Leakage | Full target fidelity |
|---|---:|---:|---:|
| Tilt | \(\tfrac12(1+\sqrt{2/5})\approx0.816228\) | 0 | \(\approx0.816228\) |
| Leakage | 1 | \(\tfrac12(1-1/\sqrt5)\approx0.276393\) | \(\approx0.723607\) |
| Rival | Undefined | 1 | 0 |

The rival eigenvalue is \(3+\sqrt{8/3}\approx4.632993\), and its crossing with the logical leader occurs at intervention strength \(\sqrt{3/8}\). The opening rival perturbation is balanced and loop-free. It introduces signed edges. The logical operator remains unchanged. The opening leakage intervention also leaves \(Q\) unchanged, but its invariance residual has Frobenius norm \(\sqrt2\) at strength one.

Opening example buttons compare interventions against the same original baseline rather than accumulating all three. A switch from one intervention to another can therefore have an actual graph-to-graph edit norm different from two. The comparison-budget label describes baseline-to-example distance. The recorded edit norm describes the transition actually made. General current-graph examples use their stated weighted transformations and report their realized outcomes instead of borrowing these exact opening percentages.

The four-edge preservation challenge uses a separate deterministic swap on the 32-node opening. With zero-based indices, remove the weight-0.75 edges \((0,4)\) and \((8,12)\), and add weight-0.75 edges \((0,8)\) and \((4,12)\). All four vertices lie in the first community. Every vertex retains its weighted sum to each community, so \(Q\), invariance, and the global uniform target remain unchanged. The graph stays nonnegative and connected through its cross-community edges, hence its positive row-sum-four eigenvector remains the unique leading mode. The full solver verifies zero leakage, full fidelity one, and a leading gap of one. The challenge counts the union of changed unordered pairs against its saved original checkpoint. Reverting or splitting a change into several actions does not reset that budget. The four swaps at full strength are a proven feasible solution, not an optimality claim.

### 9.1 Rotate within the code

For Hermitian \(D\), set

\[
A'=A+PDP^\dagger.
\]

For the general **Tilt the state** button, the app uses \(D=(2a/\sqrt d)(Z\otimes I_{d/2})\), where \(a\) is the selected strength. Thus \((PDP^\dagger)_{ij}=D_{rr}/n_r\) when \(i,j\in C_r\), and zero for different communities. This adds identical weights across each diagonal block, positive for groups whose first bit is 0 and negative for those whose first bit is 1. Diagonal node weights are included. The opening example instead uses the loop-free recipe above.

The logical action changes to \(Q+D\), while the code/exterior coupling is unchanged. On an initially invariant graph this can rotate a selected logical eigenvector away from the target without creating leakage.

### 9.2 Couple a logical mode to an exterior mode

Let \(u=Pa\), \(P^\dagger w=0\), and \(\|u\|=\|w\|=1\). Set

\[
A'=A+\eta(uw^\dagger+wu^\dagger).
\]

The general **Make it leak** button chooses \(u=Pt\) from the current comparison target. It chooses \(w\) to maximize the Rayleigh quotient on the exterior subspace, by solving its compression \((I-\Pi)A(I-\Pi)\). In the implementation the code block is shifted below the exterior spectrum before solving the full matrix, then roundoff in the code directions is removed. At a tied exterior eigenvalue, the solver selects one representative. This is a deterministic construction from the saved graph, subject to eigensolver tolerance, rather than random edge damage.

The coupling amount is \(\eta=a\max(0.5,|u^\dagger Au-w^\dagger Aw|)\). Each edited entry receives \(\eta(u_i\overline{w_j}+w_i\overline{u_j})\), so the pattern of edge changes follows the two selected node patterns. This may include diagonal changes.

Then \(P^\dagger A'P=Q\), but code/exterior coupling changes by \(\eta wt^\dagger\). Existing coupling can reinforce or cancel part of that added term. If the relevant eigenvector retains only direction \(u\) inside the code, its conditional logical fidelity to \(a\) is one despite leakage. An adjacency edit alone would retain a prepared state. This named example explicitly selects the edited graph’s leading mode, and its actual leakage is recomputed rather than assumed from the construction.

### 9.3 Raise an exterior mode

If \(Aw=\nu w\) with \(P^\dagger w=0\), apply

\[
A'=A+\tau ww^\dagger.
\]

This leaves \(Q\) and invariance unchanged while replacing eigenvalue \(\nu\) by \(\nu+\tau\). Once that eigenvalue strictly exceeds all others, a leading-mode experiment selects a state entirely outside the code. At the crossing, the leading eigenspace is degenerate and conditional metrics depend on the displayed representative.

The general **Raise a rival** button uses the same leading exterior-compression vector \(w\) as above. It sets

\[
\tau=a\left[\lambda_{\max}(A)-w^\dagger Aw+\max(1,0.1\|A\|_F)\right].
\]

At \(a=1\), the new Rayleigh value of \(w\) exceeds the old leading eigenvalue. When the original code was invariant, the logical spectrum is unchanged, while some exterior eigenvalue now exceeds the previous full-graph maximum. The new leading mode is therefore exterior. Without original invariance, the leading state can mix code and exterior content, and the displayed leakage must be read from its computed vector. The entry-level change is \(\Delta A_{ij}=\tau w_i\overline{w_j}\).

The general rank-one update can create diagonal or signed weights. Strict exterior dominance cannot occur while retaining all of nonnegative symmetric weights and an exactly invariant normalized-indicator community encoding: the Perron eigenvalue is represented in the quotient. This demonstration uses a broader weighted graph class that permits signed or diagonal weights.

### 9.4 Change phases while preserving intensities

The default within-community phase example transforms the graph and its selected state together. Let \(D\) be diagonal with \(D_{ii}=e^{i\alpha_i}\). Then

\[
A'=DAD^\dagger,\qquad \phi'=D\phi,\qquad
A'_{ij}=e^{i(\alpha_i-\alpha_j)}A_{ij}.
\]

Node intensities and edge magnitudes stay fixed, while relative node phases and the phases of connections can change. The graph spectrum is preserved. If \(\phi\) is an eigenvector of \(A\), then \(D\phi\) is an eigenvector of \(A'\) with the same eigenvalue. The example retains the starting state-selection mode. Later ordinary graph edits recalculate a leading eigenpattern in leading mode and hold the vector fixed only in explicitly prepared-state mode.

Within each community, the example gives one half phase \(+\theta\) and the other phase \(-\theta\). A leftover node in an odd-sized community receives phase zero. For an initially code-supported state with equal halves in every occupied community,

\[
P^\dagger\phi'=\cos\theta\,P^\dagger\phi,
\qquad s'=\cos^2\theta,\qquad \ell'=\sin^2\theta.
\]

Unlike a lifted logical gate, these phases vary inside a community. Therefore \(D\) need not preserve the fixed encoding subspace, and leakage can change even though the graph spectrum and every node intensity are unchanged. Until survival reaches zero, the retained logical direction is unchanged up to global phase. At zero survival, conditional fidelity is undefined and full target fidelity is zero. Odd-sized or unequal splits need their directly computed values rather than this equal-half formula.

An optional state-only comparison applies \(D\phi\) with \(A\) fixed and stores it as a prepared state. It has the same immediate node intensities and state diagnostics from the same starting vector, but it does not transport the graph's eigenvectors. The default graph transformation and this auxiliary comparison are distinct operations.

## 10. Random damage and budgets

Each intervention distinguishes:

1. **Eligibility:** existing edges, absent edges, internal blocks, cross-community blocks, or a selected block pair.
2. **Selection:** typically an independent Bernoulli mask with parameter \(p\).
3. **Distribution:** the error value for a selected entry.
4. **Correlation:** independent draws or a shared block-level draw.
5. **Action:** addition, deletion, multiplicative scaling, sign flip, phase error, or constrained rewiring.

An unordered off-diagonal pair is sampled once, and its conjugate is set simultaneously. The same graph model is used for calculation regardless of whether some of those edges are hidden in the renderer. In the block-correlated option, the selection decision and error value are both shared across an unordered community block pair.

All base distributions are standardized to mean zero and variance one before the transform \(X=\mu+mZ\). Thus the magnitude \(m\) is the standard deviation of the error before the selected damage action, rather than a distribution-dependent half-width. The standardized options are:

| Option | Standardized variable \(Z\) |
|---|---|
| Gaussian | \(\mathcal N(0,1)\) |
| Uniform | Uniform on \([-\sqrt3,\sqrt3]\) |
| Laplace | Location zero, scale \(1/\sqrt2\) |
| Sparse spikes | Values \(-\sqrt{10},0,+\sqrt{10}\) with probabilities \(0.05,0.9,0.05\) |
| Lognormal deviations | \((e^G-e^{1/2})/\sqrt{e(e-1)}\), with \(G\sim\mathcal N(0,1)\) |

The lognormal option is a **centered deviation**, not a raw positive lognormal factor. Multiplicative damage uses factor \(1+X\), which can become negative. Additive damage adds a real-weight error. Phase damage uses \(X\) as an angle in radians and multiplies by \(e^{iX}\). A deletion probability has no continuous weight magnitude. Sign flip acts on the full complex weight by multiplication by \(-1\). Neither is equivalent to adding a fixed real number. Deletion, sign flips, and degree-preserving rewiring ignore the distribution and magnitude controls. Rewiring uses eligible equal-real-weight double-edge swaps to preserve degree. It is not an unrestricted weighted randomization.

The damage norm is

\[
b=\|\Delta A\|_F=\sqrt{\sum_{i,j}|\Delta A_{ij}|^2}.
\]

An off-diagonal Hermitian pair contributes \(2|\Delta A_{ij}|^2\). A diagonal change contributes once. A norm budget and an edge-count budget are separate quantities. Rescaling an entire realized perturbation to a chosen norm conditions the noise collectively and changes its original marginal distribution. For example, rescaling a deletion can turn complete removal into a partial weight change. The realized final edits show which operation actually occurred.

Random seed, generator version, input ordering, and full configuration are required to regenerate draws. Replay instead uses the stored realized edits, which is stronger than saving a seed alone. Every **Compare** trial begins from the same immutable starting checkpoint and applies its damage recipe once. Parameter sweeps default to common random numbers from that baseline, and optionally use different seeds at each sample. Ensembles use different reproducible seeds with the other settings fixed. These are independent experiments rather than cumulative damage. Leading-mode experiments select each damaged graph’s leader, while prepared-state experiments retain their current state, so graph edits alone need not change instantaneous state-based scores.

Deletion, sign flips and rewiring draw only their Bernoulli connection selections. Distribution, magnitude and mean do not consume random numbers or affect these operations. The repaired selection stream is recorded as `mulberry32-bernoulli-v2`. A fresh run from an older seed can therefore differ from version 1.5.0, whose unused amplitude draws changed selection. Imported graphs, recorded edits and saved history keep their original values. Amplitude-based operations retain their previous random stream.

If a damaged graph has no resolved unique leading eigenvector, **Compare** does not treat one arbitrary eigensolver representative as the experiment's determined state. Ordinary fidelity, leakage and state-purity columns are left undefined for that trial, and those values are omitted from state summaries with explicit inclusion counts. Graph statistics remain available. If any ensemble trial has this ambiguity, the ensemble density matrix is withheld. An explicitly prepared state remains determined even when the graph has repeated eigenvalues. Inspection can show a labeled numerical representative, but adopting it does not remove the ambiguity.

Comparison rows save the exact configuration, sample index and seed together with a fingerprint of their baseline. Inspecting a row reconstructs its realized graph without editing history. Choosing **Use this outcome** stores that graph as a child of the comparison’s original checkpoint. It does not apply another perturbation to whichever graph is currently on screen.

## 11. Eigenvalue-response tomography

For a simple isolated eigenvalue \(\lambda\) and normalized eigenvector \(\phi\), the Hellmann–Feynman derivative is

\[
\left.\frac{d\lambda(A+\epsilon B)}{d\epsilon}\right|_{\epsilon=0}=\phi^\dagger B\phi.
\]

For a code-supported probe \(B=PMP^\dagger\), the derivative equals \(\operatorname{tr}(\sigma M)\) with \(\sigma=P^\dagger|\phi\rangle\langle\phi|P\). Dividing by measured survival \(s\) gives the conditional observable. The derivative contains the survival factor. Dividing it by survival changes an unconditioned expectation into a conditional one.

The application uses central finite differences, matching the perturbed branch by overlap with the original full-graph eigenvector. It probes diagonal projectors and two off-diagonal Hermitian directions:

\[
M_i=|i\rangle\langle i|,\quad
M_{ij}^{R}=|i\rangle\langle j|+|j\rangle\langle i|,\quad
M_{ij}^{I}=i|i\rangle\langle j|-i|j\rangle\langle i|.
\]

The corresponding conditional expectations give \((\rho_L)_{ii}\), \(2\Re(\rho_L)_{ij}\), and \(2\Im(\rho_L)_{ij}\), respectively. There are \(d^2\) real measurements before accounting for trace redundancy. The imaginary probe convention above is the negative of the usual Pauli \(Y\) on its two-coordinate subspace, which explains its positive sign for \(\Im\rho_{ij}\).

Read a probe row through these conversions:

| Quantity | Definition | Meaning |
|---|---|---|
| Raw finite slope | \(r_\mu=[\lambda_+(\epsilon)-\lambda_-(\epsilon)]/(2\epsilon)\) | Approximate full-state response to the lifted probe |
| Conditional response | \(d_\mu=r_\mu/s\) | Response after accounting for code survival |
| Diagonal entry estimate | \(\widehat\rho_{ii}=d_i\) | Population of one logical basis pattern |
| Real off-diagonal estimate | \(\Re\widehat\rho_{ij}=d^R_{ij}/2\) | Half of the symmetric probe response |
| Imaginary off-diagonal estimate | \(\Im\widehat\rho_{ij}=d^I_{ij}/2\) | Half of the imaginary probe response, with the stated sign convention |

For example, an ideal Bell pattern with coherence \(\rho_{01,10}=1/2\) has a corresponding real off-diagonal response of 1. That response measures both conjugate entries at once. It is not a conflicting estimate of a single matrix cell. Each perturbed branch overlap, its eigenvalue, and the direct expected response help distinguish this conversion from finite-probe error.

For numerical evaluation, the lab writes the supplied graph as

\[
A=\gamma I+K,\qquad
\gamma=\tfrac12\left(\min_i A_{ii}+\max_i A_{ii}\right).
\]

It forms the centered probe graphs \(K_\pm=K\pm\epsilon B\) before restoring any common offset. If their matched eigenvalues are \(\kappa_\pm\), the finite response is computed as

\[
r_\mu=\frac{\kappa_+-\kappa_-}{2\epsilon},\qquad
\lambda_\pm=\gamma+\kappa_\pm.
\]

The common shift cancels exactly in the mathematical response. Keeping it separate in the calculation prevents a large diagonal from rounding away the small probe or overwhelming a gap test. Branch matching still uses the full eigenvector overlap, so centering does not replace the full graph with a quotient approximation. For example, \(A=X+10^9I\) has the same isolated-mode gap and probe responses as \(X\).

Eligibility checks use the same centered representation. With \(\kappa=\phi^\dagger K\phi\), the normalized eigenstate residual is \(\|K\phi-\kappa\phi\|/\|K\|_F\), with a numerical threshold of \(10^{-7}\). The isolation test counts centered eigenvalues within \(10^{-8}\max_j|\kappa_j|\) of the selected value. A common diagonal shift therefore does not loosen the eigenstate tolerance or change which eigenvalues the isolation test treats as distinct. A scalar matrix has a genuinely repeated eigenvalue and is rejected by the isolation test.

Exports contain the original graph and absolute eigenvalues alongside \(\gamma\), the centered base and probe graphs, and \(\kappa_\pm\). The centered quantities reproduce the measured slope. Absolute graphs and eigenvalues are convenience views that can round together at large offsets. The input is still a finite-precision matrix, so differences already lost while entering its diagonal cannot be recovered. A probe that is too small relative to the centered graph can also suffer cancellation or solver error.

Finite probes deform the eigenstate. Large probes can follow the wrong branch or incur truncation bias. The output reports branch overlap, trace, least eigenvalue, and reconstruction error. It does not silently clip negative reconstructed eigenvalues or renormalize the trace. Degenerate eigenvalues, non-eigenstate prepared states, and negligible survival invalidate this scalar derivative protocol and are rejected or flagged.

### 11.1 Ten-probe two-bit measurement readout

The optional Bell readout follows the elementary-response construction in Xie, Dickey, Taimoor and Kais, [**Dynamical Readout of Measurement Statistics and Emergent Entanglement-Like States in Classical Networks**](https://arxiv.org/abs/2609.14620), Equations 8–15 and Supplementary Information. It is distinct from the complex tomography above.

Four diagonal probes \(M_i=|i\rangle\langle i|\) and six real symmetric probes \(M_{ij}=|i\rangle\langle j|+|j\rangle\langle i|\) span real symmetric 4-by-4 matrices. For a real leading logical state they read the four diagonal density entries and twice each of the six real off-diagonal entries. Ten responses suffice for this sector. They do not determine the imaginary coherences of a general complex state.

The demonstration uses a 32-node weighted graph \(A=PQP^\dagger\), with eight nodes per community. The Bell reference uses the paper’s exact quotient

\[
Q=\begin{pmatrix}20&10&-10&8\\10&30&20&-12\\-10&20&30&12\\8&-12&12&25\end{pmatrix},\qquad
|\Psi^+\rangle=(|01\rangle+|10\rangle)/\sqrt2.
\]

This is a weighted miniature, not the paper’s original 200-node signed regular graph. The lab probes \(B_\mu=PM_\mu P^\dagger\), which have exactly the desired compressed action but can use dense weights and diagonal entries instead of the paper’s regular matching perturbations. Its default forward probe response is

\[
d_\mu=\frac{\lambda_{\max}(A+\epsilon B_\mu)-\lambda_{\max}(A)}{\epsilon s}.
\]

The reference examples have \(s=1\). If the current real graph has a leaky dominant mode, division by \(s\) conditions its response on the retained part. The tool requires a simple leading eigenvalue and checks that the chosen current state is that dominant mode.

Spectral readout applies the same centered construction as tomography. It solves \(K\) and \(K+\epsilon B_\mu\), then subtracts their leading eigenvalues before dividing by \(\epsilon s\). Its leading-gap check and its check for forbidden imaginary weights use the centered graph as well. A large real diagonal cannot hide a repeated leading eigenvalue or make a complex graph qualify for this real protocol.

Growth readout estimates the response through actual full-network trajectories from the same seeded initial vector for every probe. Numerically it separates the common exponential factor:

\[
\dot w=Kw,\qquad v(\tau)=e^{\gamma\tau}w(\tau),\qquad
\log\|v(\tau)\|=\gamma\tau+\log\|w(\tau)\|.
\]

Rescaling after every RK4 step prevents overflow in the evolving vector, while accumulated scale changes recover the centered log norm. The growth estimator chooses its integration step count from the centered operator's row-sum bound, without diagonalizing it. A straight-line fit to the final half gives a slope \(g_0\) for the base graph and \(g_\mu\) for each centered probe graph. The measured response uses \((g_\mu-g_0)/(\epsilon s)\), so it never subtracts two huge rounded absolute rates. The common \(\gamma\) is the same across this comparison, and the plot displays \(\log\|v\|-\gamma\tau\) to keep the probe differences visible.

The export retains both the centered slopes and trajectories and their restored absolute versions. Restored values can lose small differences through rounding, so calculations should use the recorded offsets. Runs whose common growth factor exceeds the numerical range are rejected. Independent spectral values remain a validation comparison, not a substitute for the measured growth slopes. Finite integration time, step size, a small spectral gap, and precision already lost in the supplied graph can all affect the estimate.

For outcomes \(a,b\in\{-1,+1\}\), the measurement settings are

\[
A(\alpha)=\cos\alpha\,Z+\sin\alpha\,X,\qquad
B(\beta)=\cos\beta\,Z-\sin\beta\,X,\qquad
\Pi_{ab}=\frac{I+aA(\alpha)}2\otimes\frac{I+bB(\beta)}2.
\]

The diagonal and upper-triangular entries of \(\Pi_{ab}\) are its coefficients in the ten-probe basis. Their linear combination gives raw reconstructed values \(\widetilde p_{ab}\). Following the paper’s Equation 12, these are divided by their sum over the four outcomes at each setting. The interface displays both raw and normalized values, all coefficients, and exact comparison probabilities. Negative values are not clipped into valid probabilities.

The correlation is \(C_{xy}=\sum_{a,b}ab\,p(a,b|x,y)\), and \(S=C_{00}+C_{01}+C_{10}-C_{11}\). The default angles are \(\alpha_0=0\), \(\alpha_1=\pi/2\), \(\beta_0=\pi/4\), and \(\beta_1=-\pi/4\). At \(\epsilon=1\), the spectral Bell reference yields \(|S|\approx2.8017\), consistent with the finite-shift benchmark. The ideal value is \(2\sqrt2\). The product reference uses these same displayed angles, not a separate optimization over settings. Moving the angles recombines the saved ten responses without new graph probes.

As in the paper, this is a benchmark of reconstructed encoded statistics. The graph does not realize independent local measurements on spatially separated parties or measurement-induced collapse, so a value above two is not evidence of physical Bell nonlocality.

## 12. Repairs and inverse design

The balance repair uses

\[
A_{\rm bal}=\Pi A\Pi+(I-\Pi)A(I-\Pi).
\]

It removes only logical/exterior cross-couplings, preserving \(Q\) and the exterior compression. It establishes invariance but does not choose the target eigenvector or force logical spectral dominance. It can create dense or signed edges and diagonal terms.

A target repair additionally replaces the logical action with a rank-one target operator whose positive eigenvalue exceeds a bound on the exterior spectrum. The bound used here is \(\|A\|_F+1\). It then selects the repaired leading mode. This is an unconstrained weighted repair, not a solution to a fixed edge-budget optimization problem.

Undoing damage is different: it restores recorded earlier matrix values or a complete checkpoint. It relies on actual history and does not infer the original graph from a damaged matrix.

The separate bounded search samples up to 32 independent seeded trial graphs from the same baseline. It changes at most \(B\leq64\) unique unordered pairs, with an absolute complex perturbation cap \(|\Delta A_{ij}|\leq m\) on each pair. A diagonal entry, when allowed, counts as one changed pair and remains real. Constraints can prohibit new edges or diagonal edits, require real or nonnegative weights, and preserve the support degree. A real-only or nonnegative search requires a compatible baseline. It does not silently project an incompatible graph into that class.

Support-degree protection retains each vertex's nonzero off-diagonal neighbor set by editing only existing nonzero weights and avoiding zeros. It does **not** preserve weighted degrees or community row sums, hence it does not establish invariance. Existing diagonal support is also retained when this option is enabled.

Candidates are ranked by full target fidelity or negative leakage. The baseline is always included. The displayed sampled Pareto set consists of candidates not dominated on all four displayed objectives: maximizing full fidelity and minimizing leakage, changed-edge count, and Frobenius damage. This describes the sampled candidates only. A failure to improve is not a proof of infeasibility, and a best sampled graph is not asserted to be globally optimal. Prepared-state mode retains the state, so its instantaneous state-based scores cannot improve under graph edits alone. Use eigenmode selection or subsequent evolution for a graph-dependent objective.

## 13. History, reproducibility, and numerical status

History checkpoint details subtract the actual saved parent and child matrices. They show the full difference heatmap and exact largest changes, including diagonal changes. If graph dimensions differ, the lab explains the replacement or resize mapping instead of inventing an entry correspondence. State-only gates and target-only changes can create checkpoints with no changed adjacency entries.

Bit-count buttons return to the last viewed checkpoint and chosen continuation for that register size. A register without saved history is constructed as a new root. Reset can explicitly create a fresh register of the current size. None of these navigation or construction choices transfers the old state into a different logical dimension. Within one experiment, editing an old checkpoint creates an alternative continuation. Redo follows the route just undone, and a manually selected fork with several futures requires choosing the intended continuation.

The circuit score shows recorded gate checkpoints on the selected ancestor path. It begins with the saved initial state, which need not be the all-zero state. Gate columns are clickable checkpoints. Non-gate interventions appear as separate markers because a string of gate boxes alone would omit damage, preparation, target changes, and other operations relevant to reproducing the result. Graph-and-state gates are labeled separately from state-only gates.

Portable experiment history allows up to 1024 checkpoints, subject to a separate 14 MiB serialized-data budget. A larger graph consumes more of that budget per checkpoint, so the usable count depends on the saved node matrices, logical-bit diagnostics and other recorded data. The lab checks the actual serialized size instead of promising the same count for every graph. Export preserves the current experiment before starting a new session. Temporary evolution runs use the independent working-memory limit described in Section 7.

The experiment record contains discrete configurations, actual interventions, targets, the fixed encoding, selected mode or prepared state, relevant model parameters, layout positions, and computed outcomes. Branching preserves the prior branch. Scrubbing history visits actual checkpoints and their saved numerical results. Model evolution time is a separate coordinate.

Shared packages preserve the exact serialized input and realized perturbations. Recomputations may differ within numerical tolerances across environments. Repeated eigenspaces are especially important: two correct solvers can return different bases for the same eigenspace. Saved results are labeled as recorded results. They are not automatically recomputed evidence.

Import replaces one experiment with another. Only after the new record validates does the interface clear the previous experiment's computed trajectories, comparisons, pins, measurement results, search results, drafts and information-screen stack. Checkpoint identifiers are local to an experiment and must not link old results to a new imported graph. A rejected import leaves the current experiment and its results available.

The full Hermitian eigensolver reports convergence, sweeps, and a residual. Challenge completion requires a converged calculation. Near degeneracy, a small residual does not guarantee a stable individual eigenvector. Numerical tolerances also determine when tiny weights are treated as zero and when survival is too small for conditioning.

To keep a large common diagonal offset from hiding smaller transitions, the solver diagonalizes a centered operator \(K=G-cI\) and stores its eigenvalues separately from \(c\). Evolution uses

\[
e^{-iG\tau}=e^{-ic\tau}e^{-iK\tau}.
\]

Convergence is checked against the centered operator as well as the original matrix, and spectral gaps are computed from the centered eigenvalues. Quotient propagation and graph conjugation likewise separate common offsets before matrix products. The common full-network offset changes only overall phase. By contrast, adding \(cI_d\) to a logical generator lifts to \(cPP^\dagger\), which shifts only the encoded component and can change its phase relative to leaked weight.

Floating-point arithmetic cannot recover differences that were already rounded away in the supplied matrix entries. Absolute phase also has finite precision when a very large offset is multiplied by time. The phase displays remove one common phase from each state for comparison, while keeping relative directions visible. A zero amplitude has no defined phase.

While a new calculation is pending, the lab keeps the last completed experiment visible. The new scores appear together with their computed configuration when the calculation finishes. Canceling a calculation leaves the last completed experiment available.

The lab supports up to 256 full-graph vertices. Dense spectral calculations become substantially more expensive as the graph grows, with cubic scaling in the graph dimension. Five logical bits require 32 community patterns, and eight nodes per group reaches the 256-node limit. The full solver operates on the actual node count, not merely the logical quotient. Full five-bit tomography requires 1024 probes and 2048 perturbed full-graph eigensolves, so it can be much slower than a single spectral update. Population-only probes answer a narrower question with fewer solves. Hiding edges in the picture does not remove them from the calculation.

### Resize an existing graph

Resizing changes the number of nodes in each community while retaining the logical bit labels. It is a recorded transformation of the current experiment, distinct from choosing a new number of bits.

For each community, the transfer \(T_r\) maps the old normalized uniform vector to the new one. An integer enlargement makes equal normalized clones of each old node. Integer reduction averages the corresponding clone groups. Other sizes match a deterministic orthonormal basis consisting of the uniform vector followed by Helmert contrast directions, preserving as many directions as fit. Let \(T\) combine the community maps. Then

\[
TP_{\rm old}=P_{\rm new},\qquad
A_{\rm new}=TA_{\rm old}T^\dagger+\mu(I-TT^\dagger),\qquad
\phi_{\rm new}=\frac{T\phi_{\rm old}}{\|T\phi_{\rm old}\|}.
\]

The weight \(\mu\) is placed below the old spectrum, so new directions do not overtake an old leader. For an enlargement, \(T^\dagger T=I\), and the old state, leakage, and dynamics are preserved within the transferred subspace. The extra directions increase representation size without silently adding random defects. Individual amplitudes may become smaller because more nodes share the same normalized signal.

A reduction projects away directions. The retained weight before normalization is \(\|T\phi\|^2\), and lost weight is \(1-\|T\phi\|^2\). The reported discarded operator norm is \(\|A-T^\dagger(TAT^\dagger)T\|_F\). A smaller leakage score can reflect lost disagreement information rather than a physical repair. The reduced dynamics are generally not equivalent to the old full dynamics. A request that would discard the entire state is rejected.

When a leading-mode input is enlarged without shrinking any community, the result remains in leading mode. The carried eigenvector is saved as a leading reference, preserving the chosen representative even when eigenvalues tie. Later connection edits still reselect a leading pattern. A prepared-state input remains prepared, and any contraction stores the normalized carried vector as a prepared state because a projection need not preserve its eigenvector relation. The operation may create signed, complex, dense, or diagonal weights. It preserves the stated transfer, not every combinatorial restriction of the starting graph. The resize record saves the rule and diagnostics, while history keeps the exact earlier graph for undo.

## 14. Sources and attribution

* Ethan Dickey and collaborators, **Programmable Quantum-Like bits from Signed Regular Graphs**, [arXiv:2507.21289](https://arxiv.org/abs/2507.21289). This paper gives the assumptions and constructions for the signed regular graph family.
* Complex quantum-like state constructions, [arXiv:2604.23991](https://arxiv.org/abs/2604.23991). This reference treats complex quantum-like state constructions. The general weighted examples in this guide also include constructions derived explicitly above.
* Debadrita Saha, Ethan Dickey, William Horvat, Sabre Kais and Gregory D. Scholes, **Quantum dynamics of spin systems using QL-resources**, with Supplementary Information §3, research draft ([source record](#ql-dynamics-source-record)). This motivates block-strength, effective-coupling, phase-coherence, and temporal-diagnostic comparisons.
* Songbo Xie, Ethan Dickey, Syed Ahmed Taimoor and Sabre Kais, [**Dynamical Readout of Measurement Statistics and Emergent Entanglement-Like States in Classical Networks**](https://arxiv.org/abs/2609.14620), arXiv:2609.14620 (2026), with Supplementary Information. This motivates the elementary spectral-probe readout and real two-bit joint-outcome reconstruction.
* The projection identities, general weighted lifts, and controlled interventions above include their definitions and derivations within this guide.

The examples illustrate mathematical graph models. Results for a particular physical system or a more restrictive graph family depend on the assumptions of that system or family.

Quantum-Like Lab was created for Ethan Dickey. The interactive experience was programmed by ChatGPT6.0 Astra under his guidance and feedback.


### QL dynamics source record

Debadrita Saha, Ethan Dickey, William Horvat, Sabre Kais and Gregory D. Scholes, **Quantum dynamics of spin systems using QL-resources**, with Supplementary Information §3. Research draft supplied as a source for this lab. A verified public paper URL is not available in this release.

Sections 6–8 above state the block diagnostics, evolution rules, and frequency-analysis conventions implemented here. These definitions can be inspected without access to the draft. The labelled repeating-pulse example is an independently derived lab example, not a reproduction of a figure from that paper.
