Skip to content

CHAPTER 05

# Registers, circuits, and entanglement

Learning goals. Expand tensor products, apply controlled gates, inspect circuit evolution, and distinguish product states from entangled states.

## 5.1 Tensor products build joint state spaces

For two qubits,

(α|0⟩+β|1⟩)⊗(γ|0⟩+δ|1⟩)=α γ|00⟩+α δ|01⟩+β γ|10⟩+β δ|11⟩.(\alpha|0\rangle+\beta|1\rangle)\otimes (\gamma|0\rangle+\delta|1\rangle) =\alpha\gamma|00\rangle+\alpha\delta|01\rangle +\beta\gamma|10\rangle+\beta\delta|11\rangle.

The joint amplitudes multiply for a product preparation. Our vector order is |00⟩,|01⟩,|10⟩,|11⟩|00\rangle,|01\rangle,|10\rangle,|11\rangle, with q 0 q_0 on the left. An arbitrary two-qubit pure state is

|ψ⟩=a|00⟩+b|01⟩+c|10⟩+d|11⟩,|\psi\rangle=a|00\rangle+b|01\rangle+c|10\rangle+d|11\rangle,

with |a|2+|b|2+|c|2+|d|2=1|a|^2+|b|^2+|c|^2+|d|^2=1. Not every such state factors.

For matrices, A⊗B A\otimes B replaces each entry a j k a_{jk} of A by the block a j k B a_{jk}B. Consequently A⊗I A\otimes I acts on the left qubit and I⊗A I\otimes A on the right. The dimension doubles per qubit; a general n n-qubit pure state has 2 n 2^n complex amplitudes. This is the memory cost of a particular classical representation, not an accessible list of classical data inside a quantum register.

## 5.2 Controlled operations

A controlled-U with the left qubit controlling is

C(U)=|0⟩⟨0|⊗I+|1⟩⟨1|⊗U.C(U)=|0\rangle\langle0|\otimes I+ |1\rangle\langle1|\otimes U.

For CNOT,

|00⟩↦|00⟩,|01⟩↦|01⟩,|10⟩↦|11⟩,|11⟩↦|10⟩.|00\rangle\mapsto|00\rangle,\quad |01\rangle\mapsto|01\rangle, \quad |10\rangle\mapsto|11\rangle,\quad |11\rangle\mapsto|10\rangle.

A control in superposition does not perform a classical random choice. Linearity applies the correct transformation to each branch while retaining coherence.

Worked Bell preparation. Begin in |00⟩|00\rangle:

|00⟩→H⊗I|00⟩+|10⟩2→C N O T|00⟩+|11⟩2=|Φ+⟩.|00\rangle\xrightarrow{H\otimes I} \frac{|00\rangle+|10\rangle}{\sqrt2} \xrightarrow{\mathrm{CNOT}} \frac{|00\rangle+|11\rangle}{\sqrt2}=|\Phi^+\rangle.

The circuit has two nonzero final amplitudes. Z measurements always agree, with 00 and 11 each occurring half the time.

Figure 5.1. Bell-state preparation, with the top wire as the most significant qubit.

## 5.3 How to recognize entanglement

If the state factors, its coefficients obey a=α γ,b=α δ,c=β γ,d=β δ a=\alpha\gamma,b=\alpha\delta,c=\beta\gamma,d=\beta\delta, hence a d−b c=0 ad-bc=0. Conversely a nonzero 2×2 2\times2 coefficient matrix (a b c d)\begin{pmatrix}a&b\\c&d\end{pmatrix} with determinant zero has rank one and factors as an outer product. Therefore a normalized two-qubit pure state is a product state exactly when a d−b c=0 ad-bc=0.

For |Φ+⟩|\Phi^+\rangle, a d−b c=1/2 ad-bc=1/2, so it is entangled. A useful pure-state measure is concurrence

C=2|a d−b c|,C=2|ad-bc|,

which ranges from zero for products to one for maximally entangled pairs. This formula does not apply unchanged to a mixed two-qubit state.

The family

|ψ(θ,ϕ)⟩=cos θ|00⟩+e i ϕ sin θ|11⟩|\psi(\theta,\phi)\rangle =\cos\theta|00\rangle+e^{i\phi}\sin\theta|11\rangle

is a product at θ=0,π/2\theta=0,\pi/2 and maximally entangled at θ=π/4\theta=\pi/4. Its Z statistics do not depend on ϕ\phi, but correlations in other bases do.

## 5.4 Measuring part of a register

For a|00⟩+b|01⟩+c|10⟩+d|11⟩a|00\rangle+b|01\rangle+c|10\rangle+d|11\rangle, measuring the first qubit gives 0 with probability |a|2+|b|2|a|^2+|b|^2. The conditioned state is

a|00⟩+b|01⟩|a|2+|b|2.\frac{a|00\rangle+b|01\rangle}{\sqrt{|a|^2+|b|^2}}.

We sum probabilities over unresolved, orthogonal alternatives. We do not add a+b a+b before squaring because the second-qubit states remain distinguishable.

Worked example. Consider

|χ⟩=|00⟩+2 i|01⟩+2|10⟩3.|\chi\rangle=\frac{|00\rangle+2i|01\rangle+2|10\rangle}{3}.

The norm squared is (1+4+4)/9=1(1+4+4)/9=1. Measuring the first qubit yields p(0)=5/9 p(0)=5/9 and p(1)=4/9 p(1)=4/9. Conditioned on 0, the state is (|00⟩+2 i|01⟩)/5(|00\rangle+2i|01\rangle)/\sqrt5; conditioned on 1 it is |10⟩|10\rangle. The conditional probability of right-qubit result 1 in the first branch is 4/5 4/5, so the joint probability is (5/9)(4/5)=4/9(5/9)(4/5)=4/9.

## 5.5 Circuit semantics

A wire represents a subsystem, not a trajectory. A box is a specified gate; a vertical line connects controls and targets; measurement produces a classical record. Disjoint gates commute, but operations on a common subsystem may not.

The laboratory lets you append gates, remove or reorder operations, step through state-vector evolution, and sample a final computational measurement. A mid-circuit measurement creates a trajectory conditioned on a sampled record. Repeating such a circuit must resample the measurement on each shot. Sampling a single collapsed trajectory repeatedly would give the wrong unconditional distribution.

Classical feed-forward means a recorded bit chooses a later operation. In teleportation, this is essential. Coherently controlling a gate with a qubit and classically controlling it with a measurement result are related but distinct implementations.

Laboratory L06 — Circuit workbench. Build circuits with up to eight qubits. Apply single-qubit, controlled, swap, and measurement operations. Step through the actual amplitudes; change shots and seed; export the circuit. Prepare a Bell state, undo it, then insert a measurement before the undo operation.

## 5.6 Entanglement does not guarantee computational difficulty

Some highly entangled states have compact descriptions. Bell pairs, GHZ states, and many stabilizer states can be simulated efficiently using specialized classical representations. Entanglement is important, but “entangled” is not synonymous with “beyond classical simulation.” Chapter 16 compares representations and the structures that make each effective.

The same caution applies to qubit counts. A thousand independent qubits may be easier to simulate than a much smaller generic entangled circuit. A useful resource statement must identify state structure, allowed gates, and the required output.

## 5.7 Exercises

5.1. Expand |+⟩⊗|−i⟩|+\rangle\otimes|-i\rangle.

Show solution / guidance

The amplitudes in our order are (1,−i,1,−i)/2(1,-i,1,-i)/2. The squared moduli are all 1/4 1/4; the determinant of the coefficient matrix is zero.

5.2. Is (|00⟩+|01⟩+|10⟩−|11⟩)/2(|00\rangle+|01\rangle+|10\rangle-|11\rangle)/2 entangled?

Show solution / guidance

a d−b c=−1/4−1/4=−1/2 ad-bc=-1/4-1/4=-1/2, so concurrence is one. Equal measurement probabilities alone do not distinguish it from a product state.

5.3. Calculate CNOT applied to |+⟩|+⟩|+\rangle|+\rangle.

Show solution / guidance

CNOT permutes the four equal amplitudes, leaving the state unchanged. A two-qubit entangling gate need not entangle every input.

5.4. Starting with |Φ+⟩|\Phi^+\rangle, apply CNOT and then H on the first qubit.

Show solution / guidance

CNOT gives (|00⟩+|10⟩)/2=|+⟩|0⟩(|00\rangle+|10\rangle)/\sqrt2=|+\rangle|0\rangle; H then gives |00⟩|00\rangle. The Bell-preparation circuit is reversed.

5.5. Explain why a left-qubit measurement probability is |a|2+|b|2|a|^2+|b|^2, not |a+b|2|a+b|^2.

Show solution / guidance

The projector is |0⟩⟨0|⊗I|0\rangle\langle0|\otimes I. The surviving vector is a|00⟩+b|01⟩a|00\rangle+b|01\rangle, whose norm has cross terms proportional to ⟨0|1⟩=0\langle0|1\rangle=0 on the right subsystem.

IN THIS CHAPTER