Skip to content

Partial Trace

This is the canonical treatment of the partial trace, including its characterizing properties, matrix rules, examples, and computational extensions. The Reduced States and Partial Trace gateway supplies the subsystem interpretation and reading path; for the first explicit calculation here, jump to Basis calculation.

Required background. Density Operators supplies the state and trace language, and Entangled States supplies the subsystem interpretation. Familiarity with finite-dimensional product bases and operator matrices is assumed.

The partial trace removes one tensor factor from an operator while retaining exactly the information needed for the other factor. For a bipartite density operator ρAB\rho_{AB},

ρA=Tr⁡BρAB.\rho_A = \operatorname{Tr}_B\rho_{AB}.

Let

XAB∈L(HA⊗HB).X_{AB} \in \mathcal L \bigl( \mathcal H_A\otimes\mathcal H_B \bigr).

The full trace returns a scalar:

Tr⁡ABXAB∈C.\operatorname{Tr}_{AB}X_{AB} \in \mathbb C.

The partial trace returns an operator on the subsystem that remains:

Tr⁡BXAB∈L(HA).\operatorname{Tr}_B X_{AB} \in \mathcal L(\mathcal H_A).

If dAd_A and dBd_B are finite, the map changes a (dAdB)×(dAdB)(d_A d_B)\times(d_A d_B) matrix into a dA×dAd_A\times d_A matrix. Tracing out AA instead gives a dB×dBd_B\times d_B matrix.

The partial trace is linear, positive, and trace-preserving:

Tr⁡A(Tr⁡BXAB)=Tr⁡ABXAB.\operatorname{Tr}_A \left( \operatorname{Tr}_B X_{AB} \right) = \operatorname{Tr}_{AB}X_{AB}.

When XAB=ρABX_{AB}=\rho_{AB} is a density operator, the result is therefore a normalized positive operator: the reduced state of subsystem AA.

Tracing out BB is not the same as projecting BB onto one selected state. It is a sum over a complete orthonormal basis of the subsystem being ignored.

Choose an orthonormal basis {∣b⟩B}\{\lvert b\rangle_B\}. The partial trace over BB can be written as a sum of contractions. Define

Rb≡IA⊗B⟨b∣,Rb†=IA⊗∣b⟩B.R_b \equiv I_A\otimes{}_B\langle b\rvert, \qquad R_b^\dagger = I_A\otimes\lvert b\rangle_B.

Then

Tr⁡BXAB=∑bRbXABRb†.\operatorname{Tr}_B X_{AB} = \sum_b R_b X_{AB}R_b^\dagger.

Each term inserts a bra and ket on subsystem BB, leaving an operator on subsystem AA.

Let another orthonormal basis be related by a unitary matrix:

∣β⟩=∑bUbβ∣b⟩.\lvert\beta\rangle = \sum_b U_{b\beta}\lvert b\rangle.

Define Rβ=IA⊗⟨β∣R_\beta=I_A\otimes\langle\beta\rvert in the new basis.

Using

∑βUbβ∗Ucβ=δbc,\sum_\beta U_{b\beta}^*U_{c\beta} = \delta_{bc},

the basis sum becomes

∑βRβXABRβ†=∑b,cδbc RbXABRc†=∑bRbXABRb†.\begin{aligned} \sum_\beta R_\beta X_{AB}R_\beta^\dagger &= \sum_{b,c} \delta_{bc}\, R_b X_{AB}R_c^\dagger\\ &= \sum_b R_b X_{AB}R_b^\dagger. \end{aligned}

The basis formula is a calculation device; the resulting operator does not depend on which orthonormal basis was used.

For a simple tensor of operators,

Tr⁡B(XA⊗YB)=XA Tr⁡YB.\operatorname{Tr}_B \bigl( X_A\otimes Y_B \bigr) = X_A\,\operatorname{Tr}Y_B.

Linearity then handles every finite sum of tensor products. The most useful elementary case is the dyad rule:

Tr⁡B(∣i⟩⟨k∣A⊗∣j⟩⟨ℓ∣B)=δjℓ ∣i⟩⟨k∣A.\operatorname{Tr}_B \left( \lvert i\rangle\langle k\rvert_A \otimes \lvert j\rangle\langle\ell\rvert_B \right) = \delta_{j\ell}\, \lvert i\rangle\langle k\rvert_A.

This is just the ordinary trace on the BB factor:

Tr⁡(∣j⟩⟨ℓ∣)=⟨ℓ∣j⟩=δjℓ.\operatorname{Tr} \left( \lvert j\rangle\langle\ell\rvert \right) = \langle\ell\vert j\rangle = \delta_{j\ell}.

The cross terms in the subsystem being traced out vanish when their basis labels are different.

In product bases, write

ρAB=∑i,k,j,ℓρij,kℓ ∣i⟩⟨k∣A⊗∣j⟩⟨ℓ∣B.\rho_{AB} = \sum_{i,k,j,\ell} \rho_{ij,k\ell} \, \lvert i\rangle\langle k\rvert_A \otimes \lvert j\rangle\langle\ell\rvert_B.

Then

ρA=Tr⁡BρAB=∑i,k(∑jρij,kj)∣i⟩⟨k∣A.\rho_A = \operatorname{Tr}_B\rho_{AB} = \sum_{i,k} \left( \sum_j \rho_{ij,kj} \right) \lvert i\rangle\langle k\rvert_A.

Equivalently, the matrix elements of the reduced state are

(ρA)ik=∑jρij,kj.(\rho_A)_{ik} = \sum_j \rho_{ij,kj}.

The repeated BB label jj is the one being summed. The AA labels i,ki,k remain because the result is still an operator on HA\mathcal H_A.

With the AA index first and the BB index changing fastest, regard XABX_{AB} as a dA×dAd_A\times d_A array of dB×dBd_B\times d_B blocks:

XAB=(X00(B)⋯X0,dA−1(B)⋮⋱⋮XdA−1,0(B)⋯XdA−1,dA−1(B)).X_{AB} = \begin{pmatrix} X_{00}^{(B)}&\cdots&X_{0,d_A-1}^{(B)}\\ \vdots&\ddots&\vdots\\ X_{d_A-1,0}^{(B)}&\cdots&X_{d_A-1,d_A-1}^{(B)} \end{pmatrix}.

Tracing out BB takes the ordinary trace of every block:

Tr⁡BXAB=∑i,kTr⁡(Xik(B))∣i⟩⟨k∣A.\operatorname{Tr}_B X_{AB} = \sum_{i,k} \operatorname{Tr} \left( X_{ik}^{(B)} \right) \lvert i\rangle\langle k\rvert_A.

By contrast, tracing out AA sums the diagonal BB-space blocks:

Tr⁡AXAB=∑iXii(B).\operatorname{Tr}_A X_{AB} = \sum_i X_{ii}^{(B)}.

These recipes assume the declared AA-first ordering. If a matrix uses a different flattened product basis, reorder it before applying a memorized block rule.

Suppose

∣Ψ⟩=∑i,jCij ∣i⟩A⊗∣j⟩B,\lvert\Psi\rangle = \sum_{i,j}C_{ij}\, \lvert i\rangle_A\otimes\lvert j\rangle_B,

where CC is the dA×dBd_A\times d_B coefficient matrix with AA indexing rows. Then

ρA=CC†,ρB=CTC∗.\rho_A=CC^\dagger, \qquad \rho_B=C^{\mathsf T}C^*.

For example,

(ρA)ik=∑jCijCkj∗=∑jρij,kj.\begin{aligned} (\rho_A)_{ik} &= \sum_j C_{ij}C_{kj}^*\\ &= \sum_j \rho_{ij,kj}. \end{aligned}

This is exactly the coefficient rule above. It avoids constructing the full (dAdB)×(dAdB)(d_A d_B)\times(d_A d_B) matrix ∣Ψ⟩⟨Ψ∣\lvert\Psi\rangle\langle\Psi\rvert.

The partial trace is defined so that local expectation values are preserved. For every operator MAM_A on subsystem AA,

Tr⁡AB[ρAB(MA⊗IB)]=Tr⁡A[(Tr⁡BρAB)MA].\begin{aligned} &\operatorname{Tr}_{AB} \left[ \rho_{AB}(M_A\otimes I_B) \right]\\ &\quad= \operatorname{Tr}_A \left[ (\operatorname{Tr}_B\rho_{AB})M_A \right]. \end{aligned}

So a local observer using ρA=Tr⁡BρAB\rho_A=\operatorname{Tr}_B\rho_{AB} gets the same predictions as an observer using the full state ρAB\rho_{AB} and the embedded local observable MA⊗IBM_A\otimes I_B.

This identity is often the safest way to remember which subsystem is being traced out: tracing out BB leaves the operator that predicts measurements on AA. It also characterizes the partial trace uniquely, because choosing matrix units for MAM_A fixes every matrix element of the result.

For two qubits in the ordered product basis

∣00⟩,  ∣01⟩,  ∣10⟩,  ∣11⟩,\lvert00\rangle,\; \lvert01\rangle,\; \lvert10\rangle,\; \lvert11\rangle,

the reduced density matrix of qubit AA has entries

ρA=(ρ00,00+ρ01,01ρ00,10+ρ01,11ρ10,00+ρ11,01ρ10,10+ρ11,11).\rho_A = \begin{pmatrix} \rho_{00,00}+\rho_{01,01} & \rho_{00,10}+\rho_{01,11} \\ \rho_{10,00}+\rho_{11,01} & \rho_{10,10}+\rho_{11,11} \end{pmatrix}.

The convention is

ρij,kℓ=⟨i,j∣ρAB∣k,ℓ⟩.\rho_{ij,k\ell} = \langle i,j\rvert \rho_{AB} \lvert k,\ell\rangle.

The pair (i,j)(i,j) labels the matrix row and (k,ℓ)(k,\ell) labels the matrix column. For example,

ρ01,11=⟨0,1∣ρAB∣1,1⟩.\rho_{01,11} = \langle0,1\rvert \rho_{AB} \lvert1,1\rangle.

This rule says: keep the AA labels and sum over matching BB labels.

For

∣Φ+⟩=∣00⟩+∣11⟩2,\lvert\Phi^+\rangle = \frac{ \lvert00\rangle+\lvert11\rangle }{\sqrt2},

the density matrix in the same ordered basis is

ρAB=12(1001000000001001).\rho_{AB} = \frac{1}{2} \begin{pmatrix} 1 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 1 \end{pmatrix}.

Using the two-qubit rule,

(ρA)00=ρ00,00+ρ01,01=12,(ρA)11=ρ10,10+ρ11,11=12,(ρA)01=ρ00,10+ρ01,11=0,(ρA)10=ρ10,00+ρ11,01=0.\begin{aligned} (\rho_A)_{00} &= \rho_{00,00}+\rho_{01,01} = \frac{1}{2}, \\ (\rho_A)_{11} &= \rho_{10,10}+\rho_{11,11} = \frac{1}{2}, \\ (\rho_A)_{01} &= \rho_{00,10}+\rho_{01,11} = 0, \\ (\rho_A)_{10} &= \rho_{10,00}+\rho_{11,01} = 0. \end{aligned}

Therefore

ρA=12(1001)=IA2.\rho_A = \frac{1}{2} \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = \frac{I_A}{2}.

The same calculation gives ρB=IB/2\rho_B=I_B/2.

Same marginal from a different joint state

Section titled “Same marginal from a different joint state”

The separable, classically correlated state

ρcc=12∣00⟩⟨00∣+12∣11⟩⟨11∣\rho_{\mathrm{cc}} = \frac12 \lvert00\rangle\langle00\rvert + \frac12 \lvert11\rangle\langle11\rvert

has matrix

ρcc=12(1000000000000001).\rho_{\mathrm{cc}} = \frac12 \begin{pmatrix} 1&0&0&0\\ 0&0&0&0\\ 0&0&0&0\\ 0&0&0&1 \end{pmatrix}.

The same block trace gives

Tr⁡Bρcc=12IA.\operatorname{Tr}_B\rho_{\mathrm{cc}} = \frac12 I_A.

The Bell state and ρcc\rho_{\mathrm{cc}} have the same reduced state but different joint coherence and correlations. This illustrates directly that the partial trace is many-to-one.

  1. Declare the tensor-factor order and the subsystem being discarded.
  2. Choose a product, dyad, coefficient-matrix, or block representation.
  3. Contract only the input and output indices of the discarded subsystem.
  4. Reassemble the operator on the retained Hilbert space.
  5. Check dimension, trace, Hermiticity, positivity, and the product rule.
  6. Verify one local expectation value when the bookkeeping is uncertain.

For a density operator, these checks require a dA×dAd_A\times d_A positive matrix of trace one. A wrong dimension usually means that the wrong factor was retained; a wrong trace usually signals a missing diagonal term or normalization factor.

In tensor-network notation, an operator on ABAB has an input and output leg for AA and an input and output leg for BB. Taking Tr⁡B\operatorname{Tr}_B connects the BB output leg back to the BB input leg and sums over that internal label. The AA input and output legs remain open, so the result is an operator on AA.

This picture is often the cleanest way to remember the operation: a trace closes a pair of matching legs. A partial trace closes only the legs belonging to the subsystem being discarded.

For three subsystems,

HABC=HA⊗HB⊗HC,\mathcal H_{ABC} = \mathcal H_A\otimes\mathcal H_B\otimes\mathcal H_C,

one may trace over more than one subsystem:

ρA=Tr⁡BCρABC=Tr⁡B(Tr⁡CρABC).\rho_A = \operatorname{Tr}_{BC}\rho_{ABC} = \operatorname{Tr}_B \bigl( \operatorname{Tr}_C\rho_{ABC} \bigr).

Partial traces over distinct factors commute:

Tr⁡BTr⁡CρABC=Tr⁡CTr⁡BρABC.\operatorname{Tr}_B\operatorname{Tr}_C\rho_{ABC} = \operatorname{Tr}_C\operatorname{Tr}_B\rho_{ABC}.

The order of tensor factors still matters for index bookkeeping. If the register order is A,B,CA,B,C, then tracing out the middle subsystem means summing over the middle input-output pair, not simply deleting adjacent rows and columns of a matrix.

For finite-dimensional systems, the safest implementation is to reshape the matrix into a tensor with one row index and one column index for each subsystem.

For a bipartite operator with dimensions dAd_A and dBd_B, use components

Xab,a′b′.X_{a b, a' b'}.

Then

(Tr⁡BX)aa′=∑b=0dB−1Xab,a′b.(\operatorname{Tr}_B X)_{a a'} = \sum_{b=0}^{d_B-1} X_{a b, a' b}.

In array language, this is a contraction over the BB row index and the BB column index. A good implementation should make the subsystem dimensions and basis ordering explicit rather than inferring them from the total matrix size.

Apply the calculation checks above to the numerical result, allowing only the stated floating-point tolerance when testing Hermiticity, trace, and nonnegative eigenvalues.

  • Tracing out the subsystem you meant to keep.
  • Projecting onto one state of BB instead of summing over a complete basis of BB.
  • Forgetting that only terms with matching traced-out indices survive.
  • Applying an AA-first block rule to a matrix stored in a different product-basis order.
  • Confusing “take the trace of every block” with “sum the diagonal blocks”; which recipe applies depends on the factor being traced out.
  • Thinking the partial trace destroys normalization; for a normalized density operator, the reduced density operator still has trace one.
  • Expecting the reduced state to preserve joint correlations with the subsystem that was traced out.
  • Treating the basis formula as basis-dependent in its result. The calculation uses a basis, but the operator it returns is basis-independent.
  • Building the full pure-state density matrix when the smaller coefficient-matrix shortcut would suffice.
  • J. von Neumann, Mathematical Foundations of Quantum Mechanics, Princeton University Press, 1955.
  • M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, Cambridge University Press, 2010.
  • J. J. Sakurai and J. Napolitano, Modern Quantum Mechanics, 3rd ed., Cambridge University Press, 2020.
  • A. Peres, Quantum Theory: Concepts and Methods, Kluwer Academic Publishers, 1995.
  • J. Watrous, The Theory of Quantum Information, Cambridge University Press, 2018.
  • H.-P. Breuer and F. Petruccione, The Theory of Open Quantum Systems, Oxford University Press, 2002.
  1. Compute
Tr⁡B(∣0⟩⟨1∣A⊗∣1⟩⟨1∣B).\operatorname{Tr}_B \left( |0\rangle\langle1|_A \otimes |1\rangle\langle1|_B \right).
Solution

The trace of ∣1⟩⟨1∣B|1\rangle\langle1|_B is 11, so

Tr⁡B(∣0⟩⟨1∣A⊗∣1⟩⟨1∣B)=∣0⟩⟨1∣A.\operatorname{Tr}_B \left( |0\rangle\langle1|_A \otimes |1\rangle\langle1|_B \right) = |0\rangle\langle1|_A.
  1. Compute
Tr⁡B(∣0⟩⟨1∣A⊗∣0⟩⟨1∣B).\operatorname{Tr}_B \left( |0\rangle\langle1|_A \otimes |0\rangle\langle1|_B \right).
Solution

The trace of ∣0⟩⟨1∣B|0\rangle\langle1|_B is ⟨1∣0⟩=0\langle1|0\rangle=0, so the result is

0.0.
  1. Trace out qubit BB from the product state ∣01⟩⟨01∣|01\rangle\langle01|.
Solution

Write

∣01⟩⟨01∣=∣0⟩⟨0∣A⊗∣1⟩⟨1∣B.|01\rangle\langle01| = |0\rangle\langle0|_A \otimes |1\rangle\langle1|_B.

Taking the trace over BB gives

Tr⁡B(∣01⟩⟨01∣)=∣0⟩⟨0∣A.\operatorname{Tr}_B(|01\rangle\langle01|) = |0\rangle\langle0|_A.
  1. For the Bell state ∣Φ+⟩|\Phi^+\rangle, compute the reduced state of qubit BB.
Solution

By symmetry, the reduced state of qubit BB is the same as that of qubit AA:

ρB=IB2.\rho_B=\frac{I_B}{2}.

Directly tracing out AA gives the same result because the terms ∣00⟩⟨11∣|00\rangle\langle11| and ∣11⟩⟨00∣|11\rangle\langle00| have zero overlap on subsystem AA.

  1. If ρA=Tr⁡BρAB\rho_A=\operatorname{Tr}_B\rho_{AB}, what operator on ABAB corresponds to measuring an observable MAM_A only on subsystem AA?
Solution

The corresponding composite-system observable is

MA⊗IB.M_A\otimes I_B.

The defining expectation-value property is

Tr⁡AB[ρAB(MA⊗IB)]=Tr⁡A(ρAMA).\operatorname{Tr}_{AB} \left[ \rho_{AB}(M_A\otimes I_B) \right] = \operatorname{Tr}_A(\rho_A M_A).
  1. Verify trace compatibility for a product operator:
Tr⁡A[Tr⁡B(XA⊗YB)]=Tr⁡AB(XA⊗YB).\operatorname{Tr}_A \left[ \operatorname{Tr}_B \bigl( X_A\otimes Y_B \bigr) \right] = \operatorname{Tr}_{AB} \bigl( X_A\otimes Y_B \bigr).

Why does the result extend to finite sums of product operators?

Solution

First trace over BB:

Tr⁡B(XA⊗YB)=XA Tr⁡YB.\operatorname{Tr}_B \bigl( X_A\otimes Y_B \bigr) = X_A\,\operatorname{Tr}Y_B.

Then

Tr⁡A[XA Tr⁡YB]=Tr⁡XA Tr⁡YB=Tr⁡AB(XA⊗YB).\begin{aligned} \operatorname{Tr}_A \left[ X_A\,\operatorname{Tr}Y_B \right] &= \operatorname{Tr}X_A\, \operatorname{Tr}Y_B\\ &= \operatorname{Tr}_{AB} \bigl( X_A\otimes Y_B \bigr). \end{aligned}

Both the full trace and partial trace are linear, so the identity extends term by term to finite sums.

  1. Use the coefficient-matrix shortcut for
∣Ψ⟩=2∣00⟩+∣01⟩+∣11⟩6.\lvert\Psi\rangle = \frac{ 2\lvert00\rangle +\lvert01\rangle +\lvert11\rangle }{\sqrt6}.

Compute both reduced states and check their traces.

Solution

The coefficient matrix is

C=16(2101).C = \frac{1}{\sqrt6} \begin{pmatrix} 2&1\\ 0&1 \end{pmatrix}.

Therefore

ρA=CC†=16(5111),\rho_A = CC^\dagger = \frac16 \begin{pmatrix} 5&1\\ 1&1 \end{pmatrix},

and

ρB=CTC∗=16(4222).\rho_B = C^{\mathsf T}C^* = \frac16 \begin{pmatrix} 4&2\\ 2&2 \end{pmatrix}.

Both have unit trace:

Tr⁡ρA=Tr⁡ρB=1.\operatorname{Tr}\rho_A = \operatorname{Tr}\rho_B =1.
  1. For the Bell state ∣Φ+⟩\lvert\Phi^+\rangle, compare (a) tracing out BB, (b) projecting onto the outcome B=0B=0, and (c) performing a complete computational-basis measurement on BB and discarding its outcome. Identify the output object in each case and explain why (a) and (c) give the same local state on AA even though they are different operations on the joint system.

The expressions for (a) and the unnormalized branch in (b) are

Tr⁡B(∣Φ+⟩⟨Φ+∣)\operatorname{Tr}_B \left( \lvert\Phi^+\rangle\langle\Phi^+\rvert \right)

and

(IA⊗B⟨0∣)∣Φ+⟩⟨Φ+∣(IA⊗∣0⟩B).\bigl( I_A\otimes{}_B\langle0\rvert \bigr) \lvert\Phi^+\rangle\langle\Phi^+\rvert \bigl( I_A\otimes\lvert0\rangle_B \bigr).
Solution

The partial trace sums over a complete basis of BB and gives

Tr⁡B(∣Φ+⟩⟨Φ+∣)=12IA.\operatorname{Tr}_B \left( \lvert\Phi^+\rangle\langle\Phi^+\rvert \right) = \frac12 I_A.

The second expression selects only the B=0B=0 component:

(IA⊗B⟨0∣)∣Φ+⟩⟨Φ+∣(IA⊗∣0⟩B)=12∣0⟩⟨0∣A.\begin{aligned} &\bigl( I_A\otimes{}_B\langle0\rvert \bigr) \lvert\Phi^+\rangle\langle\Phi^+\rvert \bigl( I_A\otimes\lvert0\rangle_B \bigr)\\ &\qquad= \frac12 \lvert0\rangle\langle0\rvert_A. \end{aligned}

It is an unnormalized conditional operator with trace 1/21/2, the probability of the selected outcome. After normalization it becomes ∣0⟩⟨0∣A\lvert0\rangle\langle0\rvert_A.

For (c), the nonselective measurement produces the joint state

ρAB′=12∣00⟩⟨00∣+12∣11⟩⟨11∣.\rho'_{AB} = \frac12\lvert00\rangle\langle00\rvert + \frac12\lvert11\rangle\langle11\rvert.

This operation removes joint coherence and therefore differs from merely computing a reduced state. Nevertheless, Tr⁡BρAB′=IA/2\operatorname{Tr}_B\rho'_{AB}=I_A/2, the same local state obtained in (a). Projection selects one branch, nonselective measurement changes the joint state and averages all branches, and partial trace extracts the local state without specifying a measurement.