Skip to content
Tensor Products and Partial Trace (With Intuition)

Tensor Products and Partial Trace (With Intuition)

February 4, 2025

To describe multipartite quantum systems (two qubits, a qubit + an oscillator, etc.), we expand the Hilbert space using the tensor product. The tensor product is the standard way to combine:

  • state vectors into joint state vectors
  • operators into joint operators

Later, when we only care about a part of a larger system, we use the partial trace to obtain a subsystem’s reduced density matrix.

Tensor products: building bigger state spaces

If one qubit lives in a 2D space and another qubit lives in a 2D space, then together they live in a 2×2=42 \times 2 = 4 dimensional space:

HAB=HAHB. \mathcal{H}_{AB} = \mathcal{H}_A \otimes \mathcal{H}_B.

Example: two-qubit basis states

The computational basis states combine as:

00=00,01=01,10=10,11=11. \lvert 0 \rangle \otimes \lvert 0 \rangle = \lvert 00 \rangle,\quad \lvert 0 \rangle \otimes \lvert 1 \rangle = \lvert 01 \rangle,\quad \lvert 1 \rangle \otimes \lvert 0 \rangle = \lvert 10 \rangle,\quad \lvert 1 \rangle \otimes \lvert 1 \rangle = \lvert 11 \rangle.

Operators on a composite system

If AA acts on qubit AA and BB acts on qubit BB, then the joint operator is:

AB. A \otimes B.

To apply an operator to only one subsystem, you tensor it with identity on the other subsystem(s). For example, “apply ZZ to the first qubit and do nothing to the second” is:

ZI. Z \otimes I.
This is the algebra behind circuit diagrams: gates drawn on one wire correspond to “operator on that qubit \otimes identities on the rest.”

Density matrices (why we need them)

Statevectors describe pure states. But when you look at a subsystem of a larger state—especially an entangled one—the subsystem is often mixed. Mixed states are represented by density matrices ρ\rho.

For a pure state ψ\lvert \psi \rangle, the density matrix is:

ρ=ψψ. \rho = \lvert \psi \rangle\langle \psi \rvert.

Partial trace: extracting a subsystem

Given a joint density matrix ρAB\rho_{AB}, the reduced state of subsystem AA is:

ρA=TrB(ρAB). \rho_A = \mathrm{Tr}_B(\rho_{AB}).

Intuitively, you are “averaging over” (tracing out) the degrees of freedom of subsystem BB.

Even if the joint state ρAB\rho_{AB} is pure, the reduced state ρA\rho_A can be mixed. This is not “noise”; it is a consequence of entanglement and ignoring part of the system.

Example: Bell state → maximally mixed single-qubit state

Consider:

Φ+=12(00+11). \lvert \Phi^+ \rangle = \frac{1}{\sqrt{2}}\left(\lvert 00\rangle + \lvert 11\rangle\right).

If you trace out qubit BB, you get:

ρA=I2. \rho_A = \frac{I}{2}.

That means: looking at qubit AA alone, the outcome of measuring in the computational basis is 50/50, even though the pair is perfectly correlated.

Python example (Qiskit): partial trace of a Bell state

from qiskit import QuantumCircuit
from qiskit.quantum_info import Statevector, partial_trace, DensityMatrix

# Build a Bell state |Phi+> = (|00> + |11>)/sqrt(2)
qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)

psi = Statevector.from_instruction(qc)
rho_ab = DensityMatrix(psi)

# Trace out qubit 1 (keep qubit 0)
rho_a = partial_trace(rho_ab, [1])
print(rho_a)

You should see a 2×2 matrix close to I/2I/2.

When do you need partial traces in quantum computing?

  • Entanglement reasoning: what does each qubit look like individually?
  • Noise models: open-system dynamics naturally produce mixed states
  • Error correction: logical information is encoded nonlocally; local views can look random

Next