The Exercise
A linear code of length over a field is a subspace of , the space of words of letters from ; its elements are the codewords, and is their number. The exercise concerns binary codes, , whose words are strings of bits added position by position modulo 2.
Fix a word and give each codeword of a binary code the sign , where (1) is the dot product, computed here modulo 2. The exercise asks for the sum of these signs over the whole code. Up to normalisation, that sum is the amplitude of when Hadamard gates, , act on the equal superposition of the codewords.
The Dual Code
The dual code of a linear code of length over is the linear code of all words orthogonal to every codeword of , with the dot product (1) computed in : (2)✦
The Claim
Theorem 1. Let be a binary linear code of length and a word of bits. Then (3)✦