QuantumCore

Lesson 8 · 55 min · core

Tensor (Kronecker) Products

Loading progress…

Composite quantum systems live in the tensor product of their parts' Hilbert spaces. This lesson defines ∣a⟩⊗∣b⟩\lvert a\rangle\otimes\lvert b\rangle and A⊗BA\otimes B concretely through the Kronecker product with the platform's big-endian index convention, proves the mixed-product and adjoint rules, counts the 2n2^n amplitudes of nn qubits, builds CNOT as ∣0⟩⟨0∣⊗I+∣1⟩⟨1∣⊗X\lvert0\rangle\langle0\rvert\otimes I+\lvert1\rangle\langle1\rvert\otimes X, and proves that the Bell state ∣Φ+⟩\lvert\Phi^+\rangle is not a product state.

Prerequisites: Linear Operators & Matrix Representations

Objectives and key results
  • Compute ∣a⟩⊗∣b⟩\lvert a\rangle\otimes\lvert b\rangle and A⊗BA\otimes B with the index rule (A⊗B)i1rB+i2,  j1cB+j2=Ai1j1Bi2j2(A\otimes B)_{i_1r_B+i_2,\;j_1c_B+j_2}=A_{i_1j_1}B_{i_2j_2} (qubit 0 = leftmost factor = most significant bit).

  • Use the mixed-product property (A⊗B)(C⊗D)=AC⊗BD(A\otimes B)(C\otimes D)=AC\otimes BD and (A⊗B)†=A†⊗B†(A\otimes B)^\dagger=A^\dagger\otimes B^\dagger to reason about parallel gates.

  • Decide whether a two-qubit pure state is a product state with the criterion ψ00ψ11−ψ01ψ10=0\psi_{00}\psi_{11}-\psi_{01}\psi_{10}=0 and prove that ∣Φ+⟩\lvert\Phi^+\rangle is entangled.

  • Write two-qubit controlled gates as sums of tensor products, e.g. CNOT=∣0⟩⟨0∣⊗I+∣1⟩⟨1∣⊗X\mathrm{CNOT}=\lvert0\rangle\langle0\rvert\otimes I+\lvert1\rangle\langle1\rvert\otimes X.

definition · Kronecker product index rule
(A⊗B)i1rB+i2,  j1cB+j2=Ai1j1Bi2j2(A\otimes B)_{i_1r_B+i_2,\;j_1c_B+j_2}=A_{i_1j_1}B_{i_2j_2}
identity · Mixed product
(A⊗B)(C⊗D)=AC⊗BD(A\otimes B)(C\otimes D)=AC\otimes BD
identity · Adjoint of a tensor product
(A⊗B)†=A†⊗B†(A\otimes B)^\dagger=A^\dagger\otimes B^\dagger
theorem · Product-state criterion (two qubits)
∣ψ⟩=∣a⟩⊗∣b⟩  ⟺  ψ00ψ11−ψ01ψ10=0\lvert\psi\rangle=\lvert a\rangle\otimes\lvert b\rangle\iff\psi_{00}\psi_{11}-\psi_{01}\psi_{10}=0
formula · CNOT as a sum of tensor products
CNOT0→1=∣0⟩⟨0∣⊗I+∣1⟩⟨1∣⊗X\mathrm{CNOT}_{0\to1}=\lvert0\rangle\langle0\rvert\otimes I+\lvert1\rangle\langle1\rvert\otimes X

Tensor products of vectors and spaces#

A single qubit is described by a vector in C2\mathbb C^2. 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 C2⊗C2≅C4\mathbb C^2\otimes\mathbb C^2\cong\mathbb C^4, 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 a∈Cma\in\mathbb C^{m} and b∈Cnb\in\mathbb C^{n}, a⊗b∈Cmna\otimes b\in\mathbb C^{mn} is the column vector with entries (a⊗b)i1n+i2=ai1bi2(a\otimes b)_{i_1n+i_2}=a_{i_1}b_{i_2} for 0≤i1<m0\le i_1<m, 0≤i2<n0\le i_2<n. In blocks: a⊗b=(a0ba1b⋮am−1b)a\otimes b=\begin{pmatrix}a_0b\\a_1b\\\vdots\\a_{m-1}b\end{pmatrix}. We abbreviate ∣i⟩⊗∣j⟩=∣i⟩∣j⟩=∣ij⟩\lvert i\rangle\otimes\lvert j\rangle=\lvert i\rangle\lvert j\rangle=\lvert ij\rangle. For qubits, ∣0⟩⊗∣1⟩=(1,0)T⊗(0,1)T=(0,1,0,0)T=∣01⟩\lvert0\rangle\otimes\lvert1\rangle=(1,0)^T\otimes(0,1)^T=(0,1,0,0)^T=\lvert01\rangle, basis index 0⋅2+1=10\cdot2+1=1.

Proposition

Dimension of a tensor product; nn qubits need 2n2^n amplitudes

If {∣i⟩}i<dA\{\lvert i\rangle\}_{i<d_A} and {∣j⟩}j<dB\{\lvert j\rangle\}_{j<d_B} are orthonormal bases of HA\mathcal H_A and HB\mathcal H_B, then {∣i⟩⊗∣j⟩}\{\lvert i\rangle\otimes\lvert j\rangle\} is an orthonormal basis of HA⊗HB\mathcal H_A\otimes\mathcal H_B, so dim⁡(HA⊗HB)=dAdB\dim(\mathcal H_A\otimes\mathcal H_B)=d_Ad_B. Consequently dim⁡((C2)⊗n)=2n\dim\big((\mathbb C^2)^{\otimes n}\big)=2^n.

Proof (5 steps)
  1. Step 1:
    ⟨a⊗b∣c⊗d⟩=∑i1,i2ai1bi2‾ ci1di2=(∑i1ai1‾ci1)(∑i2bi2‾di2)=⟨a∣c⟩⟨b∣d⟩\langle a\otimes b\vert c\otimes d\rangle=\sum_{i_1,i_2}\overline{a_{i_1}b_{i_2}}\,c_{i_1}d_{i_2}=\Big(\sum_{i_1}\overline{a_{i_1}}c_{i_1}\Big)\Big(\sum_{i_2}\overline{b_{i_2}}d_{i_2}\Big)=\langle a\vert c\rangle\langle b\vert d\rangle
    Inner product of Kronecker vectors: the sum over the composite index is a sum over all pairs (i1,i2)(i_1,i_2), which factorises.
  2. Step 2:
    ⟨ij∣i′j′⟩=⟨i∣i′⟩⟨j∣j′⟩=δii′δjj′\langle ij\vert i'j'\rangle=\langle i\vert i'\rangle\langle j\vert j'\rangle=\delta_{ii'}\delta_{jj'}
    Apply the factorisation to basis vectors: the dAdBd_Ad_B products are orthonormal.
  3. Step 3:
    ∣i⟩⊗∣j⟩=ei dB+j∈CdAdB\lvert i\rangle\otimes\lvert j\rangle=e_{i\,d_B+j}\in\mathbb C^{d_Ad_B}
    In coordinates, the product of two standard basis vectors has a single 11 at index i dB+ji\,d_B+j; as (i,j)(i,j) ranges over all pairs, i dB+ji\,d_B+j ranges over 0,…,dAdB−10,\dots,d_Ad_B-1 exactly once, so these vectors are the whole standard basis.
  4. Step 4:
    dim⁡(HA⊗HB)=dAdB\dim(\mathcal H_A\otimes\mathcal H_B)=d_Ad_B
    An orthonormal basis with dAdBd_Ad_B elements.
  5. Step 5:
    dim⁡((C2)⊗n)=dim⁡((C2)⊗(n−1))⋅2=2n−1⋅2=2n\dim\big((\mathbb C^2)^{\otimes n}\big)=\dim\big((\mathbb C^2)^{\otimes(n-1)}\big)\cdot2=2^{n-1}\cdot2=2^n
    Induction on nn with (C2)⊗n=(C2)⊗(n−1)⊗C2(\mathbb C^2)^{\otimes n}=(\mathbb C^2)^{\otimes(n-1)}\otimes\mathbb C^2 and base case dim⁡C2=2\dim\mathbb C^2=2.

∎

Scale. A 10-qubit register needs 210=10242^{10}=1024 complex amplitudes (16 KiB stored as pairs of 64-bit floats); 30 qubits need 230≈1.07×1092^{30}\approx1.07\times10^9 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 a⊗ba\otimes b is described by only dA+dBd_A+d_B numbers, so most vectors of the tensor product are not products — those are the entangled states.

Worked example. ∣+⟩⊗∣1⟩=12(1⋅(0,1)T1⋅(0,1)T)=12(0,1,0,1)T=12(∣01⟩+∣11⟩)\lvert+\rangle\otimes\lvert1\rangle=\tfrac1{\sqrt2}\begin{pmatrix}1\cdot(0,1)^T\\1\cdot(0,1)^T\end{pmatrix}=\tfrac1{\sqrt2}(0,1,0,1)^T=\tfrac1{\sqrt2}(\lvert01\rangle+\lvert11\rangle). The amplitudes sit at indices 11 and 33, i.e. the bit strings 0101 and 1111: qubit 1 (the right factor, least significant bit) is always 11 and qubit 0 is in superposition.

∣+⟩⊗∣1⟩=12(0101)\lvert+\rangle\otimes\lvert1\rangle=\tfrac1{\sqrt2}\begin{pmatrix}0\\1\\0\\1\end{pmatrix}
Product state |+⟩ ⊗ |1⟩ (column vector)4×1

Quick check

In a 3-qubit register (big-endian), what is the basis index of ∣101⟩=∣1⟩⊗∣0⟩⊗∣1⟩\lvert101\rangle=\lvert1\rangle\otimes\lvert0\rangle\otimes\lvert1\rangle?

tolerance ±1e-9

Kronecker products of operators#

Definition

Tensor product of operators

For operators AA on HA\mathcal H_A and BB on HB\mathcal H_B, A⊗BA\otimes B is the operator on HA⊗HB\mathcal H_A\otimes\mathcal H_B defined on product vectors by (A⊗B)(∣a⟩⊗∣b⟩)=A∣a⟩⊗B∣b⟩(A\otimes B)(\lvert a\rangle\otimes\lvert b\rangle)=A\lvert a\rangle\otimes B\lvert b\rangle and extended linearly (by the proposition of the linear-operators lesson it suffices to specify it on the product basis). Physically: apply AA to the first subsystem and BB to the second, in parallel.

Derivation

The Kronecker index formula

  1. Step 1:
    (A⊗B)∣j1j2⟩=A∣j1⟩⊗B∣j2⟩=(∑i1Ai1j1∣i1⟩)⊗(∑i2Bi2j2∣i2⟩)(A\otimes B)\lvert j_1j_2\rangle=A\lvert j_1\rangle\otimes B\lvert j_2\rangle=\Big(\sum_{i_1}A_{i_1j_1}\lvert i_1\rangle\Big)\otimes\Big(\sum_{i_2}B_{i_2j_2}\lvert i_2\rangle\Big)
    Definition on a product basis vector, then expand each image in its own basis (column rule).
  2. Step 2:
    =∑i1,i2Ai1j1Bi2j2 ∣i1i2⟩=\sum_{i_1,i_2}A_{i_1j_1}B_{i_2j_2}\,\lvert i_1i_2\rangle
    The tensor product is bilinear, so scalars and sums pull out of both slots.
  3. Step 3:
    ⟨i1i2∣A⊗B∣j1j2⟩=Ai1j1Bi2j2\langle i_1i_2\vert A\otimes B\vert j_1j_2\rangle=A_{i_1j_1}B_{i_2j_2}
    Read off the coefficient of ∣i1i2⟩\lvert i_1i_2\rangle using orthonormality of the product basis.
  4. Step 4:
    ∣i1i2⟩=ei1rB+i2,∣j1j2⟩=ej1cB+j2\lvert i_1i_2\rangle=e_{i_1r_B+i_2},\qquad \lvert j_1j_2\rangle=e_{j_1c_B+j_2}
    Big-endian index map: the left factor is the most significant digit (rB=cB=dBr_B=c_B=d_B for square BB).
  5. Step 5:
    (A⊗B)i1rB+i2,  j1cB+j2=Ai1j1Bi2j2(A\otimes B)_{i_1r_B+i_2,\;j_1c_B+j_2}=A_{i_1j_1}B_{i_2j_2}
    Combine the two previous lines. In block form, A⊗BA\otimes B is the rA×cAr_A\times c_A array of blocks Ai1j1BA_{i_1j_1}B.
  6. Step 6:
    A⊗B=(A00BA01BA10BA11B)(A is 2×2)A\otimes B=\begin{pmatrix}A_{00}B&A_{01}B\\A_{10}B&A_{11}B\end{pmatrix}\quad(A\ \text{is}\ 2\times2)
    Visual form used by the KroneckerBuilder widget.
X⊗I=(0⋅I1⋅I1⋅I0⋅I)=(0010000110000100)X\otimes I=\begin{pmatrix}0\cdot I&1\cdot I\\1\cdot I&0\cdot I\end{pmatrix}=\begin{pmatrix}0&0&1&0\\0&0&0&1\\1&0&0&0\\0&1&0&0\end{pmatrix}
X ⊗ I (flip qubit 0)4×4

Unitary verified: U†U=IU^\dagger U = I (max deviation 0.0e+0)

I⊗X=(X00X)=(0100100000010010)I\otimes X=\begin{pmatrix}X&0\\0&X\end{pmatrix}=\begin{pmatrix}0&1&0&0\\1&0&0&0\\0&0&0&1\\0&0&1&0\end{pmatrix}
I ⊗ X (flip qubit 1)4×4

Unitary verified: U†U=IU^\dagger U = I (max deviation 0.0e+0)

X⊗IX\otimes I maps ∣00⟩↦∣10⟩\lvert00\rangle\mapsto\lvert10\rangle (index 0→20\to2), flipping qubit 0; I⊗XI\otimes X maps ∣00⟩↦∣01⟩\lvert00\rangle\mapsto\lvert01\rangle (index 0→10\to1), flipping qubit 1. The two matrices differ even though both "apply XX once" — the position of the factor encodes which qubit is acted on. Two more examples: H⊗HH\otimes H has entries 12(−1)i⋅j\tfrac12(-1)^{i\cdot j} where i⋅ji\cdot j 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 Z⊗Z=diag(1,−1,−1,1)Z\otimes Z=\mathrm{diag}(1,-1,-1,1) measures the parity of two qubits: its eigenvalue is +1+1 on ∣00⟩,∣11⟩\lvert00\rangle,\lvert11\rangle and −1-1 on ∣01⟩,∣10⟩\lvert01\rangle,\lvert10\rangle.

H⊗H=12(11111−11−111−1−11−1−11)H\otimes H=\tfrac12\begin{pmatrix}1&1&1&1\\1&-1&1&-1\\1&1&-1&-1\\1&-1&-1&1\end{pmatrix}
H ⊗ H4×4

Unitary verified: U†U=IU^\dagger U = I (max deviation 0.0e+0)

Z⊗Z=diag(1,−1,−1,1)Z\otimes Z=\mathrm{diag}(1,-1,-1,1)
Z ⊗ Z4×4

Unitary verified: U†U=IU^\dagger U = I (max deviation 0.0e+0)

X⊗Y=(0YY0)=(000−i00i00−i00i000)X\otimes Y=\begin{pmatrix}0&Y\\Y&0\end{pmatrix}=\begin{pmatrix}0&0&0&-i\\0&0&i&0\\0&-i&0&0\\i&0&0&0\end{pmatrix}
X ⊗ Y4×4

Unitary verified: U†U=IU^\dagger U = I (max deviation 0.0e+0)

Theorem

Mixed-product property

For matrices of compatible sizes, (A⊗B)(C⊗D)=AC⊗BD(A\otimes B)(C\otimes D)=AC\otimes BD.

Proof (4 steps)
  1. Step 1:
    [(A⊗B)(C⊗D)](i1,i2),(j1,j2)=∑(k1,k2)(A⊗B)(i1,i2),(k1,k2)(C⊗D)(k1,k2),(j1,j2)\big[(A\otimes B)(C\otimes D)\big]_{(i_1,i_2),(j_1,j_2)}=\sum_{(k_1,k_2)}(A\otimes B)_{(i_1,i_2),(k_1,k_2)}(C\otimes D)_{(k_1,k_2),(j_1,j_2)}
    Matrix product; the composite summation index k=k1cB+k2k=k_1c_B+k_2 runs over all pairs (k1,k2)(k_1,k_2) exactly once.
  2. Step 2:
    =∑k1∑k2Ai1k1Bi2k2Ck1j1Dk2j2=\sum_{k_1}\sum_{k_2}A_{i_1k_1}B_{i_2k_2}C_{k_1j_1}D_{k_2j_2}
    Kronecker index formula for both factors.
  3. Step 3:
    =(∑k1Ai1k1Ck1j1)(∑k2Bi2k2Dk2j2)=\Big(\sum_{k_1}A_{i_1k_1}C_{k_1j_1}\Big)\Big(\sum_{k_2}B_{i_2k_2}D_{k_2j_2}\Big)
    The summand factorises into a k1k_1-part and a k2k_2-part; scalars commute.
  4. Step 4:
    =(AC)i1j1(BD)i2j2=(AC⊗BD)(i1,i2),(j1,j2)=(AC)_{i_1j_1}(BD)_{i_2j_2}=(AC\otimes BD)_{(i_1,i_2),(j_1,j_2)}
    Product rule for each factor, then the Kronecker index formula read backwards.

∎

Proposition

Adjoint of a tensor product; tensor products of unitaries and Hermitians

(A⊗B)†=A†⊗B†(A\otimes B)^\dagger=A^\dagger\otimes B^\dagger. Hence if U,VU,V are unitary then U⊗VU\otimes V is unitary, and if A,BA,B are Hermitian then A⊗BA\otimes B is Hermitian.

Proof (5 steps)
  1. Step 1:
    [(A⊗B)†](i1,i2),(j1,j2)=(A⊗B)(j1,j2),(i1,i2)‾\big[(A\otimes B)^\dagger\big]_{(i_1,i_2),(j_1,j_2)}=\overline{(A\otimes B)_{(j_1,j_2),(i_1,i_2)}}
    The adjoint is the conjugate transpose.
  2. Step 2:
    =Aj1i1Bj2i2‾=Aj1i1‾  Bj2i2‾=(A†)i1j1(B†)i2j2=\overline{A_{j_1i_1}B_{j_2i_2}}=\overline{A_{j_1i_1}}\;\overline{B_{j_2i_2}}=(A^\dagger)_{i_1j_1}(B^\dagger)_{i_2j_2}
    Kronecker index formula and multiplicativity of complex conjugation.
  3. Step 3:
    =(A†⊗B†)(i1,i2),(j1,j2)=(A^\dagger\otimes B^\dagger)_{(i_1,i_2),(j_1,j_2)}
    Kronecker index formula read backwards.
  4. Step 4:
    (U⊗V)†(U⊗V)=(U†⊗V†)(U⊗V)=U†U⊗V†V=I⊗I=I(U\otimes V)^\dagger(U\otimes V)=(U^\dagger\otimes V^\dagger)(U\otimes V)=U^\dagger U\otimes V^\dagger V=I\otimes I=I
    Adjoint rule, then the mixed-product property.
  5. Step 5:
    (A⊗B)†=A†⊗B†=A⊗B(A\otimes B)^\dagger=A^\dagger\otimes B^\dagger=A\otimes B
    For Hermitian factors.

∎

Quick check

Simplify (H⊗X)(H⊗Z)(H\otimes X)(H\otimes Z).

Select one answer

Product states, entanglement and the Schmidt decomposition#

Definition

Product and entangled states

A pure state ∣ψ⟩∈HA⊗HB\lvert\psi\rangle\in\mathcal H_A\otimes\mathcal H_B is a product state if ∣ψ⟩=∣a⟩⊗∣b⟩\lvert\psi\rangle=\lvert a\rangle\otimes\lvert b\rangle for some ∣a⟩∈HA\lvert a\rangle\in\mathcal H_A, ∣b⟩∈HB\lvert b\rangle\in\mathcal H_B; otherwise it is entangled. For two qubits write ∣ψ⟩=∑j,k∈{0,1}ψjk∣jk⟩\lvert\psi\rangle=\sum_{j,k\in\{0,1\}}\psi_{jk}\lvert jk\rangle and collect the amplitudes in the coefficient matrix M=(ψ00ψ01ψ10ψ11)M=\begin{pmatrix}\psi_{00}&\psi_{01}\\\psi_{10}&\psi_{11}\end{pmatrix}.

Theorem

Two-qubit product criterion

A non-zero two-qubit vector ∣ψ⟩\lvert\psi\rangle is a product state if and only if det⁡M=ψ00ψ11−ψ01ψ10=0\det M=\psi_{00}\psi_{11}-\psi_{01}\psi_{10}=0.

Proof (5 steps)
  1. Step 1:
    ∣ψ⟩=∣a⟩⊗∣b⟩ ⇒ ψjk=ajbk\lvert\psi\rangle=\lvert a\rangle\otimes\lvert b\rangle\ \Rightarrow\ \psi_{jk}=a_jb_k
    (⇒\Rightarrow) Kronecker definition of vectors.
  2. Step 2:
    ψ00ψ11−ψ01ψ10=a0b0a1b1−a0b1a1b0=0\psi_{00}\psi_{11}-\psi_{01}\psi_{10}=a_0b_0a_1b_1-a_0b_1a_1b_0=0
    Substitute; the two products contain the same four factors.
  3. Step 3:
    det⁡M=0 ⇒ m0,m1 (columns of M) linearly dependent\det M=0\ \Rightarrow\ m_0,m_1\ \text{(columns of}\ M)\ \text{linearly dependent}
    (⇐\Leftarrow) A 2×22\times2 matrix is singular iff its columns are dependent.
  4. Step 4:
    ∃ a≠0, b0,b1∈C: m0=b0a, m1=b1a\exists\,a\ne0,\ b_0,b_1\in\mathbb C:\ m_0=b_0a,\ m_1=b_1a
    M≠0M\ne0 because ψ≠0\psi\ne0, so some column is non-zero; call it aa. The other column is a multiple of it, so both are multiples of aa.
  5. Step 5:
    M=abT ⇒ ψjk=ajbk ⇒ ∣ψ⟩=∣a⟩⊗∣b⟩M=ab^T\ \Rightarrow\ \psi_{jk}=a_jb_k\ \Rightarrow\ \lvert\psi\rangle=\lvert a\rangle\otimes\lvert b\rangle
    MM has rank one; reading the entries back gives the Kronecker form with b=(b0,b1)Tb=(b_0,b_1)^T. Normalisation can be moved into either factor.

∎

Derivation

∣Φ+⟩=12(∣00⟩+∣11⟩)\lvert\Phi^+\rangle=\tfrac1{\sqrt2}(\lvert00\rangle+\lvert11\rangle) is not a product state

  1. Step 1:
    ψ00=ψ11=12,ψ01=ψ10=0\psi_{00}=\psi_{11}=\tfrac1{\sqrt2},\qquad \psi_{01}=\psi_{10}=0
    Read off the amplitudes.
  2. Step 2:
    det⁡M=12⋅12−0⋅0=12≠0\det M=\tfrac1{\sqrt2}\cdot\tfrac1{\sqrt2}-0\cdot0=\tfrac12\ne0
    By the criterion, ∣Φ+⟩\lvert\Phi^+\rangle is entangled.
  3. Step 3:
    Direct check: a0b0=12, a1b1=12, a0b1=0, a1b0=0\text{Direct check: }a_0b_0=\tfrac1{\sqrt2},\ a_1b_1=\tfrac1{\sqrt2},\ a_0b_1=0,\ a_1b_0=0
    Suppose instead ∣Φ+⟩=∣a⟩⊗∣b⟩\lvert\Phi^+\rangle=\lvert a\rangle\otimes\lvert b\rangle and compare the four amplitudes.
  4. Step 4:
    a0b1=0 ⇒ a0=0 or b1=0a_0b_1=0\ \Rightarrow\ a_0=0\ \text{or}\ b_1=0
    A product of complex numbers vanishes only if a factor does.
  5. Step 5:
    a0=0⇒a0b0=0≠12;b1=0⇒a1b1=0≠12a_0=0\Rightarrow a_0b_0=0\ne\tfrac1{\sqrt2};\qquad b_1=0\Rightarrow a_1b_1=0\ne\tfrac1{\sqrt2}
    Both cases contradict a non-zero amplitude, so no such a,ba,b exist.

Result

∣+⟩⊗∣+⟩=12(1,1,1,1)T  ⇒  det⁡M=14−14=0(product state)\boxed{\lvert+\rangle\otimes\lvert+\rangle=\tfrac12(1,1,1,1)^T\;\Rightarrow\;\det M=\tfrac14-\tfrac14=0\quad\text{(product state)}}
Derivation

Preparing ∣Φ+⟩\lvert\Phi^+\rangle with HH then CNOT

  1. Step 1:
    (H⊗I)∣00⟩=H∣0⟩⊗∣0⟩=12(∣0⟩+∣1⟩)⊗∣0⟩=12(∣00⟩+∣10⟩)(H\otimes I)\lvert00\rangle=H\lvert0\rangle\otimes\lvert0\rangle=\tfrac1{\sqrt2}(\lvert0\rangle+\lvert1\rangle)\otimes\lvert0\rangle=\tfrac1{\sqrt2}(\lvert00\rangle+\lvert10\rangle)
    Hadamard on qubit 0 is H⊗IH\otimes I; the result is still a product state.
  2. Step 2:
    CNOT 12(∣00⟩+∣10⟩)=12(∣00⟩+∣11⟩)=∣Φ+⟩\mathrm{CNOT}\,\tfrac1{\sqrt2}(\lvert00\rangle+\lvert10\rangle)=\tfrac1{\sqrt2}(\lvert00\rangle+\lvert11\rangle)=\lvert\Phi^+\rangle
    CNOT leaves ∣00⟩\lvert00\rangle unchanged and flips the target in ∣10⟩↦∣11⟩\lvert10\rangle\mapsto\lvert11\rangle (linearity).

Result

(A⊗B)(∣a⟩⊗∣b⟩)=A∣a⟩⊗B∣b⟩(local gates never entangle; a non-product gate can)\boxed{(A\otimes B)(\lvert a\rangle\otimes\lvert b\rangle)=A\lvert a\rangle\otimes B\lvert b\rangle\quad\text{(local gates never entangle; a non-product gate can)}}

Circuit · 2 qubits

Quantum circuit on 2 qubitsH on q0; X on q1 controlled by q0q0q1H

Bell-state preparation: HH on qubit 0, then CNOT with control 0 and target 1, producing 12(∣00⟩+∣11⟩)\tfrac1{\sqrt2}(\lvert00\rangle+\lvert11\rangle) with amplitudes (0.7071,0,0,0.7071)(0.7071,0,0,0.7071).

∣ψ⟩=12∣00⟩+12∣11⟩\lvert\psi\rangle = \tfrac{1}{\sqrt{2}}\lvert 00\rangle + \tfrac{1}{\sqrt{2}}\lvert 11\rangle
Theorem

Schmidt decomposition (from the singular value decomposition)

Every unit vector ∣ψ⟩=∑j,kMjk∣j⟩∣k⟩∈CdA⊗CdB\lvert\psi\rangle=\sum_{j,k}M_{jk}\lvert j\rangle\lvert k\rangle\in\mathbb C^{d_A}\otimes\mathbb C^{d_B} can be written ∣ψ⟩=∑r=1Rsr∣ur⟩⊗∣wr⟩\lvert\psi\rangle=\sum_{r=1}^{R}s_r\lvert u_r\rangle\otimes\lvert w_r\rangle with sr>0s_r>0, ∑rsr2=1\sum_rs_r^2=1, and orthonormal sets {∣ur⟩}\{\lvert u_r\rangle\}, {∣wr⟩}\{\lvert w_r\rangle\}. The Schmidt rank R=rank⁡MR=\operatorname{rank}M equals 11 exactly for product states.

Proof (6 steps)
  1. Step 1:
    M=UΣV†,Σ=diag(s1,…,sR,0,… )M=U\Sigma V^\dagger,\qquad \Sigma=\mathrm{diag}(s_1,\dots,s_R,0,\dots)
    Singular value decomposition: every complex matrix has one, with U,VU,V unitary and s1≥⋯≥sR>0s_1\ge\dots\ge s_R>0, R=rank⁡MR=\operatorname{rank}M.
  2. Step 2:
    Mjk=∑r=1RUjr sr Vkr‾M_{jk}=\sum_{r=1}^{R}U_{jr}\,s_r\,\overline{V_{kr}}
    Write out the product entry-wise; only the non-zero singular values contribute.
  3. Step 3:
    ∣ψ⟩=∑rsr(∑jUjr∣j⟩)⊗(∑kVkr‾∣k⟩)=∑rsr∣ur⟩⊗∣wr⟩\lvert\psi\rangle=\sum_rs_r\Big(\sum_jU_{jr}\lvert j\rangle\Big)\otimes\Big(\sum_k\overline{V_{kr}}\lvert k\rangle\Big)=\sum_rs_r\lvert u_r\rangle\otimes\lvert w_r\rangle
    Substitute and use bilinearity of ⊗\otimes to regroup the sums over jj and kk.
  4. Step 4:
    ⟨ur∣ur′⟩=(U†U)rr′=δrr′,⟨wr∣wr′⟩=∑kVkrVkr′‾=(V†V)rr′‾=δrr′\langle u_r\vert u_{r'}\rangle=(U^\dagger U)_{rr'}=\delta_{rr'},\qquad \langle w_r\vert w_{r'}\rangle=\sum_kV_{kr}\overline{V_{kr'}}=\overline{(V^\dagger V)_{rr'}}=\delta_{rr'}
    Columns of a unitary are orthonormal, and so are their complex conjugates.
  5. Step 5:
    1=⟨ψ∣ψ⟩=∑j,k∣Mjk∣2=Tr(M†M)=∑rsr21=\langle\psi\vert\psi\rangle=\sum_{j,k}\lvert M_{jk}\rvert^2=\mathrm{Tr}(M^\dagger M)=\sum_rs_r^2
    Normalisation; the Frobenius norm is invariant under the unitaries U,VU,V.
  6. Step 6:
    R=1  ⟺  rank⁡M=1  ⟺  ∣ψ⟩ is a product stateR=1\iff\operatorname{rank}M=1\iff\lvert\psi\rangle\ \text{is a product state}
    A single Schmidt term is a product; conversely a product has M=abTM=ab^T of rank one. For two qubits, rank⁡M=1  ⟺  det⁡M=0\operatorname{rank}M=1\iff\det M=0, recovering the criterion above.

∎

Quick check

Which state is a product state?

Select one answer

Controlled gates as sums of tensor products#

Not every two-qubit operator is a single tensor product A⊗BA\otimes B — CNOT is not, since it creates entanglement — but by the dimension count every operator on C2⊗C2\mathbb C^2\otimes\mathbb C^2 is a sum of tensor products (the 16 products ∣i⟩⟨j∣⊗∣k⟩⟨l∣\lvert i\rangle\langle j\rvert\otimes\lvert k\rangle\langle l\rvert form a basis of the 4×44\times4 matrices). Controlled gates have a particularly transparent form: "if the control is ∣0⟩\lvert0\rangle do nothing, if it is ∣1⟩\lvert1\rangle apply UU to the target".

Derivation

CNOT=∣0⟩⟨0∣⊗I+∣1⟩⟨1∣⊗X\mathrm{CNOT}=\lvert0\rangle\langle0\rvert\otimes I+\lvert1\rangle\langle1\rvert\otimes X explicitly

  1. Step 1:
    ∣0⟩⟨0∣=(1000),∣1⟩⟨1∣=(0001)\lvert0\rangle\langle0\rvert=\begin{pmatrix}1&0\\0&0\end{pmatrix},\qquad \lvert1\rangle\langle1\rvert=\begin{pmatrix}0&0\\0&1\end{pmatrix}
    Projectors onto the control's computational basis states.
  2. Step 2:
    ∣0⟩⟨0∣⊗I=(1⋅I0⋅I0⋅I0⋅I)=(1000010000000000)\lvert0\rangle\langle0\rvert\otimes I=\begin{pmatrix}1\cdot I&0\cdot I\\0\cdot I&0\cdot I\end{pmatrix}=\begin{pmatrix}1&0&0&0\\0&1&0&0\\0&0&0&0\\0&0&0&0\end{pmatrix}
    Kronecker block form with blocks Ai1j1IA_{i_1j_1}I.
  3. Step 3:
    ∣1⟩⟨1∣⊗X=(0⋅X0⋅X0⋅X1⋅X)=(0000000000010010)\lvert1\rangle\langle1\rvert\otimes X=\begin{pmatrix}0\cdot X&0\cdot X\\0\cdot X&1\cdot X\end{pmatrix}=\begin{pmatrix}0&0&0&0\\0&0&0&0\\0&0&0&1\\0&0&1&0\end{pmatrix}
    Kronecker block form with blocks Ai1j1XA_{i_1j_1}X.
  4. Step 4:
    CNOT=(1000010000010010)=(I00X)\mathrm{CNOT}=\begin{pmatrix}1&0&0&0\\0&1&0&0\\0&0&0&1\\0&0&1&0\end{pmatrix}=\begin{pmatrix}I&0\\0&X\end{pmatrix}
    Add the two matrices; this is the canonical CNOT0→1\mathrm{CNOT}_{0\to1} of the platform's gate table.
  5. Step 5:
    CNOT∣c⟩∣t⟩=∣c⟩∣t⊕c⟩\mathrm{CNOT}\lvert c\rangle\lvert t\rangle=\lvert c\rangle\lvert t\oplus c\rangle
    Apply to basis states: for c=0c=0 only the first term acts (II on the target), for c=1c=1 only the second (XX flips the target).
  6. Step 6:
    CNOT†CNOT=(P0⊗I+P1⊗X)2=P02⊗I+P0P1⊗X+P1P0⊗X+P12⊗X2\mathrm{CNOT}^\dagger\mathrm{CNOT}=\big(P_0\otimes I+P_1\otimes X\big)^2=P_0^2\otimes I+P_0P_1\otimes X+P_1P_0\otimes X+P_1^2\otimes X^2
    Each term is Hermitian (PcP_c, II, XX are), so CNOT†=CNOT\mathrm{CNOT}^\dagger=\mathrm{CNOT}; expand with the mixed-product property, writing Pc=∣c⟩⟨c∣P_c=\lvert c\rangle\langle c\rvert.
  7. Step 7:
    =P0⊗I+0+0+P1⊗I=(P0+P1)⊗I=I⊗I=P_0\otimes I+0+0+P_1\otimes I=(P_0+P_1)\otimes I=I\otimes I
    Pc2=PcP_c^2=P_c, P0P1=P1P0=0P_0P_1=P_1P_0=0, X2=IX^2=I and completeness P0+P1=IP_0+P_1=I: CNOT is unitary and its own inverse.

Result

CcUt=∣0⟩⟨0∣c⊗It+∣1⟩⟨1∣c⊗Ut,CZ=P0⊗I+P1⊗Z=diag(1,1,1,−1)\boxed{C_cU_t=\lvert0\rangle\langle0\rvert_c\otimes I_t+\lvert1\rangle\langle1\rvert_c\otimes U_t,\qquad \mathrm{CZ}=P_0\otimes I+P_1\otimes Z=\mathrm{diag}(1,1,1,-1)}
CNOT0→1=∣0⟩⟨0∣⊗I+∣1⟩⟨1∣⊗X\mathrm{CNOT}_{0\to1}=\lvert0\rangle\langle0\rvert\otimes I+\lvert1\rangle\langle1\rvert\otimes X
CNOT (control qubit 0, target qubit 1)4×4

Unitary verified: U†U=IU^\dagger U = I (max deviation 0.0e+0)

Quick check

How many complex amplitudes does the statevector of a 10-qubit register have?

tolerance ±1e-9

Check it numerically. The cell below builds CNOT from projectors with np.kron, forms ∣+⟩⊗∣1⟩\lvert+\rangle\otimes\lvert1\rangle, prepares ∣Φ+⟩\lvert\Phi^+\rangle and evaluates the product criterion det⁡M\det M and the Schmidt coefficients (singular values of MM).

Pythonrunnable
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

  1. 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).
  2. S. Axler, Linear Algebra Done Right, 4th ed., Springer (2024), §9D (tensor products) and §7E (singular value decomposition).linear.axler.net
  3. 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-graded

    Use single-qubit gates only to prepare ∣+⟩⊗∣1⟩=12(∣01⟩+∣11⟩)\lvert+\rangle\otimes\lvert1\rangle=\tfrac{1}{\sqrt2}(\lvert01\rangle+\lvert11\rangle) on two qubits, and see why the Kronecker order (qubit 00 is the left factor) decides which qubit gets which gate.

    Open lab