Steven GellerQuantum Computing, End to End

Book contents

Current section

Part II. Mathematical Core

  1. Complex Numbers for Quantum Computing
  2. Vectors, Bases, and Amplitudes
  3. Inner Products, Orthogonality, and Projection
  4. Matrices as Gates
  5. Unitary Operations and Reversibility
  6. Tensor Products and State-Space Growth
  7. Observables, Eigenvectors, and Measurement
  8. Density Matrices and Mixed States

Part II. Mathematical Core · Chapter 13

Tensor Products and State-Space Growth

Three qubits need eight amplitudes; thirty need about a billion; fifty need more memory than your laptop has. The tensor product is the rule behind that growth — and the reason the growth cannot be cashed out as readable output.

Artifact
In this chapter 8 sections

Reader question. How are independently described quantum systems combined, and why does their joint statevector grow exponentially?

The joint state space is the tensor product: subsystem dimensions multiply, product-state amplitudes are pairwise products in a declared basis order, and n qubits require 2^n complex coordinates even though a measurement returns only n classical bits.

Scope and non-goals.
  • This chapter does not claim exponential statevector size automatically yields exponential computational speedup.
  • It does not yet classify general entanglement or introduce tensor-network algorithms in depth.
State space grows exponentially while readout stays linear The state space grows; the readout does not roughly what a laptop holds naive simulation gets hard around here complex amplitudes to track (2^n) measurement returns at most n classical bits per shot, whatever the curve says 10 20 30 40 qubits
Figure 13.1. Notice where the curve crosses the dashed line; a few dozen qubits suffice to defeat straightforward classical simulation; and that nothing about the readout improves on the way: each shot still returns at most one classical bit per qubit.

Dimensions multiply when systems combine

Derive dim(HAHB)=dim(HA)dim(HB)\dim(\mathcal{H}_A\otimes\mathcal{H}_B)=\dim(\mathcal{H}_A)\dim(\mathcal{H}_B).

One qubit has two basis states. Two qubits have four. Three have eight, and nn qubits have 2n2^n computational basis states, each carrying its own complex amplitude in the statevector.

The growth is real, and it is easy to misread. The statevector has one amplitude per basis state, but measurement does not print amplitudes; it returns one basis state, sampled according to their squared magnitudes. The craft of quantum algorithms is shaping amplitudes so that this thin sampled sliver carries the answer. Tensor products supply the language for all of it: multi-qubit states, entanglement, and circuit simulation alike.

Evidence boundary. Composite finite-dimensional quantum systems use tensor-product state spaces whose dimensions multiply. [John Watrous] [Michael A. Nielsen]

Kronecker products set the coordinates

Expand two symbolic qubits in an ordered joint basis.

If:

a=a00+a11,b=b00+b11.\begin{aligned}\lvert a\rangle&=a_0\lvert0\rangle+a_1\lvert1\rangle,\\\lvert b\rangle&=b_0\lvert0\rangle+b_1\lvert1\rangle.\end{aligned}(13.1)

Then the combined state is the product, expanded term by term:

ab=a0b000+a0b101+a1b010+a1b111\lvert a\rangle\otimes\lvert b\rangle=a_0b_0\lvert00\rangle+a_0b_1\lvert01\rangle+a_1b_0\lvert10\rangle+a_1b_1\lvert11\rangle(13.2)

Dimensions multiply:

dim(AB)=dim(A)dim(B)\dim(A\otimes B)=\dim(A)\dim(B)(13.3)

Two-dimensional systems composed nn times give the familiar 2n2^n. Every amplitude in the big vector is a product of amplitudes from the small ones; when the state factors at all. Entangled states are precisely the ones that cannot be written this way.

Evidence boundary. Product-state coordinates are Kronecker products in a specified ordered basis. [Michael A. Nielsen] [John Preskill]

A four-amplitude example by hand

Compute |+>⊗|-> and verify normalization.

Evidence boundary. An n-qubit pure statevector has 2^n complex coordinates while computational-basis measurement returns an n-bit outcome. [Michael A. Nielsen] [National Academies of Sciences]

dim(Hn)=2n;(00,01,10,11)\dim(\mathcal H_n)=2^n;\quad (\lvert00\rangle,\lvert01\rangle,\lvert10\rangle,\lvert11\rangle)(13.4)

Notation contract: Subsystem order A⊗B; basis order (|00>,|01>,|10>,|11>); n qubits have 2^n coordinates; memory units distinguish GB/GiB.

Product structure versus arbitrary joint vectors

Identify the coefficient constraint for factorability.

Tensor products explain why naive simulation dies young: a statevector for nn qubits holds 2n2^n complex amplitudes, and memory follows. But the same growth implies no automatic application advantage; only that the physical state space is large and hard to represent classically in the straightforward way. Good simulators and compilers survive by exploiting what the naive representation ignores: sparsity, tensor-network structure, and limited entanglement.

A debugging habit worth keeping: write the basis index table before the vector. For two qubits, decide whether index 11 means 01\lvert01\rangle or 10\lvert10\rangle under your convention, and write it down. Many wrong circuit traces are not deep physics errors; they are indexing errors that stay invisible while the notation stays implicit.

Memory doubles with every qubit

Quantify naive statevector storage and the thin classical readout.

A dense statevector has 2^n complex entries. With complex128 storage, its payload is 16 times 2^n bytes before allocator, checkpoint, and parallel-distribution overhead. Thirty qubits require 16 GiB; forty require 16 TiB. This is a statement about the naive representation, not a lower bound for every classical simulator: low entanglement, sparsity, stabilizer structure, or repeated tensor structure can permit compressed methods.

Tensor-product growth calculator

Acceptance contract for Tensor-product growth calculator
FieldReader-visible record
FormatNotebook and browser calculator for coordinates, memory, and factorability
VerificationTests Kronecker products against fixtures, preserves norm, verifies 2^n sizing, and checks factorability for selected states.
AvailabilitySource-embedded acceptance record; no separate download is claimed
{
  "artifact": "Tensor-product growth calculator",
  "format": "Notebook and browser calculator for coordinates, memory, and factorability",
  "acceptance_test": "Tests Kronecker products against fixtures, preserves norm, verifies 2^n sizing, and checks factorability for selected states.",
  "publication_state": "source-embedded contract and worked fixture"
}

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

import math

def kron(left, right):
    if not left or not right:
        raise ValueError("tensor factors must be nonempty")
    return tuple(a * b for a in left for b in right)

def norm2(vector):
    return sum(abs(value) ** 2 for value in vector)

def factorability_gap(two_qubit_state):
    if len(two_qubit_state) != 4:
        raise ValueError("factorability fixture expects two qubits")
    a00, a01, a10, a11 = two_qubit_state
    return abs(a00 * a11 - a01 * a10)

def resources(qubits, bytes_per_amplitude=16):
    if qubits < 1 or bytes_per_amplitude < 1:
        raise ValueError("resource parameters must be positive")
    coordinates = 1 << qubits
    return coordinates, coordinates * bytes_per_amplitude

scale = math.sqrt(0.5)
zero, one, plus, plus_i = (1, 0), (0, 1), (scale, scale), (scale, 1j * scale)
product_pairs = ((zero, one), (plus, plus_i), ((0.6, 0.8j), (scale, -scale)))
product_gaps = []
for left, right in product_pairs:
    state = kron(left, right)
    assert abs(norm2(state) - norm2(left) * norm2(right)) < 1e-12
    product_gaps.append(factorability_gap(state))
assert max(product_gaps) < 1e-12

bell_states = ((scale, 0, 0, scale), (0, scale, scale, 0))
entangled_gaps = [factorability_gap(state) for state in bell_states]
assert min(entangled_gaps) > 0.49

ket_010 = kron(kron(zero, one), zero)
assert len(ket_010) == 8 and ket_010[2] == 1
assert kron(one, zero) != kron(zero, one)
for qubits in range(1, 16):
    coordinates, memory = resources(qubits)
    assert coordinates == 2 ** qubits and memory == 16 * coordinates
largest_coordinates, largest_memory = resources(30)
assert largest_coordinates == 1_073_741_824 and largest_memory == 17_179_869_184

empty_rejected = False
try:
    kron((), zero)
except ValueError:
    empty_rejected = True
assert empty_rejected
dimension_rejected = False
try:
    factorability_gap((1, 0, 0))
except ValueError:
    dimension_rejected = True
assert dimension_rejected
print(f"PASS: 13 tensor calculator verifies {len(product_pairs)} product and {len(bell_states)} entangled states; Bell determinant gap={min(entangled_gaps):.3f}, 30-qubit memory={largest_memory / 2**30:.1f} GiB")

Scope boundary

  • This chapter does not claim exponential statevector size automatically yields exponential computational speedup.
  • It does not yet classify general entanglement or introduce tensor-network algorithms in depth.

Depth commitment. One general expansion, one numerical state, one factorability condition, and one memory calculation.

Practice problem

Expand (30+1)/2(0i1)/2(\sqrt{3}\lvert0\rangle+\lvert1\rangle)/2\otimes(\lvert0\rangle-i\lvert1\rangle)/\sqrt{2}, verify normalization, and estimate memory for 30 complex128 qubits.

Deliverable
Exact four amplitudes, norm calculation, and byte/GiB conversion.
Pass condition
The calculator reproduces the vector and memory value using 16 bytes per complex128 entry.

Verification record

Expected solution form. Symbolic expansion plus executable memory/factorization report.

Model answer. The amplitudes in |00>,|01>,|10>,|11> order are sqrt(3)/(2sqrt(2)), -i sqrt(3)/(2sqrt(2)), 1/(2sqrt(2)), and -i/(2sqrt(2)). Their squared magnitudes sum to one. Thirty complex128 qubits require 2^30 times 16 bytes, exactly 16 GiB before overhead.

Model result and check. CI compares each amplitude, norm, entry count, and unit conversion.

Acceptance test. The calculator reproduces the vector and memory value using 16 bytes per complex128 entry.

Companion work

Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

  1. Reproduce or test

    python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts

Provenance

Sources and review

  1. John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018textbook
  2. Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010textbook
  3. John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018graduate lecture notes
  4. National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

Cite this chapter