Lean, informalized

Nielsen & Chuang · Chapter 5, The quantum Fourier transform and its applications · p. 243

Problem 5.2 - The quantum Fourier transform and a measurement of every qubit, done with one qubit gates chosen by earlier outcomes

Measuring the Fourier transform one qubit at a time.

Hover over a blue or green term in the text, or a node in the graph, to find it in the other. Select it to read its declaration both in Lean and in words.

The Exercise

A register of n+1n+1 qubits is in a state ρ\rho. The quantum Fourier transform on its 2n+12^{n+1} levels is applied, and then every qubit is measured in the computational basis. The exercise is to obtain the same measurement with no two qubit gate: the qubits are measured one at a time, every gate acts on a single qubit, and a gate may depend on the outcomes already read.

A Register of Qubits

A quantum system SS is a physical object whose state space is a finite dimensional complex Hilbert space.✦ The qudit with dd levels is the system whose state space is ℂd\mathbb{C}^d, and the qubit QQ is the qudit with two levels, the system whose state space is ℂ2\mathbb{C}^2, with computational basis |0⟩,|1⟩|0\rangle, |1\rangle.

A state ρ\rho of SS is a density operator on the state space of SS, that is, a positive operator of unit trace. A pure state ψ\psi of SS is a unit vector |ψ⟩|\psi\rangle in the state space of SS, and it determines the state |ψ⟩⟨ψ||\psi\rangle\langle\psi|, the projector onto that vector. A unitary UU of SS is an operator on the state space of SS with U†U=UU†=1U^\dagger U = U U^\dagger = 1.✦ A unitary UU of SS takes a state ρ\rho of SS to the state UρU†U \rho U^\dagger and is also called an evolution of SS; the identity evolution of SS is the unitary 11.

The register QnQ_n of n+1n+1 qubits is built by composing one qubit at a time on the left, Q0=Q,Qn+1=Q⊗Qn,Q_0 = Q, \qquad Q_{n+1} = Q \otimes Q_n ,(1)✦ and its wires are numbered 0,1,…,n0, 1, \dots, n from the left. A string of bits r=(r0,…,rn)r = (r_0, \dots, r_n) gives the computational basis state of QnQ_n with rtr_t on wire tt, |r⟩=|r0⟩⊗|r1⟩⊗⋯⊗|rn⟩.|r\rangle = |r_0\rangle \otimes |r_1\rangle \otimes \cdots \otimes |r_n\rangle .(2)✦

An identification ee of a system SS with a system TT is a linear isometric bijection from the state space of SS onto that of TT; it carries a unitary UU of SS to the evolution eUe−1e\, U e^{-1} of TT. The qudit with 2n+12^{n+1} levels is identified with QnQ_n by the identification ene_n that splits off one qubit at a time along ℂ2m≅ℂ2⊗ℂm\mathbb{C}^{2m} \cong \mathbb{C}^2 \otimes \mathbb{C}^m, for every m≥1m \geq 1; for n=0n = 0 it is the identity of the qubit.✦

The Fourier Transform

For a dimension d≥1d \geq 1, let ω=e2πi/d\omega = e^{2\pi i/d} be the primitive ddth root of unity.✦ The Fourier matrix of dimension dd is the complex d×dd \times d matrix with entries Fkj=ωjkd,j,k=0,1,…,d−1,F_{kj} = \frac{\omega^{jk}}{\sqrt{d}}, \qquad j, k = 0, 1, \dots, d-1,(3) and the quantum Fourier transform FF is the evolution of the qudit with dd levels whose matrix in the computational basis is (3). On the register QnQ_n the transform is the one on 2n+12^{n+1} levels carried along ene_n, Fn=enFen−1.F_n = e_n\, F\, e_n^{-1} .(4)✦

Measurements

A measurement ℳ\mathcal{M} on SS with a finite set of outcomes is a family of measurement operators MiM_i on the state space of SS, one for each outcome ii, satisfying the completeness relation ∑iMi†Mi=1\sum_i M_i^\dagger M_i = 1.✦ The positive operator valued measure of ℳ\mathcal{M} assigns to the outcome ii the effect Ei=Mi†MiE_i = M_i^\dagger M_i.✦ Performed on a state ρ\rho, the measurement gives ii with the probability pℳ(i∣ρ)=Tr⁡(MiρMi†)=Tr⁡(Eiρ),p_{\mathcal{M}}(i \mid \rho) = \operatorname{Tr}(M_i \rho M_i^\dagger) = \operatorname{Tr}(E_i \rho),(5) and when this probability is not zero the state after the outcome is MiρMi†/pℳ(i∣ρ)M_i \rho M_i^\dagger / p_{\mathcal{M}}(i \mid \rho).

The measurement ℳn\mathcal{M}_n of every wire of QnQ_n in the computational basis has the bit strings rr as outcomes, rtr_t being the bit read on wire tt.✦ On one qubit it is the measurement in the basis |0⟩,|1⟩|0\rangle, |1\rangle; on Qn+1Q_{n+1}, split as in (1), it reads the first qubit and then performs ℳn\mathcal{M}_n on the rest.✦

The Semiclassical Transform

The phase gate P(α)P(\alpha) with angle α\alpha is the unitary of the qubit that is diagonal in the computational basis, P(α)=diag⁡(1,eiα)P(\alpha) = \operatorname{diag}(1, e^{i\alpha}).✦ For a unitary gg of the qubit and a wire tt of QnQ_n, the gate g(t)g^{(t)} on wire tt is the unitary of QnQ_n that applies gg to wire tt and the identity to every other wire.✦ A sequence of wires and angles (t1,α1),…,(tm,αm)(t_1, \alpha_1), \dots, (t_m, \alpha_m) gives the cascade of phase gates Φ=P(α1)(t1)P(α2)(t2)⋯P(αm)(tm).\Phi = P(\alpha_1)^{(t_1)}\, P(\alpha_2)^{(t_2)} \cdots P(\alpha_m)^{(t_m)} .(6)✦

On the wires of QnQ_n take the angles θt=2π⋅2n−t2n+2=2π2t+2,t=0,1,…,n,\theta_t = \frac{2\pi \cdot 2^{\,n-t}}{2^{n+2}} = \frac{2\pi}{2^{t+2}}, \qquad t = 0, 1, \dots, n,(7)✦ so that P(θt)P(\theta_t) is the book’s gate Rt+2R_{t+2}, with Rk=diag⁡(1,e2πi/2k)R_k = \operatorname{diag}(1, e^{2\pi i/2^k}). For a bit ii, the correction CiC_i on QnQ_n is the identity evolution for i=0i = 0 and, for i=1i = 1, the cascade (6) with P(θt)P(\theta_t) on each wire tt: C0=1,C1=P(θ0)(0)P(θ1)(1)⋯P(θn)(n).C_0 = 1, \qquad C_1 = P(\theta_0)^{(0)}\, P(\theta_1)^{(1)} \cdots P(\theta_n)^{(n)} .(8)✦

Write 𝒩∘U\mathcal{N} \circ U for a measurement 𝒩\mathcal{N} performed after a unitary UU, and 𝒵[𝒩i]\mathcal{Z}[\mathcal{N}_i] for the measurement on Q⊗QnQ \otimes Q_n that reads wire 00 in the computational basis and, on the outcome ii, performs a measurement 𝒩i\mathcal{N}_i on the remaining register QnQ_n. With HH the Hadamard gate, the semiclassical measured transform 𝒮n\mathcal{S}_n is the measurement on QnQ_n defined by 𝒮0=ℳ0∘H,𝒮n+1=𝒵[𝒮n∘Ci]∘H(0).\mathcal{S}_0 = \mathcal{M}_0 \circ H, \qquad \mathcal{S}_{n+1} = \mathcal{Z}\bigl[\mathcal{S}_n \circ C_i\bigr] \circ H^{(0)} .(9)✦ Its outcomes on Qn+1Q_{n+1}, the bit read on wire 00 together with an outcome of 𝒮n\mathcal{S}_n, are relabelled as strings of n+2n+2 bits.

The Claim

Theorem 1. Let n≥0n \geq 0, let ρ\rho be a state of QnQ_n and σ=FnρFn†\sigma = F_n \rho F_n^\dagger its image under the transform, let r=(r0,…,rn)r = (r_0, \dots, r_n) be a string of bits, and let MrM_r and SrS_r be the operators of ℳn\mathcal{M}_n and 𝒮n\mathcal{S}_n for the outcome rr. For each bit ii there are unitaries g1,…,gmg_1, \dots, g_m of the qubit and wires t1,…,tmt_1, \dots, t_m of QnQ_n with Ci=g1(t1)g2(t2)⋯gm(tm).C_i = g_1^{(t_1)}\, g_2^{(t_2)} \cdots g_m^{(t_m)} .(10)✦ If pℳn(r∣σ)≠0p_{\mathcal{M}_n}(r \mid \sigma) \neq 0, the state after the outcome rr of ℳn\mathcal{M}_n on σ\sigma is MrσMr†pℳn(r∣σ)=|r⟩⟨r|.\frac{M_r \sigma M_r^\dagger}{p_{\mathcal{M}_n}(r \mid \sigma)} = |r\rangle\langle r| .(11)✦ The two procedures give the outcome rr with the same probability, pℳn(r∣σ)=p𝒮n(r∣ρ).p_{\mathcal{M}_n}(r \mid \sigma) = p_{\mathcal{S}_n}(r \mid \rho) .(12)✦ If p𝒮n(r∣ρ)≠0p_{\mathcal{S}_n}(r \mid \rho) \neq 0, the state after the outcome rr of 𝒮n\mathcal{S}_n on ρ\rho is SrρSr†p𝒮n(r∣ρ)=|rn,rn−1,…,r0⟩⟨rn,rn−1,…,r0|.\frac{S_r \rho S_r^\dagger}{p_{\mathcal{S}_n}(r \mid \rho)} = |r_n, r_{n-1}, \dots, r_0\rangle\langle r_n, r_{n-1}, \dots, r_0| .(13)✦

Parts (10) and (12) answer the exercise.

What Is Checked

The claim is stated over the transform FnF_n of (4), carried to the register from the qudit with 2n+12^{n+1} levels, the measurement ℳn\mathcal{M}_n of every wire, the semiclassical transform (9) with its corrections (8), the gates on single wires and the basis states (2), through the probability (5) and the state after an outcome.

About these constructions the library proves that the Fourier matrix is unitary, so that FF is a unitary of the qudit, and that a unitary carried along an identification is again unitary, which makes FnF_n one. The phase gate P(α)P(\alpha) is unitary, as a diagonal operator whose entries have unit modulus, and the effects EiE_i of a measurement are positive and sum to 11. Conjugation by a unitary takes density operators to density operators; the state after an outcome of nonzero probability, and the projector |ψ⟩⟨ψ||\psi\rangle\langle\psi| onto a unit vector, are density operators as well.