Lean, informalized

Nielsen & Chuang · Chapter 10, Quantum error-correction · p. 446

Exercise 10.14 - The generator matrix that sends each of kk symbols rr times, and the dimension of its code

Encoding by repetition as a linear code.

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 classical message of kk symbols is protected against noise by sending every symbol rr times, so that it goes out as a word of length rkrk; with k=2k = 2 and r=3r = 3 the message x1x2x_1 x_2 is sent as x1x1x1x2x2x2x_1 x_1 x_1 x_2 x_2 x_2. The encoding is linear: a generator matrix GG with rkrk rows and kk columns takes a message xx to its codeword GxGx. The exercise asks for GG, and for the code it generates to be an [rk,k][rk,k] code, a subspace of dimension kk in the words of length rkrk.

The Repetition Code

The symbols are elements of a field KK, bits when K=ℤ2K = \mathbb{Z}_2, and a message is a vector x=(x1,…,xk)x = (x_1, \dots, x_k) in KkK^k. The positions of a word of length rkrk are labelled by pairs (i,j)(i,j), with ii running from 11 to kk and jj from 11 to rr, so that a word is a vector of KrkK^{rk} with one entry for each pair.

The generator matrix GG of the repetition code is the rk×krk \times k matrix over KK with rows labelled by the positions (i,j)(i,j), columns labelled by the symbols ll, and entries G(i,j),l={1,l=i,0,l≠i.G_{(i,j),\,l} = \begin{cases} 1, & l = i,\\ 0, & l \neq i. \end{cases}(1)✦

The repetition code CC over KK is the linear code of length rkrk, a subspace of KrkK^{rk}, whose codewords are the images of all messages under GG: C={Gx:x∈Kk}⊆Krk.C = \{\, Gx : x \in K^k \,\} \subseteq K^{rk}.(2)✦

The Claim

Theorem 1. Let KK be a field and kk and rr natural numbers. For every message x∈Kkx \in K^k, the codeword GxGx carries xix_i at each of the rr positions (i,j)(i,j) of the iith symbol: (Gx)(i,j)=xi.(Gx)_{(i,j)} = x_i .(3)✦ If r≥1r \ge 1, the repetition code has dimension kk: dim⁡KC=k.\dim_K C = k .(4)✦

For r≥1r \ge 1 this is the exercise: CC is an [rk,k][rk,k] code with generator matrix GG.

What Is Checked

The claim is stated over the generator matrix GG of (1) and the repetition code CC of (2) that it generates. About these two constructions the library proves the encoding rule (3), for every rr, and the dimension (4), for r≥1r \ge 1.