---
title: "Matrix Product State Compression Interactive Lab | Sandbox Physics"
description: "How few numbers does a quantum spin chain really need? Far fewer than the full list of amplitudes when the state carries little entanglement."
canonical_url: "https://sandboxphysics.com/labs/entanglement-compression/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/entanglement-compression/"
last_modified: "2026-10-30"
---

FR30-A · Keep the strongest Schmidt strands

# Matrix Product State Compression

**How few numbers does a quantum spin chain really need?** Far fewer than the full list of amplitudes when the state carries little entanglement. Every cut through the chain has Schmidt weights, and keeping only the largest ones turns the state into a matrix product state. A gapped chain needs a handful per cut, a critical chain needs more, and a random state needs almost all of them.

Cut a spin-chain state into a matrix product state and drag the bond-dimension line. See which Schmidt weights you keep, how large the global error is, and which local measurements still agree.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

Model assumptions

The states are exact ground states of an open transverse-field Ising chain with eight to fourteen sites, found by Lanczos diagonalization, plus a seeded random state for contrast. Compression uses successive singular value decompositions from left to right. The norm error is compared with two exact bounds built from the discarded Schmidt tails. Correlations are computed from the compressed vector itself, not from a separate model.

Errors against bond dimension

Schmidt weights at the centre cut

Entanglement at every cut

Numerical diagnostics and record

$\chi=4$

Every number is computed in the browser from the exact state vector and its compressed copy. The record saves the Schmidt spectra, the discarded weights per cut and all error measures.

[Continue the course: tensor networks for quantum many-body physics](https://sandboxphysics.com/stories/tensor-networks/)

Physics tutorial

## Matrix Product State Compression

**Background** Split a chain of spins into a left part and a right part. Any state can be written as a sum of products of left states and right states, and the squared coefficients, the Schmidt weights, add up to one. They measure how strongly the two parts are entangled.

**Why it matters** Storing every amplitude of a chain with $L$ spins takes $2^L$ numbers. When the Schmidt weights fall off quickly at every cut, most of those numbers carry almost nothing, and a matrix product state keeps only what matters.

Start with the essentials

- **Focus question**: How few numbers does a quantum spin chain really need?
- **One-sentence intuition**: The error of a truncation is set cut by cut by the Schmidt weights you throw away. Local measurements can stay far more accurate than the global error, while a correlation between the two ends is more sensitive.

### Core mathematical model

#### Schmidt decomposition at one cut

$$
|\psi\rangle=\sum_{\alpha=1}^{r}\sqrt{\lambda_\alpha}\,|a_\alpha\rangle_{\rm L}\,|b_\alpha\rangle_{\rm R},\qquad \sum_{\alpha}\lambda_\alpha=1
$$

The left and right states are orthonormal. The weights come from a singular value decomposition of the amplitudes arranged as a matrix with left configurations as rows and right configurations as columns.

#### A matrix product state

$$
\psi_{s_1s_2\cdots s_L}=A^{[1]s_1}A^{[2]s_2}\cdots A^{[L]s_L},\qquad A^{[j]s_j}\in\mathbb{C}^{\chi_{j-1}\times\chi_j}
$$

Repeating the decomposition from left to right writes every amplitude as a product of small matrices. Keeping at most a fixed number of Schmidt weights per cut, the bond dimension, caps every matrix size.

#### What the discarded weight guarantees

$$
\max_c\,\varepsilon_c(\chi)\le\lVert\psi-\tilde\psi\rVert^2\le2\sum_c\varepsilon_c(\chi),\qquad \varepsilon_c(\chi)=\sum_{\alpha>\chi}\lambda^{(c)}_\alpha
$$

No state with at most that many Schmidt terms at a cut can come closer than the tail at that cut, which gives the lower bound. The upper bound is Eq. 58 of Schollwöck (2011). The Lab plots the measured error between both.

### Common difficulties

#### A small global error is not a small error everywhere

**Typical misconception** If the squared norm error is one in a million, every measured quantity is that accurate.

**Better mental model** Observable errors scale with the norm error itself, not its square, and long-range correlations use the most of that allowance. Check the quantity you care about.

### Run the experiment

1. 01

   #### Cut a critical chain

   Start from Critical chain: a slow tail and drag the gold scissor line from the top down to bond dimension one.

   **What to observe:** Orange strands are discarded. The squared norm error grows as more strands at the centre are cut, and the measured error stays between the two bounds in the error plot.

2. 02

   #### Compare a gapped chain

   Choose Gapped chain: a fast tail, then compare the centre Schmidt spectrum with the critical one.

   **What to observe:** The weights fall off much faster, so two strands per cut already give a tiny error. The entanglement per cut is also smaller.

3. 03

   #### Try a cat state and a random state

   Choose Cat state: one strand fails, then move the bond dimension from one to two. Finish with Random state: no short tail.

   **What to observe:** The cat state needs exactly two strands. The random state keeps a large error even when almost as many numbers are stored as the full state has amplitudes.

Physical conclusion

Entanglement at each cut, not the number of spins, decides how far a state can be compressed.

## Related experiments and articles

Tensor networks · Reading path

### Tensor networks and DMRG, from entanglement to quantum quenches

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **Why a chain of spins outgrows any computer, and why its ground state does not**](https://sandboxphysics.com/stories/tensor-networks/many-spins-many-amplitudes/)
2. [Lab **DMRG Ground State Sweeps** Sweep DMRG down to the ground-state energy](https://sandboxphysics.com/labs/dmrg-ground-state-sweeps/)
3. [Article **Measure entanglement with one matrix decomposition**](https://sandboxphysics.com/stories/tensor-networks/schmidt-decomposition/)
4. [Article **Turn a wave function into a chain of small matrices**](https://sandboxphysics.com/stories/tensor-networks/matrix-product-states/)
5. [Article **How much does cutting the bonds cost?**](https://sandboxphysics.com/stories/tensor-networks/truncation-and-local-errors/)

Quantum & fields · Starter path

## Start from a single measurement

Predict an outcome, then count what the measurements actually give. The path starts with one qubit and moves on to wave packets, bound states and two-photon interference.

[Start here → **Quantum State & Born Measurement** Predict a probability, turn the analyzer, then compare your prediction with the measured frequency over many shots. Observe · 15 min](https://sandboxphysics.com/labs/qubit-state/)

1. [1 Quantum State & Born Measurement](https://sandboxphysics.com/labs/qubit-state/)
2. [2 Stern–Gerlach Sequence](https://sandboxphysics.com/labs/stern-gerlach-sequence/)
3. [3 Wave Packet & Uncertainty](https://sandboxphysics.com/labs/wave-packet-uncertainty/)
4. [4 Quantum Harmonic Oscillator](https://sandboxphysics.com/labs/quantum-harmonic-oscillator/)
5. [5 Which Path & Quantum Eraser](https://sandboxphysics.com/labs/quantum-eraser/)
6. [6 Hong–Ou–Mandel Two-Photon Interference](https://sandboxphysics.com/labs/hong-ou-mandel/)

[View the full path →](https://sandboxphysics.com/topics/quantum/#starter-path)
