Tensor contraction and index notation
Tensor contraction sums over matched indices and provides precise bookkeeping for composite-state amplitudes, reduced states and tensor-network expressions.
On this page
Definition and role
A tensor is represented by an indexed array after bases are chosen. Contraction sums over selected matched indices. Matrix multiplication is a familiar case: (AB)_ik=sum_j A_ij B_jk. In quantum information, tensor contractions compute amplitudes, expectations and reduced density operators without requiring an ambiguous diagram-only explanation.
Index meaning and order must be stated. A repeated index is summed only under a declared convention; otherwise a reader cannot tell whether it labels an output or an internal connection.
Fully solved reduced-state contraction
Let a two-qubit coefficient array be M=[[1,2],[0,i]]/sqrt(6), with q0 as row and q1 as column. The state is (|00>+2|01>+i|11>)/sqrt(6). Contract the q1 index: (rho_0)_ik=sum_j M_ij M_kj*. This gives rho_0=[[5/6,-i/3],[i/3,1/6]]. Its trace is one and determinant is 5/36-1/9=1/36, so it is physical and mixed.
Contracting q0 instead gives (rho_1)_jl=sum_i M_ij M_il*=[[1/6,1/3],[1/3,5/6]]. The spectra match because the joint state is pure, even though the matrices look different.
Complexity and limitations
An algebraically equivalent contraction order can require very different intermediate array sizes. That is a classical numerical issue, not a change in the physical state. Low bond dimensions or sparse structure can make some computations efficient, but a generic tensor network can still be expensive to contract.
Complex conjugation is essential in density-matrix contractions. Summing M_ij M_kj without the conjugate can produce a non-Hermitian or unphysical result.
A local channel written as an explicit contraction
Let M be the coefficient matrix of a pure bipartite state, with the first subsystem labeling rows. A channel on that subsystem with Kraus matrices K_μ gives output entries ρ'(a,b;c,d) = Σ_μ,i,k K_μ(a,i) M(i,b) M(k,d)* K_μ(c,k)*. The indices a,c belong to the output first subsystem; b,d belong to the untouched second subsystem. There is no sum over an open output index. The Kraus label is summed because its record is not retained.
Tracing the second subsystem sets d = b and sums b. The result is Σ_μ K_μ(MM†)K_μ†, exactly the same matrix obtained by reducing the initial state and then applying the local channel. This proves the commutation of these two operations in coordinates. It does not hold for an arbitrary operation that jointly couples the retained and discarded subsystems; locality was used in the factorization of the Kraus entries.
For a qubit and a qutrit, choose M = [[1,i,0],[0,1,√2]]/√5. The qubit reduction is [[0.4,0.2i],[−0.2i,0.6]]. Apply amplitude damping with K_0 = diag(1,0.8) and K_1 = 0.6|0><1|. The excited population becomes 0.64×0.6 = 0.384, the ground population becomes 0.4+0.36×0.6 = 0.616, and the upper off-diagonal element becomes 0.16i. Direct contraction of the six-dimensional output gives the identical reduced matrix. Its trace is one because Σ_μ K_μ†K_μ = I.
Why an observable transpose appears in coefficient notation
For operators A and B on the row and column subsystems, respectively, the expectation is Σ_i,j,k,l M(i,j)* A(i,k) B(j,l) M(k,l). Reordering scalar sums gives tr(M† A M Bᵀ). The transpose on B is an index placement consequence, not a partial-transpose operation performed on the physical state. Replacing Bᵀ by B happens to work for real symmetric B and can conceal a sign error when examples use only X and Z.
Take M = diag(1,i)/√2, representing (|00>+i|11>)/√2. The state is an eigenvector of X⊗Y with eigenvalue one, so the expectation is one. In the matrix expression Yᵀ = −Y, and tr(M†XMYᵀ) also gives one. Omitting the transpose produces minus one. The contraction must track both complex conjugation of the bra and the orientation of each observable index; these are different operations that cannot be merged by visual intuition.
Nonadjacent reductions and tensor-factor ordering
Consider the three-qubit vector (|000>+|010>+i|101>+i|111>)/2, in the order A,B,C from left to right. It factors as a phase-entangled state on A,C and |+> on B. To trace out the middle qubit, use ρ_AC(a,c;a',c') = Σ_b ρ_ABC(a,b,c;a',b,c'). The result is the pure projector onto (|00>+i|11>)/√2 on A,C. Tracing out C instead gives ρ_AB = I_A/2 ⊗ |+><+|_B, which is separable.
These different reductions make a practical index warning precise. Reshaping a flat coefficient list with an incorrect subsystem order changes which mathematical labels are grouped together. A permutation of array axes that merely rewrites the same tensor is a coordinate change; a physical SWAP acting on named qubits is a transformation of the state. They can use similar permutation matrices while answering different questions. A diagram must say whether a crossing relabels legs or represents an actual gate.
Contraction order and intermediate storage
Associativity changes computational cost without changing the final tensor. For matrices A of size 2×100, B of size 100×2, and C of size 2×100, forming (AB)C needs 400 scalar multiplications for each of its two products, a total of 800. Forming A(BC) first creates a 100×100 intermediate and needs 20,000 multiplications at each step, a total of 40,000. The result in either case has size 2×100. These counts use ordinary dense multiplication and exclude additions and specialized algorithms.
The example explains why selecting a contraction order is meaningful even in a very small network. It does not establish that arbitrary large quantum networks can be contracted efficiently. Network connectivity, dimensions, sparsity and approximation criteria determine whether favorable orders exist. A low final output dimension does not bound the dimensions of every necessary intermediate object.
Retaining the Kraus outcome changes the tensor object to a classical-quantum state Σ_μ |μ><μ| ⊗ K_μ|ψ><ψ|K_μ†. In the qubit–qutrit example, the decay branch has probability 0.36×0.6 = 0.216. Its normalized output is |0> tensor (|1>+√2|2>)/√3, a product state. The no-decay branch has probability 0.784 and generally retains entanglement. Their unnormalized density operators add to the unconditional channel output. Dividing each branch by its probability before adding would assign the wrong weights and even the wrong trace. Thus a Kraus index contracted by summation, a classical index left open, and a chosen outcome normalized afterward describe three different mathematical expressions with different operational uses.
Sources
Verification scope
The Theory of Quantum Information, Chapter 1: Mathematical preliminaries
John Watrous · · Textbook material · cs.uwaterloo.caCitation identity checked ·
Background reference; this record does not claim a full independent peer review of the encyclopedia. Original exposition and newly constructed calculations are not copied from the source.
The Theory of Quantum Information: Chapter 1, Mathematical preliminaries
John Watrous · · Manuscript · Author manuscript · cs.uwaterloo.caSelected text checked ·
Chapter introduction, finite-dimensional linear-algebra definitions and Caratheodory theorem were inspected. The author explicitly describes the chapter as review material, not a primary source for all mathematical results.
Selected passages and metadata were checked; this does not certify every sentence in the encyclopedia, constitute comprehensive literature review, or establish external peer review. Original worked examples are separately recomputed.
Verification scope
The Theory of Quantum Information: Chapter 2, Basic notions of quantum information
John Watrous · · Manuscript · Author manuscript · cs.uwaterloo.caSelected text checked ·
Full-text PDF available; selected state, measurement, channel and dilation definitions used as formalism background. Individual elementary extensions and numerical examples were constructed independently.
Selected passages and metadata were checked; this does not certify every sentence in the encyclopedia, constitute comprehensive literature review, or establish external peer review. Original worked examples are separately recomputed.