|q⟩ Bad Qubits

advanced · Programming · Tensor Networks & Simulation Methods

Matrix Product States

A matrix product state (MPS) rewrites the 2n2^n amplitudes of an nn-qubit state as a product of small matrices, one factor per qubit. It is the one-dimensional workhorse of tensor networks, and almost every algorithm in this module operates on it.

From one big tensor to a chain of small ones

Write a general nn-qubit state by listing its amplitudes,

ψ=s0s1sn1cs0s1sn1s0s1sn1,sk{0,1}.|\psi\rangle = \sum_{s_0 s_1 \cdots s_{n-1}} c_{s_0 s_1 \cdots s_{n-1}}\, |s_0 s_1 \cdots s_{n-1}\rangle, \qquad s_k \in \{0,1\}.

The object cs0sn1c_{s_0 \cdots s_{n-1}} is a single tensor with nn indices and 2n2^n entries. The MPS idea is to factor this tensor into a contracted product of three-index tensors A[k]A^{[k]}, one for each site:

cs0s1sn1=α1,,αn1A  α1[0]s0Aα1α2[1]s1Aαn1[n1]sn1.c_{s_0 s_1 \cdots s_{n-1}} = \sum_{\alpha_1,\dots,\alpha_{n-1}} A^{[0]\,s_0}_{\;\alpha_1}\, A^{[1]\,s_1}_{\alpha_1 \alpha_2}\, \cdots\, A^{[n-1]\,s_{n-1}}_{\alpha_{n-1}} .

Each A[k]A^{[k]} carries one physical index sks_k (the qubit's 0/10/1 value) and up to two bond indices αk,αk+1\alpha_k, \alpha_{k+1} that link it to its neighbours. Reading the formula, you pick a value for every physical index, multiply the corresponding matrices along the chain, and the result is a single amplitude. The bond indices are summed over — they are internal plumbing, never observed.

Where the matrices come from: iterated SVD

You construct an MPS by repeatedly applying the singular value decomposition (SVD). Reshape the amplitude tensor into a matrix MM that groups the first qubit against the rest, Ms0,(s1sn1)M_{s_0,\,(s_1\cdots s_{n-1})}. The SVD writes

M=USV,M = U S V^\dagger,

with UU holding the first site tensor A[0]A^{[0]}, SS a diagonal matrix of non-negative singular values, and SVS V^\dagger the remainder to be split further. Reshape that remainder, group off the next qubit, and SVD again. Repeating n1n-1 times peels the state into the chain of A[k]A^{[k]} above. The procedure is exact: no approximation has yet been made.

A worked two-qubit example

Take the Bell state Φ+=12(00+11)|\Phi^+\rangle = \tfrac{1}{\sqrt{2}}(|00\rangle + |11\rangle). Its amplitude matrix grouping qubit 0 against qubit 1 is

M=12(1001).M = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}.

Its SVD is trivial: U=V=IU = V = I and S=diag(12,12)S = \mathrm{diag}(\tfrac{1}{\sqrt 2}, \tfrac{1}{\sqrt 2}). There are two non-zero singular values, so the bond between the qubits must carry dimension 22. By contrast the product state 00|00\rangle has M=diag(1,0)M = \mathrm{diag}(1, 0), a single non-zero singular value, so its bond dimension is 11. Entanglement is visible directly in the count of non-zero singular values.

Why this is efficient

If every bond index ranges over at most χ\chi values, each site tensor holds at most 2χ22\chi^2 numbers, and the whole MPS stores about n2χ2n \cdot 2\chi^2 numbers — linear in nn. For weakly entangled states χ\chi stays small even as nn grows, which is precisely why MPS can represent the ground states of many one-dimensional systems on a laptop while the full state vector would need exponential memory. The cost of every operation on an MPS — overlaps, expectation values, applying gates — likewise scales polynomially in nn and χ\chi, never in 2n2^n.

Canonical forms

In practice one keeps the MPS in a canonical form: the tensors to the left of a chosen bond are left-orthonormal and those to the right are right-orthonormal, with the singular values sitting on the bond between them. Canonical form makes the singular values directly meaningful, makes overlaps and expectation values cheap, and is what lets you truncate small singular values to control χ\chi. We will lean on it when we simulate circuits with MPS later in the module.

Sign in on the full site to ask questions and join the discussion.