Skip to content
Current section
The Quantum Computing Enthusiast’s Hub
Saved
All sections

All sections

Saved
Skip Learn navigation
Encyclopedia
Topic

Tensor products and qubit ordering

A tensor product constructs the state space of a composite quantum system and fixes how subsystem states and operators are represented jointly.

Edition released Coverage: Overview · Technical · Research
On this page

Definition and importance

If system A has dimension d_A and B has dimension d_B, their joint space has dimension d_A d_B. A product state |a> tensor |b> has coefficients formed by pairwise products. General joint states are linear combinations of such products and need not factor into one product. That nonfactorization is the source of pure-state entanglement.

This encyclopedia displays q0 as the leftmost tensor factor. For two qubits, the ordered basis is |00>,|01>,|10>,|11>, with the first digit referring to q0. Software packages can use different indexing and display conventions. A reference code example must translate explicitly rather than assuming a printed bit string identifies the same vector index everywhere.

Solved product-state calculation

Take |a>=(|0>+i|1>)/sqrt(2) on q0 and |b>=(2|0>+|1>)/sqrt(5) on q1. Their product is (2|00>+|01>+2i|10>+i|11>)/sqrt(10). The computational probabilities are 4/10,1/10,4/10,1/10. q0 is uniform, while q1 returns zero with probability 8/10. The probabilities factor as p(q0)p(q1), and the amplitudes factor as a_i b_j.

Apply X tensor I. The left factor flips, producing (2i|00>+i|01>+2|10>+|11>)/sqrt(10). Apply I tensor X instead and obtain (|00>+2|01>+i|10>+2i|11>)/sqrt(10). The two operations are different even when a shorthand circuit label appears similar.

Operator identities

(A tensor B)(C tensor D)=AC tensor BD when dimensions match. The adjoint is A-dagger tensor B-dagger, and Tr(A tensor B)=Tr(A)Tr(B). The tensor product is not ordinary matrix multiplication. Its dimensions multiply rather than requiring equal inner dimensions in the same way as a matrix product.

For a bipartite pure state with coefficient matrix M_ij, factorization is possible exactly when M has rank one. In a two-qubit case a|00>+b|01>+c|10>+d|11>, the condition is ad-bc=0. For the example above, (2)(i)-(1)(2i)=0 before the common normalization, confirming a product state.

Limits and subtle points

Subsystem labels are physical bookkeeping, whereas an array's byte order is an implementation detail. Swapping the labels and applying a physical SWAP gate are not identical operations. Identical-particle systems require additional care: a tensor factor may represent a mode or encoded subsystem rather than a distinguishable particle. Fermionic signs and superselection constraints belong in specialized records.

Entanglement depends on the stated partition

For three qubits with q0 leftmost, consider |Psi>=(|000>+|110>)/sqrt(2). Across the partition (q0 q1)|q2, this factors as (|00>+|11>)/sqrt(2) tensor |0>. Its coefficient matrix has one nonzero column and therefore rank one. Across q0|(q1 q2), the two rows contain nonzero entries in different columns: the first has |00> with amplitude 1/sqrt(2), and the second has |10> with the same amplitude. That matrix has rank two. The same state is product across one partition and entangled across another.

Consequently a claim that a multipartite state is separable must specify the partition or a stronger definition such as full separability. The placement of parentheses is not merely typography. It determines which degrees of freedom are grouped together as one subsystem and which correlations count as crossing the boundary.

The state also illustrates why dimensions multiply. The grouped subsystem q0 q1 has dimension four and q2 has dimension two. The total dimension is eight. Regrouping as q0 and q1 q2 changes which factor has dimension four but not the total state space. Tensor associativity gives a natural identification between these regroupings without supplying a physical interaction.

Independent computational probabilities do not establish a product state

Consider |C>=(|00>+|01>+|10>-|11>)/2. Every computational outcome has probability one quarter, so the two bits have independent uniform distributions in that measurement basis. Nevertheless, the coefficient matrix M=[[1,1],[1,-1]]/2 has determinant -1/2 and rank two. The state is entangled. Multiplying M by its adjoint gives I/2, so either reduced state is maximally mixed.

The minus sign changes no computational probability but changes the factorization of the amplitudes. It can be exposed through correlations in another measurement basis. In fact, <X tensor Z>=1: applying X tensor Z exchanges |00> with |10>, and exchanges |01> with -|11>, leaving the full vector unchanged. The uniform computational histogram therefore conceals a perfect correlation in a different pair of local bases.

For a pure product state, amplitude factorization implies factorization of probabilities in every product measurement basis. Factorization observed in one basis is only a necessary condition for that restricted distribution. It is not a sufficient test of the quantum state. Mixed states require still more care because separable mixtures can contain classical correlations without entanglement.

The same state |C> is also a +1 eigenstate of Z tensor X. The two observables X tensor Z and Z tensor X commute because their local anticommutations cancel. Their product is Y tensor Y, so its expectation is also one. These joint constraints coexist with completely uniform computational probabilities.

Mixed-dimensional indexing with an explicit example

Let A be a qubit and B a qutrit. With A leftmost and B varying fastest, the ordered basis is |00>,|01>,|02>,|10>,|11>,|12>. The array index of |i>|j> is 3i+j. Define a qutrit cyclic shift T|j>=|(j+1) mod 3>. Then (Z tensor T)|1>|2>=-|1>|0>. The nonzero amplitude moves from index five to index three and acquires a minus sign.

Reversing the factor order would use a different index map, namely 2j+i. A permutation matrix translates between the two coordinate conventions. That translation must also be applied to all operators and observables. Changing the printed order of a ket while leaving the operator matrices fixed generally changes the calculation.

A physical SWAP is another matter. It moves quantum information between labeled systems and is directly defined between equal-dimensional registers. Merely displaying a qubit-qutrit composite in the opposite order is a coordinate relabeling between differently ordered spaces; it should not be presented as an ordinary two-qubit SWAP gate acting on the original registers.

Checking the tensor-product multiplication rule

The matrix elements of A tensor B are (A tensor B)_((i,j),(k,l))=A_ik B_jl. Multiplying by C tensor D and summing over k,l produces sum_kl A_ik B_jl C_km D_ln=(AC)_im(BD)_jn. This proves the mixed-product identity when dimensions match. The separate sums explain why operators on different factors commute: (A tensor I)(I tensor B)=A tensor B=(I tensor B)(A tensor I).

Sources

  • John Preskill · · Lecture or course notes · preskill.caltech.edu
    Verification scope

    Citation 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.

  • John Watrous · · Textbook material · cs.uwaterloo.ca
    Verification scope

    The Theory of Quantum Information, Chapter 1: Mathematical preliminaries
    John Watrous · · Textbook material · cs.uwaterloo.ca

    Citation 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.ca

    Selected 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.

  • John Watrous · · Textbook material · cs.uwaterloo.ca
    Verification scope

    The Theory of Quantum Information: Chapter 2, Basic notions of quantum information
    John Watrous · · Manuscript · Author manuscript · cs.uwaterloo.ca

    Selected 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.