Lesson 8 · 55 min · core
Tensor (Kronecker) Products
Composite quantum systems live in the tensor product of their parts' Hilbert spaces. This lesson defines and concretely through the Kronecker product with the platform's big-endian index convention, proves the mixed-product and adjoint rules, counts the amplitudes of qubits, builds CNOT as , and proves that the Bell state is not a product state.
Prerequisites: Linear Operators & Matrix Representations
Objectives and key results
Compute and with the index rule (qubit 0 = leftmost factor = most significant bit).
Use the mixed-product property and to reason about parallel gates.
Decide whether a two-qubit pure state is a product state with the criterion and prove that is entangled.
Write two-qubit controlled gates as sums of tensor products, e.g. .
- definition · Kronecker product index rule
- identity · Mixed product
- identity · Adjoint of a tensor product
- theorem · Product-state criterion (two qubits)
- formula · CNOT as a sum of tensor products
Tensor products of vectors and spaces#
A single qubit is described by a vector in . Two qubits are not described by a pair of such vectors: the postulate of composite systems (Module 1.3) says the joint state lives in the tensor product , whose dimension is the product of the dimensions. This multiplicative growth is simultaneously the source of the exponential cost of classical simulation and of the phenomenon of entanglement. In this lesson we make the tensor product completely concrete: it is the Kronecker product of column vectors and matrices, with a fixed ordering of indices that the whole platform — the statevector engine, circuit diagrams and labs — shares.
Definition
Tensor (Kronecker) product of vectors
For and , is the column vector with entries for , . In blocks: . We abbreviate . For qubits, , basis index .
Dimension of a tensor product; qubits need amplitudes
If and are orthonormal bases of and , then is an orthonormal basis of , so . Consequently .
Proof (5 steps)
- Step 1:Inner product of Kronecker vectors: the sum over the composite index is a sum over all pairs , which factorises.
- Step 2:Apply the factorisation to basis vectors: the products are orthonormal.
- Step 3:In coordinates, the product of two standard basis vectors has a single at index ; as ranges over all pairs, ranges over exactly once, so these vectors are the whole standard basis.
- Step 4:An orthonormal basis with elements.
- Step 5:Induction on with and base case .
∎
Scale. A 10-qubit register needs complex amplitudes (16 KiB stored as pairs of 64-bit floats); 30 qubits need amplitudes, i.e. 16 GiB. Each extra qubit doubles the memory, which is why the in-browser simulator targets 10–12 qubits and why a quantum computer's state space is so large. A product vector is described by only numbers, so most vectors of the tensor product are not products — those are the entangled states.
Worked example. . The amplitudes sit at indices and , i.e. the bit strings and : qubit 1 (the right factor, least significant bit) is always and qubit 0 is in superposition.
Quick check
In a 3-qubit register (big-endian), what is the basis index of ?
Kronecker products of operators#
Definition
Tensor product of operators
For operators on and on , is the operator on defined on product vectors by and extended linearly (by the proposition of the linear-operators lesson it suffices to specify it on the product basis). Physically: apply to the first subsystem and to the second, in parallel.
The Kronecker index formula
- Step 1:Definition on a product basis vector, then expand each image in its own basis (column rule).
- Step 2:The tensor product is bilinear, so scalars and sums pull out of both slots.
- Step 3:Read off the coefficient of using orthonormality of the product basis.
- Step 4:Big-endian index map: the left factor is the most significant digit ( for square ).
- Step 5:Combine the two previous lines. In block form, is the array of blocks .
- Step 6:Visual form used by the KroneckerBuilder widget.
Unitary verified: (max deviation 0.0e+0)
Unitary verified: (max deviation 0.0e+0)
maps (index ), flipping qubit 0; maps (index ), flipping qubit 1. The two matrices differ even though both "apply once" — the position of the factor encodes which qubit is acted on. Two more examples: has entries where is the bitwise dot product of the row and column bit strings (this is the Walsh–Hadamard transform used in Deutsch–Jozsa and Grover), and measures the parity of two qubits: its eigenvalue is on and on .
Unitary verified: (max deviation 0.0e+0)
Unitary verified: (max deviation 0.0e+0)
Unitary verified: (max deviation 0.0e+0)
Mixed-product property
For matrices of compatible sizes, .
Proof (4 steps)
- Step 1:Matrix product; the composite summation index runs over all pairs exactly once.
- Step 2:Kronecker index formula for both factors.
- Step 3:The summand factorises into a -part and a -part; scalars commute.
- Step 4:Product rule for each factor, then the Kronecker index formula read backwards.
∎
Adjoint of a tensor product; tensor products of unitaries and Hermitians
. Hence if are unitary then is unitary, and if are Hermitian then is Hermitian.
Proof (5 steps)
- Step 1:The adjoint is the conjugate transpose.
- Step 2:Kronecker index formula and multiplicativity of complex conjugation.
- Step 3:Kronecker index formula read backwards.
- Step 4:Adjoint rule, then the mixed-product property.
- Step 5:For Hermitian factors.
∎
Quick check
Simplify .
Product states, entanglement and the Schmidt decomposition#
Definition
Product and entangled states
A pure state is a product state if for some , ; otherwise it is entangled. For two qubits write and collect the amplitudes in the coefficient matrix .
Two-qubit product criterion
A non-zero two-qubit vector is a product state if and only if .
Proof (5 steps)
- Step 1:() Kronecker definition of vectors.
- Step 2:Substitute; the two products contain the same four factors.
- Step 3:() A matrix is singular iff its columns are dependent.
- Step 4:because , so some column is non-zero; call it . The other column is a multiple of it, so both are multiples of .
- Step 5:has rank one; reading the entries back gives the Kronecker form with . Normalisation can be moved into either factor.
∎
is not a product state
- Step 1:Read off the amplitudes.
- Step 2:By the criterion, is entangled.
- Step 3:Suppose instead and compare the four amplitudes.
- Step 4:A product of complex numbers vanishes only if a factor does.
- Step 5:Both cases contradict a non-zero amplitude, so no such exist.
Result
Preparing with then CNOT
- Step 1:Hadamard on qubit 0 is ; the result is still a product state.
- Step 2:CNOT leaves unchanged and flips the target in (linearity).
Result
Circuit · 2 qubits
Bell-state preparation: on qubit 0, then CNOT with control 0 and target 1, producing with amplitudes .
Schmidt decomposition (from the singular value decomposition)
Every unit vector can be written with , , and orthonormal sets , . The Schmidt rank equals exactly for product states.
Proof (6 steps)
- Step 1:Singular value decomposition: every complex matrix has one, with unitary and , .
- Step 2:Write out the product entry-wise; only the non-zero singular values contribute.
- Step 3:Substitute and use bilinearity of to regroup the sums over and .
- Step 4:Columns of a unitary are orthonormal, and so are their complex conjugates.
- Step 5:Normalisation; the Frobenius norm is invariant under the unitaries .
- Step 6:A single Schmidt term is a product; conversely a product has of rank one. For two qubits, , recovering the criterion above.
∎
Quick check
Which state is a product state?
Controlled gates as sums of tensor products#
Not every two-qubit operator is a single tensor product — CNOT is not, since it creates entanglement — but by the dimension count every operator on is a sum of tensor products (the 16 products form a basis of the matrices). Controlled gates have a particularly transparent form: "if the control is do nothing, if it is apply to the target".
explicitly
- Step 1:Projectors onto the control's computational basis states.
- Step 2:Kronecker block form with blocks .
- Step 3:Kronecker block form with blocks .
- Step 4:Add the two matrices; this is the canonical of the platform's gate table.
- Step 5:Apply to basis states: for only the first term acts ( on the target), for only the second ( flips the target).
- Step 6:Each term is Hermitian (, , are), so ; expand with the mixed-product property, writing .
- Step 7:, , and completeness : CNOT is unitary and its own inverse.
Result
Unitary verified: (max deviation 0.0e+0)
Quick check
How many complex amplitudes does the statevector of a 10-qubit register have?
Check it numerically. The cell below builds CNOT from projectors with np.kron, forms , prepares and evaluates the product criterion and the Schmidt coefficients (singular values of ).
import numpy as np
I = np.eye(2)
X = np.array([[0, 1], [1, 0]])
P0 = np.array([[1, 0], [0, 0]])
P1 = np.array([[0, 0], [0, 1]])
CNOT = np.kron(P0, I) + np.kron(P1, X)
print(CNOT.astype(int))
plus = np.array([1, 1]) / np.sqrt(2)
one = np.array([0, 1])
print(np.round(np.kron(plus, one), 4))
phi_plus = CNOT @ np.kron(plus, [1, 0])
M = phi_plus.reshape(2, 2)
print(np.round(phi_plus, 4), round(float(np.linalg.det(M)), 4))
print(np.round(np.linalg.svd(M, compute_uv=False), 4))Expected output
[[1 0 0 0] [0 1 0 0] [0 0 0 1] [0 0 1 0]] [0. 0.7071 0. 0.7071] [0.7071 0. 0. 0.7071] 0.5 [0.7071 0.7071]
References
- M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 10th anniversary ed., Cambridge University Press (2010), §2.1.7 (tensor products), §2.2.8 (composite systems) and §2.5 (Schmidt decomposition).
- S. Axler, Linear Algebra Done Right, 4th ed., Springer (2024), §9D (tensor products) and §7E (singular value decomposition).linear.axler.net
- R. A. Horn and C. R. Johnson, Topics in Matrix Analysis, Cambridge University Press (1991), Chapter 4 (the Kronecker product).
Hands-on labs
Build the product state |+⟩ ⊗ |1⟩
1 step · auto-gradedOpen labUse single-qubit gates only to prepare on two qubits, and see why the Kronecker order (qubit is the left factor) decides which qubit gets which gate.